Changeset 14053 for NEMO/trunk/src/OCE/DYN/sshwzv.F90
- Timestamp:
- 2020-12-03T14:48:38+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/DYN/sshwzv.F90
r13497 r14053 6 6 !! History : 3.1 ! 2009-02 (G. Madec, M. Leclair) Original code 7 7 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) modified LF-RA 8 !! - ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 9 !! - ! 2010-09 (D.Storkey and E.O'Dea) bug fixes for BDY module 10 !! 3.3 ! 2011-10 (M. Leclair) split former ssh_wzv routine and remove all vvl related work 11 !! 4.0 ! 2018-12 (A. Coward) add mixed implicit/explicit advection 12 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) Rename ssh_nxt -> ssh_atf. Now only does time filtering. 8 !! - ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 9 !! - ! 2010-09 (D.Storkey and E.O'Dea) bug fixes for BDY module 10 !! 3.3 ! 2011-10 (M. Leclair) split former ssh_wzv routine and remove all vvl related work 11 !! 4.0 ! 2018-12 (A. Coward) add mixed implicit/explicit advection 12 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) Rename ssh_nxt -> ssh_atf. Now only does time filtering. 13 !! - ! 2020-08 (S. Techene, G. Madec) add here ssh initiatlisation 13 14 !!---------------------------------------------------------------------- 14 15 … … 17 18 !! ssh_atf : time filter the ssh arrays 18 19 !! wzv : compute now vertical velocity 20 !! ssh_init_rst : ssh set from restart or domcfg.nc file or usr_def_istat_ssh 19 21 !!---------------------------------------------------------------------- 20 22 USE oce ! ocean dynamics and tracers variables … … 40 42 USE timing ! Timing 41 43 USE wet_dry ! Wetting/Drying flux limiting 42 44 USE usrdef_istate, ONLY : usr_def_istate_ssh ! user defined ssh initial state 45 43 46 IMPLICIT NONE 44 47 PRIVATE 45 48 46 PUBLIC ssh_nxt ! called by step.F90 47 PUBLIC wzv ! called by step.F90 48 PUBLIC wAimp ! called by step.F90 49 PUBLIC ssh_atf ! called by step.F90 49 PUBLIC ssh_nxt ! called by step.F90 50 PUBLIC wzv ! called by step.F90 51 PUBLIC wAimp ! called by step.F90 52 PUBLIC ssh_atf ! called by step.F90 53 PUBLIC ssh_init_rst ! called by domain.F90 50 54 51 55 !! * Substitutions 52 56 # include "do_loop_substitute.h90" 53 57 # include "domzgr_substitute.h90" 54 55 58 !!---------------------------------------------------------------------- 56 59 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 299 302 ! ! filtered "now" field 300 303 pssh(:,:,Kmm) = pssh(:,:,Kmm) + rn_atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) ) 304 ! 301 305 IF( .NOT.ln_linssh ) THEN ! "now" <-- with forcing removed 302 306 zcoef = rn_atfp * rn_Dt * r1_rho0 … … 307 311 308 312 ! ice sheet coupling 309 IF ( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1) pssh(:,:,Kbb) = pssh(:,:,Kbb) - rn_atfp * rn_Dt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:) 313 IF( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1 ) & 314 & pssh(:,:,Kbb) = pssh(:,:,Kbb) - rn_atfp * rn_Dt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:) 310 315 311 316 ENDIF 312 317 ENDIF 313 318 ! 314 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=pssh(:,:,Kmm), clinfo1=' pssh(:,:,Kmm) -: ', mask1=tmask )319 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=pssh(:,:,Kmm), clinfo1=' atf - pssh(:,:,Kmm): ', mask1=tmask ) 315 320 ! 316 321 IF( ln_timing ) CALL timing_stop('ssh_atf') … … 431 436 ! 432 437 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_def 447 !! * ln_rstart = T 448 !! USE of IOM library to read ssh in the restart file 449 !! Leap-Frog: Kbb and Kmm are read except for l_1st_euler=T 450 !! 451 !! * otherwise 452 !! call user defined ssh or 453 !! set to -ssh_ref in wet and drying case with domcfg.nc 454 !! 455 !! NB: ssh_b/n are written by restart.F90 456 !!---------------------------------------------------------------------- 457 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 458 ! 459 INTEGER :: ji, jj, jk 460 !!---------------------------------------------------------------------- 461 ! 462 IF(lwp) THEN 463 WRITE(numout,*) 464 WRITE(numout,*) 'ssh_init_rst : ssh initialization' 465 WRITE(numout,*) '~~~~~~~~~~~~ ' 466 ENDIF 467 ! 468 ! !=============================! 469 IF( ln_rstart ) THEN !== Read the restart file ==! 470 ! !=============================! 471 ! 472 ! !* Read ssh at Kmm 473 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-step 478 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 Kbb 483 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 ENDIF 487 ! !============================! 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 dry 495 ! 496 IF( ln_read_cfg ) THEN ! read configuration : ssh_ref is read in domain_cfg file 497 !!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 Kmm 499 ssh(:,:,Kbb) = -ssh_ref 500 ! 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 depth 503 ssh(ji,jj,Kbb) = rn_wdmin1 - ht_0(ji,jj) 504 ENDIF 505 END_2D 506 ELSE ! user define configuration case 507 CALL usr_def_istate_ssh( tmask, ssh(:,:,Kbb) ) 508 ENDIF 509 ! 510 ELSE !* user defined configuration 511 CALL usr_def_istate_ssh( tmask, ssh(:,:,Kbb) ) 512 ! 513 ENDIF 514 ! 515 ssh(:,:,Kmm) = ssh(:,:,Kbb) !* set now values from to before ones 516 ssh(:,:,Kaa) = 0._wp 517 ENDIF 518 ! 519 END SUBROUTINE ssh_init_rst 520 433 521 !!====================================================================== 434 522 END MODULE sshwzv
Note: See TracChangeset
for help on using the changeset viewer.