--- MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F 2013/05/23 22:12:33 1.14 +++ 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.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.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,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, @@ -52,13 +55,10 @@ & STREAMICE_dump_mnc, STREAMICE_tave_mnc, & STREAMICE_GL_regularize, 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, @@ -66,19 +66,40 @@ & STREAMICEvelOptimFile, & STREAMICEtopogFile, & STREAMICEhmaskFile, + & STREAMICEHBCyFile, + & STREAMICEHBCxFile, & STREAMICEuFaceBdryFile, & STREAMICEvFaceBdryFile, & STREAMICEuDirichValsFile, & STREAMICEvDirichValsFile, & 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 + +#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/ @@ -146,6 +167,7 @@ streamice_wgt_avthick = 0. streamice_addl_backstress = 0.0 streamice_smooth_gl_width = 0.0 + streamice_adot_uniform = 0.0 STREAMICEthickInit = 'FILE' STREAMICEthickFile = ' ' @@ -157,17 +179,36 @@ STREAMICEvelOptimFile = '' STREAMICEtopogFile = '' STREAMICEhmaskFile = '' + STREAMICEHBCyFile = '' + STREAMICEHBCxFile = '' +#ifdef ALLOW_STREAMICE_2DTRACER + STREAMICETrac2DBCxFile = '' + STREAMICETrac2DBCyFile = '' + STREAMICETrac2DInitFile = '' +#endif STREAMICEuFaceBdryFile = '' STREAMICEvFaceBdryFile = '' STREAMICEuDirichValsFile = '' STREAMICEvDirichValsFile = '' 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. @@ -252,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 :