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

Changeset 15783


Ignore:
Timestamp:
2022-04-21T11:28:54+02:00 (2 years ago)
Author:
jmedwards01
Message:

Merged in NEMO_4.0.4_CO9_package@15521.

Location:
NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl
Files:
31 edited
2 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml

    r13648 r15783  
    2828       <field field_ref="iceapnd"          name="siapnd" /> 
    2929       <field field_ref="icevpnd"          name="sivpnd" /> 
    30        <field field_ref="sst_m"            name="sst_m"  /> 
    31        <field field_ref="sss_m"            name="sss_m"  /> 
    32         
     30       <field field_ref="sst_m_pot"        name="sst_m_pot"  /> 
     31       <field field_ref="sss_m_abs"        name="sss_m_abs"  /> 
     32 
    3333       <!-- heat --> 
    3434       <field field_ref="icetemp"          name="sitemp" /> 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml

    r12276 r15783  
    1414        <file id="file11" name_suffix="_grid_T" description="ocean T grid variables" > 
    1515          <field field_ref="e3t"      /> 
    16           <field field_ref="toce"         name="thetao"                                                                      operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 
    17           <field field_ref="soce"         name="so"                                                                          operation="instant" freq_op="5d" > @soce_e3t / @e3t </field> 
    18           <field field_ref="sst"          name="tos"   /> 
    19           <field field_ref="sss"          name="sos"   /> 
     16          <field field_ref="toce_con"         name="thetao_con"                                                                      operation="instant" freq_op="5d" > @toce_con_e3t / @e3t </field> 
     17          <field field_ref="soce_abs"         name="so_abs"                                                                          operation="instant" freq_op="5d" > @soce_abs_e3t / @e3t </field> 
     18          <field field_ref="sst_con"          name="tos_con"   /> 
     19          <field field_ref="sss_abs"          name="sos_abs"   /> 
    2020          <field field_ref="ssh"          name="zos"   /> 
    21           <field field_ref="sst"          name="tosstd"       long_name="sea surface temperature standard deviation"         operation="instant" freq_op="5d" > sqrt( @sst2 - @sst * @sst ) </field> 
     21          <field field_ref="sst_con"          name="tosstd_con"       long_name="sea surface temperature standard deviation"         operation="instant" freq_op="5d" > sqrt( @sst2_con - @sst_con * @sst_con ) </field> 
    2222          <field field_ref="ssh"          name="zosstd"       long_name="sea surface height above geoid standard deviation"  operation="instant" freq_op="5d" > sqrt( @ssh2 - @ssh * @ssh ) </field> 
    23           <field field_ref="sst"          name="sstdcy"       long_name="amplitude of sst diurnal cycle"                     operation="average" freq_op="1d" > @sstmax - @sstmin </field> 
     23          <field field_ref="sst_con"          name="sstdcy_con"       long_name="amplitude of sst diurnal cycle"                     operation="average" freq_op="1d" > @sstmax_con - @sstmin_con </field> 
    2424          <field field_ref="mldkz5"   /> 
    2525          <field field_ref="mldr10_1" /> 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/SHARED/domain_def_nemo.xml

    r12276 r15783  
    181181     <domain id="EqW" domain_ref="grid_W" > <zoom_domain id="EqW"/> </domain> 
    182182 
    183               <!--   zonal mean grid   --> 
    184      <domain_group id="gznl"> 
    185         <domain id="gznl" long_name="gznl"/> 
    186         <domain id="ptr" domain_ref="gznl" >  
    187             <zoom_domain id="ptr" ibegin="0000" jbegin="0" ni="1" nj="0000" />  
    188         </domain> 
    189       </domain_group> 
     183      
     184     <!--   zonal mean grid   --> 
     185     <domain id="gznl" long_name="gznl"/> 
     186     <domain id="ptr" domain_ref="gznl" > 
     187    <zoom_domain id="ptr" ibegin="0000" jbegin="0" ni="1" nj="0000" /> 
     188     </domain>   
     189     <domain id="znl_T" domain_ref="gznl" > <zoom_domain id="znl_T"/> </domain> 
     190     <domain id="znl_W" domain_ref="gznl" > <zoom_domain id="znl_W"/> </domain> 
    190191 
    191192      
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/SHARED/field_def_nemo-ice.xml

    r13648 r15783  
    169169 
    170170     <!-- sbcssm variables --> 
    171           <field id="sst_m"    unit="degC" /> 
    172           <field id="sss_m"    unit="psu"  /> 
     171          <field id="sst_m_pot"    unit="degC" /> 
     172     <!-- EOS-80 --> 
     173          <field id="sss_m_pra"    unit="psu"  /> 
     174          <!-- TEOS-10 --> 
     175          <field id="sss_m_abs"    unit="psu"  /> 
     176 
    173177          <field id="ssu_m"    unit="m/s"  /> 
    174178          <field id="ssv_m"    unit="m/s"  /> 
     
    218222          <field id="dmisum"       long_name="sea-ice mass change through surface melting"             standard_name="tendency_of_sea_ice_amount_due_to_surface_melting"                       unit="kg/m2/s" /> 
    219223          <field id="dmibom"       long_name="sea-ice mass change through bottom melting"              standard_name="tendency_of_sea_ice_amount_due_to_basal_melting"                         unit="kg/m2/s" /> 
    220           <field id="dmilam"       long_name="sea-ice mass change through lateral melting"             standard_name="tendency_of_sea_ice_amount_due_to_lateral_melting"                       unit="kg/m2/s" /> 
     224     <field id="dmilam"       long_name="sea-ice mass change through lateral melting"             standard_name="tendency_of_sea_ice_amount_due_to_lateral_melting"                       unit="kg/m2/s" /> 
    221225          <field id="dmsspr"       long_name="snow mass change through snow fall"                      standard_name="snowfall_flux"                                                           unit="kg/m2/s" /> 
    222226          <field id="dmsmel"       long_name="snow mass change through melt"                           standard_name="surface_snow_melt_flux"                                                  unit="kg/m2/s" /> 
     
    250254         <field id="xmtrpice_ave"     long_name="Monthly average of x-ice mass transport"   field_ref="xmtrpice"          grid_ref="grid_U_2D"        freq_op="1mo" freq_offset="_reset_"  > @xmtrpice </field> 
    251255         <field id="xmtrpice_section"                                                                                     grid_ref="grid_U_scalar"  > xmtrpice_ave </field> 
    252          <field id="xmtrpice_strait"                                                        field_ref="xmtrpice_section"  grid_ref="grid_U_4strait_ice"  /> 
    253          <field id="xstrait_mifl"                                                           field_ref="xmtrpice_strait"   grid_ref="grid_U_4strait_ice_hsum" unit="kg/s" detect_missing_value="true" > this * maskMFO_u_ice </field> 
    254256 
    255257         <field id="ymtrpice_ave"     long_name="Monthly average of y-ice mass transport"   field_ref="ymtrpice"          grid_ref="grid_V_2D"        freq_op="1mo" freq_offset="_reset_"  > @ymtrpice </field> 
    256258         <field id="ymtrpice_section"                                                                                     grid_ref="grid_V_scalar"  > ymtrpice_ave </field> 
    257          <field id="ymtrpice_strait"                                                        field_ref="ymtrpice_section"  grid_ref="grid_V_4strait_ice"  /> 
    258     <field id="ystrait_mifl"                                                           field_ref="ymtrpice_strait"   grid_ref="grid_V_4strait_ice_hsum" unit="kg/s" detect_missing_value="true"  > this * maskMFO_v_ice </field> 
    259259 
    260260         <field id="xmtrpsnw_ave"     long_name="Monthly average of x-snow mass transport"  field_ref="xmtrpsnw"          grid_ref="grid_U_2D"        freq_op="1mo" freq_offset="_reset_"  > @xmtrpsnw </field> 
    261261         <field id="xmtrpsnw_section"                                                                                     grid_ref="grid_U_scalar"  > xmtrpsnw_ave </field> 
    262          <field id="xmtrpsnw_strait"                                                        field_ref="xmtrpsnw_section"  grid_ref="grid_U_4strait_ice"  /> 
    263          <field id="xstrait_msfl"                                                           field_ref="xmtrpsnw_strait"   grid_ref="grid_U_4strait_ice_hsum" unit="kg/s" detect_missing_value="true" > this * maskMFO_u_ice </field> 
    264262 
    265263         <field id="ymtrpsnw_ave"     long_name="Monthly average of y-snow mass transport"  field_ref="ymtrpsnw"          grid_ref="grid_V_2D"        freq_op="1mo" freq_offset="_reset_"  > @ymtrpsnw </field> 
    266264         <field id="ymtrpsnw_section"                                                                                     grid_ref="grid_V_scalar"  > ymtrpsnw_ave </field> 
    267          <field id="ymtrpsnw_strait"                                                        field_ref="ymtrpsnw_section"  grid_ref="grid_V_4strait_ice"  /> 
    268     <field id="ystrait_msfl"                                                           field_ref="ymtrpsnw_strait"   grid_ref="grid_V_4strait_ice_hsum" unit="kg/s" detect_missing_value="true"  > this * maskMFO_v_ice </field> 
    269265 
    270266         <field id="xatrp_ave"        long_name="Monthly average of x-ice area transport"   field_ref="xatrp"             grid_ref="grid_U_2D"        freq_op="1mo" freq_offset="_reset_"  > @xatrp </field> 
    271267         <field id="xatrp_section"                                                                                        grid_ref="grid_U_scalar"  > xatrp_ave </field> 
    272          <field id="xatrp_strait"                                                           field_ref="xatrp_section"     grid_ref="grid_U_4strait_ice"  /> 
    273          <field id="xstrait_arfl"                                                           field_ref="xatrp_strait"      grid_ref="grid_U_4strait_ice_hsum" unit="kg/s" detect_missing_value="true" > this * maskMFO_u_ice </field> 
    274268 
    275269         <field id="yatrp_ave"        long_name="Monthly average of y-ice area transport"   field_ref="yatrp"             grid_ref="grid_V_2D"        freq_op="1mo" freq_offset="_reset_"  > @yatrp </field> 
    276270         <field id="yatrp_section"                                                                                        grid_ref="grid_V_scalar"  > yatrp_ave </field> 
    277          <field id="yatrp_strait"                                                           field_ref="yatrp_section"     grid_ref="grid_V_4strait_ice"  /> 
    278     <field id="ystrait_arfl"                                                           field_ref="yatrp_strait"      grid_ref="grid_V_4strait_ice_hsum" unit="m2/s" detect_missing_value="true"  > this * maskMFO_v_ice </field> 
    279  
    280          <field id="strait_mifl"      long_name="Sea ice mass flux through straits"      standard_name="sea_ice_mass_transport_across_line"   unit="kg/s"  freq_op="1mo"  grid_ref="grid_4strait_ice" > xstrait_mifl + ystrait_mifl </field> 
    281          <field id="strait_msfl"      long_name="Snow mass flux through straits"         standard_name="snow_mass_transport_across_line"      unit="kg/s"  freq_op="1mo"  grid_ref="grid_4strait_ice" > xstrait_msfl + ystrait_msfl </field> 
    282     <field id="strait_arfl"      long_name="Sea ice area flux through straits"      standard_name="sea_area_mass_transport_across_line"  unit="m2/s"  freq_op="1mo"  grid_ref="grid_4strait_ice" > xstrait_arfl + ystrait_arfl </field> 
     271 
    283272 
    284273   </field_group> <!-- SBC_2D --> 
     
    376365     <field field_ref="icevpnd"          name="sivpnd" /> 
    377366          <field field_ref="iceage"           name="siage"  /> 
    378      <field field_ref="sst_m"            name="sst_m"  /> 
    379      <field field_ref="sss_m"            name="sss_m"  /> 
     367     <field id="sst_m_pot"    unit="degC" /> 
     368     <!-- EOS-80 --> 
     369     <field id="sss_m_pra"    unit="psu"  /> 
     370     <!-- TEOS-10 --> 
     371          <field id="sss_m_abs"    unit="psu"  /> 
    380372      
    381373     <!-- heat --> 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/SHARED/field_def_nemo-oce.xml

    r13648 r15783  
    1919       
    2020      <field_group id="grid_T" grid_ref="grid_T_2D" > 
    21         <field id="e3t"          long_name="T-cell thickness"                    standard_name="cell_thickness"        unit="m"   grid_ref="grid_T_3D" /> 
    22         <field id="e3ts"         long_name="T-cell thickness"   field_ref="e3t"  standard_name="cell_thickness"        unit="m"   grid_ref="grid_T_SFC"/> 
    23         <field id="e3t_0"        long_name="Initial T-cell thickness"            standard_name="ref_cell_thickness"    unit="m"   grid_ref="grid_T_3D" /> 
    24         <field id="e3tb"         long_name="bottom T-cell thickness"             standard_name="bottom_cell_thickness" unit="m"   grid_ref="grid_T_2D"/>  
     21        <field id="e3t"          long_name="T-cell thickness"                    standard_name="cell_thickness"     unit="m"   grid_ref="grid_T_3D" /> 
     22        <field id="e3t_surf"     long_name="T-cell thickness"   field_ref="e3t"  standard_name="cell_thickness"     unit="m"   grid_ref="grid_T_surface_extract"/> 
     23        <field id="e3t_0"        long_name="Initial T-cell thickness"            standard_name="ref_cell_thickness" unit="m"   grid_ref="grid_T_3D" /> 
     24        <field id="e3tb"         long_name="bottom T-cell thickness"             standard_name="bottom_cell_thickness" unit="m"   grid_ref="grid_T_2D"/> 
    2525        <field id="e3t_300"      field_ref="e3t"                grid_ref="grid_T_zoom_300"       detect_missing_value="true" /> 
    26         <field id="e3t_vsum300"  field_ref="e3t_300"            grid_ref="grid_T_vsum"   detect_missing_value="true" /> 
     26   <field id="e3t_vsum300"  field_ref="e3t_300"            grid_ref="grid_T_vsum"   detect_missing_value="true" /> 
    2727   <field id="masscello"    long_name="Sea Water Mass per unit area"   standard_name="sea_water_mass_per_unit_area"   unit="kg/m2"   grid_ref="grid_T_3D"/> 
    28         <field id="volcello"     long_name="Ocean Volume"                   standard_name="ocean_volume"   unit="m3"       grid_ref="grid_T_3D"/>  
    29         <field id="toce"         long_name="temperature"                         standard_name="sea_water_potential_temperature"   unit="degC"     grid_ref="grid_T_3D"/> 
    30         <field id="toce_e3t"     long_name="temperature (thickness weighted)"                                                      unit="degC"     grid_ref="grid_T_3D" > toce * e3t </field > 
    31         <field id="soce"         long_name="salinity"                            standard_name="sea_water_practical_salinity"      unit="1e-3"     grid_ref="grid_T_3D"/> 
    32         <field id="soce_e3t"     long_name="salinity    (thickness weighted)"                                                      unit="1e-3"     grid_ref="grid_T_3D" > soce * e3t </field > 
     28        <field id="volcello"     long_name="Ocean Volume"                   standard_name="ocean_volume"   unit="m3"       grid_ref="grid_T_3D"/> 
     29 
     30        <!-- EOS80 --> 
     31        <field id="toce_pot"         long_name="potential temperature"           standard_name="sea_water_potential_temperature"      unit="degC"     grid_ref="grid_T_3D"/> 
     32        <field id="toce_pot_e3t"     long_name="potential temperature (thickness weighted)"                                           unit="degC"     grid_ref="grid_T_3D" > toce_pot * e3t </field > 
     33        <field id="soce_pra"         long_name="practical salinity"              standard_name="sea_water_practical_salinity"      unit="1e-3"     grid_ref="grid_T_3D"/> 
     34        <field id="soce_pra_e3t"     long_name="practical salinity    (thickness weighted)"                                        unit="1e-3"     grid_ref="grid_T_3D" > soce_pra * e3t </field > 
     35        <!-- TEOS10 --> 
     36        <field id="toce_con"         long_name="conservative temperature"        standard_name="sea_water_conservative_temperature"   unit="degC"     grid_ref="grid_T_3D"/> 
     37        <field id="toce_con_e3t"     long_name="conservative temperature (thickness weighted)"                                        unit="degC"     grid_ref="grid_T_3D" > toce_con * e3t </field >   
     38        <field id="soce_abs"         long_name="absolute salinity"               standard_name="sea_water_absolute_salinity"       unit="1e-3"     grid_ref="grid_T_3D"/> 
     39        <field id="soce_abs_e3t"     long_name="absolute salinity    (thickness weighted)"                                         unit="1e-3"     grid_ref="grid_T_3D" > soce_abs * e3t </field > 
    3340 
    3441        <field id="toce_e3t_300"      field_ref="toce_e3t"          unit="degree_C"     grid_ref="grid_T_zoom_300"      detect_missing_value="true" /> 
     
    4956   <field id="ahmt_3d"      long_name=" 3D      t-eddy viscosity coefficient"   unit="m2/s or m4/s"  grid_ref="grid_T_3D"/> 
    5057 
    51         <field id="sst"          long_name="sea surface temperature"                            standard_name="sea_surface_temperature"             unit="degC"     /> 
    52         <field id="sst2"         long_name="square of sea surface temperature"                  standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst * sst </field > 
    53         <field id="sstmax"       long_name="max of sea surface temperature"   field_ref="sst"   operation="maximum"                                                 /> 
    54         <field id="sstmin"       long_name="min of sea surface temperature"   field_ref="sst"   operation="minimum"                                                 /> 
    55         <field id="sstgrad"      long_name="module of sst gradient"                                                                                 unit="degC/m"   /> 
    56         <field id="sstgrad2"     long_name="square of module of sst gradient"                                                                       unit="degC2/m2" /> 
    57         <field id="sbt"          long_name="sea bottom temperature"                                                                                 unit="degC"     /> 
    58         <field id="tosmint"      long_name="vertical integral of temperature times density"     standard_name="integral_wrt_depth_of_product_of_density_and_potential_temperature"  unit="(kg m2) degree_C" /> 
    59         <field id="sst_wl"       long_name="Delta SST of warm layer"                                                                                unit="degC"     /> 
    60         <field id="sst_cs"       long_name="Delta SST of cool skin"                                                                                 unit="degC"     /> 
    61    <field id="temp_3m"      long_name="temperature at 3m"                                                                                      unit="degC"     /> 
    62          
    63         <field id="sss"          long_name="sea surface salinity"                               standard_name="sea_surface_salinity"                unit="1e-3"     /> 
    64         <field id="sss2"         long_name="square of sea surface salinity"                                                                         unit="1e-6"      > sss * sss </field > 
    65         <field id="sssmax"       long_name="max of sea surface salinity"      field_ref="sss"   operation="maximum"                                                 /> 
    66         <field id="sssmin"       long_name="min of sea surface salinity"      field_ref="sss"   operation="minimum"                                                 /> 
    67         <field id="sbs"          long_name="sea bottom salinity"                                                                                    unit="0.001"    /> 
    68         <field id="somint"       long_name="vertical integral of salinity times density"        standard_name="integral_wrt_depth_of_product_of_density_and_salinity"  unit="(kg m2) x (1e-3)" />  
     58        <!-- EOS80 --> 
     59        <field id="sst_pot"          long_name="sea surface potential temperature"                            standard_name="sea_surface_temperature"             unit="degC"     /> 
     60        <field id="sst2_pot"         long_name="square of sea surface potential temperature"                  standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst_pot * sst_pot </field > 
     61        <field id="sstmax_pot"       long_name="max of sea surface potential temperature"   field_ref="sst_pot"   operation="maximum"                                                 /> 
     62        <field id="sstmin_pot"       long_name="min of sea surface potential temperature"   field_ref="sst_pot"   operation="minimum"                                                 /> 
     63        <field id="sstgrad_pot"      long_name="module of potential sst gradient"                                                                                 unit="degC/m"   /> 
     64        <field id="sstgrad2_pot"     long_name="square of module of potential sst gradient"                                                                       unit="degC2/m2" /> 
     65        <field id="sbt_pot"          long_name="sea bottom potential temperature"                                                                                 unit="degC"     /> 
     66        <field id="tosmint_pot"      long_name="vertical integral of potential temperature times density"     standard_name="integral_wrt_depth_of_product_of_density_and_potential_temperature"  unit="(kg m2) degree_C" /> 
     67        <field id="sst_wl_pot"       long_name="Delta potential SST of warm layer"                                                                                unit="degC"     /> 
     68        <field id="sst_cs_pot"       long_name="Delta potential SST of cool skin"                                                                                 unit="degC"     /> 
     69   <field id="temp_3m_pot"      long_name="potential temperature at 3m"                                                                                      unit="degC"     /> 
     70 
     71        <field id="sss_pra"          long_name="sea surface practical salinity"                               standard_name="sea_surface_practical_salinity"                unit="1e-3"     /> 
     72        <field id="sss2_pra"         long_name="square of sea surface practical salinity"                                                                         unit="1e-6"      > sss_pra * sss_pra </field > 
     73        <field id="sssmax_pra"       long_name="max of sea surface practical salinity"      field_ref="sss_pra"   operation="maximum"                                                 /> 
     74        <field id="sssmin_pra"       long_name="min of sea surface practical salinity"      field_ref="sss_pra"   operation="minimum"                                                 /> 
     75        <field id="sbs_pra"          long_name="sea bottom practical salinity"                                                                                    unit="0.001"    /> 
     76        <field id="somint_pra"       long_name="vertical integral of practical salinity times density"        standard_name="integral_wrt_depth_of_product_of_density_and_practical_salinity"  unit="(kg m2) x (1e-3)" />  
     77        <!-- TEOS10 --> 
     78        <field id="sst_con"          long_name="sea surface conservative temperature"                            standard_name="sea_surface_conservative_temperature"             unit="degC"     /> 
     79        <field id="sst2_con"         long_name="square of sea surface conservative temperature"                  standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst_con * sst_con </field > 
     80        <field id="sstmax_con"       long_name="max of sea surface conservative temperature"   field_ref="sst_con"   operation="maximum"                                                 /> 
     81        <field id="sstmin_con"       long_name="min of sea surface conservative temperature"   field_ref="sst_con"   operation="minimum"                                                 /> 
     82        <field id="sstgrad_con"      long_name="module of conservative sst gradient"                                                                                 unit="degC/m"   /> 
     83        <field id="sstgrad2_con"     long_name="square of module of conservative sst gradient"                                                                       unit="degC2/m2" /> 
     84        <field id="sbt_con"          long_name="sea bottom conservative temperature"                                                                                 unit="degC"     /> 
     85        <field id="tosmint_con"      long_name="vertical integral of conservative temperature times density"     standard_name="integral_wrt_depth_of_product_of_density_and_conservative_temperature"  unit="(kg m2) degree_C" /> 
     86        <field id="sst_wl_con"       long_name="Delta conservative SST of warm layer"                                                                                unit="degC"     /> 
     87        <field id="sst_cs_con"       long_name="Delta conservative SST of cool skin"                                                                                 unit="degC"     /> 
     88   <field id="temp_3m_con"      long_name="conservative temperature at 3m"                                                                                      unit="degC"     /> 
     89 
     90        <field id="sss_abs"          long_name="sea surface absolute salinity"                               standard_name="sea_surface_absolute_salinity"                unit="1e-3"     /> 
     91        <field id="sss2_abs"         long_name="square of sea surface absolute salinity"                                                                         unit="1e-6"      > sss_abs * sss_abs </field > 
     92        <field id="sssmax_abs"       long_name="max of sea surface absolute salinity"      field_ref="sss_abs"   operation="maximum"                                                 /> 
     93        <field id="sssmin_abs"       long_name="min of sea surface absolute salinity"      field_ref="sss_abs"   operation="minimum"                                                 /> 
     94        <field id="sbs_abs"          long_name="sea bottom absolute salinity"                                                                                    unit="0.001"    /> 
     95        <field id="somint_abs"       long_name="vertical integral of absolute salinity times density"        standard_name="integral_wrt_depth_of_product_of_density_and_absolute_salinity"  unit="(kg m2) x (1e-3)" /> 
    6996 
    7097        <field id="taubot"       long_name="bottom stress module"                                                                                   unit="N/m2"     />  
     
    85112        <field id="mldr10_1max"  long_name="Max of Mixed Layer Depth (dsigma = 0.01 wrt 10m)"   field_ref="mldr10_1"   operation="maximum"                                                                          /> 
    86113        <field id="mldr10_1min"  long_name="Min of Mixed Layer Depth (dsigma = 0.01 wrt 10m)"   field_ref="mldr10_1"   operation="minimum"                                                                          /> 
     114         <field id="mldzint_1"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          /> 
     115         <field id="mldzint_2"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          /> 
     116         <field id="mldzint_3"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          /> 
     117         <field id="mldzint_4"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          /> 
     118         <field id="mldzint_5"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          /> 
     119         <field id="mldhtc_1"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       /> 
     120         <field id="mldhtc_2"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       /> 
     121         <field id="mldhtc_3"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       /> 
     122         <field id="mldhtc_4"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       /> 
     123         <field id="mldhtc_5"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       /> 
    87124        <field id="heatc"        long_name="Heat content vertically integrated"                 standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       /> 
    88125        <field id="saltc"        long_name="Salt content vertically integrated"                                                                                                                   unit="1e-3*kg/m2" /> 
     
    360397      
    361398     <!-- sbcssm variables --> 
    362           <field id="sst_m"    unit="degC" /> 
    363           <field id="sss_m"    unit="psu"  /> 
     399          <field id="sst_m_pot"    unit="degC" /> 
     400     <!-- EOS-80 --> 
     401          <field id="sss_m_pra"    unit="psu"  /> 
     402          <!-- TEOS-10 --> 
     403          <field id="sss_m_abs"    unit="psu"  /> 
     404 
    364405          <field id="ssu_m"    unit="m/s"  /> 
    365406          <field id="ssv_m"    unit="m/s"  /> 
     
    393434 
    394435 
     436        <field id="uoce2_e3u"    long_name="ocean current along i-axis squared (thickness weighted)"                                            unit="m3/s2"      grid_ref="grid_U_3D"  > uoce * uoce * e3u </field> 
    395437        <field id="ssu"          long_name="ocean surface current along i-axis"                                                                 unit="m/s"                             /> 
    396438        <field id="sbu"          long_name="ocean bottom current along i-axis"                                                                  unit="m/s"                             /> 
     
    450492        <field id="voce"         long_name="ocean current along j-axis"                             standard_name="sea_water_y_velocity"        unit="m/s"        grid_ref="grid_V_3D" /> 
    451493        <field id="voce_e3v"     long_name="ocean current along j-axis  (thickness weighted)"                                                   unit="m/s"        grid_ref="grid_V_3D"  > voce * e3v </field> 
     494        <field id="voce2_e3v"    long_name="ocean current along j-axis squared (thickness weighted)"                                            unit="m3/s2"      grid_ref="grid_V_3D"  > voce * voce * e3v </field> 
    452495        <field id="ssv"          long_name="ocean surface current along j-axis"                                                                 unit="m/s"                             /> 
    453496        <field id="sbv"          long_name="ocean bottom current along j-axis"                                                                  unit="m/s"                             /> 
     
    551594      <field id="ahmf_2d"      long_name=" surface f-eddy viscosity coefficient"   unit="m2/s or m4/s" /> 
    552595      <field id="ahmf_3d"      long_name=" 3D      f-eddy viscosity coefficient"   unit="m2/s or m4/s"  grid_ref="grid_T_3D"/> 
     596 
     597      <!-- product fields --> 
     598      <field_group id="diaprod"> 
     599   <field id="ut"           long_name="product_of_sea_water_x_velocity_and_potential_temperature"      unit="degree_C m/s"      grid_ref="grid_U_3D"   /> 
     600        <field id="ut_e3u"       long_name="product_of_sea_water_x_velocity_and_potential_temperature * e3u"  unit="degree_C m2/s"   grid_ref="grid_U_3D" > ut * e3u </field > 
     601   <field id="us"           long_name="product_of_sea_water_x_velocity_and_salinity"                   unit="PSU m/s"       grid_ref="grid_U_3D"   /> 
     602        <field id="us_e3u"       long_name="product_of_sea_water_x_velocity_and_salinity * e3u"             unit="PSU m2/s"      grid_ref="grid_U_3D" > us * e3u </field > 
     603   <field id="urhop"        long_name="product_of_sea_water_x_velocity_and_potential_density"          unit="(kg/m3).(m/s)" grid_ref="grid_U_3D"   /> 
     604        <field id="urhop_e3u"    long_name="product_of_sea_water_x_velocity_and_potential_density * e3u"    unit="(kg/m3).(m2/s)"   grid_ref="grid_U_3D" > urhop * e3u </field > 
     605   <field id="vt"           long_name="product_of_sea_water_y_velocity_and_potential_temperature"      unit="degree_C m/s"      grid_ref="grid_V_3D"   /> 
     606        <field id="vt_e3v"       long_name="product_of_sea_water_y_velocity_and_potential_temperature * e3v"  unit="degree_C m2/s"   grid_ref="grid_V_3D" > vt * e3v </field > 
     607   <field id="vs"           long_name="product_of_sea_water_y_velocity_and_salinity"                   unit="PSU m/s"       grid_ref="grid_V_3D"   /> 
     608        <field id="vs_e3v"       long_name="product_of_sea_water_y_velocity_and_salinity * e3t"             unit="PSU m2/s"      grid_ref="grid_V_3D" > vs * e3v </field > 
     609   <field id="vrhop"        long_name="product_of_sea_water_y_velocity_and_potential_density"          unit="(kg/m3).(m/s)" grid_ref="grid_V_3D"   /> 
     610        <field id="vrhop_e3v"    long_name="product_of_sea_water_y_velocity_and_potential_density * e3t"    unit="(kg/m3).(m2/s)"  grid_ref="grid_V_3D" > vrhop * e3v </field > 
     611   <field id="wt"           long_name="product_of_upward_sea_water_velocity_and_potential_temperature" unit="degree_C m/s"      grid_ref="grid_W_3D"   /> 
     612   <field id="ws"           long_name="product_of_upward_sea_water_velocity_and_salinity"              unit="PSU m/s"       grid_ref="grid_W_3D"   /> 
     613   <field id="wrhop"        long_name="product_of_upward_sea_water_velocity_and_potential_density"     unit="(kg/m3).(m/s)" grid_ref="grid_W_3D"   /> 
     614   <field id="uv"           long_name="product_of_sea_water_x_velocity_and_sea_water_y_velocity"       unit="m2/s2   "      grid_ref="grid_T_3D"   /> 
     615   <field id="uw"           long_name="product_of_upward_sea_water_velocity_and_sea_water_x_velocity"  unit="m2/s2   "      grid_ref="grid_W_3D"   /> 
     616   <field id="vw"           long_name="product_of_upward_sea_water_velocity_and_sea_water_y_velocity"  unit="m2/s2"         grid_ref="grid_W_3D"   /> 
     617      </field_group> 
    553618 
    554619      <field_group id="scalar"  grid_ref="grid_scalar"  > 
     
    587652         <field id="uoce_e3u_ave_vsum"    long_name="Vertical sum of u*e3u"                           field_ref="uoce_e3u_ave"         grid_ref="grid_U_vsum"     /> 
    588653         <field id="uocetr_vsum_section"  long_name="Total 2D transport in i-direction"               field_ref="uoce_e3u_ave_vsum"    grid_ref="grid_U_scalar"  detect_missing_value="true"> this * e2u </field> 
    589          <field id="uocetr_strait"        long_name="Total transport across lines in i-direction"     field_ref="uocetr_vsum_section"  grid_ref="grid_U_4strait" /> 
    590          <field id="u_masstr_strait"      long_name="Sea water transport across line in i-direction"  field_ref="uocetr_strait"        grid_ref="grid_U_4strait_hsum" unit="kg/s"> this * maskMFO_u * $rau0 </field> 
    591654 
    592655         <field id="voce_e3v_ave"         long_name="Monthly average of v*e3v"                        field_ref="voce_e3v"                    freq_op="1mo"   freq_offset="_reset_" > @voce_e3v </field> 
    593656         <field id="voce_e3v_ave_vsum"    long_name="Vertical sum of v*e3v"                           field_ref="voce_e3v_ave"         grid_ref="grid_V_vsum"      /> 
    594657         <field id="vocetr_vsum_section"  long_name="Total 2D transport of in j-direction"            field_ref="voce_e3v_ave_vsum"    grid_ref="grid_V_scalar"  detect_missing_value="true"> this * e1v </field> 
    595          <field id="vocetr_strait"        long_name="Total transport across lines in j-direction"     field_ref="vocetr_vsum_section"  grid_ref="grid_V_4strait"  /> 
    596          <field id="v_masstr_strait"      long_name="Sea water transport across line in j-direction"  field_ref="vocetr_strait"        grid_ref="grid_V_4strait_hsum" unit="kg/s"> this * maskMFO_v * $rau0 </field> 
    597  
    598          <field id="masstr_strait"        long_name="Sea water transport across line"                                                  grid_ref="grid_4strait"  > u_masstr_strait + v_masstr_strait </field> 
     658 
    599659      </field_group> 
    600660 
     
    897957     
    898958    <field_group id="mooring" > 
    899       <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      /> 
    900       <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   /> 
     959      <!-- EOS80 --> 
     960      <field field_ref="toce_pot"         name="thetao_pot"   long_name="sea_water_potential_temperature"      /> 
     961      <field field_ref="soce_pra"         name="so_pra"       long_name="sea_water_practical_salinity"                   /> 
     962      <!-- TEOS10 --> 
     963      <field field_ref="toce_con"         name="thetao_con"   long_name="sea_water_conservative_temperature"      /> 
     964      <field field_ref="soce_abs"         name="so_con"       long_name="sea_water_absolute_salinity"                   /> 
     965 
    901966      <field field_ref="uoce"         name="uo"       long_name="sea_water_x_velocity"                 /> 
    902967      <field field_ref="voce"         name="vo"       long_name="sea_water_y_velocity"                 /> 
     
    904969      <field field_ref="avt"          name="difvho"   long_name="ocean_vertical_heat_diffusivity"      /> 
    905970      <field field_ref="avm"          name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"  /> 
    906        
    907       <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       /> 
    908       <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             /> 
    909       <field field_ref="sstgrad"      name="tosgrad"  long_name="module_of_sea_surface_temperature_gradient"    /> 
    910       <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          /> 
     971 
     972      <!-- EOS80 --> 
     973      <field field_ref="sst_pot"          name="tos_pot"      long_name="sea_surface_potential_temperature"                       /> 
     974      <field field_ref="sst2_pot"         name="tossq_pot"    long_name="square_of_sea_surface_potential_temperature"             /> 
     975      <field field_ref="sstgrad_pot"      name="tosgrad_pot"  long_name="module_of_sea_surface_potential_temperature_gradient"    /> 
     976      <field field_ref="sss_pra"          name="sos_pra"      long_name="sea_surface_absolute_salinity"                          /> 
     977      <!-- TEOS10 --> 
     978      <field field_ref="sst_con"          name="tos_con"      long_name="sea_surface_conservative_temperature"                       /> 
     979      <field field_ref="sst2_con"         name="tossq_con"    long_name="square_of_sea_surface_conservative_temperature"             /> 
     980      <field field_ref="sstgrad_con"      name="tosgrad_con"  long_name="module_of_sea_surface_conservative_temperature_gradient"    /> 
     981      <field field_ref="sss_abs"          name="sos"      long_name="sea_surface_absolute_salinity"                          /> 
     982 
    911983      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                /> 
    912984      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     /> 
     
    9311003 
    9321004    <field_group id="groupT" > 
    933       <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               /> 
    934       <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            /> 
    935       <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       /> 
    936       <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             /> 
    937       <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          /> 
     1005      <!-- EOS80 --> 
     1006      <field field_ref="toce_pot"         name="thetao_pot"   long_name="sea_water_potential_temperature"               /> 
     1007      <field field_ref="soce_pra"         name="so_pra"       long_name="sea_water_practical_salinity"                            /> 
     1008      <field field_ref="sst_pot"          name="tos_pot"      long_name="sea_surface_potential_temperature"                       /> 
     1009      <field field_ref="sst2_pot"         name="tossq_pot"    long_name="square_of_sea_surface_potential_temperature"             /> 
     1010      <field field_ref="sss_pra"          name="sos_pra"      long_name="sea_surface_practical_salinity"                          /> 
     1011      <!-- TEOS10 --> 
     1012      <field field_ref="toce_con"         name="thetao_con"   long_name="sea_water_conservative_temperature"               /> 
     1013      <field field_ref="soce_abs"         name="so_abs"       long_name="sea_water_absolute_salinity"                            /> 
     1014      <field field_ref="sst_con"          name="tos_con"      long_name="sea_surface_conservative_temperature"                       /> 
     1015      <field field_ref="sst2_con"         name="tossq_con"    long_name="square_of_sea_surface_conservative_temperature"             /> 
     1016      <field field_ref="sss_abs"          name="sos_abs"      long_name="sea_surface_absolute_salinity"                          /> 
     1017 
    9381018      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                /> 
    9391019      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     /> 
     
    9671047    </field_group> 
    9681048 
     1049    <!-- TMB diagnostic output --> 
     1050    <field_group  id="1h_grid_T_tmb" grid_ref="grid_T_2D" operation="instant"> 
     1051      <!-- EOS80 --> 
     1052      <field id="top_temp_pot"           name="votemper_top_pot"  unit="degC"  /> 
     1053      <field id="mid_temp_pot"           name="votemper_mid_pot"  unit="degC"  /> 
     1054      <field id="bot_temp_pot"           name="votemper_bot_pot"  unit="degC"  /> 
     1055      <field id="top_sal_pra"            name="vosaline_top_pra"  unit="psu"   /> 
     1056      <field id="mid_sal_pra"            name="vosaline_mid_pra"  unit="psu"   /> 
     1057      <field id="bot_sal_pra"            name="vosaline_bot_pra"  unit="psu"   /> 
     1058      <!-- TEOS10 --> 
     1059      <field id="top_temp_con"           name="votemper_top_con"  unit="degC"  /> 
     1060      <field id="mid_temp_con"           name="votemper_mid_con"  unit="degC"  /> 
     1061      <field id="bot_temp_con"           name="votemper_bot_con"  unit="degC"  /> 
     1062      <field id="top_sal_abs"            name="vosaline_top_abs"  unit="psu"   /> 
     1063      <field id="mid_sal_abs"            name="vosaline_mid_abs"  unit="psu"   /> 
     1064      <field id="bot_sal_abs"            name="vosaline_bot_abs"  unit="psu"   /> 
     1065 
     1066      <field id="sshnmasked"         name="sossheig"      unit="m"     />  
     1067    </field_group> 
     1068 
    9691069    <field_group  id="1h_grid_U_tmb" grid_ref="grid_U_2D" operation="instant"> 
    9701070      <field id="top_u"           name="vozocrtx_top"  unit="m/s"  /> 
     
    9831083    <!-- 25h diagnostic output --> 
    9841084    <field_group id="25h_grid_T" grid_ref="grid_T_3D" operation="instant"> 
    985       <field id="temper25h"         name="potential temperature 25h mean"    unit="degC" /> 
     1085      <!-- EOS80 --> 
     1086      <field id="temper25h_pot"         name="potential temperature 25h mean"    unit="degC" /> 
    9861087      <field id="tempis25h"         name="insitu temperature 25h mean"    unit="degC" /> 
    987       <field id="salin25h"          name="salinity 25h mean"                 unit="psu"  /> 
     1088      <field id="salin25h_pra"          name="practical salinity 25h mean"                 unit="psu"  /> 
     1089      <!-- TEOS10 --> 
     1090      <field id="temper25h_con"         name="conservative temperature 25h mean"    unit="degC" /> 
     1091      <field id="tempis25h"         name="insitu temperature 25h mean"    unit="degC" /> 
     1092      <field id="salin25h_abs"          name="absolute salinity 25h mean"                 unit="psu"  /> 
     1093 
    9881094      <field id="ssh25h"            name="sea surface height 25h mean"  grid_ref="grid_T_2D"      unit="m"    /> 
    9891095    </field_group> 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/SHARED/grid_def_nemo.xml

    r12331 r15783  
    2020         <domain domain_ref="grid_T" /> 
    2121         <axis axis_ref="deptht" /> 
    22        </grid> 
    23         <!--  --> 
    24        <grid id="grid_T_3DS" > 
    25          <domain domain_ref="grid_T" /> 
    26          <axis axis_ref="profsed" /> 
    2722       </grid> 
    2823        <!--  --> 
     
    6762       </grid> 
    6863        <!--  --> 
    69  
    70  
    71        <grid id="grid_znl_T_2D"> 
    72          <domain domain_ref="gznl" /> 
    73          <axis axis_ref="basin" /> 
    74        </grid> 
    75  
    76        <grid id="grid_znl_T_3D"> 
    77          <domain domain_ref="gznl" /> 
    78          <axis axis_ref="deptht"  /> 
    79          <axis axis_ref="basin" /> 
    80        </grid> 
    81  
    82        <grid id="grid_znl_W_3D"> 
    83          <domain domain_ref="gznl" /> 
    84          <axis axis_ref="depthw"  /> 
    85          <axis axis_ref="basin" /> 
    86        </grid> 
    87  
    88       <grid id="grid_ptr_T_2D"> 
    89          <domain domain_ref="ptr" /> 
    90          <axis axis_ref="basin" /> 
    91        </grid> 
    92  
    93        <grid id="grid_ptr_T_3D"> 
    94          <domain  domain_ref="ptr" /> 
    95          <axis axis_ref="deptht"  /> 
    96          <axis axis_ref="basin" /> 
    97        </grid> 
    98  
    99        <grid id="grid_ptr_W_3D"> 
    100          <domain  domain_ref="ptr" /> 
    101          <axis axis_ref="depthw"  /> 
    102          <axis axis_ref="basin" /> 
    103        </grid> 
    104  
    10564       <grid id="grid_ptr_W_GLO"> 
    10665         <domain  domain_ref="ptr" /> 
     
    155114       </grid> 
    156115 
    157        <!-- for ORCA2 grid  --> 
    158        <grid id="cumul_U"> 
    159          <axis axis_ref="cumul_U" n_glo="182" > 
    160            <reduce_domain local="true" operation="sum" direction="jDir" /> 
    161            <reduce_axis operation="sum" /> 
    162          </axis> 
    163          <axis axis_ref="depthu" /> 
    164        </grid> 
    165  
    166        <!-- for eORCA1 grid 
    167  
    168        <grid id="cumul_U"> 
    169          <axis axis_ref="cumul_U" n_glo="362" > 
    170            <reduce_domain local="true" operation="sum" direction="jDir" /> 
    171            <reduce_axis operation="sum" /> 
    172          </axis> 
    173          <axis axis_ref="depthu" /> 
    174        </grid> 
    175  
    176       --> 
    177  
    178116 
    179117       <grid id="grid_T_zoom_300"> 
     
    192130       </grid> 
    193131  
    194        <grid id="grid_U_4strait"> 
    195          <domain domain_ref="grid_U" /> 
    196          <axis axis_ref="section"> 
    197            <duplicate_scalar/> 
    198          </axis> 
    199        </grid> 
    200   
    201        <grid id="grid_V_4strait"> 
    202          <domain domain_ref="grid_V" /> 
    203          <axis axis_ref="section"> 
    204            <duplicate_scalar/> 
    205          </axis> 
    206        </grid> 
    207   
    208        <grid id="grid_U_4strait_hsum"> 
    209          <scalar > 
    210            <reduce_domain operation="sum" local="true"/> 
    211            <reduce_scalar operation="sum" /> 
    212          </scalar> 
    213          <axis axis_ref="section"/> 
    214        </grid> 
    215   
    216        <grid id="grid_V_4strait_hsum"> 
    217          <scalar > 
    218            <reduce_domain operation="sum" local="true"/> 
    219            <reduce_scalar operation="sum" /> 
    220          </scalar> 
    221          <axis axis_ref="section"/> 
    222        </grid> 
    223   
    224        <grid id="grid_4strait"> 
    225          <axis axis_ref="section"/> 
    226        </grid> 
    227  
    228       <grid id="grid_U_4strait_ice"> 
    229         <domain domain_ref="grid_U" /> 
    230         <axis axis_ref="section_ice"> 
    231           <duplicate_scalar/> 
    232         </axis> 
    233       </grid> 
    234  
    235       <grid id="grid_V_4strait_ice"> 
    236         <domain domain_ref="grid_V" /> 
    237         <axis axis_ref="section_ice"> 
    238          <duplicate_scalar/> 
    239         </axis> 
    240       </grid> 
    241  
    242       <grid id="grid_U_4strait_ice_hsum"> 
    243         <scalar > 
    244          <reduce_domain operation="sum" local="true"/> 
    245          <reduce_scalar operation="sum" /> 
    246         </scalar> 
    247         <axis axis_ref="section_ice"/> 
    248       </grid> 
    249  
    250      <grid id="grid_V_4strait_ice_hsum"> 
    251         <scalar > 
    252          <reduce_domain operation="sum" local="true"/> 
    253          <reduce_scalar operation="sum" /> 
    254         </scalar> 
    255         <axis axis_ref="section_ice"/> 
    256      </grid> 
    257  
    258      <grid id="grid_4strait_ice"> 
    259        <axis axis_ref="section_ice"/> 
    260      </grid> 
    261   
    262132      <!-- scalars --> 
    263133      <grid id="grid_scalar" > 
    264134        <scalar/> 
    265135      </grid> 
    266   
    267     </grid_definition>    
    268   
     136        <!--  --> 
     137       <grid id="grid_EqT" > 
     138         <domain id="EqT" /> 
     139       </grid> 
     140        <!--  --> 
     141       <grid id="gznl_T_2D"> 
     142         <domain id="ptr" /> 
     143       </grid> 
     144        <!--  --> 
     145       <grid id="gznl_T_3D"> 
     146         <domain id="ptr" /> 
     147         <axis axis_ref="deptht" /> 
     148       </grid> 
     149        <!--  --> 
     150       <grid id="gznl_W_2D"> 
     151         <domain id="ptr" /> 
     152       </grid> 
     153        <!--  --> 
     154       <grid id="gznl_W_3D"> 
     155         <domain id="ptr" /> 
     156         <axis axis_ref="depthw" /> 
     157       </grid> 
     158       <grid id="vert_sum"> 
     159         <domain id="grid_T"/> 
     160         <scalar> 
     161            <reduce_axis operation="sum" /> 
     162         </scalar> 
     163       </grid> 
     164       <grid id="zoom_300"> 
     165         <domain id="grid_T" /> 
     166         <axis axis_ref="deptht300"/> 
     167       </grid> 
     168       <grid id="zoom_300_sum"> 
     169         <domain id="grid_T" /> 
     170         <scalar> 
     171            <reduce_axis operation="sum" /> 
     172         </scalar> 
     173       </grid> 
     174       <grid id="grid_T_surface_extract"> 
     175         <domain id="grid_T" /> 
     176         <axis   axis_ref="deptht_surface" /> 
     177       </grid> 
     178 
     179    </grid_definition> 
     180     
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/SHARED/namelist_ice_ref

    r13346 r15783  
    198198         rn_apnd_min =   0.15         !     minimum ice fraction that contributes to melt pond. range: 0.0 -- 0.15 ?? 
    199199         rn_apnd_max =   0.85         !     maximum ice fraction that contributes to melt pond. range: 0.7 -- 0.85 ?? 
     200         rn_pnd_flush=   0.01         !     pond flushing efficiency (tuning parameter) (LEV) 
    200201      ln_pnd_CST     = .false.        !  constant  melt ponds 
    201202         rn_apnd     =   0.2          !     prescribed pond fraction, at Tsu=0 degC 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/cfgs/SHARED/namelist_ref

    r14075 r15783  
    6767   ln_xios_read = .FALSE.  !  use XIOS to read restart file (only for a single file restart) 
    6868   nn_wxios = 0      !  use XIOS to write restart file 0 - no, 1 - single file output, 2 - multiple file output 
     69   ln_rst_eos = .TRUE.     ! check if the equation of state used to produce the restart is consistent with model 
    6970/ 
    7071!----------------------------------------------------------------------- 
     
    745746&nameos        !   ocean Equation Of Seawater                           (default: NO selection) 
    746747!----------------------------------------------------------------------- 
    747    ln_teos10   = .false.         !  = Use TEOS-10 
     748   ln_teos10   = .true.         !  = Use TEOS-10 
    748749   ln_eos80    = .false.         !  = Use EOS80 
    749750   ln_seos     = .false.         !  = Use S-EOS (simplified Eq.) 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/ICE/ice.F90

    r14075 r15783  
    211211   REAL(wp), PUBLIC ::   rn_apnd_min      !: Minimum ice fraction that contributes to melt ponds 
    212212   REAL(wp), PUBLIC ::   rn_apnd_max      !: Maximum ice fraction that contributes to melt ponds 
     213   REAL(wp), PUBLIC ::   rn_pnd_flush     !: Pond flushing efficiency (tuning parameter) 
    213214   LOGICAL , PUBLIC ::   ln_pnd_CST       !: Melt ponds scheme with constant fraction and depth 
    214215   REAL(wp), PUBLIC ::   rn_apnd          !: prescribed pond fraction (0<rn_apnd<1) 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/ICE/icerst.F90

    r14075 r15783  
    2727   USE in_out_manager ! I/O manager 
    2828   USE iom            ! I/O manager library 
     29   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2930   USE lib_mpp        ! MPP library 
    3031   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero) 
     
    5253      INTEGER, INTENT(in) ::   kt       ! number of iteration 
    5354      ! 
     55      INTEGER             ::   iyear, imonth, iday 
     56      REAL (wp)           ::   zsec 
     57      REAL (wp)           ::   zfjulday 
    5458      CHARACTER(len=20)   ::   clkt     ! ocean time-step define as a character 
    5559      CHARACTER(len=50)   ::   clname   ! ice output restart file name 
     
    6771         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    6872            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    69             IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    70             ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     73            IF ( ln_rstdate ) THEN 
     74               zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday 
     75               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     76               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     77               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     78            ELSE 
     79               IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     80               ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     81               ENDIF 
    7182            ENDIF 
    7283            ! create the file 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/ICE/icethd_pnd.F90

    r14075 r15783  
    145145      !!                                  a_ip/a_i = a_ip_frac = h_ip / zaspect 
    146146      !! 
    147       !! ** Tunable parameters : ln_pnd_lids, rn_apnd_max, rn_apnd_min 
     147      !! ** Tunable parameters : rn_apnd_max, rn_apnd_min, rn_pnd_flush 
    148148      !!  
    149149      !! ** Note       :   mostly stolen from CICE 
     
    274274             
    275275            ! Do the drainage using Darcy's law 
    276             zdv_flush   = -zperm * rau0 * grav * zhp * rdt_ice / (zvisc * h_i_1d(ji)) * a_ip_1d(ji) 
     276            zdv_flush   = -zperm * rau0 * grav * zhp * rdt_ice / (zvisc * h_i_1d(ji)) * a_ip_1d(ji) * rn_pnd_flush ! tunable rn_pnd_flush from hunke et al. (2013) 
    277277            zdv_flush   = MAX( zdv_flush, -v_ip_1d(ji) ) 
    278278            v_ip_1d(ji) = v_ip_1d(ji) + zdv_flush 
     
    317317      INTEGER  ::   ios, ioptio   ! Local integer 
    318318      !! 
    319       NAMELIST/namthd_pnd/  ln_pnd, ln_pnd_LEV , rn_apnd_min, rn_apnd_max, & 
     319      NAMELIST/namthd_pnd/  ln_pnd, ln_pnd_LEV , rn_apnd_min, rn_apnd_max, rn_pnd_flush, & 
    320320         &                          ln_pnd_CST , rn_apnd, rn_hpnd,         & 
    321321         &                          ln_pnd_lids, ln_pnd_alb 
     
    339339         WRITE(numout,*) '            Minimum ice fraction that contributes to melt ponds   rn_apnd_min  = ', rn_apnd_min 
    340340         WRITE(numout,*) '            Maximum ice fraction that contributes to melt ponds   rn_apnd_max  = ', rn_apnd_max 
     341         WRITE(numout,*) '            Pond flushing efficiency                              rn_pnd_flush = ', rn_pnd_flush 
    341342         WRITE(numout,*) '         Constant ice melt pond scheme                            ln_pnd_CST   = ', ln_pnd_CST 
    342343         WRITE(numout,*) '            Prescribed pond fraction                              rn_apnd      = ', rn_apnd 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/ICE/icewri.F90

    r14075 r15783  
    104104      IF( iom_use('snwthic' ) )   CALL iom_put( 'snwthic', hm_s        * zmsk00 )                                           ! snw thickness 
    105105      IF( iom_use('icebrv'  ) )   CALL iom_put( 'icebrv' , bvm_i* 100. * zmsk00 )                                           ! brine volume 
    106       IF( iom_use('iceage'  ) )   CALL iom_put( 'iceage' , om_i / rday * zmsk15 + zmiss_val * ( 1._wp - zmsk15 ) )          ! ice age 
     106      IF( iom_use('iceage'  ) )   CALL iom_put( 'iceage' , om_i / rday * zmsk15 )                                           ! ice age 
    107107      IF( iom_use('icehnew' ) )   CALL iom_put( 'icehnew', ht_i_new             )                                           ! new ice thickness formed in the leads 
    108108      IF( iom_use('snwvolu' ) )   CALL iom_put( 'snwvolu', vt_s        * zmsksn )                                           ! snow volume 
     
    119119      IF( iom_use('icevlid' ) )   CALL iom_put( 'icevlid', vt_il  * zmsk00      )                                           ! melt pond lid total volume per unit area 
    120120      ! salt 
    121       IF( iom_use('icesalt' ) )   CALL iom_put( 'icesalt', sm_i                 * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! mean ice salinity 
     121      IF( iom_use('icesalt' ) )   CALL iom_put( 'icesalt', sm_i                 * zmsk00 )                                  ! mean ice salinity 
    122122      IF( iom_use('icesalm' ) )   CALL iom_put( 'icesalm', st_i * rhoi * 1.0e-3 * zmsk00 )                                  ! Mass of salt in sea ice per cell area 
    123123      ! heat 
    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 
     124      IF( iom_use('icetemp' ) )   CALL iom_put( 'icetemp', ( tm_i  - rt0 ) * zmsk00  )                                      ! ice mean temperature 
     125      IF( iom_use('snwtemp' ) )   CALL iom_put( 'snwtemp', ( tm_s  - rt0 ) * zmsksn  )                                      ! snw mean temperature 
     126      IF( iom_use('icettop' ) )   CALL iom_put( 'icettop', ( tm_su - rt0 ) * zmsk00  )                                      ! temperature at the ice surface 
     127      IF( iom_use('icetbot' ) )   CALL iom_put( 'icetbot', ( t_bo  - rt0 ) * zmsk00  )                                      ! temperature at the ice bottom 
     128      IF( iom_use('icetsni' ) )   CALL iom_put( 'icetsni', ( tm_si - rt0 ) * zmsk00  )                                      ! temperature at the snow-ice interface 
    129129      IF( iom_use('icehc'   ) )   CALL iom_put( 'icehc'  ,  -et_i          * zmsk00 )                                       ! ice heat content 
    130130      IF( iom_use('snwhc'   ) )   CALL iom_put( 'snwhc'  ,  -et_s          * zmsksn )                                       ! snow heat content 
     
    153153      IF( iom_use('icemask_cat' ) )   CALL iom_put( 'icemask_cat' ,                  zmsk00l                                   ) ! ice mask 0% 
    154154      IF( iom_use('iceconc_cat' ) )   CALL iom_put( 'iceconc_cat' , a_i            * zmsk00l                                   ) ! area for categories 
    155       IF( iom_use('icethic_cat' ) )   CALL iom_put( 'icethic_cat' , h_i            * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! thickness for categories 
    156       IF( iom_use('snwthic_cat' ) )   CALL iom_put( 'snwthic_cat' , h_s            * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow depth for categories 
    157       IF( iom_use('icesalt_cat' ) )   CALL iom_put( 'icesalt_cat' , s_i            * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! salinity for categories 
    158       IF( iom_use('iceage_cat'  ) )   CALL iom_put( 'iceage_cat'  , o_i / rday     * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice age 
     155      IF( iom_use('icethic_cat' ) )   CALL iom_put( 'icethic_cat' , h_i            * zmsk00l                                   ) ! thickness for categories 
     156      IF( iom_use('snwthic_cat' ) )   CALL iom_put( 'snwthic_cat' , h_s            * zmsksnl                                   ) ! snow depth for categories 
     157      IF( iom_use('icesalt_cat' ) )   CALL iom_put( 'icesalt_cat' , s_i            * zmsk00l                                   ) ! salinity for categories 
     158      IF( iom_use('iceage_cat'  ) )   CALL iom_put( 'iceage_cat'  , o_i / rday     * zmsk00l                                   ) ! ice age 
    159159      IF( iom_use('icetemp_cat' ) )   CALL iom_put( 'icetemp_cat' , ( SUM( t_i, dim=3 ) * r1_nlay_i - rt0 ) & 
    160          &                                                                         * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice temperature 
     160         &                                                                         * zmsk00l                                   ) ! ice temperature 
    161161      IF( iom_use('snwtemp_cat' ) )   CALL iom_put( 'snwtemp_cat' , ( SUM( t_s, dim=3 ) * r1_nlay_s - rt0 ) & 
    162          &                                                                         * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow temperature 
    163       IF( iom_use('icettop_cat' ) )   CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! surface temperature 
    164       IF( iom_use('icebrv_cat'  ) )   CALL iom_put( 'icebrv_cat'  ,   bv_i * 100.  * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! brine volume 
     162         &                                                                         * zmsksnl                                   ) ! snow temperature 
     163      IF( iom_use('icettop_cat' ) )   CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l                                   ) ! surface temperature 
     164      IF( iom_use('icebrv_cat'  ) )   CALL iom_put( 'icebrv_cat'  ,   bv_i * 100.  * zmsk00l                                   ) ! brine volume 
    165165      IF( iom_use('iceapnd_cat' ) )   CALL iom_put( 'iceapnd_cat' ,   a_ip         * zmsk00l                                   ) ! melt pond frac for categories 
    166166      IF( iom_use('icehpnd_cat' ) )   CALL iom_put( 'icehpnd_cat' ,   h_ip         * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! melt pond thickness for categories 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/BDY/bdyini.F90

    r14075 r15783  
    598598            DO ib = 1, idx_bdy(ib_bdy)%nblen(igrd) 
    599599               ir = MAX( 1, idx_bdy(ib_bdy)%nbr(ib,igrd) )   ! both rim 0 and rim 1 have the same weights 
    600                idx_bdy(ib_bdy)%nbw(ib,igrd) = 1.- TANH( REAL( ir - 1 ) *0.5 )      ! tanh formulation 
     600!               idx_bdy(ib_bdy)%nbw(ib,igrd) = 1.- TANH( REAL( ir - 1 ) *0.5 )      ! tanh formulation 
     601               idx_bdy(ib_bdy)%nbw(ib,igrd) = 1.- TANH( FLOAT( ir - 1 ) * 0.5 & 
     602                                                & *(10./FLOAT(nn_rimwidth(ib_bdy))) ) ! JGraham:modified for rim=15 
    601603               !               idx_bdy(ib_bdy)%nbw(ib,igrd) = (REAL(nn_rimwidth(ib_bdy)+1-ir)/REAL(nn_rimwidth(ib_bdy)))**2.  ! quadratic 
    602604               !               idx_bdy(ib_bdy)%nbw(ib,igrd) =  REAL(nn_rimwidth(ib_bdy)+1-ir)/REAL(nn_rimwidth(ib_bdy))       ! linear 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/BDY/bdytides.F90

    r14075 r15783  
    147147               ! 
    148148               ! SSH fields 
    149                IF( ASSOCIATED(dta%ssh) ) THEN   ! we use bdy ssh on this mpi subdomain 
    150149                  clfile = TRIM(filtide)//'_grid_T.nc' 
    151150                  CALL iom_open( clfile , inum )  
     
    154153                     CALL iom_get( inum, jpdom_autoglo, TRIM(Wave(ntide(itide))%cname_tide)//'_z1', ztr(:,:) ) 
    155154                     CALL iom_get( inum, jpdom_autoglo, TRIM(Wave(ntide(itide))%cname_tide)//'_z2', zti(:,:) )  
     155                     IF( ASSOCIATED(dta%ssh) ) THEN   ! we use bdy ssh on this mpi subdomain 
    156156                     DO ib = 1, SIZE(dta%ssh) 
    157157                        ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     
    160160                        td%ssh0(ib,itide,2) = zti(ii,ij) 
    161161                     END DO 
     162                     ENDIF 
    162163                  END DO 
    163164                  CALL iom_close( inum ) 
    164                END IF 
    165165               ! 
    166166               ! U fields 
    167                IF( ASSOCIATED(dta%u2d) ) THEN   ! we use bdy u2d on this mpi subdomain 
    168167                  clfile = TRIM(filtide)//'_grid_U.nc' 
    169168                  CALL iom_open( clfile , inum )  
     
    172171                     CALL iom_get  ( inum, jpdom_autoglo, TRIM(Wave(ntide(itide))%cname_tide)//'_u1', ztr(:,:) ) 
    173172                     CALL iom_get  ( inum, jpdom_autoglo, TRIM(Wave(ntide(itide))%cname_tide)//'_u2', zti(:,:) ) 
     173                     IF( ASSOCIATED(dta%u2d) ) THEN   ! we use bdy u2d on this mpi subdomain 
    174174                     DO ib = 1, SIZE(dta%u2d) 
    175175                        ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     
    178178                        td%u0(ib,itide,2) = zti(ii,ij) 
    179179                     END DO 
     180                  END IF 
    180181                  END DO 
    181                   CALL iom_close( inum ) 
    182                END IF 
     182               CALL iom_close( inum ) 
    183183               ! 
    184184               ! V fields 
    185                IF( ASSOCIATED(dta%v2d) ) THEN   ! we use bdy v2d on this mpi subdomain 
    186185                  clfile = TRIM(filtide)//'_grid_V.nc' 
    187186                  CALL iom_open( clfile , inum )  
     
    190189                     CALL iom_get  ( inum, jpdom_autoglo, TRIM(Wave(ntide(itide))%cname_tide)//'_v1', ztr(:,:) ) 
    191190                     CALL iom_get  ( inum, jpdom_autoglo, TRIM(Wave(ntide(itide))%cname_tide)//'_v2', zti(:,:) ) 
     191                     IF( ASSOCIATED(dta%v2d) ) THEN   ! we use bdy v2d on this mpi subdomain 
    192192                     DO ib = 1, SIZE(dta%v2d) 
    193193                        ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     
    196196                        td%v0(ib,itide,2) = zti(ii,ij) 
    197197                     END DO 
     198                  END IF 
    198199                  END DO 
    199                   CALL iom_close( inum ) 
    200                END IF 
     200               CALL iom_close( inum ) 
    201201               ! 
    202202               DEALLOCATE( ztr, zti )  
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/DIA/diawri.F90

    r14075 r15783  
    4949   USE iom            !  
    5050   USE ioipsl         !  
    51  
     51   USE eosbn2 
    5252#if defined key_si3 
    5353   USE ice  
     
    113113      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d   ! 2D workspace 
    114114      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   z3d   ! 3D workspace 
     115      CHARACTER(len=4),SAVE :: ttype , stype           ! temperature and salinity type 
    115116      !!---------------------------------------------------------------------- 
    116117      !  
     118      IF( kt == nit000 ) THEN 
     119         IF( ln_TEOS10 ) THEN 
     120            IF ( iom_use("toce_pot") .OR. iom_use("soce_pra") .OR. iom_use("sst_pot") .OR. iom_use("sss_pra") & 
     121                  & .OR. iom_use("sbt_pot") .OR. iom_use("sbs_pra") .OR. iom_use("sstgrad_pot") .OR. iom_use("sstgrad2_pot") & 
     122                  & .OR. iom_use("tosmint_pot") .OR. iom_use("somint_pra"))  THEN  
     123               CALL ctl_stop( 'diawri: potential temperature and practical salinity not available with ln_TEOS10' ) 
     124            ELSE 
     125               ttype='con' ; stype='abs'   ! teos-10 using conservative temperature and absolute salinity 
     126            ENDIF  
     127         ELSE IF( ln_EOS80  ) THEN 
     128            IF ( iom_use("toce_con") .OR. iom_use("soce_abs") .OR. iom_use("sst_con") .OR. iom_use("sss_abs") & 
     129                  & .OR. iom_use("sbt_con") .OR. iom_use("sbs_abs") .OR. iom_use("sstgrad_con") .OR. iom_use("sstgrad2_con") & 
     130                  & .OR. iom_use("tosmint_con") .OR. iom_use("somint_abs"))  THEN  
     131               CALL ctl_stop( 'diawri: conservative temperature and absolute salinity not available with ln_EOS80' ) 
     132            ELSE 
     133               ttype='pot' ; stype='pra'   ! eos-80 using potential temperature and practical salinity 
     134            ENDIF 
     135         ELSE IF ( ln_SEOS) THEN 
     136            ttype='seos' ; stype='seos' ! seos using Simplified Equation of state 
     137         ENDIF 
     138      ENDIF 
     139 
    117140      IF( ln_timing )   CALL timing_start('dia_wri') 
    118141      !  
     
    144167         CALL iom_put( "wetdep" , ht_0(:,:) + sshn(:,:) ) 
    145168       
    146       CALL iom_put( "toce", tsn(:,:,:,jp_tem) )    ! 3D temperature 
    147       CALL iom_put(  "sst", tsn(:,:,1,jp_tem) )    ! surface temperature 
    148       IF ( iom_use("sbt") ) THEN 
     169      CALL iom_put( "toce_"//ttype, tsn(:,:,:,jp_tem) )    ! 3D temperature 
     170      CALL iom_put(  "sst_"//ttype, tsn(:,:,1,jp_tem) )    ! surface temperature 
     171      IF ( iom_use("sbt_"//ttype) ) THEN 
    149172         DO jj = 1, jpj 
    150173            DO ji = 1, jpi 
     
    153176            END DO 
    154177         END DO 
    155          CALL iom_put( "sbt", z2d )                ! bottom temperature 
     178         CALL iom_put( "sbt_"//ttype, z2d )                ! bottom temperature 
    156179      ENDIF 
    157180       
    158       CALL iom_put( "soce", tsn(:,:,:,jp_sal) )    ! 3D salinity 
    159       CALL iom_put(  "sss", tsn(:,:,1,jp_sal) )    ! surface salinity 
    160       IF ( iom_use("sbs") ) THEN 
     181      CALL iom_put( "soce_"//stype, tsn(:,:,:,jp_sal) )    ! 3D salinity 
     182      CALL iom_put(  "sss_"//stype, tsn(:,:,1,jp_sal) )    ! surface salinity 
     183      IF ( iom_use("sbs_"//stype) ) THEN 
    161184         DO jj = 1, jpj 
    162185            DO ji = 1, jpi 
     
    165188            END DO 
    166189         END DO 
    167          CALL iom_put( "sbs", z2d )                ! bottom salinity 
     190         CALL iom_put( "sbs_"//stype, z2d )                ! bottom salinity 
    168191      ENDIF 
    169192 
     
    233256      IF( iom_use('logavs') )   CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) ) 
    234257 
    235       IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN 
     258      IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN 
    236259         DO jj = 2, jpjm1                                    ! sst gradient 
    237260            DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    244267         END DO 
    245268         CALL lbc_lnk( 'diawri', z2d, 'T', 1. ) 
    246          CALL iom_put( "sstgrad2",  z2d )          ! square of module of sst gradient 
     269         CALL iom_put( "sstgrad2_"//ttype,  z2d )          ! square of module of sst gradient 
    247270         z2d(:,:) = SQRT( z2d(:,:) ) 
    248          CALL iom_put( "sstgrad" ,  z2d )          ! module of sst gradient 
     271         CALL iom_put( "sstgrad_"//ttype ,  z2d )          ! module of sst gradient 
    249272      ENDIF 
    250273          
     
    365388      ENDIF 
    366389 
    367       IF( iom_use("tosmint") ) THEN 
     390      IF( iom_use("tosmint_"//ttype) ) THEN 
    368391         z2d(:,:) = 0._wp 
    369392         DO jk = 1, jpkm1 
     
    375398         END DO 
    376399         CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 
    377          CALL iom_put( "tosmint", rau0 * z2d )        ! Vertical integral of temperature 
    378       ENDIF 
    379       IF( iom_use("somint") ) THEN 
     400         CALL iom_put( "tosmint_"//ttype, rau0 * z2d )        ! Vertical integral of temperature 
     401      ENDIF 
     402      IF( iom_use("somint_"//stype) ) THEN 
    380403         z2d(:,:)=0._wp 
    381404         DO jk = 1, jpkm1 
     
    387410         END DO 
    388411         CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 
    389          CALL iom_put( "somint", rau0 * z2d )         ! Vertical integral of salinity 
     412         CALL iom_put( "somint_"//stype, rau0 * z2d )         ! Vertical integral of salinity 
    390413      ENDIF 
    391414 
     
    930953         CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd            )    ! now StokesDrift k-velocity 
    931954      ENDIF 
    932   
    933955#if defined key_si3 
    934956      IF( nn_ice == 2 ) THEN   ! condition needed in case agrif + ice-model but no-ice in child grid 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/DOM/domain.F90

    r14075 r15783  
    292292         &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     & 
    293293         &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
    294          &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios 
     294         &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios, ln_rstdate, ln_rst_eos 
     295 
    295296      NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
    296297#if defined key_netcdf4 
     
    340341#endif 
    341342         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
     343         WRITE(numout,*) '      date-stamp restart files        ln_rstdate = ', ln_rstdate 
    342344         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
    343345         WRITE(numout,*) '      overwrite an existing file      ln_clobber      = ', ln_clobber 
    344346         WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz      = ', nn_chunksz 
    345347         WRITE(numout,*) '      IS coupling at the restart step ln_iscpl        = ', ln_iscpl 
     348         WRITE(numout,*) '      check restart equation of state ln_rst_eos      = ', ln_rst_eos 
     349 
    346350         IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    347351            WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/DOM/dommsk.F90

    r14075 r15783  
    3232   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    3333   USE lib_mpp        ! Massively Parallel Processing library 
     34   USE iom             ! For shlat2d 
     35   USE fldread         ! for sn_shlat2d 
    3436 
    3537   IMPLICIT NONE 
     
    9395      INTEGER  ::   ios, inum 
    9496      !! 
    95       NAMELIST/namlbc/ rn_shlat, ln_vorlat 
     97      REAL(wp) :: zshlat           !: locally modified shlat for some strait 
     98      REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zshlat2d 
     99      LOGICAL                         :: ln_shlat2d 
     100      CHARACTER(len = 256)            :: cn_shlat2d_file, cn_shlat2d_var   
     101      !! 
     102      NAMELIST/namlbc/ rn_shlat, ln_vorlat, ln_shlat2d, cn_shlat2d_file, cn_shlat2d_var 
    96103      NAMELIST/nambdy/ ln_bdy ,nb_bdy, ln_coords_file, cn_coords_file,         & 
    97104         &             ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta,     & 
     
    120127      ! 
    121128      IF(lwp) WRITE(numout,*) 
    122       IF     (      rn_shlat == 0.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  free-slip' 
    123       ELSEIF (      rn_shlat == 2.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  no-slip' 
    124       ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  partial-slip' 
    125       ELSEIF ( 2. < rn_shlat                     ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  strong-slip' 
     129 
     130      IF ( ln_shlat2d ) THEN 
     131         IF(lwp) WRITE(numout,*) '         READ shlat as a 2D coefficient in a file ' 
     132         ALLOCATE( zshlat2d(jpi,jpj) ) 
     133         CALL iom_open(TRIM(cn_shlat2d_file), inum) 
     134         CALL iom_get (inum, jpdom_data, TRIM(cn_shlat2d_var), zshlat2d, 1) ! 
     135         CALL iom_close(inum) 
    126136      ELSE 
    127          CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' ) 
     137         IF     (      rn_shlat == 0.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  free-slip' 
     138         ELSEIF (      rn_shlat == 2.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  no-slip' 
     139         ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  partial-slip' 
     140         ELSEIF ( 2. < rn_shlat                     ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  strong-slip' 
     141         ELSE 
     142            CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' ) 
     143         ENDIF 
    128144      ENDIF 
    129145 
     
    240256      ! Lateral boundary conditions on velocity (modify fmask) 
    241257      ! ---------------------------------------   
    242       IF( rn_shlat /= 0 ) THEN      ! Not free-slip lateral boundary condition 
     258      IF( rn_shlat /= 0 .or. ln_shlat2d ) THEN      ! Not free-slip lateral boundary condition everywhere 
    243259         ! 
    244260         DO jk = 1, jpk 
    245             DO jj = 2, jpjm1 
    246                DO ji = fs_2, fs_jpim1   ! vector opt. 
    247                   IF( fmask(ji,jj,jk) == 0._wp ) THEN 
    248                      fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), & 
    249                         &                                           vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) ) 
    250                   ENDIF 
     261            IF (  ln_shlat2d ) THEN 
     262               DO jj = 2, jpjm1 
     263                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     264                     IF( fmask(ji,jj,jk) == 0._wp ) THEN 
     265                        fmask(ji,jj,jk) = zshlat2d(ji,jj) * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk),   & 
     266                           &                                                  vmask(ji,jj,jk), vmask(ji+1,jj,jk)  )  ) 
     267                     ENDIF 
     268                  END DO 
    251269               END DO 
    252             END DO 
     270            ELSE 
     271               DO jj = 2, jpjm1 
     272                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     273                     IF( fmask(ji,jj,jk) == 0._wp ) THEN 
     274                        fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk),   & 
     275                           &                                           vmask(ji,jj,jk), vmask(ji+1,jj,jk)   )  ) 
     276                     ENDIF 
     277                  END DO 
     278               END DO 
     279            ENDIF 
    253280            DO jj = 2, jpjm1 
    254281               IF( fmask(1,jj,jk) == 0._wp ) THEN 
     
    277304         END DO 
    278305         ! 
     306         IF( ln_shlat2d ) DEALLOCATE( zshlat2d ) 
     307         ! 
    279308         CALL lbc_lnk( 'dommsk', fmask, 'F', 1._wp )      ! Lateral boundary conditions on fmask 
    280309         ! 
     
    284313       
    285314      ! User defined alteration of fmask (use to reduce ocean transport in specified straits) 
     315      ! Only call if we are not using the shlat2d option. 
    286316      ! --------------------------------  
    287317      ! 
    288       CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 
     318      IF ( .not. ln_shlat2d ) THEN       
     319         CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 
     320      ENDIF 
    289321      ! 
    290322   END SUBROUTINE dom_msk 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/ICB/icbrst.F90

    r14075 r15783  
    2525   USE netcdf         ! netcdf routines for IO 
    2626   USE iom 
     27   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2728   USE icb_oce        ! define iceberg arrays 
    2829   USE icbutl         ! iceberg utility routines 
     
    191192      INTEGER ::   idg  ! number of digits 
    192193      INTEGER ::   ix_dim, iy_dim, ik_dim, in_dim 
    193       CHARACTER(len=256)     :: cl_path 
    194       CHARACTER(len=256)     :: cl_filename 
    195       CHARACTER(len=8  )     :: cl_kt 
     194      INTEGER             ::   iyear, imonth, iday 
     195      REAL (wp)           ::   zsec 
     196      REAL (wp)           ::   zfjulday 
     197      CHARACTER(len=256)  :: cl_path 
     198      CHARACTER(len=256)  :: cl_filename 
     199      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    196200      CHARACTER(LEN=12 )     :: clfmt            ! writing format 
    197201      TYPE(iceberg), POINTER :: this 
     
    209213         cl_path = TRIM(cn_ocerst_outdir) 
    210214         IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 
    211          WRITE(cl_kt, '(i8.8)') kt 
    212          cl_filename = TRIM(cexper)//"_icebergs_"//cl_kt//"_restart" 
     215         IF ( ln_rstdate ) THEN 
     216            zfjulday = fjulday + rdt / rday 
     217            IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     218            CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     219            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     220         ELSE 
     221            IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt 
     222            ELSE                        ;   WRITE(clkt, '(i8.8)') kt 
     223            ENDIF 
     224         ENDIF 
     225         cl_filename = TRIM(cexper)//"_icebergs_"//TRIM(ADJUSTL(clkt))//"_restart" 
    213226         IF( lk_mpp ) THEN 
    214227            idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 )          ! how many digits to we need to write? min=4, max=9 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/IOM/in_out_manager.F90

    r14075 r15783  
    2828   LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file 
    2929   LOGICAL       ::   ln_rst_list      !: output restarts at list of times (T) or by frequency (F) 
     30   LOGICAL       ::   ln_rst_eos       !: check equation of state used for the restart is consistent with model 
    3031   INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2) 
    3132   INTEGER       ::   nn_rstssh   = 0  !: hand made initilization of ssh or not (1/0) 
     
    4041   INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times 
    4142   LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%) 
     43   LOGICAL       ::   ln_rstdate       !: T=> stamp output restart files with date instead of timestep 
    4244   LOGICAL       ::   ln_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard 
    4345   LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/IOM/iom.F90

    r14075 r15783  
    368368!from restart.F90 
    369369   CALL iom_set_rstw_var_active("rdt") 
     370   CALL iom_set_rstw_var_active("neos") 
     371 
    370372   IF ( .NOT. ln_diurnal_only ) THEN 
    371373        CALL iom_set_rstw_var_active('ub'  ) 
     
    417419        i = 0 
    418420        i = i + 1; fields(i)%vname="rdt";            fields(i)%grid="grid_scalar" 
     421        i = i + 1; fields(i)%vname="neos";           fields(i)%grid="grid_scalar" 
    419422        i = i + 1; fields(i)%vname="un";             fields(i)%grid="grid_N_3D" 
    420423        i = i + 1; fields(i)%vname="ub";             fields(i)%grid="grid_N_3D" 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/IOM/restart.F90

    r14075 r15783  
    2727   USE in_out_manager  ! I/O manager 
    2828   USE iom             ! I/O module 
     29   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2930   USE diurnal_bulk 
    3031   USE lib_mpp         ! distribued memory computing library 
     
    5960      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
    6061      !! 
     62      INTEGER             ::   iyear, imonth, iday 
     63      REAL (wp)           ::   zsec 
     64      REAL (wp)           ::   zfjulday 
    6165      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    6266      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
     
    9094         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN  
    9195            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    92             IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    93             ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     96            IF ( ln_rstdate ) THEN 
     97               zfjulday = fjulday + rdt / rday 
     98               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     99               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     100               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     101            ELSE 
     102               IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     103               ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     104               ENDIF 
    94105            ENDIF 
    95106            ! create the file 
     
    173184                  END IF 
    174185      ENDIF 
     186                     CALL iom_rstput( kt, nitrst, numrow, 'neos'    , REAL(neos)      , ldxios = lwxios)   ! equation of state 
     187                     !CALL iom_rstput( kt, nitrst, numrow, 'neos'    , neos      , ktype = jp_i1, ldxios = lwxios)   ! equation of state 
     188 
    175189       
    176190      IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst, ldxios = lwxios )   
     
    249263      !!---------------------------------------------------------------------- 
    250264      REAL(wp) ::   zrdt 
     265      REAL(wp) ::   zeos 
    251266      INTEGER  ::   jk 
    252267      REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 
     
    255270      CALL rst_read_open           ! open restart for reading (if not already opened) 
    256271 
     272      IF ( ln_rst_eos ) THEN 
     273         ! Check equation of state used is consistent with the restart 
     274         IF( iom_varid( numror, 'neos') == -1) THEN 
     275            CALL ctl_stop( 'restart, rst_read: variable neos not found. STOP check that the equations of state in the restart file and in the namelist nameos are consistent and use ln_rst_eos=F') 
     276         ELSE 
     277            CALL iom_get( numror, 'neos', zeos, ldxios = lrxios ) 
     278            IF ( INT(zeos) /= neos ) CALL ctl_stop( 'restart, rst_read: equation of state used in restart file differs from namelist nameos') 
     279         ENDIF 
     280      ENDIF 
     281 
    257282      ! Check dynamics and tracer time-step consistency and force Euler restart if changed 
    258       IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN 
     283      IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN  
    259284         CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios ) 
    260285         IF( zrdt /= rdt )   neuler = 0 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/SBC/cpl_oasis3.F90

    r14075 r15783  
    2727#if defined key_oasis3 
    2828   USE mod_oasis                    ! OASIS3-MCT module 
     29#endif  
     30#if defined key_iomput && defined key_xios25   
     31   USE xios, ONLY:xios_oasis_enddef 
    2932#endif 
    3033   USE par_oce                      ! ocean parameters 
     
    310313      IF( agrif_fixed() == Agrif_Nb_Fine_Grids() ) THEN 
    311314#endif 
     315      !   
     316#if defined key_iomput && defined key_xios25   
     317!needed for XIOS 2.5   
     318      CALL xios_oasis_enddef()   
     319#endif   
     320      !  
    312321      CALL oasis_enddef(nerror) 
    313322      IF( nerror /= OASIS_Ok )   CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/SBC/sbcssm.F90

    r14075 r15783  
    5757      REAL(wp) ::   zcoef, zf_sbc       ! local scalar 
    5858      REAL(wp), DIMENSION(jpi,jpj,jpts) :: zts 
     59      CHARACTER(len=4),SAVE :: stype 
    5960      !!--------------------------------------------------------------------- 
     61      IF( kt == nit000 ) THEN 
     62         IF( ln_TEOS10 ) THEN 
     63            stype='abs'   ! teos-10: using absolute salinity (sst is converted to potential temperature for the surface module) 
     64         ELSE IF( ln_EOS80  ) THEN 
     65            stype='pra'   ! eos-80: using practical salinity 
     66         ELSE IF ( ln_SEOS) THEN 
     67            stype='seos' ! seos using Simplified Equation of state (sst is converted to potential temperature for the surface module) 
     68         ENDIF 
     69      ENDIF 
    6070      ! 
    6171      !                                        !* surface T-, U-, V- ocean level variables (T, S, depth, velocity) 
     
    174184         CALL iom_put( 'ssu_m', ssu_m ) 
    175185         CALL iom_put( 'ssv_m', ssv_m ) 
    176          CALL iom_put( 'sst_m', sst_m ) 
    177          CALL iom_put( 'sss_m', sss_m ) 
     186         CALL iom_put( 'sst_m_pot', sst_m ) 
     187         CALL iom_put( 'sss_m_'//stype, sss_m ) 
    178188         CALL iom_put( 'ssh_m', ssh_m ) 
    179189         CALL iom_put( 'e3t_m', e3t_m ) 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/SBC/tide.h90

    r14075 r15783  
    2828   Wave(18) = tide(  'L2'     , 0.006694 ,    2   ,  2 , -1 ,  2 , -1 ,  0  , +180  ,  2   , -2   ,  0   ,  0   , 0 ,  215    ) 
    2929   Wave(19) = tide(  'T2'     , 0.006614 ,    2   ,  2 ,  0 , -1 ,  0 ,  1  ,    0  ,  0   ,  0   ,  0   ,  0   , 0 ,    0    ) 
     30   ! 
     31   !             !! name_tide , equitide , nutide , nt , ns , nh , np , np1 , shift , nksi , nnu0 , nnu1 , nnu2 , R , formula !! 
     32   Wave(20) = tide(  'MNS2'   , 0.000000 ,    2   ,  2 , -5 ,  4 ,  1 ,  0  ,    0  ,  4   , -4   ,  0   ,  0   , 0 ,    6    ) 
     33   Wave(21) = tide(  'Lam2'   , 0.001760 ,    2   ,  2 , -1 ,  0 ,  1 ,  0  , +180  ,  2   , -2   ,  0   ,  0   , 0 ,   78    ) 
     34   Wave(22) = tide(  'MSN2'   , 0.000000 ,    2   ,  2 ,  1 ,  0 ,  1 ,  0  ,    0  ,  2   , -2   ,  0   ,  2   , 0 ,    6    ) 
     35   Wave(23) = tide(  '2SM2'   , 0.000000 ,    2   ,  2 ,  2 , -2 ,  0 ,  0  ,    0  , -2   ,  2   ,  0   ,  0   , 0 ,   16    ) 
     36   Wave(24) = tide(  'MO3'    , 0.000000 ,    3   ,  3 , -4 ,  1 ,  0 ,  0  ,  +90  ,  2   , -2   ,  0   ,  0   , 0 ,   13    ) 
     37   Wave(25) = tide(  'MK3'    , 0.000000 ,    3   ,  3 , -2 ,  3 ,  0 ,  0  ,  -90  ,  2   , -2   , -1   ,  0   , 0 ,   10    ) 
     38   Wave(26) = tide(  'MN4'    , 0.000000 ,    4   ,  4 , -5 ,  4 ,  1 ,  0  ,    0  ,  4   , -4   ,  0   ,  0   , 0 ,    1    ) 
     39   Wave(27) = tide(  'MS4'    , 0.000000 ,    4   ,  4 , -2 ,  2 ,  0 ,  0  ,    0  ,  2   , -2   ,  0   ,  0   , 0 ,    2    ) 
     40   Wave(28) = tide(  'M6'     , 0.000000 ,    6   ,  6 , -6 ,  6 ,  0 ,  0  ,    0  ,  6   , -6   ,  0   ,  0   , 0 ,    4    ) 
     41   Wave(29) = tide(  '2MS6'   , 0.000000 ,    6   ,  6 , -4 ,  4 ,  0 ,  0  ,    0  ,  4   , -4   ,  0   ,  0   , 0 ,    6    ) 
     42   Wave(30) = tide(  '2MK6'   , 0.000000 ,    6   ,  6 , -4 ,  6 ,  0 ,  0  ,    0  ,  4   , -4   ,  0   , -2   , 0 ,    5    ) 
     43   Wave(31) = tide(  '3M2S2'  , 0.000000 ,    2   , 2  , -6 ,  6 ,  0 ,  0  ,    0  ,  6   , -6   ,  0   ,  0   , 0 ,   12    ) 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/SBC/tide_mod.F90

    r14075 r15783  
    1616   PUBLIC   tide_init_Wave   ! called by tideini and diaharm modules 
    1717 
    18    INTEGER, PUBLIC, PARAMETER ::   jpmax_harmo = 19   !: maximum number of harmonic 
     18   INTEGER, PUBLIC, PARAMETER ::   jpmax_harmo = 31   !: maximum number of harmonic 
    1919 
    2020   TYPE, PUBLIC ::    tide 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/USR/usrdef_sbc.F90

    r14075 r15783  
    33   !!                     ***  MODULE  usrdef_sbc  *** 
    44   !! 
    5    !!                     ===  GYRE configuration  === 
     5   !!                   
    66   !! 
    7    !! User defined :   surface forcing of a user configuration 
     7   !! User defined :   set all surface forcing to 0 
    88   !!====================================================================== 
    99   !! History :  4.0   ! 2016-03  (S. Flavoni, G. Madec)  user defined interface 
     
    1111 
    1212   !!---------------------------------------------------------------------- 
    13    !!   usrdef_sbc    : user defined surface bounday conditions in GYRE case 
     13   !!   usrdef_sbc    : user defined surface bounday conditions 
    1414   !!---------------------------------------------------------------------- 
    1515   USE oce            ! ocean dynamics and tracers 
     
    4343      !!                    ***  ROUTINE usrdef_sbc  *** 
    4444      !!               
    45       !! ** Purpose :   provide at each time-step the GYRE surface boundary 
     45      !! ** Purpose :   provide at each time-step the surface boundary 
    4646      !!              condition, i.e. the momentum, heat and freshwater fluxes. 
    4747      !! 
    48       !! ** Method  :   analytical seasonal cycle for GYRE configuration. 
    49       !!                CAUTION : never mask the surface stress field ! 
    50       !! 
     48      !! ** Method  :   Set all surface forcing to 0 
    5149      !! ** Action  : - set the ocean surface boundary condition, i.e.    
    5250      !!                   utau, vtau, taum, wndm, qns, qsr, emp, sfx 
    5351      !! 
    54       !! Reference : Hazeleger, W., and S. Drijfhout, JPO, 30, 677-695, 2000. 
    5552      !!---------------------------------------------------------------------- 
    5653      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    57       !! 
    58       INTEGER  ::   ji, jj                 ! dummy loop indices 
    59       INTEGER  ::   zyear0                 ! initial year  
    60       INTEGER  ::   zmonth0                ! initial month 
    61       INTEGER  ::   zday0                  ! initial day 
    62       INTEGER  ::   zday_year0             ! initial day since january 1st 
    63       REAL(wp) ::   ztau     , ztau_sais   ! wind intensity and of the seasonal cycle 
    64       REAL(wp) ::   ztime                  ! time in hour 
    65       REAL(wp) ::   ztimemax , ztimemin    ! 21th June, and 21th decem. if date0 = 1st january 
    66       REAL(wp) ::   ztimemax1, ztimemin1   ! 21th June, and 21th decem. if date0 = 1st january 
    67       REAL(wp) ::   ztimemax2, ztimemin2   ! 21th June, and 21th decem. if date0 = 1st january 
    68       REAL(wp) ::   ztaun                  ! intensity 
    69       REAL(wp) ::   zemp_s, zemp_n, zemp_sais, ztstar 
    70       REAL(wp) ::   zcos_sais1, zcos_sais2, ztrp, zconv, t_star 
    71       REAL(wp) ::   zsumemp, zsurf 
    72       REAL(wp) ::   zrhoa  = 1.22         ! Air density kg/m3 
    73       REAL(wp) ::   zcdrag = 1.5e-3       ! drag coefficient 
    74       REAL(wp) ::   ztx, zty, zmod, zcoef ! temporary variables 
    75       REAL(wp) ::   zyydd                 ! number of days in one year 
    76       !!--------------------------------------------------------------------- 
    77       zyydd = REAL(nyear_len(1),wp) 
    7854 
    7955      ! ---------------------------- ! 
    8056      !  heat and freshwater fluxes  ! 
    8157      ! ---------------------------- ! 
    82       !same temperature, E-P as in HAZELEGER 2000 
    83  
    84       zyear0     =   ndate0 / 10000                             ! initial year 
    85       zmonth0    = ( ndate0 - zyear0 * 10000 ) / 100            ! initial month 
    86       zday0      =   ndate0 - zyear0 * 10000 - zmonth0 * 100    ! initial day betwen 1 and 30 
    87       zday_year0 = ( zmonth0 - 1 ) * 30.+zday0                  ! initial day betwen 1 and 360 
    88  
    89       ! current day (in hours) since january the 1st of the current year 
    90       ztime = REAL( kt ) * rdt / (rmmss * rhhmm)   &       !  total incrementation (in hours) 
    91          &      - (nyear  - 1) * rjjhh * zyydd             !  minus years since beginning of experiment (in hours) 
    92  
    93       ztimemax1 = ((5.*30.)+21.)* 24.                      ! 21th june     at 24h in hours 
    94       ztimemin1 = ztimemax1 + rjjhh * zyydd / 2            ! 21th december        in hours 
    95       ztimemax2 = ((6.*30.)+21.)* 24.                      ! 21th july     at 24h in hours 
    96       ztimemin2 = ztimemax2 - rjjhh * zyydd / 2            ! 21th january         in hours 
    97       !                                                    ! NB: rjjhh * zyydd / 4 = one seasonal cycle in hours 
    98  
    99       ! amplitudes 
    100       zemp_S    = 0.7       ! intensity of COS in the South 
    101       zemp_N    = 0.8       ! intensity of COS in the North 
    102       zemp_sais = 0.1 
    103       zTstar    = 28.3      ! intemsity from 28.3 a -5 deg 
    104  
    105       ! 1/2 period between 21th June and 21th December and between 21th July and 21th January 
    106       zcos_sais1 = COS( (ztime - ztimemax1) / (ztimemin1 - ztimemax1) * rpi )  
    107       zcos_sais2 = COS( (ztime - ztimemax2) / (ztimemax2 - ztimemin2) * rpi ) 
    108  
    109       ztrp= - 40.e0        ! retroaction term on heat fluxes (W/m2/K) 
    110       zconv = 3.16e-5      ! convertion factor: 1 m/yr => 3.16e-5 mm/s 
    111       DO jj = 1, jpj 
    112          DO ji = 1, jpi 
    113             ! domain from 15 deg to 50 deg between 27 and 28  degC at 15N, -3 
    114             ! and 13 degC at 50N 53.5 + or - 11 = 1/4 period : 
    115             ! 64.5 in summer, 42.5 in winter 
    116             t_star = zTstar * ( 1. + 1. / 50. * zcos_sais2 )                & 
    117                &                    * COS( rpi * (gphit(ji,jj) - 5.)               & 
    118                &                    / ( 53.5 * ( 1 + 11 / 53.5 * zcos_sais2 ) * 2.) ) 
    119             ! 23.5 deg : tropics 
    120             qsr (ji,jj) =  230 * COS( 3.1415 * ( gphit(ji,jj) - 23.5 * zcos_sais1 ) / ( 0.9 * 180 ) ) 
    121             qns (ji,jj) = ztrp * ( tsb(ji,jj,1,jp_tem) - t_star ) - qsr(ji,jj) 
    122             IF( gphit(ji,jj) >= 14.845 .AND. 37.2 >= gphit(ji,jj) ) THEN    ! zero at 37.8 deg, max at 24.6 deg 
    123                emp  (ji,jj) =   zemp_S * zconv   & 
    124                   &         * SIN( rpi / 2 * (gphit(ji,jj) - 37.2) / (24.6 - 37.2) )  & 
    125                   &         * ( 1 - zemp_sais / zemp_S * zcos_sais1) 
    126             ELSE 
    127                emp (ji,jj) =  - zemp_N * zconv   & 
    128                   &         * SIN( rpi / 2 * (gphit(ji,jj) - 37.2) / (46.8 - 37.2) )  & 
    129                   &         * ( 1 - zemp_sais / zemp_N * zcos_sais1 ) 
    130             ENDIF 
    131          END DO 
    132       END DO 
    133  
    134       zsumemp = GLOB_SUM( 'usrdef_sbc', emp  (:,:)   )  
    135       zsurf   = GLOB_SUM( 'usrdef_sbc', tmask(:,:,1) )  
    136       zsumemp = zsumemp / zsurf         ! Default GYRE configuration 
    13758 
    13859      ! freshwater (mass flux) and update of qns with heat content of emp 
    139       emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1)        ! freshwater flux (=0 in domain average) 
    140       sfx (:,:) = 0.0_wp                                   ! no salt flux 
    141       qns (:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp   ! evap and precip are at SST 
    142  
     60      emp (:,:) = 0.0_wp        ! freshwater flux 
     61      sfx (:,:) = 0.0_wp        ! no salt flux 
     62      qns (:,:) = 0.0_wp        ! non solar heat flux 
     63      qsr (:,:) = 0.0_wp        ! solar heat flux 
     64       
    14365 
    14466      ! ---------------------------- ! 
    14567      !       momentum fluxes        ! 
    14668      ! ---------------------------- ! 
    147       ! same wind as in Wico 
    148       !test date0 : ndate0 = 010203 
    149       zyear0  =   ndate0 / 10000 
    150       zmonth0 = ( ndate0 - zyear0 * 10000 ) / 100 
    151       zday0   =   ndate0 - zyear0 * 10000 - zmonth0 * 100 
    152       !Calculates nday_year, day since january 1st 
    153       zday_year0 = (zmonth0-1)*30.+zday0 
    154  
    155       !accumulates days of previous months of this year 
    156       ! day (in hours) since january the 1st 
    157       ztime = FLOAT( kt ) * rdt / (rmmss * rhhmm)  &  ! incrementation in hour 
    158          &     - (nyear - 1) * rjjhh * zyydd          !  - nber of hours the precedent years 
    159       ztimemax = ((5.*30.)+21.)* 24.               ! 21th june     in hours 
    160       ztimemin = ztimemax + rjjhh * zyydd / 2      ! 21th december in hours 
    161       !                                            ! NB: rjjhh * zyydd / 4 = 1 seasonal cycle in hours 
    162  
    163       ! mean intensity at 0.105 ; srqt(2) because projected with 45deg angle 
    164       ztau = 0.105 / SQRT( 2. ) 
    165       ! seasonal oscillation intensity 
    166       ztau_sais = 0.015 
    167       ztaun = ztau - ztau_sais * COS( (ztime - ztimemax) / (ztimemin - ztimemax) * rpi ) 
    168       DO jj = 1, jpj 
    169          DO ji = 1, jpi 
    170            ! domain from 15deg to 50deg and 1/2 period along 14deg 
    171            ! so 5/4 of half period with seasonal cycle 
    172            utau(ji,jj) = - ztaun * SIN( rpi * (gphiu(ji,jj) - 15.) / (29.-15.) ) 
    173            vtau(ji,jj) =   ztaun * SIN( rpi * (gphiv(ji,jj) - 15.) / (29.-15.) ) 
    174          END DO 
    175       END DO 
    176  
    177       ! module of wind stress and wind speed at T-point 
    178       zcoef = 1. / ( zrhoa * zcdrag )  
    179       DO jj = 2, jpjm1 
    180          DO ji = fs_2, fs_jpim1   ! vect. opt. 
    181             ztx = utau(ji-1,jj  ) + utau(ji,jj)  
    182             zty = vtau(ji  ,jj-1) + vtau(ji,jj)  
    183             zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 
    184             taum(ji,jj) = zmod 
    185             wndm(ji,jj) = SQRT( zmod * zcoef ) 
    186          END DO 
    187       END DO 
     69      utau(:,:) = 0.0_wp 
     70      vtau(:,:) = 0.0_wp 
     71      taum(:,:) = 0.0_wp 
     72      wndm(:,:) = 0.0_wp 
    18873      CALL lbc_lnk_multi( 'usrdef_sbc', taum(:,:), 'T', 1. , wndm(:,:), 'T', 1. ) 
    18974 
     
    19378      IF( kt == nit000 .AND. lwp ) THEN  
    19479         WRITE(numout,*) 
    195          WRITE(numout,*)'usrdef_sbc_oce : analytical surface fluxes for GYRE configuration'                
     80         WRITE(numout,*)'usrdef_sbc_oce : all surface fluxes set to 0'                
    19681         WRITE(numout,*)'~~~~~~~~~~~ '  
    197          WRITE(numout,*)'           nyear      = ', nyear 
    198          WRITE(numout,*)'           nmonth     = ', nmonth 
    199          WRITE(numout,*)'           nday       = ', nday 
    200          WRITE(numout,*)'           nday_year  = ', nday_year 
    201          WRITE(numout,*)'           ztime      = ', ztime 
    202          WRITE(numout,*)'           ztimemax   = ', ztimemax 
    203          WRITE(numout,*)'           ztimemin   = ', ztimemin 
    204          WRITE(numout,*)'           ztimemax1  = ', ztimemax1 
    205          WRITE(numout,*)'           ztimemin1  = ', ztimemin1 
    206          WRITE(numout,*)'           ztimemax2  = ', ztimemax2 
    207          WRITE(numout,*)'           ztimemin2  = ', ztimemin2 
    208          WRITE(numout,*)'           zyear0     = ', zyear0 
    209          WRITE(numout,*)'           zmonth0    = ', zmonth0 
    210          WRITE(numout,*)'           zday0      = ', zday0 
    211          WRITE(numout,*)'           zday_year0 = ', zday_year0 
    212          WRITE(numout,*)'           zyydd      = ', zyydd 
    213          WRITE(numout,*)'           zemp_S     = ', zemp_S 
    214          WRITE(numout,*)'           zemp_N     = ', zemp_N 
    215          WRITE(numout,*)'           zemp_sais  = ', zemp_sais 
    216          WRITE(numout,*)'           zTstar     = ', zTstar 
    217          WRITE(numout,*)'           zsumemp    = ', zsumemp 
    218          WRITE(numout,*)'           zsurf      = ', zsurf 
    219          WRITE(numout,*)'           ztrp       = ', ztrp 
    220          WRITE(numout,*)'           zconv      = ', zconv 
    221          WRITE(numout,*)'           ndastp     = ', ndastp 
    222          WRITE(numout,*)'           adatrj     = ', adatrj 
     82 
    22383      ENDIF 
    22484      ! 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/ZDF/zdfgls.F90

    r14075 r15783  
    188188         DO jj = 2, jpjm1                      ! bottom friction 
    189189            DO ji = fs_2, fs_jpim1   ! vector opt.          
    190                zmsku = ( 2._wp - umask(ji-1,jj,mbkt(ji,jj)) * umask(ji,jj,mbkt(ji,jj)) ) 
    191                zmskv = ( 2._wp - vmask(ji,jj-1,mbkt(ji,jj)) * vmask(ji,jj,mbkt(ji,jj)) )     ! (CAUTION: CdU<0) 
     190               zmsku = 0.5*( 2._wp - umask(ji-1,jj,mbkt(ji,jj)) * umask(ji,jj,mbkt(ji,jj)) ) 
     191               zmskv = 0.5*( 2._wp - vmask(ji,jj-1,mbkt(ji,jj)) * vmask(ji,jj,mbkt(ji,jj)) )     ! (CAUTION: CdU<0) 
    192192               ustar2_bot(ji,jj) = - rCdU_bot(ji,jj) * SQRT(  ( zmsku*( ub(ji,jj,mbkt(ji,jj))+ub(ji-1,jj,mbkt(ji,jj)) ) )**2  & 
    193193                  &                                         + ( zmskv*( vb(ji,jj,mbkt(ji,jj))+vb(ji,jj-1,mbkt(ji,jj)) ) )**2  ) 
     
    406406               ! 
    407407               z_en =  MAX( rc02r * ustar2_bot(ji,jj), rn_emin ) 
     408 
     409!CEOD This is not set in default code .. bug. 
     410               en(ji,jj,ibot) = MAX( rc02r * ustar2_bot(ji,jj), rn_emin ) 
     411 
    408412               ! 
    409413               ! Bottom level Dirichlet condition: 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/ZDF/zdfmxl.F90

    r14075 r15783  
    1515   USE trc_oce  , ONLY: l_offline         ! ocean space and time domain variables 
    1616   USE zdf_oce        ! ocean vertical physics 
     17   USE eosbn2         ! for zdf_mxl_zint 
    1718   ! 
    1819   USE in_out_manager ! I/O manager 
     
    2728   PUBLIC   zdf_mxl   ! called by zdfphy.F90 
    2829 
    29    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   nmln    !: number of level in the mixed layer (used by LDF, ZDF, TRD, TOP) 
    30    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmld    !: mixing layer depth (turbocline)      [m]   (used by TOP) 
    31    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmlp    !: mixed layer depth  (rho=rho0+zdcrit) [m]   (used by LDF) 
    32    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmlpt   !: depth of the last T-point inside the mixed layer [m] (used by LDF) 
     30   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: hmld_tref  !: mixed layer depth at t-points - temperature criterion [m]   
     31   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: nmln       !: number of level in the mixed layer (used by TOP)   
     32   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: hmld       !: mixing layer depth (turbocline)      [m]   
     33   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: hmlp       !: mixed layer depth  (rho=rho0+zdcrit) [m]   
     34   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: hmlpt      !: depth of the last T-point inside the mixed layer [m]   
     35   REAL(wp), PUBLIC, ALLOCATABLE,       DIMENSION(:,:,:) :: hmld_zint  !: vertically-interpolated mixed layer depth   [m]     
     36   REAL(wp), PUBLIC, ALLOCATABLE,       DIMENSION(:,:,:) :: htc_mld    ! Heat content of hmld_zint    
     37   LOGICAL, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    :: ll_found   ! Is T_b to be found by interpolation ?     
     38   LOGICAL, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)  :: ll_belowml ! Flag points below mixed layer when ll_found=F 
    3339 
    3440   REAL(wp), PUBLIC ::   rho_c = 0.01_wp    !: density criterion for mixed layer depth 
    3541   REAL(wp), PUBLIC ::   avt_c = 5.e-4_wp   ! Kz criterion for the turbocline depth 
     42 
     43   TYPE, PUBLIC :: MXL_ZINT   !: Structure for MLD defs 
     44      INTEGER   :: mld_type   ! mixed layer type      
     45      REAL(wp)  :: zref       ! depth of initial T_ref 
     46      REAL(wp)  :: dT_crit    ! Critical temp diff 
     47      REAL(wp)  :: iso_frac   ! Fraction of rn_dT_crit  
     48   END TYPE MXL_ZINT 
     49 
     50!Used for 25h mean    
     51   LOGICAL, PRIVATE :: mld_25h_init = .TRUE.    !Logical used to initalise 25h    
     52                                                !outputs. Necessary, because we need to    
     53                                                !initalise the mld_25h on the zeroth    
     54                                                !timestep (i.e in the nemogcm_init call)    
     55   LOGICAL, PRIVATE :: mld_25h_write = .FALSE.  !Logical confirm 25h calculating/processing    
     56   INTEGER, SAVE :: i_cnt_25h                   ! Counter for 25 hour means    
     57   INTEGER, PRIVATE :: nn_mld_diag = 0          ! number of diagnostics  
     58   INTEGER, PRIVATE, PARAMETER :: MAX_DIAG = 5  ! maximum number of diagnostics  
     59   LOGICAL, PRIVATE, DIMENSION(MAX_DIAG) :: cmld_zint, cmld_mld  
     60  
     61   REAL(wp),SAVE, ALLOCATABLE, DIMENSION(:,:,:) :: hmld_zint_25h 
    3662 
    3763   !!---------------------------------------------------------------------- 
     
    4874      zdf_mxl_alloc = 0      ! set to zero if no array to be allocated 
    4975      IF( .NOT. ALLOCATED( nmln ) ) THEN 
    50          ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), STAT= zdf_mxl_alloc ) 
     76         ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), hmld_zint(jpi,jpj, MAX_DIAG),       &   
     77                   htc_mld(jpi,jpj,MAX_DIAG), ll_found(jpi,jpj), ll_belowml(jpi,jpj,jpk), STAT= zdf_mxl_alloc )  
     78         !  
     79         ALLOCATE(hmld_tref(jpi,jpj)) 
    5180         ! 
    5281         CALL mpp_sum ( 'zdfmxl', zdf_mxl_alloc ) 
     
    137166      ENDIF 
    138167      ! 
     168      ! Vertically-interpolated mixed-layer depth diagnostic 
     169      CALL zdf_mxl_zint( kt ) 
     170      ! 
    139171      IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ' ) 
    140172      ! 
    141173   END SUBROUTINE zdf_mxl 
     174 
     175   SUBROUTINE zdf_mxl_zint_mld( sf )  
     176      !!----------------------------------------------------------------------------------  
     177      !!                    ***  ROUTINE zdf_mxl_zint_mld  ***  
     178      !                                                                         
     179      !   Calculate vertically-interpolated mixed layer depth diagnostic.  
     180      !             
     181      !   This routine can calculate the mixed layer depth diagnostic suggested by 
     182      !   Kara et al, 2000, JGR, 105, 16803, but is more general and can calculate 
     183      !   vertically-interpolated mixed-layer depth diagnostics with other parameter 
     184      !   settings set in the namzdf_mldzint namelist.   
     185      !  
     186      !   If mld_type=1 the mixed layer depth is calculated as the depth at which the   
     187      !   density has increased by an amount equivalent to a temperature difference of   
     188      !   0.8C at the surface.  
     189      !  
     190      !   For other values of mld_type the mixed layer is calculated as the depth at   
     191      !   which the temperature differs by 0.8C from the surface temperature.   
     192      !                                                                         
     193      !   David Acreman, Daley Calvert                                       
     194      !  
     195      !!-----------------------------------------------------------------------------------  
     196 
     197      TYPE(MXL_ZINT), DIMENSION(MAX_DIAG), INTENT(in)  :: sf 
     198 
     199      ! Diagnostic criteria 
     200      INTEGER   :: nn_mld_type   ! mixed layer type      
     201      REAL(wp)  :: rn_zref       ! depth of initial T_ref 
     202      REAL(wp)  :: rn_dT_crit    ! Critical temp diff 
     203      REAL(wp)  :: rn_iso_frac   ! Fraction of rn_dT_crit used 
     204 
     205      ! Local variables 
     206      REAL(wp), PARAMETER :: zepsilon = 1.e-30          ! local small value 
     207      INTEGER, DIMENSION(jpi,jpj) :: ikmt          ! number of active tracer levels  
     208      INTEGER, DIMENSION(jpi,jpj) :: ik_ref        ! index of reference level  
     209      INTEGER, DIMENSION(jpi,jpj) :: ik_iso        ! index of last uniform temp level  
     210      REAL, DIMENSION(jpi,jpj,jpk)  :: zT            ! Temperature or density  
     211      REAL, DIMENSION(jpi,jpj)    :: ppzdep        ! depth for use in calculating d(rho)  
     212      REAL, DIMENSION(jpi,jpj)    :: zT_ref        ! reference temperature  
     213      REAL    :: zT_b                                   ! base temperature  
     214      REAL, DIMENSION(jpi,jpj,jpk)  :: zdTdz         ! gradient of zT  
     215      REAL, DIMENSION(jpi,jpj,jpk)  :: zmoddT        ! Absolute temperature difference  
     216      REAL    :: zdz                                    ! depth difference  
     217      REAL    :: zdT                                    ! temperature difference  
     218      REAL, DIMENSION(jpi,jpj)    :: zdelta_T      ! difference critereon  
     219      REAL, DIMENSION(jpi,jpj)    :: zRHO1, zRHO2  ! Densities  
     220      INTEGER :: ji, jj, jk, jn                         ! loop counter  
     221 
     222      !!-------------------------------------------------------------------------------------  
     223      !   
     224      ! Unpack structure 
     225      DO jn=1, nn_mld_diag 
     226         IF( cmld_zint(jn) .OR. cmld_mld(jn) ) THEN 
     227            nn_mld_type = sf(jn)%mld_type 
     228            rn_zref     = sf(jn)%zref 
     229            rn_dT_crit  = sf(jn)%dT_crit 
     230            rn_iso_frac = sf(jn)%iso_frac 
     231 
     232            ! Set the mixed layer depth criterion at each grid point  
     233            IF( nn_mld_type == 0 ) THEN 
     234               zdelta_T(:,:) = rn_dT_crit 
     235               zT(:,:,:) = rhop(:,:,:) 
     236            ELSE IF( nn_mld_type == 1 ) THEN 
     237               ppzdep(:,:)=0.0  
     238               call eos ( tsn(:,:,1,:), ppzdep(:,:), zRHO1(:,:) )  
     239! Use zT temporarily as a copy of tsn with rn_dT_crit added to SST  
     240! [assumes number of tracers less than number of vertical levels]  
     241               zT(:,:,1:jpts)=tsn(:,:,1,1:jpts)  
     242               zT(:,:,jp_tem)=zT(:,:,1)+rn_dT_crit  
     243               CALL eos( zT(:,:,1:jpts), ppzdep(:,:), zRHO2(:,:) )  
     244               zdelta_T(:,:) = abs( zRHO1(:,:) - zRHO2(:,:) ) * rau0  
     245               ! RHO from eos (2d version) doesn't calculate north or east halo:  
     246               CALL lbc_lnk( 'zdfmxl', zdelta_T, 'T', 1. )  
     247               zT(:,:,:) = rhop(:,:,:)  
     248            ELSE  
     249               zdelta_T(:,:) = rn_dT_crit                       
     250               zT(:,:,:) = tsn(:,:,:,jp_tem)                            
     251            END IF  
     252 
     253            ! Calculate the gradient of zT and absolute difference for use later  
     254            DO jk = 1 ,jpk-2  
     255               zdTdz(:,:,jk)  =    ( zT(:,:,jk+1) - zT(:,:,jk) ) / e3w_n(:,:,jk+1)  
     256               zmoddT(:,:,jk) = abs( zT(:,:,jk+1) - zT(:,:,jk) )  
     257            END DO  
     258 
     259            ! Find density/temperature at the reference level (Kara et al use 10m).           
     260            ! ik_ref is the index of the box centre immediately above or at the reference level  
     261            ! Find rn_zref in the array of model level depths and find the ref     
     262            ! density/temperature by linear interpolation.                                    
     263            DO jk = jpkm1, 2, -1  
     264               WHERE ( gdept_n(:,:,jk) > rn_zref )  
     265                 ik_ref(:,:) = jk - 1  
     266                 zT_ref(:,:) = zT(:,:,jk-1) + zdTdz(:,:,jk-1) * ( rn_zref - gdept_n(:,:,jk-1) )  
     267               END WHERE  
     268            END DO  
     269 
     270            ! If the first grid box centre is below the reference level then use the  
     271            ! top model level to get zT_ref  
     272            WHERE ( gdept_n(:,:,1) > rn_zref )   
     273               zT_ref = zT(:,:,1)  
     274               ik_ref = 1  
     275            END WHERE  
     276 
     277            ! The number of active tracer levels is 1 less than the number of active w levels  
     278            ikmt(:,:) = mbkt(:,:) - 1  
     279 
     280            ! Initialize / reset 
     281            ll_found(:,:) = .false. 
     282 
     283            IF ( rn_iso_frac - zepsilon > 0. ) THEN 
     284               ! Search for a uniform density/temperature region where adjacent levels           
     285               ! differ by less than rn_iso_frac * deltaT.                                       
     286               ! ik_iso is the index of the last level in the uniform layer   
     287               ! ll_found indicates whether the mixed layer depth can be found by interpolation  
     288               ik_iso(:,:)   = ik_ref(:,:)  
     289               DO jj = 1, nlcj  
     290                  DO ji = 1, nlci  
     291!CDIR NOVECTOR  
     292                     DO jk = ik_ref(ji,jj), ikmt(ji,jj)-1  
     293                        IF ( zmoddT(ji,jj,jk) > ( rn_iso_frac * zdelta_T(ji,jj) ) ) THEN  
     294                           ik_iso(ji,jj)   = jk  
     295                           ll_found(ji,jj) = ( zmoddT(ji,jj,jk) > zdelta_T(ji,jj) )  
     296                           EXIT  
     297                        END IF  
     298                     END DO  
     299                  END DO  
     300               END DO  
     301 
     302               ! Use linear interpolation to find depth of mixed layer base where possible  
     303               hmld_zint(:,:,jn) = rn_zref  
     304               DO jj = 1, jpj  
     305                  DO ji = 1, jpi  
     306                     IF (ll_found(ji,jj) .and. tmask(ji,jj,1) == 1.0) THEN  
     307                        zdz =  abs( zdelta_T(ji,jj) / zdTdz(ji,jj,ik_iso(ji,jj)) )  
     308                        hmld_zint(ji,jj,jn) = gdept_n(ji,jj,ik_iso(ji,jj)) + zdz  
     309                     END IF  
     310                  END DO  
     311               END DO  
     312            END IF 
     313 
     314            ! If ll_found = .false. then calculate MLD using difference of zdelta_T     
     315            ! from the reference density/temperature  
     316 
     317! Prevent this section from working on land points  
     318            WHERE ( tmask(:,:,1) /= 1.0 )  
     319               ll_found = .true.  
     320            END WHERE  
     321 
     322            DO jk=1, jpk  
     323               ll_belowml(:,:,jk) = abs( zT(:,:,jk) - zT_ref(:,:) ) >= zdelta_T(:,:)   
     324            END DO  
     325 
     326! Set default value where interpolation cannot be used (ll_found=false)   
     327            DO jj = 1, jpj  
     328               DO ji = 1, jpi  
     329                  IF ( .not. ll_found(ji,jj) )  hmld_zint(ji,jj,jn) = gdept_n(ji,jj,ikmt(ji,jj))  
     330               END DO  
     331            END DO  
     332 
     333            DO jj = 1, jpj  
     334               DO ji = 1, jpi  
     335!CDIR NOVECTOR  
     336                  DO jk = ik_ref(ji,jj)+1, ikmt(ji,jj)  
     337                     IF ( ll_found(ji,jj) ) EXIT  
     338                     IF ( ll_belowml(ji,jj,jk) ) THEN                 
     339                        zT_b = zT_ref(ji,jj) + zdelta_T(ji,jj) * SIGN(1.0, zdTdz(ji,jj,jk-1) )  
     340                        zdT  = zT_b - zT(ji,jj,jk-1)                                       
     341                        zdz  = zdT / zdTdz(ji,jj,jk-1)                                        
     342                        hmld_zint(ji,jj,jn) = gdept_n(ji,jj,jk-1) + zdz  
     343                        EXIT                                                    
     344                     END IF  
     345                  END DO  
     346               END DO  
     347            END DO  
     348 
     349            hmld_zint(:,:,jn) = hmld_zint(:,:,jn)*tmask(:,:,1)  
     350         END IF 
     351      END DO 
     352      !   
     353   END SUBROUTINE zdf_mxl_zint_mld 
     354 
     355   SUBROUTINE zdf_mxl_zint_htc( kt ) 
     356      !!---------------------------------------------------------------------- 
     357      !!                  ***  ROUTINE zdf_mxl_zint_htc  *** 
     358      !!  
     359      !! ** Purpose :    
     360      !! 
     361      !! ** Method  :    
     362      !!---------------------------------------------------------------------- 
     363 
     364      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     365 
     366      INTEGER :: ji, jj, jk, jn 
     367      INTEGER :: ikmax 
     368      REAL(wp) :: zc, zcoef 
     369      ! 
     370      INTEGER,  ALLOCATABLE, DIMENSION(:,:) ::   ilevel 
     371      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zthick_0, zthick 
     372 
     373      !!---------------------------------------------------------------------- 
     374 
     375      IF( .NOT. ALLOCATED(ilevel) ) THEN 
     376         ALLOCATE( ilevel(jpi,jpj), zthick_0(jpi,jpj), & 
     377         &         zthick(jpi,jpj), STAT=ji ) 
     378         IF( lk_mpp  )   CALL mpp_sum( 'zdfmxl', ji ) 
     379         IF( ji /= 0 )   CALL ctl_stop( 'STOP', 'zdf_mxl_zint_htc : unable to allocate arrays' ) 
     380      ENDIF 
     381 
     382      DO jn=1, nn_mld_diag 
     383         IF( cmld_mld(jn) ) THEN 
     384            ! Find last whole model T level above the MLD 
     385            ilevel(:,:)   = 0 
     386            zthick_0(:,:) = 0._wp 
     387 
     388            DO jk = 1, jpkm1   
     389               DO jj = 1, jpj 
     390                  DO ji = 1, jpi                     
     391                     zthick_0(ji,jj) = zthick_0(ji,jj) + e3t_n(ji,jj,jk) 
     392                     IF( zthick_0(ji,jj) < hmld_zint(ji,jj,jn) )   ilevel(ji,jj) = jk 
     393                  END DO 
     394               END DO 
     395               WRITE(numout,*) 'zthick_0(jk =',jk,') =',zthick_0(2,2) 
     396               WRITE(numout,*) 'gdepw_n(jk+1 =',jk+1,') =',gdepw_n(2,2,jk+1) 
     397            END DO 
     398 
     399            ! Surface boundary condition 
     400            IF( ln_linssh ) THEN  ;   zthick(:,:) = sshn(:,:)   ;   htc_mld(:,:,jn) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,1) 
     401            ELSE                  ;   zthick(:,:) = 0._wp       ;   htc_mld(:,:,jn) = 0._wp                                    
     402            ENDIF 
     403 
     404            ! Deepest whole T level above the MLD 
     405            ikmax = MIN( MAXVAL( ilevel(:,:) ), jpkm1 ) 
     406 
     407            ! Integration down to last whole model T level 
     408            DO jk = 1, ikmax 
     409               DO jj = 1, jpj 
     410                  DO ji = 1, jpi 
     411                     zc = e3t_n(ji,jj,jk) * REAL( MIN( MAX( 0, ilevel(ji,jj) - jk + 1 ) , 1  )  )    ! 0 below ilevel 
     412                     zthick(ji,jj) = zthick(ji,jj) + zc 
     413                     htc_mld(ji,jj,jn) = htc_mld(ji,jj,jn) + zc * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) 
     414                  END DO 
     415               END DO 
     416            END DO 
     417 
     418            ! Subsequent partial T level 
     419            zthick(:,:) = hmld_zint(:,:,jn) - zthick(:,:)   !   remaining thickness to reach MLD 
     420 
     421            DO jj = 1, jpj 
     422               DO ji = 1, jpi 
     423                  htc_mld(ji,jj,jn) = htc_mld(ji,jj,jn) + tsn(ji,jj,ilevel(ji,jj)+1,jp_tem)  &  
     424            &                      * MIN( e3t_n(ji,jj,ilevel(ji,jj)+1), zthick(ji,jj) ) * tmask(ji,jj,ilevel(ji,jj)+1) 
     425               END DO 
     426            END DO 
     427 
     428            WRITE(numout,*) 'htc_mld(after) =',htc_mld(2,2,jn) 
     429 
     430            ! Convert to heat content 
     431            zcoef = rau0 * rcp 
     432            htc_mld(:,:,jn) = zcoef * htc_mld(:,:,jn) 
     433         END IF 
     434      END DO 
     435 
     436   END SUBROUTINE zdf_mxl_zint_htc 
     437 
     438   SUBROUTINE zdf_mxl_zint( kt ) 
     439      !!---------------------------------------------------------------------- 
     440      !!                  ***  ROUTINE zdf_mxl_zint  *** 
     441      !!  
     442      !! ** Purpose :    
     443      !! 
     444      !! ** Method  :    
     445      !!---------------------------------------------------------------------- 
     446 
     447      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     448 
     449      INTEGER :: ios 
     450      INTEGER :: jn 
     451 
     452      CHARACTER(len=1) :: cmld 
     453 
     454      TYPE(MXL_ZINT) :: sn_mld1, sn_mld2, sn_mld3, sn_mld4, sn_mld5 
     455      TYPE(MXL_ZINT), SAVE, DIMENSION(MAX_DIAG) ::   mld_diags 
     456 
     457      NAMELIST/namzdf_mldzint/ nn_mld_diag, sn_mld1, sn_mld2, sn_mld3, sn_mld4, sn_mld5 
     458 
     459      !!---------------------------------------------------------------------- 
     460       
     461      IF( kt == nit000 ) THEN 
     462         REWIND( numnam_ref )              ! Namelist namzdf_mldzint in reference namelist  
     463         READ  ( numnam_ref, namzdf_mldzint, IOSTAT = ios, ERR = 901) 
     464901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_mldzint in reference namelist' ) 
     465 
     466         REWIND( numnam_cfg )              ! Namelist namzdf_mldzint in configuration namelist  
     467         READ  ( numnam_cfg, namzdf_mldzint, IOSTAT = ios, ERR = 902 ) 
     468902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_mldzint in configuration namelist' ) 
     469         IF(lwm) WRITE ( numond, namzdf_mldzint ) 
     470 
     471         WRITE(cmld,'(I1)') MAX_DIAG  
     472         IF( nn_mld_diag > MAX_DIAG )   CALL ctl_stop( 'STOP', 'zdf_mxl_ini: Specify no more than ', 'cmld', ' MLD definitions' ) 
     473 
     474         mld_diags(1) = sn_mld1 
     475         mld_diags(2) = sn_mld2 
     476         mld_diags(3) = sn_mld3 
     477         mld_diags(4) = sn_mld4 
     478         mld_diags(5) = sn_mld5 
     479 
     480         cmld_zint=.false. 
     481         cmld_mld=.false. 
     482         IF( nn_mld_diag > 0 ) THEN 
     483            IF( lwp ) THEN 
     484               WRITE(numout,*) '=============== Vertically-interpolated mixed layer ================' 
     485               WRITE(numout,*) '(Diagnostic number, nn_mld_type, rn_zref, rn_dT_crit, rn_iso_frac)' 
     486            END IF 
     487 
     488            DO jn = 1, nn_mld_diag 
     489               ! Check if the diagnostics is being written to the output 
     490               WRITE(cmld,'(I1)') jn 
     491               IF( iom_use( "mldzint_"//cmld ) ) cmld_zint(jn)=.true.  
     492               IF( iom_use( "mldhtc_"//cmld ) )  cmld_mld(jn) =.true.  
     493 
     494               IF( lwp ) THEN 
     495                  WRITE(numout,*) 'MLD criterion',jn,':' 
     496                  WRITE(numout,*) '    nn_mld_type =', mld_diags(jn)%mld_type 
     497                  WRITE(numout,*) '    rn_zref ='    , mld_diags(jn)%zref 
     498                  WRITE(numout,*) '    rn_dT_crit =' , mld_diags(jn)%dT_crit 
     499                  WRITE(numout,*) '    rn_iso_frac =', mld_diags(jn)%iso_frac 
     500               END IF 
     501            END DO 
     502            WRITE(numout,*) '====================================================================' 
     503         ENDIF 
     504      ENDIF 
     505 
     506      IF( nn_mld_diag > 0 ) THEN 
     507         CALL zdf_mxl_zint_mld( mld_diags ) 
     508         CALL zdf_mxl_zint_htc( kt ) 
     509 
     510         DO jn = 1, nn_mld_diag 
     511            WRITE(cmld,'(I1)') jn 
     512            IF( cmld_zint(jn) ) THEN 
     513               CALL iom_put( "mldzint_"//cmld, hmld_zint(:,:,jn) ) 
     514            ENDIF 
     515 
     516            IF( cmld_mld(jn) )  THEN 
     517               CALL iom_put( "mldhtc_"//cmld , htc_mld(:,:,jn)   ) 
     518            ENDIF 
     519         END DO 
     520      ENDIF 
     521 
     522   END SUBROUTINE zdf_mxl_zint 
    142523 
    143524   !!====================================================================== 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/step.F90

    r14075 r15783  
    207207      IF( ln_diaptr  )   CALL dia_ptr                 ! Poleward adv/ldf TRansports diagnostics 
    208208      IF( ln_diaharm )   CALL dia_harm( kstp )        ! Tidal harmonic analysis 
     209                         CALL dia_prod( kstp )        ! ocean model: product diagnostics 
    209210                         CALL dia_wri ( kstp )        ! ocean model: outputs 
    210211      ! 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/OCE/step_oce.F90

    r14075 r15783  
    8080   USE diahsb          ! heat, salt and volume budgets    (dia_hsb routine) 
    8181   USE diaharm 
     82   USE diaprod 
    8283   USE diacfl 
    8384   USE diaobs          ! Observation operator 
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_wadcpl/src/SAS/sbcssm.F90

    r14075 r15783  
    7777      REAL(wp) ::   ztinta     ! ratio applied to after  records when doing time interpolation 
    7878      REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation 
    79       !!---------------------------------------------------------------------- 
     79      CHARACTER(len=4),SAVE :: stype 
     80      !!--------------------------------------------------------------------- 
     81      IF( kt == nit000 ) THEN 
     82         IF( ln_TEOS10 ) THEN 
     83            stype='abs'   ! teos-10: using absolute salinity (sst is converted to potential temperature for the surface module) 
     84         ELSE IF( ln_EOS80  ) THEN 
     85            stype='pra'   ! eos-80: using practical salinity 
     86         ELSE IF ( ln_SEOS) THEN 
     87            stype='seos' ! seos using Simplified Equation of state (sst is converted to potential temperature for the surface module) 
     88         ENDIF 
     89      ENDIF 
    8090      ! 
    8191      IF( ln_timing )   CALL timing_start( 'sbc_ssm') 
     
    144154         CALL iom_put( 'ssu_m', ssu_m ) 
    145155         CALL iom_put( 'ssv_m', ssv_m ) 
    146          CALL iom_put( 'sst_m', sst_m ) 
    147          CALL iom_put( 'sss_m', sss_m ) 
     156         CALL iom_put( 'sst_m_pot', sst_m ) 
     157         CALL iom_put( 'sss_m_'//stype, sss_m ) 
    148158         CALL iom_put( 'ssh_m', ssh_m ) 
    149159         IF( .NOT.ln_linssh )   CALL iom_put( 'e3t_m', e3t_m ) 
Note: See TracChangeset for help on using the changeset viewer.