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

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

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

revision 1.1 by heimbach, Thu Mar 29 15:59:20 2012 UTC revision 1.24 by dgoldberg, Wed Jun 12 21:16:25 2013 UTC
# Line 1  Line 1 
1  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1--+-+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
2    
3  #ifdef ALLOW_STREAMICE  #ifdef ALLOW_STREAMICE
4    
# Line 6  C     -------------------------- REAL PA Line 6  C     -------------------------- REAL PA
6    
7        COMMON /STREAMICE_PARMS_R/        COMMON /STREAMICE_PARMS_R/
8       & streamice_density, streamice_density_ocean_avg,       & streamice_density, streamice_density_ocean_avg,
9       & A_glen_isothermal, n_glen, eps_glen_min,  !     & 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,       & C_basal_fric_const, n_basal_friction, streamice_input_flux_unif,
12       & streamice_vel_update, streamice_cg_tol, streamice_nonlin_tol,       & streamice_vel_update, streamice_cg_tol, streamice_nonlin_tol,
13       & streamice_CFL_factor       & 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         & streamice_adot_uniform
23        _RL streamice_density, streamice_density_ocean_avg        _RL streamice_density, streamice_density_ocean_avg
24        _RL A_glen_isothermal, n_glen, eps_glen_min  !      _RL A_glen_isothermal, n_glen, eps_glen_min, eps_u_min
25          _RL B_glen_isothermal, n_glen, eps_glen_min, eps_u_min
26        _RL C_basal_fric_const        _RL C_basal_fric_const
27        _RL n_basal_friction        _RL n_basal_friction
28        _RL streamice_input_flux_unif        _RL streamice_input_flux_unif
29        _RL streamice_vel_update        _RL streamice_vel_update
30        _RL streamice_cg_tol, streamice_nonlin_tol        _RL streamice_cg_tol, streamice_nonlin_tol
31          _RL streamice_nonlin_tol_fp
32        _RL streamice_CFL_factor        _RL streamice_CFL_factor
33          _RL streamice_adjDump
34          _RL streamice_bg_surf_slope_x, streamice_bg_surf_slope_y
35          _RL streamice_kx_b_init, streamice_ky_b_init
36          _RL streamice_wgt_drift, streamice_wgt_surf
37          _RL streamice_wgt_avthick, streamice_wgt_vel
38          _RL streamice_wgt_tikh
39          _RL streamice_addl_backstress
40          _RL streamice_smooth_gl_width
41          _RL streamice_adot_uniform
42          
43                
44  C     parms for parameterized initial thickness  C     parms for parameterized initial thickness
45  C     SHELF_MAX_DRAFT: max thickness of ice in m  C     SHELF_MAX_DRAFT: max thickness of ice in m
# Line 44  C     FLOW_DIR: 1.0=west, 2.0=east, 3.0= Line 66  C     FLOW_DIR: 1.0=west, 2.0=east, 3.0=
66    
67  C     -------------------------- INT PARAMS ---------------------------------------------------  C     -------------------------- INT PARAMS ---------------------------------------------------
68    
69          INTEGER streamice_max_nl
70          PARAMETER ( streamice_max_nl = 100 )
71    
72        COMMON /STREAMICE_PARMS_I/        COMMON /STREAMICE_PARMS_I/
73       &     streamice_max_cg_iter, streamice_max_nl_iter,       &     streamice_max_cg_iter, streamice_max_nl_iter,
74       &     streamice_vel_upd_counter, streamice_nstep_velocity,       &     streamice_vel_upd_counter, streamice_nstep_velocity,
# Line 57  C     -------------------------- CHAR PA Line 82  C     -------------------------- CHAR PA
82        CHARACTER*(MAX_LEN_FNAM) STREAMICEthickFile        CHARACTER*(MAX_LEN_FNAM) STREAMICEthickFile
83        CHARACTER*(MAX_LEN_FNAM) STREAMICEthickInit        CHARACTER*(MAX_LEN_FNAM) STREAMICEthickInit
84        CHARACTER*(MAX_LEN_FNAM) STREAMICEcalveMaskFile        CHARACTER*(MAX_LEN_FNAM) STREAMICEcalveMaskFile
85          CHARACTER*(MAX_LEN_FNAM) STREAMICEsigcoordInit
86          CHARACTER*(MAX_LEN_FNAM) STREAMICEsigcoordFile
87          CHARACTER*(MAX_LEN_FNAM) STREAMICEdelsigFile
88          CHARACTER*(MAX_LEN_FNAM) STREAMICEbasalTracConfig
89          CHARACTER*(MAX_LEN_FNAM) STREAMICEGlenConstConfig
90          CHARACTER*(MAX_LEN_FNAM) STREAMICEbasalTracFile
91          CHARACTER*(MAX_LEN_FNAM) STREAMICEGlenConstFile
92          CHARACTER*(MAX_LEN_FNAM) STREAMICEvelOptimFile
93          CHARACTER*(MAX_LEN_FNAM) STREAMICEtopogFile
94          CHARACTER*(MAX_LEN_FNAM) STREAMICEcostMaskFile
95          CHARACTER*(MAX_LEN_FNAM) STREAMICE_ADV_SCHEME
96          
97    !     THE FOLLOWING FILENAMES ARE FOR SPECIFYING IRREGULAR DOMAIN GEOMETRIES
98    !     (i.e. boundaries that do not conform with rectangular walls)
99          CHARACTER*(MAX_LEN_FNAM) STREAMICEhmaskFile
100          CHARACTER*(MAX_LEN_FNAM) STREAMICEHBCxFile
101          CHARACTER*(MAX_LEN_FNAM) STREAMICEHBCyFile
102          CHARACTER*(MAX_LEN_FNAM) STREAMICEuFaceBdryFile
103          CHARACTER*(MAX_LEN_FNAM) STREAMICEvFaceBdryFile
104          CHARACTER*(MAX_LEN_FNAM) STREAMICEuDirichValsFile
105          CHARACTER*(MAX_LEN_FNAM) STREAMICEvDirichValsFile
106    
107    #ifdef ALLOW_PETSC
108    !     CHARACTER PARAMS FOR PETSC
109          CHARACTER*(MAX_LEN_FNAM) PETSC_SOLVER_TYPE
110          CHARACTER*(MAX_LEN_FNAM) PETSC_PRECOND_TYPE
111    #endif
112        
113    #ifdef ALLOW_STREAMICE_2DTRACER
114    !     CHARACTER PARAMS FOR TRACER
115          CHARACTER*(MAX_LEN_FNAM) STREAMICETrac2DBCxFile
116          CHARACTER*(MAX_LEN_FNAM) STREAMICETrac2DBCyFile
117          CHARACTER*(MAX_LEN_FNAM) STREAMICETrac2DinitFile
118    #endif
119        
120        COMMON /STREAMICE_PARM_C/        COMMON /STREAMICE_PARM_C/
121       &     STREAMICEthickInit,       &     STREAMICEthickInit,
122       &     STREAMICEthickFile,       &     STREAMICEthickFile,
123       &     STREAMICEcalveMaskFile       &     STREAMICEcalveMaskFile,
124         &     STREAMICEsigcoordInit,
125         &     STREAMICEsigcoordFile,
126         &     STREAMICEdelsigFile,
127         &     STREAMICEbasalTracConfig,
128         &     STREAMICEbasalTracFile,
129         &     STREAMICEvelOptimFile,
130         &     STREAMICEtopogFile,
131         &     STREAMICEhmaskFile,
132         &     STREAMICEHBCxFile,
133         &     STREAMICEHBCyFile,
134         &     STREAMICEuFaceBdryFile,
135         &     STREAMICEvFaceBdryFile,
136         &     STREAMICEuDirichValsFile,
137         &     STREAMICEvDirichValsFile,
138         &     STREAMICEGlenConstFile,
139         &     STREAMICEGlenConstConfig,
140         &     STREAMICEcostMaskFile,
141         &     STREAMICE_ADV_SCHEME
142    
143    #ifdef ALLOW_PETSC
144          COMMON /PETSC_PARM_C/
145         &     PETSC_SOLVER_TYPE,
146         &     PETSC_PRECOND_TYPE
147    #endif
148    
149    #ifdef ALLOW_STREAMICE_2DTRACER
150          COMMON /STREAMICE_TRAC2D_C/
151         &     STREAMICETrac2DBCxFile,
152         &     STREAMICETrac2DBCyFile,
153         &     STREAMICETrac2DinitFile
154    #endif
155            
156  C     -------------------------- LOGICAL PARAMS ---------------------------------------------------  C     -------------------------- LOGICAL PARAMS ---------------------------------------------------
157    
# Line 73  C     -------------------------- LOGICAL Line 164  C     -------------------------- LOGICAL
164        LOGICAL STREAMICE_calve_to_mask        LOGICAL STREAMICE_calve_to_mask
165        LOGICAL STREAMICE_construct_matrix        LOGICAL STREAMICE_construct_matrix
166        LOGICAL STREAMICE_lower_cg_tol        LOGICAL STREAMICE_lower_cg_tol
167          LOGICAL STREAMICE_diagnostic_only
168          LOGICAL STREAMICE_ppm_driving_stress
169          LOGICAL STREAMICE_h_ctrl_const_surf
170          
171    C     The following parameters specify periodic boundary conditions.
172    C     For now this will completely override all other boundary conditions
173    C     and apply to the entire boundary
174    
175          LOGICAL STREAMICE_NS_periodic
176          LOGICAL STREAMICE_EW_periodic
177          
178    C      LOGICAL STREAMICE_hybrid_stress
179          
180        COMMON /STREAMICE_PARM_L/        COMMON /STREAMICE_PARM_L/
181       & STREAMICEison,       & STREAMICEison,
182       & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,       & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
# Line 80  C     -------------------------- LOGICAL Line 184  C     -------------------------- LOGICAL
184       & STREAMICE_GL_regularize, STREAMICE_move_front,       & STREAMICE_GL_regularize, STREAMICE_move_front,
185       & STREAMICE_calve_to_mask,       & STREAMICE_calve_to_mask,
186       & STREAMICE_construct_matrix,       & STREAMICE_construct_matrix,
187       & STREAMICE_lower_cg_tol       & STREAMICE_lower_cg_tol,
188         & STREAMICE_NS_periodic, STREAMICE_EW_periodic,
189         & STREAMICE_diagnostic_only,
190         & STREAMICE_ppm_driving_stress,
191         & STREAMICE_h_ctrl_const_surf
192    
193  C     -------------------------- AND NOW ARRAYS ---------------------------------------------------  C     -------------------------- AND NOW ARRAYS ---------------------------------------------------
194    
195  C     EXPLANATION OF MASKS  C     EXPLANATION OF MASKS
196    
197  C     STREAMICE_hmask           VALUES  1=ice-covered cell  C     STREAMICE_hmask           VALUES  1=ice-covered cell
198  C                                       2=partially ice-covered cell (no dynamics)  C                                       2=partially ice-covered cell (no dynamics)
199  C                                       0=ice-free cell (for now, it means the cell  C                                       0=ice-free cell (for now, it means the cell
200  C                                                           is treated as an open-ocean cell  C                                                           is treated as an open-ocean cell
# Line 126  C     Short arrays (e.g. masks) Line 234  C     Short arrays (e.g. masks)
234       &     STREAMICE_ufacemask_bdry,       &     STREAMICE_ufacemask_bdry,
235       &     STREAMICE_vfacemask_bdry,       &     STREAMICE_vfacemask_bdry,
236       &     STREAMICE_float_cond,       &     STREAMICE_float_cond,
237       &     STREAMICE_calve_mask       &     STREAMICE_calve_mask,
238         &     STREAMICE_ctrl_mask,
239         &     STREAMICE_cost_mask
240        _RS STREAMICE_hmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS STREAMICE_hmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
241        _RS STREAMICE_umask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS STREAMICE_umask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
242        _RS STREAMICE_vmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS STREAMICE_vmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
# Line 142  C     Short arrays (e.g. masks) Line 252  C     Short arrays (e.g. masks)
252       &  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)       &  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
253        _RS STREAMICE_calve_mask        _RS STREAMICE_calve_mask
254       & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)       & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
255          _RS STREAMICE_ctrl_mask
256         & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
257          _RS STREAMICE_cost_mask
258         & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
259            
260  C    NOTES :  C    NOTES :
261  C     STREAMICE_ufacemask_bdry, STREAMICE_vfacemask_bdry ARE CONSTANT (FIXED)  C     STREAMICE_ufacemask_bdry, STREAMICE_vfacemask_bdry ARE CONSTANT (FIXED)
# Line 165  C    REAL ARRAYS Line 279  C    REAL ARRAYS
279       &     mass_ice_streamice,       &     mass_ice_streamice,
280       &     u_flux_bdry_SI,       &     u_flux_bdry_SI,
281       &     v_flux_bdry_SI,       &     v_flux_bdry_SI,
282       &     h_bdry_values_SI,       &     h_ubdry_values_SI,
283         &     h_vbdry_values_SI,
284       &     u_bdry_values_SI,       &     u_bdry_values_SI,
285       &     v_bdry_values_SI,       &     v_bdry_values_SI,
286       &     STREAMICE_dummy_array,       &     STREAMICE_dummy_array,
287       &     C_basal_friction       &     C_basal_friction,
288    !     &     A_glen,
289         &     B_glen,
290         &     BDOT_streamice, ADOT_streamice,  ! mass balances in meters per year
291         &     streamice_sigma_coord, streamice_delsigma,
292         &     H_streamice_prev
293    
294    #ifdef STREAMICE_HYBRID_STRESS
295          COMMON /STREAMICE_HYBRID/
296         &     streamice_taubx, streamice_tauby,
297         &     streamice_u_surf, streamice_v_surf,
298         &     visc_streamice_full, streamice_omega, streamice_basal_geom,
299         &     streamice_vert_shear_uz, streamice_vert_shear_vz    
300    #endif
301    
302    #ifdef ALLOW_STREAMICE_2DTRACER
303          COMMON /STREAMICE_TRAC2D_FIELDS_RL/
304         &     trac2d_ubdry_values_SI,
305         &     trac2d_vbdry_values_SI,
306         &     trac2d
307    #ifdef STREAMICE_TRACER_AB
308          COMMON /STREAMICE_TRAC2D_AB_RL/
309         &     GAD_trac_2d
310    #endif
311    #endif
312    
313    #ifdef USE_ALT_RLOW
314          COMMON /STREAMICE_RLOW/
315         &     R_low_si
316    #endif
317    
318    
319        _RL H_streamice           (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL H_streamice           (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
320        _RL U_streamice           (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL U_streamice           (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
321        _RL V_streamice           (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL V_streamice           (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
# Line 182  C    REAL ARRAYS Line 328  C    REAL ARRAYS
328        _RL mass_ice_streamice    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL mass_ice_streamice    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
329        _RL u_flux_bdry_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL u_flux_bdry_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
330        _RL v_flux_bdry_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL v_flux_bdry_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
331        _RL h_bdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL h_ubdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
332          _RL h_vbdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
333        _RL u_bdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL u_bdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
334        _RL v_bdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL v_bdry_values_SI    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
335        _RL C_basal_friction    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL C_basal_friction    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
336    !      _RL A_glen    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
337          _RL B_glen    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
338          _RL streamice_sigma_coord (Nr)
339          _RL streamice_delsigma (Nr)      
340    
341    #ifdef USE_ALT_RLOW
342          _RL R_low_si    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
343    #endif
344    
345    C     The following arrays are used for the hybrid stress balance            
346    #ifdef STREAMICE_HYBRID_STRESS      
347          _RL streamice_taubx (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
348          _RL streamice_tauby (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
349          _RL streamice_u_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
350          _RL streamice_v_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
351          _RL streamice_omega (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
352          _RL streamice_basal_geom
353         & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
354          _RL visc_streamice_full
355         & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
356          _RL streamice_vert_shear_uz (Nr)
357          _RL streamice_vert_shear_vz (Nr)
358    #endif      
359        
360    #ifdef ALLOW_STREAMICE_2DTRACER
361          _RL trac2d_ubdry_values_SI
362         &   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
363          _RL trac2d_vbdry_values_SI
364         &   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
365          _RL trac2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
366    #ifdef STREAMICE_TRACER_AB
367          _RL GAD_trac_2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
368    #endif
369    #endif
370                
371          _RL ADOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
372    !! IMPORTANT: MELT RATE IN METERS PER YEAR
373    !! POSITIVE WHERE MELTING
374          _RL BDOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
375          _RL H_streamice_prev (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
376        _RL STREAMICE_dummy_array (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL STREAMICE_dummy_array (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
377                
378          
379              
380          COMMON /STREAMICE_COST_RL/
381         &       cost_func1_streamice
382          _RL cost_func1_streamice(nSx,nSy)
383          
384  C    NOTES :  C    NOTES :
385  C      REAL ARRAYS THAT COMPRISE "STATE":  C      REAL ARRAYS THAT COMPRISE "STATE":
386  C       H_streamice,  C       H_streamice,
# Line 202  C Line 394  C
394  C       visc & tau are now calculated based on U,V in streamice_vel_solve  C       visc & tau are now calculated based on U,V in streamice_vel_solve
395  C        but with Hybdrid stress formulation they will become part of  C        but with Hybdrid stress formulation they will become part of
396  C        velocity initial guess, so they are kept  C        velocity initial guess, so they are kept
397    
398    #ifdef ALLOW_PETSC
399          COMMON /STREAMICE_PETSC_DOFS_COMMON/
400         &      streamice_petsc_dofs_u,
401         &      streamice_petsc_dofs_v,
402         &      n_dofs_process
403          _RS streamice_petsc_dofs_u
404         & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
405          _RS streamice_petsc_dofs_v
406         & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
407          INTEGER n_dofs_process (0:nPx*nPy-1)
408    #endif
409                
410                
411  #endif /* ALLOW_STREAMICE */  #endif /* ALLOW_STREAMICE */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.22