/[MITgcm]/MITgcm/pkg/streamice/streamice_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/streamice/streamice_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6 by dgoldberg, Thu Jul 10 15:09:40 2014 UTC revision 1.12 by dgoldberg, Mon Jun 15 14:31:59 2015 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
   
4  C this needs changes  C this needs changes
5    
6  #include "STREAMICE_OPTIONS.h"  #include "STREAMICE_OPTIONS.h"
# Line 20  C     !USES: Line 19  C     !USES:
19  #include "PARAMS.h"  #include "PARAMS.h"
20  #include "STREAMICE.h"  #include "STREAMICE.h"
21  #include "STREAMICE_BDRY.h"  #include "STREAMICE_BDRY.h"
22  #ifdef ALLOW_STREAMICE_FLUX_CONTROL  !#ifdef ALLOW_STREAMICE_FLUX_CONTROL
23  #include "STREAMICE_CTRL_FLUX.h"        !#include "STREAMICE_CTRL_FLUX.h"
24  #endif  !#endif
25    
26  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
27        INTEGER myThid        INTEGER myThid
# Line 39  C     iUnit      :: Work variable for IO Line 38  C     iUnit      :: Work variable for IO
38        NAMELIST /STREAMICE_PARM01/        NAMELIST /STREAMICE_PARM01/
39       &     streamice_density, streamice_density_ocean_avg,       &     streamice_density, streamice_density_ocean_avg,
40       &     B_glen_isothermal, n_glen, eps_glen_min, eps_u_min,       &     B_glen_isothermal, n_glen, eps_glen_min, eps_u_min,
41       &     C_basal_fric_const, n_basal_friction,       &     C_basal_fric_const, n_basal_friction,
42       &     streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol,       &     streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol,
43       &     streamice_nonlin_tol_fp,       &     streamice_nonlin_tol_fp,
44       &     streamice_max_cg_iter, streamice_max_nl_iter,       &     streamice_max_cg_iter, streamice_max_nl_iter,
45         &     streamice_maxcgiter_cpl, streamice_maxnliter_cpl,
46       &     STREAMICEthickInit,       &     STREAMICEthickInit,
47       &     STREAMICEsigcoordInit,       &     STREAMICEsigcoordInit,
48       &     STREAMICEsigcoordFile,       &     STREAMICEsigcoordFile,
49       &     STREAMICEthickFile,       &     STREAMICEthickFile,
50       &     STREAMICEcalveMaskFile,       &     STREAMICEcalveMaskFile,
51       &     STREAMICEcostMaskFile,       &     STREAMICEcostMaskFile,
      &     STREAMICEison,  
