--- MITgcm/model/inc/CPP_OPTIONS.h 2003/05/01 06:10:19 1.19.4.4 +++ MITgcm/model/inc/CPP_OPTIONS.h 2017/11/02 17:43:26 1.55 @@ -1,167 +1,177 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/model/inc/CPP_OPTIONS.h,v 1.19.4.4 2003/05/01 06:10:19 dimitri Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/model/inc/CPP_OPTIONS.h,v 1.55 2017/11/02 17:43:26 jmc Exp $ C $Name: $ - These lines are here to deliberately cause a compile-time error. - If you see these lines in your .F files or the compiler shows them - as an error then it means you have not placed your configuration - files in the appropriate place. - You need to place you own copy of CPP_OPTIONS.h in the include - path for the model. - -C +#ifndef CPP_OPTIONS_H +#define CPP_OPTIONS_H CBOP C !ROUTINE: CPP_OPTIONS.h -C !INTERFACE: -C include "CPP_OPTIONS.h" +C !INTERFACE: +C #include "CPP_OPTIONS.h" + C !DESCRIPTION: -C CPP flags controlling which code in included in the files that -C will be compiled. +C *==================================================================* +C | main CPP options file for the model: +C | Control which optional features to compile in model/src code. +C *==================================================================* CEOP -C o Include/exclude code for direct surface pressure solver -#undef ALLOW_DIRECT_SOLVER +C CPP flags controlling particular source code features + +C-- Forcing code options: -C o Include/exclude code for AIM package -#undef ALLOW_AIM +C o Shortwave heating as extra term in external_forcing.F +C Note: this should be a run-time option +#undef SHORTWAVE_HEATING -C o Include/exclude code for GM/Redi parameterization -#undef ALLOW_GMREDI +C o Include/exclude Geothermal Heat Flux at the bottom of the ocean +#undef ALLOW_GEOTHERMAL_FLUX -C o Include/exclude code for KPP mixing scheme -#define ALLOW_KPP +C o Allow to account for heating due to friction (and momentum dissipation) +#undef ALLOW_FRICTION_HEATING -C o Shortwave heating as extra term in external_forcing.F -#ifdef ALLOW_KPP -#define SHORTWAVE_HEATING -#endif - -C o Include/exclude code for Shapiro filters -#define ALLOW_SHAP_FILT - -C o Include/exclude code for C-D grid method of integrating the -C coriolis terms -#define INCLUDE_CD_CODE - -C o Include/exclude code for open-boundary conditions -#undef ALLOW_OBCS - -C o Include/exclude diagnostics package interface code -#define ALLOW_TIMEAVE - -C o Include/exclude zonal FFT filter code -#undef ALLOW_ZONAL_FILT - -C o Include/exclude temperature advection code -#define INCLUDE_T_ADVECTION_CODE -#ifdef INCLUDE_T_ADVECTION_CODE -#define _ADT(a)a -#endif -#ifndef INCLUDE_T_ADVECTION_CODE -#define _ADT(a) -#endif - -C o Include/exclude temperature diffusion code -#define INCLUDE_T_DIFFUSION_CODE -#ifdef INCLUDE_T_DIFFUSION_CODE -#define _LPT(a)a -#define _BHT(a)a -#endif -#ifndef INCLUDE_T_DIFFUSION_CODE -#define _LPT(a) -#define _BHT(a) -#endif - -C o Include/exclude temperature forcing code -#define INCLUDE_T_FORCING_CODE - -C o Include/exclude momentum advection code -#define INCLUDE_MOMENTUM_ADVECTION_CODE -#ifdef INCLUDE_MOMENTUM_ADVECTION_CODE -#define _ADM(a)a -#endif -#ifndef INCLUDE_MOMENTUM_ADVECTION_CODE -#define _ADM(a) -#endif - -C o Include/exclude laplacian viscosity code -#define INCLUDE_LP_MOMENTUM_DIFFUSION_CODE -#ifdef INCLUDE_LP_MOMENTUM_DIFFUSION_CODE -#define _LPM(a)a -#endif -#ifndef INCLUDE_LP_MOMENTUM_DIFFUSION_CODE -#define _LPM(a) -#endif - -C o Include/exclude biharmonic viscosity code -#define INCLUDE_BH_MOMENTUM_DIFFUSION_CODE -#ifdef INCLUDE_BH_MOMENTUM_DIFFUSION_CODE -#define _BHM(a)a -#endif -#ifndef INCLUDE_BH_MOMENTUM_DIFFUSION_CODE -#define _BHM(a) -#endif - -C o Include/exclude gradient of phy_hyd code -#define INCLUDE_GRADPH_CODE -#ifdef INCLUDE_GRADPH_CODE -#define _PHM(a)a -#endif -#ifndef INCLUDE_GRADPH_CODE -#define _PHM(a) -#endif +C o Allow mass source or sink of Fluid in the interior +C (3-D generalisation of oceanic real-fresh water flux) +#undef ALLOW_ADDFLUID + +C o Include pressure loading code +#define ATMOSPHERIC_LOADING -C o Include/exclude momentum forcing code -#define INCLUDE_MOMENTUM_FORCING_CODE +C o Include/exclude balancing surface forcing fluxes code +#undef ALLOW_BALANCE_FLUXES -C o Include/exclude momentum eqn metric terms code -#define INCLUDE_MOMENTUM_METRIC_TERM_CODE +C o Include/exclude balancing surface forcing relaxation code +#undef ALLOW_BALANCE_RELAX + +C o Include/exclude checking for negative salinity +#undef CHECK_SALINITY_FOR_NEGATIVE_VALUES + +C-- Options to discard parts of the main code: + +C o Exclude/allow external forcing-fields load +C this allows to read & do simple linear time interpolation of oceanic +C forcing fields, if no specific pkg (e.g., EXF) is used to compute them. +#undef EXCLUDE_FFIELDS_LOAD C o Include/exclude phi_hyd calculation code #define INCLUDE_PHIHYD_CALCULATION_CODE +C-- Vertical mixing code options: + C o Include/exclude call to S/R CONVECT #define INCLUDE_CONVECT_CALL C o Include/exclude call to S/R CALC_DIFFUSIVITY #define INCLUDE_CALC_DIFFUSIVITY_CALL -C o Allow nonHydrostatic code -#undef ALLOW_NONHYDROSTATIC +C o Allow full 3D specification of vertical diffusivity +#undef ALLOW_3D_DIFFKR + +C o Allow latitudinally varying BryanLewis79 vertical diffusivity +#undef ALLOW_BL79_LAT_VARY + +C o Exclude/allow partial-cell effect (physical or enhanced) in vertical mixing +C this allows to account for partial-cell in vertical viscosity and diffusion, +C either from grid-spacing reduction effect or as artificially enhanced mixing +C near surface & bottom for too thin grid-cell +#undef EXCLUDE_PCELL_MIX_CODE -C o Use "natural" boundary conditions for salinity -C instead of the "virtual salt flux" -#undef USE_NATURAL_BCS - -C o Use "Exact Convervation" of fluid in Free-Surface formulation -C so that d/dt(eta) is exactly equal to - Div.Transport -#undef EXACT_CONSERV +C-- Time-stepping code options: + +C o Include/exclude combined Surf.Pressure and Drag Implicit solver code +#undef ALLOW_SOLVE4_PS_AND_DRAG + +C o Include/exclude Implicit vertical advection code +#define INCLUDE_IMPLVERTADV_CODE + +C o Include/exclude AdamsBashforth-3rd-Order code +#undef ALLOW_ADAMSBASHFORTH_3 + +C-- Model formulation options: + +C o Allow/exclude "Exact Convervation" of fluid in Free-Surface formulation +C that ensures that d/dt(eta) is exactly equal to - Div.Transport +#define EXACT_CONSERV C o Allow the use of Non-Linear Free-Surface formulation -C this implies that surface thickness (hFactors) vary with time +C this implies that grid-cell thickness (hFactors) varies with time #undef NONLIN_FRSURF +C o Include/exclude nonHydrostatic code +#undef ALLOW_NONHYDROSTATIC + +C o Include/exclude GM-like eddy stress in momentum code +#undef ALLOW_EDDYPSI + +C-- Algorithm options: + +C o Use Non Self-Adjoint (NSA) conjugate-gradient solver +#undef ALLOW_CG2D_NSA + +C o Include/exclude code for single reduction Conjugate-Gradient solver +#define ALLOW_SRCG + +C o Choices for implicit solver routines solve_*diagonal.F +C The following has low memory footprint, but not suitable for AD +#undef SOLVE_DIAGONAL_LOWMEMORY +C The following one suitable for AD but does not vectorize +#undef SOLVE_DIAGONAL_KINNER + +C-- Retired code options: + +C o ALLOW isotropic scaling of harmonic and bi-harmonic terms when +C using an locally isotropic spherical grid with (dlambda) x (dphi*cos(phi)) +C *only for use on a lat-lon grid* +C Setting this flag here affects both momentum and tracer equation unless +C it is set/unset again in other header fields (e.g., GAD_OPTIONS.h). +C The definition of the flag is commented to avoid interference with +C such other header files. +C The preferred method is specifying a value for viscAhGrid or viscA4Grid +C in data which is then automatically scaled by the grid size; +C the old method of specifying viscAh/viscA4 and this flag is provided +C for completeness only (and for use with the adjoint). +C#define ISOTROPIC_COS_SCALING + +C o This flag selects the form of COSINE(lat) scaling of bi-harmonic term. +C *only for use on a lat-lon grid* +C Has no effect if ISOTROPIC_COS_SCALING is undefined. +C Has no effect on vector invariant momentum equations. +C Setting this flag here affects both momentum and tracer equation unless +C it is set/unset again in other header fields (e.g., GAD_OPTIONS.h). +C The definition of the flag is commented to avoid interference with +C such other header files. +C#define COSINEMETH_III + C o Use "OLD" UV discretisation near boundaries (*not* recommended) -C Note - only works with #undef NO_SLIP_LATERAL in calc_mom_rhs.F +C Note - only works with pkg/mom_fluxform and "no_slip_sides=.FALSE." C because the old code did not have no-slip BCs -#undef OLD_ADV_BCS +#undef OLD_ADV_BCS -C o Use "OLD" UV geometry on sphere (definately *NOT* recommended) -C Note - only works with #undef NO_SLIP_LATERAL in calc_mom_rhs.F -C because the old code did not have no-slip BCs -#undef OLD_UV_GEOMETRY +C o Use LONG.bin, LATG.bin, etc., initialization for ini_curviliear_grid.F +C Default is to use "new" grid files (OLD_GRID_IO undef) but OLD_GRID_IO +C is still useful with, e.g., single-domain curvilinear configurations. +#undef OLD_GRID_IO + +C o Use thsice+seaice (old) call sequence: ice-Dyn,ice-Advect,ice-Thermo(thsice) +C as opposed to new sequence: ice-Thermo(thsice),ice-Dyn,ice-Advect +#undef OLD_THSICE_CALL_SEQUENCE -C o Include/exclude IERS Special Bureau for the Oceans diagnostics -#undef ALLOW_SBO +C o Use old EXTERNAL_FORCING_U,V,T,S subroutines (for backward compatibility) +#undef USE_OLD_EXTERNAL_FORCING -C o Include/exclude code for sea-ice model -#undef ALLOW_SEAICE +C-- Other option files: C o Execution environment support options #include "CPP_EEOPTIONS.h" -C o Include/exclude code specific to the ECCO/SEALION version. -#undef INCLUDE_ECCO_PACKAGE -#ifdef INCLUDE_ECCO_PACKAGE -#include "ECCO_CPPOPTIONS.h" -#endif +C o Include/exclude single header file containing multiple packages options +C (AUTODIFF, COST, CTRL, ECCO, EXF ...) instead of the standard way where +C each of the above pkg get its own options from its specific option file. +C Although this method, inherited from ECCO setup, has been traditionally +C used for all adjoint built, work is in progress to allow to use the +C standard method also for adjoint built. +c#ifdef PACKAGES_CONFIG_H +c# include "ECCO_CPPOPTIONS.h" +c#endif + +#endif /* CPP_OPTIONS_H */