Back to home page

MITgcm

 
 

    


File indexing completed on 2026-10-08 05:08:59 UTC

view on githubraw file Latest commit 27256b2d on 2026-10-07 21:35:21 UTC
5ca83cd8f7 Dani*0001 #include "STREAMICE_OPTIONS.h"
96b006450c dngo*0002 #ifdef ALLOW_COST
                0003 # include "COST_OPTIONS.h"
                0004 #endif
5ca83cd8f7 Dani*0005 
                0006 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0007 CBOP 0
                0008       SUBROUTINE STREAMICE_READPARMS( myThid )
                0009 
                0010 C     !DESCRIPTION:
                0011 C     Initialize STREAMICE variables and constants.
                0012 
                0013 C     !USES:
                0014       IMPLICIT NONE
                0015 #include "SIZE.h"
                0016 #include "EEPARAMS.h"
                0017 #include "PARAMS.h"
                0018 #include "STREAMICE.h"
feb7fa5d1e dngo*0019 #include "STREAMICE_FP.h"
5ca83cd8f7 Dani*0020 #include "STREAMICE_BDRY.h"
07e785229e dngo*0021 c#ifdef ALLOW_STREAMICE_FLUX_CONTROL
                0022 c#include "STREAMICE_CTRL_FLUX.h"
                0023 c#endif
5ca83cd8f7 Dani*0024 
                0025 C     !INPUT PARAMETERS:
                0026       INTEGER myThid
                0027 CEOP
                0028 
                0029 #ifdef ALLOW_STREAMICE
                0030 C     !LOCAL VARIABLES:
                0031 C     msgBuf     :: Informational/error message buffer
                0032 C     iUnit      :: Work variable for IO unit number
                0033       CHARACTER*(MAX_LEN_MBUF) msgBuf
07e785229e dngo*0034       INTEGER iUnit
96b006450c dngo*0035 # ifdef ALLOW_STREAMICE_TC_COST
                0036       INTEGER iarr
                0037 # endif
                0038 
                0039 c      _RL streamice_bdot_depth_nomelt
                0040 c      _RL streamice_bdot_depth_maxmelt
                0041 c      _RL streamice_bdot_maxmelt
5ca83cd8f7 Dani*0042 
                0043       NAMELIST /STREAMICE_PARM01/
                0044      &     streamice_density, streamice_density_ocean_avg,
e4cfce0a6c Dani*0045      &     streamice_density_firn,
5ca83cd8f7 Dani*0046      &     B_glen_isothermal, n_glen, eps_glen_min, eps_u_min,
02e2d7ff52 Jean*0047      &     C_basal_fric_const, n_basal_friction,
5ca83cd8f7 Dani*0048      &     streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol,
bbd6229661 Dani*0049      &     streamice_nonlin_tol_fp, streamice_err_norm,
5ca83cd8f7 Dani*0050      &     streamice_max_cg_iter, streamice_max_nl_iter,
d2cdb9260d Dani*0051      &     streamice_maxcgiter_cpl, streamice_maxnliter_cpl,
5ca83cd8f7 Dani*0052      &     STREAMICEthickInit,
                0053      &     STREAMICEsigcoordInit,
                0054      &     STREAMICEsigcoordFile,
                0055      &     STREAMICEthickFile,
                0056      &     STREAMICEcalveMaskFile,
                0057      &     STREAMICEcostMaskFile,
                0058      &     STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
                0059      &     STREAMICE_dump_mnc, STREAMICE_tave_mnc,
f3f31151db Dani*0060      &     STREAMICE_move_front,
5ca83cd8f7 Dani*0061      &     STREAMICE_calve_to_mask,
                0062      &     STREAMICE_diagnostic_only,
                0063      &     STREAMICE_lower_cg_tol,
                0064      &     streamice_CFL_factor,
                0065      &     streamice_adjDump,
                0066      &     streamice_bg_surf_slope_x, streamice_bg_surf_slope_y,
                0067      &     streamice_kx_b_init, streamice_ky_b_init,
                0068      &     STREAMICEbasalTracConfig,
