Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:45:57 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
b445ffdf3f Patr*0001 CBOP
                0002 C !ROUTINE: GAD_OPTIONS.h
                0003 
                0004 C !INTERFACE:
                0005 C #include "GAD_OPTIONS.h"
                0006 
                0007 C !DESCRIPTION:
                0008 C Contains CPP macros/flags for controlling optional features of package.
                0009 CEOP
                0010 
                0011 C CPP options file for GAD (Generic Advection Diffusion) package
                0012 C Use this file for selecting options within the GAD package
                0013 
                0014 #ifndef GAD_OPTIONS_H
                0015 #define GAD_OPTIONS_H
                0016 #include "PACKAGES_CONFIG.h"
                0017 #include "CPP_OPTIONS.h"
                0018 
                0019 #ifdef ALLOW_GENERIC_ADVDIFF
                0020 C     Package-specific Options & Macros go here
                0021 
                0022 C This flag selects the form of COSINE(lat) scaling of bi-harmonic term.
                0023 C *only for use on a lat-lon grid*
                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
                0026 #define COSINEMETH_III
                0027 
                0028 C This selects isotropic scaling of harmonic and bi-harmonic term when
                0029 C using the COSINE(lat) scaling.
                0030 C Setting this flag here only affects the tracer diffusion terms; to
                0031 C use ISOTROPIC_COS_SCALING of the horizontal viscosity terms in the
                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
                0035 
                0036 C As of checkpoint41, the inclusion of multi-dimensional advection
                0037 C introduces excessive recomputation/storage for the adjoint.
                0038 C We can disable it here using CPP because run-time flags are insufficient.
                0039 #undef DISABLE_MULTIDIM_ADVECTION
                0040 
55932e9597 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 
b445ffdf3f Patr*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 #define GAD_ALLOW_TS_SOM_ADV
                0050 
                0051 C Hack to get rid of negatives caused by Redi.  Works by restricting the
                0052 C outgoing flux (only contributions computed in gad_calc_rhs) for each cell
                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
                0070 C This hack applies to all tracers except temperature and salinity!
                0071 C Do not use with Adams-Bashforth (for ptracers)!
                0072 C Do not use with OBCS!
                0073 #undef  GAD_SMOLARKIEWICZ_HACK
                0074 
                0075 #else
                0076 
                0077 C If GAD is disabled then so is multi-dimensional advection
                0078 #define DISABLE_MULTIDIM_ADVECTION
                0079 
                0080 #endif /* ALLOW_GENERIC_ADVDIFF */
                0081 #endif /* GAD_OPTIONS_H */