52       &     STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,       &     STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
53       &     STREAMICE_dump_mnc, STREAMICE_tave_mnc,       &     STREAMICE_dump_mnc, STREAMICE_tave_mnc,
54       &     STREAMICE_move_front,       &     STREAMICE_move_front,
# Line 73  C     iUnit      :: Work variable for IO Line 72  C     iUnit      :: Work variable for IO
72       &     STREAMICEuFaceBdryFile,       &     STREAMICEuFaceBdryFile,
73       &     STREAMICEvFaceBdryFile,       &     STREAMICEvFaceBdryFile,
74       &     STREAMICEuDirichValsFile,       &     STREAMICEuDirichValsFile,
75       &     STREAMICEvDirichValsFile,       &     STREAMICEvDirichValsFile,
76       &     STREAMICEuMassFluxFile,       &     STREAMICEuMassFluxFile,
77       &     STREAMICEvMassFluxFile,       &     STREAMICEvMassFluxFile,
78       &     STREAMICEuNormalStressFile,       &     STREAMICEuNormalStressFile,
79       &     STREAMICEvNormalStressFile,       &     STREAMICEvNormalStressFile,
80       &     STREAMICEuShearStressFile,       &     STREAMICEuShearStressFile,
# Line 84  C     iUnit      :: Work variable for IO Line 83  C     iUnit      :: Work variable for IO
83       &     STREAMICEvNormalTimeDepFile,       &     STREAMICEvNormalTimeDepFile,
84       &     STREAMICEuShearTimeDepFile,       &     STREAMICEuShearTimeDepFile,
85       &     STREAMICEvShearTimeDepFile,       &     STREAMICEvShearTimeDepFile,
86         &     STREAMICEuFluxTimeDepFile, STREAMICEvFluxTimeDepFile,
87       &     STREAMICEGlenConstFile, STREAMICEGlenConstConfig,       &     STREAMICEGlenConstFile, STREAMICEGlenConstConfig,
88       &     STREAMICE_ppm_driving_stress,       &     STREAMICE_ppm_driving_stress,
89       &     STREAMICE_h_ctrl_const_surf,       &     STREAMICE_h_ctrl_const_surf,
90       &     streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel,       &     streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel,
91       &     streamice_wgt_avthick, streamice_wgt_tikh,       &     streamice_wgt_avthick, streamice_wgt_tikh,
92       &     streamice_addl_backstress,       &     streamice_addl_backstress,
93       &     streamice_smooth_gl_width,       &     streamice_smooth_gl_width,
94       &     streamice_adot_uniform,       &     streamice_adot_uniform,
95       &     STREAMICE_ADV_SCHEME, streamice_forcing_period       &     STREAMICE_ADV_SCHEME, streamice_forcing_period,
96         &     STREAMICE_chkfixedptconvergence,
97         &     STREAMICE_chkresidconvergence,
98         &     STREAMICE_allow_cpl
99    
100  #ifdef ALLOW_STREAMICE_2DTRACER  #ifdef ALLOW_STREAMICE_2DTRACER
101        NAMELIST /STREAMICE_PARMTRACER/        NAMELIST /STREAMICE_PARMTRACER/
# Line 103  C     iUnit      :: Work variable for IO Line 106  C     iUnit      :: Work variable for IO
106    
107  #ifdef ALLOW_PETSC  #ifdef ALLOW_PETSC
108        NAMELIST /STREAMICE_PARMPETSC/        NAMELIST /STREAMICE_PARMPETSC/
109       &     PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE       &     PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE,
110         &     streamice_use_petsc
111  #endif  #endif
112    
113  #ifdef ALLOW_STREAMICE_FLUX_CONTROL  #if (defined (ALLOW_OPENAD) && defined (ALLOW_STREAMICE_OAD_FP))
114        NAMELIST /STREAMICE_PARMFLUXCTRL/        NAMELIST /STREAMICE_PARMOAD/
115       &     n_fluxes, n_epochs,       &     streamice_nonlin_tol_adjoint
116       &     streamice_ctrl_flux_id,  #ifdef ALLOW_PETSC
117       &     streamice_ctrl_flux_scaleVel       &     ,STREAMICE_OAD_petsc_reuse,
118         &     PETSC_PRECOND_OAD
119    #endif
120  #endif  #endif
121    
122    !#ifdef ALLOW_STREAMICE_FLUX_CONTROL
123    !      NAMELIST /STREAMICE_PARMFLUXCTRL/
124    !     &     n_fluxes, n_epochs,
125    !     &     streamice_ctrl_flux_id,
126    !     &     streamice_ctrl_flux_scaleVel
127    !#endif
128    
129        NAMELIST /STREAMICE_PARM02/        NAMELIST /STREAMICE_PARM02/
130       &     shelf_max_draft,       &     shelf_max_draft,
# Line 147  C     iUnit      :: Work variable for IO Line 159  C     iUnit      :: Work variable for IO
159       &     flux_bdry_val_WEST, flux_bdry_val_EAST,       &     flux_bdry_val_WEST, flux_bdry_val_EAST,
160       &     STREAMICE_NS_periodic, STREAMICE_EW_periodic       &     STREAMICE_NS_periodic, STREAMICE_EW_periodic
161    
162    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
163    
164          IF ( .NOT.useStreamIce ) THEN
165    C-    pkg STREAMICE is not used
166            _BEGIN_MASTER(myThid)
167    C-    Track pkg activation status:
168             STREAMICEisOn = .FALSE.
169    C     print a (weak) warning if data.streamice is found
170             CALL PACKAGES_UNUSED_MSG( 'useStreamIce', ' ', ' ' )
171            _END_MASTER(myThid)
172            RETURN
173          ENDIF
174    
175        _BEGIN_MASTER(myThid)        _BEGIN_MASTER(myThid)
176    
177    C This routine has been called by the main model so we set our
178    C internal flag to indicate we are in business
179          STREAMICEisOn = .TRUE.
180    
181  C--   Default values for STREAMICE  C--   Default values for STREAMICE
182    
183        streamice_density = 917.        streamice_density = 917.
184        streamice_density_ocean_avg = 1024.        streamice_density_ocean_avg = 1024.
185        B_glen_isothermal = 9.461e-18   !  Pa (-1/3) a        B_glen_isothermal = 9.461e-18   !  Pa (-1/3) a
186        n_glen = 3.        n_glen = 3.
# Line 159  C--   Default values for STREAMICE Line 188  C--   Default values for STREAMICE
188        eps_u_min = 1.0e-6        eps_u_min = 1.0e-6
189        C_basal_fric_const = 31.71 ! Pa (m/a)-1n        C_basal_fric_const = 31.71 ! Pa (m/a)-1n
190        n_basal_friction = 1.        n_basal_friction = 1.
191        streamice_vel_update = 169200. ! seconds        streamice_vel_update = deltaT ! seconds
192        streamice_cg_tol = 1e-6        streamice_cg_tol = 1e-6
193        streamice_nonlin_tol = 1e-6        streamice_nonlin_tol = 1e-6
194        streamice_nonlin_tol_fp = 1.e-14        streamice_nonlin_tol_fp = 1.e-14
195    #if (defined (ALLOW_OPENAD) && defined (ALLOW_STREAMICE_OAD_FP))
196          streamice_nonlin_tol_adjoint = 1.e-14
197    #ifdef ALLOW_PETSC
198          PETSC_PRECOND_OAD = 'MUMPS'
199          STREAMICE_OAD_petsc_reuse =.false.
200    #endif
201    #endif
202        streamice_max_cg_iter = 2000        streamice_max_cg_iter = 2000
203        streamice_max_nl_iter = 100        streamice_max_nl_iter = 100
204          streamice_maxcgiter_cpl = 0
205          streamice_maxnliter_cpl = 0
206  !      streamice_n_sub_regularize = 4  !      streamice_n_sub_regularize = 4
207        streamice_CFL_factor = .5        streamice_CFL_factor = .5
208        streamice_adjDump = 0.        streamice_adjDump = 0.
# Line 174  C--   Default values for STREAMICE Line 212  C--   Default values for STREAMICE
212        streamice_ky_b_init = 1.        streamice_ky_b_init = 1.
213        streamice_wgt_drift = 0.        streamice_wgt_drift = 0.
214        streamice_wgt_tikh = 0.        streamice_wgt_tikh = 0.
215        streamice_wgt_surf = 0.            streamice_wgt_surf = 0.
216        streamice_wgt_vel = 0.            streamice_wgt_vel = 0.
217        streamice_wgt_avthick = 0.        streamice_wgt_avthick = 0.
218        streamice_addl_backstress = 0.0        streamice_addl_backstress = 0.0
219        streamice_smooth_gl_width = 0.0        streamice_smooth_gl_width = 0.0
# Line 205  C--   Default values for STREAMICE Line 243  C--   Default values for STREAMICE
243        STREAMICEvNormalTimeDepFile = ' '        STREAMICEvNormalTimeDepFile = ' '
244        STREAMICEuShearTimeDepFile = ' '        STREAMICEuShearTimeDepFile = ' '
245        STREAMICEvShearTimeDepFile = ' '        STREAMICEvShearTimeDepFile = ' '
246          STREAMICEuFluxTimeDepFile = ' '
247          STREAMICEvFluxTimeDepFile = ' '
248    
249  #ifdef ALLOW_STREAMICE_2DTRACER  #ifdef ALLOW_STREAMICE_2DTRACER
250        STREAMICETrac2DBCxFile = ''        STREAMICETrac2DBCxFile = ''
# Line 223  C--   Default values for STREAMICE Line 263  C--   Default values for STREAMICE
263  #ifdef ALLOW_PETSC  #ifdef ALLOW_PETSC
264        PETSC_PRECOND_TYPE = 'PCBJACOBI'        PETSC_PRECOND_TYPE = 'PCBJACOBI'
265        PETSC_SOLVER_TYPE = 'KSPCG'        PETSC_SOLVER_TYPE = 'KSPCG'
266          streamice_use_petsc = .true.
267  #endif  #endif
268        STREAMICE_ADV_SCHEME = ''        STREAMICE_ADV_SCHEME = ''
269    
270  #ifdef ALLOW_STREAMICE_FLUX_CONTROL  !#ifdef ALLOW_STREAMICE_FLUX_CONTROL
271        n_fluxes = 0  !      n_fluxes = 0
272        n_epochs = 0  !      n_epochs = 0
273        DO iarr=1,n_fluxes_max  !      DO iarr=1,n_fluxes_max
274         streamice_ctrl_flux_id(iarr) = 0  !       streamice_ctrl_flux_id(iarr) = 0
275         DO tarr=1,n_epochs_max  !       DO tarr=1,n_epochs_max
276          streamice_ctrl_flux_scaleVel(iarr,tarr) = 0. _d 0  !        streamice_ctrl_flux_scaleVel(iarr,tarr) = 0. _d 0
277         ENDDO  !       ENDDO
278        ENDDO  !      ENDDO
279  #endif  !#endif
280    
       STREAMICEison = .TRUE.  
