--- MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F 2013/05/23 22:12:33 1.14 +++ MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F 2014/08/27 19:29:14 1.17 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F,v 1.14 2013/05/23 22:12:33 dgoldberg Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F,v 1.17 2014/08/27 19:29:14 dgoldberg Exp $ C $Name: $ @@ -20,6 +20,9 @@ #include "PARAMS.h" #include "STREAMICE.h" #include "STREAMICE_BDRY.h" +#ifdef ALLOW_STREAMICE_FLUX_CONTROL +#include "STREAMICE_CTRL_FLUX.h" +#endif C !INPUT PARAMETERS: INTEGER myThid @@ -31,7 +34,7 @@ C msgBuf :: Informational/error message buffer C iUnit :: Work variable for IO unit number CHARACTER*(MAX_LEN_MBUF) msgBuf - INTEGER iUnit + INTEGER iUnit, iarr, tarr NAMELIST /STREAMICE_PARM01/ & streamice_density, streamice_density_ocean_avg, @@ -40,7 +43,7 @@ & streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol, & streamice_nonlin_tol_fp, & streamice_max_cg_iter, streamice_max_nl_iter, - & STREAMICE_GL_regularize, + & streamice_maxcgiter_cpl, streamice_maxnliter_cpl, & STREAMICEthickInit, & STREAMICEsigcoordInit, & STREAMICEsigcoordFile, @@ -50,35 +53,69 @@ & STREAMICEison, & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio, & STREAMICE_dump_mnc, STREAMICE_tave_mnc, - & STREAMICE_GL_regularize, STREAMICE_move_front, + & STREAMICE_move_front, & STREAMICE_calve_to_mask, -! & STREAMICE_geom_file_setup, & STREAMICE_diagnostic_only, -! & STREAMICE_construct_matrix, & STREAMICE_lower_cg_tol, & streamice_CFL_factor, & streamice_adjDump, -! & STREAMICE_hybrid_stress, & streamice_bg_surf_slope_x, streamice_bg_surf_slope_y, & streamice_kx_b_init, streamice_ky_b_init, & STREAMICEbasalTracConfig, + & STREAMICEBdotConfig, & STREAMICEbasalTracFile, + & STREAMICEBdotFile, + & STREAMICEBdotTimeDepFile, & STREAMICEvelOptimFile, & STREAMICEtopogFile, & STREAMICEhmaskFile, + & STREAMICEHBCyFile, + & STREAMICEHBCxFile, & STREAMICEuFaceBdryFile, & STREAMICEvFaceBdryFile, & STREAMICEuDirichValsFile, & STREAMICEvDirichValsFile, + & STREAMICEuMassFluxFile, + & STREAMICEvMassFluxFile, + & STREAMICEuNormalStressFile, + & STREAMICEvNormalStressFile, + & STREAMICEuShearStressFile, + & STREAMICEvShearStressFile, + & STREAMICEuNormalTimeDepFile, + & STREAMICEvNormalTimeDepFile, + & STREAMICEuShearTimeDepFile, + & STREAMICEvShearTimeDepFile, & STREAMICEGlenConstFile, STREAMICEGlenConstConfig, - & STREAMICEBdotFile, STREAMICEBdotConfig, & STREAMICE_ppm_driving_stress, & STREAMICE_h_ctrl_const_surf, & streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel, & streamice_wgt_avthick, streamice_wgt_tikh, & streamice_addl_backstress, & streamice_smooth_gl_width, - & PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE + & streamice_adot_uniform, + & STREAMICE_ADV_SCHEME, streamice_forcing_period, + & STREAMICE_chkfixedptconvergence, + & STREAMICE_chkresidconvergence, + & STREAMICE_allow_cpl + +#ifdef ALLOW_STREAMICE_2DTRACER + NAMELIST /STREAMICE_PARMTRACER/ + & STREAMICETrac2DBCxFile, + & STREAMICETrac2DBCyFile, + & STREAMICETrac2DINITFile +#endif + +#ifdef ALLOW_PETSC + NAMELIST /STREAMICE_PARMPETSC/ + & PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE +#endif + +#ifdef ALLOW_STREAMICE_FLUX_CONTROL + NAMELIST /STREAMICE_PARMFLUXCTRL/ + & n_fluxes, n_epochs, + & streamice_ctrl_flux_id, + & streamice_ctrl_flux_scaleVel +#endif NAMELIST /STREAMICE_PARM02/ @@ -126,13 +163,15 @@ eps_u_min = 1.0e-6 C_basal_fric_const = 31.71 ! Pa (m/a)-1n n_basal_friction = 1. - streamice_vel_update = 169200. ! seconds + streamice_vel_update = deltaT ! seconds streamice_cg_tol = 1e-6 streamice_nonlin_tol = 1e-6 streamice_nonlin_tol_fp = 1.e-14 streamice_max_cg_iter = 2000 streamice_max_nl_iter = 100 - streamice_n_sub_regularize = 4 + streamice_maxcgiter_cpl = 0 + streamice_maxnliter_cpl = 0 +! streamice_n_sub_regularize = 4 streamice_CFL_factor = .5 streamice_adjDump = 0. streamice_bg_surf_slope_x = .0 @@ -146,6 +185,8 @@ streamice_wgt_avthick = 0. streamice_addl_backstress = 0.0 streamice_smooth_gl_width = 0.0 + streamice_adot_uniform = 0.0 + streamice_forcing_period = 0 STREAMICEthickInit = 'FILE' STREAMICEthickFile = ' ' @@ -153,28 +194,61 @@ STREAMICEsigcoordInit = 'UNIFORM' STREAMICEsigcoordFile = ' ' STREAMICEbasalTracConfig = 'UNIFORM' + STREAMICEBdotConfig = '' + STREAMICEBdotFile = '' + STREAMICEBdotTimeDepFile = ' ' STREAMICEbasalTracFile = ' ' STREAMICEvelOptimFile = '' STREAMICEtopogFile = '' STREAMICEhmaskFile = '' + STREAMICEHBCyFile = '' + STREAMICEHBCxFile = '' + STREAMICEuNormalStressFile = '' + STREAMICEvNormalStressFile = '' + STREAMICEuShearStressFile = '' + STREAMICEvShearStressFile = '' + STREAMICEuNormalTimeDepFile = ' ' + STREAMICEvNormalTimeDepFile = ' ' + STREAMICEuShearTimeDepFile = ' ' + STREAMICEvShearTimeDepFile = ' ' + +#ifdef ALLOW_STREAMICE_2DTRACER + STREAMICETrac2DBCxFile = '' + STREAMICETrac2DBCyFile = '' + STREAMICETrac2DInitFile = '' +#endif STREAMICEuFaceBdryFile = '' STREAMICEvFaceBdryFile = '' STREAMICEuDirichValsFile = '' STREAMICEvDirichValsFile = '' + STREAMICEuMassFluxFile = '' + STREAMICEvMassFluxFile = '' STREAMICEGlenConstFile = '' - STREAMICEBdotFile = '' STREAMICEcostMaskFile = '' STREAMICEGlenConstConfig = 'UNIFORM' - STREAMICEBdotConfig = ' ' +#ifdef ALLOW_PETSC PETSC_PRECOND_TYPE = 'PCBJACOBI' PETSC_SOLVER_TYPE = 'KSPCG' +#endif + STREAMICE_ADV_SCHEME = '' + +#ifdef ALLOW_STREAMICE_FLUX_CONTROL + n_fluxes = 0 + n_epochs = 0 + DO iarr=1,n_fluxes_max + streamice_ctrl_flux_id(iarr) = 0 + DO tarr=1,n_epochs_max + streamice_ctrl_flux_scaleVel(iarr,tarr) = 0. _d 0 + ENDDO + ENDDO +#endif STREAMICEison = .TRUE. STREAMICE_tave_mdsio = .TRUE. STREAMICE_dump_mdsio = .TRUE. STREAMICE_dump_mnc = .FALSE. STREAMICE_tave_mnc = .FALSE. - STREAMICE_GL_regularize = .FALSE. +! STREAMICE_GL_regularize = .FALSE. STREAMICE_move_front = .FALSE. STREAMICE_calve_to_mask = .FALSE. ! STREAMICE_geom_file_setup = .FALSE. @@ -182,7 +256,10 @@ STREAMICE_lower_cg_tol = .FALSE. STREAMICE_diagnostic_only = .FALSE. STREAMICE_ppm_driving_stress = .FALSE. + STREAMICE_chkfixedptconvergence = .true. + STREAMICE_chkresidconvergence = .true. STREAMICE_h_ctrl_const_surf = .FALSE. + STREAMICE_allow_cpl = .false. ! STREAMICE_hybrid_stress= .FALSE. min_x_noflow_NORTH = 0. @@ -252,14 +329,49 @@ & SQUEEZE_RIGHT , 1) ENDIF +#ifdef ALLOW_STREAMICE_2DTRACER + READ(UNIT=iUnit,NML=STREAMICE_PARMTRACER) + WRITE(msgBuf,'(A)') + & 'STREAMICE_READPARMS: read tracer param block' + CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, + & SQUEEZE_RIGHT , 1) +#endif + +#ifdef ALLOW_PETSC + READ(UNIT=iUnit,NML=STREAMICE_PARMPETSC) + WRITE(msgBuf,'(A)') + & 'STREAMICE_READPARMS: read petsc param block' + CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, + & SQUEEZE_RIGHT , 1) +#endif + + READ(UNIT=iUnit,NML=STREAMICE_PARM03) WRITE(msgBuf,'(A)') & 'STREAMICE_READPARMS: read third param block' CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, & SQUEEZE_RIGHT , 1) -C Close the open data file CLOSE(iUnit) + +#ifdef ALLOW_STREAMICE_FLUX_CONTROL + + CALL OPEN_COPY_DATA_FILE( + I 'data.strmctrlflux', 'STREAMICE_READPARMS', + O iUnit, + I myThid ) + + + READ(UNIT=iUnit,NML=STREAMICE_PARMFLUXCTRL) + WRITE(msgBuf,'(A)') + & 'STREAMICE_READPARMS: read flux_ctrl param block' + CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, + & SQUEEZE_RIGHT , 1) + CLOSE(iUnit) +#endif + + + streamice_nstep_velocity = NINT (streamice_vel_update / deltaT) C- Set Output type flags :