Back to home page

MITgcm

 
 

    


File indexing completed on 2023-03-29 05:10:08 UTC

view on githubraw file Latest commit cda1c18f on 2023-03-28 22:31:47 UTC
cda1c18f72 Jean*0001 #ifndef EXF_OPTIONS_H
                0002 #define EXF_OPTIONS_H
                0003 #include "PACKAGES_CONFIG.h"
                0004 #include "CPP_OPTIONS.h"
                0005 
27195b0786 Jean*0006 CBOP
                0007 C !ROUTINE: EXF_OPTIONS.h
                0008 C !INTERFACE:
                0009 C #include "EXF_OPTIONS.h"
                0010 
                0011 C !DESCRIPTION:
                0012 C *==================================================================*
                0013 C | CPP options file for EXternal Forcing (EXF) package:
                0014 C | Control which optional features to compile in this package code.
                0015 C *==================================================================*
                0016 CEOP
                0017 
6d54cf9ca1 Ed H*0018 #ifdef ALLOW_EXF
27195b0786 Jean*0019 #ifdef ECCO_CPPOPTIONS_H
661e031832 Patr*0020 
27195b0786 Jean*0021 C-- When multi-package option-file ECCO_CPPOPTIONS.h is used (directly included
                0022 C    in CPP_OPTIONS.h), this option file is left empty since all options that
                0023 C   are specific to this package are assumed to be set in ECCO_CPPOPTIONS.h
3bf2214c38 Jean*0024 
27195b0786 Jean*0025 #else /* ndef ECCO_CPPOPTIONS_H */
6d54cf9ca1 Ed H*0026 
27195b0786 Jean*0027 C-- Package-specific Options & Macros go here
cee16b76ae Dimi*0028 
27195b0786 Jean*0029 C   --------------------
7f6c81175d Jean*0030 C   pkg/exf CPP options:
                0031 C   (see also table below on how to combine options)
                0032 
423768d890 Jean*0033 C   > ( EXF_VERBOSE ) < replaced with run-time integer parameter "exf_debugLev"
27195b0786 Jean*0034 C
                0035 C   >>> ALLOW_ATM_WIND <<<
7f6c81175d Jean*0036 C       If defined, set default value of run-time param. "useAtmWind" to True.
                0037 C       If useAtmWind=True, read-in and use wind vector (uwind/vwind)
                0038 C       to compute surface wind stress.
27195b0786 Jean*0039 C
                0040 C   >>> ALLOW_ATM_TEMP <<<
7f6c81175d Jean*0041 C       This is the main EXF option controlling air-sea buoyancy fluxes:
                0042 C      If undefined, net heat flux (Qnet) and net fresh water flux
423768d890 Jean*0043 C       (EmP or EmPmR) are set according to hfluxfile & sfluxfile setting.
7f6c81175d Jean*0044 C      If defined, net heat flux and net fresh water flux are computed
423768d890 Jean*0045 C       from sum of various components (radiative SW,LW + turbulent heat
                0046 C       fluxes SH,LH ; Evap, Precip and optionally RunOff) thus ignoring
                0047 C       hfluxfile & sfluxfile.
                0048 C      In addition, it allows to read-in from files atmospheric temperature
7f6c81175d Jean*0049 C       and specific humidity, net radiative fluxes, and precip.
423768d890 Jean*0050 C       Also enable to read-in Evap (if EXF_READ_EVAP is defined) or
                0051 C       turbulent heat fluxes (if ALLOW_READ_TURBFLUXES is defined).
27195b0786 Jean*0052 C
                0053 C   >>> ALLOW_DOWNWARD_RADIATION <<<
                0054 C       If defined, downward long-wave and short-wave radiation
423768d890 Jean*0055 C       can be read-in form files to compute net lwflux and swflux.
27195b0786 Jean*0056 C
                0057 C   >>> ALLOW_ZENITHANGLE <<<
                0058 C       If defined, ocean albedo varies with the zenith angle, and
                0059 C       incoming fluxes at the top of the atmosphere are computed
                0060 C
                0061 C   >>> ALLOW_BULKFORMULAE <<<
                0062 C       Allows the use of bulk formulae in order to estimate