281        STREAMICE_tave_mdsio = .TRUE.        STREAMICE_tave_mdsio = .TRUE.
282        STREAMICE_dump_mdsio = .TRUE.        STREAMICE_dump_mdsio = .TRUE.
283        STREAMICE_dump_mnc = .FALSE.        STREAMICE_dump_mnc = .FALSE.
284        STREAMICE_tave_mnc = .FALSE.        STREAMICE_tave_mnc = .FALSE.
285  !      STREAMICE_GL_regularize = .FALSE.  !      STREAMICE_GL_regularize = .FALSE.
286        STREAMICE_move_front = .FALSE.        STREAMICE_move_front = .FALSE.
# Line 250  C--   Default values for STREAMICE Line 290  C--   Default values for STREAMICE
290        STREAMICE_lower_cg_tol = .FALSE.        STREAMICE_lower_cg_tol = .FALSE.
291        STREAMICE_diagnostic_only = .FALSE.        STREAMICE_diagnostic_only = .FALSE.
292        STREAMICE_ppm_driving_stress = .FALSE.        STREAMICE_ppm_driving_stress = .FALSE.
293          STREAMICE_chkfixedptconvergence = .true.
294          STREAMICE_chkresidconvergence = .true.
295        STREAMICE_h_ctrl_const_surf = .FALSE.        STREAMICE_h_ctrl_const_surf = .FALSE.
296          STREAMICE_allow_cpl = .false.
297  !       STREAMICE_hybrid_stress= .FALSE.  !       STREAMICE_hybrid_stress= .FALSE.
298    
299        min_x_noflow_NORTH = 0.        min_x_noflow_NORTH = 0.
# Line 295  C--   Default values for STREAMICE Line 338  C--   Default values for STREAMICE
338        flux_bdry_val_EAST = 0.        flux_bdry_val_EAST = 0.
339    
340        STREAMICE_NS_periodic = .FALSE.        STREAMICE_NS_periodic = .FALSE.
341        STREAMICE_EW_periodic = .FALSE.        STREAMICE_EW_periodic = .FALSE.
342    
343        WRITE(msgBuf,'(A)') 'STREAMICE_READPARMS: opening data.streamice'        WRITE(msgBuf,'(A)') 'STREAMICE_READPARMS: opening data.streamice'
344        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
# Line 336  C     Read parameters from open data fil Line 379  C     Read parameters from open data fil
379       &    SQUEEZE_RIGHT , 1)       &    SQUEEZE_RIGHT , 1)
380  #endif  #endif
381    
382    #if (defined (ALLOW_OPENAD) && defined (ALLOW_STREAMICE_OAD_FP))
383        READ(UNIT=iUnit,NML=STREAMICE_PARM03)        READ(UNIT=iUnit,NML=STREAMICE_PARMOAD)
384        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
385       &    'STREAMICE_READPARMS: read third param block'       &    'STREAMICE_READPARMS: read oad parm block'
386        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
387       &    SQUEEZE_RIGHT , 1)       &    SQUEEZE_RIGHT , 1)
388        CLOSE(iUnit)  #endif
   
   
 #ifdef ALLOW_STREAMICE_FLUX_CONTROL  
   
       CALL OPEN_COPY_DATA_FILE(  
      I                     'data.strmctrlflux', 'STREAMICE_READPARMS',  
      O                     iUnit,  
      I                     myThid )  
   
