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

Changeset 14717


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
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/cfgs/SHARED/field_def_nemo-ice.xml

    r14582 r14717  
    164164          <field id="hfxcndtop"    long_name="Net conductive heat flux at the ice surface (neg = ice cooling)"  standard_name="conductive_heat_flux_at_sea_ice_surface"    unit="W/m2" />  
    165165          <field id="hfxcndbot"    long_name="Net conductive heat flux at the ice bottom (neg = ice cooling)"   standard_name="conductive_heat_flux_at_sea_ice_bottom"     unit="W/m2" /> 
    166           <!-- clem: uncomment when uncommented in iceupdate.F90 --> 
    167           <!-- 
    168166          <field id="hfxmelt"      long_name="Melt heat flux at the ice surface"       unit="W/m2" /> 
    169167          <field id="hfxldmelt"    long_name="Heat flux in the lead for ice melting"   unit="W/m2" /> 
    170168          <field id="hfxldgrow"    long_name="Heat flux in the lead for ice growth"    unit="W/m2" /> 
    171           --> 
    172169 
    173170          <!-- diags --> 
     
    332329          <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  /> 
    333330 
    334           <!-- available with ln_icediaout --> 
     331          <!-- available with ln_icediahsb --> 
     332     <!-- global forcings  --> 
    335333          <field id="ibgfrcvoltop"    long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)"   unit="km3"      /> 
    336334          <field id="ibgfrcvolbot"    long_name="global mean ice/snow forcing at interface ice/snow-ocean (volume equivalent ocean volume)" unit="km3"      /> 
     
    341339          <field id="ibgfrchfxbot"    long_name="global mean heat flux below ice (on top of ocean) "                                        unit="W/m2"     /> 
    342340      
     341     <!-- global drifts (conservation checks) --> 
    343342          <field id="ibgvolume"       long_name="drift in ice/snow volume (equivalent ocean volume)"                                        unit="km3"      /> 
    344343          <field id="ibgsaltco"       long_name="drift in ice salt content (equivalent ocean volume)"                                       unit="pss*km3"  /> 
     
    346345          <field id="ibgheatfx"       long_name="drift in ice/snow heat flux"                                                               unit="W/m2"     /> 
    347346 
     347     <!-- global contents --> 
    348348          <field id="ibgvol_tot"      long_name="global mean ice volume"                                                                    unit="km3"      /> 
    349349          <field id="sbgvol_tot"      long_name="global mean snow volume"                                                                   unit="km3"      /> 
    350350          <field id="ibgarea_tot"     long_name="global mean ice area"                                                                      unit="km2"      /> 
    351           <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="1e-3*km3" /> 
     351          <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="pss*km3" /> 
    352352          <field id="ibgheat_tot"     long_name="global mean ice heat content"                                                              unit="1e20J"    /> 
    353353          <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"    /> 
     354          <field id="ipbgvol_tot"     long_name="global mean ice pond volume"                                                               unit="km3"      /> 
     355          <field id="ilbgvol_tot"     long_name="global mean ice pond lid volume"                                                           unit="km3"      /> 
    354356 
    355357   </field_group> 
     
    484486   </field_group>     
    485487 
     488   <!--============================--> 
     489   <!--  CONSERVATION diagnostics  --> 
     490   <!--============================--> 
     491 
    486492   <field_group id="ICE_globalbudget"  grid_ref="grid_scalar" > 
    487      <!-- global contents --> 
    488         <field field_ref="ibgvol_tot"       name="ibgvol_tot"   /> 
     493     <field field_ref="ibgvol_tot"       name="ibgvol_tot"   /> 
    489494     <field field_ref="sbgvol_tot"       name="sbgvol_tot"   /> 
    490         <field field_ref="ibgarea_tot"      name="ibgarea_tot"  /> 
    491         <field field_ref="ibgsalt_tot"      name="ibgsalt_tot"  /> 
    492         <field field_ref="ibgheat_tot"      name="ibgheat_tot"  /> 
    493         <field field_ref="sbgheat_tot"      name="sbgheat_tot"  /> 
    494  
    495      <!-- global drifts (conservation checks) --> 
    496      <field field_ref="ibgvolume"        name="ibgvolume"    /> 
    497         <field field_ref="ibgsaltco"        name="ibgsaltco"    /> 
    498         <field field_ref="ibgheatco"        name="ibgheatco"    /> 
    499           <field field_ref="ibgheatfx"        name="ibgheatfx"    /> 
    500  
    501      <!-- global forcings  --> 
    502         <field field_ref="ibgfrcvoltop"     name="ibgfrcvoltop" /> 
    503         <field field_ref="ibgfrcvolbot"     name="ibgfrcvolbot" /> 
    504         <field field_ref="ibgfrctemtop"     name="ibgfrctemtop" /> 
    505         <field field_ref="ibgfrctembot"     name="ibgfrctembot" /> 
    506         <field field_ref="ibgfrcsal"        name="ibgfrcsal"    /> 
    507           <field field_ref="ibgfrchfxtop"     name="ibgfrchfxtop" /> 
    508           <field field_ref="ibgfrchfxbot"     name="ibgfrchfxbot" /> 
     495     <field field_ref="ibgarea_tot"      name="ibgarea_tot"  /> 
     496     <field field_ref="ibgsalt_tot"      name="ibgsalt_tot"  /> 
     497     <field field_ref="ibgheat_tot"      name="ibgheat_tot"  /> 
     498     <field field_ref="sbgheat_tot"      name="sbgheat_tot"  /> 
     499     <field field_ref="ipbgvol_tot"      name="ipbgvol_tot"  /> 
     500     <field field_ref="ilbgvol_tot"      name="ilbgvol_tot"  /> 
    509501   </field_group> 
    510  
     502    
     503   <field_group id="ICE_budget"        grid_ref="grid_T_2D" > 
     504     <!-- general --> 
     505     <field field_ref="icemask"          name="simsk"      /> 
     506     <field field_ref="iceconc"          name="siconc"     /> 
     507          <field field_ref="icetemp"          name="sitemp"     /> 
     508          <field field_ref="snwtemp"          name="sntemp"     /> 
     509          <field field_ref="icettop"          name="sittop"     /> 
     510          <field field_ref="icetbot"          name="sitbot"     /> 
     511     <!-- heat fluxes --> 
     512     <field field_ref="qt_oce_ai"        name="qt_oce_ai"  /> 
     513     <field field_ref="qt_atm_oi"        name="qt_atm_oi"  /> 
     514     <field field_ref="qtr_ice_top"      name="qtr_ice_top"/> 
     515     <field field_ref="qtr_ice_bot"      name="qtr_ice_bot"/> 
     516     <field field_ref="qt_ice"           name="qt_ice"     /> 
     517     <field field_ref="qsr_ice"          name="qsr_ice"    /> 
     518     <field field_ref="qns_ice"          name="qns_ice"    /> 
     519     <field field_ref="qemp_ice"         name="qemp_ice"   /> 
     520     <field field_ref="hfxsub"           name="hfxsub"     /> 
     521     <field field_ref="hfxspr"           name="hfxspr"     /> 
     522     <field field_ref="hfxcndtop"        name="hfxcndtop"  /> 
     523     <field field_ref="hfxcndbot"        name="hfxcndbot"  /> 
     524     <field field_ref="hfxsensib"        name="hfxsensib"  /> 
     525     <field field_ref="hfxmelt"          name="hfxmelt"    /> 
     526     <field field_ref="hfxldmelt"        name="hfxldmelt"  /> 
     527     <field field_ref="hfxldgrow"        name="hfxldgrow"  /> 
     528     <!-- salt fluxes --> 
     529     <field field_ref="sfxice"           name="sfxice"     /> 
     530     <!-- mass fluxes --> 
     531     <field field_ref="vfxice"           name="vfxice"     /> 
     532     <field field_ref="vfxsnw"           name="vfxsnw"     /> 
     533     <field field_ref="vfxpnd"           name="vfxpnd"     /> 
     534     <field field_ref="vfxsub"           name="vfxsub"     /> 
     535     <field field_ref="vfxsub_err"       name="vfxsub_err" /> 
     536     <field field_ref="vfxsnw_sub"       name="vfxsnw_sub" /> 
     537     <field field_ref="vfxsnw_pre"       name="vfxsnw_pre" /> 
     538   </field_group> 
    511539 
    512540   <!--============================--> 
  • NEMO/releases/r4.0/r4.0-HEAD/cfgs/SHARED/field_def_nemo-oce.xml

    r13648 r14717  
    138138        <field id="cfl_cv"       long_name="v-courant number"   unit="#" /> 
    139139        <field id="cfl_cw"       long_name="w-courant number"   unit="#" /> 
     140 
     141        <!-- fluxes from damping --> 
     142        <field id="sflx_dmp_cea"  long_name="salt flux due to damping"  standard_name="salt_flux_due_to_damping"          unit="g/m2/s"   /> 
     143        <field id="hflx_dmp_cea"  long_name="heat flux due to damping"  standard_name="heat_flux_due_to_damping"          unit="W/m2"     /> 
    140144 
    141145      </field_group> <!-- grid_T --> 
     
    270274          <field id="emp_oce"      long_name="Evap minus Precip over ocean"         standard_name="evap_minus_precip_over_sea_water"                                     unit="kg/m2/s"   /> 
    271275          <field id="emp_ice"      long_name="Evap minus Precip over ice"           standard_name="evap_minus_precip_over_sea_ice"                                       unit="kg/m2/s"   /> 
    272           <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="1e-3/m2/s" /> 
     276          <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="g/m2/s"    /> 
    273277          <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   /> 
    274278          <field id="snowpre"      long_name="Snow precipitation"                   standard_name="snowfall_flux"                                                        unit="kg/m2/s"   /> 
     
    335339          <field id="hflx_rain_cea" long_name="heat flux due to rainfall"                                standard_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"        unit="W/m2"     /> 
    336340          <field id="hflx_evap_cea" long_name="heat flux due to evaporation"                             standard_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water"   unit="W/m2"     /> 
     341          <field id="hflx_subl_cea" long_name="heat flux due to sublimation (from atm. forcings)"        standard_name="temperature_flux_due_to_sublimation_expressed_as_heat_flux_out_of_sea_ice"     unit="W/m2"     /> 
    337342          <field id="hflx_prec_cea" long_name="heat flux due to all precip"                              standard_name="temperature_flux_due_to_all_precip_expressed_as_heat_flux_into_sea_water"      unit="W/m2"     /> 
    338343          <field id="hflx_snow_cea" long_name="heat flux due to snow falling"                            standard_name="heat_flux_onto_ocean_and_ice_due_to_snow_thermodynamics"                       unit="W/m2"     /> 
     
    341346          <field id="hflx_ice_cea"  long_name="heat flux due to ice thermodynamics"                      standard_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                        unit="W/m2"     /> 
    342347          <field id="hflx_rnf_cea"  long_name="heat flux due to runoffs"                                 standard_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"          unit="W/m2"     /> 
     348          <field id="sflx_rnf_cea"  long_name="salt flux due to runoffs"                                 standard_name="salt_flux_due_to_runoffs"                                                      unit="g/m2/s"   /> 
    343349          <field id="hflx_cal_cea"  long_name="heat flux due to calving"                                 standard_name="heat_flux_into_sea_water_due_to_calving"                                       unit="W/m2"     /> 
    344350          <field id="hflx_icb_cea"  long_name="heat flux due to iceberg"                                 standard_name="heat_flux_into_sea_water_due_to_icebergs"                                      unit="W/m2"     /> 
     
    349355          <field id="sntoice_cea"   long_name="Snow-Ice Formation Rate (cell average)"                   standard_name="tendency_of_sea_ice_amount_due_to_snow_conversion"                             unit="kg/m2/s"  /> 
    350356          <field id="ticemel_cea"   long_name="Rate of Melt at Upper Surface of Sea Ice (cell average)"  standard_name="tendency_of_sea_ice_amount_due_to_surface_melting"                             unit="kg/m2/s"  /> 
     357 
     358          <!-- fluxes from relaxation and freshwater budget --> 
     359          <field id="sflx_ssr_cea"  long_name="salt flux due to restoring"    standard_name="salt_flux_due_to_restoring"    unit="g/m2/s"   /> 
     360     <field id="hflx_ssr_cea"  long_name="heat flux due to restoring"    standard_name="heat_flux_due_to_restoring"    unit="W/m2"     /> 
     361     <field id="vflx_ssr_cea"  long_name="volume flux due to restoring"  standard_name="volume_flux_due_to_restoring"  unit="kg/m2/s"  /> 
     362          <field id="hflx_fwb_cea"  long_name="heat flux due to fwb"          standard_name="heat_flux_due_to_fwb"          unit="W/m2"     /> 
     363          <field id="vflx_fwb_cea"  long_name="volume flux due to fwb"        standard_name="volume_flux_due_to_fwb"        unit="kg/m2/s"  /> 
    351364 
    352365          <!-- ice field (nn_ice=1)  --> 
     
    10261039    </field_group>     
    10271040 
     1041    <!--============================--> 
     1042    <!--  CONSERVATION diagnostics  --> 
     1043    <!--============================--> 
     1044     
     1045    <field_group id="OCE_budget"        grid_ref="grid_T_2D" > 
     1046      <field field_ref="sst"                 name="tos"          /> 
     1047      <field field_ref="sss"                 name="sos"          /> 
     1048      <field field_ref="ssh"                 name="zos"          /> 
     1049      <!-- mass flux --> 
     1050      <field field_ref="empmr"               name="empmr"        /> 
     1051      <field field_ref="runoffs"             name="runoffs"      /> 
     1052      <field field_ref="emp_ice"             name="emp_ice"      /> 
     1053      <field field_ref="emp_oce"             name="emp_oce"      /> 
     1054      <field field_ref="iceshelf_cea"        name="iceshelf"     /> 
     1055      <field field_ref="iceberg_cea"         name="iceberg"      /> 
     1056      <field field_ref="calving_cea"         name="calving"      /> 
     1057      <!-- <field field_ref="berg_floating_melt"  name="calving" /> --> 
     1058      <field field_ref="precip"              name="precip"       /> 
     1059      <field field_ref="snowpre"             name="snowpre"      /> 
     1060      <field field_ref="rain"                name="rain"         /> 
     1061      <field field_ref="evap_ao_cea"         name="evap_ao"      /> 
     1062      <field field_ref="subl_ai_cea"         name="subl_ai"      /> 
     1063      <field field_ref="snow_ai_cea"         name="snow_ai"      /> 
     1064      <field field_ref="snow_ao_cea"         name="snow_ao"      /> 
     1065      <!-- heat flux --> 
     1066      <field field_ref="qsr"                 name="qsr"          /> 
     1067      <field field_ref="qns"                 name="qns"          /> 
     1068      <field field_ref="qt_oce"              name="qt_oce"       /> 
     1069      <field field_ref="qemp_oce"            name="qemp_oce"     /> 
     1070      <field field_ref="hflx_rain_cea"       name="hflx_rain"    /> 
     1071      <field field_ref="hflx_evap_cea"       name="hflx_evap"    /> 
     1072      <field field_ref="hflx_snow_cea"       name="hflx_snow"    /> 
     1073      <field field_ref="hflx_snow_ao_cea"    name="hflx_snow_ao" /> 
     1074      <field field_ref="hflx_snow_ai_cea"    name="hflx_snow_ai" /> 
     1075      <field field_ref="hflx_rnf_cea"        name="hflx_rnf"     /> 
     1076      <field field_ref="hflx_icb_cea"        name="hflx_icb"     /> 
     1077      <field field_ref="hflx_isf_cea"        name="hflx_isf"     /> 
     1078      <!-- salt flux (includes ssr) --> 
     1079      <field field_ref="saltflx"             name="saltflx"      /> 
     1080      <field field_ref="sflx_rnf_cea"        name="sflx_rnf"     /> 
     1081      <!-- relaxation and damping --> 
     1082      <field field_ref="hflx_ssr_cea"        name="hflx_ssr"     /> 
     1083      <field field_ref="vflx_ssr_cea"        name="vflx_ssr"     /> 
     1084      <field field_ref="sflx_ssr_cea"        name="sflx_ssr"     /> 
     1085      <field field_ref="hflx_dmp_cea"        name="hflx_dmp"     /> 
     1086      <field field_ref="sflx_dmp_cea"        name="sflx_dmp"     /> 
     1087      <field field_ref="hflx_fwb_cea"        name="hflx_fwb"     /> 
     1088      <field field_ref="vflx_fwb_cea"        name="vflx_fwb"     /> 
     1089    </field_group> 
     1090 
     1091    <field_group id="OCE_globalbudget"  grid_ref="grid_scalar" > 
     1092      <field field_ref="voltot"              name="scvoltot"     /> 
     1093      <field field_ref="saltot"              name="scsaltot"     /> 
     1094      <field field_ref="temptot"             name="sctemtot"     /> 
     1095    </field_group> 
     1096 
    10281097   </field_definition> 
  • 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.