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 14701 for NEMO/branches/2021/ENHANCE-01_davestorkey_fix_3D_momentum_trends/src/OCE/DYN/dynspg.F90 – NEMO

Ignore:
Timestamp:
2021-04-13T15:59:31+02:00 (3 years ago)
Author:
davestorkey
Message:

2021/ENHANCE-01_davestorkey_fix_3D_momentum_trends : science changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/ENHANCE-01_davestorkey_fix_3D_momentum_trends/src/OCE/DYN/dynspg.F90

    r14225 r14701  
    9090      IF( ln_timing )   CALL timing_start('dyn_spg') 
    9191      ! 
    92       IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends 
     92      IF( l_trddyn .AND. nspg == np_EXP )   THEN   ! temporary save of ta and sa trends 
    9393         ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) ) 
    9494         ztrdu(:,:,:) = puu(:,:,:,Krhs) 
     
    170170      END SELECT 
    171171      ! 
    172       IF( l_trddyn )   THEN                  ! save the surface pressure gradient trends for further diagnostics 
     172      IF( l_trddyn .AND. nspg == np_EXP )   THEN   ! save the surface pressure gradient trends for further diagnostics 
    173173         ztrdu(:,:,:) = puu(:,:,:,Krhs) - ztrdu(:,:,:) 
    174174         ztrdv(:,:,:) = pvv(:,:,:,Krhs) - ztrdv(:,:,:) 
    175175         CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt, Kmm ) 
     176         ! In this case we also need to finalise the write-out of the PVO 3D diagnostic with zero correction 
     177         ztrdu(:,:,1) = 0._wp 
     178         ztrdv(:,:,1) = 0._wp 
     179         CALL trd_dyn( ztrdu(:,:,1), ztrdv(:,:,1), jpdyn_pvo, kt, Kmm ) 
    176180         DEALLOCATE( ztrdu , ztrdv ) 
    177181      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.