0a8c8b23d7 Dani*0069      &     STREAMICEBdotConfig,
07e785229e dngo*0070      &     STREAMICEAdotConfig,
5ca83cd8f7 Dani*0071      &     STREAMICEbasalTracFile,
0a8c8b23d7 Dani*0072      &     STREAMICEBdotFile,
07e785229e dngo*0073      &     STREAMICEAdotFile,
52d1822301 Dani*0074      &     STREAMICEBdotTimeDepFile,
96b006450c dngo*0075      &     streamice_bdot_depth_nomelt,
                0076      &     streamice_bdot_depth_maxmelt,
                0077      &     streamice_bdot_maxmelt,
                0078      &     streamice_bdot_exp,
5ca83cd8f7 Dani*0079      &     STREAMICEtopogFile,
                0080      &     STREAMICEhmaskFile,
                0081      &     STREAMICEHBCyFile,
                0082      &     STREAMICEHBCxFile,
                0083      &     STREAMICEuFaceBdryFile,
                0084      &     STREAMICEvFaceBdryFile,
                0085      &     STREAMICEuDirichValsFile,
02e2d7ff52 Jean*0086      &     STREAMICEvDirichValsFile,
                0087      &     STREAMICEuMassFluxFile,
                0088      &     STREAMICEvMassFluxFile,
7924606b84 Dani*0089      &     STREAMICEuNormalStressFile,
                0090      &     STREAMICEvNormalStressFile,
                0091      &     STREAMICEuShearStressFile,
                0092      &     STREAMICEvShearStressFile,
52d1822301 Dani*0093      &     STREAMICEuNormalTimeDepFile,
                0094      &     STREAMICEvNormalTimeDepFile,
                0095      &     STREAMICEuShearTimeDepFile,
                0096      &     STREAMICEvShearTimeDepFile,
2a16ced2f5 Dani*0097      &     STREAMICEuFluxTimeDepFile, STREAMICEvFluxTimeDepFile,
96b006450c dngo*0098      &     bdotMaxmeltTimeDepFile,
                0099      &     bglenTimeDepFile,
                0100      &     cfricTimeDepFile,
5ca83cd8f7 Dani*0101      &     STREAMICEGlenConstFile, STREAMICEGlenConstConfig,
                0102      &     STREAMICE_ppm_driving_stress,
                0103      &     STREAMICE_h_ctrl_const_surf,
                0104      &     streamice_addl_backstress,
                0105      &     streamice_smooth_gl_width,
                0106      &     streamice_adot_uniform,
e4cfce0a6c Dani*0107      &     streamice_firn_correction,
                0108      &     STREAMICE_apply_firn_correction,
d2cdb9260d Dani*0109      &     STREAMICE_ADV_SCHEME, streamice_forcing_period,
                0110      &     STREAMICE_chkfixedptconvergence,
                0111      &     STREAMICE_chkresidconvergence,
29d9814714 Dani*0112      &     STREAMICE_alt_driving_stress,
07e785229e dngo*0113      &     STREAMICE_allow_reg_coulomb,
0fbff46b46 dngo*0114      &     STREAMICE_use_log_ctrl,
                0115      &     STREAMICE_vel_ext,
                0116      &     STREAMICE_vel_ext_cgrid,
                0117      &     STREAMICE_uvel_ext_file,
                0118      &     STREAMICE_vvel_ext_file,
96b006450c dngo*0119      &     STREAMICEBdotDepthFile,
                0120      &     STREAMICEBdotMaxMeltFile,
                0121      &      STREAMICE_shelf_dhdt_ctrl,
1cb54b8236 Dani*0122 #ifdef STREAMICE_FLOWLINE_BUTTRESS
                0123      &     streamice_buttr_width,
                0124      &     useStreamiceFlowlineButtr,
                0125 #endif
d2cdb9260d Dani*0126      &     STREAMICE_allow_cpl
5ca83cd8f7 Dani*0127 
                0128 #ifdef ALLOW_STREAMICE_2DTRACER
                0129       NAMELIST /STREAMICE_PARMTRACER/
                0130      &     STREAMICETrac2DBCxFile,
                0131      &     STREAMICETrac2DBCyFile,
                0132      &     STREAMICETrac2DINITFile
                0133 #endif
                0134 
                0135 #ifdef ALLOW_PETSC
                0136       NAMELIST /STREAMICE_PARMPETSC/
