| 1 | 
dimitri | 
1.6 | 
C $Header: /u/gcmpack/MITgcm_contrib/high_res_cube/code-mods/EXF_OPTIONS.h,v 1.5 2010/07/28 22:48:02 dimitri Exp $ | 
| 2 | 
dimitri | 
1.1 | 
C $Name:  $ | 
| 3 | 
  | 
  | 
 | 
| 4 | 
  | 
  | 
#ifndef EXF_OPTIONS_H | 
| 5 | 
  | 
  | 
#define EXF_OPTIONS_H | 
| 6 | 
  | 
  | 
#include "PACKAGES_CONFIG.h" | 
| 7 | 
dimitri | 
1.5 | 
#include "AD_CONFIG.h" | 
| 8 | 
dimitri | 
1.6 | 
#include "CPP_OPTIONS.h" | 
| 9 | 
dimitri | 
1.5 | 
 | 
| 10 | 
dimitri | 
1.1 | 
#ifdef ALLOW_EXF | 
| 11 | 
dimitri | 
1.6 | 
C     Package-specific Options & Macros go here | 
| 12 | 
dimitri | 
1.1 | 
 | 
| 13 | 
  | 
  | 
#ifdef ALLOW_AUTODIFF_TAMC | 
| 14 | 
  | 
  | 
 | 
| 15 | 
  | 
  | 
C When compile for AD mode, | 
| 16 | 
  | 
  | 
C this package is currently configured by ECCO_CPPOPTIONS.h | 
| 17 | 
  | 
  | 
C which is directly included in CPP_OPTIONS.h | 
| 18 | 
  | 
  | 
 | 
| 19 | 
  | 
  | 
#else /* ndef ALLOW_AUTODIFF_TAMC */ | 
| 20 | 
  | 
  | 
 | 
| 21 | 
  | 
  | 
C CPP flags controlling which code is included in the files that | 
| 22 | 
  | 
  | 
C will be compiled. | 
| 23 | 
  | 
  | 
 | 
| 24 | 
  | 
  | 
c   pkg/exf CPP options: | 
| 25 | 
  | 
  | 
c   -------------------- | 
| 26 | 
  | 
  | 
c | 
| 27 | 
dimitri | 
1.6 | 
c   > ( EXF_VERBOSE ) < replaced with run-time, logical parameter "exf_verbose". | 
| 28 | 
dimitri | 
1.1 | 
c | 
| 29 | 
  | 
  | 
c   >>> ALLOW_ATM_WIND <<< | 
| 30 | 
  | 
  | 
c       If defined, 10-m wind fields can be read-in from files. | 
| 31 | 
dimitri | 
1.5 | 
c | 
| 32 | 
dimitri | 
1.1 | 
c   >>> ALLOW_ATM_TEMP <<< | 
| 33 | 
  | 
  | 
c       If defined, atmospheric temperature and specific | 
| 34 | 
  | 
  | 
c       humidity fields can be read-in from files. | 
| 35 | 
dimitri | 
1.5 | 
c | 
| 36 | 
dimitri | 
1.1 | 
c   >>> ALLOW_DOWNWARD_RADIATION <<< | 
| 37 | 
  | 
  | 
c       If defined, downward long-wave and short-wave radiation | 
| 38 | 
  | 
  | 
c       can be read-in form files or computed from lwflux and swflux. | 
| 39 | 
  | 
  | 
c | 
| 40 | 
dimitri | 
1.5 | 
c   >>> ALLOW_ZENITHANGLE <<< | 
| 41 | 
  | 
  | 
c       If defined, ocean albedo varies with the zenith angle, and | 
| 42 | 
  | 
  | 
c       incoming fluxes at the top of the atmosphere are computed | 
| 43 | 
  | 
  | 
c | 
| 44 | 
dimitri | 
1.1 | 
c   >>> ALLOW_BULKFORMULAE <<< | 
| 45 | 
  | 
  | 
c       Allows the use of bulk formulae in order to estimate | 
| 46 | 
dimitri | 
1.5 | 
c       turbulent and radiative fluxes at the ocean surface. | 
| 47 | 
dimitri | 
1.1 | 
c | 
| 48 | 
  | 
  | 
