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 11362 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization – NEMO

Ignore:
Timestamp:
2019-07-29T13:54:58+02:00 (5 years ago)
Author:
clem
Message:

debug the ice output by adding a missing value to the outputed fields. Unfortunately this method imposes a value of 1.e20 where there is no ice, which is annoying when using ncview for example, but this is the only way (from what I know) to output averages

Location:
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml

    r10911 r11362  
    7878       <field field_ref="vfxice"           name="vfxice" /> 
    7979       <field field_ref="vfxsnw"           name="vfxsnw" /> 
    80         
     80 
    8181       <!-- categories --> 
    8282       <field field_ref="icemask_cat"      name="simskcat"/> 
     
    9393     <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." > 
    9494       <!-- global contents --> 
    95        <field field_ref="ibgvol_tot"     grid_ref="grid_1point"   name="ibgvol_tot"   /> 
    96        <field field_ref="sbgvol_tot"     grid_ref="grid_1point"   name="sbgvol_tot"   /> 
    97        <field field_ref="ibgarea_tot"    grid_ref="grid_1point"   name="ibgarea_tot"  /> 
    98        <field field_ref="ibgsalt_tot"    grid_ref="grid_1point"   name="ibgsalt_tot"  /> 
    99        <field field_ref="ibgheat_tot"    grid_ref="grid_1point"   name="ibgheat_tot"  /> 
    100        <field field_ref="sbgheat_tot"    grid_ref="grid_1point"   name="sbgheat_tot"  /> 
     95       <field field_ref="ibgvol_tot"     name="ibgvol_tot"   /> 
     96       <field field_ref="sbgvol_tot"     name="sbgvol_tot"   /> 
     97       <field field_ref="ibgarea_tot"    name="ibgarea_tot"  /> 
     98       <field field_ref="ibgsalt_tot"    name="ibgsalt_tot"  /> 
     99       <field field_ref="ibgheat_tot"    name="ibgheat_tot"  /> 
     100       <field field_ref="sbgheat_tot"    name="sbgheat_tot"  /> 
    101101        
    102102       <!-- global drifts (conservation checks) --> 
    103        <field field_ref="ibgvolume"      grid_ref="grid_1point"   name="ibgvolume"    /> 
    104        <field field_ref="ibgsaltco"      grid_ref="grid_1point"   name="ibgsaltco"    /> 
    105        <field field_ref="ibgheatco"      grid_ref="grid_1point"   name="ibgheatco"    /> 
    106        <field field_ref="ibgheatfx"      grid_ref="grid_1point"   name="ibgheatfx"    /> 
     103       <field field_ref="ibgvolume"      name="ibgvolume"    /> 
     104       <field field_ref="ibgsaltco"      name="ibgsaltco"    /> 
     105       <field field_ref="ibgheatco"      name="ibgheatco"    /> 
     106       <field field_ref="ibgheatfx"      name="ibgheatfx"    /> 
    107107        
    108108       <!-- global forcings  --> 
    109        <field field_ref="ibgfrcvoltop"   grid_ref="grid_1point"   name="ibgfrcvoltop" /> 
    110        <field field_ref="ibgfrcvolbot"   grid_ref="grid_1point"   name="ibgfrcvolbot" /> 
    111        <field field_ref="ibgfrctemtop"   grid_ref="grid_1point"   name="ibgfrctemtop" /> 
    112        <field field_ref="ibgfrctembot"   grid_ref="grid_1point"   name="ibgfrctembot" /> 
    113        <field field_ref="ibgfrcsal"      grid_ref="grid_1point"   name="ibgfrcsal"    /> 
    114        <field field_ref="ibgfrchfxtop"   grid_ref="grid_1point"   name="ibgfrchfxtop" /> 
    115        <field field_ref="ibgfrchfxbot"   grid_ref="grid_1point"   name="ibgfrchfxbot" /> 
     109       <field field_ref="ibgfrcvoltop"   name="ibgfrcvoltop" /> 
     110       <field field_ref="ibgfrcvolbot"   name="ibgfrcvolbot" /> 
     111       <field field_ref="ibgfrctemtop"   name="ibgfrctemtop" /> 
     112       <field field_ref="ibgfrctembot"   name="ibgfrctembot" /> 
     113       <field field_ref="ibgfrcsal"      name="ibgfrcsal"    /> 
     114       <field field_ref="ibgfrchfxtop"   name="ibgfrchfxtop" /> 
     115       <field field_ref="ibgfrchfxbot"   name="ibgfrchfxbot" /> 
    116116     </file> 
    117117      
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml

    r9990 r11362  
    3737     <field field_ref="wspd"         name="windsp"   /> 
    3838     <field field_ref="precip"       name="precip"   /> 
    39      <field field_ref="berg_melt_qlat"  name="berg_melt_qlat" /> 
    4039     <!-- ice and snow --> 
    4140     <field field_ref="snowpre" /> 
     
    8281        <file id="file15" name_suffix="_scalar" description="scalar variables" > 
    8382          <!-- global drifts (conservation checks) --> 
    84           <field field_ref="bgtemper"     grid_ref="grid_1point"   name="bgtemper"    /> 
    85           <field field_ref="bgsaline"     grid_ref="grid_1point"   name="bgsaline"    /> 
    86           <field field_ref="bgheatco"     grid_ref="grid_1point"   name="bgheatco"    /> 
    87           <field field_ref="bgheatfx"     grid_ref="grid_1point"   name="bgheatfx"    /> 
    88           <field field_ref="bgsaltco"     grid_ref="grid_1point"   name="bgsaltco"    /> 
    89           <field field_ref="bgvolssh"     grid_ref="grid_1point"   name="bgvolssh"    /> 
    90           <field field_ref="bgvole3t"     grid_ref="grid_1point"   name="bgvole3t"    /> 
     83          <field field_ref="bgtemper"     name="bgtemper"    /> 
     84          <field field_ref="bgsaline"     name="bgsaline"    /> 
     85          <field field_ref="bgheatco"     name="bgheatco"    /> 
     86          <field field_ref="bgheatfx"     name="bgheatfx"    /> 
     87          <field field_ref="bgsaltco"     name="bgsaltco"    /> 
     88          <field field_ref="bgvolssh"     name="bgvolssh"    /> 
     89          <field field_ref="bgvole3t"     name="bgvole3t"    /> 
    9190 
    9291          <!-- global surface forcings  --> 
    93           <field field_ref="bgfrcvol"     grid_ref="grid_1point"   name="bgfrcvol"    /> 
    94           <field field_ref="bgfrctem"     grid_ref="grid_1point"   name="bgfrctem"    /> 
    95           <field field_ref="bgfrchfx"     grid_ref="grid_1point"   name="bgfrchfx"    /> 
    96           <field field_ref="bgfrcsal"     grid_ref="grid_1point"   name="bgfrcsal"    /> 
     92          <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
     93          <field field_ref="bgfrctem"     name="bgfrctem"    /> 
     94          <field field_ref="bgfrchfx"     name="bgfrchfx"    /> 
     95          <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
    9796        </file> 
    9897 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-pisces.xml

    r9909 r11362  
    1414 
    1515        <file id="file31" name_suffix="_bioscalar" description="pisces sms variables" > 
    16           <field field_ref="tdenit"   name="tdenit"   grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field> 
    17           <field field_ref="tnfix"    name="tnfix"    grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field> 
    18           <field field_ref="tcflx"    name="tcflx"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field> 
    19           <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field> 
    20           <field field_ref="tcexp"    name="tcexp"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field> 
    21           <field field_ref="tintpp"   name="tintpp"   grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field> 
    22           <field field_ref="pno3tot"  name="pno3tot"  grid_ref="grid_1point" unit="umolN"  > pno3tot * 16. / 122. * 1e6 </field> 
    23           <field field_ref="ppo4tot"  name="ppo4tot"  grid_ref="grid_1point" unit="umolP"  > ppo4tot * 1. / 122. * 1e6 </field> 
    24           <field field_ref="psiltot"  name="psiltot"  grid_ref="grid_1point" unit="umolC"  > psiltot * 1e6  </field> 
    25           <field field_ref="palktot"  name="palktot"  grid_ref="grid_1point" unit="umolC"  > palktot * 1e6  </field> 
    26           <field field_ref="pfertot"  name="pfertot"  grid_ref="grid_1point" unit="nmolFe" > pfertot * 1e9  </field> 
     16          <field field_ref="tdenit"   name="tdenit"    unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field> 
     17          <field field_ref="tnfix"    name="tnfix"    unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field> 
     18          <field field_ref="tcflx"    name="tcflx"    unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field> 
     19          <field field_ref="tcflxcum" name="tcflxcum" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field> 
     20          <field field_ref="tcexp"    name="tcexp"    unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field> 
     21          <field field_ref="tintpp"   name="tintpp"    unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field> 
     22          <field field_ref="pno3tot"  name="pno3tot"  unit="umolN"  > pno3tot * 16. / 122. * 1e6 </field> 
     23          <field field_ref="ppo4tot"  name="ppo4tot"  unit="umolP"  > ppo4tot * 1. / 122. * 1e6 </field> 
     24          <field field_ref="psiltot"  name="psiltot"  unit="umolC"  > psiltot * 1e6  </field> 
     25          <field field_ref="palktot"  name="palktot"  unit="umolC"  > palktot * 1e6  </field> 
     26          <field field_ref="pfertot"  name="pfertot"  unit="nmolFe" > pfertot * 1e9  </field> 
    2727        </file> 
    2828 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/ORCA2_OFF_PISCES/EXPREF/file_def_nemo.xml

    r10458 r11362  
    1919      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files --> 
    2020        <file id="file1" name_suffix="_bioscalar" description="pisces sms variables" > 
    21            <field field_ref="tdenit"   name="tdenit"   grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field> 
    22            <field field_ref="tnfix"    name="tnfix"    grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field> 
    23            <field field_ref="tcflx"    name="tcflx"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field> 
    24            <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field> 
    25            <field field_ref="tcexp"    name="tcexp"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field> 
    26            <field field_ref="tintpp"   name="tintpp"   grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field> 
    27            <field field_ref="pno3tot"  name="pno3tot"  grid_ref="grid_1point" unit="umolN"  > pno3tot * 16. / 122. * 1e6 </field> 
    28            <field field_ref="ppo4tot"  name="ppo4tot"  grid_ref="grid_1point" unit="umolP"  > ppo4tot * 1. / 122. * 1e6 </field> 
    29            <field field_ref="psiltot"  name="psiltot"  grid_ref="grid_1point" unit="umolC"  > psiltot * 1e6  </field> 
    30            <field field_ref="palktot"  name="palktot"  grid_ref="grid_1point" unit="umolC"  > palktot * 1e6  </field> 
    31            <field field_ref="pfertot"  name="pfertot"  grid_ref="grid_1point" unit="nmolFe" > pfertot * 1e9  </field> 
     21           <field field_ref="tdenit"   name="tdenit"    unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field> 
     22           <field field_ref="tnfix"    name="tnfix"    unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field> 
     23           <field field_ref="tcflx"    name="tcflx"    unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field> 
     24           <field field_ref="tcflxcum" name="tcflxcum" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field> 
     25           <field field_ref="tcexp"    name="tcexp"    unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field> 
     26           <field field_ref="tintpp"   name="tintpp"    unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field> 
     27           <field field_ref="pno3tot"  name="pno3tot"  unit="umolN"  > pno3tot * 16. / 122. * 1e6 </field> 
     28           <field field_ref="ppo4tot"  name="ppo4tot"  unit="umolP"  > ppo4tot * 1. / 122. * 1e6 </field> 
     29           <field field_ref="psiltot"  name="psiltot"  unit="umolC"  > psiltot * 1e6  </field> 
     30           <field field_ref="palktot"  name="palktot"  unit="umolC"  > palktot * 1e6  </field> 
     31           <field field_ref="pfertot"  name="pfertot"  unit="nmolFe" > pfertot * 1e9  </field> 
    3232        </file> 
    3333      </file_group> 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/domain_def_nemo.xml

    r9930 r11362  
    1010     </domain> 
    1111 
    12      <domain id="1point" domain_ref="grid_T" > 
    13        <zoom_domain ibegin="1" jbegin="1" ni="1" nj="1"/> 
    14      </domain> 
    1512     <!--   Eq section --> 
    1613     <domain id="EqT" domain_ref="grid_T" > <zoom_domain id="EqT"/> </domain> 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/field_def_nemo-ice.xml

    r10911 r11362  
    3636          <field id="iceconc"      long_name="Sea-ice area fraction"                                   standard_name="sea_ice_area_fraction"                     unit=""    /> 
    3737          <field id="icevolu"      long_name="Sea-ice volume per area"                                 standard_name="sea_ice_thickness"                         unit="m"   /> 
    38           <field id="icethic"      long_name="Sea-ice thickness per area"                              standard_name="sea_ice_thickness"                         unit="m"   /> 
    39           <field id="snwthic"      long_name="Snow thickness per area"                                 standard_name="snow_thickness"                            unit="m"   /> 
     38          <field id="icethic"      long_name="Sea-ice thickness per area"                              standard_name="sea_ice_thickness"                         unit="m"   detect_missing_value="true" /> 
     39          <field id="snwthic"      long_name="Snow thickness per area"                                 standard_name="snow_thickness"                            unit="m"   detect_missing_value="true" /> 
    4040          <field id="icebrv"       long_name="brine volume"                                                                                                      unit="%"   /> 
    41           <field id="iceage"       long_name="ice age"                                                                                                           unit="days"/> 
     41          <field id="iceage"       long_name="ice age"                                                                                                           unit="days" detect_missing_value="true"/> 
    4242          <field id="icehnew"      long_name="frazil ice collection thickness"                                                                                   unit="m"   /> 
    4343          <field id="snwvolu"      long_name="snow volume"                                                                                                       unit="m"   /> 
    44           <field id="icefrb"       long_name="Sea-ice freeboard"                                       standard_name="sea_ice_freeboard"                         unit="m"   /> 
    45           <field id="icealb"       long_name="Sea-ice or snow albedo"                                  standard_name="sea_ice_albedo"                            unit=""    /> 
    46           <field id="tau_icebfr"   long_name="ice friction on ocean bottom for landfast ice"                                                                     unit="N/2" /> 
     44          <field id="icefrb"       long_name="Sea-ice freeboard"                                       standard_name="sea_ice_freeboard"                         unit="m"   detect_missing_value="true" /> 
     45          <field id="icealb"       long_name="Sea-ice or snow albedo"                                  standard_name="sea_ice_albedo"                            unit=""    detect_missing_value="true" /> 
     46          <field id="tau_icebfr"   long_name="ice friction on ocean bottom for landfast ice"                                                                     unit="N/2" detect_missing_value="true" /> 
    4747      
    4848     <!-- melt ponds --> 
     
    5151      
    5252     <!-- heat --> 
    53           <field id="icetemp"      long_name="Mean ice temperature"                                                                                              unit="degC" /> 
    54           <field id="snwtemp"      long_name="Mean snow temperature"                                                                                             unit="degC" /> 
    55           <field id="icettop"      long_name="temperature at the ice surface"                                                                                    unit="degC" /> 
    56           <field id="icetbot"      long_name="temperature at the ice bottom"                                                                                     unit="degC" /> 
    57           <field id="icetsni"      long_name="temperature at the snow-ice interface"                                                                             unit="degC" /> 
     53          <field id="icetemp"      long_name="Mean ice temperature"                                                                                              unit="degC" detect_missing_value="true" /> 
     54          <field id="snwtemp"      long_name="Mean snow temperature"                                                                                             unit="degC" detect_missing_value="true" /> 
     55          <field id="icettop"      long_name="temperature at the ice surface"                                                                                    unit="degC" detect_missing_value="true" /> 
     56          <field id="icetbot"      long_name="temperature at the ice bottom"                                                                                     unit="degC" detect_missing_value="true" /> 
     57          <field id="icetsni"      long_name="temperature at the snow-ice interface"                                                                             unit="degC" detect_missing_value="true" /> 
    5858          <field id="icehc"        long_name="ice heat content"                                                                                                  unit="J/m2" />  
    5959          <field id="snwhc"        long_name="snow heat content"                                                                                                 unit="J/m2" /> 
    6060      
    6161     <!-- salt --> 
    62           <field id="icesalt"      long_name="Sea ice salinity"                                                                                                  unit="g/kg"  /> 
    63           <field id="icesalm"      long_name="Mass of salt in sea ice per area"                        standard_name="sea_ice_salt_mass"                         unit="kg/m2" /> 
     62          <field id="icesalt"      long_name="Sea ice salinity"                                                                                                  unit="g/kg"  detect_missing_value="true" /> 
     63          <field id="icesalm"      long_name="Mass of salt in sea ice per area"                        standard_name="sea_ice_salt_mass"                         unit="kg/m2" detect_missing_value="true" /> 
    6464      
    6565     <!-- momentum (rheology) --> 
    6666          <field id="uice"         long_name="X-component of sea ice velocity"                         standard_name="sea_ice_x_velocity"                        unit="m/s"  />  
    6767          <field id="vice"         long_name="Y-component of sea ice velocity"                         standard_name="sea_ice_y_velocity"                        unit="m/s"  />       
    68           <field id="icevel"       long_name="Sea-ice speed"                                           standard_name="sea_ice_speed"                             unit="m/s"  /> 
    69           <field id="utau_ai"      long_name="X-component of atmospheric stress on sea ice"            standard_name="surface_downward_x_stress"                 unit="N/m2" /> 
    70           <field id="vtau_ai"      long_name="Y-component of atmospheric stress on sea ice"            standard_name="surface_downward_y_stress"                 unit="N/m2" /> 
    71           <field id="utau_oi"      long_name="X-component of ocean stress on sea ice"                  standard_name="sea_ice_base_upward_x_stress"              unit="N/m2" /> 
    72           <field id="vtau_oi"      long_name="Y-component of ocean stress on sea ice"                  standard_name="sea_ice_base_upward_y_stress"              unit="N/m2" /> 
     68          <field id="icevel"       long_name="Sea-ice speed"                                           standard_name="sea_ice_speed"                             unit="m/s"  detect_missing_value="true" /> 
     69          <field id="utau_ai"      long_name="X-component of atmospheric stress on sea ice"            standard_name="surface_downward_x_stress"                 unit="N/m2" detect_missing_value="true" /> 
     70          <field id="vtau_ai"      long_name="Y-component of atmospheric stress on sea ice"            standard_name="surface_downward_y_stress"                 unit="N/m2" detect_missing_value="true" /> 
     71          <field id="utau_oi"      long_name="X-component of ocean stress on sea ice"                  standard_name="sea_ice_base_upward_x_stress"              unit="N/m2" detect_missing_value="true" /> 
     72          <field id="vtau_oi"      long_name="Y-component of ocean stress on sea ice"                  standard_name="sea_ice_base_upward_y_stress"              unit="N/m2" detect_missing_value="true" /> 
    7373          <field id="isig1"        long_name="1st principal stress component for EVP rhg"                                                                        unit=""     /> 
    7474          <field id="isig2"        long_name="2nd principal stress component for EVP rhg"                                                                        unit=""     /> 
     
    7676          <field id="normstr"      long_name="Average normal stress in sea ice"                        standard_name="average_normal_stress"                     unit="N/m"  /> 
    7777          <field id="sheastr"      long_name="Maximum shear stress in sea ice"                         standard_name="maximum_shear_stress"                      unit="N/m"  /> 
    78           <field id="icestr"       long_name="Compressive sea ice strength"                            standard_name="compressive_strength_of_sea_ice"           unit="N/m"  /> 
    79           <field id="icediv"       long_name="Divergence of the sea-ice velocity field"                standard_name="divergence_of_sea_ice_velocity"            unit="s-1"  /> 
    80           <field id="iceshe"       long_name="Maximum shear of sea-ice velocity field"                 standard_name="maximum_shear_of_sea_ice_velocity"         unit="s-1"  /> 
     78          <field id="icestr"       long_name="Compressive sea ice strength"                            standard_name="compressive_strength_of_sea_ice"           unit="N/m"  detect_missing_value="true" /> 
     79          <field id="icediv"       long_name="Divergence of the sea-ice velocity field"                standard_name="divergence_of_sea_ice_velocity"            unit="s-1"  detect_missing_value="true" /> 
     80          <field id="iceshe"       long_name="Maximum shear of sea-ice velocity field"                 standard_name="maximum_shear_of_sea_ice_velocity"         unit="s-1"  detect_missing_value="true" /> 
    8181      
    8282     <!-- surface heat fluxes --> 
     
    168168          <field id="e3t_m"    unit="m"    /> 
    169169          <field id="frq_m"    unit="-"    /> 
    170  
    171      <!-- categories --> 
    172      <field id="iceconc_cat"  long_name="Sea-ice concentration per category"                unit=""       grid_ref="grid_T_3D_ncatice" /> 
    173           <field id="icethic_cat"  long_name="Sea-ice thickness per category"                    unit="m"      grid_ref="grid_T_3D_ncatice" /> 
    174           <field id="snwthic_cat"  long_name="Snow thickness per category"                       unit="m"      grid_ref="grid_T_3D_ncatice" /> 
    175           <field id="icesalt_cat"  long_name="Sea-Ice Bulk salinity per category"                unit="g/kg"   grid_ref="grid_T_3D_ncatice" /> 
    176           <field id="icetemp_cat"  long_name="Ice temperature per category"                      unit="degC"   grid_ref="grid_T_3D_ncatice" /> 
    177           <field id="snwtemp_cat"  long_name="Snow temperature per category"                     unit="degC"   grid_ref="grid_T_3D_ncatice" /> 
    178           <field id="icettop_cat"  long_name="Ice/snow surface temperature per category"         unit="degC"   grid_ref="grid_T_3D_ncatice" /> 
    179           <field id="iceapnd_cat"  long_name="Ice melt pond concentration per category"          unit="%"      grid_ref="grid_T_3D_ncatice" />  
    180           <field id="icehpnd_cat"  long_name="Ice melt pond thickness per category"              unit="m"      grid_ref="grid_T_3D_ncatice" />  
    181           <field id="iceafpnd_cat" long_name="Ice melt pond fraction per category"               unit="m"      grid_ref="grid_T_3D_ncatice" />  
    182           <field id="icemask_cat"  long_name="Fraction of time step with sea ice (per category)" unit=""       grid_ref="grid_T_3D_ncatice" /> 
    183           <field id="iceage_cat"   long_name="Ice age per category"                              unit="days"   grid_ref="grid_T_3D_ncatice" /> 
    184           <field id="icebrv_cat"   long_name="Brine volume per category"                         unit="%"      grid_ref="grid_T_3D_ncatice" /> 
    185170 
    186171     <!-- ================= --> 
     
    249234          <field id="xmtrptot"     long_name="X-component of sea-ice mass transport"                   standard_name="sea_ice_x_transport"                   unit="kg/s" > xmtrpice + xmtrpsnw </field> 
    250235          <field id="ymtrptot"     long_name="Y-component of sea-ice mass transport"                   standard_name="sea_ice_y_transport"                   unit="kg/s" > ymtrpice + ymtrpsnw </field> 
    251  
    252      <!-- categories --> 
    253           <field id="iceconc_cat_cmip"     long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit=""  grid_ref="grid_T_3D_ncatice" > iceconc_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
    254           <field id="icethic_cat_cmip"     long_name="Sea-ice thickness in thickness categories"       standard_name="sea_ice_thickness_over_categories"     detect_missing_value="true" unit="m" grid_ref="grid_T_3D_ncatice" > icethic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
    255           <field id="snwthic_cat_cmip"     long_name="Snow thickness in thickness categories"          standard_name="snow_thickness_over_categories"        detect_missing_value="true" unit="m" grid_ref="grid_T_3D_ncatice" > snwthic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
    256           <field id="iceconc_cat_pct_cmip" long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="%" grid_ref="grid_T_3D_ncatice" > iceconc_cat*100. * icemask_cat + $missval * (1.-icemask_cat) </field> 
    257236     
    258237   </field_group> <!-- SBC_2D --> 
    259238 
     239   <!-- categories --> 
     240        <field_group id="SBC_3D" grid_ref="grid_T_ncatice" > 
     241 
     242          <!-- standard ice fields -->   
     243     <field id="iceconc_cat"  long_name="Sea-ice concentration per category"                unit=""        /> 
     244          <field id="icethic_cat"  long_name="Sea-ice thickness per category"                    unit="m"       detect_missing_value="true" /> 
     245          <field id="snwthic_cat"  long_name="Snow thickness per category"                       unit="m"       detect_missing_value="true" /> 
     246          <field id="icesalt_cat"  long_name="Sea-Ice Bulk salinity per category"                unit="g/kg"    detect_missing_value="true" /> 
     247          <field id="icetemp_cat"  long_name="Ice temperature per category"                      unit="degC"    detect_missing_value="true" /> 
     248          <field id="snwtemp_cat"  long_name="Snow temperature per category"                     unit="degC"    detect_missing_value="true" /> 
     249          <field id="icettop_cat"  long_name="Ice/snow surface temperature per category"         unit="degC"    detect_missing_value="true" /> 
     250          <field id="iceapnd_cat"  long_name="Ice melt pond concentration per category"          unit="%"       />  
     251          <field id="icehpnd_cat"  long_name="Ice melt pond thickness per category"              unit="m"       detect_missing_value="true" />  
     252          <field id="iceafpnd_cat" long_name="Ice melt pond fraction per category"               unit="m"       />  
     253          <field id="icemask_cat"  long_name="Fraction of time step with sea ice (per category)" unit=""        /> 
     254          <field id="iceage_cat"   long_name="Ice age per category"                              unit="days"    detect_missing_value="true" /> 
     255          <field id="icebrv_cat"   long_name="Brine volume per category"                         unit="%"       /> 
     256 
     257          <!-- Add-ons for SIMIP --> 
     258          <field id="iceconc_cat_cmip"     long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit=""   > iceconc_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
     259          <field id="icethic_cat_cmip"     long_name="Sea-ice thickness in thickness categories"       standard_name="sea_ice_thickness_over_categories"     detect_missing_value="true" unit="m"  > icethic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
     260          <field id="snwthic_cat_cmip"     long_name="Snow thickness in thickness categories"          standard_name="snow_thickness_over_categories"        detect_missing_value="true" unit="m"  > snwthic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
     261          <field id="iceconc_cat_pct_cmip" long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="%"  > iceconc_cat*100. * icemask_cat + $missval * (1.-icemask_cat) </field> 
     262 
     263   </field_group> <!-- SBC_3D --> 
     264    
    260265   <!-- scalar variables --> 
    261    <field_group id="SBC_0D"  grid_ref="grid_1point" > 
     266   <field_group id="SBC_scalar"  grid_ref="grid_scalar" > 
     267          <field id="NH_iceextt"      long_name="Sea ice extent North"                   standard_name="sea_ice_extent_n"                   unit="1e6_km2"  /> 
     268          <field id="SH_iceextt"      long_name="Sea ice extent South"                   standard_name="sea_ice_extent_s"                   unit="1e6_km2"  /> 
     269          <field id="NH_icevolu"      long_name="Sea ice volume North"                   standard_name="sea_ice_volume_n"                   unit="1e3_km3"  /> 
     270          <field id="SH_icevolu"      long_name="Sea ice volume South"                   standard_name="sea_ice_volume_s"                   unit="1e3_km3"  /> 
     271          <field id="NH_icearea"      long_name="Sea ice area North"                     standard_name="sea_ice_area_n"                     unit="1e6_km2"  /> 
     272          <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  /> 
     273 
    262274          <!-- available with ln_icediaout --> 
    263275          <field id="ibgfrcvoltop"    long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)"   unit="km3"      /> 
     
    281293          <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"    /> 
    282294 
    283           <field id="NH_iceextt"      long_name="Sea ice extent North"                   standard_name="sea_ice_extent_n"                   unit="1e6_km2"  /> 
    284           <field id="SH_iceextt"      long_name="Sea ice extent South"                   standard_name="sea_ice_extent_s"                   unit="1e6_km2"  /> 
    285           <field id="NH_icevolu"      long_name="Sea ice volume North"                   standard_name="sea_ice_volume_n"                   unit="1e3_km3"  /> 
    286           <field id="SH_icevolu"      long_name="Sea ice volume South"                   standard_name="sea_ice_volume_s"                   unit="1e3_km3"  /> 
    287           <field id="NH_icearea"      long_name="Sea ice area North"                     standard_name="sea_ice_area_n"                     unit="1e6_km2"  /> 
    288           <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  /> 
    289  
     295     <!-- available later --> 
     296     <!-- 
    290297          <field id="strait_mifl"     long_name="Sea ice mass flux through straits"      standard_name="sea_ice_mass_transport_across_line" unit="kg/s"  grid_ref="grid_4strait" /> 
    291298          <field id="strait_arfl"     long_name="Sea ice area flux through straits"      standard_name="sea_ice_area_transport_across_line" unit="m2/s"  grid_ref="grid_4strait" />   
    292299          <field id="strait_msfl"     long_name="Sea ice snow flux through straits"      standard_name="snow_mass_transport_across_line"    unit="kg/s"  grid_ref="grid_4strait" /> 
    293    </field_group> <!-- SBC_0D --> 
     300          --> 
     301   </field_group> 
    294302   
    295303   <!--  
     
    299307       
    300308   <field_group id="myvarICE"        grid_ref="grid_T_2D" > 
    301           <field field_ref="icethic"          name="sithic"  /> 
    302           <field field_ref="icevolu"          name="sivolu"  /> 
    303           <field field_ref="iceconc"          name="siconc"  /> 
     309     <!-- ice mask --> 
     310     <field field_ref="icemask"          name="simsk"   /> 
     311     <field field_ref="icemask05"        name="simsk05" /> 
     312     <field field_ref="icemask15"        name="simsk15" /> 
     313      
     314     <!-- general --> 
     315     <field field_ref="snwvolu"          name="snvolu" /> 
     316     <field field_ref="snwthic"          name="snthic" /> 
     317     <field field_ref="icethic"          name="sithic" /> 
     318<!-- 
     319     <field field_ref="icethic"          name="sithic_max" operation="maximum" /> 
     320     <field field_ref="icethic"          name="sithic_min" operation="minimum" /> 
     321--> 
     322     <field field_ref="fasticepres"      name="fasticepres" /> 
     323     <field field_ref="icevolu"          name="sivolu" /> 
     324     <field field_ref="iceconc"          name="siconc" /> 
     325     <field field_ref="icesalt"          name="sisali" /> 
     326     <field field_ref="iceapnd"          name="siapnd" /> 
     327     <field field_ref="icevpnd"          name="sivpnd" /> 
     328          <field field_ref="iceage"           name="siage"  /> 
     329     <field field_ref="sst_m"            name="sst_m"  /> 
     330     <field field_ref="sss_m"            name="sss_m"  /> 
     331      
     332     <!-- heat --> 
     333     <field field_ref="icetemp"          name="sitemp" /> 
     334     <field field_ref="snwtemp"          name="sntemp" /> 
     335     <field field_ref="icettop"          name="sittop" /> 
     336     <field field_ref="icetbot"          name="sitbot" /> 
     337     <field field_ref="icetsni"          name="sitsni" /> 
     338      
     339     <!-- momentum --> 
     340     <field field_ref="uice"             name="sivelu"  /> 
     341     <field field_ref="vice"             name="sivelv"  /> 
     342     <field field_ref="icevel"           name="sivelo"  /> 
     343     <field field_ref="utau_ai"          name="utau_ai" /> 
     344     <field field_ref="vtau_ai"          name="vtau_ai" /> 
     345     <field field_ref="utau_oi"          name="utau_oi" /> 
     346     <field field_ref="vtau_oi"          name="vtau_oi" /> 
     347      
     348     <!-- rheology --> 
     349     <field field_ref="icediv"           name="sidive"  /> 
     350     <field field_ref="iceshe"           name="sishea"  /> 
     351     <field field_ref="icestr"           name="sistre"  /> 
     352     <field field_ref="normstr"          name="normstr" /> 
     353     <field field_ref="sheastr"          name="sheastr" /> 
     354     <field field_ref="isig1"            name="isig1"   /> 
     355     <field field_ref="isig2"            name="isig2"   /> 
     356     <field field_ref="isig3"            name="isig3"   /> 
     357      
     358     <!-- heat fluxes --> 
     359     <field field_ref="qt_oce_ai"        name="qt_oce_ai"  /> 
     360     <field field_ref="qt_atm_oi"        name="qt_atm_oi"  /> 
     361     <field field_ref="qtr_ice_top"      name="qtr_ice_top"/> 
     362     <field field_ref="qtr_ice_bot"      name="qtr_ice_bot"/> 
     363     <field field_ref="qt_ice"           name="qt_ice"     /> 
     364     <field field_ref="qsr_ice"          name="qsr_ice"    /> 
     365     <field field_ref="qns_ice"          name="qns_ice"    /> 
     366     <field field_ref="qemp_ice"         name="qemp_ice"   /> 
     367     <field field_ref="albedo"           name="albedo"     /> 
     368          <field field_ref="icealb"           name="icealb"     /> 
     369      
     370     <field field_ref="hfxcndtop"        name="hfxcndtop"  /> 
     371     <field field_ref="hfxcndbot"        name="hfxcndbot"  /> 
     372     <field field_ref="hfxsensib"        name="hfxsensib"  /> 
     373 
     374     <field field_ref="icehc"         name="icehc"  /> 
     375     <field field_ref="snwhc"         name="snwhc"  /> 
     376     <field field_ref="hfxbog"        name="hfxbog"  /> 
     377     <field field_ref="hfxbom"        name="hfxbom"  /> 
     378     <field field_ref="hfxsum"        name="hfxsum"  /> 
     379     <field field_ref="hfxopw"        name="hfxopw"  /> 
     380     <field field_ref="hfxdif"        name="hfxdif"  /> 
     381     <field field_ref="hfxsnw"        name="hfxsnw"  /> 
     382     <field field_ref="hfxerr"        name="hfxerr"  /> 
     383     <field field_ref="hfxthd"        name="hfxthd"  /> 
     384     <field field_ref="hfxdyn"        name="hfxdyn"  /> 
     385     <field field_ref="hfxres"        name="hfxres"  /> 
     386     <field field_ref="hfxsub"        name="hfxsub"  /> 
     387     <field field_ref="hfxspr"        name="hfxspr"  /> 
     388 
     389<!-- 
     390     <field field_ref="hfxdhc"        name="hfxbudget"  operation="average" freq_op="1d" > @qt_atm_oi - @qt_oce_ai -@hfxdhc </field> 
     391--> 
     392      
     393     <!-- salt fluxes --> 
     394     <field field_ref="sfxice"           name="sfxice" /> 
     395      
     396     <!-- mass fluxes --> 
     397     <field field_ref="vfxice"           name="vfxice" /> 
     398     <field field_ref="vfxsnw"           name="vfxsnw" /> 
     399 
     400     <field field_ref="vfxbom"           name="vfxbom" /> 
     401     <field field_ref="vfxbog"           name="vfxbog" /> 
     402     <field field_ref="vfxsum"           name="vfxsum" /> 
     403     <field field_ref="vfxopw"           name="vfxopw" /> 
     404     <field field_ref="vfxlam"           name="vfxlam" /> 
     405     <field field_ref="vfxsni"           name="vfxsni" /> 
     406     <field field_ref="vfxdyn"           name="vfxdyn" /> 
     407     <field field_ref="vfxres"           name="vfxres" /> 
     408     <field field_ref="vfxpnd"           name="vfxpnd" /> 
     409     <field field_ref="vfxsub"           name="vfxsub" /> 
     410     <field field_ref="vfxsub_err"       name="vfxsub_err" /> 
     411          <field field_ref="vfxthin"          name="vfxthin" /> 
     412    
     413     <!-- diag error for negative ice volume after advection --> 
     414     <field field_ref="iceneg_pres"      name="sineg_pres" /> 
     415     <field field_ref="iceneg_volu"      name="sineg_volu" /> 
     416     <field field_ref="iceneg_hfx"       name="sineg_hfx"  /> 
     417        </field_group> 
     418 
     419 
     420        <field_group id="myvarICE_cat"        grid_ref="grid_T_ncatice" > 
     421 
     422     <!-- categories --> 
     423     <field field_ref="icemask_cat"      name="simskcat"/> 
     424     <field field_ref="snwthic_cat"      name="snthicat"/> 
     425     <field field_ref="iceconc_cat"      name="siconcat"/> 
     426     <field field_ref="icethic_cat"      name="sithicat"/> 
     427     <field field_ref="icesalt_cat"      name="sisalcat"/> 
     428     <field field_ref="icetemp_cat"      name="sitemcat"/> 
     429     <field field_ref="snwtemp_cat"      name="sntemcat"/> 
     430     <field field_ref="icettop_cat"      name="sitopcat"/> 
     431 
    304432   </field_group>     
    305433 
    306    <field_group id="ICE_globalbudget"  grid_ref="grid_1point" > 
     434   <field_group id="ICE_globalbudget"  grid_ref="grid_scalar" > 
     435     <!-- global contents --> 
    307436        <field field_ref="ibgvol_tot"       name="ibgvol_tot"   /> 
    308437     <field field_ref="sbgvol_tot"       name="sbgvol_tot"   /> 
     
    312441        <field field_ref="sbgheat_tot"      name="sbgheat_tot"  /> 
    313442 
    314         <field field_ref="ibgvolume"        name="ibgvolume"    /> 
     443     <!-- global drifts (conservation checks) --> 
     444     <field field_ref="ibgvolume"        name="ibgvolume"    /> 
    315445        <field field_ref="ibgsaltco"        name="ibgsaltco"    /> 
    316446        <field field_ref="ibgheatco"        name="ibgheatco"    /> 
    317447          <field field_ref="ibgheatfx"        name="ibgheatfx"    /> 
    318448 
     449     <!-- global forcings  --> 
    319450        <field field_ref="ibgfrcvoltop"     name="ibgfrcvoltop" /> 
    320451        <field field_ref="ibgfrcvolbot"     name="ibgfrcvolbot" /> 
     
    333464 
    334465   <!-- SIMIP monthly scalar variables --> 
    335    <field_group id="SImon_scalars"   grid_ref="grid_1point" > 
     466   <field_group id="SImon_scalars"   grid_ref="grid_scalar" > 
    336467          <!-- Integrated quantities --> 
    337468          <field field_ref="NH_iceextt"       name="siextentn"    /> 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/field_def_nemo-oce.xml

    r10824 r11362  
    343343   </field_group> 
    344344    
    345    <!-- scalar variables --> 
    346    <field_group id="SBC_0D"  grid_ref="grid_1point" > 
    347    </field_group> 
    348345 
    349346      </field_group> <!-- SBC --> 
     
    500497      <field id="ahmf_3d"      long_name=" 3D      f-eddy viscosity coefficient"   unit="m2/s or m4/s"  grid_ref="grid_T_3D"/> 
    501498 
    502       <field_group id="scalar"  grid_ref="grid_T_2D"  > 
     499      <field_group id="scalar"  grid_ref="grid_scalar"  > 
    503500         <!-- Need to have a salinity reference climatological file : sali_ref_clim_monthly --> 
    504501        <field id="voltot"     long_name="global total volume"                          standard_name="sea_water_volume"                               unit="m3"   /> 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/field_def_nemo-pisces.xml

    r10416 r11362  
    290290     </field_group> 
    291291 
    292      <field_group id="tracer_scalar"  grid_ref="grid_T_2D"  > 
     292     <field_group id="tracer_scalar"  grid_ref="grid_scalar"  > 
    293293     <!-- PISCES scalar  --> 
    294294       <field id="pno3tot"         long_name="Global mean nitrate concentration"                  unit="mol/m3"   /> 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/grid_def_nemo.xml

    r10226 r11362  
    77       </grid> 
    88        <!--  --> 
    9        <grid id="grid_T_3D_ncatice" > 
     9       <grid id="grid_T_ncatice" > 
    1010         <domain id="grid_T" /> 
    1111         <axis id="ncatice" /> 
     
    4949       </grid> 
    5050        <!--  --> 
    51        <grid id="grid_1point" > 
    52          <domain domain_ref="1point"/> 
    53        </grid> 
    54         <!--  --> 
    5551       <grid id="grid_T_nfloat" > 
    5652         <domain id="grid_T" /> 
    5753         <axis id="nfloat" /> 
    5854       </grid> 
     55      <!-- scalars --> 
     56      <grid id="grid_scalar" > 
     57        <scalar/> 
     58      </grid> 
    5959 
    6060    </grid_definition> 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SPITZ12/EXPREF/file_def_nemo-ice.xml

    r10911 r11362  
    9393     <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." > 
    9494       <!-- global contents --> 
    95        <field field_ref="ibgvol_tot"     grid_ref="grid_1point"   name="ibgvol_tot"   /> 
    96        <field field_ref="sbgvol_tot"     grid_ref="grid_1point"   name="sbgvol_tot"   /> 
    97        <field field_ref="ibgarea_tot"    grid_ref="grid_1point"   name="ibgarea_tot"  /> 
    98        <field field_ref="ibgsalt_tot"    grid_ref="grid_1point"   name="ibgsalt_tot"  /> 
    99        <field field_ref="ibgheat_tot"    grid_ref="grid_1point"   name="ibgheat_tot"  /> 
    100        <field field_ref="sbgheat_tot"    grid_ref="grid_1point"   name="sbgheat_tot"  /> 
     95       <field field_ref="ibgvol_tot"     name="ibgvol_tot"   /> 
     96       <field field_ref="sbgvol_tot"     name="sbgvol_tot"   /> 
     97       <field field_ref="ibgarea_tot"    name="ibgarea_tot"  /> 
     98       <field field_ref="ibgsalt_tot"    name="ibgsalt_tot"  /> 
     99       <field field_ref="ibgheat_tot"    name="ibgheat_tot"  /> 
     100       <field field_ref="sbgheat_tot"    name="sbgheat_tot"  /> 
    101101        
    102102       <!-- global drifts (conservation checks) --> 
    103        <field field_ref="ibgvolume"      grid_ref="grid_1point"   name="ibgvolume"    /> 
    104        <field field_ref="ibgsaltco"      grid_ref="grid_1point"   name="ibgsaltco"    /> 
    105        <field field_ref="ibgheatco"      grid_ref="grid_1point"   name="ibgheatco"    /> 
    106        <field field_ref="ibgheatfx"      grid_ref="grid_1point"   name="ibgheatfx"    /> 
     103       <field field_ref="ibgvolume"      name="ibgvolume"    /> 
     104       <field field_ref="ibgsaltco"      name="ibgsaltco"    /> 
     105       <field field_ref="ibgheatco"      name="ibgheatco"    /> 
     106       <field field_ref="ibgheatfx"      name="ibgheatfx"    /> 
    107107        
    108108       <!-- global forcings  --> 
    109        <field field_ref="ibgfrcvoltop"   grid_ref="grid_1point"   name="ibgfrcvoltop" /> 
    110        <field field_ref="ibgfrcvolbot"   grid_ref="grid_1point"   name="ibgfrcvolbot" /> 
    111        <field field_ref="ibgfrctemtop"   grid_ref="grid_1point"   name="ibgfrctemtop" /> 
    112        <field field_ref="ibgfrctembot"   grid_ref="grid_1point"   name="ibgfrctembot" /> 
    113        <field field_ref="ibgfrcsal"      grid_ref="grid_1point"   name="ibgfrcsal"    /> 
    114        <field field_ref="ibgfrchfxtop"   grid_ref="grid_1point"   name="ibgfrchfxtop" /> 
    115        <field field_ref="ibgfrchfxbot"   grid_ref="grid_1point"   name="ibgfrchfxbot" /> 
     109       <field field_ref="ibgfrcvoltop"   name="ibgfrcvoltop" /> 
     110       <field field_ref="ibgfrcvolbot"   name="ibgfrcvolbot" /> 
     111       <field field_ref="ibgfrctemtop"   name="ibgfrctemtop" /> 
     112       <field field_ref="ibgfrctembot"   name="ibgfrctembot" /> 
     113       <field field_ref="ibgfrcsal"      name="ibgfrcsal"    /> 
     114       <field field_ref="ibgfrchfxtop"   name="ibgfrchfxtop" /> 
     115       <field field_ref="ibgfrchfxbot"   name="ibgfrchfxbot" /> 
    116116     </file> 
    117117      
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SPITZ12/EXPREF/file_def_nemo-oce.xml

    r9572 r11362  
    8181        <file id="file15" name_suffix="_scalar" description="scalar variables" > 
    8282          <!-- global drifts (conservation checks) --> 
    83           <field field_ref="bgtemper"     grid_ref="grid_1point"   name="bgtemper"    /> 
    84           <field field_ref="bgsaline"     grid_ref="grid_1point"   name="bgsaline"    /> 
    85           <field field_ref="bgheatco"     grid_ref="grid_1point"   name="bgheatco"    /> 
    86           <field field_ref="bgheatfx"     grid_ref="grid_1point"   name="bgheatfx"    /> 
    87           <field field_ref="bgsaltco"     grid_ref="grid_1point"   name="bgsaltco"    /> 
    88           <field field_ref="bgvolssh"     grid_ref="grid_1point"   name="bgvolssh"    /> 
    89           <field field_ref="bgvole3t"     grid_ref="grid_1point"   name="bgvole3t"    /> 
     83          <field field_ref="bgtemper"     name="bgtemper"    /> 
     84          <field field_ref="bgsaline"     name="bgsaline"    /> 
     85          <field field_ref="bgheatco"     name="bgheatco"    /> 
     86          <field field_ref="bgheatfx"     name="bgheatfx"    /> 
     87          <field field_ref="bgsaltco"     name="bgsaltco"    /> 
     88          <field field_ref="bgvolssh"     name="bgvolssh"    /> 
     89          <field field_ref="bgvole3t"     name="bgvole3t"    /> 
    9090 
    9191          <!-- global surface forcings  --> 
    92           <field field_ref="bgfrcvol"     grid_ref="grid_1point"   name="bgfrcvol"    /> 
    93           <field field_ref="bgfrctem"     grid_ref="grid_1point"   name="bgfrctem"    /> 
    94           <field field_ref="bgfrchfx"     grid_ref="grid_1point"   name="bgfrchfx"    /> 
    95           <field field_ref="bgfrcsal"     grid_ref="grid_1point"   name="bgfrcsal"    /> 
     92          <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
     93          <field field_ref="bgfrctem"     name="bgfrctem"    /> 
     94          <field field_ref="bgfrchfx"     name="bgfrchfx"    /> 
     95          <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
    9696        </file> 
    9797 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/ice.F90

    r10882 r11362  
    102102   !! vt_i        |      -      |    Total ice vol. per unit area | m     | 
    103103   !! vt_s        |      -      |    Total snow vol. per unit ar. | m     | 
     104   !! st_i        |      -      |    Total Sea ice salt content   | pss.m | 
    104105   !! sm_i        |      -      |    Mean sea ice salinity        | pss   | 
    105106   !! tm_i        |      -      |    Mean sea ice temperature     | K     | 
     
    309310   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   u_ice, v_ice !: components of the ice velocity                          (m/s) 
    310311   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   vt_i , vt_s  !: ice and snow total volume per unit area                 (m) 
     312   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   st_i         !: Total ice salinity content                              (pss.m) 
    311313   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   at_i         !: ice total fractional area (ice concentration) 
    312314   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ato_i        !: =1-at_i ; total open water fractional area 
     
    429431      ii = ii + 1 
    430432      ALLOCATE( u_ice(jpi,jpj) , v_ice(jpi,jpj) ,                                   & 
    431          &      vt_i (jpi,jpj) , vt_s (jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) ,  & 
    432          &      et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s (jpi,jpj) ,  & 
    433          &      sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s (jpi,jpj) ,  & 
     433         &      vt_i (jpi,jpj) , vt_s (jpi,jpj) , st_i(jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) ,  & 
     434         &      et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s(jpi,jpj) ,  & 
     435         &      sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s(jpi,jpj) ,  & 
    434436         &      om_i (jpi,jpj) , bvm_i(jpi,jpj) , tau_icebfr(jpi,jpj)            , STAT=ierr(ii) ) 
    435437 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedia.F90

    r11317 r11362  
    3434   PUBLIC   ice_dia_init   ! called in icestp.F90 
    3535 
    36    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   vol_loc_ini, sal_loc_ini, tem_loc_ini ! initial volume, salt and heat contents 
     36   REAL(wp), SAVE ::   z1_e1e2  ! inverse of the ocean area 
     37   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   vol_loc_ini, sal_loc_ini, tem_loc_ini                    ! initial volume, salt and heat contents 
    3738   REAL(wp)                              ::   frc_sal, frc_voltop, frc_volbot, frc_temtop, frc_tembot  ! global forcing trends 
    3839    
     
    8081      ENDIF 
    8182 
    82 !!gm glob_sum includes a " * tmask_i ", so remove  " * tmask(:,:,1) " 
    83  
     83      IF( kt == nit000 ) THEN 
     84         z1_e1e2 = 1._wp / glob_sum( 'icedia', e1e2t(:,:) ) 
     85      ENDIF 
     86       
    8487      ! ----------------------- ! 
    85       ! 1 -  Contents ! 
     88      ! 1 -  Contents           ! 
    8689      ! ----------------------- ! 
    87       zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9                  ! ice volume (km3) 
    88       zbg_svol = glob_sum( 'icedia', vt_s(:,:) * e1e2t(:,:) ) * 1.e-9                  ! snow volume (km3) 
    89       zbg_area = glob_sum( 'icedia', at_i(:,:) * e1e2t(:,:) ) * 1.e-6                  ! area (km2) 
    90       zbg_isal = glob_sum( 'icedia', SUM( sv_i(:,:,:), dim=3 ) * e1e2t(:,:) ) * 1.e-9  ! salt content (pss*km3) 
    91       zbg_item = glob_sum( 'icedia', et_i * e1e2t(:,:) ) * 1.e-20                      ! heat content (1.e20 J) 
    92       zbg_stem = glob_sum( 'icedia', et_s * e1e2t(:,:) ) * 1.e-20                      ! heat content (1.e20 J) 
    93        
     90      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 
     93         zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice volume (km3) 
     94         zbg_svol = glob_sum( 'icedia', vt_s(:,:) * e1e2t(:,:) ) * 1.e-9  ! snow volume (km3) 
     95         zbg_area = glob_sum( 'icedia', at_i(:,:) * e1e2t(:,:) ) * 1.e-6  ! area (km2) 
     96         zbg_isal = glob_sum( 'icedia', st_i(:,:) * e1e2t(:,:) ) * 1.e-9  ! salt content (pss*km3) 
     97         zbg_item = glob_sum( 'icedia', et_i(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 
     98         zbg_stem = glob_sum( 'icedia', et_s(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 
     99 
     100         CALL iom_put( 'ibgvol_tot'  , zbg_ivol )  
     101         CALL iom_put( 'sbgvol_tot'  , zbg_svol )  
     102         CALL iom_put( 'ibgarea_tot' , zbg_area )  
     103         CALL iom_put( 'ibgsalt_tot' , zbg_isal )  
     104         CALL iom_put( 'ibgheat_tot' , zbg_item )  
     105         CALL iom_put( 'sbgheat_tot' , zbg_stem )  
     106  
     107      ENDIF 
     108 
    94109      ! ---------------------------! 
    95110      ! 2 - Trends due to forcing  ! 
    96111      ! ---------------------------! 
     112      ! they must be kept outside an IF(iom_use) because of the call to dia_rst below 
    97113      z_frc_volbot = r1_rau0 * glob_sum( 'icedia', -( wfx_ice(:,:) + wfx_snw(:,:) + wfx_err_sub(:,:) ) * e1e2t(:,:) ) * 1.e-9   ! freshwater flux ice/snow-ocean  
    98114      z_frc_voltop = r1_rau0 * glob_sum( 'icedia', -( wfx_sub(:,:) + wfx_spr(:,:) )                    * e1e2t(:,:) ) * 1.e-9   ! freshwater flux ice/snow-atm 
     
    106122      frc_temtop  = frc_temtop  + z_frc_temtop  * rdt_ice ! 1.e20 J 
    107123      frc_tembot  = frc_tembot  + z_frc_tembot  * rdt_ice ! 1.e20 J 
     124 
     125      CALL iom_put( 'ibgfrcvoltop' , frc_voltop )   ! vol  forcing ice/snw-atm          (km3 equivalent ocean water)  
     126      CALL iom_put( 'ibgfrcvolbot' , frc_volbot )   ! vol  forcing ice/snw-ocean        (km3 equivalent ocean water)  
     127      CALL iom_put( 'ibgfrcsal'    , frc_sal    )   ! sal - forcing                     (psu*km3 equivalent ocean water)    
     128      CALL iom_put( 'ibgfrctemtop' , frc_temtop )   ! heat on top of ice/snw/ocean      (1.e20 J)    
     129      CALL iom_put( 'ibgfrctembot' , frc_tembot )   ! heat on top of ocean(below ice)   (1.e20 J)    
     130 
     131      IF(  iom_use('ibgfrchfxtop') .OR. iom_use('ibgfrchfxbot') ) THEN 
     132         CALL iom_put( 'ibgfrchfxtop' , frc_temtop * z1_e1e2 * 1.e-20 * kt*rdt ) ! heat on top of ice/snw/ocean      (W/m2) 
     133         CALL iom_put( 'ibgfrchfxbot' , frc_tembot * z1_e1e2 * 1.e-20 * kt*rdt ) ! heat on top of ocean(below ice)   (W/m2)  
     134      ENDIF 
     135       
     136      ! ---------------------------------- ! 
     137      ! 3 -  Content variations and drifts ! 
     138      ! ---------------------------------- ! 
     139      IF(  iom_use('ibgvolume') .OR. iom_use('ibgsaltco') .OR. iom_use('ibgheatco') .OR. iom_use('ibgheatfx') ) THEN 
    108140             
    109       ! ----------------------- ! 
    110       ! 3 -  Content variations ! 
    111       ! ----------------------- ! 
    112       zdiff_vol = r1_rau0 * glob_sum( 'icedia', ( rhoi*vt_i(:,:) + rhos*vt_s(:,:) - vol_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9   ! freshwater trend (km3)  
    113       zdiff_sal = r1_rau0 * glob_sum( 'icedia', ( rhoi* SUM( sv_i(:,:,:), dim=3 ) - sal_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9   ! salt content trend (km3*pss) 
    114       zdiff_tem =           glob_sum( 'icedia', ( et_i(:,:) + et_s(:,:)           - tem_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-20  ! heat content trend (1.e20 J) 
    115       !                               + SUM( qevap_ice * a_i_b, dim=3 )       !! clem: I think this term should not be there (but needs a check) 
    116  
    117       ! ----------------------- ! 
    118       ! 4 -  Drifts             ! 
    119       ! ----------------------- ! 
    120       zdiff_vol = zdiff_vol - ( frc_voltop + frc_volbot ) 
    121       zdiff_sal = zdiff_sal - frc_sal 
    122       zdiff_tem = zdiff_tem - ( frc_tembot - frc_temtop ) 
    123  
    124       ! ----------------------- ! 
    125       ! 5 - Diagnostics writing ! 
    126       ! ----------------------- ! 
    127 !!gm I don't understand the division by the ocean surface (i.e. glob_sum( 'icedia', e1e2t(:,:) ) * 1.e-20 * kt*rdt ) 
    128 !!   and its multiplication bu kt ! is it really what we want ? what is this quantity ? 
    129 !!   IF it is really what we want, compute it at kt=nit000, not 3 time by time-step ! 
    130 !!   kt*rdt  : you mean rdtice ? 
    131 !!gm 
    132       ! 
    133       IF( iom_use('ibgvolume')    )   CALL iom_put( 'ibgvolume' , zdiff_vol     )   ! ice/snow volume  drift            (km3 equivalent ocean water)          
    134       IF( iom_use('ibgsaltco')    )   CALL iom_put( 'ibgsaltco' , zdiff_sal     )   ! ice salt content drift            (psu*km3 equivalent ocean water) 
    135       IF( iom_use('ibgheatco')    )   CALL iom_put( 'ibgheatco' , zdiff_tem     )   ! ice/snow heat content drift       (1.e20 J) 
    136       IF( iom_use('ibgheatfx')    )   CALL iom_put( 'ibgheatfx' ,               &   ! ice/snow heat flux drift          (W/m2) 
    137          &                                                     zdiff_tem /glob_sum( 'icedia', e1e2t(:,:) * 1.e-20 * kt*rdt ) ) 
    138  
    139       IF( iom_use('ibgfrcvoltop') )   CALL iom_put( 'ibgfrcvoltop' , frc_voltop )   ! vol  forcing ice/snw-atm          (km3 equivalent ocean water)  
    140       IF( iom_use('ibgfrcvolbot') )   CALL iom_put( 'ibgfrcvolbot' , frc_volbot )   ! vol  forcing ice/snw-ocean        (km3 equivalent ocean water)  
    141       IF( iom_use('ibgfrcsal')    )   CALL iom_put( 'ibgfrcsal'    , frc_sal    )   ! sal - forcing                     (psu*km3 equivalent ocean water)    
    142       IF( iom_use('ibgfrctemtop') )   CALL iom_put( 'ibgfrctemtop' , frc_temtop )   ! heat on top of ice/snw/ocean      (1.e20 J)    
    143       IF( iom_use('ibgfrctembot') )   CALL iom_put( 'ibgfrctembot' , frc_tembot )   ! heat on top of ocean(below ice)   (1.e20 J)    
    144       IF( iom_use('ibgfrchfxtop') )   CALL iom_put( 'ibgfrchfxtop' ,            &   ! heat on top of ice/snw/ocean      (W/m2)  
    145          &                                                          frc_temtop / glob_sum( 'icedia', e1e2t(:,:) ) * 1.e-20 * kt*rdt  ) 
    146       IF( iom_use('ibgfrchfxbot') )   CALL iom_put( 'ibgfrchfxbot' ,            &   ! heat on top of ocean(below ice)   (W/m2)  
    147          &                                                          frc_tembot / glob_sum( 'icedia', e1e2t(:,:) ) * 1.e-20 * kt*rdt  ) 
    148  
    149       IF( iom_use('ibgvol_tot' )  )   CALL iom_put( 'ibgvol_tot'  , zbg_ivol     )   ! ice volume                       (km3) 
    150       IF( iom_use('sbgvol_tot' )  )   CALL iom_put( 'sbgvol_tot'  , zbg_svol     )   ! snow volume                      (km3) 
    151       IF( iom_use('ibgarea_tot')  )   CALL iom_put( 'ibgarea_tot' , zbg_area     )   ! ice area                         (km2) 
    152       IF( iom_use('ibgsalt_tot')  )   CALL iom_put( 'ibgsalt_tot' , zbg_isal     )   ! ice salinity content             (pss*km3) 
    153       IF( iom_use('ibgheat_tot')  )   CALL iom_put( 'ibgheat_tot' , zbg_item     )   ! ice heat content                 (1.e20 J) 
    154       IF( iom_use('sbgheat_tot')  )   CALL iom_put( 'sbgheat_tot' , zbg_stem     )   ! snow heat content                (1.e20 J) 
    155       ! 
     141         zdiff_vol = r1_rau0 * glob_sum( 'icedia', ( rhoi*vt_i(:,:) + rhos*vt_s(:,:) - vol_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9   ! freshwater trend (km3)  
     142         zdiff_sal = r1_rau0 * glob_sum( 'icedia', ( rhoi*st_i(:,:)                  - sal_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9   ! salt content trend (km3*pss) 
     143         zdiff_tem =           glob_sum( 'icedia', ( et_i(:,:) + et_s(:,:)           - tem_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-20  ! heat content trend (1.e20 J) 
     144         !                               + SUM( qevap_ice * a_i_b, dim=3 )       !! clem: I think this term should not be there (but needs a check) 
     145          
     146         zdiff_vol = zdiff_vol - ( frc_voltop + frc_volbot ) 
     147         zdiff_sal = zdiff_sal - frc_sal 
     148         zdiff_tem = zdiff_tem - ( frc_tembot - frc_temtop ) 
     149          
     150         CALL iom_put( 'ibgvolume' , zdiff_vol     )   ! ice/snow volume  drift            (km3 equivalent ocean water)          
     151         CALL iom_put( 'ibgsaltco' , zdiff_sal     )   ! ice salt content drift            (psu*km3 equivalent ocean water) 
     152         CALL iom_put( 'ibgheatco' , zdiff_tem     )   ! ice/snow heat content drift       (1.e20 J) 
     153         ! 
     154      ENDIF 
     155       
    156156      IF( lrst_ice )   CALL ice_dia_rst( 'WRITE', kt_ice ) 
    157157      ! 
     
    248248            vol_loc_ini(:,:) = rhoi * vt_i(:,:) + rhos * vt_s(:,:)  ! ice/snow volume (kg/m2) 
    249249            tem_loc_ini(:,:) = et_i(:,:) + et_s(:,:)                ! ice/snow heat content (J) 
    250             sal_loc_ini(:,:) = rhoi * SUM( sv_i(:,:,:), dim=3 )     ! ice salt content (pss*kg/m2) 
     250            sal_loc_ini(:,:) = rhoi * st_i(:,:)                     ! ice salt content (pss*kg/m2) 
    251251         ENDIF 
    252252         ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedyn.F90

    r11317 r11362  
    7575      !! 
    7676      INTEGER  ::   ji, jj        ! dummy loop indices 
     77      REAL(wp) ::   zmiss_val     ! missing value retrieved from xios  
    7778      REAL(wp) ::   zcoefu, zcoefv 
    78       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdivu_i 
     79      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdivu_i, zmsk00 
    7980      !!-------------------------------------------------------------------- 
    8081      ! 
     
    8889      ENDIF 
    8990      !                       
     91      ! get missing value from xml 
     92      CALL iom_miss_val( "icethic", zmiss_val ) 
     93      ! 
    9094      ! retrieve thickness from volume for landfast param. and UMx advection scheme 
    9195      WHERE( a_i(:,:,:) >= epsi20 ) 
     
    155159         CASE ( np_dynADV1D , np_dynADV2D ) 
    156160 
    157             ALLOCATE( zdivu_i(jpi,jpj) ) 
     161            ALLOCATE( zdivu_i(jpi,jpj), zmsk00(jpi,jpj) ) 
     162 
     163            DO jj = 1, jpj 
     164               DO ji = 1, jpi 
     165                  zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06  ) ) ! 1 if ice    , 0 if no ice 
     166               END DO 
     167            END DO 
    158168            DO jj = 2, jpjm1 
    159169               DO ji = 2, jpim1 
     
    163173            END DO 
    164174            CALL lbc_lnk( 'icedyn', zdivu_i, 'T', 1. ) 
    165             CALL iom_put( "icediv" , zdivu_i(:,:) ) 
    166             DEALLOCATE( zdivu_i ) 
     175            ! output 
     176            CALL iom_put( "icediv" , zdivu_i * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     177 
     178            DEALLOCATE( zdivu_i, zmsk00 ) 
    167179 
    168180         END SELECT 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedyn_rhg_evp.F90

    r10891 r11362  
    117117      INTEGER ::   jter         ! local integers 
    118118      ! 
     119      REAL(wp) ::   zmiss_val                                           ! missing value retrieved from xios  
    119120      REAL(wp) ::   zrhoco                                              ! rau0 * rn_cio 
    120121      REAL(wp) ::   zdtevp, z1_dtevp                                    ! time step for subcycling 
     
    163164      REAL(wp), PARAMETER          ::   zamin  = 0.001_wp               ! ice concentration below which ice velocity becomes very small 
    164165      !! --- diags 
    165       REAL(wp), DIMENSION(jpi,jpj) ::   zswi 
     166      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00 
    166167      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zsig1, zsig2, zsig3 
    167168      !! --- SIMIP diags 
    168       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_sig1      ! Average normal stress in sea ice    
    169       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_sig2      ! Maximum shear stress in sea ice 
    170169      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_dssh_dx   ! X-direction sea-surface tilt term (N/m2) 
    171170      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_dssh_dy   ! X-direction sea-surface tilt term (N/m2) 
     
    366365         END DO 
    367366      ENDIF 
    368       IF( iom_use('tau_icebfr') )   CALL iom_put( 'tau_icebfr', tau_icebfr(:,:) ) 
    369367 
    370368      !------------------------------------------------------------------------------! 
     
    762760      ! 5) diagnostics 
    763761      !------------------------------------------------------------------------------! 
     762      ! get missing value from xml 
     763      CALL iom_miss_val( "icethic", zmiss_val ) 
     764 
    764765      DO jj = 1, jpj 
    765766         DO ji = 1, jpi 
    766             zswi(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
     767            zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
    767768         END DO 
    768769      END DO 
    769770 
     771      ! --- ice-ocean stress --- ! 
     772      IF( iom_use('utau_oi') .OR. iom_use('vtau_oi') ) THEN 
     773         ALLOCATE( zdiag_utau_oi(jpi,jpj) , zdiag_vtau_oi(jpi,jpj) ) 
     774         zdiag_utau_oi(:,:) = zrhoco * SQRT( ( u_ice (:,:) - u_oce (:,:) ) * ( u_ice (:,:) - u_oce (:,:) )   & 
     775            &                              + ( v_iceU(:,:) - v_oceU(:,:) ) * ( v_iceU(:,:) - v_oceU(:,:) ) ) & 
     776            &                        * ( u_oce(:,:) - u_ice(:,:) ) 
     777         ! 
     778         zdiag_vtau_oi(:,:) = zrhoco * SQRT( ( v_ice (:,:) - v_oce (:,:) ) * ( v_ice (:,:) - v_oce (:,:) )   & 
     779            &                              + ( u_iceV(:,:) - u_oceV(:,:) ) * ( u_iceV(:,:) - u_oceV(:,:) ) ) & 
     780            &                        * ( v_oce(:,:) - v_ice(:,:) ) 
     781         ! 
     782         CALL iom_put( 'utau_oi' , zdiag_utau_oi * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     783         CALL iom_put( 'vtau_oi' , zdiag_vtau_oi * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     784         DEALLOCATE( zdiag_utau_oi , zdiag_vtau_oi ) 
     785      ENDIF 
     786  
     787      ! --- ice-bathy stress in case of landfast --- ! 
     788      IF( iom_use('tau_icebfr') )   CALL iom_put( 'tau_icebfr', tau_icebfr * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     789       
    770790      ! --- divergence, shear and strength --- ! 
    771       IF( iom_use('icediv') )   CALL iom_put( "icediv" , pdivu_i (:,:) * zswi(:,:) )   ! divergence 
    772       IF( iom_use('iceshe') )   CALL iom_put( "iceshe" , pshear_i(:,:) * zswi(:,:) )   ! shear 
    773       IF( iom_use('icestr') )   CALL iom_put( "icestr" , strength(:,:) * zswi(:,:) )   ! Ice strength 
    774  
    775       ! --- charge ellipse --- ! 
    776       IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') ) THEN 
     791      IF( iom_use('icediv') )   CALL iom_put( "icediv" , pdivu_i  * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! divergence 
     792      IF( iom_use('iceshe') )   CALL iom_put( "iceshe" , pshear_i * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! shear 
     793      IF( iom_use('icestr') )   CALL iom_put( "icestr" , strength * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! Ice strength 
     794 
     795      ! --- stress tensor --- ! 
     796      IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') .OR. iom_use('normstr') .OR. iom_use('sheastr') ) THEN 
    777797         ! 
    778798         ALLOCATE( zsig1(jpi,jpj) , zsig2(jpi,jpj) , zsig3(jpi,jpj) ) 
     
    780800         DO jj = 2, jpjm1 
    781801            DO ji = 2, jpim1 
    782                zdum1 = ( zswi(ji-1,jj) * pstress12_i(ji-1,jj) + zswi(ji  ,jj-1) * pstress12_i(ji  ,jj-1) +  &  ! stress12_i at T-point 
    783                   &      zswi(ji  ,jj) * pstress12_i(ji  ,jj) + zswi(ji-1,jj-1) * pstress12_i(ji-1,jj-1) )  & 
    784                   &    / MAX( 1._wp, zswi(ji-1,jj) + zswi(ji,jj-1) + zswi(ji,jj) + zswi(ji-1,jj-1) ) 
     802               zdum1 = ( zmsk00(ji-1,jj) * pstress12_i(ji-1,jj) + zmsk00(ji  ,jj-1) * pstress12_i(ji  ,jj-1) +  &  ! stress12_i at T-point 
     803                  &      zmsk00(ji  ,jj) * pstress12_i(ji  ,jj) + zmsk00(ji-1,jj-1) * pstress12_i(ji-1,jj-1) )  & 
     804                  &    / MAX( 1._wp, zmsk00(ji-1,jj) + zmsk00(ji,jj-1) + zmsk00(ji,jj) + zmsk00(ji-1,jj-1) ) 
    785805 
    786806               zshear = SQRT( pstress2_i(ji,jj) * pstress2_i(ji,jj) + 4._wp * zdum1 * zdum1 ) ! shear stress   
    787807 
    788                zdum2 = zswi(ji,jj) / MAX( 1._wp, strength(ji,jj) ) 
     808               zdum2 = zmsk00(ji,jj) / MAX( 1._wp, strength(ji,jj) ) 
    789809 
    790810!!               zsig1(ji,jj) = 0.5_wp * zdum2 * ( pstress1_i(ji,jj) + zshear ) ! principal stress (y-direction, see Hunke & Dukowicz 2002) 
     
    799819         CALL lbc_lnk_multi( 'icedyn_rhg_evp', zsig1, 'T', 1., zsig2, 'T', 1., zsig3, 'T', 1. ) 
    800820         ! 
    801          IF( iom_use('isig1') )   CALL iom_put( "isig1" , zsig1 ) 
    802          IF( iom_use('isig2') )   CALL iom_put( "isig2" , zsig2 ) 
    803          IF( iom_use('isig3') )   CALL iom_put( "isig3" , zsig3 ) 
    804          ! 
     821         CALL iom_put( "isig1" , zsig1 ) 
     822         CALL iom_put( "isig2" , zsig2 ) 
     823         CALL iom_put( "isig3" , zsig3 ) 
     824         ! 
     825         ! Stress tensor invariants (normal and shear stress N/m) 
     826         IF( iom_use('normstr') )   CALL iom_put( 'normstr' ,       ( zs1(:,:) + zs2(:,:) )                       * zmsk00(:,:) ) ! Normal stress 
     827         IF( iom_use('sheastr') )   CALL iom_put( 'sheastr' , SQRT( ( zs1(:,:) - zs2(:,:) )**2 + 4*zs12(:,:)**2 ) * zmsk00(:,:) ) ! Shear stress 
     828 
    805829         DEALLOCATE( zsig1 , zsig2 , zsig3 ) 
    806830      ENDIF 
    807831       
    808832      ! --- SIMIP --- ! 
    809       IF ( iom_use( 'normstr'  ) .OR. iom_use( 'sheastr'  ) .OR. iom_use( 'dssh_dx'  ) .OR. iom_use( 'dssh_dy'  ) .OR. & 
    810          & iom_use( 'corstrx'  ) .OR. iom_use( 'corstry'  ) .OR. iom_use( 'intstrx'  ) .OR. iom_use( 'intstry'  ) .OR. & 
    811          & iom_use( 'utau_oi'  ) .OR. iom_use( 'vtau_oi'  ) .OR. iom_use( 'xmtrpice' ) .OR. iom_use( 'ymtrpice' ) .OR. & 
     833      IF ( iom_use( 'dssh_dx'  ) .OR. iom_use( 'dssh_dy'  ) .OR. iom_use( 'corstrx'  ) .OR. iom_use( 'corstry'  ) .OR. & 
     834         & iom_use( 'intstrx'  ) .OR. iom_use( 'intstry'  ) .OR. iom_use( 'xmtrpice' ) .OR. iom_use( 'ymtrpice' ) .OR. & 
    812835         & iom_use( 'xmtrpsnw' ) .OR. iom_use( 'ymtrpsnw' ) .OR. iom_use( 'xatrp'    ) .OR. iom_use( 'yatrp'    ) ) THEN 
    813  
    814          ALLOCATE( zdiag_sig1     (jpi,jpj) , zdiag_sig2     (jpi,jpj) , zdiag_dssh_dx  (jpi,jpj) , zdiag_dssh_dy  (jpi,jpj) ,  & 
    815             &      zdiag_corstrx  (jpi,jpj) , zdiag_corstry  (jpi,jpj) , zdiag_intstrx  (jpi,jpj) , zdiag_intstry  (jpi,jpj) ,  & 
    816             &      zdiag_utau_oi  (jpi,jpj) , zdiag_vtau_oi  (jpi,jpj) , zdiag_xmtrp_ice(jpi,jpj) , zdiag_ymtrp_ice(jpi,jpj) ,  & 
     836         ! 
     837         ALLOCATE( zdiag_dssh_dx  (jpi,jpj) , zdiag_dssh_dy  (jpi,jpj) , zdiag_corstrx  (jpi,jpj) , zdiag_corstry  (jpi,jpj) , & 
     838            &      zdiag_intstrx  (jpi,jpj) , zdiag_intstry  (jpi,jpj) , zdiag_xmtrp_ice(jpi,jpj) , zdiag_ymtrp_ice(jpi,jpj) , & 
    817839            &      zdiag_xmtrp_snw(jpi,jpj) , zdiag_ymtrp_snw(jpi,jpj) , zdiag_xatrp    (jpi,jpj) , zdiag_yatrp    (jpi,jpj) ) 
    818           
     840         ! 
    819841         DO jj = 2, jpjm1 
    820842            DO ji = 2, jpim1 
    821                rswitch  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
    822                 
    823                ! Stress tensor invariants (normal and shear stress N/m) 
    824                zdiag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * rswitch                                 ! normal stress 
    825                zdiag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * rswitch   ! shear stress 
    826                 
    827843               ! Stress terms of the momentum equation (N/m2) 
    828                zdiag_dssh_dx(ji,jj) = zspgU(ji,jj) * rswitch     ! sea surface slope stress term 
    829                zdiag_dssh_dy(ji,jj) = zspgV(ji,jj) * rswitch 
    830                 
    831                zdiag_corstrx(ji,jj) = zCorx(ji,jj) * rswitch     ! Coriolis stress term 
    832                zdiag_corstry(ji,jj) = zCory(ji,jj) * rswitch 
    833                 
    834                zdiag_intstrx(ji,jj) = zfU(ji,jj)   * rswitch     ! internal stress term 
    835                zdiag_intstry(ji,jj) = zfV(ji,jj)   * rswitch 
    836                 
    837                zdiag_utau_oi(ji,jj) = ztaux_oi(ji,jj) * rswitch  ! oceanic stress 
    838                zdiag_vtau_oi(ji,jj) = ztauy_oi(ji,jj) * rswitch 
    839                 
     844               zdiag_dssh_dx(ji,jj) = zspgU(ji,jj) * zmsk00(ji,jj)     ! sea surface slope stress term 
     845               zdiag_dssh_dy(ji,jj) = zspgV(ji,jj) * zmsk00(ji,jj) 
     846 
     847               zdiag_corstrx(ji,jj) = zCorx(ji,jj) * zmsk00(ji,jj)     ! Coriolis stress term 
     848               zdiag_corstry(ji,jj) = zCory(ji,jj) * zmsk00(ji,jj) 
     849 
     850               zdiag_intstrx(ji,jj) = zfU(ji,jj)   * zmsk00(ji,jj)     ! internal stress term 
     851               zdiag_intstry(ji,jj) = zfV(ji,jj)   * zmsk00(ji,jj) 
     852 
    840853               ! 2D ice mass, snow mass, area transport arrays (X, Y) 
    841                zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * rswitch 
    842                zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * rswitch 
    843                 
     854               zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * zmsk00(ji,jj) 
     855               zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * zmsk00(ji,jj) 
     856                               
    844857               zdiag_xmtrp_ice(ji,jj) = rhoi * zfac_x * ( vt_i(ji+1,jj) + vt_i(ji,jj) ) ! ice mass transport, X-component 
    845858               zdiag_ymtrp_ice(ji,jj) = rhoi * zfac_y * ( vt_i(ji,jj+1) + vt_i(ji,jj) ) !        ''           Y-   '' 
     
    854867         END DO 
    855868          
    856          CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_sig1   , 'T',  1., zdiag_sig2   , 'T',  1.,   & 
     869         CALL lbc_lnk_multi( 'icedyn_rhg_evp', & 
    857870            &                zdiag_dssh_dx, 'U', -1., zdiag_dssh_dy, 'V', -1.,   & 
    858871            &                zdiag_corstrx, 'U', -1., zdiag_corstry, 'V', -1.,   &  
    859872            &                zdiag_intstrx, 'U', -1., zdiag_intstry, 'V', -1.    ) 
    860873                   
    861          CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_utau_oi  , 'U', -1., zdiag_vtau_oi  , 'V', -1.,   & 
     874         CALL lbc_lnk_multi( 'icedyn_rhg_evp', & 
    862875            &                zdiag_xmtrp_ice, 'U', -1., zdiag_xmtrp_snw, 'U', -1.,   & 
    863876            &                zdiag_xatrp    , 'U', -1., zdiag_ymtrp_ice, 'V', -1.,   & 
    864877            &                zdiag_ymtrp_snw, 'V', -1., zdiag_yatrp    , 'V', -1.    ) 
    865878          
    866          IF( iom_use('normstr' ) )   CALL iom_put( 'normstr'  ,  zdiag_sig1(:,:)      )   ! Normal stress 
    867          IF( iom_use('sheastr' ) )   CALL iom_put( 'sheastr'  ,  zdiag_sig2(:,:)      )   ! Shear stress 
    868          IF( iom_use('dssh_dx' ) )   CALL iom_put( 'dssh_dx'  ,  zdiag_dssh_dx(:,:)   )   ! Sea-surface tilt term in force balance (x) 
    869          IF( iom_use('dssh_dy' ) )   CALL iom_put( 'dssh_dy'  ,  zdiag_dssh_dy(:,:)   )   ! Sea-surface tilt term in force balance (y) 
    870          IF( iom_use('corstrx' ) )   CALL iom_put( 'corstrx'  ,  zdiag_corstrx(:,:)   )   ! Coriolis force term in force balance (x) 
    871          IF( iom_use('corstry' ) )   CALL iom_put( 'corstry'  ,  zdiag_corstry(:,:)   )   ! Coriolis force term in force balance (y) 
    872          IF( iom_use('intstrx' ) )   CALL iom_put( 'intstrx'  ,  zdiag_intstrx(:,:)   )   ! Internal force term in force balance (x) 
    873          IF( iom_use('intstry' ) )   CALL iom_put( 'intstry'  ,  zdiag_intstry(:,:)   )   ! Internal force term in force balance (y) 
    874          IF( iom_use('utau_oi' ) )   CALL iom_put( 'utau_oi'  ,  zdiag_utau_oi(:,:)   )   ! Ocean stress term in force balance (x) 
    875          IF( iom_use('vtau_oi' ) )   CALL iom_put( 'vtau_oi'  ,  zdiag_vtau_oi(:,:)   )   ! Ocean stress term in force balance (y) 
    876          IF( iom_use('xmtrpice') )   CALL iom_put( 'xmtrpice' ,  zdiag_xmtrp_ice(:,:) )   ! X-component of sea-ice mass transport (kg/s) 
    877          IF( iom_use('ymtrpice') )   CALL iom_put( 'ymtrpice' ,  zdiag_ymtrp_ice(:,:) )   ! Y-component of sea-ice mass transport  
    878          IF( iom_use('xmtrpsnw') )   CALL iom_put( 'xmtrpsnw' ,  zdiag_xmtrp_snw(:,:) )   ! X-component of snow mass transport (kg/s) 
    879          IF( iom_use('ymtrpsnw') )   CALL iom_put( 'ymtrpsnw' ,  zdiag_ymtrp_snw(:,:) )   ! Y-component of snow mass transport 
    880          IF( iom_use('xatrp'   ) )   CALL iom_put( 'xatrp'    ,  zdiag_xatrp(:,:)     )   ! X-component of ice area transport 
    881          IF( iom_use('yatrp'   ) )   CALL iom_put( 'yatrp'    ,  zdiag_yatrp(:,:)     )   ! Y-component of ice area transport 
    882  
    883          DEALLOCATE( zdiag_sig1      , zdiag_sig2      , zdiag_dssh_dx   , zdiag_dssh_dy   ,  & 
    884             &        zdiag_corstrx   , zdiag_corstry   , zdiag_intstrx   , zdiag_intstry   ,  & 
    885             &        zdiag_utau_oi   , zdiag_vtau_oi   , zdiag_xmtrp_ice , zdiag_ymtrp_ice ,  & 
     879         CALL iom_put( 'dssh_dx'  ,  zdiag_dssh_dx   )   ! Sea-surface tilt term in force balance (x) 
     880         CALL iom_put( 'dssh_dy'  ,  zdiag_dssh_dy   )   ! Sea-surface tilt term in force balance (y) 
     881         CALL iom_put( 'corstrx'  ,  zdiag_corstrx   )   ! Coriolis force term in force balance (x) 
     882         CALL iom_put( 'corstry'  ,  zdiag_corstry   )   ! Coriolis force term in force balance (y) 
     883         CALL iom_put( 'intstrx'  ,  zdiag_intstrx   )   ! Internal force term in force balance (x) 
     884         CALL iom_put( 'intstry'  ,  zdiag_intstry   )   ! Internal force term in force balance (y) 
     885         CALL iom_put( 'xmtrpice' ,  zdiag_xmtrp_ice )   ! X-component of sea-ice mass transport (kg/s) 
     886         CALL iom_put( 'ymtrpice' ,  zdiag_ymtrp_ice )   ! Y-component of sea-ice mass transport  
     887         CALL iom_put( 'xmtrpsnw' ,  zdiag_xmtrp_snw )   ! X-component of snow mass transport (kg/s) 
     888         CALL iom_put( 'ymtrpsnw' ,  zdiag_ymtrp_snw )   ! Y-component of snow mass transport 
     889         CALL iom_put( 'xatrp'    ,  zdiag_xatrp     )   ! X-component of ice area transport 
     890         CALL iom_put( 'yatrp'    ,  zdiag_yatrp     )   ! Y-component of ice area transport 
     891 
     892         DEALLOCATE( zdiag_dssh_dx   , zdiag_dssh_dy   , zdiag_corstrx   , zdiag_corstry   , & 
     893            &        zdiag_intstrx   , zdiag_intstry   , zdiag_xmtrp_ice , zdiag_ymtrp_ice , & 
    886894            &        zdiag_xmtrp_snw , zdiag_ymtrp_snw , zdiag_xatrp     , zdiag_yatrp     ) 
    887895 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icesbc.F90

    r11317 r11362  
    114114      INTEGER, INTENT(in) ::   ksbc   ! flux formulation (user defined, bulk or Pure Coupled) 
    115115      ! 
    116       INTEGER  ::   ji, jj, jl                                ! dummy loop index 
    117       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
    118       REAL(wp), DIMENSION(jpi,jpj)     ::   zalb              ! 2D workspace 
     116      INTEGER  ::   ji, jj, jl      ! dummy loop index 
     117      REAL(wp) ::   zmiss_val       ! missing value retrieved from xios  
     118      REAL(wp), DIMENSION(jpi,jpj,jpl)              ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
     119      REAL(wp), DIMENSION(:,:)        , ALLOCATABLE ::   zalb, zmsk00      ! 2D workspace 
    119120      !!-------------------------------------------------------------------- 
    120121      ! 
     
    126127         WRITE(numout,*)'~~~~~~~~~~~~~~~' 
    127128      ENDIF 
     129 
     130      ! get missing value from xml 
     131      CALL iom_miss_val( "icethic", zmiss_val ) 
    128132 
    129133      ! --- cloud-sky and overcast-sky ice albedos --- ! 
     
    152156 
    153157      !--- output ice albedo and surface albedo ---! 
    154       IF( iom_use('icealb') ) THEN 
    155          WHERE( at_i_b <= epsi06 )   ;   zalb(:,:) = rn_alb_oce 
    156          ELSEWHERE                   ;   zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 
     158      IF( iom_use('icealb') .OR. iom_use('albedo') ) THEN 
     159 
     160         ALLOCATE( zalb(jpi,jpj), zmsk00(jpi,jpj) ) 
     161 
     162         WHERE( at_i_b <= epsi06 ) 
     163            zmsk00(:,:) = 0._wp 
     164            zalb  (:,:) = rn_alb_oce 
     165         ELSEWHERE 
     166            zmsk00(:,:) = 1._wp             
     167            zalb  (:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 
    157168         END WHERE 
    158          CALL iom_put( "icealb" , zalb(:,:) ) 
    159       ENDIF 
    160       IF( iom_use('albedo') ) THEN 
     169         ! ice albedo 
     170         CALL iom_put( "icealb" , zalb * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     171         ! ice+ocean albedo 
    161172         zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) + rn_alb_oce * ( 1._wp - at_i_b ) 
    162          CALL iom_put( "albedo" , zalb(:,:) ) 
     173         CALL iom_put( "albedo" , zalb ) 
     174 
     175         DEALLOCATE( zalb, zmsk00 ) 
     176 
    163177      ENDIF 
    164178      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icevar.F90

    r11352 r11362  
    3232   !!                        - vt_s(jpi,jpj) 
    3333   !!                        - at_i(jpi,jpj) 
     34   !!                        - st_i(jpi,jpj) 
    3435   !!                        - et_s(jpi,jpj)  total snow heat content 
    3536   !!                        - et_i(jpi,jpj)  total ice thermal content  
     
    104105      ! 
    105106      !                                      ! integrated values 
    106       vt_i(:,:) =       SUM( v_i(:,:,:)           , dim=3 ) 
    107       vt_s(:,:) =       SUM( v_s(:,:,:)           , dim=3 ) 
    108       at_i(:,:) =       SUM( a_i(:,:,:)           , dim=3 ) 
    109       et_s(:,:)  = SUM( SUM( e_s(:,:,:,:), dim=4 ), dim=3 ) 
    110       et_i(:,:)  = SUM( SUM( e_i(:,:,:,:), dim=4 ), dim=3 ) 
     107      vt_i(:,:) =       SUM( v_i (:,:,:)           , dim=3 ) 
     108      vt_s(:,:) =       SUM( v_s (:,:,:)           , dim=3 ) 
     109      st_i(:,:) =       SUM( sv_i(:,:,:)           , dim=3 ) 
     110      at_i(:,:) =       SUM( a_i (:,:,:)           , dim=3 ) 
     111      et_s(:,:)  = SUM( SUM( e_s (:,:,:,:), dim=4 ), dim=3 ) 
     112      et_i(:,:)  = SUM( SUM( e_i (:,:,:,:), dim=4 ), dim=3 ) 
    111113      ! 
    112114      at_ip(:,:) = SUM( a_ip(:,:,:), dim=3 ) ! melt ponds 
     
    138140         tm_si(:,:) = SUM( t_si(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 
    139141         om_i (:,:) = SUM( oa_i(:,:,:)              , dim=3 ) * z1_at_i(:,:) 
    140          sm_i (:,:) = SUM( sv_i(:,:,:)              , dim=3 ) * z1_vt_i(:,:) 
     142         sm_i (:,:) =      st_i(:,:)                          * z1_vt_i(:,:) 
    141143         ! 
    142144         tm_i(:,:) = 0._wp 
     
    263265      ! 
    264266      ! integrated values  
    265       vt_i (:,:) = SUM( v_i, dim=3 ) 
    266       vt_s (:,:) = SUM( v_s, dim=3 ) 
    267       at_i (:,:) = SUM( a_i, dim=3 ) 
     267      vt_i (:,:) = SUM( v_i , dim=3 ) 
     268      vt_s (:,:) = SUM( v_s , dim=3 ) 
     269      at_i (:,:) = SUM( a_i , dim=3 ) 
    268270      ! 
    269271   END SUBROUTINE ice_var_glo2eqv 
     
    533535 
    534536      ! to be sure that at_i is the sum of a_i(jl) 
    535       at_i (:,:) = SUM( a_i(:,:,:), dim=3 ) 
    536       vt_i (:,:) = SUM( v_i(:,:,:), dim=3 ) 
     537      at_i (:,:) = SUM( a_i (:,:,:), dim=3 ) 
     538      vt_i (:,:) = SUM( v_i (:,:,:), dim=3 ) 
     539!!clem add? 
     540!      vt_s (:,:) = SUM( v_s (:,:,:), dim=3 ) 
     541!      st_i (:,:) = SUM( sv_i(:,:,:), dim=3 ) 
     542!      et_s(:,:)  = SUM( SUM( e_s (:,:,:,:), dim=4 ), dim=3 ) 
     543!      et_i(:,:)  = SUM( SUM( e_i (:,:,:,:), dim=4 ), dim=3 ) 
     544!!clem 
    537545 
    538546      ! open water = 1 if at_i=0 
     
    10851093         !                              ! ---------------------- ! 
    10861094         CALL  ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1),            ph_i(:,:), ph_s(:,:), pa_i (:,:) ) 
    1087 !!$         CALL  ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1),            ph_i(:,:), ph_s(:,:), pa_i (:,:), & 
    1088 !!$            &                    ptmi(:,1), ptms(:,1), ptmsu(:,1), psmi(:,1), pt_i(:,:), pt_s(:,:), pt_su(:,:), ps_i(:,:) ) 
     1095!!         CALL  ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1),            ph_i(:,:), ph_s(:,:), pa_i (:,:), & 
     1096!!            &                    ptmi(:,1), ptms(:,1), ptmsu(:,1), psmi(:,1), pt_i(:,:), pt_s(:,:), pt_su(:,:), ps_i(:,:) ) 
    10891097         !                              ! ---------------------- ! 
    10901098      ELSEIF( jpl == 1 ) THEN           ! output cat = 1         ! 
    10911099         !                              ! ---------------------- ! 
    1092          CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1) )          
    1093 !!$         CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1), & 
    1094 !!$            &                    ptmi(:,:), ptms(:,:), ptmsu(:,:), psmi(:,:), pt_i(:,1), pt_s(:,1), pt_su(:,1), ps_i(:,1) )          
     1100         CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1) ) 
     1101!!         CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1), & 
     1102!!            &                    ptmi(:,:), ptms(:,:), ptmsu(:,:), psmi(:,:), pt_i(:,1), pt_s(:,1), pt_su(:,1), ps_i(:,1) )          
    10951103         !                              ! ----------------------- ! 
    10961104      ELSE                              ! input cat /= output cat ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icewri.F90

    r10911 r11362  
    5050      INTEGER  ::   ji, jj, jk, jl  ! dummy loop indices 
    5151      REAL(wp) ::   z2da, z2db, zrho1, zrho2 
    52       REAL(wp), DIMENSION(jpi,jpj)     ::   z2d, zfast !  2D workspace 
     52      REAL(wp) ::   zmiss_val       ! missing value retrieved from xios  
     53      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d, zfast                     ! 2D workspace 
    5354      REAL(wp), DIMENSION(jpi,jpj)     ::   zmsk00, zmsk05, zmsk15, zmsksn ! O%, 5% and 15% concentration mask and snow mask 
    5455      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zmsk00l, zmsksnl               ! cat masks 
     
    5859      REAL(wp) ::   zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh  
    5960      !!------------------------------------------------------------------- 
    60  
     61      ! 
    6162      IF( ln_timing )   CALL timing_start('icewri') 
     63 
     64      ! get missing value from xml 
     65      CALL iom_miss_val( "icethic", zmiss_val ) 
    6266 
    6367      ! brine volume 
     
    8589      ! Standard outputs 
    8690      !----------------- 
    87       zrho1 = ( rau0 - rhoi ) * r1_rau0; zrho2 = rhos * r1_rau0 
     91      zrho1 = ( rau0 - rhoi ) * r1_rau0 ; zrho2 = rhos * r1_rau0 
    8892      ! masks 
    89       IF( iom_use('icemask'  ) )   CALL iom_put( "icemask"  , zmsk00              )   ! ice mask 0% 
    90       IF( iom_use('icemask05') )   CALL iom_put( "icemask05", zmsk05              )   ! ice mask 5% 
    91       IF( iom_use('icemask15') )   CALL iom_put( "icemask15", zmsk15              )   ! ice mask 15% 
     93      CALL iom_put( "icemask"  , zmsk00 )   ! ice mask 0% 
     94      CALL iom_put( "icemask05", zmsk05 )   ! ice mask 5% 
     95      CALL iom_put( "icemask15", zmsk15 )   ! ice mask 15% 
     96      CALL iom_put( "icepres"  , zmsk00 )   ! Ice presence (1 or 0)  
    9297      ! 
    9398      ! general fields 
    94       IF( iom_use('icemass'  ) )   CALL iom_put( "icemass", rhoi * vt_i * zmsk00  )   ! Ice mass per cell area  
    95       IF( iom_use('snwmass'  ) )   CALL iom_put( "snwmass", rhos * vt_s * zmsksn  )   ! Snow mass per cell area 
    96       IF( iom_use('icepres'  ) )   CALL iom_put( "icepres", zmsk00                )   ! Ice presence (1 or 0)  
    97       IF( iom_use('iceconc'  ) )   CALL iom_put( "iceconc", at_i  * zmsk00        )   ! ice concentration 
    98       IF( iom_use('icevolu'  ) )   CALL iom_put( "icevolu", vt_i  * zmsk00        )   ! ice volume = mean ice thickness over the cell 
    99       IF( iom_use('icethic'  ) )   CALL iom_put( "icethic", hm_i  * zmsk00        )   ! ice thickness 
    100       IF( iom_use('snwthic'  ) )   CALL iom_put( "snwthic", hm_s  * zmsk00        )   ! snw thickness 
    101       IF( iom_use('icebrv'   ) )   CALL iom_put( "icebrv" , bvm_i * zmsk00 * 100. )   ! brine volume 
    102       IF( iom_use('iceage'   ) )   CALL iom_put( "iceage" , om_i  * zmsk15 / rday )   ! ice age 
    103       IF( iom_use('icehnew'  ) )   CALL iom_put( "icehnew", ht_i_new              )   ! new ice thickness formed in the leads 
    104       IF( iom_use('snwvolu'  ) )   CALL iom_put( "snwvolu", vt_s  * zmsksn        )   ! snow volume 
    105       IF( iom_use('icefrb') ) THEN 
     99      IF( iom_use('icemass' ) )   CALL iom_put( "icemass", rhoi * vt_i * zmsk00  )   ! Ice mass per cell area  
     100      IF( iom_use('snwmass' ) )   CALL iom_put( "snwmass", rhos * vt_s * zmsksn  )   ! Snow mass per cell area 
     101      IF( iom_use('iceconc' ) )   CALL iom_put( "iceconc", at_i  * zmsk00        )   ! ice concentration 
     102      IF( iom_use('icevolu' ) )   CALL iom_put( "icevolu", vt_i  * zmsk00        )   ! ice volume = mean ice thickness over the cell 
     103      IF( iom_use('icethic' ) )   CALL iom_put( "icethic", hm_i  * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! ice thickness 
     104      IF( iom_use('snwthic' ) )   CALL iom_put( "snwthic", hm_s  * zmsk00 + zmiss_val * ( 1._wp - zmsk00 )       )   ! snw thickness 
     105      IF( iom_use('icebrv'  ) )   CALL iom_put( "icebrv" , bvm_i * zmsk00 * 100. )   ! brine volume 
     106      IF( iom_use('iceage'  ) )   CALL iom_put( "iceage" , om_i * zmsk15 / rday + zmiss_val * ( 1._wp - zmsk15 ) )   ! ice age 
     107      IF( iom_use('icehnew' ) )   CALL iom_put( "icehnew", ht_i_new              )   ! new ice thickness formed in the leads 
     108      IF( iom_use('snwvolu' ) )   CALL iom_put( "snwvolu", vt_s  * zmsksn        )   ! snow volume 
     109      IF( iom_use('icefrb'  ) ) THEN 
    106110         z2d(:,:) = ( zrho1 * hm_i(:,:) - zrho2 * hm_s(:,:) )                                          
    107111         WHERE( z2d < 0._wp )   z2d = 0._wp 
    108                                    CALL iom_put( "icefrb" , z2d * zmsk00          )   ! Ice freeboard 
     112                                   CALL iom_put( "icefrb" , z2d * zmsk00 + zmiss_val * ( 1._wp - zmsk00 )          )   ! Ice freeboard 
    109113      ENDIF 
    110114      ! 
    111115      ! melt ponds 
    112       IF( iom_use('iceapnd'  ) )   CALL iom_put( "iceapnd", at_ip  * zmsk00       )   ! melt pond total fraction 
    113       IF( iom_use('icevpnd'  ) )   CALL iom_put( "icevpnd", vt_ip  * zmsk00       )   ! melt pond total volume per unit area 
     116      IF( iom_use('iceapnd' ) )   CALL iom_put( "iceapnd", at_ip  * zmsk00       )   ! melt pond total fraction 
     117      IF( iom_use('icevpnd' ) )   CALL iom_put( "icevpnd", vt_ip  * zmsk00       )   ! melt pond total volume per unit area 
    114118      ! 
    115119      ! salt 
    116       IF( iom_use('icesalt'  ) )   CALL iom_put( "icesalt", sm_i  * zmsk00        )   ! mean ice salinity 
    117       IF( iom_use('icesalm'  ) )   CALL iom_put( "icesalm", SUM( sv_i, DIM = 3 ) * rhoi * 1.0e-3 * zmsk00 )   ! Mass of salt in sea ice per cell area 
     120      IF( iom_use('icesalt' ) )   CALL iom_put( "icesalt", sm_i                 * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! mean ice salinity 
     121      IF( iom_use('icesalm' ) )   CALL iom_put( "icesalm", st_i * rhoi * 1.0e-3 * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! Mass of salt in sea ice per cell area 
    118122 
    119123      ! heat 
    120       IF( iom_use('icetemp'  ) )   CALL iom_put( "icetemp", ( tm_i  - rt0 ) * zmsk00 )   ! ice mean temperature 
    121       IF( iom_use('snwtemp'  ) )   CALL iom_put( "snwtemp", ( tm_s  - rt0 ) * zmsksn )   ! snw mean temperature 
    122       IF( iom_use('icettop'  ) )   CALL iom_put( "icettop", ( tm_su - rt0 ) * zmsk00 )   ! temperature at the ice surface 
    123       IF( iom_use('icetbot'  ) )   CALL iom_put( "icetbot", ( t_bo  - rt0 ) * zmsk00 )   ! temperature at the ice bottom 
    124       IF( iom_use('icetsni'  ) )   CALL iom_put( "icetsni", ( tm_si - rt0 ) * zmsk00 )   ! temperature at the snow-ice interface 
    125       IF( iom_use('icehc'    ) )   CALL iom_put( "icehc"  ,  -et_i          * zmsk00 )   ! ice heat content 
    126       IF( iom_use('snwhc'    ) )   CALL iom_put( "snwhc"  ,  -et_s          * zmsksn )   ! snow heat content 
     124      IF( iom_use('icetemp' ) )   CALL iom_put( "icetemp", ( tm_i  - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! ice mean temperature 
     125      IF( iom_use('snwtemp' ) )   CALL iom_put( "snwtemp", ( tm_s  - rt0 ) * zmsksn + zmiss_val * ( 1._wp - zmsksn ) )   ! snw mean temperature 
     126      IF( iom_use('icettop' ) )   CALL iom_put( "icettop", ( tm_su - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! temperature at the ice surface 
     127      IF( iom_use('icetbot' ) )   CALL iom_put( "icetbot", ( t_bo  - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! temperature at the ice bottom 
     128      IF( iom_use('icetsni' ) )   CALL iom_put( "icetsni", ( tm_si - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! temperature at the snow-ice interface 
     129      IF( iom_use('icehc'   ) )   CALL iom_put( "icehc"  ,  -et_i          * zmsk00 )   ! ice heat content 
     130      IF( iom_use('snwhc'   ) )   CALL iom_put( "snwhc"  ,  -et_s          * zmsksn )   ! snow heat content 
    127131 
    128132      ! momentum 
    129       IF( iom_use('uice'     ) )   CALL iom_put( "uice"   , u_ice                 )   ! ice velocity u component 
    130       IF( iom_use('vice'     ) )   CALL iom_put( "vice"   , v_ice                 )   ! ice velocity v component 
    131       IF( iom_use('utau_ai'  ) )   CALL iom_put( "utau_ai", utau_ice * zmsk00     )   ! Wind stress term in force balance (x) 
    132       IF( iom_use('vtau_ai'  ) )   CALL iom_put( "vtau_ai", vtau_ice * zmsk00     )   ! Wind stress term in force balance (y) 
     133      IF( iom_use('uice'    ) )   CALL iom_put( "uice"   , u_ice     )   ! ice velocity u 
     134      IF( iom_use('vice'    ) )   CALL iom_put( "vice"   , v_ice     )   ! ice velocity v 
     135      IF( iom_use('utau_ai' ) )   CALL iom_put( "utau_ai", utau_ice * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! Wind stress u 
     136      IF( iom_use('vtau_ai' ) )   CALL iom_put( "vtau_ai", vtau_ice * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )   ! Wind stress v 
    133137 
    134138      IF( iom_use('icevel') .OR. iom_use('fasticepres') ) THEN  
     
    136140         DO jj = 2 , jpjm1 
    137141            DO ji = 2 , jpim1 
    138                z2da  = ( u_ice(ji,jj) + u_ice(ji-1,jj) ) 
    139                z2db  = ( v_ice(ji,jj) + v_ice(ji,jj-1) ) 
     142               z2da  = u_ice(ji,jj) + u_ice(ji-1,jj) 
     143               z2db  = v_ice(ji,jj) + v_ice(ji,jj-1) 
    140144               z2d(ji,jj) = 0.5_wp * SQRT( z2da * z2da + z2db * z2db ) 
    141145           END DO 
    142146         END DO 
    143147         CALL lbc_lnk( 'icewri', z2d, 'T', 1. ) 
    144          IF( iom_use('icevel') )   CALL iom_put( "icevel" , z2d ) 
     148         CALL iom_put( "icevel", z2d * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
    145149 
    146150        ! record presence of fast ice 
     
    148152         ELSEWHERE                                                ; zfast(:,:) = 0._wp 
    149153         END WHERE 
    150          IF( iom_use('fasticepres') )   CALL iom_put( "fasticepres" , zfast ) 
     154         CALL iom_put( "fasticepres", zfast ) 
    151155      ENDIF 
    152156 
     
    154158      IF( iom_use('icemask_cat' ) )   CALL iom_put( "icemask_cat" , zmsk00l                                                    )   ! ice mask 0% 
    155159      IF( iom_use('iceconc_cat' ) )   CALL iom_put( "iceconc_cat" , a_i * zmsk00l                                              )   ! area for categories 
    156       IF( iom_use('icethic_cat' ) )   CALL iom_put( "icethic_cat" , h_i * zmsk00l                                              )   ! thickness for categories 
    157       IF( iom_use('snwthic_cat' ) )   CALL iom_put( "snwthic_cat" , h_s * zmsksnl                                              )   ! snow depth for categories 
    158       IF( iom_use('icesalt_cat' ) )   CALL iom_put( "icesalt_cat" , s_i * zmsk00l                                              )   ! salinity for categories 
    159       IF( iom_use('iceage_cat'  ) )   CALL iom_put( "iceage_cat"  , o_i * zmsk00l / rday                                       )   ! ice age 
    160       IF( iom_use('icetemp_cat' ) )   CALL iom_put( "icetemp_cat" , ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zmsk00l )   ! ice temperature 
    161       IF( iom_use('snwtemp_cat' ) )   CALL iom_put( "snwtemp_cat" , ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zmsksnl )   ! snow temperature 
    162       IF( iom_use('icettop_cat' ) )   CALL iom_put( "icettop_cat" , ( t_su - rt0 ) * zmsk00l                                   )   ! surface temperature 
     160      IF( iom_use('icethic_cat' ) )   CALL iom_put( "icethic_cat" , h_i * zmsk00l + zmiss_val * ( 1._wp - zmsk00l )            )   ! thickness for categories 
     161      IF( iom_use('snwthic_cat' ) )   CALL iom_put( "snwthic_cat" , h_s * zmsksnl + zmiss_val * ( 1._wp - zmsksnl )            )   ! snow depth for categories 
     162      IF( iom_use('icesalt_cat' ) )   CALL iom_put( "icesalt_cat" , s_i * zmsk00l + zmiss_val * ( 1._wp - zmsk00l )            )   ! salinity for categories 
     163      IF( iom_use('iceage_cat'  ) )   CALL iom_put( "iceage_cat"  , o_i * zmsk00l / rday + zmiss_val * ( 1._wp - zmsk00l )     )   ! ice age 
     164      IF( iom_use('icetemp_cat' ) )   CALL iom_put( "icetemp_cat" , ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zmsk00l & 
     165         &                                                          + zmiss_val * ( 1._wp - zmsk00l ) )                            ! ice temperature 
     166      IF( iom_use('snwtemp_cat' ) )   CALL iom_put( "snwtemp_cat" , ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zmsksnl & 
     167         &                                                          + zmiss_val * ( 1._wp - zmsksnl ) )                            ! snow temperature 
     168      IF( iom_use('icettop_cat' ) )   CALL iom_put( "icettop_cat" , ( t_su - rt0 ) * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) )   ! surface temperature 
    163169      IF( iom_use('icebrv_cat'  ) )   CALL iom_put( "icebrv_cat"  ,   bv_i * 100.  * zmsk00l                                   )   ! brine volume 
    164170      IF( iom_use('iceapnd_cat' ) )   CALL iom_put( "iceapnd_cat" ,   a_ip         * zmsk00l                                   )   ! melt pond frac for categories 
    165       IF( iom_use('icehpnd_cat' ) )   CALL iom_put( "icehpnd_cat" ,   h_ip         * zmsk00l                                   )   ! melt pond frac for categories 
     171      IF( iom_use('icehpnd_cat' ) )   CALL iom_put( "icehpnd_cat" ,   h_ip         * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) )   ! melt pond frac for categories 
    166172      IF( iom_use('iceafpnd_cat') )   CALL iom_put( "iceafpnd_cat",   a_ip_frac    * zmsk00l                                   )   ! melt pond frac for categories 
    167173 
     
    184190      IF( iom_use('dmsmel') )   CALL iom_put( "dmsmel", - wfx_snw_sum                       )   ! Snow mass change through melt 
    185191      IF( iom_use('dmsdyn') )   CALL iom_put( "dmsdyn", - wfx_snw_dyn + rhos * diag_trp_vs  )   ! Snow mass change through dynamics(kg/m2/s) 
    186  
     192       
    187193      ! Global ice diagnostics 
    188       IF( iom_use('NH_icearea') .OR. iom_use('NH_icevolu') .OR. iom_use('NH_iceextt') )   THEN   ! NH diagnostics 
    189          ! 
    190          WHERE( ff_t > 0._wp )   ;   zmsk00(:,:) = 1.0e-12 
    191          ELSEWHERE               ;   zmsk00(:,:) = 0. 
    192          END WHERE  
    193          zdiag_area_nh = glob_sum( 'icewri', at_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 
    194          zdiag_volu_nh = glob_sum( 'icewri', vt_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 
    195          ! 
    196          WHERE( ff_t > 0._wp .AND. at_i > 0.15 )   ; zmsk00(:,:) = 1.0e-12 
    197          ELSEWHERE                                 ; zmsk00(:,:) = 0. 
    198          END WHERE  
    199          zdiag_extt_nh = glob_sum( 'icewri', zmsk00(:,:) * e1e2t(:,:) ) 
    200          ! 
    201          IF( iom_use('NH_icearea') )   CALL iom_put( "NH_icearea" ,  zdiag_area_nh ) 
    202          IF( iom_use('NH_icevolu') )   CALL iom_put( "NH_icevolu" ,  zdiag_volu_nh ) 
    203          IF( iom_use('NH_iceextt') )   CALL iom_put( "NH_iceextt" ,  zdiag_extt_nh ) 
     194      IF(  iom_use('NH_icearea') .OR. iom_use('NH_icevolu') .OR. iom_use('NH_iceextt') .OR. & 
     195         & iom_use('SH_icearea') .OR. iom_use('SH_icevolu') .OR. iom_use('SH_iceextt') ) THEN 
     196         ! 
     197         WHERE( ff_t(:,:) > 0._wp )   ;   z2d(:,:) = 1._wp 
     198         ELSEWHERE                    ;   z2d(:,:) = 0. 
     199         END WHERE 
     200         ! 
     201         IF( iom_use('NH_icearea') )   zdiag_area_nh = glob_sum( 'icewri', at_i *           z2d   * e1e2t * 1.e-12 ) 
     202         IF( iom_use('NH_icevolu') )   zdiag_volu_nh = glob_sum( 'icewri', vt_i *           z2d   * e1e2t * 1.e-12 ) 
     203         IF( iom_use('NH_iceextt') )   zdiag_extt_nh = glob_sum( 'icewri',                  z2d   * e1e2t * 1.e-12 * zmsk15 ) 
     204         ! 
     205         IF( iom_use('SH_icearea') )   zdiag_area_sh = glob_sum( 'icewri', at_i * ( 1._wp - z2d ) * e1e2t * 1.e-12 ) 
     206         IF( iom_use('SH_icevolu') )   zdiag_volu_sh = glob_sum( 'icewri', vt_i * ( 1._wp - z2d ) * e1e2t * 1.e-12 ) 
     207         IF( iom_use('SH_iceextt') )   zdiag_extt_sh = glob_sum( 'icewri',        ( 1._wp - z2d ) * e1e2t * 1.e-12 * zmsk15 ) 
     208         ! 
     209         CALL iom_put( "NH_icearea" , zdiag_area_nh ) 
     210         CALL iom_put( "NH_icevolu" , zdiag_volu_nh ) 
     211         CALL iom_put( "NH_iceextt" , zdiag_extt_nh ) 
     212         CALL iom_put( "SH_icearea" , zdiag_area_sh ) 
     213         CALL iom_put( "SH_icevolu" , zdiag_volu_sh ) 
     214         CALL iom_put( "SH_iceextt" , zdiag_extt_sh ) 
    204215         ! 
    205216      ENDIF 
    206       ! 
    207       IF( iom_use('SH_icearea') .OR. iom_use('SH_icevolu') .OR. iom_use('SH_iceextt') )   THEN   ! SH diagnostics 
    208          ! 
    209          WHERE( ff_t < 0._wp ); zmsk00(:,:) = 1.0e-12;  
    210          ELSEWHERE            ; zmsk00(:,:) = 0. 
    211          END WHERE  
    212          zdiag_area_sh = glob_sum( 'icewri', at_i(:,:) * zmsk00(:,:) * e1e2t(:,:) )  
    213          zdiag_volu_sh = glob_sum( 'icewri', vt_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 
    214          ! 
    215          WHERE( ff_t < 0._wp .AND. at_i > 0.15 ); zmsk00(:,:) = 1.0e-12 
    216          ELSEWHERE                              ; zmsk00(:,:) = 0. 
    217          END WHERE  
    218          zdiag_extt_sh = glob_sum( 'icewri', zmsk00(:,:) * e1e2t(:,:) ) 
    219          ! 
    220          IF( iom_use('SH_icearea') ) CALL iom_put( "SH_icearea", zdiag_area_sh ) 
    221          IF( iom_use('SH_icevolu') ) CALL iom_put( "SH_icevolu", zdiag_volu_sh ) 
    222          IF( iom_use('SH_iceextt') ) CALL iom_put( "SH_iceextt", zdiag_extt_sh ) 
    223          ! 
    224       ENDIF  
    225217      ! 
    226218!!CR      !     !  Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s 
    227219!!CR      !     IF( kindic < 0 )   CALL ice_wri_state( 'output.abort' ) 
    228220!!CR      !     not yet implemented 
    229 !!gm  idem for the ocean...  Ask Seb how to get read of ioipsl.... 
     221!!gm  idem for the ocean...  Ask Seb how to get rid of ioipsl.... 
    230222      ! 
    231223      IF( ln_timing )  CALL timing_stop('icewri') 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/IOM/iom.F90

    r11223 r11362  
    5858   PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get 
    5959   PUBLIC iom_chkatt, iom_getatt, iom_putatt, iom_getszuld, iom_rstput, iom_delay_rst, iom_put 
    60    PUBLIC iom_use, iom_context_finalize 
     60   PUBLIC iom_use, iom_context_finalize, iom_miss_val 
    6161 
    6262   PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 
     
    16711671      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    16721672      REAL(wp)        , INTENT(in) ::   pfield0d 
    1673       REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson 
     1673!!      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson 
    16741674#if defined key_iomput 
    1675       zz(:,:)=pfield0d 
    1676       CALL xios_send_field(cdname, zz) 
    1677       !CALL xios_send_field(cdname, (/pfield0d/))  
     1675!!clem      zz(:,:)=pfield0d 
     1676!!clem      CALL xios_send_field(cdname, zz) 
     1677      CALL xios_send_field(cdname, (/pfield0d/))  
    16781678#else 
    16791679      IF( .FALSE. )   WRITE(numout,*) cdname, pfield0d   ! useless test to avoid compilation warnings 
     
    23912391   !!   NOT 'key_iomput'                               a few dummy routines 
    23922392   !!---------------------------------------------------------------------- 
    2393  
    23942393   SUBROUTINE iom_setkt( kt, cdname ) 
    23952394      INTEGER         , INTENT(in)::   kt  
     
    24062405 
    24072406   LOGICAL FUNCTION iom_use( cdname ) 
    2408       !!---------------------------------------------------------------------- 
    2409       !!---------------------------------------------------------------------- 
    24102407      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    2411       !!---------------------------------------------------------------------- 
    24122408#if defined key_iomput 
    24132409      iom_use = xios_field_is_active( cdname ) 
     
    24162412#endif 
    24172413   END FUNCTION iom_use 
    2418     
     2414 
     2415   SUBROUTINE iom_miss_val( cdname, pmiss_val ) 
     2416      CHARACTER(LEN=*), INTENT(in ) ::   cdname 
     2417      REAL(wp)        , INTENT(out) ::   pmiss_val    
     2418#if defined key_iomput 
     2419      ! get missing value 
     2420      CALL xios_get_field_attr( cdname, default_value = pmiss_val ) 
     2421#else 
     2422      IF( .FALSE. )   WRITE(numout,*) cdname, pmiss_val   ! useless test to avoid compilation warnings 
     2423#endif 
     2424   END SUBROUTINE iom_miss_val 
     2425   
    24192426   !!====================================================================== 
    24202427END MODULE iom 
Note: See TracChangeset for help on using the changeset viewer.