07e785229e dngo*0137      &     PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE,
                0138      &     streamice_use_petsc, streamice_maxnliter_petsc,
                0139      &     streamice_petsc_pcfactorlevels
5ca83cd8f7 Dani*0140 #endif
                0141 
feb7fa5d1e dngo*0142 #ifdef ALLOW_STREAMICE_FP_ADJ
07e785229e dngo*0143       NAMELIST /STREAMICE_PARMOAD/
0fbff46b46 dngo*0144      &     streamice_nonlin_tol_adjoint,
                0145      &     streamice_nonlin_tol_adjoint_rl
729bb43bca Dani*0146 #ifdef ALLOW_PETSC
07e785229e dngo*0147      &     ,STREAMICE_OAD_petsc_reuse,
729bb43bca Dani*0148      &     PETSC_PRECOND_OAD
                0149 #endif
                0150 #endif
                0151 
96b006450c dngo*0152 #ifdef ALLOW_COST_STREAMICE
                0153       NAMELIST /STREAMICE_COST/
                0154      &     STREAMICEvelOptimSnapBasename,
                0155      &     STREAMICEvelOptimTCBasename,
                0156      &     STREAMICEsurfOptimTCBasename,
                0157      &     STREAMICEBglenCostMaskFile,
                0158      &     streamice_wgt_drift,
                0159      &     streamice_wgt_vel,
                0160      &     streamice_wgt_vel_norm,
                0161      &     streamice_wgt_surf,
                0162      &     streamice_wgt_tikh_beta,
                0163      &     streamice_wgt_tikh_bglen,
                0164      &     streamice_wgt_tikh_gen,
                0165      &     streamice_wgt_prior_bglen,
                0166      &     streamice_wgt_prior_gen,
                0167      &     STREAMICE_do_snapshot_cost,
                0168      &     STREAMICE_do_timedep_cost,
                0169      &     STREAMICE_do_verification_cost,
                0170      &     STREAMICE_do_vaf_cost
                0171 #ifdef ALLOW_STREAMICE_TC_COST
                0172      &     ,streamice_vel_cost_timesteps,
                0173      &     streamice_surf_cost_timesteps
                0174 #endif
                0175 #endif
                0176 
07e785229e dngo*0177 c#ifdef ALLOW_STREAMICE_FLUX_CONTROL
                0178 c      NAMELIST /STREAMICE_PARMFLUXCTRL/
                0179 c     &     n_fluxes, n_epochs,
                0180 c     &     streamice_ctrl_flux_id,
                0181 c     &     streamice_ctrl_flux_scaleVel
                0182 c#endif
5ca83cd8f7 Dani*0183 
                0184       NAMELIST /STREAMICE_PARM02/
                0185      &     shelf_max_draft,
                0186      &     shelf_min_draft,
                0187      &     shelf_edge_pos,
                0188      &     shelf_slope_scale,
                0189      &     shelf_flat_width,
                0190      &     flow_dir
                0191 
                0192       NAMELIST /STREAMICE_PARM03/
                0193      &     min_x_noflow_NORTH, max_x_noflow_NORTH,
                0194      &     min_x_noflow_SOUTH, max_x_noflow_SOUTH,
                0195      &     min_y_noflow_WEST, max_y_noflow_WEST,
                0196      &     min_y_noflow_EAST, max_y_noflow_EAST,
                0197      &     min_x_noStress_NORTH, max_x_noStress_NORTH,
                0198      &     min_x_noStress_SOUTH, max_x_noStress_SOUTH,
                0199      &     min_y_noStress_WEST, max_y_noStress_WEST,
                0200      &     min_y_noStress_EAST, max_y_noStress_EAST,
                0201      &     min_x_FluxBdry_NORTH, max_x_FluxBdry_NORTH,
                0202      &     min_x_FluxBdry_SOUTH, max_x_FluxBdry_SOUTH,
                0203      &     min_y_FluxBdry_WEST, max_y_FluxBdry_WEST,
                0204      &     min_y_FluxBdry_EAST, max_y_FluxBdry_EAST,
                0205      &     min_x_Dirich_NORTH, max_x_Dirich_NORTH,
                0206      &     min_x_Dirich_SOUTH, max_x_Dirich_SOUTH,
                0207      &     min_y_Dirich_WEST, max_y_Dirich_WEST,
                0208      &     min_y_Dirich_EAST, max_y_Dirich_EAST,
                0209      &     min_x_CFBC_NORTH, max_x_CFBC_NORTH,
                0210      &     min_x_CFBC_SOUTH, max_x_CFBC_SOUTH,
                0211      &     min_y_CFBC_WEST, max_y_CFBC_WEST,
                0212      &     min_y_CFBC_EAST, max_y_CFBC_EAST,
                0213      &     flux_bdry_val_SOUTH, flux_bdry_val_NORTH,
                0214      &     flux_bdry_val_WEST, flux_bdry_val_EAST,
                0215      &     STREAMICE_NS_periodic, STREAMICE_EW_periodic
                0216 