c   >>> EXF_READ_EVAP <<< | 
| 49 | 
  | 
  | 
c       If defined, evaporation fields are read-in, rather than | 
| 50 | 
  | 
  | 
c       computed from atmospheric state. | 
| 51 | 
dimitri | 
1.5 | 
c | 
| 52 | 
dimitri | 
1.1 | 
c   >>> ALLOW_RUNOFF <<< | 
| 53 | 
  | 
  | 
c       If defined, river and glacier runoff can be read-in from files. | 
| 54 | 
  | 
  | 
c | 
| 55 | 
  | 
  | 
c   >>> ATMOSPHERIC_LOADING <<< | 
| 56 | 
  | 
  | 
c       If defined, atmospheric pressure can be read-in from files. | 
| 57 | 
dimitri | 
1.5 | 
c   WARNING: this flag is set (define/undef) in CPP_OPTIONS.h | 
| 58 | 
dimitri | 
1.1 | 
c            and cannot be changed here (in EXF_OPTIONS) | 
| 59 | 
  | 
  | 
c | 
| 60 | 
dimitri | 
1.5 | 
c   >>> ICE_AREAMASK <<< | 
| 61 | 
  | 
  | 
c       If defined, fractional ice-covered area MASK can be read-in from files. | 
| 62 | 
  | 
  | 
c | 
| 63 | 
dimitri | 
1.1 | 
c   >>> ALLOW_CLIMSST_RELAXATION <<< | 
| 64 | 
  | 
  | 
c       Allow the relaxation to a monthly climatology of sea surface | 
| 65 | 
  | 
  | 
c       temperature, e.g. the Reynolds climatology. | 
| 66 | 
  | 
  | 
c | 
| 67 | 
  | 
  | 
c   >>> ALLOW_CLIMSSS_RELAXATION <<< | 
| 68 | 
  | 
  | 
c       Allow the relaxation to a monthly climatology of sea surface | 
| 69 | 
  | 
  | 
c       salinity, e.g. the Levitus climatology. | 
| 70 | 
  | 
  | 
c | 
| 71 | 
  | 
  | 
c   >>> USE_EXF_INTERPOLATION <<< | 
| 72 | 
  | 
  | 
c       Allows specification of arbitrary Cartesian input grids. | 
| 73 | 
  | 
  | 
c | 
| 74 | 
  | 
  | 
c   ==================================================================== | 
| 75 | 
  | 
  | 
c | 
| 76 | 
  | 
  | 
c       The following CPP options: | 
| 77 | 
  | 
  | 
c | 
| 78 | 
  | 
  | 
c          ALLOW_ATM_WIND              (WIND) | 
| 79 | 
  | 
  | 
c          ALLOW_ATM_TEMP              (TEMP) | 
| 80 | 
  | 
  | 
c          ALLOW_DOWNWARD_RADIATION    (DOWN) | 
| 81 | 
  | 
  | 
c          ALLOW_BULKFORMULAE          (BULK) | 
| 82 | 
  | 
  | 
c          EXF_READ_EVAP               (EVAP) | 
| 83 | 
  | 
  | 
c | 
| 84 | 
  | 
  | 
c       permit the ocean-model forcing configurations listed in the | 
| 85 | 
  | 
  | 
c       table below.  The first configuration is the default, | 
| 86 | 
  | 
  | 
c       flux-forced, ocean model.  The next four are stand-alone | 
| 87 | 
  | 
  | 
c       configurations that use pkg/exf, open-water bulk formulae to | 
| 88 | 
  | 
  | 
c       compute the missing surface fluxes from atmospheric variables. | 
| 89 | 
  | 
  | 
c       The last four configurations can be used in conjunction with | 
| 90 | 
  | 
  | 
c       pkg/seaice to model ice-covered regions.  The forcing fields | 
| 91 | 
  | 
  | 
c       in the rightmost column are defined in exf_fields. | 
| 92 | 
  | 
  | 
c | 
| 93 | 
  | 
  | 
c | 
| 94 | 
  | 
  | 
c    WIND |TEMP |DOWN |BULK |EVAP |            actions | 
| 95 | 
  | 
  | 
