/[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.12 - (show annotations) (download)
Thu Mar 7 15:23:19 2013 UTC (12 years, 4 months ago) by dgoldberg
Branch: MAIN
Changes since 1.11: +11 -5 lines
bug fixes, GL smoothing, changes for controlling bathym with const surf elev

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

  ViewVC Help
Powered by ViewVC 1.1.22