02e2d7ff52 Jean*0217 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0218 
                0219       IF ( .NOT.useStreamIce ) THEN
                0220 C-    pkg STREAMICE is not used
                0221         _BEGIN_MASTER(myThid)
                0222 C-    Track pkg activation status:
                0223          STREAMICEisOn = .FALSE.
                0224 C     print a (weak) warning if data.streamice is found
                0225          CALL PACKAGES_UNUSED_MSG( 'useStreamIce', ' ', ' ' )
                0226         _END_MASTER(myThid)
                0227         RETURN
                0228       ENDIF
                0229 
5ca83cd8f7 Dani*0230       _BEGIN_MASTER(myThid)
                0231 
02e2d7ff52 Jean*0232 C This routine has been called by the main model so we set our
                0233 C internal flag to indicate we are in business
                0234       STREAMICEisOn = .TRUE.
                0235 
5ca83cd8f7 Dani*0236 C--   Default values for STREAMICE
                0237 
02e2d7ff52 Jean*0238       streamice_density = 917.
5ca83cd8f7 Dani*0239       streamice_density_ocean_avg = 1024.
07e785229e dngo*0240       streamice_density_firn = streamice_density
5ca83cd8f7 Dani*0241       B_glen_isothermal = 9.461e-18   !  Pa (-1/3) a
                0242       n_glen = 3.
                0243       eps_glen_min = 1.0e-12
                0244       eps_u_min = 1.0e-6
                0245       C_basal_fric_const = 31.71 ! Pa (m/a)-1n
07e785229e dngo*0246       n_basal_friction = -1.
d2cdb9260d Dani*0247       streamice_vel_update = deltaT ! seconds
5ca83cd8f7 Dani*0248       streamice_cg_tol = 1e-6
                0249       streamice_nonlin_tol = 1e-6
                0250       streamice_nonlin_tol_fp = 1.e-14
bbd6229661 Dani*0251       streamice_err_norm = 0.
feb7fa5d1e dngo*0252 #ifdef ALLOW_STREAMICE_FP_ADJ
95afe7199b Dani*0253       streamice_nonlin_tol_adjoint = 1.e-14
0fbff46b46 dngo*0254       streamice_nonlin_tol_adjoint_rl = 1.e-14
729bb43bca Dani*0255 #ifdef ALLOW_PETSC
                0256       PETSC_PRECOND_OAD = 'MUMPS'
                0257       STREAMICE_OAD_petsc_reuse =.false.
                0258 #endif
95afe7199b Dani*0259 #endif
5ca83cd8f7 Dani*0260       streamice_max_cg_iter = 2000
                0261       streamice_max_nl_iter = 100
07e785229e dngo*0262       streamice_maxnliter_petsc = -1
d2cdb9260d Dani*0263       streamice_maxcgiter_cpl = 0
                0264       streamice_maxnliter_cpl = 0
07e785229e dngo*0265       streamice_petsc_pcfactorlevels = 0
                0266 c      streamice_n_sub_regularize = 4
5ca83cd8f7 Dani*0267       streamice_CFL_factor = .5
                0268       streamice_adjDump = 0.
                0269       streamice_bg_surf_slope_x = .0
                0270       streamice_bg_surf_slope_y = 0.
                0271       streamice_kx_b_init = 1.
                0272       streamice_ky_b_init = 1.
                0273       streamice_addl_backstress = 0.0
                0274       streamice_smooth_gl_width = 0.0
                0275       streamice_adot_uniform = 0.0