c    -----|-----|-----|-----|-----|------------------------------------- | 
| 96 | 
  | 
  | 
c         |     |     |     |     | | 
| 97 | 
  | 
  | 
c      -  |  -  |  -  |  -  |  -  | Read-in ustress, vstress, hflux, | 
| 98 | 
  | 
  | 
c         |     |     |     |     | swflux, and sflux. | 
| 99 | 
  | 
  | 
c         |     |     |     |     | | 
| 100 | 
  | 
  | 
c     def | def | def | def |  -  | Read-in uwind, vwind, atemp, aqh, | 
| 101 | 
  | 
  | 
c         |     |     |     |     | swdown, lwdown, precip, and runoff. | 
| 102 | 
  | 
  | 
c         |     |     |     |     | Compute ustress, vstress, hflux, | 
| 103 | 
  | 
  | 
c         |     |     |     |     | swflux, and sflux. | 
| 104 | 
  | 
  | 
c         |     |     |     |     | | 
| 105 | 
  | 
  | 
c     def | def |  -  | def |  -  | Read-in uwind, vwind, atemp, aqh, | 
| 106 | 
  | 
  | 
c         |     |     |     |     | swflux, lwflux, precip, and runoff. | 
| 107 | 
  | 
  | 
c         |     |     |     |     | Compute ustress, vstress, hflux, | 
| 108 | 
  | 
  | 
c         |     |     |     |     | and sflux. | 
| 109 | 
  | 
  | 
c         |     |     |     |     | | 
| 110 | 
  | 
  | 
c     def |  -  |  -  | def |  -  | Read-in uwind, vwind, hflux, | 
| 111 | 
  | 
  | 
c         |     |     |     |     | swflux, and sflux. | 
| 112 | 
  | 
  | 
c         |     |     |     |     | Compute ustress and vstress. | 
| 113 | 
  | 
  | 
c         |     |     |     |     | | 
| 114 | 
  | 
  | 
c      -  | def |  -  | def |  -  | Read-in ustress, vstress, atemp, | 
| 115 | 
  | 
  | 
c         |     |     |     |     | aqh, swflux, lwflux, precip, and | 
| 116 | 
  | 
  | 
c         |     |     |     |     | runoff.  Compute hflux and sflux. | 
| 117 | 
  | 
  | 
c         |     |     |     |     | | 
| 118 | 
  | 
  | 
c     def | def |  -  |  -  | def | Read-in uwind, vwind, atemp, aqh, | 
| 119 | 
  | 
  | 
c         |     |     |     |     | swflux, lwflux, precip, runoff, | 
| 120 | 
  | 
  | 
c         |     |     |     |     | and evap. | 
| 121 | 
  | 
  | 
c         |     |     |     |     | | 
| 122 | 
  | 
  | 
c     def | def |  -  | def |  -  | Read-in uwind, vwind, atemp, aqh, | 
| 123 | 
  | 
  | 
c         |     |     |     |     | swflux, lwflux, precip, and runoff. | 
| 124 | 
  | 
  | 
c         |     |     |     |     | Compute open-water ustress, vstress, | 
| 125 | 
  | 
  | 
c         |     |     |     |     | hflux, swflux, and evap. | 
| 126 | 
  | 
  | 
c         |     |     |     |     | | 
| 127 | 
  | 
  | 
c     def | def | def |  -  | def | Read-in uwind, vwind, atemp, aqh, | 
| 128 | 
  | 
  | 
c         |     |     |     |     | swdown, lwdown, precip, runoff, | 
| 129 | 
  | 
  | 
c         |     |     |     |     | and evap. | 
| 130 | 
  | 
  | 
c         |     |     |     |     | | 
| 131 | 
  | 
  | 
c     def | def | def | def |  -  | Read-in uwind, vwind, atemp, aqh, | 
| 132 | 
  | 
  | 
c         |     |     |     |     | swdown, lwdown, precip, and runoff. | 
| 133 | 
  | 
  | 
c         |     |     |     |     | Compute open-water ustress, vstress, | 
| 134 | 
  | 
  | 
c         |     |     |     |     | hflux, swflux, and evap. | 
| 135 | 
  | 
  | 
