Ignore:
Timestamp:
2020-07-30T17:01:13+02:00 (2 months ago)
Author:
techene
Message:

horizontal surface pressure gradient is now added systematically (linear and non-linear case) to rhs when explicit time scheme, it is not removed in the non linear case when time splitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/DYN/dynspg_exp.F90

    r13295 r13362  
    6060      !! 
    6161      INTEGER ::   ji, jj, jk   ! dummy loop indices 
     62      REAL(wp), DIMENSION(jpi,jpj) ::   zpgu, zpgv   ! 2D workspace 
    6263      !!---------------------------------------------------------------------- 
    6364      ! 
     
    6768         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   (explicit free surface)' 
    6869         ! 
    69          spgu(:,:) = 0._wp   ;   spgv(:,:) = 0._wp 
     70         zpgu(:,:) = 0._wp   ;   zpgv(:,:) = 0._wp 
    7071         ! 
    7172         IF( .NOT.ln_linssh .AND. lwp ) WRITE(numout,*) '      non linear free surface: spg is included in dynhpg' 
    7273      ENDIF 
    73  
    74       IF( ln_linssh ) THEN          !* linear free surface : add the surface pressure gradient trend 
    75          ! 
    76          DO_2D( 0, 0, 0, 0 ) 
    77             spgu(ji,jj) = - grav * ( ssh(ji+1,jj,Kmm) - ssh(ji,jj,Kmm) ) * r1_e1u(ji,jj) 
    78             spgv(ji,jj) = - grav * ( ssh(ji,jj+1,Kmm) - ssh(ji,jj,Kmm) ) * r1_e2v(ji,jj) 
    79          END_2D 
    80          ! 
    81          DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    82             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + spgu(ji,jj) 
    83             pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) + spgv(ji,jj) 
    84          END_3D 
    85          ! 
    86       ENDIF 
     74      ! 
     75      DO_2D( 0, 0, 0, 0 ) 
     76         zpgu(ji,jj) = - grav * ( ssh(ji+1,jj,Kmm) - ssh(ji,jj,Kmm) ) * r1_e1u(ji,jj) 
     77         zpgv(ji,jj) = - grav * ( ssh(ji,jj+1,Kmm) - ssh(ji,jj,Kmm) ) * r1_e2v(ji,jj) 
     78      END_2D 
     79      ! 
     80      DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     81         puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + zpgu(ji,jj) 
     82         pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) + zpgv(ji,jj) 
     83      END_3D 
    8784      ! 
    8885   END SUBROUTINE dyn_spg_exp 
Note: See TracChangeset for help on using the changeset viewer.