/[MITgcm]/MITgcm/pkg/gmredi/gmredi_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/gmredi/gmredi_readparms.F

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


Revision 1.19 - (hide annotations) (download)
Mon Oct 27 22:03:47 2008 UTC (15 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint61q, checkpoint61g, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.18: +13 -6 lines
- add more parameters to Visbeck-variable-K :
 (GM_Visbeck_maxSlope, GM_Visbeck_minDepth, GM_Visbeck_minVal_K)

1 jmc 1.19 C $Header: /u/gcmpack/MITgcm/pkg/gmredi/gmredi_readparms.F,v 1.18 2008/10/07 20:15:27 jmc Exp $
2 jmc 1.8 C $Name: $
3 heimbach 1.1
4     #include "GMREDI_OPTIONS.h"
5    
6 jmc 1.15 CBOP
7     C !ROUTINE: GMREDI_READPARMS
8     C !INTERFACE:
9 heimbach 1.1 SUBROUTINE GMREDI_READPARMS( myThid )
10 jmc 1.15
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 heimbach 1.1 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 jmc 1.15 C !INPUT/OUTPUT PARAMETERS:
31 heimbach 1.1 C === Routine arguments ===
32     INTEGER myThid
33    
34     #ifdef ALLOW_GMREDI
35 jmc 1.15 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 heimbach 1.1
43     C-- GM/Redi parameter
44 jmc 1.8 C GM_Small_Number :: epsilon used in computing the slope
45 jmc 1.14 C GM_slopeSqCutoff :: slope^2 cut-off value
46 heimbach 1.1 NAMELIST /GM_PARM01/
47 jmc 1.6 & GM_AdvForm, GM_AdvSeparate,
48 gforget 1.17 & GM_InMomAsStress,
49 jmc 1.5 & GM_isopycK,
50 jmc 1.14 & GM_background_K,
51 heimbach 1.1 & GM_taper_scheme,
52     & GM_maxSlope,
53 jmc 1.5 & GM_Kmin_horiz,
54 jmc 1.8 & GM_Small_Number, GM_slopeSqCutoff,
55 jmc 1.19 & GM_Visbeck_alpha, GM_Visbeck_length,
56 heimbach 1.1 & GM_Visbeck_depth,
57 jmc 1.19 & GM_Visbeck_minDepth, GM_Visbeck_maxSlope,
58     & GM_Visbeck_minVal_K, GM_Visbeck_maxVal_K,
59 jmc 1.18 & GM_facTrL2dz, GM_facTrL2ML, GM_maxTransLay,
60     & GM_Scrit, GM_Sd,
61 edhill 1.11 & GM_MNC
62 heimbach 1.1
63 jmc 1.14 _BEGIN_MASTER(myThid)
64    
65 jmc 1.18 C-- GMREDI_READPARMS has been called so we know that the package is active.
66     C note: cannot test for GMRediIsOn outside GM-redi S/R (since is in GMREDI.h)
67     C + is not initialized (if useGMRedi=F) => useless => removed
68     c GMRediIsOn = .TRUE.
69 heimbach 1.1
70     C-- Default values GM/Redi
71 jmc 1.5 GM_AdvForm = .FALSE.
72 jmc 1.6 GM_AdvSeparate = .FALSE.
73 gforget 1.17 GM_InMomAsStress = .FALSE.
74 jmc 1.5 GM_isopycK = -999.
75 jmc 1.15 GM_background_K = 0. _d 0
76 jmc 1.19 GM_maxSlope = 1. _d -2
77 jmc 1.15 GM_Kmin_horiz = 0. _d 0
78 jmc 1.16 GM_Small_Number = 1. _d -20
79 edhill 1.11 GM_slopeSqCutoff = 1. _d +48
80 heimbach 1.1 GM_taper_scheme = ' '
81 jmc 1.18 GM_facTrL2dz = 1.
82     GM_facTrL2ML = 5.
83     GM_maxTransLay = 500.
84 jmc 1.15 GM_Scrit = 0.004 _d 0
85     GM_Sd = 0.001 _d 0
86 edhill 1.11 GM_MNC = useMNC
87 jmc 1.14
88 heimbach 1.1 C-- Default values GM/Redi I/O control
89 edhill 1.11 c GM_dumpFreq = -1.
90     c GM_taveFreq = -1.
91 heimbach 1.1
92     C-- Default values Visbeck
93 jmc 1.15 GM_Visbeck_alpha = 0. _d 0
94     GM_Visbeck_length = 200. _d 3
95     GM_Visbeck_depth = 1000. _d 0
96 jmc 1.19 GM_Visbeck_minDepth = 0. _d 0
97     GM_Visbeck_maxSlope = UNSET_RL
98     GM_Visbeck_minVal_K = 0. _d 0
99     GM_Visbeck_maxVal_K = 2500. _d 0
100 heimbach 1.1
101 edhill 1.11 WRITE(msgBuf,'(A)') ' GM_READPARMS: opening data.gmredi'
102     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
103     & SQUEEZE_RIGHT , 1)
104     CALL OPEN_COPY_DATA_FILE(
105     I 'data.gmredi', 'GM_READPARMS',
106     O iUnit,
107     I myThid )
108    
109     C Read parameters from open data file
110 heimbach 1.1 READ(UNIT=iUnit,NML=GM_PARM01)
111 jmc 1.9 WRITE(msgBuf,'(A)') ' GM_READPARMS: finished reading data.gmredi'
112     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
113     & SQUEEZE_RIGHT , 1)
114 edhill 1.11 C Close the open data file
115 jmc 1.9 CLOSE(iUnit)
116    
117 jmc 1.5 C Default value for GM_isopycK is equal to GM_background_K :
118     IF (GM_isopycK.EQ.-999.) GM_isopycK = GM_background_K
119    
120 jmc 1.19 C Default value for GM_Visbeck_maxSlope is equal to GM_maxSlope :
121     IF ( GM_Visbeck_maxSlope .EQ. UNSET_RL )
122     & GM_Visbeck_maxSlope = GM_maxSlope
123    
124 heimbach 1.1 C Some constants
125 jmc 1.18 GM_rMaxSlope = 0.
126     if (GM_maxSlope.NE.0.) GM_rMaxSlope = 1. _d 0 / GM_maxSlope
127 heimbach 1.1
128 jmc 1.5 IF (GM_AdvForm) THEN
129     GM_skewflx = 0.
130     GM_advect = 1.
131     GM_ExtraDiag = GM_Visbeck_alpha.NE.0. .OR. GM_isopycK.NE.0.
132     ELSE
133     GM_skewflx = 1.
134     GM_advect = 0.
135     GM_ExtraDiag = GM_isopycK.NE.GM_background_K
136     ENDIF
137    
138 edhill 1.11 C Make sure that we locally honor the global MNC on/off flag
139     GM_MNC = GM_MNC .AND. useMNC
140     #ifndef ALLOW_MNC
141     C Fix to avoid running without getting any output:
142     GM_MNC = .FALSE.
143     #endif
144     GM_MDSIO = (.NOT. GM_MNC) .OR. outputTypesInclusive
145    
146 heimbach 1.1 _END_MASTER(myThid)
147    
148     C-- Everyone else must wait for the parameters to be loaded
149     _BARRIER
150    
151     #endif /* ALLOW_GMREDI */
152    
153 jmc 1.5 RETURN
154     END

  ViewVC Help
Powered by ViewVC 1.1.22