52d1822301 Dani*0276       streamice_forcing_period = 0
e4cfce0a6c Dani*0277       streamice_firn_correction = 0.
96b006450c dngo*0278       streamice_bdot_depth_nomelt = 0.
                0279       streamice_bdot_depth_maxmelt = 0.
                0280       streamice_bdot_maxmelt = 0.
                0281       streamice_bdot_exp = 1.
                0282 
1cb54b8236 Dani*0283 #ifdef STREAMICE_FLOWLINE_BUTTRESS
                0284       streamice_buttr_width = 1000000000.
                0285 #endif
e4cfce0a6c Dani*0286       STREAMICE_apply_firn_correction = .false.
07e785229e dngo*0287 
5ca83cd8f7 Dani*0288       STREAMICEthickInit = 'FILE'
                0289       STREAMICEthickFile = ' '
                0290       STREAMICEcalveMaskFile = ' '
                0291       STREAMICEsigcoordInit = 'UNIFORM'
                0292       STREAMICEsigcoordFile = ' '
                0293       STREAMICEbasalTracConfig = 'UNIFORM'
0a8c8b23d7 Dani*0294       STREAMICEBdotConfig = ''
07e785229e dngo*0295       STREAMICEAdotConfig = ''
0a8c8b23d7 Dani*0296       STREAMICEBdotFile = ''
07e785229e dngo*0297       STREAMICEAdotFile = ''
52d1822301 Dani*0298       STREAMICEBdotTimeDepFile = ' '
5ca83cd8f7 Dani*0299       STREAMICEbasalTracFile = ' '
                0300       STREAMICEtopogFile = ''
                0301       STREAMICEhmaskFile = ''
                0302       STREAMICEHBCyFile = ''
                0303       STREAMICEHBCxFile = ''
7924606b84 Dani*0304       STREAMICEuNormalStressFile = ''
                0305       STREAMICEvNormalStressFile = ''
                0306       STREAMICEuShearStressFile = ''
                0307       STREAMICEvShearStressFile = ''
52d1822301 Dani*0308       STREAMICEuNormalTimeDepFile = ' '
                0309       STREAMICEvNormalTimeDepFile = ' '
                0310       STREAMICEuShearTimeDepFile = ' '
                0311       STREAMICEvShearTimeDepFile = ' '
2a16ced2f5 Dani*0312       STREAMICEuFluxTimeDepFile = ' '
                0313       STREAMICEvFluxTimeDepFile = ' '
0fbff46b46 dngo*0314       STREAMICE_vvel_ext_file = ' '
                0315       STREAMICE_uvel_ext_file = ' '
96b006450c dngo*0316       bdotMaxmeltTimeDepFile = ' '
                0317       bglenTimeDepFile = ' '
                0318       cfricTimeDepFile = ' '
7924606b84 Dani*0319 
5ca83cd8f7 Dani*0320 #ifdef ALLOW_STREAMICE_2DTRACER
                0321       STREAMICETrac2DBCxFile = ''
                0322       STREAMICETrac2DBCyFile = ''
                0323       STREAMICETrac2DInitFile = ''
                0324 #endif
                0325       STREAMICEuFaceBdryFile = ''
                0326       STREAMICEvFaceBdryFile = ''
                0327       STREAMICEuDirichValsFile = ''
                0328       STREAMICEvDirichValsFile = ''
7924606b84 Dani*0329       STREAMICEuMassFluxFile = ''
                0330       STREAMICEvMassFluxFile = ''
5ca83cd8f7 Dani*0331       STREAMICEGlenConstFile = ''
                0332       STREAMICEcostMaskFile = ''
                0333       STREAMICEGlenConstConfig = 'UNIFORM'
                0334 #ifdef ALLOW_PETSC
                0335       PETSC_PRECOND_TYPE = 'PCBJACOBI'
                0336       PETSC_SOLVER_TYPE = 'KSPCG'
8a34959769 dngo*0337       streamice_use_petsc = .false.
5ca83cd8f7 Dani*0338 #endif
                0339       STREAMICE_ADV_SCHEME = ''
