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 13191 for branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2020-07-01T15:01:22+02:00 (4 years ago)
Author:
jwhile
Message:

Updates for 1d runnig

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r8400 r13191  
    1 MODULE sshwzv    
     1MODULE sshwzv 
    22   !!============================================================================== 
    33   !!                       ***  MODULE  sshwzv  *** 
     
    55   !!============================================================================== 
    66   !! History :  3.1  !  2009-02  (G. Madec, M. Leclair)  Original code 
    7    !!            3.3  !  2010-04  (M. Leclair, G. Madec)  modified LF-RA  
     7   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  modified LF-RA 
    88   !!             -   !  2010-05  (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 
    99   !!             -   !  2010-09  (D.Storkey and E.O'Dea) bug fixes for BDY module 
     
    1717   !!---------------------------------------------------------------------- 
    1818   USE oce             ! ocean dynamics and tracers variables 
    19    USE dom_oce         ! ocean space and time domain variables  
     19   USE dom_oce         ! ocean space and time domain variables 
    2020   USE sbc_oce         ! surface boundary condition: ocean 
    2121   USE domvvl          ! Variable volume 
     
    2828   USE lib_mpp         ! MPP library 
    2929   USE bdy_oce 
    30    USE bdy_par          
     30   USE bdy_par 
    3131   USE bdydyn2d        ! bdy_ssh routine 
    3232#if defined key_agrif 
    3333   USE agrif_opa_interp 
    3434#endif 
    35 #if defined key_asminc    
     35#if defined key_asminc 
    3636   USE asminc          ! Assimilation increment 
    3737#endif 
     
    5959      !!---------------------------------------------------------------------- 
    6060      !!                ***  ROUTINE ssh_nxt  *** 
    61       !!                    
     61      !! 
    6262      !! ** Purpose :   compute the after ssh (ssha) 
    6363      !! 
     
    7373      REAL(wp), POINTER, DIMENSION(:,:  ) ::  zhdiv 
    7474      INTEGER, INTENT(in) ::   kt                      ! time step 
    75       !  
     75      ! 
    7676      INTEGER             ::   jk                      ! dummy loop indices 
    7777      REAL(wp)            ::   z2dt, z1_rau0           ! local scalars 
     
    8080      IF( nn_timing == 1 )  CALL timing_start('ssh_nxt') 
    8181      ! 
    82       CALL wrk_alloc( jpi, jpj, zhdiv )  
     82      CALL wrk_alloc( jpi, jpj, zhdiv ) 
    8383      ! 
    8484      IF( kt == nit000 ) THEN 
     
    102102#if defined key_vvl 
    103103! Don't directly adjust ssh but change hdivn at all levels instead 
    104 ! In trasbc also add in the heat and salt content associated with these changes at each level   
    105         DO jk = 1, jpkm1                                  
    106                  hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) ) * ( e3t_0(:,:,jk) / fse3t_n(:,:,jk) ) * tmask(:,:,jk)  
     104! In trasbc also add in the heat and salt content associated with these changes at each level 
     105        DO jk = 1, jpkm1 
     106                 hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) ) * ( e3t_0(:,:,jk) / fse3t_n(:,:,jk) ) * tmask(:,:,jk) 
    107107        END DO 
    108       ENDIF 
    109 #endif 
     108#endif 
     109      ENDIF 
    110110#endif 
    111111 
     
    121121      ! In time-split case we need a first guess of the ssh after (using the baroclinic timestep) in order to 
    122122      ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 
    123       !  
     123      ! 
    124124      z1_rau0 = 0.5_wp * r1_rau0 
    125125      ssha(:,:) = (  sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:) 
     
    146146      IF(ln_ctl)   CALL prt_ctl( tab2d_1=ssha, clinfo1=' ssha  - : ', mask1=tmask, ovlap=1 ) 
    147147      ! 
    148       CALL wrk_dealloc( jpi, jpj, zhdiv )  
     148      CALL wrk_dealloc( jpi, jpj, zhdiv ) 
    149149      ! 
    150150      IF( nn_timing == 1 )  CALL timing_stop('ssh_nxt') 
     
    152152   END SUBROUTINE ssh_nxt 
    153153 
    154     
     154 
    155155   SUBROUTINE wzv( kt ) 
    156156      !!---------------------------------------------------------------------- 
    157157      !!                ***  ROUTINE wzv  *** 
    158       !!                    
     158      !! 
    159159      !! ** Purpose :   compute the now vertical velocity 
    160160      !! 
    161       !! ** Method  : - Using the incompressibility hypothesis, the vertical  
    162       !!      velocity is computed by integrating the horizontal divergence   
     161      !! ** Method  : - Using the incompressibility hypothesis, the vertical 
     162      !!      velocity is computed by integrating the horizontal divergence 
    163163      !!      from the bottom to the surface minus the scale factor evolution. 
    164164      !!        The boundary conditions are w=0 at the bottom (no flux) and. 
     
    176176      REAL(wp)            ::   z1_2dt       ! local scalars 
    177177      !!---------------------------------------------------------------------- 
    178        
     178 
    179179      IF( nn_timing == 1 )  CALL timing_start('wzv') 
    180180      ! 
     
    195195      ! 
    196196      IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN      ! z_tilde and layer cases 
    197          CALL wrk_alloc( jpi, jpj, jpk, zhdiv )  
     197         CALL wrk_alloc( jpi, jpj, jpk, zhdiv ) 
    198198         ! 
    199199         DO jk = 1, jpkm1 
     
    215215         END DO 
    216216         !          IF( ln_vvl_layer ) wn(:,:,:) = 0.e0 
    217          CALL wrk_dealloc( jpi, jpj, jpk, zhdiv )  
     217         CALL wrk_dealloc( jpi, jpj, jpk, zhdiv ) 
    218218      ELSE   ! z_star and linear free surface cases 
    219219         DO jk = jpkm1, 1, -1                       ! integrate from the bottom the hor. divergence 
     
    241241      !!                    ***  ROUTINE ssh_nxt  *** 
    242242      !! 
    243       !! ** Purpose :   achieve the sea surface  height time stepping by  
     243      !! ** Purpose :   achieve the sea surface  height time stepping by 
    244244      !!              applying Asselin time filter and swapping the arrays 
    245       !!              ssha  already computed in ssh_nxt   
     245      !!              ssha  already computed in ssh_nxt 
    246246      !! 
    247247      !! ** Method  : - apply Asselin time fiter to now ssh (excluding the forcing 
Note: See TracChangeset for help on using the changeset viewer.