389    
390        READ(UNIT=iUnit,NML=STREAMICE_PARMFLUXCTRL)        READ(UNIT=iUnit,NML=STREAMICE_PARM03)
391        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
392       &    'STREAMICE_READPARMS: read flux_ctrl param block'       &    'STREAMICE_READPARMS: read third param block'
393        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
394       &    SQUEEZE_RIGHT , 1)       &    SQUEEZE_RIGHT , 1)
395        CLOSE(iUnit)        CLOSE(iUnit)
 #endif  
   
396    
397    !#ifdef ALLOW_STREAMICE_FLUX_CONTROL
398    !
399    !      CALL OPEN_COPY_DATA_FILE(
400    !     I                     'data.strmctrlflux', 'STREAMICE_READPARMS',
401    !     O                     iUnit,
402    !     I                     myThid )
403    !
404    !      READ(UNIT=iUnit,NML=STREAMICE_PARMFLUXCTRL)
405    !      WRITE(msgBuf,'(A)')
406    !     &    'STREAMICE_READPARMS: read flux_ctrl param block'
407    !      CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
408    !     &    SQUEEZE_RIGHT , 1)
409    !      CLOSE(iUnit)
410    !#endif
411    
412        streamice_nstep_velocity = NINT (streamice_vel_update / deltaT)        streamice_nstep_velocity = NINT (streamice_vel_update / deltaT)
413    
414  C-    Set Output type flags :  C-    Set Output type flags :
415          
416  #ifdef ALLOW_MNC  #ifdef ALLOW_MNC
417        IF (useMNC) THEN        IF (useMNC) THEN
418          IF ( .NOT.outputTypesInclusive          IF ( .NOT.outputTypesInclusive

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22