96b006450c dngo*0340       STREAMICEBdotDepthFile = ''
                0341       STREAMICEBdotMaxMeltFile = ''
5ca83cd8f7 Dani*0342 
07e785229e dngo*0343 c#ifdef ALLOW_STREAMICE_FLUX_CONTROL
                0344 c      n_fluxes = 0
                0345 c      n_epochs = 0
                0346 c      DO iarr=1,n_fluxes_max
                0347 c       streamice_ctrl_flux_id(iarr) = 0
                0348 c       DO tarr=1,n_epochs_max
                0349 c        streamice_ctrl_flux_scaleVel(iarr,tarr) = 0. _d 0
                0350 c       ENDDO
                0351 c      ENDDO
                0352 c#endif
5ca83cd8f7 Dani*0353 
                0354       STREAMICE_tave_mdsio = .TRUE.
                0355       STREAMICE_dump_mdsio = .TRUE.
02e2d7ff52 Jean*0356       STREAMICE_dump_mnc = .FALSE.
5ca83cd8f7 Dani*0357       STREAMICE_tave_mnc = .FALSE.
07e785229e dngo*0358 c      STREAMICE_GL_regularize = .FALSE.
5ca83cd8f7 Dani*0359       STREAMICE_move_front = .FALSE.
                0360       STREAMICE_calve_to_mask = .FALSE.
07e785229e dngo*0361 c       STREAMICE_geom_file_setup = .FALSE.
                0362 c      STREAMICE_construct_matrix = .TRUE.
5ca83cd8f7 Dani*0363       STREAMICE_lower_cg_tol = .FALSE.
                0364       STREAMICE_diagnostic_only = .FALSE.
1cb54b8236 Dani*0365 #ifdef STREAMICE_FLOWLINE_BUTTRESS
                0366       useStreamiceFlowlineButtr=.FALSE.
                0367 #endif
5ca83cd8f7 Dani*0368       STREAMICE_ppm_driving_stress = .FALSE.
d2cdb9260d Dani*0369       STREAMICE_chkfixedptconvergence = .true.
                0370       STREAMICE_chkresidconvergence = .true.
29d9814714 Dani*0371       STREAMICE_alt_driving_stress = .FALSE.
07e785229e dngo*0372       STREAMICE_allow_reg_coulomb = .FALSE.
5ca83cd8f7 Dani*0373       STREAMICE_h_ctrl_const_surf = .FALSE.
96b006450c dngo*0374       STREAMICE_shelf_dhdt_ctrl = .FALSE.
d2cdb9260d Dani*0375       STREAMICE_allow_cpl = .false.
0fbff46b46 dngo*0376       STREAMICE_use_log_ctrl = .false.
                0377       STREAMICE_vel_ext = .FALSE.
                0378       STREAMICE_vel_ext_cgrid = .FALSE.
07e785229e dngo*0379 c       STREAMICE_hybrid_stress= .FALSE.
5ca83cd8f7 Dani*0380 
96b006450c dngo*0381       STREAMICEvelOptimSnapBasename = ''
                0382       STREAMICEvelOptimTCBasename = ''
                0383       STREAMICEsurfOptimTCBasename = ''
                0384       STREAMICEBglenCostMaskFile = ''
                0385       streamice_wgt_drift = 0.
                0386       streamice_wgt_tikh_beta = 0.
                0387       streamice_wgt_vel_norm = 0.
                0388       streamice_wgt_tikh_bglen = 0.
                0389       streamice_wgt_tikh_gen = 0.
                0390       streamice_wgt_prior_bglen = 0.
                0391       streamice_wgt_prior_gen = 0.
                0392       STREAMICE_do_snapshot_cost = .false.
                0393       STREAMICE_do_timedep_cost = .false.
                0394       STREAMICE_do_verification_cost = .false.
                0395       STREAMICE_do_vaf_cost = .false.
                0396 #ifdef ALLOW_STREAMICE_TC_COST
                0397       do iarr = 1, streamiceMaxCostLevel
                0398        streamice_vel_cost_timesteps(iarr) = -1
                0399        streamice_surf_cost_timesteps(iarr) = -1
                0400       enddo
                0401 #endif
                0402 
