/[MITgcm]/MITgcm_contrib/submesoscale/code/gmredi_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/submesoscale/code/gmredi_readparms.F

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


Revision 1.4 - (hide annotations) (download)
Fri Mar 12 18:31:00 2010 UTC (15 years, 4 months ago) by zhc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +31 -22 lines
updated with checkpoint62c

1 zhc 1.4 C $Header: /u/gcmpack/MITgcm/pkg/gmredi/gmredi_readparms.F,v 1.19 2008/10/27 22:03:47 jmc Exp $
2 dimitri 1.1 C $Name: $
3    
4     #include "GMREDI_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: GMREDI_READPARMS
8     C !INTERFACE:
9     SUBROUTINE GMREDI_READPARMS( myThid )
10    
11     C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | SUBROUTINE GMREDI_READPARMS
14     C | o Routine to initialize GM/Redi variables and constants.
15     C *==========================================================*
16     C | Initialize GM/Redi parameters, read in data.gmredi
17     C *==========================================================*
18     C \ev
19    
20     C !USES:
21     IMPLICIT NONE
22    
23     C === Global variables ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28     #include "GMREDI.h"
29    
30     C !INPUT/OUTPUT PARAMETERS:
31     C === Routine arguments ===
32     INTEGER myThid
33    
34     #ifdef ALLOW_GMREDI
35     C !LOCAL VARIABLES:
36     C === Local variables ===
37     C msgBuf - Informational/error meesage buffer
38     C iUnit - Work variable for IO unit number
39     CHARACTER*(MAX_LEN_MBUF) msgBuf
40     INTEGER iUnit
41     CEOP
42    
43     C-- GM/Redi parameter
44     C GM_Small_Number :: epsilon used in computing the slope
45     C GM_slopeSqCutoff :: slope^2 cut-off value
46     NAMELIST /GM_PARM01/
47     & GM_AdvForm, GM_AdvSeparate,
48 dimitri 1.3 & GM_InMomAsStress,
49 dimitri 1.1 & GM_isopycK,
50     & GM_background_K,
51     & GM_taper_scheme,
52     & GM_maxSlope,
53     & GM_Kmin_horiz,
54     & GM_Small_Number, GM_slopeSqCutoff,
55 zhc 1.4 & GM_Visbeck_alpha, GM_Visbeck_length,
56 dimitri 1.1 & GM_Visbeck_depth,
57 zhc 1.4 & GM_Visbeck_minDepth, GM_Visbeck_maxSlope,
58     & GM_Visbeck_minVal_K, GM_Visbeck_maxVal_K,
59     & GM_facTrL2dz, GM_facTrL2ML, GM_maxTransLay,
60     & GM_Scrit, GM_Sd,
61     & GM_MNC
62     C SM (3)
63     & ,GM_SM_Ce,
64 dimitri 1.2 & GM_SM_Lf,
65     & GM_SM_tau
66 zhc 1.4
67 dimitri 1.1
68     _BEGIN_MASTER(myThid)
69    
70 zhc 1.4 C-- GMREDI_READPARMS has been called so we know that the package is active.
71     C note: cannot test for GMRediIsOn outside GM-redi S/R (since is in GMREDI.h)
72     C + is not initialized (if useGMRedi=F) => useless => removed
73     c GMRediIsOn = .TRUE.
74 dimitri 1.1
75     C-- Default values GM/Redi
76     GM_AdvForm = .FALSE.
77     GM_AdvSeparate = .FALSE.
78 dimitri 1.3 GM_InMomAsStress = .FALSE.
79 dimitri 1.1 GM_isopycK = -999.
80     GM_background_K = 0. _d 0
81 zhc 1.4 GM_maxSlope = 1. _d -2
82 dimitri 1.1 GM_Kmin_horiz = 0. _d 0
83     GM_Small_Number = 1. _d -20
84     GM_slopeSqCutoff = 1. _d +48
85     GM_taper_scheme = ' '
86 zhc 1.4 GM_facTrL2dz = 1.
87     GM_facTrL2ML = 5.
88     GM_maxTransLay = 500.
89 dimitri 1.1 GM_Scrit = 0.004 _d 0
90     GM_Sd = 0.001 _d 0
91     GM_MNC = useMNC
92 dimitri 1.2 CBFK Submesoscale Paramters
93     C GM_SM_Ce is the efficiency factor. Nondimensional, typically 0.06
94     C Will be converted to a dimensional factor later
95     C Set to zero to kill Submeso at runtime.
96     GM_SM_Ce = 0.06 _d 0
97     C GM_SM_Lf is the minimum Front Width scale. Typically 1-10km
98     GM_SM_Lf = 5.00 _d 3
99 zhc 1.4 C GM_SM_Lmax is the maximum upscale. Typically 100km
100 dimitri 1.2 GM_SM_Lmax = 1.00 _d 5
101     C GM_SM_tau is the momentum mixing timescale: 1/d to 1/week
102     GM_SM_tau = 8.64 _d 4
103     C Will be converted to an inverse squared timescale later
104 zhc 1.4
105 dimitri 1.1
106     C-- Default values GM/Redi I/O control
107     c GM_dumpFreq = -1.
108     c GM_taveFreq = -1.
109    
110     C-- Default values Visbeck
111     GM_Visbeck_alpha = 0. _d 0
112     GM_Visbeck_length = 200. _d 3
113     GM_Visbeck_depth = 1000. _d 0
114 zhc 1.4 GM_Visbeck_minDepth = 0. _d 0
115     GM_Visbeck_maxSlope = UNSET_RL
116     GM_Visbeck_minVal_K = 0. _d 0
117     GM_Visbeck_maxVal_K = 2500. _d 0
118 dimitri 1.1
119     WRITE(msgBuf,'(A)') ' GM_READPARMS: opening data.gmredi'
120     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
121     & SQUEEZE_RIGHT , 1)
122     CALL OPEN_COPY_DATA_FILE(
123     I 'data.gmredi', 'GM_READPARMS',
124     O iUnit,
125     I myThid )
126    
127     C Read parameters from open data file
128     READ(UNIT=iUnit,NML=GM_PARM01)
129     WRITE(msgBuf,'(A)') ' GM_READPARMS: finished reading data.gmredi'
130     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
131     & SQUEEZE_RIGHT , 1)
132     C Close the open data file
133     CLOSE(iUnit)
134    
135     C Default value for GM_isopycK is equal to GM_background_K :
136     IF (GM_isopycK.EQ.-999.) GM_isopycK = GM_background_K
137    
138 zhc 1.4 C Default value for GM_Visbeck_maxSlope is equal to GM_maxSlope :
139     IF ( GM_Visbeck_maxSlope .EQ. UNSET_RL )
140     & GM_Visbeck_maxSlope = GM_maxSlope
141    
142 dimitri 1.1 C Some constants
143 zhc 1.4 GM_rMaxSlope = 0.
144     if (GM_maxSlope.NE.0.) GM_rMaxSlope = 1. _d 0 / GM_maxSlope
145 dimitri 1.1
146     IF (GM_AdvForm) THEN
147     GM_skewflx = 0.
148     GM_advect = 1.
149     GM_ExtraDiag = GM_Visbeck_alpha.NE.0. .OR. GM_isopycK.NE.0.
150     ELSE
151     GM_skewflx = 1.
152     GM_advect = 0.
153 zhc 1.4 GM_ExtraDiag = GM_isopycK.NE.GM_background_K
154 dimitri 1.1 ENDIF
155    
156     C Make sure that we locally honor the global MNC on/off flag
157     GM_MNC = GM_MNC .AND. useMNC
158     #ifndef ALLOW_MNC
159     C Fix to avoid running without getting any output:
160     GM_MNC = .FALSE.
161     #endif
162     GM_MDSIO = (.NOT. GM_MNC) .OR. outputTypesInclusive
163    
164     _END_MASTER(myThid)
165    
166     C-- Everyone else must wait for the parameters to be loaded
167     _BARRIER
168    
169     #endif /* ALLOW_GMREDI */
170    
171     RETURN
172     END

  ViewVC Help
Powered by ViewVC 1.1.22