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 8608 – NEMO

Changeset 8608


Ignore:
Timestamp:
2017-10-10T15:15:28+02:00 (7 years ago)
Author:
frrh
Message:

Apply bug fix in diaptr for overturning heat/salt diagnostics when using Gent-McWilliams?.

This only affects ORCA1 configurations.

See Met Office GMED ticket 350.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90

    r7747 r8608  
    9393      REAL(wp), DIMENSION(jpj,jpk,nptr) ::   sjk  , r1_sjk ! i-mean i-k-surface and its inverse 
    9494      REAL(wp), DIMENSION(jpj,jpk,nptr) ::   v_msf, sn_jk  , tn_jk ! i-mean T and S, j-Stream-Function 
    95       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zvn   ! 3D workspace 
    9695 
    9796 
     
    130129            zmask(:,:,:) = 0._wp 
    131130            zts(:,:,:,:) = 0._wp 
    132             zvn(:,:,:) = 0._wp 
    133131            DO jk = 1, jpkm1 
    134132               DO jj = 1, jpjm1 
     
    138136                     zts(ji,jj,jk,jp_tem) = (tsn(ji,jj,jk,jp_tem)+tsn(ji,jj+1,jk,jp_tem)) * 0.5 * zvfc  !Tracers averaged onto V grid 
    139137                     zts(ji,jj,jk,jp_sal) = (tsn(ji,jj,jk,jp_sal)+tsn(ji,jj+1,jk,jp_sal)) * 0.5 * zvfc 
    140                      zvn(ji,jj,jk)        = vn(ji,jj,jk)         * zvfc 
    141138                  ENDDO 
    142139               ENDDO 
     
    151148             tn_jk(:,:,1) = ptr_sjk( zts(:,:,:,jp_tem) ) * r1_sjk(:,:,1) 
    152149             sn_jk(:,:,1) = ptr_sjk( zts(:,:,:,jp_sal) ) * r1_sjk(:,:,1) 
    153              v_msf(:,:,1) = ptr_sjk( zvn(:,:,:) ) 
     150             v_msf(:,:,1) = ptr_sjk( pvtr(:,:,:) ) 
    154151 
    155152             htr_ove(:,1) = SUM( v_msf(:,:,1)*tn_jk(:,:,1) ,2 ) 
     
    177174                    tn_jk(:,:,jn) = ptr_sjk( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 
    178175                    sn_jk(:,:,jn) = ptr_sjk( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 
    179                     v_msf(:,:,jn) = ptr_sjk( zvn(:,:,:), btmsk(:,:,jn) )  
     176                    v_msf(:,:,jn) = ptr_sjk( pvtr(:,:,:), btmsk(:,:,jn) )  
    180177                    htr_ove(:,jn) = SUM( v_msf(:,:,jn)*tn_jk(:,:,jn) ,2 ) 
    181178                    str_ove(:,jn) = SUM( v_msf(:,:,jn)*sn_jk(:,:,jn) ,2 ) 
     
    202199             WHERE( sjk(:,1,1) /= 0._wp )   r1_sjk(:,1,1) = 1._wp / sjk(:,1,1) 
    203200             
    204             vsum = ptr_sj( zvn(:,:,:), btmsk(:,:,1)) 
     201            vsum = ptr_sj( pvtr(:,:,:), btmsk(:,:,1)) 
    205202            tssum(:,jp_tem) = ptr_sj( zts(:,:,:,jp_tem), btmsk(:,:,1) ) 
    206203            tssum(:,jp_sal) = ptr_sj( zts(:,:,:,jp_sal), btmsk(:,:,1) ) 
     
    224221                    r1_sjk(:,1,jn) = 0._wp 
    225222                    WHERE( sjk(:,1,jn) /= 0._wp )   r1_sjk(:,1,jn) = 1._wp / sjk(:,1,jn) 
    226                     vsum = ptr_sj( zvn(:,:,:), btmsk(:,:,jn)) 
     223                    vsum = ptr_sj( pvtr(:,:,:), btmsk(:,:,jn)) 
    227224                    tssum(:,jp_tem) = ptr_sj( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) 
    228225                    tssum(:,jp_sal) = ptr_sj( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) 
Note: See TracChangeset for help on using the changeset viewer.