Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:41:01 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
28d97917ae Alis*0001 CBOP
                0002 C !ROUTINE: GAD_OPTIONS.h
                0003 
                0004 C !INTERFACE:
6e23417f74 Jean*0005 C #include "GAD_OPTIONS.h"
28d97917ae Alis*0006 
                0007 C !DESCRIPTION:
                0008 C Contains CPP macros/flags for controlling optional features of package.
                0009 CEOP
                0010 
31566b6684 Alis*0011 C CPP options file for GAD (Generic Advection Diffusion) package
                0012 C Use this file for selecting options within the GAD package
                0013 
6d54cf9ca1 Ed H*0014 #ifndef GAD_OPTIONS_H
                0015 #define GAD_OPTIONS_H
                0016 #include "PACKAGES_CONFIG.h"
                0017 #include "CPP_OPTIONS.h"
                0018 
d6c8672c92 Jean*0019 #ifdef ALLOW_GENERIC_ADVDIFF
                0020 C     Package-specific Options & Macros go here
                0021 
0be6057084 Mart*0022 C This flag selects the form of COSINE(lat) scaling of bi-harmonic term.
31566b6684 Alis*0023 C *only for use on a lat-lon grid*
0be6057084 Mart*0024 C Setting this flag here only affects the bi-harmonic tracer terms; to
                0025 C use COSINEMETH_III in the momentum equations set it CPP_OPTIONS.h
31566b6684 Alis*0026 #define COSINEMETH_III
                0027 
0be6057084 Mart*0028 C This selects isotropic scaling of harmonic and bi-harmonic term when
31566b6684 Alis*0029 C using the COSINE(lat) scaling.
0be6057084 Mart*0030 C Setting this flag here only affects the tracer diffusion terms; to
6e23417f74 Jean*0031 C use ISOTROPIC_COS_SCALING of the horizontal viscosity terms in the
0be6057084 Mart*0032 C momentum equations set it CPP_OPTIONS.h; the following line
                0033 C even overrides setting the flag in CPP_OPTIONS.h
                0034 #undef ISOTROPIC_COS_SCALING
31566b6684 Alis*0035 
e454e319af Alis*0036 C As of checkpoint41, the inclusion of multi-dimensional advection
                0037 C introduces excessive recomputation/storage for the adjoint.
c63877c23d Alis*0038 C We can disable it here using CPP because run-time flags are insufficient.
d7ce0d34f8 Jean*0039 #undef DISABLE_MULTIDIM_ADVECTION
                0040 
d077f4a702 Jean*0041 C Use compressible flow method for multi-dim advection instead of old, less
                0042 C accurate jmc method. Note: option has no effect on SOM advection which
                0043 C always use compressible flow method.
                0044 #undef GAD_MULTIDIM_COMPRESSIBLE
                0045 
6e23417f74 Jean*0046 C This enable the use of 2nd-Order Moment advection scheme (Prather, 1986) for
                0047 C Temperature and Salinity ; due to large memory space (10 times more / tracer)
                0048 C requirement, by default, this part of the code is not compiled.
                0049 #undef GAD_ALLOW_TS_SOM_ADV
e454e319af Alis*0050 
f3f802a2e3 Oliv*0051 C Hack to get rid of negatives caused by Redi.  Works by restricting the
6e23417f74 Jean*0052 C outgoing flux (only contributions computed in gad_calc_rhs) for each cell
f3f802a2e3 Oliv*0053 C to be no more than the amount of tracer in the cell (see Smolarkiewicz
                0054 C MWR 1989 and Bott MWR 1989).
                0055 C The flux contributions computed in gad_calc_rhs which are affected by
                0056 C this hack are:
                0057 C - explicit diffusion, Redi and the non-local part of KPP
                0058 C - advection is affected only if multiDimAdvection=.FALSE.
                0059 C - vertical diffusion (including the diagonal contribution from GMRedi)
                0060 C   only if implicitDiffusion=.FALSE.
                0061 C - GM is affected only if GMREDI_AdvForm=.FALSE.
                0062 C
                0063 C The parameter SmolarkiewiczMaxFrac (defined in gad_init_fixed.F)
                0064 C specifies the maximal fraction of tracer that can leave a cell.
                0065 C By default it is 1.  This will prevent the tracer from going negative
                0066 C due to contributions from gad_calc_rhs alone.  In the presence of other
                0067 C contributions (or roundoff errors), it may be necessary to reduce this
                0068 C value to achieve strict positivity.
                0069 C
6e23417f74 Jean*0070 C This hack applies to all tracers except temperature and salinity!
c3cd6c250f Jean*0071 C Do not use with Adams-Bashforth (for ptracers)!
                0072 C Do not use with OBCS!
998cbd211e Oliv*0073 #undef  GAD_SMOLARKIEWICZ_HACK
                0074 
e454e319af Alis*0075 #else
                0076 
                0077 C If GAD is disabled then so is multi-dimensional advection
                0078 #define DISABLE_MULTIDIM_ADVECTION
31566b6684 Alis*0079 
d7ce0d34f8 Jean*0080 #endif /* ALLOW_GENERIC_ADVDIFF */
6d54cf9ca1 Ed H*0081 #endif /* GAD_OPTIONS_H */