New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 5777 for branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2015-10-06T13:40:42+02:00 (8 years ago)
Author:
gm
Message:

#1593: LDF-ADV, III. Phasing of the improvements/simplifications of ADV & LDF momentum trends (see wiki page)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r5770 r5777  
    2020   USE sbc_oce         ! surface boundary condition: ocean 
    2121   USE domvvl          ! Variable volume 
    22    USE divcur          ! hor. divergence and curl      (div & cur routines) 
    23    USE restart         ! only for lrst_oce 
    24    USE in_out_manager  ! I/O manager 
    25    USE prtctl          ! Print control 
    26    USE phycst 
    27    USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
    28    USE lib_mpp         ! MPP library 
     22   USE divhor          ! horizontal divergence 
     23   USE phycst          ! physical constants 
    2924   USE bdy_oce 
    3025   USE bdy_par          
     
    3631   USE asminc          ! Assimilation increment 
    3732#endif 
     33   USE in_out_manager  ! I/O manager 
     34   USE restart         ! only for lrst_oce 
     35   USE prtctl          ! Print control 
     36   USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
     37   USE lib_mpp         ! MPP library 
    3838   USE wrk_nemo        ! Memory Allocation 
    3939   USE timing          ! Timing 
     
    6666      !!      by the time step. 
    6767      !! 
    68       !! ** action  :   ssha    : after sea surface height 
     68      !! ** action  :   ssha, after sea surface height 
    6969      !! 
    7070      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
    7171      !!---------------------------------------------------------------------- 
    72       ! 
    73       REAL(wp), POINTER, DIMENSION(:,:  ) ::  zhdiv 
    74       INTEGER, INTENT(in) ::   kt                      ! time step 
     72      INTEGER, INTENT(in) ::   kt   ! time step 
    7573      !  
    76       INTEGER             ::   jk                      ! dummy loop indice 
    77       REAL(wp)            ::   z2dt, z1_rau0           ! local scalars 
    78       !!---------------------------------------------------------------------- 
    79       ! 
    80       IF( nn_timing == 1 )  CALL timing_start('ssh_nxt') 
     74      INTEGER  ::   jk            ! dummy loop indice 
     75      REAL(wp) ::   z2dt, zcoef   ! local scalars 
     76      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zhdiv   ! 2D workspace 
     77      !!---------------------------------------------------------------------- 
     78      ! 
     79      IF( nn_timing == 1 )   CALL timing_start('ssh_nxt') 
    8180      ! 
    8281      CALL wrk_alloc( jpi,jpj,   zhdiv )  
     
    8887      ENDIF 
    8988      ! 
    90       CALL div_cur( kt )                              ! Horizontal divergence & Relative vorticity 
     89      CALL div_hor( kt )                              ! Horizontal divergence 
    9190      ! 
    9291      z2dt = 2._wp * rdt                              ! set time step size (Euler/Leapfrog) 
     
    104103      ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 
    105104      !  
    106       z1_rau0 = 0.5_wp * r1_rau0 
    107       ssha(:,:) = (  sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:) 
     105      zcoef = 0.5_wp * r1_rau0 
     106      ssha(:,:) = (  sshb(:,:) - z2dt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:) 
    108107 
    109108#if ! defined key_dynspg_ts 
    110109      ! These lines are not necessary with time splitting since 
    111110      ! boundary condition on sea level is set during ts loop 
    112 #if defined key_agrif 
     111# if defined key_agrif 
    113112      CALL agrif_ssh( kt ) 
    114 #endif 
    115 #if defined key_bdy 
    116       IF (lk_bdy) THEN 
    117          CALL lbc_lnk( ssha, 'T', 1. ) ! Not sure that's necessary 
    118          CALL bdy_ssh( ssha ) ! Duplicate sea level across open boundaries 
    119       ENDIF 
    120 #endif 
     113# endif 
     114# if defined key_bdy 
     115      IF( lk_bdy ) THEN 
     116         CALL lbc_lnk( ssha, 'T', 1. )    ! Not sure that's necessary 
     117         CALL bdy_ssh( ssha )             ! Duplicate sea level across open boundaries 
     118      ENDIF 
     119# endif 
    121120#endif 
    122121 
    123122#if defined key_asminc 
    124       !                                                ! Include the IAU weighted SSH increment 
    125       IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN 
     123      IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN     ! Include the IAU weighted SSH increment 
    126124         CALL ssh_asm_inc( kt ) 
    127125         ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:) 
    128126      ENDIF 
    129127#endif 
    130  
    131128      !                                           !------------------------------! 
    132129      !                                           !           outputs            ! 
     
    165162      !!---------------------------------------------------------------------- 
    166163      ! 
    167       IF( nn_timing == 1 )  CALL timing_start('wzv') 
     164      IF( nn_timing == 1 )   CALL timing_start('wzv') 
    168165      ! 
    169166      IF( kt == nit000 ) THEN 
Note: See TracChangeset for help on using the changeset viewer.