45 |
|
|
46 |
C ZERO OUT FLOATING POINT ARRAYS |
C ZERO OUT FLOATING POINT ARRAYS |
47 |
|
|
48 |
|
|
49 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
50 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
51 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
61 |
area_shelf_streamice(i,j,bi,bj) = 0. _d 0 |
area_shelf_streamice(i,j,bi,bj) = 0. _d 0 |
62 |
mass_ice_streamice(i,j,bi,bj) = 0. _d 0 |
mass_ice_streamice(i,j,bi,bj) = 0. _d 0 |
63 |
BDOT_streamice(i,j,bi,bj) = 0. _d 0 |
BDOT_streamice(i,j,bi,bj) = 0. _d 0 |
64 |
! C_basal_friction(i,j,bi,bj) = C_basal_fric_const |
ADOT_streamice(i,j,bi,bj) = 0. _d 0 |
65 |
A_glen(i,j,bi,bj) = A_glen_isothermal |
C_basal_friction(i,j,bi,bj) = C_basal_fric_const |
66 |
|
B_glen(i,j,bi,bj) = B_glen_isothermal |
67 |
H_streamice_prev(i,j,bi,bj) = 0. _d 0 |
H_streamice_prev(i,j,bi,bj) = 0. _d 0 |
68 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
69 |
ru_old_si(i,j,bi,bj) = 0. _d 0 |
ru_old_si(i,j,bi,bj) = 0. _d 0 |
133 |
|
|
134 |
#ifdef USE_ALT_RLOW |
#ifdef USE_ALT_RLOW |
135 |
! init alternate array for topog |
! init alternate array for topog |
136 |
IF ( bathyFile .NE. ' ' ) THEN |
IF ( STREAMICEtopogFile .NE. ' ' ) THEN |
137 |
_BARRIER |
_BARRIER |
138 |
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
139 |
CALL READ_FLD_XY_RS( bathyFile, '', |
CALL READ_FLD_XY_RS( STREAMICEtopogFile, '', |
140 |
& R_low_si, 0, myThid ) |
& R_low_si, 0, myThid ) |
141 |
|
|
142 |
ELSE |
ELSE |
147 |
#endif |
#endif |
148 |
|
|
149 |
! initialize thickness |
! initialize thickness |
150 |
|
|
151 |
|
#ifndef STREAMICE_GEOM_FILE_SETUP |
152 |
|
|
153 |
IF ( STREAMICEthickInit.EQ.'PARAM' ) THEN |
IF ( STREAMICEthickInit.EQ.'PARAM' ) THEN |
154 |
|
|
215 |
IF ( STREAMICEthickFile .NE. ' ' ) THEN |
IF ( STREAMICEthickFile .NE. ' ' ) THEN |
216 |
_BARRIER |
_BARRIER |
217 |
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
218 |
CALL READ_FLD_XY_RS( STREAMICEthickFile, ' ', H_streamice, |
CALL READ_FLD_XY_RL( STREAMICEthickFile, ' ', H_streamice, |
219 |
& 0, myThid ) |
& 0, myThid ) |
220 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
221 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
233 |
STREAMICE_hmask(i,j,bi,bj) = 0. _d 0 |
STREAMICE_hmask(i,j,bi,bj) = 0. _d 0 |
234 |
ENDIF |
ENDIF |
235 |
Do k=1,Nr |
Do k=1,Nr |
236 |
STREAMICE_ctrl_mask(i,j,bi,bj,k) = 1. _d 0 |
STREAMICE_ctrl_mask(i,j,k,bi,bj) = 1. _d 0 |
237 |
enddo |
enddo |
238 |
ENDIF |
ENDIF |
239 |
ENDDO |
ENDDO |
253 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , 1) |
254 |
ENDIF |
ENDIF |
255 |
|
|
256 |
|
#else |
257 |
|
! STREAMICE_GEOM_FILE_SETUP - init thickness and hmask MUST come from file |
258 |
|
|
259 |
|
IF ( STREAMICEthickFile .NE. ' ' ) THEN |
260 |
|
_BARRIER |
261 |
|
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
262 |
|
CALL READ_FLD_XY_RL( STREAMICEthickFile, ' ', H_streamice, |
263 |
|
& 0, myThid ) |
264 |
|
ELSE |
265 |
|
WRITE(msgBuf,'(A)') 'INIT THICKNESS - FILENAME MISSING' |
266 |
|
CALL PRINT_ERROR( msgBuf, myThid) |
267 |
|
ENDIF |
268 |
|
|
269 |
|
IF ( STREAMICEhMaskFile .NE. ' ' ) THEN |
270 |
|
_BARRIER |
271 |
|
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
272 |
|
CALL READ_FLD_XY_RS( STREAMICEhMaskFile, ' ', STREAMICE_hmask, |
273 |
|
& 0, myThid ) |
274 |
|
ELSE |
275 |
|
WRITE(msgBuf,'(A)') 'INIT HMASK - FILENAME MISSING' |
276 |
|
CALL PRINT_ERROR( msgBuf, myThid) |
277 |
|
ENDIF |
278 |
|
|
279 |
|
#endif |
280 |
|
! STREAMICE_GEOM_FILE_SETUP |
281 |
|
|
282 |
|
|
283 |
! finish initialize thickness |
! finish initialize thickness |
284 |
|
|
285 |
|
! initialize glen constant |
286 |
|
|
287 |
|
IF ( STREAMICEGlenConstConfig.EQ.'FILE' ) THEN |
288 |
|
|
289 |
|
IF ( STREAMICEGlenConstFile .NE. ' ' ) THEN |
290 |
|
_BARRIER |
291 |
|
|
292 |
|
CALL READ_FLD_XY_RL( STREAMICEGlenConstFile, ' ', |
293 |
|
& B_glen, 0, myThid ) |
294 |
|
|
295 |
|
ELSE |
296 |
|
WRITE(msgBuf,'(A)') 'INIT GLEN - FILENAME MISSING' |
297 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
298 |
|
& SQUEEZE_RIGHT , 1) |
299 |
|
ENDIF |
300 |
|
|
301 |
|
ELSE IF (STREAMICEGlenConstConfig.EQ.'UNIFORM' ) THEN |
302 |
|
|
303 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
304 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
305 |
|
DO j=1,sNy |
306 |
|
DO i=1,sNx |
307 |
|
B_glen(i,j,bi,bj) = B_glen_isothermal |
308 |
|
ENDDO |
309 |
|
ENDDO |
310 |
|
ENDDO |
311 |
|
ENDDO |
312 |
|
|
313 |
|
ELSE |
314 |
|
|
315 |
|
WRITE(msgBuf,'(A)') 'INIT GLEN CONSTANT - NOT IMPLENTED' |
316 |
|
CALL PRINT_ERROR( msgBuf, myThid) |
317 |
|
STOP 'ABNORMAL END: S/R STREAMICE_INIT_VAR' |
318 |
|
ENDIF |
319 |
|
|
320 |
|
! finish initialize glen constant |
321 |
|
|
322 |
! initialize basal traction |
! initialize basal traction |
323 |
|
|
324 |
IF ( STREAMICEbasalTracConfig.EQ.'FILE' ) THEN |
IF ( STREAMICEbasalTracConfig.EQ.'FILE' ) THEN |
325 |
|
|
326 |
IF ( STREAMICEbasalTracFile .NE. ' ' ) THEN |
IF ( STREAMICEbasalTracFile .NE. ' ' ) THEN |
327 |
_BARRIER |
_BARRIER |
328 |
C The 0 is the "iteration" argument. The ' ' is an empty suffix |
|
329 |
CALL READ_FLD_XY_RS( STREAMICEbasalTracFile, ' ', |
CALL READ_FLD_XY_RL( STREAMICEbasalTracFile, ' ', |
330 |
& C_basal_friction, 0, myThid ) |
& C_basal_friction, 0, myThid ) |
331 |
|
|
332 |
ELSE |
ELSE |
333 |
WRITE(msgBuf,'(A)') 'INIT THICKNESS - FILENAME MISSING' |
WRITE(msgBuf,'(A)') 'INIT C_BASAL - FILENAME MISSING' |
334 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
335 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , 1) |
336 |
ENDIF |
ENDIF |
393 |
STOP 'ABNORMAL END: S/R STREAMICE_INIT_VAR' |
STOP 'ABNORMAL END: S/R STREAMICE_INIT_VAR' |
394 |
ENDIF |
ENDIF |
395 |
|
|
396 |
! finish initialize basal traction |
! finish initialize basal trac |
397 |
|
|
398 |
CALL STREAMICE_UPD_FFRAC_UNCOUPLED ( myThid ) |
CALL STREAMICE_UPD_FFRAC_UNCOUPLED ( myThid ) |
399 |
|
|
401 |
_EXCH_XY_RL(STREAMICE_hmask, myThid ) |
_EXCH_XY_RL(STREAMICE_hmask, myThid ) |
402 |
_EXCH_XY_RL(area_shelf_streamice, myThid ) |
_EXCH_XY_RL(area_shelf_streamice, myThid ) |
403 |
_EXCH_XY_RL(C_basal_friction, myThid ) |
_EXCH_XY_RL(C_basal_friction, myThid ) |
404 |
|
_EXCH_XY_RL(B_glen, myThid ) |
405 |
#ifdef USE_ALT_RLOW |
#ifdef USE_ALT_RLOW |
406 |
_EXCH_XY_RL(R_low_si, myThid ) |
_EXCH_XY_RL(R_low_si, myThid ) |
407 |
#endif |
#endif |
426 |
|
|
427 |
CALL WRITE_FLD_XY_RL ( "C_basal_fric", "", |
CALL WRITE_FLD_XY_RL ( "C_basal_fric", "", |
428 |
& C_basal_friction, 0, myThid ) |
& C_basal_friction, 0, myThid ) |
429 |
|
CALL WRITE_FLD_XY_RL ( "B_glen_sqrt", "", |
430 |
|
& B_glen, 0, myThid ) |
431 |
CALL WRITE_FLD_XY_RL ( "H_streamice", "init", |
CALL WRITE_FLD_XY_RL ( "H_streamice", "init", |
432 |
& H_streamIce, 0, myThid ) |
& H_streamIce, 0, myThid ) |
433 |
CALL WRITE_FLD_XY_RL ( "area_shelf_streamice", "init", |
CALL WRITE_FLD_XY_RL ( "area_shelf_streamice", "init", |
456 |
! CALL WRITE_FULLARRAY_RL ("H",H_streamice,1,0,0,1,0,myThid) |
! CALL WRITE_FULLARRAY_RL ("H",H_streamice,1,0,0,1,0,myThid) |
457 |
! CALL WRITE_FULLARRAY_RL ("hmask",STREAMICE_hmask,1,0,0,1,0,myThid) |
! CALL WRITE_FULLARRAY_RL ("hmask",STREAMICE_hmask,1,0,0,1,0,myThid) |
458 |
! CALL WRITE_FULLARRAY_RL ("umask",STREAMICE_umask,1,0,0,1,0,myThid) |
! CALL WRITE_FULLARRAY_RL ("umask",STREAMICE_umask,1,0,0,1,0,myThid) |
459 |
|
|
460 |
|
|
461 |
|
|
462 |
#endif /* ALLOW_STREAMICE */ |
#endif /* ALLOW_STREAMICE */ |
463 |
|
|