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 14717 for NEMO/releases/r4.0/r4.0-HEAD/src/OCE/TRA/tradmp.F90 – NEMO

Ignore:
Timestamp:
2021-04-16T11:42:56+02:00 (3 years ago)
Author:
clem
Message:

4.0-HEAD: correctly handle diagnostics of mass, salt and heat budgets (see ticket #2652). And fix Pierre ticket #2642

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/TRA/tradmp.F90

    r11536 r14717  
    9999      IF( ln_timing )   CALL timing_start('tra_dmp') 
    100100      ! 
    101       IF( l_trdtra )   THEN                    !* Save ta and sa trends 
     101      IF( l_trdtra .OR. iom_use('hflx_dmp_cea') .OR. iom_use('sflx_dmp_cea') ) THEN   !* Save ta and sa trends 
    102102         ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) )  
    103103         ztrdts(:,:,:,:) = tsa(:,:,:,:)  
     
    149149      END SELECT 
    150150      ! 
     151      ! outputs 
     152      IF( iom_use('hflx_dmp_cea') ) & 
     153         & CALL iom_put('hflx_dmp_cea', SUM( ( tsa(:,:,:,jp_tem) - ztrdts(:,:,:,jp_tem) ) * e3t_n(:,:,:), dim=3 ) * rcp * rau0 ) ! W/m2 
     154      IF( iom_use('sflx_dmp_cea') ) & 
     155         & CALL iom_put('sflx_dmp_cea', SUM( ( tsa(:,:,:,jp_sal) - ztrdts(:,:,:,jp_sal) ) * e3t_n(:,:,:), dim=3 ) * rau0 )       ! g/m2/s 
     156      ! 
    151157      IF( l_trdtra )   THEN       ! trend diagnostic 
    152158         ztrdts(:,:,:,:) = tsa(:,:,:,:) - ztrdts(:,:,:,:) 
Note: See TracChangeset for help on using the changeset viewer.