/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/STREAMICE.h
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/streamice/STREAMICE.h

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


Revision 1.22 - (show annotations) (download)
Sat Jun 8 22:15:33 2013 UTC (12 years, 1 month ago) by dgoldberg
Branch: MAIN
Changes since 1.21: +52 -10 lines
File MIME type: text/plain
new advected scalar; new advection scheme for thickness update; corresponding TAF directives

1 C---+----1--+-+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
2
3 #ifdef ALLOW_STREAMICE
4
5 C -------------------------- REAL PARAMS ---------------------------------------------------
6
7 COMMON /STREAMICE_PARMS_R/
8 & streamice_density, streamice_density_ocean_avg,
9 ! & A_glen_isothermal, n_glen, eps_glen_min, eps_u_min,
10 & B_glen_isothermal, n_glen, eps_glen_min, eps_u_min,
11 & C_basal_fric_const, n_basal_friction, streamice_input_flux_unif,
12 & streamice_vel_update, streamice_cg_tol, streamice_nonlin_tol,
13 & streamice_nonlin_tol_fp,
14 & streamice_CFL_factor, streamice_adjDump,
15 & streamice_bg_surf_slope_x, streamice_bg_surf_slope_y,
16 & streamice_kx_b_init, streamice_ky_b_init,
17 & streamice_wgt_drift, streamice_wgt_surf,
18 & streamice_wgt_avthick, streamice_wgt_vel,
19 & streamice_wgt_tikh,
20 & streamice_addl_backstress,
21 & streamice_smooth_gl_width
22 _RL streamice_density, streamice_density_ocean_avg
23 ! _RL A_glen_isothermal, n_glen, eps_glen_min, eps_u_min
24 _RL B_glen_isothermal, n_glen, eps_glen_min, eps_u_min
25 _RL C_basal_fric_const
26 _RL n_basal_friction
27 _RL streamice_input_flux_unif
28 _RL streamice_vel_update
29 _RL streamice_cg_tol, streamice_nonlin_tol
30 _RL streamice_nonlin_tol_fp
31 _RL streamice_CFL_factor
32 _RL streamice_adjDump
33 _RL streamice_bg_surf_slope_x, streamice_bg_surf_slope_y
34 _RL streamice_kx_b_init, streamice_ky_b_init
35 _RL streamice_wgt_drift, streamice_wgt_surf
36 _RL streamice_wgt_avthick, streamice_wgt_vel
37 _RL streamice_wgt_tikh
38 _RL streamice_addl_backstress
39 _RL streamice_smooth_gl_width
40
41
42 C parms for parameterized initial thickness
43 C SHELF_MAX_DRAFT: max thickness of ice in m
44 C SHELF_MIN_DRAFT: min thickness of ice in m
45 C SHELF_EDGE_POS: extent of ice shelf in (km?)
46 C SHELF_SLOPE_SCALE: dist over which shelf slopes (km?)
47 C SHELF_FLAT_WIDTH: width of flat shelf (km?)
48 C also must be aware of units (m for cartesian, deg for curvilinear, m/deg for CYLINDRICAL POLAR)
49 C FLOW_DIR: 1.0=west, 2.0=east, 3.0=south, 4.0=north
50
51 COMMON /STREAMICE_H_INIT_R/
52 & shelf_max_draft,
53 & shelf_min_draft,
54 & shelf_edge_pos,
55 & shelf_slope_scale,
56 & shelf_flat_width,
57 & flow_dir
58 _RL shelf_max_draft
59 _RL shelf_min_draft
60 _RL shelf_edge_pos
61 _RL shelf_slope_scale
62 _RL shelf_flat_width
63 _RL flow_dir
64
65 C -------------------------- INT PARAMS ---------------------------------------------------
66
67 INTEGER streamice_max_nl
68 PARAMETER ( streamice_max_nl = 100 )
69
70 COMMON /STREAMICE_PARMS_I/
71 & streamice_max_cg_iter, streamice_max_nl_iter,
72 & streamice_vel_upd_counter, streamice_nstep_velocity,
73 & streamice_n_sub_regularize
74 INTEGER streamice_max_cg_iter, streamice_max_nl_iter
75 INTEGER streamice_vel_upd_counter, streamice_nstep_velocity
76 INTEGER streamice_n_sub_regularize
77
78 C -------------------------- CHAR PARAMS ---------------------------------------------------
79
80 CHARACTER*(MAX_LEN_FNAM) STREAMICEthickFile
81 CHARACTER*(MAX_LEN_FNAM) STREAMICEthickInit
82 CHARACTER*(MAX_LEN_FNAM) STREAMICEcalveMaskFile
83 CHARACTER*(MAX_LEN_FNAM) STREAMICEsigcoordInit
84 CHARACTER*(MAX_LEN_FNAM) STREAMICEsigcoordFile
85 CHARACTER*(MAX_LEN_FNAM) STREAMICEdelsigFile
86 CHARACTER*(MAX_LEN_FNAM) STREAMICEbasalTracConfig
87 CHARACTER*(MAX_LEN_FNAM) STREAMICEGlenConstConfig
88 CHARACTER*(MAX_LEN_FNAM) STREAMICEbasalTracFile
89 CHARACTER*(MAX_LEN_FNAM) STREAMICEGlenConstFile
90 CHARACTER*(MAX_LEN_FNAM) STREAMICEvelOptimFile
91 CHARACTER*(MAX_LEN_FNAM) STREAMICEtopogFile
92 CHARACTER*(MAX_LEN_FNAM) STREAMICEcostMaskFile
93 CHARACTER*(MAX_LEN_FNAM) STREAMICE_ADV_SCHEME
94
95 ! THE FOLLOWING FILENAMES ARE FOR SPECIFYING IRREGULAR DOMAIN GEOMETRIES
96 ! (i.e. boundaries that do not conform with rectangular walls)
97 CHARACTER*(MAX_LEN_FNAM) STREAMICEhmaskFile
98 CHARACTER*(MAX_LEN_FNAM) STREAMICEHBCxFile
99 CHARACTER*(MAX_LEN_FNAM) STREAMICEHBCyFile
100 CHARACTER*(MAX_LEN_FNAM) STREAMICEuFaceBdryFile
101 CHARACTER*(MAX_LEN_FNAM) STREAMICEvFaceBdryFile
102 CHARACTER*(MAX_LEN_FNAM) STREAMICEuDirichValsFile
103 CHARACTER*(MAX_LEN_FNAM) STREAMICEvDirichValsFile
104
105 #ifdef ALLOW_PETSC
106 ! CHARACTER PARAMS FOR PETSC
107 CHARACTER*(MAX_LEN_FNAM) PETSC_SOLVER_TYPE
108 CHARACTER*(MAX_LEN_FNAM) PETSC_PRECOND_TYPE
109 #endif
110
111 #ifdef ALLOW_STREAMICE_2DTRACER
112 ! CHARACTER PARAMS FOR TRACER
113 CHARACTER*(MAX_LEN_FNAM) STREAMICETrac2DBCxFile
114 CHARACTER*(MAX_LEN_FNAM) STREAMICETrac2DBCyFile
115 CHARACTER*(MAX_LEN_FNAM) STREAMICETrac2DinitFile
116 #endif
117
118 COMMON /STREAMICE_PARM_C/
119 & STREAMICEthickInit,
120 & STREAMICEthickFile,
121 & STREAMICEcalveMaskFile,
122 & STREAMICEsigcoordInit,
123 & STREAMICEsigcoordFile,
124 & STREAMICEdelsigFile,
125 & STREAMICEbasalTracConfig,
126 & STREAMICEbasalTracFile,
127 & STREAMICEvelOptimFile,
128 & STREAMICEtopogFile,
129 & STREAMICEhmaskFile,
130 & STREAMICEHBCxFile,
131 & STREAMICEHBCyFile,
132 & STREAMICEuFaceBdryFile,
133 & STREAMICEvFaceBdryFile,
134 & STREAMICEuDirichValsFile,
135 & STREAMICEvDirichValsFile,
136 & STREAMICEGlenConstFile,
137 & STREAMICEGlenConstConfig,
138 & STREAMICEcostMaskFile,
139 & STREAMICE_ADV_SCHEME
140
141 #ifdef ALLOW_PETSC
142 COMMON /PETSC_PARM_C/
143 & PETSC_SOLVER_TYPE,
144 & PETSC_PRECOND_TYPE
145 #endif
146
147 #ifdef ALLOW_STREAMICE_2DTRACER
148 COMMON /STREAMICE_TRAC2D_C/
149 & STREAMICETrac2DBCxFile,
150 & STREAMICETrac2DBCyFile,
151 & STREAMICETrac2DinitFile
152 #endif
153
154 C -------------------------- LOGICAL PARAMS ---------------------------------------------------
155
156 LOGICAL STREAMICEison
157 LOGICAL STREAMICE_dump_mdsio
158 LOGICAL STREAMICE_tave_mdsio
159 LOGICAL STREAMICE_dump_mnc
160 LOGICAL STREAMICE_tave_mnc
161 LOGICAL STREAMICE_GL_regularize, STREAMICE_move_front
162 LOGICAL STREAMICE_calve_to_mask
163 LOGICAL STREAMICE_construct_matrix
164 LOGICAL STREAMICE_lower_cg_tol
165 LOGICAL STREAMICE_diagnostic_only
166 LOGICAL STREAMICE_ppm_driving_stress
167 LOGICAL STREAMICE_h_ctrl_const_surf
168
169 C The following parameters specify periodic boundary conditions.
170 C For now this will completely override all other boundary conditions
171 C and apply to the entire boundary
172
173 LOGICAL STREAMICE_NS_periodic
174 LOGICAL STREAMICE_EW_periodic
175
176 C LOGICAL STREAMICE_hybrid_stress
177
178 COMMON /STREAMICE_PARM_L/
179 & STREAMICEison,
180 & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
181 & STREAMICE_dump_mnc, STREAMICE_tave_mnc,
182 & STREAMICE_GL_regularize, STREAMICE_move_front,
183 & STREAMICE_calve_to_mask,
184 & STREAMICE_construct_matrix,
185 & STREAMICE_lower_cg_tol,
186 & STREAMICE_NS_periodic, STREAMICE_EW_periodic,
187 & STREAMICE_diagnostic_only,
188 & STREAMICE_ppm_driving_stress,
189 & STREAMICE_h_ctrl_const_surf
190
191 C -------------------------- AND NOW ARRAYS ---------------------------------------------------
192
193 C EXPLANATION OF MASKS
194
195 C STREAMICE_hmask VALUES 1=ice-covered cell
196 C 2=partially ice-covered cell (no dynamics)
197 C 0=ice-free cell (for now, it means the cell
198 C is treated as an open-ocean cell
199 C that ice shelf can flow into)
200 C -1=outside computational domain; will not change
201 C
202 C STREAMICE_umask VALUES 1=degree of freedom;
203 C 0=homogeneous dirich condition
204 C 3=inhomogeneous dirich condition
205
206 C STREAMICE_vmask similar to umask
207
208 C STREAMICE_ufacemask VALUES -1=unset,
209 C 0=no-flow boundary,
210 C 1=no-stress bdry
211 C 2=stress bdry condition,
212 C 3=inhomogeneous dirichlet boundary,
213 C 4=flux boundary: at these faces a flux will be specified by u_flux_bdry_SI
214 C
215 C STREAMICE_vfacemask similar to ufacemask
216 C STREAMICE_ufacemask_bdry field initialized at the beginning of simulation
217 C specified all ufacemask values except for calving front
218 C CONSTANT FOR A SIMULATION (ie not changes after streamice_init_fixed)
219 C STREAMICE_vfacemask_bdry CONSTANT FOR A SIMULATION
220 C STREAMICE_calve_mask specified allowed extent of ice shelf
221 C (should be integer, but don't know howvi sre to read ints from file)
222 C not necessarily used, but CONSTANT FOR A SIMULATION
223 C STREAMICE_float_cond will only be used if partial floatation is implemented
224
225 C Short arrays (e.g. masks)
226 COMMON /STREAMICE_FIELDS_RS/
227 & STREAMICE_hmask,
228 & STREAMICE_umask,
229 & STREAMICE_vmask,
230 & STREAMICE_ufacemask,
231 & STREAMICE_vfacemask,
232 & STREAMICE_ufacemask_bdry,
233 & STREAMICE_vfacemask_bdry,
234 & STREAMICE_float_cond,
235 & STREAMICE_calve_mask,
236 & STREAMICE_ctrl_mask,
237 & STREAMICE_cost_mask
238 _RS STREAMICE_hmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
239 _RS STREAMICE_umask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
240 _RS STREAMICE_vmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
241 _RS STREAMICE_ufacemask
242 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
243 _RS STREAMICE_vfacemask
244 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
245 _RS STREAMICE_ufacemask_bdry
246 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
247 _RS STREAMICE_vfacemask_bdry
248 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
249 _RS STREAMICE_float_cond
250 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
251 _RS STREAMICE_calve_mask
252 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
253 _RS STREAMICE_ctrl_mask
254 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
255 _RS STREAMICE_cost_mask
256 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
257
258 C NOTES :
259 C STREAMICE_ufacemask_bdry, STREAMICE_vfacemask_bdry ARE CONSTANT (FIXED)
260 C STREAMICE_hmask IS PART OF **STATE**
261 C All other masks are updated within a timestep BASED ON STREAMICE_hmask
262
263 C Number of quadrature points are hardcoded.. could turn into a CPP macro
264
265 C REAL ARRAYS
266
267 COMMON /STREAMICE_FIELDS_RL/
268 & H_streamice,
269 & U_streamice,
270 & V_streamice,
271 & visc_streamice,
272 & tau_beta_eff_streamice,
273 & float_frac_streamice,
274 & base_el_streamice,
275 & surf_el_streamice,
276 & area_shelf_streamice,
277 & mass_ice_streamice,
278 & u_flux_bdry_SI,
279 & v_flux_bdry_SI,
280 & h_ubdry_values_SI,
281 & h_vbdry_values_SI,
282 & u_bdry_values_SI,
283 & v_bdry_values_SI,
284 & STREAMICE_dummy_array,
285 & C_basal_friction,
286 ! & A_glen,
287 & B_glen,
288 & BDOT_streamice, ADOT_streamice, ! mass balances in meters per year
289 & streamice_sigma_coord, streamice_delsigma,
290 & H_streamice_prev
291
292 #ifdef STREAMICE_HYBRID_STRESS
293 COMMON /STREAMICE_HYBRID/
294 & streamice_taubx, streamice_tauby,
295 & streamice_u_surf, streamice_v_surf,
296 & visc_streamice_full, streamice_omega, streamice_basal_geom,
297 & streamice_vert_shear_uz, streamice_vert_shear_vz
298 #endif
299
300 #ifdef ALLOW_STREAMICE_2DTRACER
301 COMMON /STREAMICE_TRAC2D_FIELDS_RL/
302 & trac2d_ubdry_values_SI,
303 & trac2d_vbdry_values_SI,
304 & trac2d
305 #ifdef STREAMICE_TRACER_AB
306 COMMON /STREAMICE_TRAC2D_AB_RL/
307 & GAD_trac_2d
308 #endif
309 #endif
310
311 #ifdef USE_ALT_RLOW
312 COMMON /STREAMICE_RLOW/
313 & R_low_si
314 #endif
315
316
317 _RL H_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
318 _RL U_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
319 _RL V_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
320 _RL visc_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
321 _RL tau_beta_eff_streamice(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
322 _RL float_frac_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
323 _RL surf_el_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
324 _RL base_el_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
325 _RL area_shelf_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
326 _RL mass_ice_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
327 _RL u_flux_bdry_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
328 _RL v_flux_bdry_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
329 _RL h_ubdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
330 _RL h_vbdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
331 _RL u_bdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
332 _RL v_bdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
333 _RL C_basal_friction (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
334 ! _RL A_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
335 _RL B_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
336 _RL streamice_sigma_coord (Nr)
337 _RL streamice_delsigma (Nr)
338
339 #ifdef USE_ALT_RLOW
340 _RL R_low_si (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
341 #endif
342
343 C The following arrays are used for the hybrid stress balance
344 #ifdef STREAMICE_HYBRID_STRESS
345 _RL streamice_taubx (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
346 _RL streamice_tauby (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
347 _RL streamice_u_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
348 _RL streamice_v_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
349 _RL streamice_omega (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
350 _RL streamice_basal_geom
351 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
352 _RL visc_streamice_full
353 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
354 _RL streamice_vert_shear_uz (Nr)
355 _RL streamice_vert_shear_vz (Nr)
356 #endif
357
358 #ifdef ALLOW_STREAMICE_2DTRACER
359 _RL trac2d_ubdry_values_SI
360 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
361 _RL trac2d_vbdry_values_SI
362 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
363 _RL trac2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
364 #ifdef STREAMICE_TRACER_AB
365 _RL GAD_trac_2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
366 #endif
367 #endif
368
369 _RL ADOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
370 !! IMPORTANT: MELT RATE IN METERS PER YEAR
371 !! POSITIVE WHERE MELTING
372 _RL BDOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
373 _RL H_streamice_prev (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
374 _RL STREAMICE_dummy_array (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
375
376
377
378 COMMON /STREAMICE_COST_RL/
379 & cost_func1_streamice
380 _RL cost_func1_streamice(nSx,nSy)
381
382 C NOTES :
383 C REAL ARRAYS THAT COMPRISE "STATE":
384 C H_streamice,
385 C U_streamice,
386 C V_streamice,
387 C visc_streamice,
388 C tau_beta_eff_streamice,
389 C area_shelf_streamice
390 C (and don't forget STREAMICE_hmask)
391 C
392 C visc & tau are now calculated based on U,V in streamice_vel_solve
393 C but with Hybdrid stress formulation they will become part of
394 C velocity initial guess, so they are kept
395
396 #ifdef ALLOW_PETSC
397 COMMON /STREAMICE_PETSC_DOFS_COMMON/
398 & streamice_petsc_dofs_u,
399 & streamice_petsc_dofs_v,
400 & n_dofs_process
401 _RS streamice_petsc_dofs_u
402 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
403 _RS streamice_petsc_dofs_v
404 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
405 INTEGER n_dofs_process (0:nPx*nPy-1)
406 #endif
407
408
409 #endif /* ALLOW_STREAMICE */
410
411 CEH3 ;;; Local Variables: ***
412 CEH3 ;;; mode:fortran ***
413 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22