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/SBC/sbcfwb.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/SBC/sbcfwb.F90

    r13581 r14717  
    112112            emp(:,:) = emp(:,:) - z_fwfprv(1)        * tmask(:,:,1) 
    113113            qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
     114            ! outputs 
     115            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', zcoef * sst_m(:,:) * tmask(:,:,1) ) 
     116            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', z_fwfprv(1)        * tmask(:,:,1) ) 
    114117         ENDIF 
    115118         ! 
     
    156159            emp(:,:) = emp(:,:) + fwfold             * tmask(:,:,1) 
    157160            qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
     161            ! outputs 
     162            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zcoef * sst_m(:,:) * tmask(:,:,1) ) 
     163            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -fwfold             * tmask(:,:,1) ) 
    158164         ENDIF 
    159165         ! Output restart information 
     
    210216            qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    211217            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
     218            ! outputs 
     219            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zerp_cor(:,:) * rcp * sst_m(:,:) ) 
     220            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -zerp_cor(:,:) ) 
    212221            ! 
    213222            IF( nprint == 1 .AND. lwp ) THEN                   ! control print 
Note: See TracChangeset for help on using the changeset viewer.