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 6808 for branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90 – NEMO

Ignore:
Timestamp:
2016-07-19T10:38:35+02:00 (8 years ago)
Author:
jamesharle
Message:

merge with trunk@6232 for consistency with SSB code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90

    r4990 r6808  
    22   !!====================================================================== 
    33   !!                   ***  MODULE  dynspg_exp  *** 
    4    !! Ocean dynamics:  surface pressure gradient trend 
     4   !! Ocean dynamics:  surface pressure gradient trend, explicit scheme 
    55   !!====================================================================== 
    66   !! History :  2.0  !  2005-11  (V. Garnier, G. Madec, L. Bessieres) Original code 
    77   !!            3.2  !  2009-06  (G. Madec, M. Leclair, R. Benshila) introduce sshwzv module 
    88   !!---------------------------------------------------------------------- 
    9 #if defined key_dynspg_exp   ||   defined key_esopa 
    10    !!---------------------------------------------------------------------- 
    11    !!   'key_dynspg_exp'                              explicit free surface 
     9 
    1210   !!---------------------------------------------------------------------- 
    1311   !!   dyn_spg_exp  : update the momentum trend with the surface  
     
    2725   USE timing          ! Timing 
    2826 
    29  
    3027   IMPLICIT NONE 
    3128   PRIVATE 
    3229 
    33    PUBLIC   dyn_spg_exp   ! routine called by step.F90 
     30   PUBLIC   dyn_spg_exp   ! routine called by dynspg.F90  
    3431 
    3532   !! * Substitutions 
    36 #  include "domzgr_substitute.h90" 
    3733#  include "vectopt_loop_substitute.h90" 
    3834   !!---------------------------------------------------------------------- 
     
    7470         spgu(:,:) = 0._wp   ;   spgv(:,:) = 0._wp 
    7571         ! 
    76          IF( lk_vvl .AND. lwp ) WRITE(numout,*) '              lk_vvl=T : spg is included in dynhpg' 
     72         IF( .NOT.ln_linssh .AND. lwp ) WRITE(numout,*) '      non linear free surface: spg is included in dynhpg' 
    7773      ENDIF 
    7874 
    79       IF( .NOT. lk_vvl ) THEN          !* fixed volume : add the surface pressure gradient trend 
     75      IF( ln_linssh ) THEN          !* linear free surface : add the surface pressure gradient trend 
    8076         ! 
    8177         DO jj = 2, jpjm1                    ! now surface pressure gradient 
    8278            DO ji = fs_2, fs_jpim1   ! vector opt. 
    83                spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) 
    84                spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) 
     79               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) * r1_e1u(ji,jj) 
     80               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) * r1_e2v(ji,jj) 
    8581            END DO  
    8682         END DO 
     
    10197   END SUBROUTINE dyn_spg_exp 
    10298 
    103 #else 
    104    !!---------------------------------------------------------------------- 
    105    !!   Default case :   Empty module   No standart explicit free surface  
    106    !!---------------------------------------------------------------------- 
    107 CONTAINS 
    108    SUBROUTINE dyn_spg_exp( kt )       ! Empty routine 
    109       WRITE(*,*) 'dyn_spg_exp: You should not have seen this print! error?', kt 
    110    END SUBROUTINE dyn_spg_exp 
    111 #endif 
    112  
    11399   !!====================================================================== 
    114100END MODULE dynspg_exp 
Note: See TracChangeset for help on using the changeset viewer.