20 |
#include "PARAMS.h" |
#include "PARAMS.h" |
21 |
#include "STREAMICE.h" |
#include "STREAMICE.h" |
22 |
#include "STREAMICE_BDRY.h" |
#include "STREAMICE_BDRY.h" |
23 |
|
#ifdef ALLOW_STREAMICE_FLUX_CONTROL |
24 |
|
#include "STREAMICE_CTRL_FLUX.h" |
25 |
|
#endif |
26 |
|
|
27 |
C !INPUT PARAMETERS: |
C !INPUT PARAMETERS: |
28 |
INTEGER myThid |
INTEGER myThid |
34 |
C msgBuf :: Informational/error message buffer |
C msgBuf :: Informational/error message buffer |
35 |
C iUnit :: Work variable for IO unit number |
C iUnit :: Work variable for IO unit number |
36 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
37 |
INTEGER iUnit |
INTEGER iUnit, iarr, tarr |
38 |
|
|
39 |
NAMELIST /STREAMICE_PARM01/ |
NAMELIST /STREAMICE_PARM01/ |
40 |
& streamice_density, streamice_density_ocean_avg, |
& streamice_density, streamice_density_ocean_avg, |
55 |
& STREAMICE_dump_mnc, STREAMICE_tave_mnc, |
& STREAMICE_dump_mnc, STREAMICE_tave_mnc, |
56 |
& STREAMICE_GL_regularize, STREAMICE_move_front, |
& STREAMICE_GL_regularize, STREAMICE_move_front, |
57 |
& STREAMICE_calve_to_mask, |
& STREAMICE_calve_to_mask, |
|
! & STREAMICE_geom_file_setup, |
|
58 |
& STREAMICE_diagnostic_only, |
& STREAMICE_diagnostic_only, |
|
! & STREAMICE_construct_matrix, |
|
59 |
& STREAMICE_lower_cg_tol, |
& STREAMICE_lower_cg_tol, |
60 |
& streamice_CFL_factor, |
& streamice_CFL_factor, |
61 |
& streamice_adjDump, |
& streamice_adjDump, |
|
! & STREAMICE_hybrid_stress, |
|
62 |
& streamice_bg_surf_slope_x, streamice_bg_surf_slope_y, |
& streamice_bg_surf_slope_x, streamice_bg_surf_slope_y, |
63 |
& streamice_kx_b_init, streamice_ky_b_init, |
& streamice_kx_b_init, streamice_ky_b_init, |
64 |
& STREAMICEbasalTracConfig, |
& STREAMICEbasalTracConfig, |
66 |
& STREAMICEvelOptimFile, |
& STREAMICEvelOptimFile, |
67 |
& STREAMICEtopogFile, |
& STREAMICEtopogFile, |
68 |
& STREAMICEhmaskFile, |
& STREAMICEhmaskFile, |
69 |
|
& STREAMICEHBCyFile, |
70 |
|
& STREAMICEHBCxFile, |
71 |
& STREAMICEuFaceBdryFile, |
& STREAMICEuFaceBdryFile, |
72 |
& STREAMICEvFaceBdryFile, |
& STREAMICEvFaceBdryFile, |
73 |
& STREAMICEuDirichValsFile, |
& STREAMICEuDirichValsFile, |
74 |
& STREAMICEvDirichValsFile, |
& STREAMICEvDirichValsFile, |
75 |
& STREAMICEGlenConstFile, STREAMICEGlenConstConfig, |
& STREAMICEGlenConstFile, STREAMICEGlenConstConfig, |
|
& STREAMICEBdotFile, STREAMICEBdotConfig, |
|
76 |
& STREAMICE_ppm_driving_stress, |
& STREAMICE_ppm_driving_stress, |
77 |
& STREAMICE_h_ctrl_const_surf, |
& STREAMICE_h_ctrl_const_surf, |
78 |
& streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel, |
& streamice_wgt_drift,streamice_wgt_surf,streamice_wgt_vel, |
79 |
& streamice_wgt_avthick, streamice_wgt_tikh, |
& streamice_wgt_avthick, streamice_wgt_tikh, |
80 |
& streamice_addl_backstress, |
& streamice_addl_backstress, |
81 |
& streamice_smooth_gl_width, |
& streamice_smooth_gl_width, |
82 |
& PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE |
& STREAMICE_ADV_SCHEME |
83 |
|
|
84 |
|
#ifdef ALLOW_STREAMICE_2DTRACER |
85 |
|
NAMELIST /STREAMICE_PARMTRACER/ |
86 |
|
& STREAMICETrac2DBCxFile, |
87 |
|
& STREAMICETrac2DBCyFile, |
88 |
|
& STREAMICETrac2DINITFile |
89 |
|
#endif |
90 |
|
|
91 |
|
#ifdef ALLOW_PETSC |
92 |
|
NAMELIST /STREAMICE_PARMPETSC/ |
93 |
|
& PETSC_PRECOND_TYPE, PETSC_SOLVER_TYPE |
94 |
|
#endif |
95 |
|
|
96 |
|
#ifdef ALLOW_STREAMICE_FLUX_CONTROL |
97 |
|
NAMELIST /STREAMICE_PARMFLUXCTRL/ |
98 |
|
& n_fluxes, n_epochs, |
99 |
|
& streamice_ctrl_flux_id, |
100 |
|
& streamice_ctrl_flux_scaleVel |
101 |
|
#endif |
102 |
|
|
103 |
|
|
104 |
NAMELIST /STREAMICE_PARM02/ |
NAMELIST /STREAMICE_PARM02/ |
177 |
STREAMICEvelOptimFile = '' |
STREAMICEvelOptimFile = '' |
178 |
STREAMICEtopogFile = '' |
STREAMICEtopogFile = '' |
179 |
STREAMICEhmaskFile = '' |
STREAMICEhmaskFile = '' |
180 |
|
STREAMICEHBCyFile = '' |
181 |
|
STREAMICEHBCxFile = '' |
182 |
|
#ifdef ALLOW_STREAMICE_2DTRACER |
183 |
|
STREAMICETrac2DBCxFile = '' |
184 |
|
STREAMICETrac2DBCyFile = '' |
185 |
|
STREAMICETrac2DInitFile = '' |
186 |
|
#endif |
187 |
STREAMICEuFaceBdryFile = '' |
STREAMICEuFaceBdryFile = '' |
188 |
STREAMICEvFaceBdryFile = '' |
STREAMICEvFaceBdryFile = '' |
189 |
STREAMICEuDirichValsFile = '' |
STREAMICEuDirichValsFile = '' |
190 |
STREAMICEvDirichValsFile = '' |
STREAMICEvDirichValsFile = '' |
191 |
STREAMICEGlenConstFile = '' |
STREAMICEGlenConstFile = '' |
|
STREAMICEBdotFile = '' |
|
192 |
STREAMICEcostMaskFile = '' |
STREAMICEcostMaskFile = '' |
193 |
STREAMICEGlenConstConfig = 'UNIFORM' |
STREAMICEGlenConstConfig = 'UNIFORM' |
194 |
STREAMICEBdotConfig = ' ' |
#ifdef ALLOW_PETSC |
195 |
PETSC_PRECOND_TYPE = 'PCBJACOBI' |
PETSC_PRECOND_TYPE = 'PCBJACOBI' |
196 |
PETSC_SOLVER_TYPE = 'KSPCG' |
PETSC_SOLVER_TYPE = 'KSPCG' |
197 |
|
#endif |
198 |
|
STREAMICE_ADV_SCHEME = '' |
199 |
|
|
200 |
|
#ifdef ALLOW_STREAMICE_FLUX_CONTROL |
201 |
|
n_fluxes = 0 |
202 |
|
n_epochs = 0 |
203 |
|
DO iarr=1,n_fluxes_max |
204 |
|
streamice_ctrl_flux_id(iarr) = 0 |
205 |
|
DO tarr=1,n_epochs_max |
206 |
|
streamice_ctrl_flux_scaleVel(iarr,tarr) = 0. _d 0 |
207 |
|
ENDDO |
208 |
|
ENDDO |
209 |
|
#endif |
210 |
|
|
211 |
STREAMICEison = .TRUE. |
STREAMICEison = .TRUE. |
212 |
STREAMICE_tave_mdsio = .TRUE. |
STREAMICE_tave_mdsio = .TRUE. |
291 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , 1) |
292 |
ENDIF |
ENDIF |
293 |
|
|
294 |
|
#ifdef ALLOW_STREAMICE_2DTRACER |
295 |
|
READ(UNIT=iUnit,NML=STREAMICE_PARMTRACER) |
296 |
|
WRITE(msgBuf,'(A)') |
297 |
|
& 'STREAMICE_READPARMS: read tracer param block' |
298 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
299 |
|
& SQUEEZE_RIGHT , 1) |
300 |
|
#endif |
301 |
|
|
302 |
|
#ifdef ALLOW_PETSC |
303 |
|
READ(UNIT=iUnit,NML=STREAMICE_PARMPETSC) |
304 |
|
WRITE(msgBuf,'(A)') |
305 |
|
& 'STREAMICE_READPARMS: read petsc param block' |
306 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
307 |
|
& SQUEEZE_RIGHT , 1) |
308 |
|
#endif |
309 |
|
|
310 |
|
|
311 |
READ(UNIT=iUnit,NML=STREAMICE_PARM03) |
READ(UNIT=iUnit,NML=STREAMICE_PARM03) |
312 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
313 |
& 'STREAMICE_READPARMS: read third param block' |
& 'STREAMICE_READPARMS: read third param block' |
314 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
315 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , 1) |
|
C Close the open data file |
|
316 |
CLOSE(iUnit) |
CLOSE(iUnit) |
317 |
|
|
318 |
|
|
319 |
|
#ifdef ALLOW_STREAMICE_FLUX_CONTROL |
320 |
|
|
321 |
|
CALL OPEN_COPY_DATA_FILE( |
322 |
|
I 'data.strmctrlflux', 'STREAMICE_READPARMS', |
323 |
|
O iUnit, |
324 |
|
I myThid ) |
325 |
|
|
326 |
|
|
327 |
|
READ(UNIT=iUnit,NML=STREAMICE_PARMFLUXCTRL) |
328 |
|
WRITE(msgBuf,'(A)') |
329 |
|
& 'STREAMICE_READPARMS: read flux_ctrl param block' |
330 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
331 |
|
& SQUEEZE_RIGHT , 1) |
332 |
|
CLOSE(iUnit) |
333 |
|
#endif |
334 |
|
|
335 |
|
|
336 |
|
|
337 |
streamice_nstep_velocity = NINT (streamice_vel_update / deltaT) |
streamice_nstep_velocity = NINT (streamice_vel_update / deltaT) |
338 |
|
|
339 |
C- Set Output type flags : |
C- Set Output type flags : |