Changeset 14200 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90
- Timestamp:
- 2020-12-17T15:36:44+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90
r14053 r14200 18 18 !! ssh_atf : time filter the ssh arrays 19 19 !! wzv : compute now vertical velocity 20 !! ssh_init_rst : ssh set from restart or domcfg.nc file or usr_def_istat_ssh21 20 !!---------------------------------------------------------------------- 22 21 USE oce ! ocean dynamics and tracers variables … … 29 28 USE bdy_oce , ONLY : ln_bdy, bdytmask ! Open BounDarY 30 29 USE bdydyn2d ! bdy_ssh routine 30 USE wet_dry ! Wetting/Drying flux limiting 31 31 #if defined key_agrif 32 32 USE agrif_oce … … 41 41 USE lib_mpp ! MPP library 42 42 USE timing ! Timing 43 USE wet_dry ! Wetting/Drying flux limiting44 USE usrdef_istate, ONLY : usr_def_istate_ssh ! user defined ssh initial state45 43 46 44 IMPLICIT NONE … … 51 49 PUBLIC wAimp ! called by step.F90 52 50 PUBLIC ssh_atf ! called by step.F90 53 PUBLIC ssh_init_rst ! called by domain.F9054 51 55 52 !! * Substitutions … … 436 433 ! 437 434 END SUBROUTINE wAimp 438 439 440 SUBROUTINE ssh_init_rst( Kbb, Kmm, Kaa )441 !!---------------------------------------------------------------------442 !! *** ROUTINE ssh_init_rst ***443 !!444 !! ** Purpose : ssh initialization of the sea surface height (ssh)445 !!446 !! ** Method : set ssh from restart or read configuration, or user_def447 !! * ln_rstart = T448 !! USE of IOM library to read ssh in the restart file449 !! Leap-Frog: Kbb and Kmm are read except for l_1st_euler=T450 !!451 !! * otherwise452 !! call user defined ssh or453 !! set to -ssh_ref in wet and drying case with domcfg.nc454 !!455 !! NB: ssh_b/n are written by restart.F90456 !!----------------------------------------------------------------------457 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices458 !459 INTEGER :: ji, jj, jk460 !!----------------------------------------------------------------------461 !462 IF(lwp) THEN463 WRITE(numout,*)464 WRITE(numout,*) 'ssh_init_rst : ssh initialization'465 WRITE(numout,*) '~~~~~~~~~~~~ '466 ENDIF467 !468 ! !=============================!469 IF( ln_rstart ) THEN !== Read the restart file ==!470 ! !=============================!471 !472 ! !* Read ssh at Kmm473 IF(lwp) WRITE(numout,*)474 IF(lwp) WRITE(numout,*) ' Kmm sea surface height read in the restart file'475 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm) )476 !477 IF( l_1st_euler ) THEN !* Euler at first time-step478 IF(lwp) WRITE(numout,*)479 IF(lwp) WRITE(numout,*) ' Euler first time step : ssh(Kbb) = ssh(Kmm)'480 ssh(:,:,Kbb) = ssh(:,:,Kmm)481 !482 ELSE !* read ssh at Kbb483 IF(lwp) WRITE(numout,*)484 IF(lwp) WRITE(numout,*) ' Kbb sea surface height read in the restart file'485 CALL iom_get( numror, jpdom_auto, 'sshb', ssh(:,:,Kbb) )486 ENDIF487 ! !============================!488 ELSE !== Initialize at "rest" ==!489 ! !============================!490 !491 IF(lwp) WRITE(numout,*)492 IF(lwp) WRITE(numout,*) ' initialization at rest'493 !494 IF( ll_wd ) THEN !* wet and dry495 !496 IF( ln_read_cfg ) THEN ! read configuration : ssh_ref is read in domain_cfg file497 !!st why ssh is not masked : i.e. ssh(:,:,Kmm) = -ssh_ref*ssmask(:,:),498 !!st since at the 1st time step lbclnk will be applied on ssh at Kaa but not initially at Kbb and Kmm499 ssh(:,:,Kbb) = -ssh_ref500 !501 DO_2D( 1, 1, 1, 1 )502 IF( ht_0(ji,jj)-ssh_ref < rn_wdmin1 ) THEN ! if total depth is less than min depth503 ssh(ji,jj,Kbb) = rn_wdmin1 - ht_0(ji,jj)504 ENDIF505 END_2D506 ELSE ! user define configuration case507 CALL usr_def_istate_ssh( tmask, ssh(:,:,Kbb) )508 ENDIF509 !510 ELSE !* user defined configuration511 CALL usr_def_istate_ssh( tmask, ssh(:,:,Kbb) )512 !513 ENDIF514 !515 ssh(:,:,Kmm) = ssh(:,:,Kbb) !* set now values from to before ones516 ssh(:,:,Kaa) = 0._wp517 ENDIF518 !519 END SUBROUTINE ssh_init_rst520 435 521 436 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.