--- MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F 2012/10/10 15:03:10 1.8 +++ MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F 2013/06/11 17:42:17 1.16 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F,v 1.8 2012/10/10 15:03:10 dgoldberg Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F,v 1.16 2013/06/11 17:42:17 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,11 +34,11 @@ 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, - & A_glen_isothermal, n_glen, eps_glen_min, + & B_glen_isothermal, n_glen, eps_glen_min, eps_u_min, & C_basal_fric_const, n_basal_friction, & streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol, & streamice_nonlin_tol_fp, @@ -46,26 +49,57 @@ & STREAMICEsigcoordFile, & STREAMICEthickFile, & STREAMICEcalveMaskFile, + & STREAMICEcostMaskFile, & STREAMICEison, & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio, & STREAMICE_dump_mnc, STREAMICE_tave_mnc, & STREAMICE_GL_regularize, STREAMICE_move_front, & STREAMICE_calve_to_mask, & 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, & STREAMICEbasalTracFile, & STREAMICEvelOptimFile, + & STREAMICEtopogFile, + & STREAMICEhmaskFile, + & STREAMICEHBCyFile, + & STREAMICEHBCxFile, + & STREAMICEuFaceBdryFile, + & STREAMICEvFaceBdryFile, + & STREAMICEuDirichValsFile, + & STREAMICEvDirichValsFile, + & STREAMICEGlenConstFile, STREAMICEGlenConstConfig, & STREAMICE_ppm_driving_stress, & STREAMICE_h_ctrl_const_surf, & streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel, - & streamice_wgt_avthick + & streamice_wgt_avthick, streamice_wgt_tikh, + & streamice_addl_backstress, + & streamice_smooth_gl_width, + & streamice_adot_uniform, + & STREAMICE_ADV_SCHEME + +#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/ @@ -107,9 +141,10 @@ streamice_density = 917. streamice_density_ocean_avg = 1024. - A_glen_isothermal = 9.461e-18 ! Pa (-1/3) a + B_glen_isothermal = 9.461e-18 ! Pa (-1/3) a n_glen = 3. eps_glen_min = 1.0e-12 + 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 @@ -126,9 +161,13 @@ streamice_kx_b_init = 1. streamice_ky_b_init = 1. streamice_wgt_drift = 0. + streamice_wgt_tikh = 0. streamice_wgt_surf = 0. streamice_wgt_vel = 0. - streamice_wgt_avthick = 0. + streamice_wgt_avthick = 0. + streamice_addl_backstress = 0.0 + streamice_smooth_gl_width = 0.0 + streamice_adot_uniform = 0.0 STREAMICEthickInit = 'FILE' STREAMICEthickFile = ' ' @@ -138,6 +177,38 @@ STREAMICEbasalTracConfig = 'UNIFORM' STREAMICEbasalTracFile = ' ' STREAMICEvelOptimFile = '' + STREAMICEtopogFile = '' + STREAMICEhmaskFile = '' + STREAMICEHBCyFile = '' + STREAMICEHBCxFile = '' +#ifdef ALLOW_STREAMICE_2DTRACER + STREAMICETrac2DBCxFile = '' + STREAMICETrac2DBCyFile = '' + STREAMICETrac2DInitFile = '' +#endif + STREAMICEuFaceBdryFile = '' + STREAMICEvFaceBdryFile = '' + STREAMICEuDirichValsFile = '' + STREAMICEvDirichValsFile = '' + STREAMICEGlenConstFile = '' + STREAMICEcostMaskFile = '' + STREAMICEGlenConstConfig = 'UNIFORM' +#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. @@ -147,6 +218,7 @@ STREAMICE_GL_regularize = .FALSE. STREAMICE_move_front = .FALSE. STREAMICE_calve_to_mask = .FALSE. +! STREAMICE_geom_file_setup = .FALSE. ! STREAMICE_construct_matrix = .TRUE. STREAMICE_lower_cg_tol = .FALSE. STREAMICE_diagnostic_only = .FALSE. @@ -221,14 +293,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 :