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

Changeset 14718


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

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

Location:
NEMO/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-ice.xml

    r14581 r14718  
    178178      <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" /> 
    179179      <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" /> 
    180       <!-- clem: uncomment when uncommented in iceupdate.F90 --> 
    181       <!-- 
    182180      <field id="hfxmelt"      long_name="Melt heat flux at the ice surface"       unit="W/m2" /> 
    183181      <field id="hfxldmelt"    long_name="Heat flux in the lead for ice melting"   unit="W/m2" /> 
    184182      <field id="hfxldgrow"    long_name="Heat flux in the lead for ice growth"    unit="W/m2" /> 
    185       --> 
    186183 
    187184      <!-- diags --> 
     
    351348      <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  /> 
    352349 
    353       <!-- available with ln_icediaout --> 
     350      <!-- available with ln_icediahsb --> 
     351      <!-- global forcings  --> 
    354352      <field id="ibgfrcvoltop"    long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)"   unit="km3"      /> 
    355353      <field id="ibgfrcvolbot"    long_name="global mean ice/snow forcing at interface ice/snow-ocean (volume equivalent ocean volume)" unit="km3"      /> 
     
    360358      <field id="ibgfrchfxbot"    long_name="global mean heat flux below ice (on top of ocean) "                                        unit="W/m2"     /> 
    361359 
     360      <!-- global drifts (conservation checks) --> 
    362361      <field id="ibgvolume"       long_name="drift in ice/snow volume (equivalent ocean volume)"                                        unit="km3"      /> 
    363362      <field id="ibgsaltco"       long_name="drift in ice salt content (equivalent ocean volume)"                                       unit="pss*km3"  /> 
     
    365364      <field id="ibgheatfx"       long_name="drift in ice/snow heat flux"                                                               unit="W/m2"     /> 
    366365 
     366      <!-- global contents --> 
    367367      <field id="ibgvol_tot"      long_name="global mean ice volume"                                                                    unit="km3"      /> 
    368368      <field id="sbgvol_tot"      long_name="global mean snow volume"                                                                   unit="km3"      /> 
    369369      <field id="ibgarea_tot"     long_name="global mean ice area"                                                                      unit="km2"      /> 
    370       <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="1e-3*km3" /> 
     370      <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="pss*km3" /> 
    371371      <field id="ibgheat_tot"     long_name="global mean ice heat content"                                                              unit="1e20J"    /> 
    372372      <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"    /> 
     373      <field id="ipbgvol_tot"     long_name="global mean ice pond volume"                                                               unit="km3"      /> 
     374      <field id="ilbgvol_tot"     long_name="global mean ice pond lid volume"                                                           unit="km3"      /> 
    373375 
    374376    </field_group> 
     
    502504    </field_group> 
    503505 
     506    <!--============================--> 
     507    <!--  CONSERVATION diagnostics  --> 
     508    <!--============================--> 
     509 
    504510    <field_group id="ICE_globalbudget"  grid_ref="grid_scalar" > 
    505       <!-- global contents --> 
    506511      <field field_ref="ibgvol_tot"       name="ibgvol_tot"   /> 
    507512      <field field_ref="sbgvol_tot"       name="sbgvol_tot"   /> 
     
    510515      <field field_ref="ibgheat_tot"      name="ibgheat_tot"  /> 
    511516      <field field_ref="sbgheat_tot"      name="sbgheat_tot"  /> 
    512  
    513       <!-- global drifts (conservation checks) --> 
    514       <field field_ref="ibgvolume"        name="ibgvolume"    /> 
    515       <field field_ref="ibgsaltco"        name="ibgsaltco"    /> 
    516       <field field_ref="ibgheatco"        name="ibgheatco"    /> 
    517       <field field_ref="ibgheatfx"        name="ibgheatfx"    /> 
    518  
    519       <!-- global forcings  --> 
    520       <field field_ref="ibgfrcvoltop"     name="ibgfrcvoltop" /> 
    521       <field field_ref="ibgfrcvolbot"     name="ibgfrcvolbot" /> 
    522       <field field_ref="ibgfrctemtop"     name="ibgfrctemtop" /> 
    523       <field field_ref="ibgfrctembot"     name="ibgfrctembot" /> 
    524       <field field_ref="ibgfrcsal"        name="ibgfrcsal"    /> 
    525       <field field_ref="ibgfrchfxtop"     name="ibgfrchfxtop" /> 
    526       <field field_ref="ibgfrchfxbot"     name="ibgfrchfxbot" /> 
    527     </field_group> 
    528  
    529  
     517      <field field_ref="ipbgvol_tot"      name="ipbgvol_tot"  /> 
     518      <field field_ref="ilbgvol_tot"      name="ilbgvol_tot"  /> 
     519    </field_group> 
     520     
     521    <field_group id="ICE_budget"        grid_ref="grid_T_2D" > 
     522      <!-- general --> 
     523      <field field_ref="icemask"          name="simsk"      /> 
     524      <field field_ref="iceconc"          name="siconc"     /> 
     525      <field field_ref="icetemp"          name="sitemp"     /> 
     526      <field field_ref="snwtemp"          name="sntemp"     /> 
     527      <field field_ref="icettop"          name="sittop"     /> 
     528      <field field_ref="icetbot"          name="sitbot"     /> 
     529      <!-- heat fluxes --> 
     530      <field field_ref="qt_oce_ai"        name="qt_oce_ai"  /> 
     531      <field field_ref="qt_atm_oi"        name="qt_atm_oi"  /> 
     532      <field field_ref="qtr_ice_top"      name="qtr_ice_top"/> 
     533      <field field_ref="qtr_ice_bot"      name="qtr_ice_bot"/> 
     534      <field field_ref="qt_ice"           name="qt_ice"     /> 
     535      <field field_ref="qsr_ice"          name="qsr_ice"    /> 
     536      <field field_ref="qns_ice"          name="qns_ice"    /> 
     537      <field field_ref="qemp_ice"         name="qemp_ice"   /> 
     538      <field field_ref="hfxsub"           name="hfxsub"     /> 
     539      <field field_ref="hfxspr"           name="hfxspr"     /> 
     540      <field field_ref="hfxcndtop"        name="hfxcndtop"  /> 
     541      <field field_ref="hfxcndbot"        name="hfxcndbot"  /> 
     542      <field field_ref="hfxsensib"        name="hfxsensib"  /> 
     543      <field field_ref="hfxmelt"          name="hfxmelt"    /> 
     544      <field field_ref="hfxldmelt"        name="hfxldmelt"  /> 
     545      <field field_ref="hfxldgrow"        name="hfxldgrow"  /> 
     546      <!-- salt fluxes --> 
     547      <field field_ref="sfxice"           name="sfxice"     /> 
     548      <!-- mass fluxes --> 
     549      <field field_ref="vfxice"           name="vfxice"     /> 
     550      <field field_ref="vfxsnw"           name="vfxsnw"     /> 
     551      <field field_ref="vfxpnd"           name="vfxpnd"     /> 
     552      <field field_ref="vfxsub"           name="vfxsub"     /> 
     553      <field field_ref="vfxsub_err"       name="vfxsub_err" /> 
     554      <field field_ref="vfxsnw_sub"       name="vfxsnw_sub" /> 
     555      <field field_ref="vfxsnw_pre"       name="vfxsnw_pre" /> 
     556    </field_group> 
     557 
     558     
    530559    <!--============================--> 
    531560    <!-- SIMIP sea ice field groups --> 
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml

    r14224 r14718  
    241241    <field id="mf_mf"       long_name="mass flux"              standard_name="mf_mass_flux"          unit="m"      grid_ref="grid_T_3D" /> 
    242242 
     243    <!-- fluxes from damping --> 
     244    <field id="sflx_dmp_cea"  long_name="salt flux due to damping"  standard_name="salt_flux_due_to_damping"          unit="g/m2/s"   /> 
     245    <field id="hflx_dmp_cea"  long_name="heat flux due to damping"  standard_name="heat_flux_due_to_damping"          unit="W/m2"     /> 
     246 
    243247  </field_group> <!-- grid_T --> 
    244248 
     
    375379      <field id="emp_oce"      long_name="Evap minus Precip over ocean"         standard_name="evap_minus_precip_over_sea_water"                                     unit="kg/m2/s"   /> 
    376380      <field id="emp_ice"      long_name="Evap minus Precip over ice"           standard_name="evap_minus_precip_over_sea_ice"                                       unit="kg/m2/s"   /> 
    377       <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="1e-3/m2/s" /> 
     381      <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="g/m2/s"    /> 
    378382      <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   /> 
    379383      <field id="snowpre"      long_name="Snow precipitation"                   standard_name="snowfall_flux"                                                        unit="kg/m2/s"   /> 
     
    475479      <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"     /> 
    476480      <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"     /> 
     481      <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"     /> 
    477482      <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"     /> 
    478483      <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"     /> 
     
    481486      <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"     /> 
    482487      <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"     /> 
     488      <field id="sflx_rnf_cea"  long_name="salt flux due to runoffs"                                 standard_name="salt_flux_due_to_runoffs"                                                      unit="g/m2/s"   /> 
    483489      <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"     /> 
    484490      <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"     /> 
     
    490496      <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"  /> 
    491497 
     498      <!-- fluxes from relaxation and freshwater budget --> 
     499      <field id="sflx_ssr_cea"  long_name="salt flux due to restoring"    standard_name="salt_flux_due_to_restoring"    unit="g/m2/s"   /> 
     500      <field id="hflx_ssr_cea"  long_name="heat flux due to restoring"    standard_name="heat_flux_due_to_restoring"    unit="W/m2"     /> 
     501      <field id="vflx_ssr_cea"  long_name="volume flux due to restoring"  standard_name="volume_flux_due_to_restoring"  unit="kg/m2/s"  /> 
     502      <field id="hflx_fwb_cea"  long_name="heat flux due to fwb"          standard_name="heat_flux_due_to_fwb"          unit="W/m2"     /> 
     503      <field id="vflx_fwb_cea"  long_name="volume flux due to fwb"        standard_name="volume_flux_due_to_fwb"        unit="kg/m2/s"  /> 
     504       
    492505      <!-- ice field (nn_ice=1)  --> 
    493506      <field id="ice_cover"    long_name="Ice fraction"                                                 standard_name="sea_ice_area_fraction"                              unit="1"            /> 
     
    12531266  </field_group> 
    12541267 
     1268  <!--============================--> 
     1269  <!--  CONSERVATION diagnostics  --> 
     1270  <!--============================--> 
     1271 
     1272  <field_group id="OCE_budget"        grid_ref="grid_T_2D" > 
     1273    <field field_ref="sst"                 name="tos"          /> 
     1274    <field field_ref="sss"                 name="sos"          /> 
     1275    <field field_ref="ssh"                 name="zos"          /> 
     1276    <!-- mass flux --> 
     1277    <field field_ref="empmr"               name="empmr"        /> 
     1278    <field field_ref="runoffs"             name="runoffs"      /> 
     1279    <field field_ref="emp_ice"             name="emp_ice"      /> 
     1280    <field field_ref="emp_oce"             name="emp_oce"      /> 
     1281    <field field_ref="iceshelf_cea"        name="iceshelf"     /> 
     1282    <field field_ref="iceberg_cea"         name="iceberg"      /> 
     1283    <field field_ref="calving_cea"         name="calving"      /> 
     1284    <!-- <field field_ref="berg_floating_melt"  name="calving" /> --> 
     1285    <field field_ref="precip"              name="precip"       /> 
     1286    <field field_ref="snowpre"             name="snowpre"      /> 
     1287    <field field_ref="rain"                name="rain"         /> 
     1288    <field field_ref="evap_ao_cea"         name="evap_ao"      /> 
     1289    <field field_ref="subl_ai_cea"         name="subl_ai"      /> 
     1290    <field field_ref="snow_ai_cea"         name="snow_ai"      /> 
     1291    <field field_ref="snow_ao_cea"         name="snow_ao"      /> 
     1292    <!-- heat flux --> 
     1293    <field field_ref="qsr"                 name="qsr"          /> 
     1294    <field field_ref="qns"                 name="qns"          /> 
     1295    <field field_ref="qt_oce"              name="qt_oce"       /> 
     1296    <field field_ref="qemp_oce"            name="qemp_oce"     /> 
     1297    <field field_ref="hflx_rain_cea"       name="hflx_rain"    /> 
     1298    <field field_ref="hflx_evap_cea"       name="hflx_evap"    /> 
     1299    <field field_ref="hflx_snow_cea"       name="hflx_snow"    /> 
     1300    <field field_ref="hflx_snow_ao_cea"    name="hflx_snow_ao" /> 
     1301    <field field_ref="hflx_snow_ai_cea"    name="hflx_snow_ai" /> 
     1302    <field field_ref="hflx_rnf_cea"        name="hflx_rnf"     /> 
     1303    <field field_ref="hflx_icb_cea"        name="hflx_icb"     /> 
     1304    <field field_ref="hflx_isf_cea"        name="hflx_isf"     /> 
     1305    <!-- salt flux (includes ssr) --> 
     1306    <field field_ref="saltflx"             name="saltflx"      /> 
     1307    <field field_ref="sflx_rnf_cea"        name="sflx_rnf"     /> 
     1308    <!-- relaxation and damping --> 
     1309    <field field_ref="hflx_ssr_cea"        name="hflx_ssr"     /> 
     1310    <field field_ref="vflx_ssr_cea"        name="vflx_ssr"     /> 
     1311    <field field_ref="sflx_ssr_cea"        name="sflx_ssr"     /> 
     1312    <field field_ref="hflx_dmp_cea"        name="hflx_dmp"     /> 
     1313    <field field_ref="sflx_dmp_cea"        name="sflx_dmp"     /> 
     1314    <field field_ref="hflx_fwb_cea"        name="hflx_fwb"     /> 
     1315    <field field_ref="vflx_fwb_cea"        name="vflx_fwb"     /> 
     1316  </field_group> 
     1317 
     1318  <field_group id="OCE_globalbudget"  grid_ref="grid_scalar" > 
     1319    <field field_ref="voltot"              name="scvoltot"     /> 
     1320    <field field_ref="saltot"              name="scsaltot"     /> 
     1321    <field field_ref="temptot"             name="sctemtot"     /> 
     1322  </field_group> 
     1323 
     1324   
    12551325</field_definition> 
  • NEMO/trunk/src/ICE/icedia.F90

    r14072 r14718  
    6767      REAL(wp)   ::   zbg_ivol, zbg_item, zbg_area, zbg_isal 
    6868      REAL(wp)   ::   zbg_svol, zbg_stem 
     69      REAL(wp)   ::   zbg_ipvol, zbg_ilvol 
    6970      REAL(wp)   ::   z_frc_voltop, z_frc_temtop, z_frc_sal 
    7071      REAL(wp)   ::   z_frc_volbot, z_frc_tembot 
     
    8788      ! ----------------------- ! 
    8889      IF(  iom_use('ibgvol_tot' ) .OR. iom_use('sbgvol_tot' ) .OR. iom_use('ibgarea_tot') .OR. & 
    89          & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') ) THEN 
     90         & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') .OR. & 
     91         & iom_use('ipbgvol_tot' ) .OR. iom_use('ilbgvol_tot' ) ) THEN 
    9092 
    9193         zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice volume (km3) 
     
    9597         zbg_item = glob_sum( 'icedia', et_i(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 
    9698         zbg_stem = glob_sum( 'icedia', et_s(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 
     99         ! ponds 
     100         zbg_ipvol = glob_sum( 'icedia', vt_ip(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice pond volume (km3) 
     101         zbg_ilvol = glob_sum( 'icedia', vt_il(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice pond lid volume (km3) 
    97102 
    98103         CALL iom_put( 'ibgvol_tot'  , zbg_ivol ) 
     
    102107         CALL iom_put( 'ibgheat_tot' , zbg_item ) 
    103108         CALL iom_put( 'sbgheat_tot' , zbg_stem ) 
     109         ! ponds 
     110         CALL iom_put( 'ipbgvol_tot' , zbg_ipvol ) 
     111         CALL iom_put( 'ilbgvol_tot' , zbg_ilvol ) 
    104112 
    105113      ENDIF 
  • NEMO/trunk/src/ICE/iceupdate.F90

    r14595 r14718  
    289289      IF( iom_use('hfxcndbot'  ) )   CALL iom_put( 'hfxcndbot'  , SUM( qcn_ice_bot * a_i_b, dim=3 ) )   ! Bottom conduction flux 
    290290      IF( iom_use('hfxcndtop'  ) )   CALL iom_put( 'hfxcndtop'  , SUM( qcn_ice_top * a_i_b, dim=3 ) )   ! Surface conduction flux 
    291 !!    IF( iom_use('hfxmelt'    ) )   CALL iom_put( 'hfxmelt'    , SUM( qml_ice     * a_i_b, dim=3 ) )   ! Surface melt flux 
    292 !!    IF( iom_use('hfxldmelt'  ) )   CALL iom_put( 'hfxldmelt'  ,      fhld        * at_i_b         )   ! Heat in lead for ice melting  
    293 !!    IF( iom_use('hfxldgrow'  ) )   CALL iom_put( 'hfxldgrow'  ,      qlead       * r1_Dt_ice      )   ! Heat in lead for ice growth 
     291      IF( iom_use('hfxmelt'    ) )   CALL iom_put( 'hfxmelt'    , SUM( qml_ice     * a_i_b, dim=3 ) )   ! Surface melt flux 
     292      IF( iom_use('hfxldmelt'  ) )   CALL iom_put( 'hfxldmelt'  ,      fhld        * at_i_b         )   ! Heat in lead for ice melting  
     293      IF( iom_use('hfxldgrow'  ) )   CALL iom_put( 'hfxldgrow'  ,      qlead       * r1_Dt_ice      )   ! Heat in lead for ice growth 
    294294 
    295295      ! controls 
  • NEMO/trunk/src/OCE/SBC/sbcblk.F90

    r14433 r14718  
    892892      REAL(wp) ::   zztmp,zz1,zz2,zz3    ! local variable 
    893893      REAL(wp), DIMENSION(jpi,jpj) ::   zqlw              ! net long wave radiative heat flux 
    894       !!--------------------------------------------------------------------- 
    895       ! 
    896       ! local scalars ( place there for vector optimisation purposes) 
    897  
     894      REAL(wp), DIMENSION(jpi,jpj) ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg) 
     895      !!--------------------------------------------------------------------- 
     896      ! 
     897      ! Heat content per unit mass (J/kg) 
     898      zcptrain(:,:) = (      ptair        - rt0 ) * rcp  * tmask(:,:,1) 
     899      zcptsnw (:,:) = ( MIN( ptair, rt0 ) - rt0 ) * rcpi * tmask(:,:,1) 
     900      zcptn   (:,:) =        ptsk                 * rcp  * tmask(:,:,1) 
     901      ! 
    898902      ! ----------------------------------------------------------------------------- ! 
    899903      !     III    Net longwave radiative FLUX                                        ! 
     
    907911      ! ----------------------------------------------------------------------------- ! 
    908912      ! 
    909       emp (:,:) = (  pevp(:,:)                                       &   ! mass flux (evap. - precip.) 
    910          &         - pprec(:,:) * rn_pfac  ) * tmask(:,:,1) 
    911       ! 
    912       qns(:,:) = zqlw(:,:) + psen(:,:) + plat(:,:)                   &   ! Downward Non Solar 
    913          &     - psnow(:,:) * rn_pfac * rLfus                        &   ! remove latent melting heat for solid precip 
    914          &     - pevp(:,:) * ptsk(:,:) * rcp                         &   ! remove evap heat content at SST 
    915          &     + ( pprec(:,:) - psnow(:,:) ) * rn_pfac               &   ! add liquid precip heat content at Tair 
    916          &     * ( ptair(:,:) - rt0 ) * rcp                          & 
    917          &     + psnow(:,:) * rn_pfac                                &   ! add solid  precip heat content at min(Tair,Tsnow) 
    918          &     * ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi 
     913      emp (:,:) = ( pevp(:,:) - pprec(:,:) * rn_pfac ) * tmask(:,:,1)      ! mass flux (evap. - precip.) 
     914      ! 
     915      qns(:,:) = zqlw(:,:) + psen(:,:) + plat(:,:)                     &   ! Downward Non Solar 
     916         &     - psnow(:,:) * rn_pfac * rLfus                          &   ! remove latent melting heat for solid precip 
     917         &     - pevp(:,:) * zcptn(:,:)                                &   ! remove evap heat content at SST 
     918         &     + ( pprec(:,:) - psnow(:,:) ) * rn_pfac * zcptrain(:,:) &   ! add liquid precip heat content at Tair 
     919         &     + psnow(:,:) * rn_pfac * zcptsnw(:,:)                       ! add solid  precip heat content at min(Tair,Tsnow) 
    919920      qns(:,:) = qns(:,:) * tmask(:,:,1) 
    920921      ! 
     
    10001001      ! C-grid ice dynamics :   U & V-points (same as ocean) 
    10011002      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    1002       wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 
     1003         wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 
    10031004      END_2D 
    10041005      ! 
     
    11201121      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z_dqsb        ! sensible  heat sensitivity over ice 
    11211122      REAL(wp), DIMENSION(jpi,jpj)     ::   zevap, zsnw   ! evaporation and snw distribution after wind blowing (SI3) 
    1122       REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2 
    11231123      REAL(wp), DIMENSION(jpi,jpj)     ::   ztri 
     1124      REAL(wp), DIMENSION(jpi,jpj)     ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg) 
    11241125      !!--------------------------------------------------------------------- 
    11251126      ! 
     
    11301131      dqla_ice(:,:,:) = 0._wp 
    11311132 
     1133      ! Heat content per unit mass (J/kg) 
     1134      zcptrain(:,:) = (      ptair        - rt0 ) * rcp  * tmask(:,:,1) 
     1135      zcptsnw (:,:) = ( MIN( ptair, rt0 ) - rt0 ) * rcpi * tmask(:,:,1) 
     1136      zcptn   (:,:) =        sst_m                * rcp  * tmask(:,:,1) 
     1137      ! 
    11321138      !                                     ! ========================== ! 
    11331139      DO jl = 1, jpl                        !  Loop over ice categories  ! 
     
    12051211 
    12061212      ! --- heat flux associated with emp --- ! 
    1207       qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * sst_m(:,:) * rcp                  & ! evap at sst 
    1208          &          + ( tprecip(:,:) - sprecip(:,:) ) * ( ptair(:,:) - rt0 ) * rcp               & ! liquid precip at Tair 
    1209          &          +   sprecip(:,:) * ( 1._wp - zsnw ) *                                        & ! solid precip at min(Tair,Tsnow) 
    1210          &              ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 
    1211       qemp_ice(:,:) =   sprecip(:,:) * zsnw *                                                    & ! solid precip (only) 
    1212          &              ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 
     1213      qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * zcptn(:,:)         & ! evap at sst 
     1214         &          + ( tprecip(:,:) - sprecip(:,:) )   *   zcptrain(:,:)         & ! liquid precip at Tair 
     1215         &          +   sprecip(:,:) * ( 1._wp - zsnw ) * ( zcptsnw (:,:) - rLfus ) ! solid precip at min(Tair,Tsnow) 
     1216      qemp_ice(:,:) =   sprecip(:,:) *           zsnw   * ( zcptsnw (:,:) - rLfus ) ! solid precip (only) 
    12131217 
    12141218      ! --- total solar and non solar fluxes --- ! 
     
    12181222 
    12191223      ! --- heat content of precip over ice in J/m3 (to be used in 1D-thermo) --- ! 
    1220       qprec_ice(:,:) = rhos * ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 
     1224      qprec_ice(:,:) = rhos * ( zcptsnw(:,:) - rLfus ) 
    12211225 
    12221226      ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- 
     
    12501254      ! 
    12511255      IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN 
    1252          ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) ) 
    1253          IF( iom_use('evap_ao_cea'  ) )  CALL iom_put( 'evap_ao_cea'  , ztmp(:,:) * tmask(:,:,1) )   ! ice-free oce evap (cell average) 
    1254          IF( iom_use('hflx_evap_cea') )  CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * sst_m(:,:) * rcp * tmask(:,:,1) )   ! heat flux from evap (cell average) 
    1255       ENDIF 
    1256       IF( iom_use('hflx_rain_cea') ) THEN 
    1257          ztmp(:,:) = rcp * ( SUM( (ptsu-rt0) * a_i_b, dim=3 ) + sst_m(:,:) * ( 1._wp - at_i_b(:,:) ) ) 
    1258          IF( iom_use('hflx_rain_cea') )  CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * ztmp(:,:) )   ! heat flux from rain (cell average) 
    1259       ENDIF 
    1260       IF( iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN 
    1261          WHERE( SUM( a_i_b, dim=3 ) > 1.e-10 ) 
    1262             ztmp(:,:) = rcpi * SUM( (ptsu-rt0) * a_i_b, dim=3 ) / SUM( a_i_b, dim=3 ) 
    1263          ELSEWHERE 
    1264             ztmp(:,:) = rcp * sst_m(:,:) 
    1265          ENDWHERE 
    1266          ztmp2(:,:) = sprecip(:,:) * ( ztmp(:,:) - rLfus ) 
    1267          IF( iom_use('hflx_snow_cea')    ) CALL iom_put('hflx_snow_cea'   , ztmp2(:,:) ) ! heat flux from snow (cell average) 
    1268          IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', ztmp2(:,:) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 
    1269          IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', ztmp2(:,:) *           zsnw(:,:)   ) ! heat flux from snow (over ice) 
     1256         CALL iom_put( 'evap_ao_cea'  , zevap(:,:) * ( 1._wp - at_i_b(:,:) ) * tmask(:,:,1)              )   ! ice-free oce evap (cell average) 
     1257         CALL iom_put( 'hflx_evap_cea', zevap(:,:) * ( 1._wp - at_i_b(:,:) ) * tmask(:,:,1) * zcptn(:,:) )   ! heat flux from evap (cell average) 
     1258      ENDIF 
     1259      IF( iom_use('rain') .OR. iom_use('rain_ao_cea') .OR. iom_use('hflx_rain_cea') ) THEN 
     1260         CALL iom_put( 'rain'         ,   tprecip(:,:) - sprecip(:,:)                             )          ! liquid precipitation  
     1261         CALL iom_put( 'rain_ao_cea'  , ( tprecip(:,:) - sprecip(:,:) ) * ( 1._wp - at_i_b(:,:) ) )          ! liquid precipitation over ocean (cell average) 
     1262         CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) )                    ! heat flux from rain (cell average) 
     1263      ENDIF 
     1264      IF(  iom_use('snow_ao_cea')   .OR. iom_use('snow_ai_cea')      .OR. & 
     1265         & iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN 
     1266         CALL iom_put( 'snow_ao_cea'     , sprecip(:,:)                            * ( 1._wp - zsnw(:,:) ) ) ! Snow over ice-free ocean  (cell average) 
     1267         CALL iom_put( 'snow_ai_cea'     , sprecip(:,:)                            *           zsnw(:,:)   ) ! Snow over sea-ice         (cell average) 
     1268         CALL iom_put( 'hflx_snow_cea'   , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) )                         ! heat flux from snow (cell average) 
     1269         CALL iom_put( 'hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 
     1270         CALL iom_put( 'hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) *           zsnw(:,:)   ) ! heat flux from snow (over ice) 
     1271      ENDIF 
     1272      IF( iom_use('hflx_prec_cea') ) THEN                                                                    ! heat flux from precip (cell average) 
     1273         CALL iom_put('hflx_prec_cea' ,    sprecip(:,:)                  * ( zcptsnw (:,:) - rLfus )  & 
     1274            &                          + ( tprecip(:,:) - sprecip(:,:) ) *   zcptrain(:,:) ) 
     1275      ENDIF 
     1276      IF( iom_use('subl_ai_cea') .OR. iom_use('hflx_subl_cea') ) THEN 
     1277         CALL iom_put( 'subl_ai_cea'  , SUM( a_i_b(:,:,:) *  evap_ice(:,:,:), dim=3 ) * tmask(:,:,1) ) ! Sublimation over sea-ice (cell average) 
     1278         CALL iom_put( 'hflx_subl_cea', SUM( a_i_b(:,:,:) * qevap_ice(:,:,:), dim=3 ) * tmask(:,:,1) ) ! Heat flux from sublimation (cell average) 
    12701279      ENDIF 
    12711280      ! 
  • NEMO/trunk/src/OCE/SBC/sbccpl.F90

    r14595 r14718  
    19241924      IF( iom_use('snow_ao_cea') )   CALL iom_put( 'snow_ao_cea' , sprecip(:,:) * ( 1._wp - zsnw(:,:) )                  )  ! Snow over ice-free ocean  (cell average) 
    19251925      IF( iom_use('snow_ai_cea') )   CALL iom_put( 'snow_ai_cea' , sprecip(:,:) *           zsnw(:,:)                    )  ! Snow over sea-ice         (cell average) 
    1926       IF( iom_use('rain_ao_cea') )   CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * picefr(:,:)         )  ! liquid precipitation over ocean (cell average) 
    1927       IF( iom_use('subl_ai_cea') )   CALL iom_put( 'subl_ai_cea' , frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) * tmask(:,:,1) )     ! Sublimation over sea-ice (cell average) 
     1926      IF( iom_use('rain_ao_cea') )   CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * ziceld(:,:)         )  ! liquid precipitation over ocean (cell average) 
     1927      IF( iom_use('subl_ai_cea') )   CALL iom_put( 'subl_ai_cea' , zevap_ice_total(:,:) * picefr(:,:) * tmask(:,:,1)     )  ! Sublimation over sea-ice (cell average) 
    19281928      IF( iom_use('evap_ao_cea') )   CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1)  & 
    1929          &                                                         - frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) ) * tmask(:,:,1) ) ! ice-free oce evap (cell average) 
     1929         &                                                         - zevap_ice_total(:,:) * picefr(:,:) ) * tmask(:,:,1) ) ! ice-free oce evap (cell average) 
    19301930      ! note: runoff output is done in sbcrnf (which includes icebergs too) and iceshelf output is done in sbcisf 
    19311931!!      IF( srcv(jpr_rnf)%laction )   CALL iom_put( 'runoffs' , rnf(:,:) * tmask(:,:,1)                                 )  ! runoff 
     
    21002100      IF (        iom_use('hflx_snow_ai_cea') ) &                                                    ! heat flux from snow (over ice) 
    21012101         &   CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) *  zsnw(:,:) ) 
     2102      IF(         iom_use('hflx_subl_cea') )    &                                                    ! heat flux from sublimation 
     2103         &   CALL iom_put('hflx_subl_cea' ,   SUM( qevap_ice(:,:,:) * a_i(:,:,:), dim=3 ) * tmask(:,:,1) ) 
    21022104      ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. 
    21032105      ! 
  • NEMO/trunk/src/OCE/SBC/sbcfwb.F90

    r14130 r14718  
    123123            emp(:,:) = emp(:,:) - z_fwfprv(1)        * tmask(:,:,1) 
    124124            qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
     125            ! outputs 
     126            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', zcoef * sst_m(:,:) * tmask(:,:,1) ) 
     127            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', z_fwfprv(1)        * tmask(:,:,1) ) 
    125128         ENDIF 
    126129         ! 
     
    154157            emp(:,:) = emp(:,:) + a_fwb              * tmask(:,:,1) 
    155158            qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
     159            ! outputs 
     160            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zcoef * sst_m(:,:) * tmask(:,:,1) ) 
     161            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -a_fwb              * tmask(:,:,1) ) 
    156162         ENDIF 
    157163         ! Output restart information 
     
    201207            qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    202208            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
     209            ! outputs 
     210            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zerp_cor(:,:) * rcp * sst_m(:,:) ) 
     211            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -zerp_cor(:,:) ) 
    203212            ! 
    204213            IF( lwp ) THEN                   ! control print 
  • NEMO/trunk/src/OCE/SBC/sbcrnf.F90

    r14072 r14718  
    131131             IF( ln_rnf_icb ) THEN 
    132132                fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt 
    133                 CALL iom_put( 'iceberg_cea'  , fwficb(:,:)  )         ! output iceberg flux 
    134                 CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
     133                rnf(:,:) = rnf(:,:) + fwficb(:,:) 
     134                qns(:,:) = qns(:,:) - fwficb(:,:) * rLfus 
     135                !!qns_tot(:,:) = qns_tot(:,:) - fwficb(:,:) * rLfus                 
     136                !!qns_oce(:,:) = qns_oce(:,:) - fwficb(:,:) * rLfus                 
     137                CALL iom_put( 'iceberg_cea'  ,  fwficb(:,:)  )          ! output iceberg flux 
     138                CALL iom_put( 'hflx_icb_cea' , -fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
    135139             ENDIF 
    136140         ENDIF 
     
    152156                                         CALL iom_put( 'runoffs'     , rnf(:,:)                         )   ! output runoff mass flux 
    153157         IF( iom_use('hflx_rnf_cea') )   CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rho0 * rcp )   ! output runoff sensible heat (W/m2) 
     158         IF( iom_use('sflx_rnf_cea') )   CALL iom_put( 'sflx_rnf_cea', rnf_tsc(:,:,jp_sal) * rho0       )   ! output runoff salt flux (g/m2/s) 
    154159      ENDIF 
    155160      ! 
  • NEMO/trunk/src/OCE/SBC/sbcssr.F90

    r13295 r14718  
    9494            !                                      ! ========================= ! 
    9595            ! 
     96            qrp(:,:) = 0._wp ! necessary init 
     97            erp(:,:) = 0._wp 
     98            ! 
    9699            IF( nn_sstr == 1 ) THEN                                   !* Temperature restoring term 
    97100               DO_2D( 1, 1, 1, 1 ) 
     
    135138                  qns(ji,jj) = qns(ji,jj) - zerp * rcp * sst_m(ji,jj) 
    136139                  erp(ji,jj) = zerp 
     140                  qrp(ji,jj) = qrp(ji,jj) - zerp * rcp * sst_m(ji,jj) 
    137141               END_2D 
    138142            ENDIF 
     143            ! outputs 
     144            CALL iom_put( 'hflx_ssr_cea', qrp(:,:) ) 
     145            IF( nn_sssr == 1 )   CALL iom_put( 'sflx_ssr_cea',  erp(:,:) * sss_m(:,:) ) 
     146            IF( nn_sssr == 2 )   CALL iom_put( 'vflx_ssr_cea', -erp(:,:) ) 
    139147            ! 
    140148         ENDIF 
  • NEMO/trunk/src/OCE/TRA/tradmp.F90

    r14072 r14718  
    101101      IF( ln_timing )   CALL timing_start('tra_dmp') 
    102102      ! 
    103       IF( l_trdtra )   THEN                    !* Save ta and sa trends 
     103      IF( l_trdtra .OR. iom_use('hflx_dmp_cea') .OR. iom_use('sflx_dmp_cea') ) THEN   !* Save ta and sa trends 
    104104         ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) ) 
    105105         ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) 
     
    139139         ! 
    140140      END SELECT 
     141      ! 
     142      ! outputs (clem trunk) 
     143      IF( iom_use('hflx_dmp_cea') )       & 
     144         &   CALL iom_put('hflx_dmp_cea', & 
     145         &   SUM( ( pts(:,:,:,jp_tem,Krhs) - ztrdts(:,:,:,jp_tem) ) * e3t(:,:,:,Kmm), dim=3 ) * rcp * rho0 ) ! W/m2 
     146      IF( iom_use('sflx_dmp_cea') )       & 
     147         &   CALL iom_put('sflx_dmp_cea', & 
     148         &   SUM( ( pts(:,:,:,jp_sal,Krhs) - ztrdts(:,:,:,jp_sal) ) * e3t(:,:,:,Kmm), dim=3 ) * rho0 )       ! g/m2/s 
    141149      ! 
    142150      IF( l_trdtra )   THEN       ! trend diagnostic 
Note: See TracChangeset for help on using the changeset viewer.