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

Location:
NEMO/releases/r4.0/r4.0-HEAD/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/ICE/icedia.F90

    r11536 r14717  
    6969      REAL(wp)   ::   zbg_ivol, zbg_item, zbg_area, zbg_isal 
    7070      REAL(wp)   ::   zbg_svol, zbg_stem 
     71      REAL(wp)   ::   zbg_ipvol, zbg_ilvol 
    7172      REAL(wp)   ::   z_frc_voltop, z_frc_temtop, z_frc_sal 
    7273      REAL(wp)   ::   z_frc_volbot, z_frc_tembot   
     
    8990      ! ----------------------- ! 
    9091      IF(  iom_use('ibgvol_tot' ) .OR. iom_use('sbgvol_tot' ) .OR. iom_use('ibgarea_tot') .OR. & 
    91          & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') ) THEN 
     92         & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') .OR. & 
     93         & iom_use('ipbgvol_tot' ) .OR. iom_use('ilbgvol_tot' ) ) THEN 
    9294 
    9395         zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice volume (km3) 
     
    9799         zbg_item = glob_sum( 'icedia', et_i(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 
    98100         zbg_stem = glob_sum( 'icedia', et_s(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 
     101         ! ponds 
     102         zbg_ipvol = glob_sum( 'icedia', vt_ip(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice pond volume (km3) 
     103         zbg_ilvol = glob_sum( 'icedia', vt_il(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice pond lid volume (km3) 
    99104 
    100105         CALL iom_put( 'ibgvol_tot'  , zbg_ivol )  
     
    103108         CALL iom_put( 'ibgsalt_tot' , zbg_isal )  
    104109         CALL iom_put( 'ibgheat_tot' , zbg_item )  
    105          CALL iom_put( 'sbgheat_tot' , zbg_stem )  
    106   
     110         CALL iom_put( 'sbgheat_tot' , zbg_stem ) 
     111         ! ponds 
     112         CALL iom_put( 'ipbgvol_tot'  , zbg_ipvol ) 
     113         CALL iom_put( 'ilbgvol_tot'  , zbg_ilvol ) 
     114 
    107115      ENDIF 
    108116 
  • NEMO/releases/r4.0/r4.0-HEAD/src/ICE/iceupdate.F90

    r14590 r14717  
    292292      IF( iom_use('hfxcndbot'  ) )   CALL iom_put( 'hfxcndbot'  , SUM( qcn_ice_bot * a_i_b, dim=3 ) )   ! Bottom conduction flux 
    293293      IF( iom_use('hfxcndtop'  ) )   CALL iom_put( 'hfxcndtop'  , SUM( qcn_ice_top * a_i_b, dim=3 ) )   ! Surface conduction flux 
    294 !!    IF( iom_use('hfxmelt'    ) )   CALL iom_put( 'hfxmelt'    , SUM( qml_ice     * a_i_b, dim=3 ) )   ! Surface melt flux 
    295 !!    IF( iom_use('hfxldmelt'  ) )   CALL iom_put( 'hfxldmelt'  ,      fhld        * at_i_b         )   ! Heat in lead for ice melting  
    296 !!    IF( iom_use('hfxldgrow'  ) )   CALL iom_put( 'hfxldgrow'  ,      qlead       * r1_rdtice      )   ! Heat in lead for ice growth 
     294      IF( iom_use('hfxmelt'    ) )   CALL iom_put( 'hfxmelt'    , SUM( qml_ice     * a_i_b, dim=3 ) )   ! Surface melt flux 
     295      IF( iom_use('hfxldmelt'  ) )   CALL iom_put( 'hfxldmelt'  ,      fhld        * at_i_b         )   ! Heat in lead for ice melting  
     296      IF( iom_use('hfxldgrow'  ) )   CALL iom_put( 'hfxldgrow'  ,      qlead       * r1_rdtice      )   ! Heat in lead for ice growth 
    297297 
    298298      ! controls 
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcblk.F90

    r13348 r14717  
    390390      REAL(wp), DIMENSION(jpi,jpj) ::   ztpot             ! potential temperature of air at z=rn_zqt [K] 
    391391      REAL(wp), DIMENSION(jpi,jpj) ::   zrhoa             ! density of air   [kg/m^3] 
    392       !!--------------------------------------------------------------------- 
     392      REAL(wp), DIMENSION(jpi,jpj) ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg) 
     393      !!--------------------------------------------------------------------- 
     394      ! 
     395      ! Heat content per unit mass (J/kg) 
     396      zcptrain(:,:) = (      sf(jp_tair)%fnow(:,:,1)        - rt0 ) * rcp  * tmask(:,:,1) 
     397      zcptsnw (:,:) = ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) 
     398      zcptn   (:,:) =        pst(:,:)                               * rcp  * tmask(:,:,1) 
    393399      ! 
    394400      ! local scalars ( place there for vector optimisation purposes) 
     
    541547      qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)                                &   ! Downward Non Solar 
    542548         &     - sf(jp_snow)%fnow(:,:,1) * rn_pfac * rLfus                        &   ! remove latent melting heat for solid precip 
    543          &     - zevap(:,:) * pst(:,:) * rcp                                      &   ! remove evap heat content at SST 
     549         &     - zevap(:,:) * zcptn(:,:)                                          &   ! remove evap heat content at SST 
    544550         &     + ( sf(jp_prec)%fnow(:,:,1) - sf(jp_snow)%fnow(:,:,1) ) * rn_pfac  &   ! add liquid precip heat content at Tair 
    545          &     * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp                          & 
     551         &     * zcptrain(:,:)                                                    & 
    546552         &     + sf(jp_snow)%fnow(:,:,1) * rn_pfac                                &   ! add solid  precip heat content at min(Tair,Tsnow) 
    547          &     * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi 
     553         &     * zcptsnw(:,:) 
    548554      qns(:,:) = qns(:,:) * tmask(:,:,1) 
    549555      ! 
     
    819825      REAL(wp), DIMENSION(jpi,jpj)     ::   zevap, zsnw   ! evaporation and snw distribution after wind blowing (SI3) 
    820826      REAL(wp), DIMENSION(jpi,jpj)     ::   zrhoa 
    821       REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2 
    822827      REAL(wp), DIMENSION(jpi,jpj)     ::   ztri 
     828      REAL(wp), DIMENSION(jpi,jpj)     ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg) 
    823829      !!--------------------------------------------------------------------- 
    824830      ! 
     
    827833      ! 
    828834      zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 
     835      ! 
     836      ! Heat content per unit mass (J/kg) 
     837      zcptrain(:,:) = (      sf(jp_tair)%fnow(:,:,1)        - rt0 ) * rcp  * tmask(:,:,1) 
     838      zcptsnw (:,:) = ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) 
     839      zcptn   (:,:) =        sst_m(:,:)                             * rcp  * tmask(:,:,1) 
    829840      ! 
    830841      zztmp = 1. / ( 1. - albo ) 
     
    901912 
    902913      ! --- heat flux associated with emp --- ! 
    903       qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * sst_m(:,:) * rcp                  & ! evap at sst 
    904          &          + ( tprecip(:,:) - sprecip(:,:) ) * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp  & ! liquid precip at Tair 
    905          &          +   sprecip(:,:) * ( 1._wp - zsnw ) *                                        & ! solid precip at min(Tair,Tsnow) 
    906          &              ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 
    907       qemp_ice(:,:) =   sprecip(:,:) * zsnw *                                                    & ! solid precip (only) 
    908          &              ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 
     914      qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * zcptn(:,:)         & ! evap at sst 
     915         &          + ( tprecip(:,:) - sprecip(:,:) )   *   zcptrain(:,:)         & ! liquid precip at Tair 
     916         &          +   sprecip(:,:) * ( 1._wp - zsnw ) * ( zcptsnw (:,:) - rLfus ) ! solid precip at min(Tair,Tsnow) 
     917      qemp_ice(:,:) =   sprecip(:,:) *           zsnw   * ( zcptsnw (:,:) - rLfus ) ! solid precip (only) 
    909918 
    910919      ! --- total solar and non solar fluxes --- ! 
     
    914923 
    915924      ! --- heat content of precip over ice in J/m3 (to be used in 1D-thermo) --- ! 
    916       qprec_ice(:,:) = rhos * ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 
     925      qprec_ice(:,:) = rhos * ( zcptsnw(:,:) - rLfus ) 
    917926 
    918927      ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- 
     
    947956 
    948957      IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN 
    949          ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) )  
    950          CALL iom_put( 'evap_ao_cea'  , ztmp(:,:) * tmask(:,:,1) )   ! ice-free oce evap (cell average) 
    951          CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * sst_m(:,:) * rcp * tmask(:,:,1) )   ! heat flux from evap (cell average) 
    952       ENDIF 
    953       IF( iom_use('hflx_rain_cea') ) THEN 
    954          ztmp(:,:) = rcp * ( SUM( (ptsu-rt0) * a_i_b, dim=3 ) + sst_m(:,:) * ( 1._wp - at_i_b(:,:) ) ) 
    955          CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * ztmp(:,:) )   ! heat flux from rain (cell average) 
    956       ENDIF 
    957       IF( iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN 
    958           WHERE( SUM( a_i_b, dim=3 ) > 1.e-10 ) ;   ztmp(:,:) = rcpi * SUM( (ptsu-rt0) * a_i_b, dim=3 ) / SUM( a_i_b, dim=3 ) 
    959           ELSEWHERE                             ;   ztmp(:,:) = rcp * sst_m(:,:)     
    960           ENDWHERE 
    961           ztmp2(:,:) = sprecip(:,:) * ( ztmp(:,:) - rLfus )  
    962           CALL iom_put('hflx_snow_cea'   , ztmp2(:,:) ) ! heat flux from snow (cell average) 
    963           CALL iom_put('hflx_snow_ao_cea', ztmp2(:,:) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 
    964           CALL iom_put('hflx_snow_ai_cea', ztmp2(:,:) *           zsnw(:,:)   ) ! heat flux from snow (over ice) 
    965       ENDIF 
    966       ! 
     958         CALL iom_put( 'evap_ao_cea'  , zevap(:,:) * ( 1._wp - at_i_b(:,:) ) * tmask(:,:,1)              )   ! ice-free oce evap (cell average) 
     959         CALL iom_put( 'hflx_evap_cea', zevap(:,:) * ( 1._wp - at_i_b(:,:) ) * tmask(:,:,1) * zcptn(:,:) )   ! heat flux from evap (cell average) 
     960      ENDIF 
     961      IF( iom_use('rain') .OR. iom_use('rain_ao_cea') .OR. iom_use('hflx_rain_cea') ) THEN 
     962         CALL iom_put( 'rain'         ,   tprecip(:,:) - sprecip(:,:)                             )          ! liquid precipitation  
     963         CALL iom_put( 'rain_ao_cea'  , ( tprecip(:,:) - sprecip(:,:) ) * ( 1._wp - at_i_b(:,:) ) )          ! liquid precipitation over ocean (cell average) 
     964         CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) )                    ! heat flux from rain (cell average) 
     965      ENDIF 
     966      IF(  iom_use('snow_ao_cea')   .OR. iom_use('snow_ai_cea')      .OR. & 
     967         & iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN 
     968         CALL iom_put( 'snow_ao_cea'     , sprecip(:,:)                            * ( 1._wp - zsnw(:,:) ) ) ! Snow over ice-free ocean  (cell average) 
     969         CALL iom_put( 'snow_ai_cea'     , sprecip(:,:)                            *           zsnw(:,:)   ) ! Snow over sea-ice         (cell average) 
     970         CALL iom_put( 'hflx_snow_cea'   , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) )                         ! heat flux from snow (cell average) 
     971         CALL iom_put( 'hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 
     972         CALL iom_put( 'hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) *           zsnw(:,:)   ) ! heat flux from snow (over ice) 
     973      ENDIF 
     974      IF( iom_use('hflx_prec_cea') ) THEN                                                                    ! heat flux from precip (cell average) 
     975         CALL iom_put('hflx_prec_cea' ,    sprecip(:,:)                  * ( zcptsnw (:,:) - rLfus )  & 
     976            &                          + ( tprecip(:,:) - sprecip(:,:) ) *   zcptrain(:,:) ) 
     977      ENDIF 
     978      ! 
     979      IF( iom_use('subl_ai_cea') )   CALL iom_put( 'subl_ai_cea' , SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) * tmask(:,:,1) ) ! Sublimation over sea-ice (cell average) 
     980!!clem IF( iom_use('hflx_subl_cea') ) CALL iom_put( 'hflx_subl_cea', SUM( a_i_b(:,:,:) * qevap_ice(:,:,:), dim=3 ) * tmask(:,:,1) ) ! Heat flux from sublimation (cell average) 
     981 
    967982      IF(ln_ctl) THEN 
    968983         CALL prt_ctl(tab3d_1=qla_ice , clinfo1=' blk_ice: qla_ice  : ', tab3d_2=z_qsb   , clinfo2=' z_qsb    : ', kdim=jpl) 
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbccpl.F90

    r14590 r14717  
    18551855      IF( iom_use('snow_ao_cea') )   CALL iom_put( 'snow_ao_cea' , sprecip(:,:) * ( 1._wp - zsnw(:,:) )                  )  ! Snow over ice-free ocean  (cell average) 
    18561856      IF( iom_use('snow_ai_cea') )   CALL iom_put( 'snow_ai_cea' , sprecip(:,:) *           zsnw(:,:)                    )  ! Snow over sea-ice         (cell average) 
    1857       IF( iom_use('rain_ao_cea') )   CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * picefr(:,:)         )  ! liquid precipitation over ocean (cell average) 
     1857      IF( iom_use('rain_ao_cea') )   CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * ziceld(:,:)         )  ! liquid precipitation over ocean (cell average) 
    18581858      IF( iom_use('subl_ai_cea') )   CALL iom_put( 'subl_ai_cea' , zevap_ice_total(:,:) * picefr(:,:) * tmask(:,:,1)     )  ! Sublimation over sea-ice (cell average) 
    18591859      IF( iom_use('evap_ao_cea') )   CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1)  & 
     
    20302030      IF (        iom_use('hflx_snow_ai_cea') ) &                                                    ! heat flux from snow (over ice) 
    20312031         &   CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) *  zsnw(:,:) ) 
     2032      IF(         iom_use('hflx_subl_cea') )    &                                                    ! heat flux from sublimation 
     2033         &   CALL iom_put('hflx_subl_cea' ,   SUM( qevap_ice(:,:,:) * a_i(:,:,:), dim=3 ) * tmask(:,:,1) ) 
    20322034      ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. 
    20332035      ! 
  • 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 
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcrnf.F90

    r13255 r14717  
    128128             IF( ln_rnf_icb ) THEN 
    129129                fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt 
    130                 CALL iom_put( 'iceberg_cea'  , fwficb(:,:)  )         ! output iceberg flux 
    131                 CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
     130                rnf(:,:) = rnf(:,:) + fwficb(:,:) 
     131                qns(:,:) = qns(:,:) - fwficb(:,:) * rLfus 
     132                !!qns_tot(:,:) = qns_tot(:,:) - fwficb(:,:) * rLfus                 
     133                !!qns_oce(:,:) = qns_oce(:,:) - fwficb(:,:) * rLfus                 
     134                CALL iom_put( 'iceberg_cea'  ,  fwficb(:,:)  )          ! output iceberg flux 
     135                CALL iom_put( 'hflx_icb_cea' , -fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
    132136             ENDIF 
    133137         ENDIF 
     
    149153                                         CALL iom_put( 'runoffs'     , rnf(:,:)                         )   ! output runoff mass flux 
    150154         IF( iom_use('hflx_rnf_cea') )   CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rau0 * rcp )   ! output runoff sensible heat (W/m2) 
     155         IF( iom_use('sflx_rnf_cea') )   CALL iom_put( 'sflx_rnf_cea', rnf_tsc(:,:,jp_sal) * rau0       )   ! output runoff salt flux (g/m2/s) 
    151156      ENDIF 
    152157      ! 
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcssr.F90

    r12276 r14717  
    9191         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN      !    Add restoring term     ! 
    9292            !                                      ! ========================= ! 
     93            qrp(:,:) = 0._wp ! necessary init 
     94            erp(:,:) = 0._wp 
    9395            ! 
    9496            IF( nn_sstr == 1 ) THEN                                   !* Temperature restoring term 
     
    140142                     qns(ji,jj) = qns(ji,jj) - zerp * rcp * sst_m(ji,jj) 
    141143                     erp(ji,jj) = zerp 
     144                     qrp(ji,jj) = qrp(ji,jj) - zerp * rcp * sst_m(ji,jj) 
    142145                  END DO 
    143146               END DO 
    144147            ENDIF 
     148            ! 
     149            ! outputs 
     150            CALL iom_put( 'hflx_ssr_cea', qrp(:,:) ) 
     151            IF( nn_sssr == 1 )   CALL iom_put( 'sflx_ssr_cea',  erp(:,:) * sss_m(:,:) ) 
     152            IF( nn_sssr == 2 )   CALL iom_put( 'vflx_ssr_cea', -erp(:,:) ) 
    145153            ! 
    146154         ENDIF 
  • 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.