/[MITgcm]/MITgcm/pkg/generic_advdiff/GAD_OPTIONS.h
ViewVC logotype

Annotation of /MITgcm/pkg/generic_advdiff/GAD_OPTIONS.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.11 - (hide annotations) (download)
Wed Apr 23 18:32:20 2008 UTC (16 years, 1 month ago) by jahn
Branch: MAIN
Changes since 1.10: +4 -2 lines
File MIME type: text/plain
fix faulty Smolarkiewicz (positive Redi) hack

1 jahn 1.11 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/GAD_OPTIONS.h,v 1.10 2008/04/18 19:39:48 jahn Exp $
2 adcroft 1.2 C $Name: $
3    
4     CBOP
5     C !ROUTINE: GAD_OPTIONS.h
6    
7     C !INTERFACE:
8     C #include "GAD_OPTIONS.h"
9    
10     C !DESCRIPTION:
11     C Contains CPP macros/flags for controlling optional features of package.
12     CEOP
13 adcroft 1.1
14     C CPP options file for GAD (Generic Advection Diffusion) package
15     C
16     C Use this file for selecting options within the GAD package
17 edhill 1.5
18     #ifndef GAD_OPTIONS_H
19     #define GAD_OPTIONS_H
20     #include "PACKAGES_CONFIG.h"
21 jmc 1.7 #ifdef ALLOW_GENERIC_ADVDIFF
22 adcroft 1.1
23     #include "CPP_OPTIONS.h"
24    
25 mlosch 1.6 C This flag selects the form of COSINE(lat) scaling of bi-harmonic term.
26 adcroft 1.1 C *only for use on a lat-lon grid*
27 mlosch 1.6 C Setting this flag here only affects the bi-harmonic tracer terms; to
28     C use COSINEMETH_III in the momentum equations set it CPP_OPTIONS.h
29 adcroft 1.1 #define COSINEMETH_III
30    
31 mlosch 1.6 C This selects isotropic scaling of harmonic and bi-harmonic term when
32 adcroft 1.1 C using the COSINE(lat) scaling.
33 mlosch 1.6 C Setting this flag here only affects the tracer diffusion terms; to
34     C use ISOTROPIC_COS_SCALING of the horizontal viscosity terms in the
35     C momentum equations set it CPP_OPTIONS.h; the following line
36     C even overrides setting the flag in CPP_OPTIONS.h
37     #undef ISOTROPIC_COS_SCALING
38 adcroft 1.1
39 adcroft 1.3 C As of checkpoint41, the inclusion of multi-dimensional advection
40     C introduces excessive recomputation/storage for the adjoint.
41 adcroft 1.4 C We can disable it here using CPP because run-time flags are insufficient.
42 jmc 1.7 #undef DISABLE_MULTIDIM_ADVECTION
43    
44     C This enable the use of 2nd-Order Moment advection scheme (Prather, 1986)
45     C due to large memory space (10 times more / tracer) requirement,
46     C by default, this part of the code is not compiled.
47 jmc 1.9 #undef GAD_ALLOW_SOM_ADVECT
48 adcroft 1.3
49 jahn 1.10 C Hack to make Redi positive by restricting the outgoing flux for each cell
50     C to be no more than the amount of tracer in the cell (see Smolarkiewicz
51     C MWR 1989 and Bott MWR 1989). This affects all contributions to the
52     C tracer equation calculated in gad_calc_rhs, i.e., diffusion, GMRedi and
53     C the non-local part of KPP, but advection only if
54     C multiDimAdvection=.FALSE. and vertical diffusion (including the
55     C diagonal contribution from GMRedi) only if implicitDiffusion=.FALSE.
56     C GM is affected only if GMREDI_AdvForm=.FALSE.
57     C The parameter SmolarkiewiczMaxFrac (set in gad_init_fixed) can be used to
58     C restrict the fraction of tracer that can leave a cell to be less than 1.
59     C This will be necessary to make the tracer strictly positive.
60 jahn 1.11 C This hack applies to all tracers except temperature and salinity!
61     C Don't use with Adams-Bashforth (for ptracers)!
62     C Don't use with OBCS!
63 jahn 1.10 #undef GAD_SMOLARKIEWICZ_HACK
64    
65 adcroft 1.3 #else
66    
67     C If GAD is disabled then so is multi-dimensional advection
68     #define DISABLE_MULTIDIM_ADVECTION
69    
70 jmc 1.7 #endif /* ALLOW_GENERIC_ADVDIFF */
71 edhill 1.5 #endif /* GAD_OPTIONS_H */

  ViewVC Help
Powered by ViewVC 1.1.22