/[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.8 - (show annotations) (download)
Wed Oct 10 15:03:10 2012 UTC (12 years, 9 months ago) by dgoldberg
Branch: MAIN
Changes since 1.7: +8 -2 lines
new parameters

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

  ViewVC Help
Powered by ViewVC 1.1.22