423768d890 Jean*0063 C       turbulent fluxes (Sensible,Latent,Evap) at the ocean surface.
                0064 C
                0065 C   >>> EXF_CALC_ATMRHO
                0066 C       Calculate the local air density as function of temp, humidity
                0067 C       and pressure
27195b0786 Jean*0068 C
                0069 C   >>> EXF_READ_EVAP <<<
423768d890 Jean*0070 C       If defined, evaporation field is read-in from file;
7f6c81175d Jean*0071 C     Note: if ALLOW_BULKFORMULAE is defined, evap that is computed from
                0072 C       atmospheric state will be replaced by read-in evap but computed
                0073 C       latent heat flux will be kept.
423768d890 Jean*0074 C
                0075 C   >>> ALLOW_READ_TURBFLUXES <<<
7f6c81175d Jean*0076 C       If defined, turbulent heat fluxes (sensible and latent) can be read-in
                0077 C       from files (but overwritten if ALLOW_BULKFORMULAE is defined).
27195b0786 Jean*0078 C
                0079 C   >>> ALLOW_RUNOFF <<<
                0080 C       If defined, river and glacier runoff can be read-in from files.
                0081 C
a66aad0124 Gael*0082 C   >>> ALLOW_SALTFLX <<<
                0083 C       If defined, upward salt flux can be read-in from files.
                0084 C
e603dbf008 Dimi*0085 C   >>> ALLOW_RUNOFTEMP <<<
                0086 C       If defined, river and glacier runoff temperature
                0087 C       can be read-in from files.
                0088 C
27195b0786 Jean*0089 C   >>> ATMOSPHERIC_LOADING <<<
                0090 C       If defined, atmospheric pressure can be read-in from files.
                0091 C   WARNING: this flag is set (define/undef) in CPP_OPTIONS.h
7f6c81175d Jean*0092 C            and cannot be changed here (in EXF_OPTIONS.h)
27195b0786 Jean*0093 C
497d85062c Jean*0094 C   >>> EXF_ALLOW_TIDES <<<
                0095 C       If defined, 2-D tidal geopotential can be read-in from files
                0096 C
24da7525ba Jean*0097 C   >>> EXF_SEAICE_FRACTION <<<
                0098 C       If defined, seaice fraction can be read-in from files (areaMaskFile)
27195b0786 Jean*0099 C
                0100 C   >>> ALLOW_CLIMSST_RELAXATION <<<
cda1c18f72 Jean*0101 C       Allow the relaxation of surface level temperature to SST (climatology),
                0102 C       e.g. the Reynolds climatology.
27195b0786 Jean*0103 C
                0104 C   >>> ALLOW_CLIMSSS_RELAXATION <<<
cda1c18f72 Jean*0105 C       Allow the relaxation of surface level salinity to SSS (climatology),
                0106 C       e.g. the Levitus climatology.
27195b0786 Jean*0107 C
                0108 C   >>> USE_EXF_INTERPOLATION <<<
7f6c81175d Jean*0109 C       Allows to provide input field on arbitrary Lat-Lon input grid
                0110 C       (as specified in EXF_NML_04) and to interpolate to model grid.
                0111 C     Note: default is to interpolate unless {FLD}_interpMethod is set to 0
8053a926ae Jean*0112 C
27195b0786 Jean*0113 C   ====================================================================
                0114 C
423768d890 Jean*0115 C    The following CPP options:
7f6c81175d Jean*0116 C       ALLOW_ATM_WIND / useAtmWind (useWind)
                0117 C       ALLOW_ATM_TEMP               (TEMP)
                0118 C       ALLOW_DOWNWARD_RADIATION     (DOWN)
                0119 C       ALLOW_BULKFORMULAE           (BULK)
                0120 C       EXF_READ_EVAP                (EVAP)
                0121 C       ALLOW_READ_TURBFLUXES        (TURB)
                0122 C
                0123 C    permit all ocean-model forcing configurations listed in the 2 tables below.
                0124 C    The first configuration (A1,B1) is the flux-forced, ocean model.
                0125 C    Configurations A2,B3 and A2,B4 use pkg/exf open-water bulk formulae
                0126 C    to compute, from atmospheric variables, the missing surface fluxes.
