/[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.16 - (hide annotations) (download)
Mon Mar 4 18:20:46 2013 UTC (11 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64e, checkpoint64g, checkpoint64f, HEAD
Changes since 1.15: +6 -1 lines
File MIME type: text/plain
implement compressible flow method for multi-dim advection (similar to
 gad_som_advect.F); add new option "GAD_MULTIDIM_COMPRESSIBLE" (since
 TAF generates many recomputations) to use it; no yet coded with implicit
 vertical advection.

1 jmc 1.16 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/GAD_OPTIONS.h,v 1.15 2011/12/24 01:04:47 jmc Exp $
2 adcroft 1.2 C $Name: $
3    
4     CBOP
5     C !ROUTINE: GAD_OPTIONS.h
6    
7     C !INTERFACE:
8 jmc 1.13 C #include "GAD_OPTIONS.h"
9 adcroft 1.2
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 Use this file for selecting options within the GAD package
16 edhill 1.5
17     #ifndef GAD_OPTIONS_H
18     #define GAD_OPTIONS_H
19     #include "PACKAGES_CONFIG.h"
20 jmc 1.15 #include "CPP_OPTIONS.h"
21    
22 jmc 1.7 #ifdef ALLOW_GENERIC_ADVDIFF
23 jmc 1.15 C Package-specific Options & Macros go here
24 adcroft 1.1
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 jmc 1.13 C use ISOTROPIC_COS_SCALING of the horizontal viscosity terms in the
35 mlosch 1.6 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 jmc 1.16 C Use compressible flow method for multi-dim advection instead of old, less
45     C accurate jmc method. Note: option has no effect on SOM advection which
46     C always use compressible flow method.
47     #undef GAD_MULTIDIM_COMPRESSIBLE
48    
49 jmc 1.13 C This enable the use of 2nd-Order Moment advection scheme (Prather, 1986) for
50     C Temperature and Salinity ; due to large memory space (10 times more / tracer)
51     C requirement, by default, this part of the code is not compiled.
52     #undef GAD_ALLOW_TS_SOM_ADV
53 adcroft 1.3
54 jahn 1.12 C Hack to get rid of negatives caused by Redi. Works by restricting the
55 jmc 1.13 C outgoing flux (only contributions computed in gad_calc_rhs) for each cell
56 jahn 1.12 C to be no more than the amount of tracer in the cell (see Smolarkiewicz
57     C MWR 1989 and Bott MWR 1989).
58     C The flux contributions computed in gad_calc_rhs which are affected by
59     C this hack are:
60     C - explicit diffusion, Redi and the non-local part of KPP
61     C - advection is affected only if multiDimAdvection=.FALSE.
62     C - vertical diffusion (including the diagonal contribution from GMRedi)
63     C only if implicitDiffusion=.FALSE.
64     C - GM is affected only if GMREDI_AdvForm=.FALSE.
65     C
66     C The parameter SmolarkiewiczMaxFrac (defined in gad_init_fixed.F)
67     C specifies the maximal fraction of tracer that can leave a cell.
68     C By default it is 1. This will prevent the tracer from going negative
69     C due to contributions from gad_calc_rhs alone. In the presence of other
70     C contributions (or roundoff errors), it may be necessary to reduce this
71     C value to achieve strict positivity.
72     C
73 jmc 1.13 C This hack applies to all tracers except temperature and salinity!
74 jmc 1.14 C Do not use with Adams-Bashforth (for ptracers)!
75     C Do not use with OBCS!
76 jahn 1.10 #undef GAD_SMOLARKIEWICZ_HACK
77    
78 adcroft 1.3 #else
79    
80     C If GAD is disabled then so is multi-dimensional advection
81     #define DISABLE_MULTIDIM_ADVECTION
82    
83 jmc 1.7 #endif /* ALLOW_GENERIC_ADVDIFF */
84 edhill 1.5 #endif /* GAD_OPTIONS_H */

  ViewVC Help
Powered by ViewVC 1.1.22