5ca83cd8f7 Dani*0403       min_x_noflow_NORTH = 0.
                0404       max_x_noflow_NORTH = 0.
                0405       min_x_noflow_SOUTH = 0.
                0406       max_x_noflow_SOUTH = 0.
                0407       min_y_noflow_WEST = 0.
                0408       max_y_noflow_WEST = 0.
                0409       min_y_noflow_EAST = 0.
                0410       max_y_noflow_EAST = 0.
                0411       min_x_noStress_NORTH = 0.
                0412       max_x_noStress_NORTH = 0.
                0413       min_x_noStress_SOUTH = 0.
                0414       max_x_noStress_SOUTH = 0.
                0415       min_y_noStress_WEST = 0.
                0416       max_y_noStress_WEST = 0.
                0417       min_y_noStress_EAST = 0.
                0418       max_y_noStress_EAST = 0.
                0419       min_x_FluxBdry_NORTH = 0.
                0420       max_x_FluxBdry_NORTH = 0.
                0421       min_x_FluxBdry_SOUTH = 0.
                0422       max_x_FluxBdry_SOUTH = 0.
                0423       min_y_FluxBdry_WEST = 0.
                0424       max_y_FluxBdry_WEST = 0.
                0425       min_y_FluxBdry_EAST = 0.
                0426       max_y_FluxBdry_EAST = 0.
                0427       min_x_Dirich_NORTH = 0.
                0428       max_x_Dirich_NORTH = 0.
                0429       min_x_Dirich_SOUTH = 0.
                0430       max_x_Dirich_SOUTH = 0.
                0431       min_y_Dirich_WEST = 0.
                0432       max_y_Dirich_WEST = 0.
                0433       min_y_Dirich_EAST = 0.
                0434       max_y_Dirich_EAST = 0.
                0435       min_y_CFBC_WEST = 0.
                0436       max_y_CFBC_WEST = 0.
                0437       min_y_CFBC_EAST = 0.
                0438       max_y_CFBC_EAST = 0.
                0439       flux_bdry_val_SOUTH = 0.
                0440       flux_bdry_val_NORTH = 0.
                0441       flux_bdry_val_WEST = 0.
                0442       flux_bdry_val_EAST = 0.
                0443 
                0444       STREAMICE_NS_periodic = .FALSE.
02e2d7ff52 Jean*0445       STREAMICE_EW_periodic = .FALSE.
5ca83cd8f7 Dani*0446 
                0447       WRITE(msgBuf,'(A)') 'STREAMICE_READPARMS: opening data.streamice'
                0448       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0449      &                    SQUEEZE_RIGHT , 1)
                0450       CALL OPEN_COPY_DATA_FILE(
                0451      I                     'data.streamice', 'STREAMICE_READPARMS',
                0452      O                     iUnit,
                0453      I                     myThid )
                0454 
                0455 C     Read parameters from open data file
                0456       READ(UNIT=iUnit,NML=STREAMICE_PARM01)
                0457       WRITE(msgBuf,'(A)')
                0458      &    'STREAMICE_READPARMS: read first param block'
                0459       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0460      &    SQUEEZE_RIGHT , 1)
                0461 
                0462       IF (TRIM(STREAMICEthickInit) .eq. "PARAM") THEN
                0463        READ(UNIT=iUnit,NML=STREAMICE_PARM02)
                0464         WRITE(msgBuf,'(A)')
                0465      &    'STREAMICE_READPARMS: read second param block'
                0466        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0467      &    SQUEEZE_RIGHT , 1)
                0468       ENDIF
                0469 
                0470 #ifdef ALLOW_STREAMICE_2DTRACER
                0471       READ(UNIT=iUnit,NML=STREAMICE_PARMTRACER)
                0472       WRITE(msgBuf,'(A)')
                0473      &    'STREAMICE_READPARMS: read tracer param block'
                0474       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0475      &    SQUEEZE_RIGHT , 1)
                0476 #endif
                0477 
                0478 #ifdef ALLOW_PETSC
                0479       READ(UNIT=iUnit,NML=STREAMICE_PARMPETSC)
                0480       WRITE(msgBuf,'(A)')
                0481      &    'STREAMICE_READPARMS: read petsc param block'
                0482       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0483      &    SQUEEZE_RIGHT , 1)
                0484 #endif
                0485 