c | 
| 136 | 
  | 
  | 
c   ==================================================================== | 
| 137 | 
  | 
  | 
 | 
| 138 | 
  | 
  | 
C   Bulk formulae related flags. | 
| 139 | 
  | 
  | 
#define  ALLOW_ATM_TEMP | 
| 140 | 
  | 
  | 
#define  ALLOW_ATM_WIND | 
| 141 | 
  | 
  | 
#define  ALLOW_DOWNWARD_RADIATION | 
| 142 | 
  | 
  | 
#define  ALLOW_RUNOFF | 
| 143 | 
dimitri | 
1.6 | 
#if (defined (ALLOW_ATM_TEMP) || defined (ALLOW_ATM_WIND)) | 
| 144 | 
dimitri | 
1.1 | 
# define ALLOW_BULKFORMULAE | 
| 145 | 
  | 
  | 
# undef ALLOW_BULK_LARGEYEAGER04 | 
| 146 | 
  | 
  | 
#endif | 
| 147 | 
  | 
  | 
 | 
| 148 | 
dimitri | 
1.5 | 
C   Zenith Angle/Albedo related flags. | 
| 149 | 
  | 
  | 
#ifdef ALLOW_DOWNWARD_RADIATION | 
| 150 | 
  | 
  | 
# undef ALLOW_ZENITHANGLE | 
| 151 | 
  | 
  | 
#endif | 
| 152 | 
  | 
  | 
 | 
| 153 | 
dimitri | 
1.6 | 
C   Use ocean_emissivity*lwdwon in lwFlux. This flag should be define | 
| 154 | 
  | 
  | 
C   unless to reproduce old results (obtained with inconsistent old code) | 
| 155 | 
  | 
  | 
#ifdef ALLOW_DOWNWARD_RADIATION | 
| 156 | 
  | 
  | 
# define EXF_LWDOWN_WITH_EMISSIVITY | 
| 157 | 
  | 
  | 
#endif | 
| 158 | 
  | 
  | 
 | 
| 159 | 
dimitri | 
1.1 | 
C   Relaxation to monthly climatologies. | 
| 160 | 
dimitri | 
1.4 | 
#define ALLOW_CLIMSST_RELAXATION | 
| 161 | 
  | 
  | 
#define ALLOW_CLIMSSS_RELAXATION | 
| 162 | 
dimitri | 
1.1 | 
 | 
| 163 | 
  | 
  | 
C   Use spatial interpolation to interpolate | 
| 164 | 
  | 
  | 
C   forcing files from input grid to model grid. | 
| 165 | 
  | 
  | 
#define USE_EXF_INTERPOLATION | 
| 166 | 
dimitri | 
1.6 | 
C   for interpolated vector fields, rotate towards model-grid axis | 
| 167 | 
  | 
  | 
C   using old rotation formulae (instead of grid-angles) | 
| 168 | 
  | 
  | 
#undef EXF_USE_OLD_VEC_ROTATION | 
| 169 | 
  | 
  | 
C   for interpolation around N & S pole, use the old formulation | 
| 170 | 
  | 
  | 
C   (no pole symmetry, single vector-comp interp, reset to 0 zonal-comp @ N.pole) | 
| 171 | 
  | 
  | 
#undef EXF_USE_OLD_INTERP_POLE | 
| 172 | 
dimitri | 
1.1 | 
 | 
| 173 | 
  | 
  | 
#define EXF_INTERP_USE_DYNALLOC | 
| 174 | 
dimitri | 
1.6 | 
#if ( defined (EXF_INTERP_USE_DYNALLOC) && defined (USING_THREADS) ) | 
| 175 | 
dimitri | 
1.1 | 
# define EXF_IREAD_USE_GLOBAL_POINTER | 
| 176 | 
  | 
  | 
#endif | 
| 177 | 
  | 
  | 
 | 
| 178 | 
  | 
  | 
#endif /* ndef ALLOW_AUTODIFF_TAMC */ | 
| 179 | 
  | 
  | 
#endif /* ALLOW_EXF */ | 
| 180 | 
  | 
  | 
#endif /* EXF_OPTIONS_H */ |