/[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.20 - (show annotations) (download)
Sat Apr 6 17:43:41 2013 UTC (12 years, 3 months ago) by dgoldberg
Branch: MAIN
Changes since 1.19: +20 -0 lines
File MIME type: text/plain
use PETSc solver for matrix

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
94 ! THE FOLLOWING FILENAMES ARE FOR SPECIFYING IRREGULAR DOMAIN GEOMETRIES
95 ! (i.e. boundaries that do not conform with rectangular walls)
96 CHARACTER*(MAX_LEN_FNAM) STREAMICEhmaskFile
97 CHARACTER*(MAX_LEN_FNAM) STREAMICEuFaceBdryFile
98 CHARACTER*(MAX_LEN_FNAM) STREAMICEvFaceBdryFile
99 CHARACTER*(MAX_LEN_FNAM) STREAMICEuDirichValsFile
100 CHARACTER*(MAX_LEN_FNAM) STREAMICEvDirichValsFile
101
102 ! CHARACTER PARAMS FOR PETSC
103 CHARACTER*(MAX_LEN_FNAM) PETSC_SOLVER_TYPE
104 CHARACTER*(MAX_LEN_FNAM) PETSC_PRECOND_TYPE
105
106
107 COMMON /STREAMICE_PARM_C/
108 & STREAMICEthickInit,
109 & STREAMICEthickFile,
110 & STREAMICEcalveMaskFile,
111 & STREAMICEsigcoordInit,
112 & STREAMICEsigcoordFile,
113 & STREAMICEdelsigFile,
114 & STREAMICEbasalTracConfig,
115 & STREAMICEbasalTracFile,
116 & STREAMICEvelOptimFile,
117 & STREAMICEtopogFile,
118 & STREAMICEhmaskFile,
119 & STREAMICEuFaceBdryFile,
120 & STREAMICEvFaceBdryFile,
121 & STREAMICEuDirichValsFile,
122 & STREAMICEvDirichValsFile,
123 & STREAMICEGlenConstFile,
124 & STREAMICEGlenConstConfig,
125 & STREAMICEcostMaskFile
126
127 COMMON /PETSC_PARM_C/
128 & PETSC_SOLVER_TYPE,
129 & PETSC_PRECOND_TYPE
130
131 C -------------------------- LOGICAL PARAMS ---------------------------------------------------
132
133 LOGICAL STREAMICEison
134 LOGICAL STREAMICE_dump_mdsio
135 LOGICAL STREAMICE_tave_mdsio
136 LOGICAL STREAMICE_dump_mnc
137 LOGICAL STREAMICE_tave_mnc
138 LOGICAL STREAMICE_GL_regularize, STREAMICE_move_front
139 LOGICAL STREAMICE_calve_to_mask
140 LOGICAL STREAMICE_construct_matrix
141 LOGICAL STREAMICE_lower_cg_tol
142 LOGICAL STREAMICE_diagnostic_only
143 LOGICAL STREAMICE_ppm_driving_stress
144 LOGICAL STREAMICE_h_ctrl_const_surf
145
146 C The following parameters specify periodic boundary conditions.
147 C For now this will completely override all other boundary conditions
148 C and apply to the entire boundary
149
150 LOGICAL STREAMICE_NS_periodic
151 LOGICAL STREAMICE_EW_periodic
152
153 C LOGICAL STREAMICE_hybrid_stress
154
155 COMMON /STREAMICE_PARM_L/
156 & STREAMICEison,
157 & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
158 & STREAMICE_dump_mnc, STREAMICE_tave_mnc,
159 & STREAMICE_GL_regularize, STREAMICE_move_front,
160 & STREAMICE_calve_to_mask,
161 & STREAMICE_construct_matrix,
162 & STREAMICE_lower_cg_tol,
163 & STREAMICE_NS_periodic, STREAMICE_EW_periodic,
164 & STREAMICE_diagnostic_only,
165 & STREAMICE_ppm_driving_stress,
166 & STREAMICE_h_ctrl_const_surf
167
168 C -------------------------- AND NOW ARRAYS ---------------------------------------------------
169
170 C EXPLANATION OF MASKS
171
172 C STREAMICE_hmask VALUES 1=ice-covered cell
173 C 2=partially ice-covered cell (no dynamics)
174 C 0=ice-free cell (for now, it means the cell
175 C is treated as an open-ocean cell
176 C that ice shelf can flow into)
177 C -1=outside computational domain; will not change
178 C
179 C STREAMICE_umask VALUES 1=degree of freedom;
180 C 0=homogeneous dirich condition
181 C 3=inhomogeneous dirich condition
182
183 C STREAMICE_vmask similar to umask
184
185 C STREAMICE_ufacemask VALUES -1=unset,
186 C 0=no-flow boundary,
187 C 1=no-stress bdry
188 C 2=stress bdry condition,
189 C 3=inhomogeneous dirichlet boundary,
190 C 4=flux boundary: at these faces a flux will be specified by u_flux_bdry_SI
191 C
192 C STREAMICE_vfacemask similar to ufacemask
193 C STREAMICE_ufacemask_bdry field initialized at the beginning of simulation
194 C specified all ufacemask values except for calving front
195 C CONSTANT FOR A SIMULATION (ie not changes after streamice_init_fixed)
196 C STREAMICE_vfacemask_bdry CONSTANT FOR A SIMULATION
197 C STREAMICE_calve_mask specified allowed extent of ice shelf
198 C (should be integer, but don't know howvi sre to read ints from file)
199 C not necessarily used, but CONSTANT FOR A SIMULATION
200 C STREAMICE_float_cond will only be used if partial floatation is implemented
201
202 C Short arrays (e.g. masks)
203 COMMON /STREAMICE_FIELDS_RS/
204 & STREAMICE_hmask,
205 & STREAMICE_umask,
206 & STREAMICE_vmask,
207 & STREAMICE_ufacemask,
208 & STREAMICE_vfacemask,
209 & STREAMICE_ufacemask_bdry,
210 & STREAMICE_vfacemask_bdry,
211 & STREAMICE_float_cond,
212 & STREAMICE_calve_mask,
213 & STREAMICE_ctrl_mask,
214 & STREAMICE_cost_mask
215 _RS STREAMICE_hmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
216 _RS STREAMICE_umask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
217 _RS STREAMICE_vmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
218 _RS STREAMICE_ufacemask
219 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
220 _RS STREAMICE_vfacemask
221 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
222 _RS STREAMICE_ufacemask_bdry
223 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
224 _RS STREAMICE_vfacemask_bdry
225 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
226 _RS STREAMICE_float_cond
227 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
228 _RS STREAMICE_calve_mask
229 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
230 _RS STREAMICE_ctrl_mask
231 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
232 _RS STREAMICE_cost_mask
233 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
234
235 C NOTES :
236 C STREAMICE_ufacemask_bdry, STREAMICE_vfacemask_bdry ARE CONSTANT (FIXED)
237 C STREAMICE_hmask IS PART OF **STATE**
238 C All other masks are updated within a timestep BASED ON STREAMICE_hmask
239
240 C Number of quadrature points are hardcoded.. could turn into a CPP macro
241
242 C REAL ARRAYS
243
244 COMMON /STREAMICE_FIELDS_RL/
245 & H_streamice,
246 & U_streamice,
247 & V_streamice,
248 & visc_streamice,
249 & tau_beta_eff_streamice,
250 & float_frac_streamice,
251 & base_el_streamice,
252 & surf_el_streamice,
253 & area_shelf_streamice,
254 & mass_ice_streamice,
255 & u_flux_bdry_SI,
256 & v_flux_bdry_SI,
257 & h_bdry_values_SI,
258 & u_bdry_values_SI,
259 & v_bdry_values_SI,
260 & STREAMICE_dummy_array,
261 & C_basal_friction,
262 ! & A_glen,
263 & B_glen,
264 & BDOT_streamice, ADOT_streamice, ! mass balances in meters per year
265 & streamice_sigma_coord, streamice_delsigma,
266 & H_streamice_prev
267
268 #ifdef STREAMICE_HYBRID_STRESS
269 COMMON /STREAMICE_HYBRID/
270 & streamice_taubx, streamice_tauby,
271 & streamice_u_surf, streamice_v_surf,
272 & visc_streamice_full, streamice_omega, streamice_basal_geom,
273 & streamice_vert_shear_uz, streamice_vert_shear_vz
274 #endif
275
276 #ifdef USE_ALT_RLOW
277 COMMON /STREAMICE_RLOW/
278 & R_low_si
279 #endif
280
281
282 _RL H_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
283 _RL U_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
284 _RL V_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
285 _RL visc_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
286 _RL tau_beta_eff_streamice(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
287 _RL float_frac_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
288 _RL surf_el_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
289 _RL base_el_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
290 _RL area_shelf_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
291 _RL mass_ice_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
292 _RL u_flux_bdry_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
293 _RL v_flux_bdry_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
294 _RL h_bdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
295 _RL u_bdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
296 _RL v_bdry_values_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
297 _RL C_basal_friction (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
298 ! _RL A_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
299 _RL B_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
300 _RL streamice_sigma_coord (Nr)
301 _RL streamice_delsigma (Nr)
302
303 #ifdef USE_ALT_RLOW
304 _RL R_low_si (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
305 #endif
306
307 C The following arrays are used for the hybrid stress balance
308 #ifdef STREAMICE_HYBRID_STRESS
309 _RL streamice_taubx (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
310 _RL streamice_tauby (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
311 _RL streamice_u_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
312 _RL streamice_v_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
313 _RL streamice_omega (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
314 _RL streamice_basal_geom
315 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
316 _RL visc_streamice_full
317 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
318 _RL streamice_vert_shear_uz (Nr)
319 _RL streamice_vert_shear_vz (Nr)
320 #endif
321
322
323 _RL ADOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
324 !! IMPORTANT: MELT RATE IN METERS PER YEAR
325 !! POSITIVE WHERE MELTING
326 _RL BDOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
327 _RL H_streamice_prev (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
328 _RL STREAMICE_dummy_array (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
329
330
331
332 COMMON /STREAMICE_COST_RL/
333 & cost_func1_streamice
334 _RL cost_func1_streamice(nSx,nSy)
335
336 C NOTES :
337 C REAL ARRAYS THAT COMPRISE "STATE":
338 C H_streamice,
339 C U_streamice,
340 C V_streamice,
341 C visc_streamice,
342 C tau_beta_eff_streamice,
343 C area_shelf_streamice
344 C (and don't forget STREAMICE_hmask)
345 C
346 C visc & tau are now calculated based on U,V in streamice_vel_solve
347 C but with Hybdrid stress formulation they will become part of
348 C velocity initial guess, so they are kept
349
350 #ifdef ALLOW_PETSC
351 COMMON /STREAMICE_PETSC_DOFS_COMMON/
352 & streamice_petsc_dofs_u,
353 & streamice_petsc_dofs_v,
354 & n_dofs_process
355 _RS streamice_petsc_dofs_u
356 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
357 _RS streamice_petsc_dofs_v
358 & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
359 INTEGER n_dofs_process (0:nPx*nPy-1)
360 #endif
361
362
363 #endif /* ALLOW_STREAMICE */
364
365 CEH3 ;;; Local Variables: ***
366 CEH3 ;;; mode:fortran ***
367 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22