423768d890 Jean*0127 C    The forcing fields in the rightmost column are defined in EXF_FIELDS.h
7f6c81175d Jean*0128 C    (ocean-model surface forcing field are defined in model/inc/FFIELDS.h)
423768d890 Jean*0129 C
7f6c81175d Jean*0130 C    (A) Surface momentum flux: [model: fu,fv ; exf: ustress,vstress]
423768d890 Jean*0131 C
7f6c81175d Jean*0132 C    # |useWind|        actions
                0133 C   ---|-------|-------------------------------------------------------------
                0134 C   (1)| False | Read-in ustress,vstress (if needed in B, compute wind-speed)
                0135 C      |       |
                0136 C   (2)| True  | Read-in uwind,vwind ; compute wind stress ustress,vstress.
                0137 C   ---|-------|-------------------------------------------------------------
423768d890 Jean*0138 C
7f6c81175d Jean*0139 C    (B) Surface buoyancy flux:
                0140 C        [ net heat flux: Qnet (exf: hflux), net short-wave: Qsw (exf: swflux)
                0141 C          fresh-water flux: EmPmR (exf: sflux) and saltFlux (exf: saltflx) ]
423768d890 Jean*0142 C
                0143 C    # |TEMP |DOWN |BULK |EVAP |TURB |            actions
                0144 C   ---|-----|-----|-----|-----|-----|-------------------------------------
                0145 C   (1)|  -  |  -  |  -  |  -  |  -  | Read-in hflux, swflux and sflux.
                0146 C      |     |     |     |     |     |
                0147 C   (2)|  -  | def |  -  |  -  |  -  | Read-in hflux, swdown and sflux.
                0148 C      |     |     |     |     |     | Compute swflux.
                0149 C      |     |     |     |     |     |
                0150 C   (3)| def | def | def |  -  |  -  | Read-in atemp, aqh, swdown, lwdown,
                0151 C      |     |     |     |     |     |  precip, and runoff.
                0152 C      |     |     |     |     |     | Compute hflux, swflux and sflux.
                0153 C      |     |     |     |     |     |
                0154 C   (4)| def |  -  | def |  -  |  -  | Read-in atemp, aqh, swflux, lwflux,
                0155 C      |     |     |     |     |     |  precip, and runoff.
                0156 C      |     |     |     |     |     | Compute hflux and sflux.
                0157 C      |     |     |     |     |     |
                0158 C   (5)| def | def |  -  | def | def | Read-in hs, hl, swdown, lwdown,
                0159 C      |     |     |     |     |     |  evap, precip and runoff.
                0160 C      |     |     |     |     |     | Compute hflux, swflux and sflux.
                0161 C      |     |     |     |     |     |
                0162 C   (6)| def |  -  |  -  | def | def | Read-in hs, hl, swflux, lwflux,
                0163 C      |     |     |     |     |     |  evap, precip and runoff.
                0164 C      |     |     |     |     |     | Compute  hflux and sflux.
                0165 C
                0166 C   =======================================================================
                0167 
                0168 C-  Bulk formulae related flags.
7f6c81175d Jean*0169 #define ALLOW_ATM_TEMP
                0170 #define ALLOW_ATM_WIND
                0171 #define ALLOW_DOWNWARD_RADIATION
423768d890 Jean*0172 #ifdef ALLOW_ATM_TEMP
80415d59b6 Jean*0173 C Note: To use ALLOW_BULKFORMULAE or EXF_READ_EVAP, needs #define ALLOW_ATM_TEMP
423768d890 Jean*0174 # define ALLOW_BULKFORMULAE
cc60455fbb Mart*0175 C use Large and Yeager (2004) modification to Large and Pond bulk formulae
423768d890 Jean*0176 # undef  ALLOW_BULK_LARGEYEAGER04
cc60455fbb Mart*0177 C use drag formulation of Large and Yeager (2009), Climate Dyn., 33, pp 341-364
                0178 # undef  ALLOW_DRAG_LARGEYEAGER09