feb7fa5d1e dngo*0486 #ifdef ALLOW_STREAMICE_FP_ADJ
729bb43bca Dani*0487       READ(UNIT=iUnit,NML=STREAMICE_PARMOAD)
                0488       WRITE(msgBuf,'(A)')
                0489      &    'STREAMICE_READPARMS: read oad parm block'
                0490       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0491      &    SQUEEZE_RIGHT , 1)
                0492 #endif
                0493 
96b006450c dngo*0494 #if (defined (ALLOW_COST_STREAMICE))
                0495 
                0496       READ(UNIT=iUnit,NML=STREAMICE_COST)
                0497       WRITE(msgBuf,'(A)')
                0498      &    'STREAMICE_READPARMS: read cost param block'
                0499       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0500      &    SQUEEZE_RIGHT , 1)
                0501 #endif
                0502 
                0503 #ifndef STREAMICE_GEOM_FILE_SETUP
5ca83cd8f7 Dani*0504       READ(UNIT=iUnit,NML=STREAMICE_PARM03)
                0505       WRITE(msgBuf,'(A)')
96b006450c dngo*0506      &    'STREAMICE_READPARMS: read bound condn block'
5ca83cd8f7 Dani*0507       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0508      &    SQUEEZE_RIGHT , 1)
96b006450c dngo*0509 #endif
7a77863887 Mart*0510 #ifdef SINGLE_DISK_IO
5ca83cd8f7 Dani*0511       CLOSE(iUnit)
7a77863887 Mart*0512 #else
                0513       CLOSE(iUnit,STATUS='DELETE')
                0514 #endif /* SINGLE_DISK_IO */
5ca83cd8f7 Dani*0515 
07e785229e dngo*0516 c#ifdef ALLOW_STREAMICE_FLUX_CONTROL
                0517 c
                0518 c      CALL OPEN_COPY_DATA_FILE(
                0519 c     I                     'data.strmctrlflux', 'STREAMICE_READPARMS',
                0520 c     O                     iUnit,
                0521 c     I                     myThid )
                0522 c
                0523 c      READ(UNIT=iUnit,NML=STREAMICE_PARMFLUXCTRL)
                0524 c      WRITE(msgBuf,'(A)')
                0525 c     &    'STREAMICE_READPARMS: read flux_ctrl param block'
                0526 c      CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0527 c     &    SQUEEZE_RIGHT , 1)
                0528 c#ifdef SINGLE_DISK_IO
                0529 c      CLOSE(iUnit)
                0530 c#else
                0531 c      CLOSE(iUnit,STATUS='DELETE')
                0532 c#endif /* SINGLE_DISK_IO */
                0533 c#endif
5ca83cd8f7 Dani*0534 
                0535       streamice_nstep_velocity = NINT (streamice_vel_update / deltaT)
                0536 
                0537 C-    Set Output type flags :
02e2d7ff52 Jean*0538 
5ca83cd8f7 Dani*0539 #ifdef ALLOW_MNC
                0540       IF (useMNC) THEN
                0541         IF ( .NOT.outputTypesInclusive
                0542      &       .AND. STREAMICE_tave_mnc ) STREAMICE_tave_mdsio = .FALSE.
                0543         IF ( .NOT.outputTypesInclusive
                0544      &       .AND. STREAMICE_dump_mnc ) STREAMICE_dump_mdsio = .FALSE.
                0545       ENDIF
                0546 #endif
                0547 
07e785229e dngo*0548 #ifdef ALLOW_PETSC
                0549       IF (streamice_maxnliter_petsc.eq.-1) then
                0550        streamice_maxnliter_petsc = streamice_max_nl_iter
                0551       ENDIF
                0552 #endif
                0553 
5ca83cd8f7 Dani*0554       _END_MASTER(myThid)
                0555 
                0556 C--   Everyone else must wait for the parameters to be loaded
                0557       _BARRIER
                0558 
                0559 #endif /* ALLOW_STREAMICE */
                0560 
                0561       RETURN
                0562       END