/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F

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


Revision 1.10 - (show annotations) (download)
Wed Jan 9 21:56:18 2013 UTC (12 years, 6 months ago) by dgoldberg
Branch: MAIN
Changes since 1.9: +19 -2 lines
changes to accept real datasets

1 C $Header: /u/gcmpack/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F,v 1.9 2012/12/10 02:34:45 dgoldberg Exp $
2 C $Name: $
3
4
5 C this needs changes
6
7 #include "STREAMICE_OPTIONS.h"
8
9 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
10 CBOP 0
11 SUBROUTINE STREAMICE_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Initialize STREAMICE variables and constants.
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "STREAMICE.h"
22 #include "STREAMICE_BDRY.h"
23
24 C !INPUT PARAMETERS:
25 INTEGER myThid
26 CEOP
27
28 #ifdef ALLOW_STREAMICE
29
30 C !LOCAL VARIABLES:
31 C msgBuf :: Informational/error message buffer
32 C iUnit :: Work variable for IO unit number
33 CHARACTER*(MAX_LEN_MBUF) msgBuf
34 INTEGER iUnit
35
36 NAMELIST /STREAMICE_PARM01/
37 & streamice_density, streamice_density_ocean_avg,
38 & A_glen_isothermal, n_glen, eps_glen_min, eps_u_min,
39 & C_basal_fric_const, n_basal_friction,
40 & streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol,
41 & streamice_nonlin_tol_fp,
42 & streamice_max_cg_iter, streamice_max_nl_iter,
43 & STREAMICE_GL_regularize,
44 & STREAMICEthickInit,
45 & STREAMICEsigcoordInit,
46 & STREAMICEsigcoordFile,
47 & STREAMICEthickFile,
48 & STREAMICEcalveMaskFile,
49 & STREAMICEison,
50 & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
51 & STREAMICE_dump_mnc, STREAMICE_tave_mnc,
52 & STREAMICE_GL_regularize, STREAMICE_move_front,
53 & STREAMICE_calve_to_mask,
54 ! & STREAMICE_geom_file_setup,
55 & STREAMICE_diagnostic_only,
56 ! & STREAMICE_construct_matrix,
57 & STREAMICE_lower_cg_tol,
58 & streamice_CFL_factor,
59 & streamice_adjDump,
60 ! & STREAMICE_hybrid_stress,
61 & streamice_bg_surf_slope_x, streamice_bg_surf_slope_y,
62 & streamice_kx_b_init, streamice_ky_b_init,
63 & STREAMICEbasalTracConfig,
64 & STREAMICEbasalTracFile,
65 & STREAMICEvelOptimFile,
66 & STREAMICEhmaskFile,
67 & STREAMICEuFaceBdryFile,
68 & STREAMICEvFaceBdryFile,
69 & STREAMICEuDirichValsFile,
70 & STREAMICEvDirichValsFile,
71 & STREAMICEGlenConstFile, STREAMICEGlenConstConfig,
72 & STREAMICE_ppm_driving_stress,
73 & STREAMICE_h_ctrl_const_surf,
74 & streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel,
75 & streamice_wgt_avthick, streamice_wgt_tikh,
76 & streamice_addl_backstress
77
78
79 NAMELIST /STREAMICE_PARM02/
80 & shelf_max_draft,
81 & shelf_min_draft,
82 & shelf_edge_pos,
83 & shelf_slope_scale,
84 & shelf_flat_width,
85 & flow_dir
86
87 NAMELIST /STREAMICE_PARM03/
88 & min_x_noflow_NORTH, max_x_noflow_NORTH,
89 & min_x_noflow_SOUTH, max_x_noflow_SOUTH,
90 & min_y_noflow_WEST, max_y_noflow_WEST,
91 & min_y_noflow_EAST, max_y_noflow_EAST,
92 & min_x_noStress_NORTH, max_x_noStress_NORTH,
93 & min_x_noStress_SOUTH, max_x_noStress_SOUTH,
94 & min_y_noStress_WEST, max_y_noStress_WEST,
95 & min_y_noStress_EAST, max_y_noStress_EAST,
96 & min_x_FluxBdry_NORTH, max_x_FluxBdry_NORTH,
97 & min_x_FluxBdry_SOUTH, max_x_FluxBdry_SOUTH,
98 & min_y_FluxBdry_WEST, max_y_FluxBdry_WEST,
99 & min_y_FluxBdry_EAST, max_y_FluxBdry_EAST,
100 & min_x_Dirich_NORTH, max_x_Dirich_NORTH,
101 & min_x_Dirich_SOUTH, max_x_Dirich_SOUTH,
102 & min_y_Dirich_WEST, max_y_Dirich_WEST,
103 & min_y_Dirich_EAST, max_y_Dirich_EAST,
104 & min_x_CFBC_NORTH, max_x_CFBC_NORTH,
105 & min_x_CFBC_SOUTH, max_x_CFBC_SOUTH,
106 & min_y_CFBC_WEST, max_y_CFBC_WEST,
107 & min_y_CFBC_EAST, max_y_CFBC_EAST,
108 & flux_bdry_val_SOUTH, flux_bdry_val_NORTH,
109 & flux_bdry_val_WEST, flux_bdry_val_EAST,
110 & STREAMICE_NS_periodic, STREAMICE_EW_periodic
111
112 _BEGIN_MASTER(myThid)
113
114 C-- Default values for STREAMICE
115
116 streamice_density = 917.
117 streamice_density_ocean_avg = 1024.
118 A_glen_isothermal = 9.461e-18 ! Pa (-1/3) a
119 n_glen = 3.
120 eps_glen_min = 1.0e-12
121 eps_u_min = 1.0e-6
122 C_basal_fric_const = 31.71 ! Pa (m/a)-1n
123 n_basal_friction = 1.
124 streamice_vel_update = 169200. ! seconds
125 streamice_cg_tol = 1e-6
126 streamice_nonlin_tol = 1e-6
127 streamice_nonlin_tol_fp = 1.e-14
128 streamice_max_cg_iter = 2000
129 streamice_max_nl_iter = 100
130 streamice_n_sub_regularize = 4
131 streamice_CFL_factor = .5
132 streamice_adjDump = 0.
133 streamice_bg_surf_slope_x = .0
134 streamice_bg_surf_slope_y = 0.
135 streamice_kx_b_init = 1.
136 streamice_ky_b_init = 1.
137 streamice_wgt_drift = 0.
138 streamice_wgt_tikh = 0.
139 streamice_wgt_surf = 0.
140 streamice_wgt_vel = 0.
141 streamice_wgt_avthick = 0.
142 streamice_addl_backstress = 0.
143
144 STREAMICEthickInit = 'FILE'
145 STREAMICEthickFile = ' '
146 STREAMICEcalveMaskFile = ' '
147 STREAMICEsigcoordInit = 'UNIFORM'
148 STREAMICEsigcoordFile = ' '
149 STREAMICEbasalTracConfig = 'UNIFORM'
150 STREAMICEbasalTracFile = ' '
151 STREAMICEvelOptimFile = ''
152 STREAMICEhmaskFile = ''
153 STREAMICEuFaceBdryFile = ''
154 STREAMICEvFaceBdryFile = ''
155 STREAMICEuDirichValsFile = ''
156 STREAMICEvDirichValsFile = ''
157 STREAMICEGlenConstFile = ''
158 STREAMICEGlenConstConfig = ''
159
160 STREAMICEison = .TRUE.
161 STREAMICE_tave_mdsio = .TRUE.
162 STREAMICE_dump_mdsio = .TRUE.
163 STREAMICE_dump_mnc = .FALSE.
164 STREAMICE_tave_mnc = .FALSE.
165 STREAMICE_GL_regularize = .FALSE.
166 STREAMICE_move_front = .FALSE.
167 STREAMICE_calve_to_mask = .FALSE.
168 ! STREAMICE_geom_file_setup = .FALSE.
169 ! STREAMICE_construct_matrix = .TRUE.
170 STREAMICE_lower_cg_tol = .FALSE.
171 STREAMICE_diagnostic_only = .FALSE.
172 STREAMICE_ppm_driving_stress = .FALSE.
173 STREAMICE_h_ctrl_const_surf = .FALSE.
174 ! STREAMICE_hybrid_stress= .FALSE.
175
176 min_x_noflow_NORTH = 0.
177 max_x_noflow_NORTH = 0.
178 min_x_noflow_SOUTH = 0.
179 max_x_noflow_SOUTH = 0.
180 min_y_noflow_WEST = 0.
181 max_y_noflow_WEST = 0.
182 min_y_noflow_EAST = 0.
183 max_y_noflow_EAST = 0.
184 min_x_noStress_NORTH = 0.
185 max_x_noStress_NORTH = 0.
186 min_x_noStress_SOUTH = 0.
187 max_x_noStress_SOUTH = 0.
188 min_y_noStress_WEST = 0.
189 max_y_noStress_WEST = 0.
190 min_y_noStress_EAST = 0.
191 max_y_noStress_EAST = 0.
192 min_x_FluxBdry_NORTH = 0.
193 max_x_FluxBdry_NORTH = 0.
194 min_x_FluxBdry_SOUTH = 0.
195 max_x_FluxBdry_SOUTH = 0.
196 min_y_FluxBdry_WEST = 0.
197 max_y_FluxBdry_WEST = 0.
198 min_y_FluxBdry_EAST = 0.
199 max_y_FluxBdry_EAST = 0.
200 min_x_Dirich_NORTH = 0.
201 max_x_Dirich_NORTH = 0.
202 min_x_Dirich_SOUTH = 0.
203 max_x_Dirich_SOUTH = 0.
204 min_y_Dirich_WEST = 0.
205 max_y_Dirich_WEST = 0.
206 min_y_Dirich_EAST = 0.
207 max_y_Dirich_EAST = 0.
208 min_y_CFBC_WEST = 0.
209 max_y_CFBC_WEST = 0.
210 min_y_CFBC_EAST = 0.
211 max_y_CFBC_EAST = 0.
212 flux_bdry_val_SOUTH = 0.
213 flux_bdry_val_NORTH = 0.
214 flux_bdry_val_WEST = 0.
215 flux_bdry_val_EAST = 0.
216
217 STREAMICE_NS_periodic = .FALSE.
218 STREAMICE_EW_periodic = .FALSE.
219
220 WRITE(msgBuf,'(A)') 'STREAMICE_READPARMS: opening data.streamice'
221 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
222 & SQUEEZE_RIGHT , 1)
223 CALL OPEN_COPY_DATA_FILE(
224 I 'data.streamice', 'STREAMICE_READPARMS',
225 O iUnit,
226 I myThid )
227
228 C Read parameters from open data file
229 READ(UNIT=iUnit,NML=STREAMICE_PARM01)
230 WRITE(msgBuf,'(A)')
231 & 'STREAMICE_READPARMS: read first param block'
232 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
233 & SQUEEZE_RIGHT , 1)
234
235 IF (TRIM(STREAMICEthickInit) .eq. "PARAM") THEN
236 READ(UNIT=iUnit,NML=STREAMICE_PARM02)
237 WRITE(msgBuf,'(A)')
238 & 'STREAMICE_READPARMS: read second param block'
239 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
240 & SQUEEZE_RIGHT , 1)
241 ENDIF
242
243 READ(UNIT=iUnit,NML=STREAMICE_PARM03)
244 WRITE(msgBuf,'(A)')
245 & 'STREAMICE_READPARMS: read third param block'
246 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
247 & SQUEEZE_RIGHT , 1)
248 C Close the open data file
249 CLOSE(iUnit)
250
251 streamice_nstep_velocity = NINT (streamice_vel_update / deltaT)
252
253 C- Set Output type flags :
254
255 #ifdef ALLOW_MNC
256 IF (useMNC) THEN
257 IF ( .NOT.outputTypesInclusive
258 & .AND. STREAMICE_tave_mnc ) STREAMICE_tave_mdsio = .FALSE.
259 IF ( .NOT.outputTypesInclusive
260 & .AND. STREAMICE_dump_mnc ) STREAMICE_dump_mdsio = .FALSE.
261 ENDIF
262 #endif
263
264 _END_MASTER(myThid)
265
266 C-- Everyone else must wait for the parameters to be loaded
267 _BARRIER
268
269 #endif /* ALLOW_STREAMICE */
270
271 RETURN
272 END

  ViewVC Help
Powered by ViewVC 1.1.22