/[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.14 - (show annotations) (download)
Thu May 23 22:12:33 2013 UTC (12 years, 2 months ago) by dgoldberg
Branch: MAIN
Changes since 1.13: +4 -1 lines
specify melt rate field

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

  ViewVC Help
Powered by ViewVC 1.1.22