--- MITgcm_contrib/dgoldberg/streamice/STREAMICE.h 2012/07/27 21:07:13 1.4 +++ MITgcm_contrib/dgoldberg/streamice/STREAMICE.h 2013/05/23 22:12:33 1.21 @@ -1,4 +1,4 @@ -C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| +C---+----1--+-+----2----+----3----+----4----+----5----+----6----+----7-|--+----| #ifdef ALLOW_STREAMICE @@ -6,19 +6,38 @@ COMMON /STREAMICE_PARMS_R/ & streamice_density, streamice_density_ocean_avg, - & A_glen_isothermal, n_glen, eps_glen_min, +! & A_glen_isothermal, n_glen, eps_glen_min, eps_u_min, + & B_glen_isothermal, n_glen, eps_glen_min, eps_u_min, & C_basal_fric_const, n_basal_friction, streamice_input_flux_unif, & streamice_vel_update, streamice_cg_tol, streamice_nonlin_tol, - & streamice_CFL_factor, streamice_adjDump + & streamice_nonlin_tol_fp, + & streamice_CFL_factor, streamice_adjDump, + & streamice_bg_surf_slope_x, streamice_bg_surf_slope_y, + & streamice_kx_b_init, streamice_ky_b_init, + & streamice_wgt_drift, streamice_wgt_surf, + & streamice_wgt_avthick, streamice_wgt_vel, + & streamice_wgt_tikh, + & streamice_addl_backstress, + & streamice_smooth_gl_width _RL streamice_density, streamice_density_ocean_avg - _RL A_glen_isothermal, n_glen, eps_glen_min +! _RL A_glen_isothermal, n_glen, eps_glen_min, eps_u_min + _RL B_glen_isothermal, n_glen, eps_glen_min, eps_u_min _RL C_basal_fric_const _RL n_basal_friction _RL streamice_input_flux_unif _RL streamice_vel_update _RL streamice_cg_tol, streamice_nonlin_tol + _RL streamice_nonlin_tol_fp _RL streamice_CFL_factor _RL streamice_adjDump + _RL streamice_bg_surf_slope_x, streamice_bg_surf_slope_y + _RL streamice_kx_b_init, streamice_ky_b_init + _RL streamice_wgt_drift, streamice_wgt_surf + _RL streamice_wgt_avthick, streamice_wgt_vel + _RL streamice_wgt_tikh + _RL streamice_addl_backstress + _RL streamice_smooth_gl_width + C parms for parameterized initial thickness C SHELF_MAX_DRAFT: max thickness of ice in m @@ -61,10 +80,57 @@ CHARACTER*(MAX_LEN_FNAM) STREAMICEthickFile CHARACTER*(MAX_LEN_FNAM) STREAMICEthickInit CHARACTER*(MAX_LEN_FNAM) STREAMICEcalveMaskFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEsigcoordInit + CHARACTER*(MAX_LEN_FNAM) STREAMICEsigcoordFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEdelsigFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEbasalTracConfig + CHARACTER*(MAX_LEN_FNAM) STREAMICEGlenConstConfig + CHARACTER*(MAX_LEN_FNAM) STREAMICEBdotConfig + CHARACTER*(MAX_LEN_FNAM) STREAMICEbasalTracFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEGlenConstFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEBdotFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEvelOptimFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEtopogFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEcostMaskFile + +! THE FOLLOWING FILENAMES ARE FOR SPECIFYING IRREGULAR DOMAIN GEOMETRIES +! (i.e. boundaries that do not conform with rectangular walls) + CHARACTER*(MAX_LEN_FNAM) STREAMICEhmaskFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEuFaceBdryFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEvFaceBdryFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEuDirichValsFile + CHARACTER*(MAX_LEN_FNAM) STREAMICEvDirichValsFile + +! CHARACTER PARAMS FOR PETSC + CHARACTER*(MAX_LEN_FNAM) PETSC_SOLVER_TYPE + CHARACTER*(MAX_LEN_FNAM) PETSC_PRECOND_TYPE + + COMMON /STREAMICE_PARM_C/ & STREAMICEthickInit, & STREAMICEthickFile, - & STREAMICEcalveMaskFile + & STREAMICEcalveMaskFile, + & STREAMICEsigcoordInit, + & STREAMICEsigcoordFile, + & STREAMICEdelsigFile, + & STREAMICEbasalTracConfig, + & STREAMICEbasalTracFile, + & STREAMICEvelOptimFile, + & STREAMICEtopogFile, + & STREAMICEhmaskFile, + & STREAMICEuFaceBdryFile, + & STREAMICEvFaceBdryFile, + & STREAMICEuDirichValsFile, + & STREAMICEvDirichValsFile, + & STREAMICEGlenConstFile, + & STREAMICEGlenConstConfig, + & STREAMICEBdotFile, + & STREAMICEBdotConfig, + & STREAMICEcostMaskFile + + COMMON /PETSC_PARM_C/ + & PETSC_SOLVER_TYPE, + & PETSC_PRECOND_TYPE C -------------------------- LOGICAL PARAMS --------------------------------------------------- @@ -77,6 +143,19 @@ LOGICAL STREAMICE_calve_to_mask LOGICAL STREAMICE_construct_matrix LOGICAL STREAMICE_lower_cg_tol + LOGICAL STREAMICE_diagnostic_only + LOGICAL STREAMICE_ppm_driving_stress + LOGICAL STREAMICE_h_ctrl_const_surf + +C The following parameters specify periodic boundary conditions. +C For now this will completely override all other boundary conditions +C and apply to the entire boundary + + LOGICAL STREAMICE_NS_periodic + LOGICAL STREAMICE_EW_periodic + +C LOGICAL STREAMICE_hybrid_stress + COMMON /STREAMICE_PARM_L/ & STREAMICEison, & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio, @@ -84,7 +163,11 @@ & STREAMICE_GL_regularize, STREAMICE_move_front, & STREAMICE_calve_to_mask, & STREAMICE_construct_matrix, - & STREAMICE_lower_cg_tol + & STREAMICE_lower_cg_tol, + & STREAMICE_NS_periodic, STREAMICE_EW_periodic, + & STREAMICE_diagnostic_only, + & STREAMICE_ppm_driving_stress, + & STREAMICE_h_ctrl_const_surf C -------------------------- AND NOW ARRAYS --------------------------------------------------- @@ -130,7 +213,9 @@ & STREAMICE_ufacemask_bdry, & STREAMICE_vfacemask_bdry, & STREAMICE_float_cond, - & STREAMICE_calve_mask + & STREAMICE_calve_mask, + & STREAMICE_ctrl_mask, + & STREAMICE_cost_mask _RS STREAMICE_hmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RS STREAMICE_umask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RS STREAMICE_vmask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) @@ -146,6 +231,10 @@ & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RS STREAMICE_calve_mask & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RS STREAMICE_ctrl_mask + & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) + _RS STREAMICE_cost_mask + & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) C NOTES : C STREAMICE_ufacemask_bdry, STREAMICE_vfacemask_bdry ARE CONSTANT (FIXED) @@ -173,7 +262,27 @@ & u_bdry_values_SI, & v_bdry_values_SI, & STREAMICE_dummy_array, - & C_basal_friction + & C_basal_friction, +! & A_glen, + & B_glen, + & BDOT_streamice, ADOT_streamice, ! mass balances in meters per year + & streamice_sigma_coord, streamice_delsigma, + & H_streamice_prev + +#ifdef STREAMICE_HYBRID_STRESS + COMMON /STREAMICE_HYBRID/ + & streamice_taubx, streamice_tauby, + & streamice_u_surf, streamice_v_surf, + & visc_streamice_full, streamice_omega, streamice_basal_geom, + & streamice_vert_shear_uz, streamice_vert_shear_vz +#endif + +#ifdef USE_ALT_RLOW + COMMON /STREAMICE_RLOW/ + & R_low_si +#endif + + _RL H_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RL U_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RL V_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) @@ -190,9 +299,44 @@ _RL u_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) _RL C_basal_friction (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) +! _RL A_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL B_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL streamice_sigma_coord (Nr) + _RL streamice_delsigma (Nr) + +#ifdef USE_ALT_RLOW + _RL R_low_si (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) +#endif + +C The following arrays are used for the hybrid stress balance +#ifdef STREAMICE_HYBRID_STRESS + _RL streamice_taubx (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL streamice_tauby (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL streamice_u_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL streamice_v_surf (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL streamice_omega (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL streamice_basal_geom + & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL visc_streamice_full + & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) + _RL streamice_vert_shear_uz (Nr) + _RL streamice_vert_shear_vz (Nr) +#endif + + _RL ADOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) +!! IMPORTANT: MELT RATE IN METERS PER YEAR +!! POSITIVE WHERE MELTING + _RL BDOT_streamice (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL H_streamice_prev (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RL STREAMICE_dummy_array (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + + + COMMON /STREAMICE_COST_RL/ + & cost_func1_streamice + _RL cost_func1_streamice(nSx,nSy) + C NOTES : C REAL ARRAYS THAT COMPRISE "STATE": C H_streamice, @@ -206,6 +350,18 @@ C visc & tau are now calculated based on U,V in streamice_vel_solve C but with Hybdrid stress formulation they will become part of C velocity initial guess, so they are kept + +#ifdef ALLOW_PETSC + COMMON /STREAMICE_PETSC_DOFS_COMMON/ + & streamice_petsc_dofs_u, + & streamice_petsc_dofs_v, + & n_dofs_process + _RS streamice_petsc_dofs_u + & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RS streamice_petsc_dofs_v + & (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + INTEGER n_dofs_process (0:nPx*nPy-1) +#endif #endif /* ALLOW_STREAMICE */