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 11416 for NEMO/trunk/src/OCE – NEMO

Changeset 11416 for NEMO/trunk/src/OCE


Ignore:
Timestamp:
2019-08-07T12:11:36+02:00 (5 years ago)
Author:
jchanut
Message:

#1636: remove overwriting of before tracer gradients over partial cells by now values. Should make tracer diffusion more robust. Now density gradients are now computed in hpg_zps only.

Location:
NEMO/trunk/src/OCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DYN/dynhpg.F90

    r10491 r11416  
    3737   USE trd_oce         ! trends: ocean variables 
    3838   USE trddyn          ! trend manager: dynamics 
    39 !jc   USE zpshde          ! partial step: hor. derivative     (zps_hde routine) 
     39   USE zpshde          ! partial step: hor. derivative     (zps_hde routine) 
    4040   ! 
    4141   USE in_out_manager  ! I/O manager 
     
    338338      REAL(wp) ::   zcoef0, zcoef1, zcoef2, zcoef3   ! temporary scalars 
    339339      REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zhpi, zhpj 
     340      REAL(wp), DIMENSION(jpi,jpj) :: zgtsu, zgtsv, zgru, zgrv 
    340341      !!---------------------------------------------------------------------- 
    341342      ! 
     
    346347      ENDIF 
    347348 
    348       ! Partial steps: bottom before horizontal gradient of t, s, rd at the last ocean level 
    349 !jc      CALL zps_hde    ( kt, jpts, tsn, gtsu, gtsv, rhd, gru , grv ) 
     349      ! Partial steps: Compute NOW horizontal gradient of t, s, rd at the last ocean level 
     350      CALL zps_hde( kt, jpts, tsn, zgtsu, zgtsv, rhd, zgru , zgrv ) 
    350351 
    351352      ! Local constant initialization 
     
    385386      END DO 
    386387 
    387       ! partial steps correction at the last level  (use gru & grv computed in zpshde.F90) 
     388      ! partial steps correction at the last level  (use zgru & zgrv computed in zpshde.F90) 
    388389      DO jj = 2, jpjm1 
    389390         DO ji = 2, jpim1 
     
    395396               ua  (ji,jj,iku) = ua(ji,jj,iku) - zhpi(ji,jj,iku)         ! subtract old value 
    396397               zhpi(ji,jj,iku) = zhpi(ji,jj,iku-1)                   &   ! compute the new one 
    397                   &            + zcoef2 * ( rhd(ji+1,jj,iku-1) - rhd(ji,jj,iku-1) + gru(ji,jj) ) * r1_e1u(ji,jj) 
     398                  &            + zcoef2 * ( rhd(ji+1,jj,iku-1) - rhd(ji,jj,iku-1) + zgru(ji,jj) ) * r1_e1u(ji,jj) 
    398399               ua  (ji,jj,iku) = ua(ji,jj,iku) + zhpi(ji,jj,iku)         ! add the new one to the general momentum trend 
    399400            ENDIF 
     
    401402               va  (ji,jj,ikv) = va(ji,jj,ikv) - zhpj(ji,jj,ikv)         ! subtract old value 
    402403               zhpj(ji,jj,ikv) = zhpj(ji,jj,ikv-1)                   &   ! compute the new one 
    403                   &            + zcoef3 * ( rhd(ji,jj+1,ikv-1) - rhd(ji,jj,ikv-1) + grv(ji,jj) ) * r1_e2v(ji,jj) 
     404                  &            + zcoef3 * ( rhd(ji,jj+1,ikv-1) - rhd(ji,jj,ikv-1) + zgrv(ji,jj) ) * r1_e2v(ji,jj) 
    404405               va  (ji,jj,ikv) = va(ji,jj,ikv) + zhpj(ji,jj,ikv)         ! add the new one to the general momentum trend 
    405406            ENDIF 
  • NEMO/trunk/src/OCE/step.F90

    r11287 r11416  
    165165                            CALL eos    ( tsn, rhd, rhop, gdept_n(:,:,:) )  ! now in situ density for hpg computation 
    166166                             
    167 !!jc: fs simplification 
    168 !!jc: lines below are useless if ln_linssh=F. Keep them here (which maintains a bug if ln_linssh=T and ln_zps=T, cf ticket #1636)  
    169 !!                                         but ensures reproductible results 
    170 !!                                         with previous versions using split-explicit free surface           
    171             IF( ln_zps .AND. .NOT. ln_isfcav )                               & 
    172                &            CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,   &  ! Partial steps: before horizontal gradient 
    173                &                                          rhd, gru , grv     )  ! of t, s, rd at the last ocean level 
    174             IF( ln_zps .AND.       ln_isfcav )                                          & 
    175                &            CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv, gtui, gtvi,  &  ! Partial steps for top cell (ISF) 
    176                &                                          rhd, gru , grv , grui, grvi   )  ! of t, s, rd at the first ocean level 
    177 !!jc: fs simplification 
    178167                             
    179168                         ua(:,:,:) = 0._wp            ! set dynamics trends to zero 
Note: See TracChangeset for help on using the changeset viewer.