423768d890 Jean*0179 # undef  EXF_READ_EVAP
                0180 # ifndef ALLOW_BULKFORMULAE
                0181 C  Note: To use ALLOW_READ_TURBFLUXES, ALLOW_ATM_TEMP needs to
                0182 C        be defined but ALLOW_BULKFORMULAE needs to be undef
                0183 #  define ALLOW_READ_TURBFLUXES
                0184 # endif
                0185 #endif /* ALLOW_ATM_TEMP */
                0186 
                0187 C-  Other forcing fields
7f6c81175d Jean*0188 #define ALLOW_RUNOFF
                0189 #undef  ALLOW_RUNOFTEMP
                0190 #define ALLOW_SALTFLX
423768d890 Jean*0191 
                0192 #if (defined (ALLOW_BULKFORMULAE) && defined (ATMOSPHERIC_LOADING))
                0193 C Note: To use EXF_CALC_ATMRHO, both ALLOW_BULKFORMULAE
                0194 C       and ATMOSPHERIC_LOADING need to be defined
                0195 # undef EXF_CALC_ATMRHO
8053a926ae Jean*0196 #endif
3bf2214c38 Jean*0197 
423768d890 Jean*0198 C-  Zenith Angle/Albedo related flags.
d106b5e2d8 Gael*0199 #ifdef ALLOW_DOWNWARD_RADIATION
f71b2ceff6 Gael*0200 # undef ALLOW_ZENITHANGLE
d106b5e2d8 Gael*0201 #endif
                0202 
423768d890 Jean*0203 C-  Use ocean_emissivity*lwdown in lwFlux. This flag should be defined
2fcdc11fc2 Jean*0204 C   unless to reproduce old results (obtained with inconsistent old code)
2aea5dc37c Mart*0205 #ifdef ALLOW_DOWNWARD_RADIATION
2fcdc11fc2 Jean*0206 # define EXF_LWDOWN_WITH_EMISSIVITY
2aea5dc37c Mart*0207 #endif
                0208 
cda1c18f72 Jean*0209 C-  Surface level relaxation to prescribed fields (e.g., climatologies)
3bf2214c38 Jean*0210 #define ALLOW_CLIMSST_RELAXATION
                0211 #define ALLOW_CLIMSSS_RELAXATION
                0212 
497d85062c Jean*0213 C-  Allows to read-in (2-d) tidal geopotential forcing
                0214 #undef EXF_ALLOW_TIDES
                0215 
423768d890 Jean*0216 C-  Allows to read-in seaice fraction from files (areaMaskFile)
24da7525ba Jean*0217 #undef EXF_SEAICE_FRACTION
                0218 
423768d890 Jean*0219 C-  Use spatial interpolation to interpolate
3bf2214c38 Jean*0220 C   forcing files from input grid to model grid.
                0221 #undef USE_EXF_INTERPOLATION
95aadf3c69 Jean*0222 C   for interpolated vector fields, rotate towards model-grid axis
                0223 C   using old rotation formulae (instead of grid-angles)
                0224 #undef EXF_USE_OLD_VEC_ROTATION
ae5cd4f62c Jean*0225 C   for interpolation around N & S pole, use the old formulation
                0226 C   (no pole symmetry, single vector-comp interp, reset to 0 zonal-comp @ N.pole)
                0227 #undef EXF_USE_OLD_INTERP_POLE
3bf2214c38 Jean*0228 
                0229 #define EXF_INTERP_USE_DYNALLOC
36bba2348f Jean*0230 #if ( defined USE_EXF_INTERPOLATION && defined EXF_INTERP_USE_DYNALLOC && defined USING_THREADS )
3bf2214c38 Jean*0231 # define EXF_IREAD_USE_GLOBAL_POINTER
2e7833c3c9 Chri*0232 #endif
                0233 
cda1c18f72 Jean*0234 C-  Not recommended (not tested nor maintained) and un-documented Options:
                0235 #undef ALLOW_BULK_OFFLINE
                0236 #undef ALLOW_CLIMSTRESS_RELAXATION
                0237 
27195b0786 Jean*0238 #endif /* ndef ECCO_CPPOPTIONS_H */
6d54cf9ca1 Ed H*0239 #endif /* ALLOW_EXF */
                0240 #endif /* EXF_OPTIONS_H */