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

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

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


Revision 1.8 - (show annotations) (download)
Mon Jan 13 19:02:45 2003 UTC (21 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint50c_post, checkpoint48e_post, checkpoint50c_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint48i_post, checkpoint51, checkpoint50, checkpoint52, checkpoint50d_post, checkpoint50b_pre, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint51n_pre, checkpoint48d_post, checkpoint48f_post, checkpoint51l_pre, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint51h_pre, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branchpoint-genmake2, checkpoint51r_post, checkpoint48c_post, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint50g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint50e_post, checkpoint50d_pre, checkpoint51e_post, checkpoint48, checkpoint49, checkpoint51o_post, checkpoint51f_pre, checkpoint48g_post, checkpoint51g_post, ecco_c52_e35, checkpoint50b_post, checkpoint51m_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.7: +7 -2 lines
add GM_Small_Number & GM_slopeSqCutoff (replace Large_SlopeSqr)
 as running-time parameter (data.gmredi)
 default value are 1.d-12 & 1.d+48 resp.
GM_EXCLUDE_() replace GM_TAPER_() in gmredi_slope_limit.F

1 C $Header: /u/gcmpack/MITgcm/pkg/gmredi/gmredi_readparms.F,v 1.7 2002/11/14 22:43:49 heimbach Exp $
2 C $Name: $
3
4 #include "GMREDI_OPTIONS.h"
5
6 SUBROUTINE GMREDI_READPARMS( myThid )
7 C /==========================================================\
8 C | SUBROUTINE GMREDI_READPARMS |
9 C | o Routine to initialize GM/Redi variables and constants. |
10 C |==========================================================|
11 C | Initialize GM/Redi parameters, read in data.gmredi |
12 C \==========================================================/
13 IMPLICIT NONE
14
15 C === Global variables ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "GRID.h"
20 #include "GMREDI.h"
21 #include "GMREDI_DIAGS.h"
22
23 C === Routine arguments ===
24 INTEGER myThid
25
26 #ifdef ALLOW_GMREDI
27
28 C-- GM/Redi parameter
29 C GM_Small_Number :: epsilon used in computing the slope
30 C GM_slopeSqCutoff :: slope^2 cut-off value
31 NAMELIST /GM_PARM01/
32 & GM_AdvForm, GM_AdvSeparate,
33 & GM_isopycK,
34 & GM_background_K,
35 & GM_taper_scheme,
36 & GM_maxSlope,
37 & GM_Kmin_horiz,
38 & GM_Small_Number, GM_slopeSqCutoff,
39 & GM_Visbeck_alpha,
40 & GM_Visbeck_length,
41 & GM_Visbeck_depth,
42 & GM_Visbeck_maxval_K,
43 & GM_Scrit,
44 & GM_Sd
45 c & GM_dumpFreq,
46 c & GM_taveFreq
47
48 C === Local variables ===
49 C msgBuf - Informational/error meesage buffer
50 C iUnit - Work variable for IO unit number
51 CHARACTER*(MAX_LEN_MBUF) msgBuf
52 INTEGER iUnit
53
54 C-- GMREDI_READPARMS has been called so we know that
55 C the package is active.
56 GMRediIsOn=.TRUE.
57
58
59 _BEGIN_MASTER(myThid)
60
61 WRITE(msgBuf,'(A)') ' GM_READPARMS: opening data.gmredi'
62 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
63 & SQUEEZE_RIGHT , 1)
64
65
66 CALL OPEN_COPY_DATA_FILE(
67 I 'data.gmredi', 'GM_READPARMS',
68 O iUnit,
69 I myThid )
70
71 C-- Default values GM/Redi
72 GM_AdvForm = .FALSE.
73 GM_AdvSeparate = .FALSE.
74 GM_isopycK = -999.
75 GM_background_K = 0.
76 GM_maxslope = 1.0D-2
77 GM_Kmin_horiz = 0.
78 GM_Small_Number = 1. _d -12
79 GM_slopeSqCutoff = 1. _d +48
80 GM_taper_scheme = ' '
81 GM_Scrit = 0.004
82 GM_Sd = 0.001
83
84 C-- Default values GM/Redi I/O control
85 c GM_dumpFreq = -1.
86 c GM_taveFreq = -1.
87
88 C-- Default values Visbeck
89 GM_Visbeck_alpha = 0.
90 GM_Visbeck_length = 200.D3
91 GM_Visbeck_depth = 1000.D0
92 GM_Visbeck_maxval_K = 2500.D0
93
94 C-- Read parameters from open data file
95 READ(UNIT=iUnit,NML=GM_PARM01)
96
97 C Default value for GM_isopycK is equal to GM_background_K :
98 IF (GM_isopycK.EQ.-999.) GM_isopycK = GM_background_K
99
100 C Some constants
101 GM_rMaxSlope=0.
102 if (GM_maxSlope.ne.0.) GM_rMaxSlope=1. / GM_maxSlope
103
104 IF (GM_AdvForm) THEN
105 GM_skewflx = 0.
106 GM_advect = 1.
107 GM_ExtraDiag = GM_Visbeck_alpha.NE.0. .OR. GM_isopycK.NE.0.
108 ELSE
109 GM_skewflx = 1.
110 GM_advect = 0.
111 GM_ExtraDiag = GM_isopycK.NE.GM_background_K
112 ENDIF
113
114 C Unspecified I/O control parameters default to model pars
115 c if (GM_dumpFreq.EQ.-1.) GM_dumpFreq=dumpFreq
116 c if (GM_taveFreq.EQ.-1.) GM_taveFreq=taveFreq
117
118 #ifndef GM_VISBECK_VARIABLE_K
119 C Make sure we are not trying to use something that is unavailable
120 IF (GM_Visbeck_alpha .NE. 0.) THEN
121 WRITE(msgBuf,'(A)')
122 & ' GM_READPARMS: Visbeck variables used in data.gmredi'
123 CALL PRINT_ERROR( msgBuf, 1 )
124 WRITE(msgBuf,'(A)')
125 & ' GM_READPARMS: without #define GM_VISBECK_VARIABLE_K'
126 CALL PRINT_ERROR( msgBuf, 1 )
127 STOP 'ABNORMAL END: S/R GM_READPARMS'
128 ENDIF
129 #endif
130
131 #ifndef GM_BOLUS_ADVEC
132 C Make sure we are not trying to use some arrays that are unavailable
133 IF (GM_AdvForm) THEN
134 WRITE(msgBuf,'(A)')
135 & ' GM_READPARMS: GM Advection form used in data.gmredi'
136 CALL PRINT_ERROR( msgBuf, 1 )
137 WRITE(msgBuf,'(A)')
138 & ' GM_READPARMS: without #define GM_BOLUS_ADVEC'
139 CALL PRINT_ERROR( msgBuf, 1 )
140 STOP 'ABNORMAL END: S/R GM_READPARMS'
141 ENDIF
142 #endif
143
144 #ifndef GM_EXTRA_DIAGONAL
145 C Make sure we are not trying to use some arrays that are unavailable
146 IF (GM_ExtraDiag) THEN
147 WRITE(msgBuf,'(A)')
148 & ' GM_READPARMS: GM_skew_Flux_K & GM_isopycK not equal'
149 CALL PRINT_ERROR( msgBuf, 1 )
150 WRITE(msgBuf,'(A)')
151 & ' GM_READPARMS: without #define GM_EXTRA_DIAGONAL'
152 CALL PRINT_ERROR( msgBuf, 1 )
153 STOP 'ABNORMAL END: S/R GM_READPARMS'
154 ENDIF
155 #endif
156
157 WRITE(msgBuf,'(A)') ' GM_READPARMS: finished reading data.gmredi'
158 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
159 & SQUEEZE_RIGHT , 1)
160
161 C-- Close the open data file
162 CLOSE(iUnit)
163 _END_MASTER(myThid)
164
165 C-- Everyone else must wait for the parameters to be loaded
166 _BARRIER
167
168 #endif /* ALLOW_GMREDI */
169
170 RETURN
171 END

  ViewVC Help
Powered by ViewVC 1.1.22