Back to home page

MITgcm

 
 

    


File indexing completed on 2021-03-11 06:13:04 UTC

view on githubraw file Latest commit 6b47d550 on 2021-03-10 15:38:00 UTC
6b47d550f4 Mart*0001 CBOP
                0002 C !ROUTINE: EXF_OPTIONS.h
                0003 C !INTERFACE:
                0004 C #include "EXF_OPTIONS.h"
                0005 
                0006 C !DESCRIPTION:
                0007 C *==================================================================*
                0008 C | CPP options file for EXternal Forcing (EXF) package:
                0009 C | Control which optional features to compile in this package code.
                0010 C *==================================================================*
                0011 CEOP
                0012 
                0013 #ifndef EXF_OPTIONS_H
                0014 #define EXF_OPTIONS_H
                0015 #include "PACKAGES_CONFIG.h"
                0016 #include "CPP_OPTIONS.h"
                0017 
                0018 #ifdef ALLOW_EXF
                0019 #ifdef ECCO_CPPOPTIONS_H
                0020 
                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
                0024 
                0025 #else /* ndef ECCO_CPPOPTIONS_H */
                0026 
                0027 C-- Package-specific Options & Macros go here
                0028 
                0029 C   --------------------
                0030 C   pkg/exf CPP options:
                0031 C   (see also table below on how to combine options)
                0032 
                0033 C   > ( EXF_VERBOSE ) < replaced with run-time integer parameter "exf_debugLev"
                0034 C
                0035 C   >>> ALLOW_ATM_WIND <<<
                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.
                0039 C
                0040 C   >>> ALLOW_ATM_TEMP <<<
                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
                0043 C       (EmP or EmPmR) are set according to hfluxfile & sfluxfile setting.
                0044 C      If defined, net heat flux and net fresh water flux are computed
                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
                0049 C       and specific humidity, net radiative fluxes, and precip.
                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).
                0052 C
                0053 C   >>> ALLOW_DOWNWARD_RADIATION <<<
                0054 C       If defined, downward long-wave and short-wave radiation
                0055 C       can be read-in form files to compute net lwflux and swflux.
                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
                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
                0068 C
                0069 C   >>> EXF_READ_EVAP <<<
                0070 C       If defined, evaporation field is read-in from file;
                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.
                0074 C
                0075 C   >>> ALLOW_READ_TURBFLUXES <<<
                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).
                0078 C
                0079 C   >>> ALLOW_RUNOFF <<<
                0080 C       If defined, river and glacier runoff can be read-in from files.
                0081 C
                0082 C   >>> ALLOW_SALTFLX <<<
                0083 C       If defined, upward salt flux can be read-in from files.
                0084 C
                0085 C   >>> ALLOW_RUNOFTEMP <<<
                0086 C       If defined, river and glacier runoff temperature
                0087 C       can be read-in from files.
                0088 C
                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
                0092 C            and cannot be changed here (in EXF_OPTIONS.h)
                0093 C
                0094 C   >>> EXF_ALLOW_TIDES <<<
                0095 C       If defined, 2-D tidal geopotential can be read-in from files
                0096 C
                0097 C   >>> EXF_SEAICE_FRACTION <<<
                0098 C       If defined, seaice fraction can be read-in from files (areaMaskFile)
                0099 C
                0100 C   >>> ALLOW_CLIMSST_RELAXATION <<<
                0101 C       Allow the relaxation to a monthly climatology of sea surface
                0102 C       temperature, e.g. the Reynolds climatology.
                0103 C
                0104 C   >>> ALLOW_CLIMSSS_RELAXATION <<<
                0105 C       Allow the relaxation to a monthly climatology of sea surface
                0106 C       salinity, e.g. the Levitus climatology.
                0107 C
                0108 C   >>> USE_EXF_INTERPOLATION <<<
                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
                0112 C
                0113 C   ====================================================================
                0114 C
                0115 C    The following CPP options:
                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.
                0127 C    The forcing fields in the rightmost column are defined in EXF_FIELDS.h
                0128 C    (ocean-model surface forcing field are defined in model/inc/FFIELDS.h)
                0129 C
                0130 C    (A) Surface momentum flux: [model: fu,fv ; exf: ustress,vstress]
                0131 C
                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   ---|-------|-------------------------------------------------------------
                0138 C
                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) ]
                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.
                0169 #define ALLOW_ATM_TEMP
                0170 #undef  ALLOW_ATM_WIND
                0171 #define ALLOW_DOWNWARD_RADIATION
                0172 #ifdef ALLOW_ATM_TEMP
                0173 C Note: To use ALLOW_BULKFORMULAE or EXF_READ_EVAP, needs #define ALLOW_ATM_TEMP
                0174 # define ALLOW_BULKFORMULAE
                0175 # undef  ALLOW_BULK_LARGEYEAGER04
                0176 # undef  EXF_READ_EVAP
                0177 # ifndef ALLOW_BULKFORMULAE
                0178 C  Note: To use ALLOW_READ_TURBFLUXES, ALLOW_ATM_TEMP needs to
                0179 C        be defined but ALLOW_BULKFORMULAE needs to be undef
                0180 #  define ALLOW_READ_TURBFLUXES
                0181 # endif
                0182 #endif /* ALLOW_ATM_TEMP */
                0183 
                0184 C-  Other forcing fields
                0185 #define ALLOW_RUNOFF
                0186 #undef  ALLOW_RUNOFTEMP
                0187 #undef  ALLOW_SALTFLX
                0188 
                0189 #if (defined (ALLOW_BULKFORMULAE) && defined (ATMOSPHERIC_LOADING))
                0190 C Note: To use EXF_CALC_ATMRHO, both ALLOW_BULKFORMULAE
                0191 C       and ATMOSPHERIC_LOADING need to be defined
                0192 # undef EXF_CALC_ATMRHO
                0193 #endif
                0194 
                0195 C-  Zenith Angle/Albedo related flags.
                0196 #ifdef ALLOW_DOWNWARD_RADIATION
                0197 # undef ALLOW_ZENITHANGLE
                0198 #endif
                0199 
                0200 C-  Use ocean_emissivity*lwdown in lwFlux. This flag should be defined
                0201 C   unless to reproduce old results (obtained with inconsistent old code)
                0202 #ifdef ALLOW_DOWNWARD_RADIATION
                0203 # define EXF_LWDOWN_WITH_EMISSIVITY
                0204 #endif
                0205 
                0206 C-  Relaxation to monthly climatologies.
                0207 #define ALLOW_CLIMSST_RELAXATION
                0208 #define ALLOW_CLIMSSS_RELAXATION
                0209 
                0210 C-  Allows to read-in (2-d) tidal geopotential forcing
                0211 #undef EXF_ALLOW_TIDES
                0212 
                0213 C-  Allows to read-in seaice fraction from files (areaMaskFile)
                0214 #undef EXF_SEAICE_FRACTION
                0215 
                0216 C-  Use spatial interpolation to interpolate
                0217 C   forcing files from input grid to model grid.
                0218 #undef USE_EXF_INTERPOLATION
                0219 C   for interpolated vector fields, rotate towards model-grid axis
                0220 C   using old rotation formulae (instead of grid-angles)
                0221 #undef EXF_USE_OLD_VEC_ROTATION
                0222 C   for interpolation around N & S pole, use the old formulation
                0223 C   (no pole symmetry, single vector-comp interp, reset to 0 zonal-comp @ N.pole)
                0224 #undef EXF_USE_OLD_INTERP_POLE
                0225 
                0226 #define EXF_INTERP_USE_DYNALLOC
                0227 #if ( defined USE_EXF_INTERPOLATION && defined EXF_INTERP_USE_DYNALLOC && defined USING_THREADS )
                0228 # define EXF_IREAD_USE_GLOBAL_POINTER
                0229 #endif
                0230 
                0231 #endif /* ndef ECCO_CPPOPTIONS_H */
                0232 #endif /* ALLOW_EXF */
                0233 #endif /* EXF_OPTIONS_H */