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

Changeset 15651


Ignore:
Timestamp:
2022-01-18T13:03:56+01:00 (2 years ago)
Author:
hadjt
Message:

TRA/tradwl.F90

Code to report the trends fixed. This now works without affecting the stratification (unlike the original CO6 code), but hasn't been tested in terms of the trends.

The choice of which code to report the trends too (jptra_qsr) may not be correct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_shelf_climate/src/OCE/TRA/tradwl.F90

    r15634 r15651  
    7474      !JT USE oce, ONLY :   ztrds => va   ! use va as 3D workspace    
    7575 
     76      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds   ! 3D workspace 
     77 
    7678      !! 
    7779      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
     
    109111      !JT    ztrds(:,:,:) = 0.e0 
    110112      !JT ENDIF 
     113 
     114 
     115      IF( l_trdtra )   THEN                  !* Save ta and sa trends 
     116         ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 
     117         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
     118         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     119      ENDIF 
    111120!-------------------------------------------------------------------- 
    112121!  Set transmissivity 
     
    204213      !JT    !CEODCALL trd_mod( ztrdt, ztrds, jptra_trd_qsr, 'TRA', kt ) 
    205214      !JT ENDIF 
    206       !                       ! print mean trends (used for debugging) 
     215      !                        
     216      IF( l_trdtra ) THEN      ! qsr tracers trends saved for diagnostics 
     217 
     218         !JT I think I should use jptra_qsr??  
     219 
     220         !ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
     221         !ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) 
     222         DO jk = 1, jpkm1 
     223            ztrdt(:,:,jk) = tsa(:,:,jk,jp_tem) - ztrdt(:,:,jk) 
     224            ztrds(:,:,jk) = tsa(:,:,jk,jp_sal) - ztrds(:,:,jk) 
     225         END DO 
     226 
     227         CALL trd_tra( kt, 'TRA', jp_tem, jptra_qsr, ztrdt ) 
     228         CALL trd_tra( kt, 'TRA', jp_sal, jptra_qsr, ztrds ) 
     229         DEALLOCATE( ztrdt , ztrds ) 
     230      ENDIF 
     231 
    207232      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' qsr  - Ta: ', mask1=tmask, clinfo3='tra-ta' ) 
    208233      ! 
Note: See TracChangeset for help on using the changeset viewer.