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

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

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


Revision 1.18 - (hide annotations) (download)
Wed Aug 15 22:35:41 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59g, checkpoint59f, checkpoint59h
Changes since 1.17: +13 -1 lines
File MIME type: text/plain
Define loop range indices for computing vertical advection tendency
 as parameters (iMinAdvR,iMaxAdvR,jMinAdvR,jMaxAdvR).
and do the calculation in the interior (no overlap) only to save CPU time.
note: 1) for now, only implemented for SOM advection
      2) can recover old version (if needed) by changing only 1 file: GAD.h

1 jmc 1.18 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/GAD.h,v 1.17 2007/01/25 17:29:15 jmc Exp $
2 heimbach 1.4 C $Name: $
3 adcroft 1.1
4 adcroft 1.7 CBOP
5     C !ROUTINE: GAD.h
6 adcroft 1.1
7 adcroft 1.7 C !INTERFACE:
8     C #include "GAD.h"
9    
10     C !DESCRIPTION:
11     C Contains enumerated constants for distinguishing between different
12     C advection schemes and tracers.
13     C
14     C Unfortunately, there is no easy way to make use of the
15     C tokens in namelist input so for now we have to enter the
16     C tokens value into "data" (ie. 2 for 2nd order etc.)
17 adcroft 1.8
18     C !USES:
19 adcroft 1.7
20     C !DEFINED PARAMETERS:
21    
22 jmc 1.13 C ENUM_UPWIND_1RST :: 1rst Order Upwind
23     INTEGER ENUM_UPWIND_1RST
24     PARAMETER(ENUM_UPWIND_1RST=1)
25    
26 adcroft 1.7 C ENUM_CENTERED_2ND :: Centered 2nd order
27 adcroft 1.1 INTEGER ENUM_CENTERED_2ND
28     PARAMETER(ENUM_CENTERED_2ND=2)
29 jmc 1.2
30 jmc 1.13 C ENUM_UPWIND_3RD :: 3rd order upwind
31 jmc 1.2 INTEGER ENUM_UPWIND_3RD
32     PARAMETER(ENUM_UPWIND_3RD=3)
33 adcroft 1.1
34 adcroft 1.7 C ENUM_CENTERED_4TH :: Centered 4th order
35 adcroft 1.1 INTEGER ENUM_CENTERED_4TH
36     PARAMETER(ENUM_CENTERED_4TH=4)
37    
38 jmc 1.13 C ENUM_DST2 :: 2nd Order Direct Space and Time (= Lax-Wendroff)
39     INTEGER ENUM_DST2
40     PARAMETER(ENUM_DST2=20)
41    
42 adcroft 1.7 C ENUM_FLUX_LIMIT :: Non-linear flux limiter
43 adcroft 1.1 INTEGER ENUM_FLUX_LIMIT
44     PARAMETER(ENUM_FLUX_LIMIT=77)
45 adcroft 1.6
46 jmc 1.13 C ENUM_DST3 :: 3rd Order Direst Space and Time
47 adcroft 1.6 INTEGER ENUM_DST3
48     PARAMETER(ENUM_DST3=30)
49    
50 adcroft 1.7 C ENUM_DST3_FLUX_LIMIT :: 3-DST flux limited
51 adcroft 1.6 INTEGER ENUM_DST3_FLUX_LIMIT
52     PARAMETER(ENUM_DST3_FLUX_LIMIT=33)
53 adcroft 1.1
54 adcroft 1.16 C ENUM_OS7MP :: 7th Order One Step method with Monotonicity Preserving Limiter
55     INTEGER ENUM_OS7MP
56     PARAMETER(ENUM_OS7MP=7)
57    
58 jmc 1.15 C ENUM_SOM_PRATHER :: 2nd Order-Moment Advection Scheme, Prather, 1986
59     INTEGER ENUM_SOM_PRATHER
60     PARAMETER(ENUM_SOM_PRATHER=80)
61    
62     C ENUM_SOM_LIMITER :: 2nd Order-Moment Advection Scheme, Prather Limiter
63     INTEGER ENUM_SOM_LIMITER
64     PARAMETER(ENUM_SOM_LIMITER=81)
65    
66     C nSOM :: number of 1rst & 2nd Order-Moments: 1+1 (1D), 2+3 (2D), 3+6 (3D)
67     INTEGER nSOM
68     PARAMETER( nSOM = 3+6 )
69    
70 adcroft 1.7 C oneSixth :: Third/fourth order interpolation factor
71 adcroft 1.1 _RL oneSixth
72 heimbach 1.4 PARAMETER(oneSixth=1.D0/6.D0)
73 adcroft 1.1
74 jmc 1.18 C loop range for computing vertical advection tendency
75     C iMinAdvR,iMaxAdvR :: 1rst index (X-dir) loop range for vertical advection
76     C jMinAdvR,jMaxAdvR :: 2nd index (Y-dir) loop range for vertical advection
77     INTEGER iMinAdvR, iMaxAdvR, jMinAdvR, jMaxAdvR
78     c PARAMETER ( iMinAdvR = 1-OLx , iMaxAdvR = sNx+OLx )
79     c PARAMETER ( jMinAdvR = 1-OLy , jMaxAdvR = sNy+OLy )
80     C- note: we use to compute vertical advection tracer tendency everywhere
81     C (overlap included) as above, but really needs valid tracer tendency
82     C in interior only (as below):
83     PARAMETER ( iMinAdvR = 1 , iMaxAdvR = sNx )
84     PARAMETER ( jMinAdvR = 1 , jMaxAdvR = sNy )
85    
86 edhill 1.11 C Differentiate between tracers (needed for KPP - arrgh!!!)
87     cph and GMRedi arrgh*arrgh!!!)
88 heimbach 1.10 cph indices are used for TAF key computations, so need to
89     cph running from 1, 2, ...
90     c
91 adcroft 1.7 C GAD_TEMPERATURE :: temperature
92 adcroft 1.1 INTEGER GAD_TEMPERATURE
93 heimbach 1.10 PARAMETER(GAD_TEMPERATURE=1)
94 jmc 1.9 C GAD_SALINITY :: salinity
95 adcroft 1.1 INTEGER GAD_SALINITY
96 heimbach 1.10 PARAMETER(GAD_SALINITY=2)
97 dimitri 1.12 C GAD_TR1 :: passive tracer 1
98 heimbach 1.3 INTEGER GAD_TR1
99 heimbach 1.10 PARAMETER(GAD_TR1=3)
100 adcroft 1.7 CEOP
101 jmc 1.9
102     C-- COMMON /GAD_PARM_L/ Logical parameters for GAD pkg routines
103 jmc 1.15 C tempSOM_Advection :: set to T if using 2nd-Order Moment advection for Temp
104     C saltSOM_Advection :: set to T if using 2nd-Order Moment advection for Salt
105 edhill 1.11 C tempMultiDimAdvec :: set to T if using multi-dim advection for Temp
106     C saltMultiDimAdvec :: set to T if using multi-dim advection for Salt
107 jmc 1.14 C AdamsBashforthGt :: apply Adams-Bashforth extrapolation on T tendency (=Gt)
108     C AdamsBashforthGs :: apply Adams-Bashforth extrapolation on S tendency (=Gs)
109     C AdamsBashforth_T :: apply Adams-Bashforth extrapolation on Pot.Temp.
110     C AdamsBashforth_S :: apply Adams-Bashforth extrapolation on Salinity
111     C tempStartAB :: start this run (or restart) without previous gT/Temp
112     C saltStartAB :: start this run (or restart) without previous gS/Salt
113 jmc 1.15 LOGICAL tempSOM_Advection
114     LOGICAL saltSOM_Advection
115 jmc 1.9 LOGICAL tempMultiDimAdvec
116     LOGICAL saltMultiDimAdvec
117 jmc 1.14 LOGICAL AdamsBashforthGt
118     LOGICAL AdamsBashforthGs
119     LOGICAL AdamsBashforth_T
120     LOGICAL AdamsBashforth_S
121     LOGICAL tempStartAB
122     LOGICAL saltStartAB
123 jmc 1.9 COMMON /GAD_PARM_L/
124 jmc 1.15 & tempSOM_Advection, saltSOM_Advection,
125 jmc 1.14 & tempMultiDimAdvec, saltMultiDimAdvec,
126     & AdamsBashforthGt, AdamsBashforthGs,
127     & AdamsBashforth_T, AdamsBashforth_S,
128     & tempStartAB, saltStartAB
129 edhill 1.11
130     CEH3 ;;; Local Variables: ***
131     CEH3 ;;; mode:fortran ***
132     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22