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

Changeset 12276


Ignore:
Timestamp:
2019-12-20T12:14:26+01:00 (5 years ago)
Author:
cetlod
Message:

trunk : merge in some cmip6 diagnostics into the trunk before copying it to release-4.0.2(-head). SETTE tests are OK and the is no difference with the revision 12248

Location:
NEMO/trunk
Files:
22 added
2 deleted
60 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/AGRIF_DEMO/EXPREF/1_context_nemo.xml

    r9930 r12276  
    55--> 
    66<context id="1_nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
    20     <field_definition src="./field_def_nemo-ice.xml"/>    <!--  NEMO sea-ice model      --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     23    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      --> 
     24 
    2125 
    2226<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
    24     <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
    25     <!--  
    26 ============================================================================================================ 
    27 = grid definition = = DO NOT CHANGE = 
    28 ============================================================================================================ 
    29     --> 
    30      
    31     <axis_definition> 
    32       <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" /> 
    33       <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" /> 
    34       <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" /> 
    35       <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" /> 
    36       <axis id="nfloat"  long_name="Float number"       unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"       unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              /> 
    41     </axis_definition> 
     27    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
     28    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO ocean sea ice                      --> 
     29 
     30<!-- Axis definition --> 
     31    <axis_definition src="./axis_def_nemo.xml"/> 
    4232  
     33<!-- Domain definition --> 
    4334    <domain_definition src="./domain_def_nemo.xml"/> 
     35 
     36<!-- Grids definition --> 
     37    <grid_definition   src="./grid_def_nemo.xml"/> 
    4438   
    45     <grid_definition src="./grid_def_nemo.xml"/> 
    4639 
    4740</context> 
  • NEMO/trunk/cfgs/AGRIF_DEMO/EXPREF/2_context_nemo.xml

    r9930 r12276  
    55--> 
    66<context id="2_nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
    20     <field_definition src="./field_def_nemo-ice.xml"/>    <!--  NEMO sea-ice model      --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     23    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      --> 
     24 
    2125 
    2226<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
    24     <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
    25     <!--  
    26 ============================================================================================================ 
    27 = grid definition = = DO NOT CHANGE = 
    28 ============================================================================================================ 
    29     --> 
    30      
    31     <axis_definition> 
    32       <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" /> 
    33       <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" /> 
    34       <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" /> 
    35       <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" /> 
    36       <axis id="nfloat"  long_name="Float number"       unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"       unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              /> 
    41     </axis_definition> 
     27    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
     28    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO ocean sea ice                      --> 
     29 
     30<!-- Axis definition --> 
     31    <axis_definition src="./axis_def_nemo.xml"/> 
    4232  
     33<!-- Domain definition --> 
    4334    <domain_definition src="./domain_def_nemo.xml"/> 
     35 
     36<!-- Grids definition --> 
     37    <grid_definition   src="./grid_def_nemo.xml"/> 
    4438   
    45     <grid_definition src="./grid_def_nemo.xml"/> 
    4639 
    4740</context> 
  • NEMO/trunk/cfgs/AGRIF_DEMO/EXPREF/3_context_nemo.xml

    r9930 r12276  
    55--> 
    66<context id="3_nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
    20     <field_definition src="./field_def_nemo-ice.xml"/>    <!--  NEMO sea-ice model      --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     23    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      --> 
     24 
    2125 
    2226<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
    24     <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
    25     <!--  
    26 ============================================================================================================ 
    27 = grid definition = = DO NOT CHANGE = 
    28 ============================================================================================================ 
    29     --> 
    30      
    31     <axis_definition> 
    32       <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" /> 
    33       <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" /> 
    34       <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" /> 
    35       <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" /> 
    36       <axis id="nfloat"  long_name="Float number"       unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"       unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              /> 
    41     </axis_definition> 
     27    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
     28    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO ocean sea ice                      --> 
     29 
     30<!-- Axis definition --> 
     31    <axis_definition src="./axis_def_nemo.xml"/> 
    4232  
     33<!-- Domain definition --> 
    4334    <domain_definition src="./domain_def_nemo.xml"/> 
     35 
     36<!-- Grids definition --> 
     37    <grid_definition   src="./grid_def_nemo.xml"/> 
    4438   
    45     <grid_definition src="./grid_def_nemo.xml"/> 
    4639 
    4740</context> 
  • NEMO/trunk/cfgs/AGRIF_DEMO/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
    20     <field_definition src="./field_def_nemo-ice.xml"/>    <!--  NEMO sea-ice model      --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     23    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      --> 
     24 
    2125 
    2226<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
    24     <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
    25     <!--  
    26 ============================================================================================================ 
    27 = grid definition = = DO NOT CHANGE = 
    28 ============================================================================================================ 
    29     --> 
    30      
    31     <axis_definition> 
    32       <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" /> 
    33       <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" /> 
    34       <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" /> 
    35       <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" /> 
    36       <axis id="nfloat"  long_name="Float number"       unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"       unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              /> 
    41       <axis id="deptht_surface" axis_ref="deptht" >  
    42    <zoom_axis begin=" 1 " n=" 1 " />  
    43       </axis> 
    44     </axis_definition> 
     27    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
     28    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO ocean sea ice                      --> 
     29 
     30<!-- Axis definition --> 
     31    <axis_definition src="./axis_def_nemo.xml"/> 
    4532  
     33<!-- Domain definition --> 
    4634    <domain_definition src="./domain_def_nemo.xml"/> 
     35 
     36<!-- Grids definition --> 
     37    <grid_definition   src="./grid_def_nemo.xml"/> 
    4738   
    48     <grid_definition src="./grid_def_nemo.xml"/> 
    4939 
    5040</context> 
  • NEMO/trunk/cfgs/AMM12/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>      <!--  NEMO ocean dynamics                     --> 
    2023 
    2124<!-- Files definition --> 
    2225    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
    23     <!--  
    24 ============================================================================================================ 
    25 = grid definition = = DO NOT CHANGE = 
    26 ============================================================================================================ 
    27     --> 
    28      
    29     <axis_definition> 
    30       <axis id="deptht"  long_name="Vertical T levels" unit="m" positive="down" /> 
    31       <axis id="depthu"  long_name="Vertical U levels" unit="m" positive="down" /> 
    32       <axis id="depthv"  long_name="Vertical V levels" unit="m" positive="down" /> 
    33       <axis id="depthw"  long_name="Vertical W levels" unit="m" positive="down" /> 
    34       <axis id="nfloat"  long_name="Float number"      unit="-"                 /> 
    35       <axis id="icbcla"  long_name="Iceberg class"     unit="1"                 /> 
    36       <axis id="ncatice" long_name="Ice category"      unit="1"                 /> 
    37       <axis id="iax_20C" long_name="20 degC isotherm"  unit="degC"              /> 
    38       <axis id="iax_28C" long_name="28 degC isotherm"  unit="degC"              /> 
    39       <axis id="deptht_surface" axis_ref="deptht" >  
    40    <zoom_axis begin=" 1 " n=" 1 " />  
    41       </axis> 
    42     </axis_definition> 
     26 
     27<!-- Axis definition --> 
     28    <axis_definition src="./axis_def_nemo.xml"/> 
    4329  
     30<!-- Domain definition --> 
    4431    <domain_definition src="./domain_def_nemo.xml"/> 
     32 
     33<!-- Grids definition --> 
     34    <grid_definition   src="./grid_def_nemo.xml"/> 
    4535   
    46     <grid_definition src="./grid_def_nemo.xml"/> 
    4736 
    4837</context> 
  • NEMO/trunk/cfgs/C1D_PAPA/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
     8 
    89<!-- Fields definition --> 
    910    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     
    1112<!-- Files definition --> 
    1213    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
    13     <!--  
    14 ============================================================================================================ 
    15 = grid definition = = DO NOT CHANGE = 
    16 ============================================================================================================ 
    17     --> 
    18      
    19     <axis_definition> 
    20       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    21       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    22       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    23       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    24       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    25       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    26       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    27       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    28       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
    29       <axis id="deptht_surface" axis_ref="deptht" >  
    30    <zoom_axis begin=" 1 " n=" 1 " />  
    31       </axis> 
    32     </axis_definition> 
     14 
     15<!-- Axis definition --> 
     16    <axis_definition src="./axis_def_nemo.xml"/> 
    3317  
     18<!-- Domain definition --> 
    3419    <domain_definition src="./domain_def_nemo.xml"/> 
     20 
     21<!-- Grids definition --> 
     22    <grid_definition   src="./grid_def_nemo.xml"/> 
    3523   
    36     <grid_definition src="./grid_def_nemo.xml"/> 
    37      
     24 
    3825</context> 
  • NEMO/trunk/cfgs/GYRE_BFM/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>      <!--  NEMO ocean dynamics                     --> 
    2023    <field_definition src="./field_def_nemo-pisces.xml"/>   <!--  NEMO ocean dynamics                     --> 
    2124 
     25 
    2226<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo.xml"/>      
    24     <!--  
    25 ============================================================================================================ 
    26 = grid definition = = DO NOT CHANGE = 
    27 ============================================================================================================ 
    28     --> 
    29      
    30     <axis_definition> 
    31       <axis id="deptht"  long_name="Vertical T levels" unit="m" positive="down" /> 
    32       <axis id="depthu"  long_name="Vertical U levels" unit="m" positive="down" /> 
    33       <axis id="depthv"  long_name="Vertical V levels" unit="m" positive="down" /> 
    34       <axis id="depthw"  long_name="Vertical W levels" unit="m" positive="down" /> 
    35       <axis id="nfloat"  long_name="Float number"      unit="-"                 /> 
    36       <axis id="icbcla"  long_name="Iceberg class"     unit="1"                 /> 
    37       <axis id="ncatice" long_name="Ice category"      unit="1"                 /> 
    38       <axis id="iax_20C" long_name="20 degC isotherm"  unit="degC"              /> 
    39       <axis id="iax_28C" long_name="28 degC isotherm"  unit="degC"              /> 
    40       <axis id="deptht_surface" axis_ref="deptht" >  
    41    <zoom_axis begin=" 1 " n=" 1 " />  
    42       </axis> 
    43     </axis_definition> 
     27    <file_definition src="./file_def_nemo.xml"/>     <!--  NEMO ocean dynamics                     --> 
     28 
     29<!-- Axis definition --> 
     30    <axis_definition src="./axis_def_nemo.xml"/> 
    4431  
     32<!-- Domain definition --> 
    4533    <domain_definition src="./domain_def_nemo.xml"/> 
     34 
     35<!-- Grids definition --> 
     36    <grid_definition   src="./grid_def_nemo.xml"/> 
    4637   
    47     <grid_definition src="./grid_def_nemo.xml"/> 
    4838 
    4939</context> 
  • NEMO/trunk/cfgs/GYRE_PISCES/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>      <!--  NEMO ocean dynamics                     --> 
    2023    <field_definition src="./field_def_nemo-pisces.xml"/>   <!--  NEMO ocean dynamics                     --> 
    2124 
     25 
    2226<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo.xml"/>      
    24     <!--  
    25 ============================================================================================================ 
    26 = grid definition = = DO NOT CHANGE = 
    27 ============================================================================================================ 
    28     --> 
    29      
    30     <axis_definition> 
    31       <axis id="deptht"  long_name="Vertical T levels" unit="m" positive="down" /> 
    32       <axis id="depthu"  long_name="Vertical U levels" unit="m" positive="down" /> 
    33       <axis id="depthv"  long_name="Vertical V levels" unit="m" positive="down" /> 
    34       <axis id="depthw"  long_name="Vertical W levels" unit="m" positive="down" /> 
    35       <axis id="nfloat"  long_name="Float number"      unit="-"                 /> 
    36       <axis id="icbcla"  long_name="Iceberg class"     unit="1"                 /> 
    37       <axis id="ncatice" long_name="Ice category"      unit="1"                 /> 
    38       <axis id="iax_20C" long_name="20 degC isotherm"  unit="degC"              /> 
    39       <axis id="iax_28C" long_name="28 degC isotherm"  unit="degC"              /> 
    40       <axis id="deptht_surface" axis_ref="deptht" >  
    41    <zoom_axis begin=" 1 " n=" 1 " />  
    42       </axis> 
    43     </axis_definition> 
     27    <file_definition src="./file_def_nemo.xml"/>     <!--  NEMO ocean dynamics                     --> 
     28 
     29<!-- Axis definition --> 
     30    <axis_definition src="./axis_def_nemo.xml"/> 
    4431  
     32<!-- Domain definition --> 
    4533    <domain_definition src="./domain_def_nemo.xml"/> 
     34 
     35<!-- Grids definition --> 
     36    <grid_definition   src="./grid_def_nemo.xml"/> 
    4637   
    47     <grid_definition src="./grid_def_nemo.xml"/> 
    4838 
    4939</context> 
  • NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     -->  
    20     <field_definition src="./field_def_nemo-ice.xml"/>    <!--  NEMO sea-ice model      -->  
    21     <field_definition src="./field_def_nemo-pisces.xml"/> <!--  NEMO ocean biology      -->  
     22    <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
     23    <field_definition src="./field_def_nemo-ice.xml"/>    <!--  NEMO sea-ice model      --> 
     24    <field_definition src="./field_def_nemo-pisces.xml"/> <!--  NEMO ocean biology      --> 
    2225 
    2326<!-- Files definition --> 
    24     <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      -->  
    25     <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       -->  
    26     <file_definition src="./file_def_nemo-pisces.xml"/>  <!--  NEMO ocean biology       -->  
    27     <!--  
    28 ============================================================================================================ 
    29 = grid definition = = DO NOT CHANGE = 
    30 ============================================================================================================ 
    31     --> 
    32      
    33     <axis_definition> 
    34       <axis id="deptht"  long_name="Vertical T levels" unit="m" positive="down" /> 
    35       <axis id="depthu"  long_name="Vertical U levels" unit="m" positive="down" /> 
    36       <axis id="depthv"  long_name="Vertical V levels" unit="m" positive="down" /> 
    37       <axis id="depthw"  long_name="Vertical W levels" unit="m" positive="down" /> 
    38       <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down"/> 
    39       <axis id="nfloat"  long_name="Float number"      unit="-"                 /> 
    40       <axis id="icbcla"  long_name="Iceberg class"     unit="1"                 /> 
    41       <axis id="ncatice" long_name="Ice category"      unit="1"                 /> 
    42       <axis id="iax_20C" long_name="20 degC isotherm"  unit="degC"              /> 
    43       <axis id="iax_28C" long_name="28 degC isotherm"  unit="degC"              /> 
    44       <axis id="deptht_surface" axis_ref="deptht" >  
    45    <zoom_axis begin=" 1 " n=" 1 " />  
    46       </axis> 
    47     </axis_definition> 
     27    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
     28    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
     29    <file_definition src="./file_def_nemo-pisces.xml"/>  <!--  NEMO ocean biology       --> 
     30 
     31 
     32<!-- Axis definition --> 
     33    <axis_definition src="./axis_def_nemo.xml"/> 
    4834  
     35<!-- Domain definition --> 
    4936    <domain_definition src="./domain_def_nemo.xml"/> 
     37 
     38<!-- Grids definition --> 
     39    <grid_definition   src="./grid_def_nemo.xml"/> 
    5040   
    51     <grid_definition src="./grid_def_nemo.xml"/> 
    52      
     41 
    5342</context> 
  • NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml

    r11536 r12276  
    117117      
    118118   </file_group> 
     119 
     120   <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files --> 
     121     <!-- To compute transport through straits : need to read ice mask at ice iteration at freq_offset = 1mo - nn_fsbc 
     122        <file id="file23" name_suffix="_strait_ice" description="transport variables through straits" > 
     123          <field field_ref="strait_mifl"      name="simassacrossline"  freq_offset="1mo-4ts" /> 
     124          <field field_ref="strait_msfl"      name="snmassacrossline"  freq_offset="1mo-4ts" /> 
     125          <field field_ref="strait_arfl"      name="siareaacrossline"  freq_offset="1mo-4ts" /> 
     126        </file> 
     127     --> 
     128    </file_group> 
     129 
     130   <!-- To compute transport through straits : need to read ice mask at ice iteration at freq_offset = - nn_fsbc + 1 
     131     <file id="maskMFO" name="maskMFO" enabled="true" mode="read" output_freq="1mo" cyclic="true"  > 
     132      <field id="maskMFO_u_ice" operation="instant"  freq_offset="-3ts"  grid_ref="grid_U_4strait_ice" /> 
     133      <field id="maskMFO_v_ice" operation="instant"  freq_offset="-3ts"  grid_ref="grid_V_4strait_ice" /> 
     134     </file> 
     135     --> 
     136 
    119137    
    120138   <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     
    124142   <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files --> 
    125143   <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->         
    126    <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files --> 
    127144   <file_group id="2m"  output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files --> 
    128145   <file_group id="3m"  output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files --> 
  • NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml

    r11536 r12276  
    100100 
    101101      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files --> 
     102 
     103 
     104        <file id="file16" name_suffix="_diaptr2D" description="zonal mean variables" > 
     105          <field field_ref="sophtove"    name="htovovrt"      grid_ref="grid_ptr_T_2D"  /> 
     106          <field field_ref="sopstove"    name="sltovovrt"     grid_ref="grid_ptr_T_2D"  /> 
     107          <field field_ref="sophtgyre"   name="htovgyre"      grid_ref="grid_ptr_T_2D"  /> 
     108          <field field_ref="sopstgyre"   name="sltogyre"      grid_ref="grid_ptr_T_2D"  /> 
     109          <field field_ref="sophtbtr"    name="htbtr"         grid_ref="grid_ptr_T_2D"  /> 
     110          <field field_ref="sopstbtr"    name="sltbtr"        grid_ref="grid_ptr_T_2D"  /> 
     111          <field field_ref="sophtadv"    name="htadv"         grid_ref="grid_ptr_T_2D"  /> 
     112          <field field_ref="sopstadv"    name="sltadv"        grid_ref="grid_ptr_T_2D"  /> 
     113          <field field_ref="sophtldf"    name="htldf"         grid_ref="grid_ptr_T_2D"  /> 
     114          <field field_ref="sopstldf"    name="sltldf"        grid_ref="grid_ptr_T_2D"  /> 
     115          <field field_ref="sophtvtr"    name="hfbasin"       grid_ref="grid_ptr_T_2D"  /> 
     116          <field field_ref="sopstvtr"    name="sltbasin"      grid_ref="grid_ptr_T_2D"  /> 
     117          <field field_ref="sophteiv"    name="hfbasinpmadv"  grid_ref="grid_ptr_T_2D"  /> 
     118          <field field_ref="sopsteiv"    name="sltbasinpmadv" grid_ref="grid_ptr_T_2D"  /> 
     119        </file> 
     120 
     121 
     122         <file id="file17" name_suffix="_diaptr3D" description="zonal mean variables" > 
     123          <field field_ref="zomsf"       name="msftyz"        grid_ref="grid_ptr_W_3D"  /> 
     124          <field field_ref="zotem"       name="znltem"        grid_ref="grid_ptr_T_3D"  /> 
     125          <field field_ref="zosal"       name="znlsal"        grid_ref="grid_ptr_T_3D"  /> 
     126          <field field_ref="zosrf"       name="znlsrf"        grid_ref="grid_ptr_T_3D"  /> 
     127        </file> 
     128 
     129      <!--   
     130         <file id="file18" name_suffix="_strait_oce" description="transport variables through straits" > 
     131           <field field_ref="masstr_strait"        name="mfo"               /> 
     132         </file>        
     133      --> 
     134 
    102135      </file_group> 
     136 
     137 
     138      <!--  To compute transport through straits : need to read mask file ( every month is the best otherwise costly ) 
     139      <file id="maskMFO"  name="maskMFO" enabled="true" mode="read" output_freq="1mo" cyclic="true"  > 
     140        <field id="maskMFO_u" operation="instant" freq_offset="1mo" grid_ref="grid_U_4strait" /> 
     141        <field id="maskMFO_v" operation="instant" freq_offset="1mo" grid_ref="grid_V_4strait" /> 
     142      </file> 
     143 
     144    --> 
     145 
    103146 
    104147      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 
  • NEMO/trunk/cfgs/ORCA2_OFF_PISCES/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>   <!--  Ocean biology                     --> 
    20     <field_definition src="./field_def_nemo-pisces.xml"/>   <!--  Ocean biology                     --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
     23    <field_definition src="./field_def_nemo-pisces.xml"/> <!--  NEMO ocean biology      --> 
    2124 
    2225<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo.xml"/>     <!--  NEMO ocean dynamics                     --> 
    24     <!--  
    25 ============================================================================================================ 
    26 = grid definition = = DO NOT CHANGE = 
    27 ============================================================================================================ 
    28     --> 
    29      
    30     <axis_definition> 
    31       <axis id="deptht"  long_name="Vertical T levels" unit="m" positive="down" /> 
    32       <axis id="depthu"  long_name="Vertical U levels" unit="m" positive="down" /> 
    33       <axis id="depthv"  long_name="Vertical V levels" unit="m" positive="down" /> 
    34       <axis id="depthw"  long_name="Vertical W levels" unit="m" positive="down" /> 
    35       <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down"/> 
    36       <axis id="nfloat"  long_name="Float number"      unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"     unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"      unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"  unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"  unit="degC"              /> 
    41       <axis id="deptht_surface" axis_ref="deptht" >  
    42    <zoom_axis begin=" 1 " n=" 1 " />  
    43       </axis> 
    44     </axis_definition> 
     26    <file_definition src="./file_def_nemo-pisces.xml"/>  <!--  NEMO ocean biology       --> 
     27 
     28 
     29<!-- Axis definition --> 
     30    <axis_definition src="./axis_def_nemo.xml"/> 
    4531  
     32<!-- Domain definition --> 
    4633    <domain_definition src="./domain_def_nemo.xml"/> 
     34 
     35<!-- Grids definition --> 
     36    <grid_definition   src="./grid_def_nemo.xml"/> 
    4737   
    48     <grid_definition src="./grid_def_nemo.xml"/> 
    49      
     38 
    5039</context> 
  • NEMO/trunk/cfgs/ORCA2_OFF_TRC/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    19     <field_definition src="./field_def_nemo-oce.xml"/>   <!--  Ocean biology                     --> 
    20     <field_definition src="./field_def_nemo-innerttrc.xml"/>   <!--  Ocean biology                     --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
     23    <field_definition src="./field_def_nemo-innerttrc.xml"/> <!--  NEMO ocean biology      --> 
    2124 
    2225<!-- Files definition --> 
    23     <file_definition src="./file_def_nemo.xml"/>     <!--  NEMO ocean dynamics                     --> 
    24     <!--  
    25 ============================================================================================================ 
    26 = grid definition = = DO NOT CHANGE = 
    27 ============================================================================================================ 
    28     --> 
    29      
    30     <axis_definition> 
    31       <axis id="deptht"  long_name="Vertical T levels" unit="m" positive="down" /> 
    32       <axis id="depthu"  long_name="Vertical U levels" unit="m" positive="down" /> 
    33       <axis id="depthv"  long_name="Vertical V levels" unit="m" positive="down" /> 
    34       <axis id="depthw"  long_name="Vertical W levels" unit="m" positive="down" /> 
    35       <axis id="nfloat"  long_name="Float number"      unit="-"                 /> 
    36       <axis id="icbcla"  long_name="Iceberg class"     unit="1"                 /> 
    37       <axis id="ncatice" long_name="Ice category"      unit="1"                 /> 
    38       <axis id="iax_20C" long_name="20 degC isotherm"  unit="degC"              /> 
    39       <axis id="iax_28C" long_name="28 degC isotherm"  unit="degC"              /> 
    40       <axis id="deptht_surface" axis_ref="deptht" >  
    41    <zoom_axis begin=" 1 " n=" 1 " />  
    42       </axis> 
    43     </axis_definition> 
     26    <file_definition src="./file_def_nemo-innerttrc.xml"/>  <!--  NEMO ocean biology       --> 
     27 
     28 
     29<!-- Axis definition --> 
     30    <axis_definition src="./axis_def_nemo.xml"/> 
    4431  
     32<!-- Domain definition --> 
    4533    <domain_definition src="./domain_def_nemo.xml"/> 
     34 
     35<!-- Grids definition --> 
     36    <grid_definition   src="./grid_def_nemo.xml"/> 
    4637   
    47     <grid_definition src="./grid_def_nemo.xml"/> 
    48      
     38 
    4939</context> 
  • NEMO/trunk/cfgs/ORCA2_SAS_ICE/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    1922    <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
     
    2326    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
    2427    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
    25     <!--  
    26 ============================================================================================================ 
    27 = grid definition = = DO NOT CHANGE = 
    28 ============================================================================================================ 
    29     --> 
    30      
    31     <axis_definition> 
    32       <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" /> 
    33       <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" /> 
    34       <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" /> 
    35       <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" /> 
    36       <axis id="nfloat"  long_name="Float number"       unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"       unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              /> 
    41       <axis id="deptht_surface" axis_ref="deptht" >  
    42    <zoom_axis begin=" 1 " n=" 1 " />  
    43       </axis> 
    44     </axis_definition> 
     28 
     29 
     30<!-- Axis definition --> 
     31    <axis_definition src="./axis_def_nemo.xml"/> 
    4532  
     33<!-- Domain definition --> 
    4634    <domain_definition src="./domain_def_nemo.xml"/> 
     35 
     36<!-- Grids definition --> 
     37    <grid_definition   src="./grid_def_nemo.xml"/> 
    4738   
    48     <grid_definition src="./grid_def_nemo.xml"/> 
    4939 
    5040</context> 
  • NEMO/trunk/cfgs/SHARED/domain_def_nemo.xml

    r11536 r12276  
    99       <zoom_domain ibegin="1" jbegin="1" ni="2" nj="3"/> 
    1010     </domain> 
     11 
     12      <domain id="1point" domain_ref="grid_T" > 
     13         <zoom_domain ibegin="139" jbegin="119" ni="1" nj="1"/> 
     14      </domain> 
     15 
    1116 
    1217     <!--   Eq section --> 
     
    176181     <domain id="EqW" domain_ref="grid_W" > <zoom_domain id="EqW"/> </domain> 
    177182 
    178       
    179      <!--   zonal mean grid   --> 
    180      <domain id="gznl" long_name="gznl"/> 
    181      <domain id="znl_T" domain_ref="gznl" > <zoom_domain id="znl_T"/> </domain> 
    182      <domain id="znl_W" domain_ref="gznl" > <zoom_domain id="znl_W"/> </domain> 
     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> 
    183190 
    184191      
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-ice.xml

    r11575 r12276  
    228228 
    229229     <!-- momentum (advection) --> 
    230      <field id="xmtrpice"     long_name="X-component of ice mass transport"                       standard_name="ice_x_transport"                       unit="kg/s" /> 
     230        <field id="xmtrpice"     long_name="X-component of ice mass transport"                       standard_name="ice_x_transport"                       unit="kg/s" /> 
    231231          <field id="ymtrpice"     long_name="Y-component of ice mass transport"                       standard_name="ice_y_transport"                       unit="kg/s" /> 
    232232          <field id="xmtrpsnw"     long_name="X-component of snw mass transport"                       standard_name="snw_x_transport"                       unit="kg/s" /> 
     
    235235          <field id="yatrp"        long_name="Y-component of ice area transport"                       standard_name="area_y_transport"                      unit="m2/s" /> 
    236236          <field id="xmtrptot"     long_name="X-component of sea-ice mass transport"                   standard_name="sea_ice_x_transport"                   unit="kg/s" > xmtrpice + xmtrpsnw </field> 
    237           <field id="ymtrptot"     long_name="Y-component of sea-ice mass transport"                   standard_name="sea_ice_y_transport"                   unit="kg/s" > ymtrpice + ymtrpsnw </field> 
    238      
     237        <field id="ymtrptot"     long_name="Y-component of sea-ice mass transport"                   standard_name="sea_ice_y_transport"                   unit="kg/s" > ymtrpice + ymtrpsnw </field> 
     238 
     239     <!-- Ice transport through straits" --> 
     240         <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> 
     241         <field id="xmtrpice_section"                                                                                     grid_ref="grid_U_scalar"  > xmtrpice_ave </field> 
     242         <field id="xmtrpice_strait"                                                        field_ref="xmtrpice_section"  grid_ref="grid_U_4strait_ice"  /> 
     243         <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> 
     244 
     245         <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> 
     246         <field id="ymtrpice_section"                                                                                     grid_ref="grid_V_scalar"  > ymtrpice_ave </field> 
     247         <field id="ymtrpice_strait"                                                        field_ref="ymtrpice_section"  grid_ref="grid_V_4strait_ice"  /> 
     248    <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> 
     249 
     250         <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> 
     251         <field id="xmtrpsnw_section"                                                                                     grid_ref="grid_U_scalar"  > xmtrpsnw_ave </field> 
     252         <field id="xmtrpsnw_strait"                                                        field_ref="xmtrpsnw_section"  grid_ref="grid_U_4strait_ice"  /> 
     253         <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> 
     254 
     255         <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> 
     256         <field id="ymtrpsnw_section"                                                                                     grid_ref="grid_V_scalar"  > ymtrpsnw_ave </field> 
     257         <field id="ymtrpsnw_strait"                                                        field_ref="ymtrpsnw_section"  grid_ref="grid_V_4strait_ice"  /> 
     258    <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> 
     259 
     260         <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> 
     261         <field id="xatrp_section"                                                                                        grid_ref="grid_U_scalar"  > xatrp_ave </field> 
     262         <field id="xatrp_strait"                                                           field_ref="xatrp_section"     grid_ref="grid_U_4strait_ice"  /> 
     263         <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> 
     264 
     265         <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> 
     266         <field id="yatrp_section"                                                                                        grid_ref="grid_V_scalar"  > yatrp_ave </field> 
     267         <field id="yatrp_strait"                                                           field_ref="yatrp_section"     grid_ref="grid_V_4strait_ice"  /> 
     268    <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> 
     269 
     270         <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> 
     271         <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> 
     272    <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> 
     273 
    239274   </field_group> <!-- SBC_2D --> 
    240275 
     
    296331          <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"    /> 
    297332 
    298      <!-- available later --> 
    299      <!-- 
    300           <field id="strait_mifl"     long_name="Sea ice mass flux through straits"      standard_name="sea_ice_mass_transport_across_line" unit="kg/s"  grid_ref="grid_4strait" /> 
    301           <field id="strait_arfl"     long_name="Sea ice area flux through straits"      standard_name="sea_ice_area_transport_across_line" unit="m2/s"  grid_ref="grid_4strait" />   
    302           <field id="strait_msfl"     long_name="Sea ice snow flux through straits"      standard_name="snow_mass_transport_across_line"    unit="kg/s"  grid_ref="grid_4strait" /> 
    303           --> 
    304333   </field_group> 
    305334   
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml

    r12206 r12276  
    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="e3t_surf"     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  
     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"/>  
     25        <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" /> 
     27   <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"/>  
    2529        <field id="toce"         long_name="temperature"                         standard_name="sea_water_potential_temperature"   unit="degC"     grid_ref="grid_T_3D"/> 
    2630        <field id="toce_e3t"     long_name="temperature (thickness weighted)"                                                      unit="degC"     grid_ref="grid_T_3D" > toce * e3t </field > 
    2731        <field id="soce"         long_name="salinity"                            standard_name="sea_water_practical_salinity"      unit="1e-3"     grid_ref="grid_T_3D"/> 
    2832        <field id="soce_e3t"     long_name="salinity    (thickness weighted)"                                                      unit="1e-3"     grid_ref="grid_T_3D" > soce * e3t </field > 
     33 
     34        <field id="toce_e3t_300"      field_ref="toce_e3t"          unit="degree_C"     grid_ref="grid_T_zoom_300"      detect_missing_value="true" /> 
     35        <field id="toce_e3t_vsum300"  field_ref="toce_e3t_300"      unit="degress_C*m"  grid_ref="grid_T_vsum"  detect_missing_value="true" /> 
     36        <field id="toce_vmean300"     field_ref="toce_e3t_vsum300"  unit="degree_C"     grid_ref="grid_T_vsum"  detect_missing_value="true" > toce_e3t_vsum300/e3t_vsum300 </field> 
     37 
    2938 
    3039        <!-- t-eddy viscosity coefficients (ldfdyn) --> 
     
    5362        <field id="taubot"       long_name="bottom stress module"                                                                                   unit="N/m2"     />  
    5463 
     64         <!-- Case EOS = TEOS-10 : output potential temperature --> 
     65   <field id="toce_pot"     long_name="Sea Water Potential Temperature"              standard_name="sea_water_potential_temperature"   unit="degC"     grid_ref="grid_T_3D"/> 
     66        <field id="sst_pot"      long_name="potential sea surface temperature"             standard_name="sea_surface_temperature"             unit="degC"     /> 
     67        <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" /> 
     68 
     69 
    5570        <field id="ssh"          long_name="sea surface height"                                 standard_name="sea_surface_height_above_geoid"             unit="m" /> 
    5671        <field id="ssh2"         long_name="square of sea surface height"                       standard_name="square_of_sea_surface_height_above_geoid"   unit="m2" > ssh * ssh </field > 
     
    92107        <field id="topthdep"     long_name="Top of Thermocline Depth (dT = -0.2 wrt 10m)"   standard_name="ocean_mixed_layer_thickness_defined_by_temperature"                                unit="m"                         /> 
    93108        <field id="pycndep"      long_name="Pycnocline Depth (dsigma[dT=-0.2] wrt 10m)"     standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"                                unit="m"                         /> 
    94         <field id="BLT"          long_name="Barrier Layer Thickness"                                                                                                                          unit="m"                          > topthdep - pycndep </field> 
     109        <field id="BLT"          long_name="Barrier Layer Thickness"                                                                                                                          unit="m"   > topthdep - pycndep </field> 
    95110        <field id="tinv"         long_name="Max of vertical invertion of temperature"                                                                                                         unit="degC"                      /> 
    96111        <field id="depti"        long_name="Depth of max. vert. inv. of temperature"                                                                                                          unit="m"                         /> 
    97         <field id="20d"          long_name="Depth of 20C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"      axis_ref="iax_20C" /> 
    98         <field id="28d"          long_name="Depth of 28C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"      axis_ref="iax_28C" /> 
     112   <field id="20d"          long_name="Depth of 20C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"   axis_ref="iax_20C" /> 
     113        <field id="26d"          long_name="Depth of 26C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"   axis_ref="iax_26C"   /> 
     114        <field id="28d"          long_name="Depth of 28C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"   axis_ref="iax_28C" /> 
    99115        <field id="hc300"        long_name="Heat content 0-300m"                            standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      /> 
     116        <field id="hc700"        long_name="Heat content 0-700m"                            standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      /> 
     117        <field id="hc2000"       long_name="Heat content 0-2000m"                           standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      /> 
    100118 
    101119        <!-- variables available with diaar5 --> 
     
    302320 
    303321          <!-- available if key_oasis3 + conservative method --> 
    304           <field id="rain"          long_name="Liquid precipitation"                                     standard_name="rainfall_flux"                                                                 unit="kg/m2/s"  /> 
     322     <field id="rain"          long_name="Liquid precipitation"                                     standard_name="rainfall_flux"                                                                 unit="kg/m2/s"  /> 
     323          <field id="rain_ao_cea"   long_name="Liquid precipitation over ice-free ocean (cell average)"  standard_name="rainfall_flux"                                                                 unit="kg/m2/s"  /> 
    305324          <field id="evap_ao_cea"   long_name="Evaporation over ice-free ocean (cell average)"           standard_name="water_evaporation_flux"                                                        unit="kg/m2/s"  /> 
    306325          <field id="isnwmlt_cea"   long_name="Snow over Ice melting (cell average)"                     standard_name="surface_snow_melt_flux"                                                        unit="kg/m2/s"  /> 
     
    343362   </field_group> 
    344363    
     364   <!-- scalar variables --> 
     365   <field_group id="SBC_0D"  grid_ref="grid_1point" > 
     366   </field_group> 
    345367 
    346368      </field_group> <!-- SBC --> 
     
    349371       
    350372      <field_group id="grid_U"   grid_ref="grid_U_2D"> 
    351         <field id="e3u"          long_name="U-cell thickness"                                       standard_name="cell_thickness"              unit="m"          grid_ref="grid_U_3D" /> 
    352         <field id="e3u_0"        long_name="Initial U-cell thickness"                               standard_name="ref_cell_thickness"          unit="m"          grid_ref="grid_U_3D"/> 
    353         <field id="utau"         long_name="Wind Stress along i-axis"                               standard_name="surface_downward_x_stress"   unit="N/m2"                            /> 
    354         <field id="uoce"         long_name="ocean current along i-axis"                             standard_name="sea_water_x_velocity"        unit="m/s"        grid_ref="grid_U_3D" /> 
    355         <field id="uoce_e3u"     long_name="ocean current along i-axis  (thickness weighted)"                                                   unit="m/s"        grid_ref="grid_U_3D"  > uoce * e3u </field> 
     373        <field id="e2u"           long_name="U-cell width in meridional direction"                   standard_name="cell_width"                  unit="m"                               /> 
     374        <field id="e3u"           long_name="U-cell thickness"                                       standard_name="cell_thickness"              unit="m"          grid_ref="grid_U_3D" /> 
     375        <field id="e3u_0"         long_name="Initial U-cell thickness"                               standard_name="ref_cell_thickness"          unit="m"          grid_ref="grid_U_3D"/> 
     376        <field id="utau"          long_name="Wind Stress along i-axis"                               standard_name="surface_downward_x_stress"   unit="N/m2"                            /> 
     377        <field id="uoce"          long_name="ocean current along i-axis"                             standard_name="sea_water_x_velocity"        unit="m/s"        grid_ref="grid_U_3D" /> 
     378      <field id="uoce_e3u"      long_name="ocean current along i-axis  (thickness weighted)"                                                   unit="m/s"        grid_ref="grid_U_3D"  > uoce * e3u </field> 
     379      <field id="uoce_e3u_vsum" long_name="ocean current along i-axis * e3u summed on the vertical"  field_ref="uoce_e3u"    unit="m3/s"       grid_ref="grid_U_vsum"/> 
     380        <field id="uocetr_vsum"   long_name="ocean transport along i-axis  summed on the vertical"         field_ref="e2u"       unit="m3/s"> this * uoce_e3u_vsum  </field>  
     381 
     382        <field id="uocetr_vsum_op"    long_name="ocean current along i-axis * e3u * e2u summed on the vertical"  read_access="true"  freq_op="1mo"    field_ref="e2u"       unit="m3/s"> @uocetr_vsum </field> 
     383        <field id="uocetr_vsum_cumul" long_name="ocean current along i-axis * e3u * e2u cumulated from southwest point" freq_offset="_reset_" operation="instant" freq_op="1mo"  unit="m3/s" />  
     384        <field id="msftbarot"         long_name="ocean_barotropic_mass_streamfunction"   unit="kg s-1" > uocetr_vsum_cumul * $rau0 </field> 
     385 
     386 
    356387        <field id="ssu"          long_name="ocean surface current along i-axis"                                                                 unit="m/s"                             /> 
    357388        <field id="sbu"          long_name="ocean bottom current along i-axis"                                                                  unit="m/s"                             /> 
     
    372403 
    373404        <!-- uoce_eiv: available EIV (ln_ldfeiv=T and ln_ldfeiv_dia=T) --> 
    374         <field id="uoce_eiv"     long_name="EIV ocean current along i-axis"   standard_name="bolus_sea_water_x_velocity"   unit="m/s"   grid_ref="grid_U_3D" /> 
     405      <field id="uoce_eiv"      long_name="EIV ocean current along i-axis"                                  standard_name="bolus_sea_water_x_velocity"                     unit="m/s"   grid_ref="grid_U_3D" /> 
     406        <field id="ueiv_masstr"   long_name="EIV Ocean Mass X Transport"                                      standard_name="bolus_ocean_mass_x_transport"                   unit="kg/s"  grid_ref="grid_U_3D" /> 
     407        <field id="ueiv_heattr"   long_name="ocean bolus heat transport along i-axis"                         standard_name="ocean_heat_x_transport_due_to_bolus_advection"  unit="W"                         /> 
     408        <field id="ueiv_salttr"   long_name="ocean bolus salt transport along i-axis"                         standard_name="ocean_salt_x_transport_due_to_bolus_advection"  unit="Kg"                        /> 
     409        <field id="ueiv_heattr3d" long_name="ocean bolus heat transport along i-axis"                         standard_name="ocean_heat_x_transport_due_to_bolus_advection"  unit="W"     grid_ref="grid_U_3D" /> 
     410        <field id="ueiv_salttr3d" long_name="ocean bolus salt transport along i-axis"                         standard_name="ocean_salt_x_transport_due_to_bolus_advection"  unit="kg"    grid_ref="grid_U_3D" /> 
    375411 
    376412        <!-- uoce_bbl: available with ln_trabbl=T and nn_bbl_adv=1 --> 
     
    386422        <field id="utbl"         long_name="zonal current in the Losh tbl"     unit="m/s" /> 
    387423 
    388         <field id="u_masstr"      long_name="Ocean Mass X Transport"                                          standard_name="ocean_mass_x_transport"                         unit="kg/s" grid_ref="grid_U_3D" /> 
     424        <!-- variables available with diaar5 --> 
     425        <field id="u_masstr"      long_name="Ocean Mass X Transport"                                          standard_name="ocean_mass_x_transport"                         unit="kg/s"  grid_ref="grid_U_3D" /> 
    389426        <field id="u_masstr_vint" long_name="vertical integral of ocean eulerian mass transport along i-axis" standard_name="vertical_integral_of_ocean_mass_x_transport"    unit="kg/s"                      /> 
    390427        <field id="u_heattr"      long_name="ocean eulerian heat transport along i-axis"                      standard_name="ocean_heat_x_transport"                         unit="W"                         /> 
     
    392429        <field id="uadv_heattr"   long_name="ocean advective heat transport along i-axis"                     standard_name="advectice_ocean_heat_x_transport"               unit="W"                         /> 
    393430        <field id="uadv_salttr"   long_name="ocean advective salt transport along i-axis"                     standard_name="advectice_ocean_salt_x_transport"               unit="1e-3*kg/s"                 /> 
    394         <field id="ueiv_heattr"   long_name="ocean bolus heat transport along i-axis"                         standard_name="ocean_heat_x_transport_due_to_bolus_advection"  unit="W"                         /> 
    395         <field id="ueiv_salttr"   long_name="ocean bolus salt transport along i-axis"                         standard_name="ocean_salt_x_transport_due_to_bolus_advection"  unit="Kg"                        /> 
    396         <field id="ueiv_heattr3d" long_name="ocean bolus heat transport along i-axis"                         standard_name="ocean_heat_x_transport_due_to_bolus_advection"  unit="W"    grid_ref="grid_U_3D" /> 
    397         <field id="ueiv_salttr3d" long_name="ocean bolus salt transport along i-axis"                         standard_name="ocean_salt_x_transport_due_to_bolus_advection"  unit="kg"   grid_ref="grid_U_3D" /> 
    398431        <field id="udiff_heattr"  long_name="ocean diffusion heat transport along i-axis"                     standard_name="ocean_heat_x_transport_due_to_diffusion"        unit="W"                         /> 
    399432        <field id="udiff_salttr"  long_name="ocean diffusion salt transport along i-axis"                     standard_name="ocean_salt_x_transport_due_to_diffusion"        unit="1e-3*kg/s"                 /> 
     
    403436       
    404437      <field_group id="grid_V"   grid_ref="grid_V_2D"> 
     438        <field id="e1v"          long_name="V-cell width in longitudinal direction"                 standard_name="cell_width"                  unit="m"                              /> 
    405439        <field id="e3v"          long_name="V-cell thickness"                                       standard_name="cell_thickness"              unit="m"          grid_ref="grid_V_3D" /> 
    406440        <field id="e3v_0"        long_name="Initial V-cell thickness"                               standard_name="ref_cell_thickness"          unit="m"          grid_ref="grid_V_3D" /> 
     
    426460 
    427461        <!-- voce_eiv: available EIV (ln_ldfeiv=T and ln_ldfeiv_dia=T)  --> 
    428         <field id="voce_eiv"     long_name="EIV ocean current along j-axis"   standard_name="bolus_sea_water_y_velocity"   unit="m/s"   grid_ref="grid_V_3D" /> 
     462   <field id="voce_eiv"     long_name="EIV ocean current along j-axis"  standard_name="bolus_sea_water_y_velocity"     unit="m/s"   grid_ref="grid_V_3D" /> 
     463        <field id="veiv_masstr"  long_name="EIV Ocean Mass Y Transport"      standard_name="bolus_ocean_mass_y_transport"   unit="kg/s"  grid_ref="grid_V_3D" /> 
     464        <field id="veiv_heattr"   long_name="ocean bolus heat transport along j-axis"       standard_name="ocean_heat_y_transport_due_to_bolus_advection"   unit="W"                         /> 
     465        <field id="veiv_salttr"   long_name="ocean bolus salt transport along j-axis"       standard_name="ocean_salt_x_transport_due_to_bolus_advection"   unit="Kg"                        /> 
     466        <field id="veiv_heattr3d" long_name="ocean bolus heat transport along j-axis"       standard_name="ocean_heat_y_transport_due_to_bolus_advection"   unit="W"    grid_ref="grid_V_3D" /> 
     467        <field id="veiv_salttr3d" long_name="ocean bolus salt transport along j-axis"       standard_name="ocean_salt_y_transport_due_to_bolus_advection"   unit="kg"   grid_ref="grid_V_3D" /> 
     468 
    429469 
    430470        <!-- voce_bbl: available with ln_trabbl=T and nn_bbl_adv=1 --> 
     
    446486        <field id="vadv_heattr"   long_name="ocean advective heat transport along j-axis"   standard_name="advectice_ocean_heat_y_transport"                unit="W"                         /> 
    447487        <field id="vadv_salttr"   long_name="ocean advective salt transport along j-axis"   standard_name="advectice_ocean_salt_y_transport"                unit="1e-3*kg/s"                 /> 
    448         <field id="veiv_heattr"   long_name="ocean bolus heat transport along j-axis"       standard_name="ocean_heat_y_transport_due_to_bolus_advection"   unit="W"                         /> 
    449         <field id="veiv_salttr"   long_name="ocean bolus salt transport along j-axis"       standard_name="ocean_salt_x_transport_due_to_bolus_advection"   unit="Kg"                        /> 
    450         <field id="veiv_heattr3d" long_name="ocean bolus heat transport along j-axis"       standard_name="ocean_heat_y_transport_due_to_bolus_advection"   unit="W"    grid_ref="grid_V_3D" /> 
    451         <field id="veiv_salttr3d" long_name="ocean bolus salt transport along j-axis"       standard_name="ocean_salt_y_transport_due_to_bolus_advection"   unit="kg"   grid_ref="grid_V_3D" /> 
    452488        <field id="vdiff_heattr"  long_name="ocean diffusion heat transport along j-axis"   standard_name="ocean_heat_y_transport_due_to_diffusion"         unit="W"                         /> 
    453489        <field id="vdiff_salttr"  long_name="ocean diffusion salt transport along j-axis"   standard_name="ocean_salt_y_transport_due_to_diffusion"         unit="1e-3*kg/s"                 /> 
     
    458494      <field_group id="grid_W" grid_ref="grid_W_3D"> 
    459495        <field id="e3w"          long_name="W-cell thickness"                              standard_name="cell_thickness"                         unit="m"    /> 
    460         <field id="woce"         long_name="ocean vertical velocity"                       standard_name="upward_sea_water_velocity"              unit="m/s"  /> 
     496   <field id="woce"         long_name="ocean vertical velocity"                       standard_name="upward_sea_water_velocity"              unit="m/s"  /> 
     497   <field id="woce_e3w"     long_name="ocean vertical velocity * e3w"                                                                        unit="m2/s"  > woce * e3w </field>   
    461498        <field id="wocetr_eff"   long_name="effective ocean vertical transport"                                                                   unit="m3/s" /> 
    462499 
    463500        <!-- woce_eiv: available with EIV  (ln_ldfeiv=T and ln_ldfeiv_dia=T)  --> 
    464501        <field id="woce_eiv"     long_name="EIV ocean vertical velocity"                    standard_name="bolus_upward_sea_water_velocity"       unit="m/s"  /> 
    465  
    466         <field id="avt"          long_name="vertical eddy diffusivity"                      standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" /> 
     502        <field id="weiv_masstr"  long_name="EIV Upward Ocean Mass Transport"  standard_name="bolus_upward_ocean_mass_transport"             unit="kg/s"   /> 
     503        <field id="weiv_heattr3d" long_name="ocean bolus heat transport"    standard_name="ocean_heat_z_transport_due_to_bolus_advection"   unit="W"    /> 
     504        <field id="weiv_salttr3d" long_name="ocean bolus salt transport"    standard_name="ocean_salt_z_transport_due_to_bolus_advection"   unit="kg"   /> 
     505 
     506   <field id="avt"          long_name="vertical eddy diffusivity"                      standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" /> 
     507        <field id="avt_e3w"      long_name="vertical heat diffusivity * e3w"                unit="m3/s" > avt * e3w </field>      
    467508        <field id="logavt"       long_name="logarithm of vertical eddy diffusivity"         standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" /> 
    468509        <field id="avm"          long_name="vertical eddy viscosity"                        standard_name="ocean_vertical_momentum_diffusivity"   unit="m2/s" /> 
     510        <field id="avm_e3w"      long_name="vertical eddy viscosity * e3w"   unit="m3/s" > avm * e3w </field>  
    469511 
    470512        <!-- avs: /= avt with ln_zdfddm=T --> 
    471513        <field id="avs"          long_name="salt vertical eddy diffusivity"                 standard_name="ocean_vertical_salt_diffusivity"       unit="m2/s" /> 
    472         <field id="logavs"       long_name="logarithm of salt vertical eddy diffusivity"    standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" /> 
     514        <field id="avs_e3w"      long_name="vertical salt diffusivity * e3w"   unit="m3/s" > avs * e3w </field>  
     515   <field id="logavs"       long_name="logarithm of salt vertical eddy diffusivity"    standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" /> 
    473516 
    474517        <!-- avt_evd and avm_evd: available with ln_zdfevd --> 
    475518        <field id="avt_evd"      long_name="convective enhancement of vertical diffusivity" standard_name="ocean_vertical_tracer_diffusivity_due_to_convection"     unit="m2/s" /> 
    476         <field id="avm_evd"      long_name="convective enhancement of vertical viscosity"   standard_name="ocean_vertical_momentum_diffusivity_due_to_convection"   unit="m2/s" /> 
     519        <field id="avt_evd_e3w"  long_name="convective enhancement to vertical diffusivity * e3w "    unit="m3/s" > avt_evd * e3w </field>  
     520   <field id="avm_evd"      long_name="convective enhancement of vertical viscosity"   standard_name="ocean_vertical_momentum_diffusivity_due_to_convection"   unit="m2/s" /> 
    477521 
    478522        <!-- avt_tide: available with ln_zdfiwm=T --> 
     
    505549        <field id="masstot"    long_name="global total mass"                            standard_name="sea_water_mass"                                 unit="kg"   /> 
    506550        <field id="temptot"    long_name="global mean temperature"                      standard_name="sea_water_potential_temperature"                unit="degC" /> 
    507         <field id="saltot"     long_name="global mean salinity"                         standard_name="sea_water_salinity"                             unit="1e-3" /> 
    508         <field id="fram_trans" long_name="Sea Ice Mass Transport Through Fram Strait"   standard_name="sea_ice_transport_across_line"                  unit="kg/s" /> 
     551   <field id="saltot"     long_name="global mean salinity"                         standard_name="sea_water_salinity"                             unit="1e-3" /> 
     552        <field id="ssttot"     long_name="global mean sea surface temperature"          standard_name="sea_water_conservative_temperature"             unit="degC" /> 
     553         <!-- EOS = TEOS-10 --> 
     554        <field id="temptot_pot" long_name="global mean potential temperature"            standard_name="sea_water_potential_temperature"               unit="degC" /> 
    509555 
    510556         <!-- available with ln_diahsb --> 
     
    523569        <field id="bgmissal"     long_name="global mean salinity error due to free surface (linssh true)"                                                                          unit="1e-3"     /> 
    524570      </field_group> 
    525        
    526       <!-- variables available with ln_floats --> 
     571 
     572 
     573      <!-- transects --> 
     574      <field_group id="oce_straits"> 
     575         <field id="uoce_e3u_ave"         long_name="Monthly average of u*e3u"                        field_ref="uoce_e3u"                    freq_op="1mo"   freq_offset="_reset_" > @uoce_e3u </field> 
     576         <field id="uoce_e3u_ave_vsum"    long_name="Vertical sum of u*e3u"                           field_ref="uoce_e3u_ave"         grid_ref="grid_U_vsum"     /> 
     577         <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> 
     578         <field id="uocetr_strait"        long_name="Total transport across lines in i-direction"     field_ref="uocetr_vsum_section"  grid_ref="grid_U_4strait" /> 
     579         <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> 
     580 
     581         <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> 
     582         <field id="voce_e3v_ave_vsum"    long_name="Vertical sum of v*e3v"                           field_ref="voce_e3v_ave"         grid_ref="grid_V_vsum"      /> 
     583         <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> 
     584         <field id="vocetr_strait"        long_name="Total transport across lines in j-direction"     field_ref="vocetr_vsum_section"  grid_ref="grid_V_4strait"  /> 
     585         <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> 
     586 
     587         <field id="masstr_strait"        long_name="Sea water transport across line"                                                  grid_ref="grid_4strait"  > u_masstr_strait + v_masstr_strait </field> 
     588      </field_group> 
     589 
     590       
     591      <!-- variables available with key_float --> 
    527592 
    528593      <field_group id="floatvar" grid_ref="grid_T_nfloat"  operation="instant" > 
     
    558623      <!-- Poleward transport : ptr -->      
    559624      <field_group id="diaptr" >   
    560         <field id="zomsfglo"          long_name="Meridional Stream-Function: Global"           unit="Sv"        grid_ref="gznl_W_3D" /> 
    561         <field id="zomsfatl"          long_name="Meridional Stream-Function: Atlantic"         unit="Sv"        grid_ref="gznl_W_3D" /> 
    562         <field id="zomsfpac"          long_name="Meridional Stream-Function: Pacific"          unit="Sv"        grid_ref="gznl_W_3D" /> 
    563         <field id="zomsfind"          long_name="Meridional Stream-Function: Indian"           unit="Sv"        grid_ref="gznl_W_3D" /> 
    564         <field id="zomsfipc"          long_name="Meridional Stream-Function: Pacific+Indian"   unit="Sv"        grid_ref="gznl_W_3D" /> 
    565         <field id="zotemglo"          long_name="Zonal Mean Temperature : Global"              unit="degree_C"  grid_ref="gznl_T_3D" /> 
    566         <field id="zotematl"          long_name="Zonal Mean Temperature : Atlantic"            unit="degree_C"  grid_ref="gznl_T_3D" /> 
    567         <field id="zotempac"          long_name="Zonal Mean Temperature : Pacific"             unit="degree_C"  grid_ref="gznl_T_3D" /> 
    568         <field id="zotemind"          long_name="Zonal Mean Temperature : Indian"              unit="degree_C"  grid_ref="gznl_T_3D" /> 
    569         <field id="zotemipc"          long_name="Zonal Mean Temperature : Pacific+Indian"      unit="degree_C"  grid_ref="gznl_T_3D" /> 
    570         <field id="zosalglo"          long_name="Zonal Mean Salinity : Global"                 unit="0.001"     grid_ref="gznl_T_3D" /> 
    571         <field id="zosalatl"          long_name="Zonal Mean Salinity : Atlantic"               unit="0.001"     grid_ref="gznl_T_3D" /> 
    572         <field id="zosalpac"          long_name="Zonal Mean Salinity : Pacific"                unit="0.001"     grid_ref="gznl_T_3D" /> 
    573         <field id="zosalind"          long_name="Zonal Mean Salinity : Indian"                 unit="0.001"     grid_ref="gznl_T_3D" /> 
    574         <field id="zosalipc"          long_name="Zonal Mean Salinity : Pacific+Indian"         unit="0.001"     grid_ref="gznl_T_3D" /> 
    575         <field id="zosrfglo"          long_name="Zonal Mean Surface"                           unit="m2"        grid_ref="gznl_T_3D" /> 
    576         <field id="zosrfatl"          long_name="Zonal Mean Surface : Atlantic"                unit="m2"        grid_ref="gznl_T_3D" /> 
    577         <field id="zosrfpac"          long_name="Zonal Mean Surface : Pacific"                 unit="m2"        grid_ref="gznl_T_3D" /> 
    578         <field id="zosrfind"          long_name="Zonal Mean Surface : Indian"                  unit="m2"        grid_ref="gznl_T_3D" /> 
    579         <field id="zosrfipc"          long_name="Zonal Mean Surface : Pacific+Indian"          unit="m2"        grid_ref="gznl_T_3D" /> 
    580         <field id="sophtadv"          long_name="Advective Heat Transport"                     unit="PW"        grid_ref="gznl_T_2D" /> 
    581         <field id="sophtadv_atl"      long_name="Advective Heat Transport: Atlantic"           unit="PW"        grid_ref="gznl_T_2D" /> 
    582         <field id="sophtadv_pac"      long_name="Advective Heat Transport: Pacific"            unit="PW"        grid_ref="gznl_T_2D" /> 
    583         <field id="sophtadv_ind"      long_name="Advective Heat Transport: Indian"             unit="PW"        grid_ref="gznl_T_2D" /> 
    584         <field id="sophtadv_ipc"      long_name="Advective Heat Transport: Pacific+Indian"     unit="PW"        grid_ref="gznl_T_2D" /> 
    585         <field id="sophtldf"          long_name="Diffusive Heat Transport"                     unit="PW"        grid_ref="gznl_T_2D" /> 
    586         <field id="sophtldf_atl"      long_name="Diffusive Heat Transport: Atlantic"           unit="PW"        grid_ref="gznl_T_2D" /> 
    587         <field id="sophtldf_pac"      long_name="Diffusive Heat Transport: Pacific"            unit="PW"        grid_ref="gznl_T_2D" /> 
    588         <field id="sophtldf_ind"      long_name="Diffusive Heat Transport: Indian"             unit="PW"        grid_ref="gznl_T_2D" /> 
    589         <field id="sophtldf_ipc"      long_name="Diffusive Heat Transport: Pacific+Indian"     unit="PW"        grid_ref="gznl_T_2D" /> 
    590         <field id="sophtove"          long_name="Overturning Heat Transport"                   unit="PW"        grid_ref="gznl_T_2D" /> 
    591         <field id="sophtove_atl"      long_name="Overturning Heat Transport: Atlantic"         unit="PW"        grid_ref="gznl_T_2D" /> 
    592         <field id="sophtove_pac"      long_name="Overturning Heat Transport: Pacific"          unit="PW"        grid_ref="gznl_T_2D" /> 
    593         <field id="sophtove_ind"      long_name="Overturning Heat Transport: Indian"           unit="PW"        grid_ref="gznl_T_2D" /> 
    594         <field id="sophtove_ipc"      long_name="Overturning Heat Transport: Pacific+Indian"   unit="PW"        grid_ref="gznl_T_2D" /> 
    595         <field id="sophtbtr"          long_name="Barotropic Heat Transport"                    unit="PW"        grid_ref="gznl_T_2D" /> 
    596         <field id="sophtbtr_atl"      long_name="Barotropic Heat Transport: Atlantic"          unit="PW"        grid_ref="gznl_T_2D" /> 
    597         <field id="sophtbtr_pac"      long_name="Barotropic Heat Transport: Pacific"           unit="PW"        grid_ref="gznl_T_2D" /> 
    598         <field id="sophtbtr_ind"      long_name="Barotropic Heat Transport: Indian"            unit="PW"        grid_ref="gznl_T_2D" /> 
    599         <field id="sophtbtr_ipc"      long_name="Barotropic Heat Transport: Pacific+Indian"    unit="PW"        grid_ref="gznl_T_2D" /> 
    600         <field id="sophteiv"          long_name="Heat Transport from mesoscale eddy advection"                     unit="PW"       grid_ref="gznl_T_2D" /> 
    601         <field id="sophteiv_atl"      long_name="Heat Transport from mesoscale eddy advection: Atlantic"           unit="PW"       grid_ref="gznl_T_2D" /> 
    602         <field id="sophteiv_pac"      long_name="Heat Transport from mesoscale eddy advection: Pacific"            unit="PW"       grid_ref="gznl_T_2D" /> 
    603         <field id="sophteiv_ind"      long_name="Heat Transport from mesoscale eddy advection: Indian"             unit="PW"       grid_ref="gznl_T_2D" /> 
    604         <field id="sophteiv_ipc"      long_name="Heat Transport from mesoscale eddy advection: Pacific+Indian"     unit="PW"       grid_ref="gznl_T_2D" /> 
    605         <field id="sopstadv"          long_name="Advective Salt Transport"                     unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    606         <field id="sopstadv_atl"      long_name="Advective Salt Transport: Atlantic"           unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    607         <field id="sopstadv_pac"      long_name="Advective Salt Transport: Pacific"            unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    608         <field id="sopstadv_ind"      long_name="Advective Salt Transport: Indian"             unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    609         <field id="sopstadv_ipc"      long_name="Advective Salt Transport: Pacific+Indian"     unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    610         <field id="sopstove"          long_name="Overturning Salt Transport"                   unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    611         <field id="sopstove_atl"      long_name="Overturning Salt Transport: Atlantic"         unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    612         <field id="sopstove_pac"      long_name="Overturning Salt Transport: Pacific"          unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    613         <field id="sopstove_ind"      long_name="Overturning Salt Transport: Indian"           unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    614         <field id="sopstove_ipc"      long_name="Overturning Salt Transport: Pacific+Indian"   unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    615         <field id="sopstbtr"          long_name="Barotropic Salt Transport"                    unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    616         <field id="sopstbtr_atl"      long_name="Barotropic Salt Transport: Atlantic"          unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    617         <field id="sopstbtr_pac"      long_name="Barotropic Salt Transport: Pacific"           unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    618         <field id="sopstbtr_ind"      long_name="Barotropic Salt Transport: Indian"            unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    619         <field id="sopstbtr_ipc"      long_name="Barotropic Salt Transport: Pacific+Indian"    unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    620         <field id="sopstldf"          long_name="Diffusive Salt Transport"                     unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    621         <field id="sopstldf_atl"      long_name="Diffusive Salt Transport: Atlantic"           unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    622         <field id="sopstldf_pac"      long_name="Diffusive Salt Transport: Pacific"            unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    623         <field id="sopstldf_ind"      long_name="Diffusive Salt Transport: Indian"             unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    624         <field id="sopstldf_ipc"      long_name="Diffusive Salt Transport: Pacific+Indian"     unit="Giga g/s"  grid_ref="gznl_T_2D" /> 
    625         <field id="sopsteiv"          long_name="Salt Transport from mesoscale eddy advection"                     unit="Giga g/s"       grid_ref="gznl_T_2D" /> 
    626         <field id="sopsteiv_atl"      long_name="Salt Transport from mesoscale eddy advection: Atlantic"           unit="Giga g/s"       grid_ref="gznl_T_2D" /> 
    627         <field id="sopsteiv_pac"      long_name="Salt Transport from mesoscale eddy advection: Pacific"            unit="Giga g/s"       grid_ref="gznl_T_2D" /> 
    628         <field id="sopsteiv_ind"      long_name="Salt Transport from mesoscale eddy advection: Indian"             unit="Giga g/s"       grid_ref="gznl_T_2D" /> 
    629         <field id="sopsteiv_ipc"      long_name="Salt Transport from mesoscale eddy advection: Pacific+Indian"     unit="Giga g/s"       grid_ref="gznl_T_2D" />        
    630       </field_group> 
     625        <field id="zomsf"         long_name="Overturning Stream-Function : All basins"                     unit="Sv"         grid_ref="grid_znl_W_3D" /> 
     626        <field id="zotem"         long_name="Zonal Mean Temperature : All basins"                          unit="degree_C"   grid_ref="grid_znl_T_3D" /> 
     627        <field id="zosal"         long_name="Zonal Mean Salinity : All basins"                             unit="0.001"      grid_ref="grid_znl_T_3D" /> 
     628        <field id="zosrf"         long_name="Zonal Mean Surface : All basins"                              unit="m2"         grid_ref="grid_znl_T_3D" /> 
     629        <field id="sophtove"      long_name="Overturning Heat Transport: All basins"                       unit="PW"         grid_ref="grid_znl_T_2D" /> 
     630        <field id="sopstove"      long_name="Overturning Salt Transport: All basins"                       unit="Giga g/s"   grid_ref="grid_znl_T_2D" /> 
     631        <field id="sophtbtr"      long_name="Barotropic Heat Transport: All basins"                        unit="PW"         grid_ref="grid_znl_T_2D" /> 
     632        <field id="sopstbtr"      long_name="Barotropic Salt Transport: All basins"                        unit="Giga g/s"   grid_ref="grid_znl_T_2D" />  
     633        <field id="sophtadv"      long_name="Advective Heat Transport: All basins"                         unit="PW"         grid_ref="grid_znl_T_2D" /> 
     634        <field id="sopstadv"      long_name="Advective Salt Transport: All basins"                         unit="Giga g/s"   grid_ref="grid_znl_T_2D" /> 
     635        <field id="sophtldf"      long_name="Diffusive Heat Transport: All basins"                         unit="PW"         grid_ref="grid_znl_T_2D" /> 
     636        <field id="sopstldf"      long_name="Diffusive Salt Transport: All basins"                         unit="Giga g/s"   grid_ref="grid_znl_T_2D" /> 
     637        <field id="sophtvtr"      long_name="Heat Transport : All basins"                                  unit="PW"         grid_ref="grid_znl_T_2D" /> 
     638        <field id="sopstvtr"      long_name="Salt Transport : All basins"                                  unit="Giga g/s"   grid_ref="grid_znl_T_2D" />   
     639        <field id="sophteiv"      long_name="Heat Transport from mesoscale eddy advection: All basins"     unit="PW"         grid_ref="grid_znl_T_2D" /> 
     640        <field id="sopsteiv"      long_name="Salt Transport from mesoscale eddy advection : All basins"    unit="Giga g/s"   grid_ref="grid_znl_T_2D" /> 
     641   <field id="sopstadv"      long_name="Advective Salt Transport"                                     unit="Giga g/s"   grid_ref="grid_znl_T_2D" /> 
     642        <field id="sophtgyre"     long_name="Overturning heat transport due to gyre" field_ref="sophtove"  unit="W"          grid_ref="grid_znl_T_2D" > sophtvtr - sophtove  </field> 
     643   <field id="sopstgyre"     long_name="Overturning salt transport due to gyre" field_ref="sopstove"  unit="kg/s"       grid_ref="grid_znl_T_2D" > sophtvtr - sopstove  </field> 
     644       </field_group> 
     645 
     646       <field_group id="constant_fields"  grid_ref="grid_T_2D"  operation="once" > 
     647         <field id="bathy"       long_name="Sea floor depth below geoid"               standard_name="sea_floor_depth_below_geoid"               unit="m"/> 
     648         <field id="areacello"   long_name="Horizontal area of ocean grid cells"       standard_name="cell_area"                                 unit="m2" /> 
     649         <field id="hfgeou"      long_name="Upward geothermal heat flux at sea floor"  standard_name="upward_geothermal_heat_flux_at_sea_floor"  unit="W/m2"/> 
     650         <field id="basins"      long_name="ocean tracer region masks"                 standard_name="ocean_tracer_region_masks"   unit="none" grid_ref="grid_basin"  /> 
     651       </field_group> 
     652 
    631653 
    632654    <!--  
     
    661683     <field id="ttrd_totad"    long_name="temperature-trend: total advection"         standard_name="tendency_of_sea_water_salinity_due_to_advection"              unit="degC/s"                        /> 
    662684     <field id="strd_totad"    long_name="salinity   -trend: total advection"         standard_name="tendency_of_sea_water_salinity_due_to_advection"              unit="1e-3/s"                        /> 
    663      <field id="ttrd_sad"      long_name="temperature-trend: surface adv. (linssh true)"                                                                                unit="degC/s"   grid_ref="grid_T_2D" /> 
    664      <field id="strd_sad"      long_name="salinity   -trend: surface adv. (linssh true)"                                                                                unit="1e-3/s"   grid_ref="grid_T_2D" /> 
     685     <field id="ttrd_sad"      long_name="temperature-trend: surface adv. (linssh true)"                                                                           unit="degC/s"   grid_ref="grid_T_2D" /> 
     686     <field id="strd_sad"      long_name="salinity   -trend: surface adv. (linssh true)"                                                                           unit="1e-3/s"   grid_ref="grid_T_2D" /> 
    665687     <field id="ttrd_ldf"      long_name="temperature-trend: lateral  diffusion"      standard_name="tendency_of_sea_water_temperature_due_to_horizontal_mixing"   unit="degC/s"                        /> 
    666688     <field id="strd_ldf"      long_name="salinity   -trend: lateral  diffusion"      standard_name="tendency_of_sea_water_salinity_due_to_horizontal_mixing"      unit="1e-3/s"                        /> 
     
    719741     <field id="ttrd_npc_e3t"      unit="degC/s * m"  >  ttrd_npc * e3t </field> 
    720742     <field id="strd_npc_e3t"      unit="1e-3/s * m"  >  strd_npc * e3t </field> 
    721      <field id="ttrd_qns_e3t"      unit="degC/s * m"  >  ttrd_qns * e3t_surf </field> 
    722      <field id="strd_cdt_e3t"      unit="degC/s * m"  >  strd_cdt * e3t_surf </field> 
     743     <field id="ttrd_qns_e3t"      unit="degC/s * m"  >  ttrd_qns * e3ts </field> 
     744     <field id="strd_cdt_e3t"      unit="degC/s * m"  >  strd_cdt * e3ts </field> 
    723745     <field id="ttrd_qsr_e3t"      unit="degC/s * m"  >  ttrd_qsr * e3t </field> 
    724746     <field id="ttrd_bbc_e3t"      unit="degC/s * m"  >  ttrd_bbc * e3t </field> 
     
    922944    <field_group id="groupU" > 
    923945      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      /> 
    924       <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    /> 
    925946      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" /> 
    926947    </field_group> 
     
    928949    <field_group id="groupV" > 
    929950      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      /> 
    930       <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    /> 
    931951      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" /> 
    932952    </field_group> 
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-pisces.xml

    r11536 r12276  
    230230       <field id="Kg"          long_name="Gas transfer"                            unit="mol/m2/s/uatm"                   /> 
    231231       <field id="Dpco2"       long_name="Delta CO2"                               unit="uatm"                            /> 
     232       <field id="pCO2sea"     long_name="surface ocean pCO2"                      unit="uatm"                            /> 
    232233       <field id="Dpo2"        long_name="Delta O2"                                unit="uatm"                            /> 
    233234       <field id="Heup"        long_name="Euphotic layer depth"                    unit="m"                               /> 
     235       <field id="AtmCo2"      long_name="Atmospheric CO2 concentration"           unit="ppm"                               /> 
    234236       <field id="Irondep"     long_name="Iron deposition from dust"               unit="mol/m2/s"                        /> 
    235237       <field id="Ironsed"     long_name="Iron deposition from sediment"           unit="mol/m2/s"   grid_ref="grid_T_3D" /> 
    236       <field id="FESCAV"      long_name="Scavenging of Iron"                      unit="mmol-Fe/m3/s"   grid_ref="grid_T_3D" /> 
     238       <field id="FESCAV"      long_name="Scavenging of Iron"                      unit="mmol-Fe/m3/s"   grid_ref="grid_T_3D" /> 
    237239       <field id="FECOLL"      long_name="Colloidal Pumping of FeL"                unit="mmol-FeL/m3/s"  grid_ref="grid_T_3D" /> 
    238240       <field id="LGWCOLL"     long_name="Coagulation loss of ligands"             unit="mmol-L/m3/s"  grid_ref="grid_T_3D" /> 
     
    250252       <field id="FEZOO2"      long_name="mesozooplankton iron recycling rate"     unit="nmol-FeL/m3/s"  grid_ref="grid_T_3D" /> 
    251253 
     254       <!-- PISCES tracers trends --> 
     255       <field id="INTdtAlk"    long_name="Vertically int. of change of alkalinity"             unit="mol/m2/s"                       /> 
     256       <field id="INTdtDIC"    long_name="Vertically int. of change of dissic    "             unit="mol/m2/s"                       /> 
     257       <field id="INTdtFer"    long_name="Vertically int. of change of iron      "             unit="mol/m2/s"                       /> 
     258       <field id="INTdtDIN"    long_name="Vertically int. of change of nitrogen  "             unit="mol/m2/s"                       /> 
     259       <field id="INTdtDIP"    long_name="Vertically int. of change of phophate  "             unit="mol/m2/s"                       /> 
     260       <field id="INTdtSil"    long_name="Vertically int. of change of silicon   "             unit="mol/m2/s"                       /> 
     261 
     262 
     263       <!-- dbio_T on T grid : variables available with diaar5 --> 
    252264       <!-- dbio_T on T grid : variables available with diaar5 --> 
    253265       <field id="TPP"         long_name="Total Primary production of phyto"                   unit="mol/m3/s"  grid_ref="grid_T_3D" /> 
     
    257269       <field id="O2MIN"       long_name="Oxygen minimum concentration"                        unit="mol/m3"                          /> 
    258270       <field id="ZO2MIN"      long_name="Depth of oxygen minimum concentration"               unit="m"                              /> 
    259        <field id="INTNFIX"     long_name="Nitrogen fixation rate : vert. integrated"           unit="mol/m2/s"                       /> 
    260        <field id="INTPPPHYN"   long_name="Vertically integrated primary production by nanophy" unit="mol/m2/s"                       /> 
    261        <field id="INTPPPHYD"   long_name="Vertically integrated primary production by diatom"  unit="mol/m2/s"                       /> 
    262        <field id="INTPP"       long_name="Vertically integrated primary production by phyto"   unit="mol/m2/s"                       /> 
    263        <field id="INTPNEW"     long_name="Vertically integrated new primary production"        unit="mol/m2/s"                       /> 
    264        <field id="INTPBFE"     long_name="Vertically integrated of biogenic iron production"   unit="mol/m2/s"                       /> 
    265        <field id="INTPBSI"     long_name="Vertically integrated of biogenic Si production"     unit="mol/m2/s"                       /> 
    266        <field id="INTPCAL"     long_name="Vertically integrated of calcite production"         unit="mol/m2/s"                       /> 
     271 
     272       <field id="INTNFIX"     long_name="Nitrogen fixation rate : vert. integrated"           unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > Nfix * e3t </field > 
     273       <field id="INTPPPHYN"   long_name="Vertically integrated primary production by nanophy" unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > PPPHYN * e3t </field > 
     274       <field id="INTPPPHYD"   long_name="Vertically integrated primary production by diatom"  unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > PPPHYD * e3t </field > 
     275       <field id="INTPPPHYP"   long_name="Vertically integrated primary production by picophy" unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > PPPHYP * e3t </field > 
     276       <field id="INTPP"       long_name="Vertically integrated primary production by phyto"   unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > TPP * e3t </field > 
     277       <field id="INTPNEW"     long_name="Vertically integrated new primary production"        unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > TPNEW * e3t </field > 
     278       <field id="INTPBFE"     long_name="Vertically integrated of biogenic iron production"   unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > TPBFE * e3t </field > 
     279       <field id="INTPBSI"     long_name="Vertically integrated of biogenic Si production"     unit="mol/m2/s"  grid_ref="grid_T_vsum"  detect_missing_value="true" > PBSi * e3t </field > 
    267280 
    268281       <!-- PISCES light : variables available with key_pisces_reduced --> 
  • NEMO/trunk/cfgs/SHARED/grid_def_nemo.xml

    r12213 r12276  
    1  
     1<!-- 
     2============================================================================================================ 
     3= grid definition = = DO NOT CHANGE = 
     4============================================================================================================ 
     5    --> 
     6  
    27    <grid_definition>     
    38 
     
    1823        <!--  --> 
    1924       <grid id="grid_T_3DS" > 
    20          <domain domain_ref="grid_T" /> 
    21          <axis axis_ref="profsed" /> 
     25         <domain id="grid_T" /> 
     26         <axis id="profsed" /> 
    2227       </grid> 
    2328        <!--  --> 
     
    4954       </grid> 
    5055        <!--  --> 
     56       <grid id="grid_1point" > 
     57         <domain domain_ref="1point"/> 
     58       </grid> 
     59        <!--  --> 
    5160       <grid id="grid_T_nfloat" > 
    5261         <domain domain_ref="grid_T" /> 
    5362         <axis axis_ref="nfloat" /> 
    5463       </grid> 
     64        <!--  --> 
     65       <grid id="grid_EqT" > 
     66         <domain domain_ref="EqT" /> 
     67       </grid> 
     68        <!--  --> 
     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 
     105       <grid id="grid_T_SFC"> 
     106         <domain domain_ref="grid_T" /> 
     107         <scalar> 
     108           <extract_axis position="0" /> 
     109         </scalar> 
     110       </grid> 
     111 
     112       <grid id="grid_T_vsum"> 
     113         <domain domain_ref="grid_T"/> 
     114         <scalar> 
     115            <reduce_axis operation="sum" /> 
     116         </scalar> 
     117       </grid> 
     118 
     119       <grid id="grid_U_vsum"> 
     120         <domain domain_ref="grid_U"/> 
     121         <scalar> 
     122            <reduce_axis operation="sum" /> 
     123         </scalar> 
     124       </grid> 
     125 
     126       <grid id="grid_V_vsum"> 
     127         <domain domain_ref="grid_V"/> 
     128         <scalar> 
     129            <reduce_axis operation="sum" /> 
     130         </scalar> 
     131       </grid> 
     132 
     133       <!-- for ORCA2 grid  --> 
     134       <grid id="cumul_U"> 
     135         <axis axis_ref="cumul_U" n_glo="182" > 
     136           <reduce_domain local="true" operation="sum" direction="jDir" /> 
     137           <reduce_axis operation="sum" /> 
     138         </axis> 
     139         <axis axis_ref="depthu" /> 
     140       </grid> 
     141 
     142       <!-- for eORCA1 grid 
     143 
     144       <grid id="cumul_U"> 
     145         <axis axis_ref="cumul_U" n_glo="362" > 
     146           <reduce_domain local="true" operation="sum" direction="jDir" /> 
     147           <reduce_axis operation="sum" /> 
     148         </axis> 
     149         <axis axis_ref="depthu" /> 
     150       </grid> 
     151 
     152      --> 
     153 
     154 
     155       <grid id="grid_T_zoom_300"> 
     156         <domain domain_ref="grid_T" /> 
     157         <axis axis_ref="deptht300" /> 
     158       </grid> 
     159 
     160       <grid id="grid_U_scalar" > 
     161         <domain domain_ref="grid_U" /> 
     162         <scalar/> 
     163       </grid> 
     164 
     165       <grid id="grid_V_scalar" > 
     166         <domain domain_ref="grid_V" /> 
     167         <scalar/> 
     168       </grid> 
     169  
     170       <grid id="grid_U_4strait"> 
     171         <domain domain_ref="grid_U" /> 
     172         <axis axis_ref="section"> 
     173           <duplicate_scalar/> 
     174         </axis> 
     175       </grid> 
     176  
     177       <grid id="grid_V_4strait"> 
     178         <domain domain_ref="grid_V" /> 
     179         <axis axis_ref="section"> 
     180           <duplicate_scalar/> 
     181         </axis> 
     182       </grid> 
     183  
     184       <grid id="grid_U_4strait_hsum"> 
     185         <scalar > 
     186           <reduce_domain operation="sum" local="true"/> 
     187           <reduce_scalar operation="sum" /> 
     188         </scalar> 
     189         <axis axis_ref="section"/> 
     190       </grid> 
     191  
     192       <grid id="grid_V_4strait_hsum"> 
     193         <scalar > 
     194           <reduce_domain operation="sum" local="true"/> 
     195           <reduce_scalar operation="sum" /> 
     196         </scalar> 
     197         <axis axis_ref="section"/> 
     198       </grid> 
     199  
     200       <grid id="grid_4strait"> 
     201         <axis axis_ref="section"/> 
     202       </grid> 
     203 
     204      <grid id="grid_U_4strait_ice"> 
     205        <domain domain_ref="grid_U" /> 
     206        <axis axis_ref="section_ice"> 
     207          <duplicate_scalar/> 
     208        </axis> 
     209      </grid> 
     210 
     211      <grid id="grid_V_4strait_ice"> 
     212        <domain domain_ref="grid_V" /> 
     213        <axis axis_ref="section_ice"> 
     214         <duplicate_scalar/> 
     215        </axis> 
     216      </grid> 
     217 
     218      <grid id="grid_U_4strait_ice_hsum"> 
     219        <scalar > 
     220         <reduce_domain operation="sum" local="true"/> 
     221         <reduce_scalar operation="sum" /> 
     222        </scalar> 
     223        <axis axis_ref="section_ice"/> 
     224      </grid> 
     225 
     226     <grid id="grid_V_4strait_ice_hsum"> 
     227        <scalar > 
     228         <reduce_domain operation="sum" local="true"/> 
     229         <reduce_scalar operation="sum" /> 
     230        </scalar> 
     231        <axis axis_ref="section_ice"/> 
     232     </grid> 
     233 
     234     <grid id="grid_4strait_ice"> 
     235       <axis axis_ref="section_ice"/> 
     236     </grid> 
     237  
    55238      <!-- scalars --> 
    56239      <grid id="grid_scalar" > 
    57240        <scalar/> 
    58241      </grid> 
    59       <!--  -->  
    60       <grid id="grid_T_SFC">  
    61    <domain domain_ref="grid_T" />  
    62    <axis   axis_ref="deptht_surface" />  
    63       </grid>  
    64       <!--  -->  
    65       <grid id="gznl_T_2D">  
    66    <domain domain_ref="ptr" />  
    67       </grid>  
    68       <!--  -->  
    69       <grid id="gznl_T_3D">  
    70    <domain domain_ref="ptr" />  
    71    <axis axis_ref="deptht" />  
    72       </grid>  
    73       <!--  -->  
    74       <grid id="gznl_W_3D">  
    75    <domain domain_ref="ptr" />  
    76    <axis axis_ref="depthw" />  
    77       </grid>  
    78        
    79        
    80     </grid_definition> 
    81      
     242  
     243    </grid_definition>    
     244  
  • NEMO/trunk/cfgs/SHARED/namelist_ref

    r12206 r12276  
    11!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    2 !! NEMO/OCE :   Reference namelist_ref                                !! 
     2s! NEMO/OCE :   Reference namelist_ref                                !! 
    33!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    44!! NEMO/OCE  :  1 - Domain & run manager (namrun, namcfg, namdom, namtsd, namcrs, namc1d, namc1d_uvd) 
     
    392392      ln_sssr_bnd =  .true.   !  flag to bound erp term (associated with nn_sssr=2) 
    393393      rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] 
    394  
     394      nn_sssr_ice =   1       ! control of sea surface restoring under sea-ice 
     395                              ! 0 = no restoration under ice : * (1-icefrac) 
     396                              ! 1 = restoration everywhere 
     397                              ! >1 = enhanced restoration under ice : 1+(nn_icedmp-1)*icefrac 
    395398   cn_dir      = './'      !  root directory for the SST/SSS data location 
    396399   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! 
  • NEMO/trunk/cfgs/SPITZ12/EXPREF/context_nemo.xml

    r12213 r12276  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
    88    <variable_definition> 
    9     <!-- Year of time origin for NetCDF files; defaults to 1800 --> 
    10        <variable id="ref_year" type="int"   > 1800 </variable> 
    11        <variable id="rau0"     type="float" > 1026.0 </variable> 
    12        <variable id="cpocean"  type="float" > 3991.86795711963 </variable> 
    13        <variable id="convSpsu" type="float" > 0.99530670233846  </variable> 
    14        <variable id="rhoic"    type="float" > 917.0 </variable> 
    15        <variable id="rhosn"    type="float" > 330.0 </variable> 
    16        <variable id="missval"  type="float" > 1.e20 </variable> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"   type="float" > 1.e20 </variable> 
    1719    </variable_definition> 
     20 
    1821<!-- Fields definition --> 
    1922    <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
     
    2326    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics      --> 
    2427    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO sea-ice model       --> 
    25     <!--  
    26 ============================================================================================================ 
    27 = grid definition = = DO NOT CHANGE = 
    28 ============================================================================================================ 
    29     --> 
    30      
    31     <axis_definition> 
    32       <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" /> 
    33       <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" /> 
    34       <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" /> 
    35       <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" /> 
    36       <axis id="nfloat"  long_name="Float number"       unit="-"                 /> 
    37       <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 /> 
    38       <axis id="ncatice" long_name="Ice category"       unit="1"                 /> 
    39       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              /> 
    40       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              /> 
    41       <axis id="deptht_surface" axis_ref="deptht" >  
    42    <zoom_axis begin=" 1 " n=" 1 " />  
    43       </axis> 
    44     </axis_definition> 
     28 
     29 
     30<!-- Axis definition --> 
     31    <axis_definition src="./axis_def_nemo.xml"/> 
    4532  
     33<!-- Domain definition --> 
    4634    <domain_definition src="./domain_def_nemo.xml"/> 
     35 
     36<!-- Grids definition --> 
     37    <grid_definition   src="./grid_def_nemo.xml"/> 
    4738   
    48     <grid_definition src="./grid_def_nemo.xml"/> 
    4939 
    5040</context> 
  • NEMO/trunk/src/OCE/DIA/diaar5.F90

    r11993 r12276  
    7171      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
    7272      ! 
    73       INTEGER  ::   ji, jj, jk                      ! dummy loop arguments 
    74       REAL(wp) ::   zvolssh, zvol, zssh_steric, zztmp, zarho, ztemp, zsal, zmass 
     73      INTEGER  ::   ji, jj, jk, iks, ikb                      ! dummy loop arguments 
     74      REAL(wp) ::   zvolssh, zvol, zssh_steric, zztmp, zarho, ztemp, zsal, zmass, zsst 
    7575      REAL(wp) ::   zaw, zbw, zrw 
    7676      ! 
    7777      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zarea_ssh , zbotpres       ! 2D workspace  
    78       REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zpe                         ! 2D workspace  
    79       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   :: zrhd , zrhop               ! 3D workspace 
     78      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zpe, z2d                   ! 2D workspace  
     79      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   :: zrhd , zrhop, ztpot   ! 3D workspace 
    8080      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztsn                       ! 4D workspace 
    8181 
     
    8686 
    8787      IF( l_ar5 ) THEN  
    88          ALLOCATE( zarea_ssh(jpi,jpj) , zbotpres(jpi,jpj) ) 
     88         ALLOCATE( zarea_ssh(jpi,jpj), zbotpres(jpi,jpj), z2d(jpi,jpj) ) 
    8989         ALLOCATE( zrhd(jpi,jpj,jpk) , zrhop(jpi,jpj,jpk) ) 
    9090         ALLOCATE( ztsn(jpi,jpj,jpk,jpts) ) 
     
    9292      ENDIF 
    9393      ! 
     94      CALL iom_put( 'e2u'      , e2u (:,:) ) 
     95      CALL iom_put( 'e1v'      , e1v (:,:) ) 
     96      CALL iom_put( 'areacello', area(:,:) ) 
     97      ! 
     98      IF( iom_use( 'volcello' ) .OR. iom_use( 'masscello' )  ) THEN   
     99         zrhd(:,:,jpk) = 0._wp        ! ocean volume ; rhd is used as workspace 
     100         DO jk = 1, jpkm1 
     101            zrhd(:,:,jk) = area(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk) 
     102         END DO 
     103         CALL iom_put( 'volcello'  , zrhd(:,:,:)  )  ! WARNING not consistent with CMIP DR where volcello is at ca. 2000 
     104         CALL iom_put( 'masscello' , rau0 * e3t_n(:,:,:) * tmask(:,:,:) )  ! ocean mass 
     105      ENDIF  
     106      ! 
     107      IF( iom_use( 'e3tb' ) )  THEN    ! bottom layer thickness 
     108         DO jj = 1, jpj 
     109            DO ji = 1, jpi 
     110               ikb = mbkt(ji,jj) 
     111               z2d(ji,jj) = e3t_n(ji,jj,ikb) 
     112            END DO 
     113         END DO 
     114         CALL iom_put( 'e3tb', z2d ) 
     115      ENDIF  
     116      ! 
    94117      IF( iom_use( 'voltot' ) .OR. iom_use( 'sshtot' )  .OR. iom_use( 'sshdyn' )  ) THEN     
    95118         !                                         ! total volume of liquid seawater 
    96          zvolssh = SUM( zarea_ssh(:,:) )  
    97          CALL mpp_sum( 'diaar5', zvolssh ) 
    98          zvol = vol0 + zvolssh 
     119         zvolssh = glob_sum( 'diaar5', zarea_ssh(:,:) )  
     120         zvol    = vol0 + zvolssh 
    99121       
    100122         CALL iom_put( 'voltot', zvol               ) 
     
    118140               DO ji = 1, jpi 
    119141                  DO jj = 1, jpj 
    120                      zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj) 
     142                     iks = mikt(ji,jj) 
     143                     zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,iks) + riceload(ji,jj) 
    121144                  END DO 
    122145               END DO 
     
    129152         END IF 
    130153         !                                          
    131          zarho = SUM( area(:,:) * zbotpres(:,:) )  
    132          CALL mpp_sum( 'diaar5', zarho ) 
     154         zarho = glob_sum( 'diaar5', area(:,:) * zbotpres(:,:) )  
    133155         zssh_steric = - zarho / area_tot 
    134156         CALL iom_put( 'sshthster', zssh_steric ) 
     
    147169               DO ji = 1,jpi 
    148170                  DO jj = 1,jpj 
    149                      zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj) 
     171                     iks = mikt(ji,jj) 
     172                     zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,iks) + riceload(ji,jj) 
    150173                  END DO 
    151174               END DO 
     
    155178         END IF 
    156179         !     
    157          zarho = SUM( area(:,:) * zbotpres(:,:) )  
    158          CALL mpp_sum( 'diaar5', zarho ) 
     180         zarho = glob_sum( 'diaar5', area(:,:) * zbotpres(:,:) )  
    159181         zssh_steric = - zarho / area_tot 
    160182         CALL iom_put( 'sshsteric', zssh_steric ) 
    161        
    162183         !                                         ! ocean bottom pressure 
    163184         zztmp = rau0 * grav * 1.e-4_wp               ! recover pressure from pressure anomaly and cover to dbar = 1.e4 Pa 
     
    168189 
    169190      IF( iom_use( 'masstot' ) .OR. iom_use( 'temptot' )  .OR. iom_use( 'saltot' )  ) THEN     
    170          !                                         ! Mean density anomalie, temperature and salinity 
    171          ztemp = 0._wp 
    172          zsal  = 0._wp 
    173          DO jk = 1, jpkm1 
    174             DO jj = 1, jpj 
    175                DO ji = 1, jpi 
    176                   zztmp = area(ji,jj) * e3t_n(ji,jj,jk) 
    177                   ztemp = ztemp + zztmp * tsn(ji,jj,jk,jp_tem) 
    178                   zsal  = zsal  + zztmp * tsn(ji,jj,jk,jp_sal) 
    179                END DO 
    180             END DO 
    181          END DO 
    182          IF( ln_linssh ) THEN 
     191          !                                         ! Mean density anomalie, temperature and salinity 
     192          ztsn(:,:,:,:) = 0._wp                    ! ztsn(:,:,1,jp_tem/sal) is used here as 2D Workspace for temperature & salinity 
     193          DO jk = 1, jpkm1 
     194             DO jj = 1, jpj 
     195                DO ji = 1, jpi 
     196                   zztmp = area(ji,jj) * e3t_n(ji,jj,jk) 
     197                   ztsn(ji,jj,1,jp_tem) = ztsn(ji,jj,1,jp_tem) + zztmp * tsn(ji,jj,jk,jp_tem) 
     198                   ztsn(ji,jj,1,jp_sal) = ztsn(ji,jj,1,jp_sal) + zztmp * tsn(ji,jj,jk,jp_sal) 
     199                ENDDO 
     200             ENDDO 
     201          ENDDO 
     202 
     203          IF( ln_linssh ) THEN 
    183204            IF( ln_isfcav ) THEN 
    184205               DO ji = 1, jpi 
    185206                  DO jj = 1, jpj 
    186                      ztemp = ztemp + zarea_ssh(ji,jj) * tsn(ji,jj,mikt(ji,jj),jp_tem)  
    187                      zsal  = zsal  + zarea_ssh(ji,jj) * tsn(ji,jj,mikt(ji,jj),jp_sal)  
     207                     iks = mikt(ji,jj) 
     208                     ztsn(ji,jj,1,jp_tem) = ztsn(ji,jj,1,jp_tem) + zarea_ssh(ji,jj) * tsn(ji,jj,iks,jp_tem)  
     209                     ztsn(ji,jj,1,jp_sal) = ztsn(ji,jj,1,jp_sal) + zarea_ssh(ji,jj) * tsn(ji,jj,iks,jp_sal)  
    188210                  END DO 
    189211               END DO 
    190212            ELSE 
    191                ztemp = ztemp + SUM( zarea_ssh(:,:) * tsn(:,:,1,jp_tem) ) 
    192                zsal  = zsal  + SUM( zarea_ssh(:,:) * tsn(:,:,1,jp_sal) ) 
     213               ztsn(:,:,1,jp_tem) = ztsn(:,:,1,jp_tem) + zarea_ssh(:,:) * tsn(:,:,1,jp_tem)  
     214               ztsn(:,:,1,jp_sal) = ztsn(:,:,1,jp_sal) + zarea_ssh(:,:) * tsn(:,:,1,jp_sal)  
    193215            END IF 
    194216         ENDIF 
    195          IF( lk_mpp ) THEN   
    196             CALL mpp_sum( 'diaar5', ztemp ) 
    197             CALL mpp_sum( 'diaar5', zsal  ) 
    198          END IF 
    199          ! 
    200          zmass = rau0 * ( zarho + zvol )                 ! total mass of liquid seawater 
    201          ztemp = ztemp / zvol                            ! potential temperature in liquid seawater 
    202          zsal  = zsal  / zvol                            ! Salinity of liquid seawater 
     217         ! 
     218         ztemp = glob_sum( 'diaar5', ztsn(:,:,1,jp_tem) ) 
     219         zsal  = glob_sum( 'diaar5', ztsn(:,:,1,jp_sal) ) 
     220         zmass = rau0 * ( zarho + zvol )       
    203221         ! 
    204222         CALL iom_put( 'masstot', zmass ) 
    205          CALL iom_put( 'temptot', ztemp ) 
    206          CALL iom_put( 'saltot' , zsal  ) 
    207          ! 
     223         CALL iom_put( 'temptot', ztemp / zvol ) 
     224         CALL iom_put( 'saltot' , zsal  / zvol ) 
     225         ! 
     226      ENDIF      
     227 
     228      IF( ln_teos10 ) THEN        ! ! potential temperature (TEOS-10 case) 
     229         IF( iom_use( 'toce_pot') .OR. iom_use( 'temptot_pot' ) .OR. iom_use( 'sst_pot' )  & 
     230                                  .OR. iom_use( 'ssttot' ) .OR.  iom_use( 'tosmint_pot' ) ) THEN 
     231            ! 
     232            ALLOCATE( ztpot(jpi,jpj,jpk) ) 
     233            ztpot(:,:,jpk) = 0._wp 
     234            DO jk = 1, jpkm1 
     235               ztpot(:,:,jk) = eos_pt_from_ct( tsn(:,:,jk,jp_tem), tsn(:,:,jk,jp_sal) ) 
     236            END DO 
     237            ! 
     238            CALL iom_put( 'toce_pot', ztpot(:,:,:) )  ! potential temperature (TEOS-10 case) 
     239            CALL iom_put( 'sst_pot' , ztpot(:,:,1) )  ! surface temperature 
     240            ! 
     241            IF( iom_use( 'temptot_pot' ) ) THEN   ! Output potential temperature in case we use TEOS-10 
     242               z2d(:,:) = 0._wp 
     243               DO jk = 1, jpkm1 
     244                 z2d(:,:) = z2d(:,:) + area(:,:) * e3t_n(:,:,jk) * ztpot(:,:,jk) 
     245               END DO 
     246               ztemp = glob_sum( 'diaar5', z2d(:,:)  )  
     247               CALL iom_put( 'temptot_pot', ztemp / zvol ) 
     248             ENDIF 
     249             ! 
     250             IF( iom_use( 'ssttot' ) ) THEN   ! Output potential temperature in case we use TEOS-10 
     251               zsst = glob_sum( 'diaar5',  area(:,:) * ztpot(:,:,1)  )  
     252               CALL iom_put( 'ssttot', zsst / area_tot ) 
     253             ENDIF 
     254             ! Vertical integral of temperature 
     255             IF( iom_use( 'tosmint_pot') ) THEN 
     256               z2d(:,:) = 0._wp 
     257               DO jk = 1, jpkm1 
     258                  DO jj = 1, jpj 
     259                     DO ji = 1, jpi   ! vector opt. 
     260                        z2d(ji,jj) = z2d(ji,jj) + rau0 * e3t_n(ji,jj,jk) *  ztpot(ji,jj,jk) 
     261                     END DO 
     262                  END DO 
     263               END DO 
     264               CALL iom_put( 'tosmint_pot', z2d )  
     265            ENDIF 
     266            DEALLOCATE( ztpot ) 
     267        ENDIF 
     268      ELSE        
     269         IF( iom_use('ssttot') ) THEN   ! Output sst in case we use EOS-80 
     270            zsst  = glob_sum( 'diaar5', area(:,:) * tsn(:,:,1,jp_tem) ) 
     271            CALL iom_put('ssttot', zsst / area_tot ) 
     272         ENDIF 
    208273      ENDIF 
    209274 
    210275      IF( iom_use( 'tnpeo' )) THEN     
    211       ! Work done against stratification by vertical mixing 
    212       ! Exclude points where rn2 is negative as convection kicks in here and 
    213       ! work is not being done against stratification 
     276        ! Work done against stratification by vertical mixing 
     277        ! Exclude points where rn2 is negative as convection kicks in here and 
     278        ! work is not being done against stratification 
    214279         ALLOCATE( zpe(jpi,jpj) ) 
    215280         zpe(:,:) = 0._wp 
     
    219284                  DO ji = 1, jpi 
    220285                     IF( rn2(ji,jj,jk) > 0._wp ) THEN 
    221                         zrw =   ( gdepw_n(ji,jj,jk  ) - gdept_n(ji,jj,jk) )   & 
    222                            &  / ( gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk) ) 
    223 !!gm  this can be reduced to :  (depw-dept) / e3w   (NB idem dans bn2 !) 
    224 !                        zrw =   ( gdept_n(ji,jj,jk) - gdepw_n(ji,jj,jk) ) / e3w_n(ji,jj,jk) 
    225 !!gm end 
     286                        zrw = ( gdept_n(ji,jj,jk) - gdepw_n(ji,jj,jk) ) / e3w_n(ji,jj,jk) 
    226287                        ! 
    227288                        zaw = rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem)* zrw 
    228289                        zbw = rab_n(ji,jj,jk,jp_sal) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_sal)* zrw 
    229290                        ! 
    230                         zpe(ji, jj) = zpe(ji, jj)            & 
     291                        zpe(ji, jj) = zpe(ji,jj)   & 
    231292                           &        -  grav * (  avt(ji,jj,jk) * zaw * (tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) )  & 
    232293                           &                   - avs(ji,jj,jk) * zbw * (tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) ) ) 
     
    239300               DO ji = 1, jpi 
    240301                  DO jj = 1, jpj 
    241                      zpe(ji,jj) = zpe(ji,jj) + avt(ji, jj, jk) * MIN(0._wp,rn2(ji, jj, jk)) * rau0 * e3w_n(ji, jj, jk) 
     302                     zpe(ji,jj) = zpe(ji,jj) + avt(ji,jj,jk) * MIN(0._wp,rn2(ji,jj,jk)) * rau0 * e3w_n(ji,jj,jk) 
    242303                  END DO 
    243304               END DO 
    244305            END DO 
    245306         ENDIF 
    246 !!gm useless lbc_lnk since the computation above is performed over 1:jpi & 1:jpj 
    247 !!gm           CALL lbc_lnk( 'diaar5', zpe, 'T', 1._wp)          
    248307          CALL iom_put( 'tnpeo', zpe ) 
    249308          DEALLOCATE( zpe ) 
     
    251310 
    252311      IF( l_ar5 ) THEN 
    253         DEALLOCATE( zarea_ssh , zbotpres ) 
     312        DEALLOCATE( zarea_ssh , zbotpres, z2d ) 
    254313        DEALLOCATE( zrhd      , zrhop    ) 
    255314        DEALLOCATE( ztsn                 ) 
     
    287346       CALL lbc_lnk( 'diaar5', z2d, 'U', -1. ) 
    288347       IF( cptr == 'adv' ) THEN 
    289           IF( ktra == jp_tem ) CALL iom_put( "uadv_heattr" , rau0_rcp * z2d )  ! advective heat transport in i-direction 
    290           IF( ktra == jp_sal ) CALL iom_put( "uadv_salttr" , rau0     * z2d )  ! advective salt transport in i-direction 
     348          IF( ktra == jp_tem ) CALL iom_put( 'uadv_heattr' , rau0_rcp * z2d )  ! advective heat transport in i-direction 
     349          IF( ktra == jp_sal ) CALL iom_put( 'uadv_salttr' , rau0     * z2d )  ! advective salt transport in i-direction 
    291350       ENDIF 
    292351       IF( cptr == 'ldf' ) THEN 
    293           IF( ktra == jp_tem ) CALL iom_put( "udiff_heattr" , rau0_rcp * z2d ) ! diffusive heat transport in i-direction 
    294           IF( ktra == jp_sal ) CALL iom_put( "udiff_salttr" , rau0     * z2d ) ! diffusive salt transport in i-direction 
     352          IF( ktra == jp_tem ) CALL iom_put( 'udiff_heattr' , rau0_rcp * z2d ) ! diffusive heat transport in i-direction 
     353          IF( ktra == jp_sal ) CALL iom_put( 'udiff_salttr' , rau0     * z2d ) ! diffusive salt transport in i-direction 
    295354       ENDIF 
    296355       ! 
     
    305364       CALL lbc_lnk( 'diaar5', z2d, 'V', -1. ) 
    306365       IF( cptr == 'adv' ) THEN 
    307           IF( ktra == jp_tem ) CALL iom_put( "vadv_heattr" , rau0_rcp * z2d )  ! advective heat transport in j-direction 
    308           IF( ktra == jp_sal ) CALL iom_put( "vadv_salttr" , rau0     * z2d )  ! advective salt transport in j-direction 
     366          IF( ktra == jp_tem ) CALL iom_put( 'vadv_heattr' , rau0_rcp * z2d )  ! advective heat transport in j-direction 
     367          IF( ktra == jp_sal ) CALL iom_put( 'vadv_salttr' , rau0     * z2d )  ! advective salt transport in j-direction 
    309368       ENDIF 
    310369       IF( cptr == 'ldf' ) THEN 
    311           IF( ktra == jp_tem ) CALL iom_put( "vdiff_heattr" , rau0_rcp * z2d ) ! diffusive heat transport in j-direction 
    312           IF( ktra == jp_sal ) CALL iom_put( "vdiff_salttr" , rau0     * z2d ) ! diffusive salt transport in j-direction 
     370          IF( ktra == jp_tem ) CALL iom_put( 'vdiff_heattr' , rau0_rcp * z2d ) ! diffusive heat transport in j-direction 
     371          IF( ktra == jp_sal ) CALL iom_put( 'vdiff_salttr' , rau0     * z2d ) ! diffusive salt transport in j-direction 
    313372       ENDIF 
    314373           
     
    323382      !!---------------------------------------------------------------------- 
    324383      INTEGER  ::   inum 
    325       INTEGER  ::   ik 
     384      INTEGER  ::   ik, idep 
    326385      INTEGER  ::   ji, jj, jk  ! dummy loop indices 
    327386      REAL(wp) ::   zztmp   
    328387      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zsaldta   ! Jan/Dec levitus salinity 
     388      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   zvol0      
    329389      ! 
    330390      !!---------------------------------------------------------------------- 
     
    340400         IF( dia_ar5_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_ar5_init : unable to allocate arrays' ) 
    341401 
    342          area(:,:) = e1e2t(:,:) * tmask_i(:,:) 
    343  
    344          area_tot = SUM( area(:,:) )   ;   CALL mpp_sum( 'diaar5', area_tot ) 
    345  
    346          vol0        = 0._wp 
     402         area(:,:) = e1e2t(:,:) 
     403         area_tot  = glob_sum( 'diaar5', area(:,:) ) 
     404 
     405         ALLOCATE( zvol0(jpi,jpj) ) 
     406         zvol0 (:,:) = 0._wp 
    347407         thick0(:,:) = 0._wp 
    348408         DO jk = 1, jpkm1 
    349             vol0        = vol0        + SUM( area (:,:) * tmask(:,:,jk) * e3t_0(:,:,jk) ) 
    350             thick0(:,:) = thick0(:,:) +    tmask_i(:,:) * tmask(:,:,jk) * e3t_0(:,:,jk) 
    351          END DO 
    352          CALL mpp_sum( 'diaar5', vol0 ) 
     409            DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step) 
     410               DO ji = 1, jpi 
     411                  idep = tmask(ji,jj,jk) * e3t_0(ji,jj,jk) 
     412                  zvol0 (ji,jj) = zvol0 (ji,jj) +  idep * area(ji,jj) 
     413                  thick0(ji,jj) = thick0(ji,jj) +  idep     
     414               END DO 
     415            END DO 
     416         END DO 
     417         vol0 = glob_sum( 'diaar5', zvol0 ) 
     418         DEALLOCATE( zvol0 ) 
    353419 
    354420         IF( iom_use( 'sshthster' ) ) THEN 
    355             ALLOCATE( zsaldta(jpi,jpj,jpj,jpts) ) 
     421            ALLOCATE( zsaldta(jpi,jpj,jpk,jpts) ) 
    356422            CALL iom_open ( 'sali_ref_clim_monthly', inum ) 
    357423            CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  ) 
  • NEMO/trunk/src/OCE/DIA/diahth.F90

    r11993 r12276  
    1111   !!            3.2  !  2009-07  (S. Masson) hc300 bugfix + cleaning + add new diag 
    1212   !!---------------------------------------------------------------------- 
    13 #if   defined key_diahth 
    14    !!---------------------------------------------------------------------- 
    15    !!   'key_diahth' :                              thermocline depth diag. 
    16    !!---------------------------------------------------------------------- 
    1713   !!   dia_hth      : Compute varius diagnostics associated with the mixed layer 
    1814   !!---------------------------------------------------------------------- 
     
    3228   PUBLIC   dia_hth_alloc ! routine called by nemogcm.F90 
    3329 
    34    LOGICAL , PUBLIC, PARAMETER ::   lk_diahth = .TRUE.    !: thermocline-20d depths flag 
     30   LOGICAL, SAVE  ::   l_hth     !: thermocline-20d depths flag 
    3531    
    3632   ! note: following variables should move to local variables once iom_put is always used  
    3733   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hth    !: depth of the max vertical temperature gradient [m] 
    3834   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hd20   !: depth of 20 C isotherm                         [m] 
     35   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hd26   !: depth of 26 C isotherm                         [m] 
    3936   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hd28   !: depth of 28 C isotherm                         [m] 
    4037   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   htc3   !: heat content of first 300 m                    [W] 
     38   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   htc7   !: heat content of first 700 m                    [W] 
     39   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   htc20  !: heat content of first 2000 m                   [W] 
     40 
    4141 
    4242   !!---------------------------------------------------------------------- 
     
    5252      !!--------------------------------------------------------------------- 
    5353      ! 
    54       ALLOCATE( hth(jpi,jpj), hd20(jpi,jpj), hd28(jpi,jpj), htc3(jpi,jpj), STAT=dia_hth_alloc ) 
     54      ALLOCATE( hth(jpi,jpj), hd20(jpi,jpj), hd26(jpi,jpj), hd28(jpi,jpj), & 
     55         &      htc3(jpi,jpj), htc7(jpi,jpj), htc20(jpi,jpj), STAT=dia_hth_alloc ) 
    5556      ! 
    5657      CALL mpp_sum ( 'diahth', dia_hth_alloc ) 
     
    8283      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    8384      !! 
    84       INTEGER                          ::   ji, jj, jk            ! dummy loop arguments 
    85       INTEGER                          ::   iid, ilevel           ! temporary integers 
    86       INTEGER, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ik20, ik28  ! levels 
    87       REAL(wp)                         ::   zavt5 = 5.e-4_wp      ! Kz criterion for the turbocline depth 
    88       REAL(wp)                         ::   zrho3 = 0.03_wp       ! density     criterion for mixed layer depth 
    89       REAL(wp)                         ::   zrho1 = 0.01_wp       ! density     criterion for mixed layer depth 
    90       REAL(wp)                         ::   ztem2 = 0.2_wp        ! temperature criterion for mixed layer depth 
    91       REAL(wp)                         ::   zthick_0, zcoef       ! temporary scalars 
    92       REAL(wp)                         ::   zztmp, zzdep          ! temporary scalars inside do loop 
    93       REAL(wp)                         ::   zu, zv, zw, zut, zvt  ! temporary workspace 
    94       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zabs2      ! MLD: abs( tn - tn(10m) ) = ztem2  
    95       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ztm2       ! Top of thermocline: tn = tn(10m) - ztem2      
    96       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zrho10_3   ! MLD: rho = rho10m + zrho3       
    97       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zpycn      ! pycnocline: rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC) 
    98       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ztinv      ! max of temperature inversion 
    99       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zdepinv    ! depth of temperature inversion 
    100       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zrho0_3    ! MLD rho = rho(surf) = 0.03 
    101       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zrho0_1    ! MLD rho = rho(surf) = 0.01 
    102       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zmaxdzT    ! max of dT/dz 
    103       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zthick     ! vertical integration thickness  
    104       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zdelr      ! delta rho equivalent to deltaT = 0.2 
     85      INTEGER                      ::   ji, jj, jk            ! dummy loop arguments 
     86      REAL(wp)                     ::   zrho3 = 0.03_wp       ! density     criterion for mixed layer depth 
     87      REAL(wp)                     ::   zrho1 = 0.01_wp       ! density     criterion for mixed layer depth 
     88      REAL(wp)                     ::   ztem2 = 0.2_wp        ! temperature criterion for mixed layer depth 
     89      REAL(wp)                     ::   zztmp, zzdep          ! temporary scalars inside do loop 
     90      REAL(wp)                     ::   zu, zv, zw, zut, zvt  ! temporary workspace 
     91      REAL(wp), DIMENSION(jpi,jpj) ::   zabs2      ! MLD: abs( tn - tn(10m) ) = ztem2  
     92      REAL(wp), DIMENSION(jpi,jpj) ::   ztm2       ! Top of thermocline: tn = tn(10m) - ztem2      
     93      REAL(wp), DIMENSION(jpi,jpj) ::   zrho10_3   ! MLD: rho = rho10m + zrho3       
     94      REAL(wp), DIMENSION(jpi,jpj) ::   zpycn      ! pycnocline: rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC) 
     95      REAL(wp), DIMENSION(jpi,jpj) ::   ztinv      ! max of temperature inversion 
     96      REAL(wp), DIMENSION(jpi,jpj) ::   zdepinv    ! depth of temperature inversion 
     97      REAL(wp), DIMENSION(jpi,jpj) ::   zrho0_3    ! MLD rho = rho(surf) = 0.03 
     98      REAL(wp), DIMENSION(jpi,jpj) ::   zrho0_1    ! MLD rho = rho(surf) = 0.01 
     99      REAL(wp), DIMENSION(jpi,jpj) ::   zmaxdzT    ! max of dT/dz 
     100      REAL(wp), DIMENSION(jpi,jpj) ::   zdelr      ! delta rho equivalent to deltaT = 0.2 
    105101      !!---------------------------------------------------------------------- 
    106102      IF( ln_timing )   CALL timing_start('dia_hth') 
    107103 
    108104      IF( kt == nit000 ) THEN 
     105         l_hth = .FALSE. 
     106         IF(   iom_use( 'mlddzt'   ) .OR. iom_use( 'mldr0_3'  ) .OR. iom_use( 'mldr0_1'  )    .OR.  &  
     107            &  iom_use( 'mld_dt02' ) .OR. iom_use( 'topthdep' ) .OR. iom_use( 'mldr10_3' )    .OR.  &     
     108            &  iom_use( '20d'      ) .OR. iom_use( '26d'      ) .OR. iom_use( '28d'      )    .OR.  &     
     109            &  iom_use( 'hc300'    ) .OR. iom_use( 'hc700'    ) .OR. iom_use( 'hc2000'   )    .OR.  &     
     110            &  iom_use( 'pycndep'  ) .OR. iom_use( 'tinv'     ) .OR. iom_use( 'depti'    )  ) l_hth = .TRUE. 
    109111         !                                      ! allocate dia_hth array 
    110          IF( dia_hth_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_hth : unable to allocate standard arrays' ) 
    111  
    112          IF(.NOT. ALLOCATED(ik20) ) THEN 
    113             ALLOCATE(ik20(jpi,jpj), ik28(jpi,jpj), & 
    114                &      zabs2(jpi,jpj),   & 
    115                &      ztm2(jpi,jpj),    & 
    116                &      zrho10_3(jpi,jpj),& 
    117                &      zpycn(jpi,jpj),   & 
    118                &      ztinv(jpi,jpj),   & 
    119                &      zdepinv(jpi,jpj), & 
    120                &      zrho0_3(jpi,jpj), & 
    121                &      zrho0_1(jpi,jpj), & 
    122                &      zmaxdzT(jpi,jpj), & 
    123                &      zthick(jpi,jpj),  & 
    124                &      zdelr(jpi,jpj), STAT=ji) 
    125             CALL mpp_sum('diahth', ji) 
    126             IF( ji /= 0 )   CALL ctl_stop( 'STOP', 'dia_hth : unable to allocate standard ocean arrays' ) 
    127          END IF 
    128  
    129          IF(lwp) WRITE(numout,*) 
    130          IF(lwp) WRITE(numout,*) 'dia_hth : diagnostics of the thermocline depth' 
    131          IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
    132          IF(lwp) WRITE(numout,*) 
     112         IF( l_hth ) THEN  
     113            IF( dia_hth_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_hth : unable to allocate standard arrays' ) 
     114            IF(lwp) WRITE(numout,*) 
     115            IF(lwp) WRITE(numout,*) 'dia_hth : diagnostics of the thermocline depth' 
     116            IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
     117            IF(lwp) WRITE(numout,*) 
     118         ENDIF 
    133119      ENDIF 
    134120 
    135       ! initialization 
    136       ztinv  (:,:) = 0._wp   
    137       zdepinv(:,:) = 0._wp   
    138       zmaxdzT(:,:) = 0._wp   
    139       DO jj = 1, jpj 
    140          DO ji = 1, jpi 
    141             zztmp = gdepw_n(ji,jj,mbkt(ji,jj)+1)  
    142             hth     (ji,jj) = zztmp 
    143             zabs2   (ji,jj) = zztmp 
    144             ztm2    (ji,jj) = zztmp 
    145             zrho10_3(ji,jj) = zztmp 
    146             zpycn   (ji,jj) = zztmp 
    147         END DO 
    148       END DO 
    149       IF( nla10 > 1 ) THEN  
    150          DO jj = 1, jpj 
    151             DO ji = 1, jpi 
    152                zztmp = gdepw_n(ji,jj,mbkt(ji,jj)+1)  
    153                zrho0_3(ji,jj) = zztmp 
    154                zrho0_1(ji,jj) = zztmp 
    155             END DO 
    156          END DO 
     121      IF( l_hth ) THEN 
     122         ! 
     123         IF( iom_use( 'mlddzt' ) .OR. iom_use( 'mldr0_3' ) .OR. iom_use( 'mldr0_1' ) ) THEN 
     124            ! initialization 
     125            ztinv  (:,:) = 0._wp   
     126            zdepinv(:,:) = 0._wp   
     127            zmaxdzT(:,:) = 0._wp   
     128            DO jj = 1, jpj 
     129               DO ji = 1, jpi 
     130                  zztmp = gdepw_n(ji,jj,mbkt(ji,jj)+1)  
     131                  hth     (ji,jj) = zztmp 
     132                  zabs2   (ji,jj) = zztmp 
     133                  ztm2    (ji,jj) = zztmp 
     134                  zrho10_3(ji,jj) = zztmp 
     135                  zpycn   (ji,jj) = zztmp 
     136                 END DO 
     137            END DO 
     138            IF( nla10 > 1 ) THEN  
     139               DO jj = 1, jpj 
     140                  DO ji = 1, jpi 
     141                     zztmp = gdepw_n(ji,jj,mbkt(ji,jj)+1)  
     142                     zrho0_3(ji,jj) = zztmp 
     143                     zrho0_1(ji,jj) = zztmp 
     144                  END DO 
     145               END DO 
     146            ENDIF 
     147       
     148            ! Preliminary computation 
     149            ! computation of zdelr = (dr/dT)(T,S,10m)*(-0.2 degC) 
     150            DO jj = 1, jpj 
     151               DO ji = 1, jpi 
     152                  IF( tmask(ji,jj,nla10) == 1. ) THEN 
     153                     zu  =  1779.50 + 11.250 * tsn(ji,jj,nla10,jp_tem) - 3.80   * tsn(ji,jj,nla10,jp_sal)  & 
     154                        &           - 0.0745 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_tem)   & 
     155                        &           - 0.0100 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_sal) 
     156                     zv  =  5891.00 + 38.000 * tsn(ji,jj,nla10,jp_tem) + 3.00   * tsn(ji,jj,nla10,jp_sal)  & 
     157                        &           - 0.3750 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_tem) 
     158                     zut =    11.25 -  0.149 * tsn(ji,jj,nla10,jp_tem) - 0.01   * tsn(ji,jj,nla10,jp_sal) 
     159                     zvt =    38.00 -  0.750 * tsn(ji,jj,nla10,jp_tem) 
     160                     zw  = (zu + 0.698*zv) * (zu + 0.698*zv) 
     161                     zdelr(ji,jj) = ztem2 * (1000.*(zut*zv - zvt*zu)/zw) 
     162                  ELSE 
     163                     zdelr(ji,jj) = 0._wp 
     164                  ENDIF 
     165               END DO 
     166            END DO 
     167 
     168            ! ------------------------------------------------------------- ! 
     169            ! thermocline depth: strongest vertical gradient of temperature ! 
     170            ! turbocline depth (mixing layer depth): avt = zavt5            ! 
     171            ! MLD: rho = rho(1) + zrho3                                     ! 
     172            ! MLD: rho = rho(1) + zrho1                                     ! 
     173            ! ------------------------------------------------------------- ! 
     174            DO jk = jpkm1, 2, -1   ! loop from bottom to 2 
     175               DO jj = 1, jpj 
     176                  DO ji = 1, jpi 
     177                     ! 
     178                     zzdep = gdepw_n(ji,jj,jk) 
     179                     zztmp = ( tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) & 
     180                            & / zzdep * tmask(ji,jj,jk)   ! vertical gradient of temperature (dT/dz) 
     181                     zzdep = zzdep * tmask(ji,jj,1) 
     182 
     183                     IF( zztmp > zmaxdzT(ji,jj) ) THEN                         
     184                         zmaxdzT(ji,jj) = zztmp    
     185                         hth    (ji,jj) = zzdep                ! max and depth of dT/dz 
     186                     ENDIF 
     187                
     188                     IF( nla10 > 1 ) THEN  
     189                        zztmp = rhop(ji,jj,jk) - rhop(ji,jj,1)                       ! delta rho(1) 
     190                        IF( zztmp > zrho3 )   zrho0_3(ji,jj) = zzdep                ! > 0.03 
     191                        IF( zztmp > zrho1 )   zrho0_1(ji,jj) = zzdep                ! > 0.01 
     192                     ENDIF 
     193                  END DO 
     194               END DO 
     195            END DO 
     196          
     197            CALL iom_put( 'mlddzt', hth )            ! depth of the thermocline 
     198            IF( nla10 > 1 ) THEN  
     199               CALL iom_put( 'mldr0_3', zrho0_3 )   ! MLD delta rho(surf) = 0.03 
     200               CALL iom_put( 'mldr0_1', zrho0_1 )   ! MLD delta rho(surf) = 0.01 
     201            ENDIF 
     202            ! 
     203         ENDIF 
     204         ! 
     205         IF(  iom_use( 'mld_dt02' ) .OR. iom_use( 'topthdep' ) .OR. iom_use( 'mldr10_3' ) .OR.  &     
     206            &  iom_use( 'pycndep' ) .OR. iom_use( 'tinv'     ) .OR. iom_use( 'depti'    )  ) THEN 
     207            ! ------------------------------------------------------------- ! 
     208            ! MLD: abs( tn - tn(10m) ) = ztem2                              ! 
     209            ! Top of thermocline: tn = tn(10m) - ztem2                      ! 
     210            ! MLD: rho = rho10m + zrho3                                     ! 
     211            ! pycnocline: rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC)       ! 
     212            ! temperature inversion: max( 0, max of tn - tn(10m) )          ! 
     213            ! depth of temperature inversion                                ! 
     214            ! ------------------------------------------------------------- ! 
     215            DO jk = jpkm1, nlb10, -1   ! loop from bottom to nlb10 
     216               DO jj = 1, jpj 
     217                  DO ji = 1, jpi 
     218                     ! 
     219                     zzdep = gdepw_n(ji,jj,jk) * tmask(ji,jj,1) 
     220                     ! 
     221                     zztmp = tsn(ji,jj,nla10,jp_tem) - tsn(ji,jj,jk,jp_tem)  ! - delta T(10m) 
     222                     IF( ABS(zztmp) > ztem2 )      zabs2   (ji,jj) = zzdep   ! abs > 0.2 
     223                     IF(     zztmp  > ztem2 )      ztm2    (ji,jj) = zzdep   ! > 0.2 
     224                     zztmp = -zztmp                                          ! delta T(10m) 
     225                     IF( zztmp >  ztinv(ji,jj) ) THEN                        ! temperature inversion 
     226                        ztinv(ji,jj) = zztmp    
     227                        zdepinv (ji,jj) = zzdep   ! max value and depth 
     228                     ENDIF 
     229 
     230                     zztmp = rhop(ji,jj,jk) - rhop(ji,jj,nla10)              ! delta rho(10m) 
     231                     IF( zztmp > zrho3        )    zrho10_3(ji,jj) = zzdep   ! > 0.03 
     232                     IF( zztmp > zdelr(ji,jj) )    zpycn   (ji,jj) = zzdep   ! > equi. delta T(10m) - 0.2 
     233                     ! 
     234                  END DO 
     235               END DO 
     236            END DO 
     237 
     238            CALL iom_put( 'mld_dt02', zabs2    )   ! MLD abs(delta t) - 0.2 
     239            CALL iom_put( 'topthdep', ztm2     )   ! T(10) - 0.2 
     240            CALL iom_put( 'mldr10_3', zrho10_3 )   ! MLD delta rho(10m) = 0.03 
     241            CALL iom_put( 'pycndep' , zpycn    )   ! MLD delta rho equi. delta T(10m) = 0.2 
     242            CALL iom_put( 'tinv'    , ztinv    )   ! max. temp. inv. (t10 ref)  
     243            CALL iom_put( 'depti'   , zdepinv  )   ! depth of max. temp. inv. (t10 ref)  
     244            ! 
     245         ENDIF 
     246  
     247         ! ------------------------------- ! 
     248         !  Depth of 20C/26C/28C isotherm  ! 
     249         ! ------------------------------- ! 
     250         IF( iom_use ('20d') ) THEN  ! depth of the 20 isotherm 
     251            ztem2 = 20. 
     252            CALL dia_hth_dep( ztem2, hd20 )   
     253            CALL iom_put( '20d', hd20 )     
     254         ENDIF 
     255         ! 
     256         IF( iom_use ('26d') ) THEN  ! depth of the 26 isotherm 
     257            ztem2 = 26. 
     258            CALL dia_hth_dep( ztem2, hd26 )   
     259            CALL iom_put( '26d', hd26 )     
     260         ENDIF 
     261         ! 
     262         IF( iom_use ('28d') ) THEN  ! depth of the 28 isotherm 
     263            ztem2 = 28. 
     264            CALL dia_hth_dep( ztem2, hd28 )   
     265            CALL iom_put( '28d', hd28 )     
     266         ENDIF 
     267         
     268         ! ----------------------------- ! 
     269         !  Heat content of first 300 m  ! 
     270         ! ----------------------------- ! 
     271         IF( iom_use ('hc300') ) THEN   
     272            zzdep = 300. 
     273            CALL  dia_hth_htc( zzdep, tsn(:,:,:,jp_tem), htc3 ) 
     274            CALL iom_put( 'hc300', rau0_rcp * htc3 )  ! vertically integrated heat content (J/m2) 
     275         ENDIF 
     276         ! 
     277         ! ----------------------------- ! 
     278         !  Heat content of first 700 m  ! 
     279         ! ----------------------------- ! 
     280         IF( iom_use ('hc700') ) THEN   
     281            zzdep = 700. 
     282            CALL  dia_hth_htc( zzdep, tsn(:,:,:,jp_tem), htc7 ) 
     283            CALL iom_put( 'hc700', rau0_rcp * htc7 )  ! vertically integrated heat content (J/m2) 
     284   
     285         ENDIF 
     286         ! 
     287         ! ----------------------------- ! 
     288         !  Heat content of first 2000 m  ! 
     289         ! ----------------------------- ! 
     290         IF( iom_use ('hc2000') ) THEN   
     291            zzdep = 2000. 
     292            CALL  dia_hth_htc( zzdep, tsn(:,:,:,jp_tem), htc20 ) 
     293            CALL iom_put( 'hc2000', rau0_rcp * htc20 )  ! vertically integrated heat content (J/m2)   
     294         ENDIF 
     295         ! 
    157296      ENDIF 
     297 
     298      ! 
     299      IF( ln_timing )   CALL timing_stop('dia_hth') 
     300      ! 
     301   END SUBROUTINE dia_hth 
     302 
     303   SUBROUTINE dia_hth_dep( ptem, pdept ) 
     304      ! 
     305      REAL(wp), INTENT(in) :: ptem 
     306      REAL(wp), DIMENSION(jpi,jpj), INTENT(out) :: pdept      
     307      ! 
     308      INTEGER  :: ji, jj, jk, iid 
     309      REAL(wp) :: zztmp, zzdep 
     310      INTEGER, DIMENSION(jpi,jpj) :: iktem 
    158311       
    159       ! Preliminary computation 
    160       ! computation of zdelr = (dr/dT)(T,S,10m)*(-0.2 degC) 
    161       DO jj = 1, jpj 
    162          DO ji = 1, jpi 
    163             IF( tmask(ji,jj,nla10) == 1. ) THEN 
    164                zu  =  1779.50 + 11.250 * tsn(ji,jj,nla10,jp_tem) - 3.80   * tsn(ji,jj,nla10,jp_sal)                             & 
    165                   &                                              - 0.0745 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_tem)   & 
    166                   &                                              - 0.0100 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_sal) 
    167                zv  =  5891.00 + 38.000 * tsn(ji,jj,nla10,jp_tem) + 3.00   * tsn(ji,jj,nla10,jp_sal)                             & 
    168                   &                                              - 0.3750 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_tem) 
    169                zut =    11.25 -  0.149 * tsn(ji,jj,nla10,jp_tem) - 0.01   * tsn(ji,jj,nla10,jp_sal) 
    170                zvt =    38.00 -  0.750 * tsn(ji,jj,nla10,jp_tem) 
    171                zw  = (zu + 0.698*zv) * (zu + 0.698*zv) 
    172                zdelr(ji,jj) = ztem2 * (1000.*(zut*zv - zvt*zu)/zw) 
    173             ELSE 
    174                zdelr(ji,jj) = 0._wp 
    175             ENDIF 
    176          END DO 
    177       END DO 
    178  
    179       ! ------------------------------------------------------------- ! 
    180       ! thermocline depth: strongest vertical gradient of temperature ! 
    181       ! turbocline depth (mixing layer depth): avt = zavt5            ! 
    182       ! MLD: rho = rho(1) + zrho3                                     ! 
    183       ! MLD: rho = rho(1) + zrho1                                     ! 
    184       ! ------------------------------------------------------------- ! 
    185       DO jk = jpkm1, 2, -1   ! loop from bottom to 2 
    186          DO jj = 1, jpj 
    187             DO ji = 1, jpi 
    188                ! 
    189                zzdep = gdepw_n(ji,jj,jk) 
    190                zztmp = ( tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) / zzdep * tmask(ji,jj,jk)   ! vertical gradient of temperature (dT/dz) 
    191                zzdep = zzdep * tmask(ji,jj,1) 
    192  
    193                IF( zztmp > zmaxdzT(ji,jj) ) THEN                         
    194                   zmaxdzT(ji,jj) = zztmp   ;   hth    (ji,jj) = zzdep                ! max and depth of dT/dz 
    195                ENDIF 
    196                 
    197                IF( nla10 > 1 ) THEN  
    198                   zztmp = rhop(ji,jj,jk) - rhop(ji,jj,1)                             ! delta rho(1) 
    199                   IF( zztmp > zrho3 )          zrho0_3(ji,jj) = zzdep                ! > 0.03 
    200                   IF( zztmp > zrho1 )          zrho0_1(ji,jj) = zzdep                ! > 0.01 
    201                ENDIF 
    202  
    203             END DO 
    204          END DO 
    205       END DO 
    206        
    207       CALL iom_put( "mlddzt", hth )            ! depth of the thermocline 
    208       IF( nla10 > 1 ) THEN  
    209          CALL iom_put( "mldr0_3", zrho0_3 )   ! MLD delta rho(surf) = 0.03 
    210          CALL iom_put( "mldr0_1", zrho0_1 )   ! MLD delta rho(surf) = 0.01 
    211       ENDIF 
    212  
    213       ! ------------------------------------------------------------- ! 
    214       ! MLD: abs( tn - tn(10m) ) = ztem2                              ! 
    215       ! Top of thermocline: tn = tn(10m) - ztem2                      ! 
    216       ! MLD: rho = rho10m + zrho3                                     ! 
    217       ! pycnocline: rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC)       ! 
    218       ! temperature inversion: max( 0, max of tn - tn(10m) )          ! 
    219       ! depth of temperature inversion                                ! 
    220       ! ------------------------------------------------------------- ! 
    221       DO jk = jpkm1, nlb10, -1   ! loop from bottom to nlb10 
    222          DO jj = 1, jpj 
    223             DO ji = 1, jpi 
    224                ! 
    225                zzdep = gdepw_n(ji,jj,jk) * tmask(ji,jj,1) 
    226                ! 
    227                zztmp = tsn(ji,jj,nla10,jp_tem) - tsn(ji,jj,jk,jp_tem)  ! - delta T(10m) 
    228                IF( ABS(zztmp) > ztem2 )      zabs2   (ji,jj) = zzdep   ! abs > 0.2 
    229                IF(     zztmp  > ztem2 )      ztm2    (ji,jj) = zzdep   ! > 0.2 
    230                zztmp = -zztmp                                          ! delta T(10m) 
    231                IF( zztmp >  ztinv(ji,jj) ) THEN                        ! temperature inversion 
    232                   ztinv(ji,jj) = zztmp   ;   zdepinv (ji,jj) = zzdep   ! max value and depth 
    233                ENDIF 
    234  
    235                zztmp = rhop(ji,jj,jk) - rhop(ji,jj,nla10)              ! delta rho(10m) 
    236                IF( zztmp > zrho3        )    zrho10_3(ji,jj) = zzdep   ! > 0.03 
    237                IF( zztmp > zdelr(ji,jj) )    zpycn   (ji,jj) = zzdep   ! > equi. delta T(10m) - 0.2 
    238                ! 
    239             END DO 
    240          END DO 
    241       END DO 
    242  
    243       CALL iom_put( "mld_dt02", zabs2        )   ! MLD abs(delta t) - 0.2 
    244       CALL iom_put( "topthdep", ztm2         )   ! T(10) - 0.2 
    245       CALL iom_put( "mldr10_3", zrho10_3     )   ! MLD delta rho(10m) = 0.03 
    246       CALL iom_put( "pycndep" , zpycn        )   ! MLD delta rho equi. delta T(10m) = 0.2 
    247       CALL iom_put( "tinv"    , ztinv        )   ! max. temp. inv. (t10 ref)  
    248       CALL iom_put( "depti"   , zdepinv      )   ! depth of max. temp. inv. (t10 ref)  
    249  
    250  
    251       ! ----------------------------------- ! 
    252       ! search deepest level above 20C/28C  ! 
    253       ! ----------------------------------- ! 
    254       ik20(:,:) = 1 
    255       ik28(:,:) = 1 
     312      ! --------------------------------------- ! 
     313      ! search deepest level above ptem         ! 
     314      ! --------------------------------------- ! 
     315      iktem(:,:) = 1 
    256316      DO jk = 1, jpkm1   ! beware temperature is not always decreasing with depth => loop from top to bottom 
    257317         DO jj = 1, jpj 
    258318            DO ji = 1, jpi 
    259319               zztmp = tsn(ji,jj,jk,jp_tem) 
    260                IF( zztmp >= 20. )   ik20(ji,jj) = jk 
    261                IF( zztmp >= 28. )   ik28(ji,jj) = jk 
     320               IF( zztmp >= ptem )   iktem(ji,jj) = jk 
    262321            END DO 
    263322         END DO 
    264323      END DO 
    265324 
    266       ! --------------------------- ! 
    267       !  Depth of 20C/28C isotherm  ! 
    268       ! --------------------------- ! 
     325      ! ------------------------------- ! 
     326      !  Depth of ptem isotherm         ! 
     327      ! ------------------------------- ! 
    269328      DO jj = 1, jpj 
    270329         DO ji = 1, jpi 
    271330            ! 
    272             zzdep = gdepw_n(ji,jj,mbkt(ji,jj)+1)       ! depth of the oean bottom 
     331            zzdep = gdepw_n(ji,jj,mbkt(ji,jj)+1)       ! depth of the ocean bottom 
    273332            ! 
    274             iid = ik20(ji,jj) 
     333            iid = iktem(ji,jj) 
    275334            IF( iid /= 1 ) THEN  
    276                zztmp =      gdept_n(ji,jj,iid  )   &                     ! linear interpolation 
     335                zztmp =     gdept_n(ji,jj,iid  )   &                     ! linear interpolation 
    277336                  &  + (    gdept_n(ji,jj,iid+1) - gdept_n(ji,jj,iid)                       )   & 
    278337                  &  * ( 20.*tmask(ji,jj,iid+1) - tsn(ji,jj,iid,jp_tem)                       )   & 
    279338                  &  / ( tsn(ji,jj,iid+1,jp_tem) - tsn(ji,jj,iid,jp_tem) + (1.-tmask(ji,jj,1)) ) 
    280                hd20(ji,jj) = MIN( zztmp , zzdep) * tmask(ji,jj,1)       ! bound by the ocean depth 
     339               pdept(ji,jj) = MIN( zztmp , zzdep) * tmask(ji,jj,1)       ! bound by the ocean depth 
    281340            ELSE  
    282                hd20(ji,jj) = 0._wp 
     341               pdept(ji,jj) = 0._wp 
    283342            ENDIF 
    284             ! 
    285             iid = ik28(ji,jj) 
    286             IF( iid /= 1 ) THEN  
    287                zztmp =      gdept_n(ji,jj,iid  )   &                     ! linear interpolation 
    288                   &  + (    gdept_n(ji,jj,iid+1) - gdept_n(ji,jj,iid)                       )   & 
    289                   &  * ( 28.*tmask(ji,jj,iid+1) -    tsn(ji,jj,iid,jp_tem)                       )   & 
    290                   &  / (  tsn(ji,jj,iid+1,jp_tem) -    tsn(ji,jj,iid,jp_tem) + (1.-tmask(ji,jj,1)) ) 
    291                hd28(ji,jj) = MIN( zztmp , zzdep ) * tmask(ji,jj,1)      ! bound by the ocean depth 
    292             ELSE  
    293                hd28(ji,jj) = 0._wp 
    294             ENDIF 
    295  
    296343         END DO 
    297344      END DO 
    298       CALL iom_put( "20d", hd20 )   ! depth of the 20 isotherm 
    299       CALL iom_put( "28d", hd28 )   ! depth of the 28 isotherm 
    300  
    301       ! ----------------------------- ! 
    302       !  Heat content of first 300 m  ! 
    303       ! ----------------------------- ! 
    304  
    305       ! find ilevel with (ilevel+1) the deepest W-level above 300m (we assume we can use e3t_1d to do this search...) 
    306       ilevel   = 0 
    307       zthick_0 = 0._wp 
    308       DO jk = 1, jpkm1                       
    309          zthick_0 = zthick_0 + e3t_1d(jk) 
    310          IF( zthick_0 < 300. )   ilevel = jk 
    311       END DO 
     345      ! 
     346   END SUBROUTINE dia_hth_dep 
     347 
     348 
     349   SUBROUTINE dia_hth_htc( pdep, ptn, phtc ) 
     350      ! 
     351      REAL(wp), INTENT(in) :: pdep     ! depth over the heat content 
     352      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) :: ptn    
     353      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: phtc   
     354      ! 
     355      INTEGER  :: ji, jj, jk, ik 
     356      REAL(wp), DIMENSION(jpi,jpj) :: zthick 
     357      INTEGER , DIMENSION(jpi,jpj) :: ilevel 
     358 
     359 
    312360      ! surface boundary condition 
    313       IF( ln_linssh ) THEN   ;   zthick(:,:) = sshn(:,:)   ;   htc3(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,1)   
    314       ELSE                   ;   zthick(:,:) = 0._wp       ;   htc3(:,:) = 0._wp                                    
     361       
     362      IF( .NOT. ln_linssh ) THEN   ;   zthick(:,:) = 0._wp       ;   phtc(:,:) = 0._wp                                    
     363      ELSE                         ;   zthick(:,:) = sshn(:,:)   ;   phtc(:,:) = ptn(:,:,1) * sshn(:,:) * tmask(:,:,1)    
    315364      ENDIF 
    316       ! integration down to ilevel 
    317       DO jk = 1, ilevel 
    318          zthick(:,:) = zthick(:,:) + e3t_n(:,:,jk) 
    319          htc3  (:,:) = htc3  (:,:) + e3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) * tmask(:,:,jk) 
    320       END DO 
    321       ! deepest layer 
    322       zthick(:,:) = 300. - zthick(:,:)   !   remaining thickness to reach 300m 
     365      ! 
     366      ilevel(:,:) = 1 
     367      DO jk = 2, jpkm1 
     368         DO jj = 1, jpj 
     369            DO ji = 1, jpi 
     370               IF( ( gdept_n(ji,jj,jk) < pdep ) .AND. ( tmask(ji,jj,jk) == 1 ) ) THEN 
     371                   ilevel(ji,jj) = jk 
     372                   zthick(ji,jj) = zthick(ji,jj) + e3t_n(ji,jj,jk) 
     373                   phtc  (ji,jj) = phtc  (ji,jj) + e3t_n(ji,jj,jk) * ptn(ji,jj,jk) 
     374               ENDIF 
     375            ENDDO 
     376         ENDDO 
     377      ENDDO 
     378      ! 
    323379      DO jj = 1, jpj 
    324380         DO ji = 1, jpi 
    325             htc3(ji,jj) = htc3(ji,jj) + tsn(ji,jj,ilevel+1,jp_tem)                  & 
    326                &                      * MIN( e3t_n(ji,jj,ilevel+1), zthick(ji,jj) ) * tmask(ji,jj,ilevel+1) 
     381            ik = ilevel(ji,jj) 
     382            zthick(ji,jj) = pdep - zthick(ji,jj)   !   remaining thickness to reach depht pdep 
     383            phtc(ji,jj)   = phtc(ji,jj) + ptn(ji,jj,ik+1) * MIN( e3t_n(ji,jj,ik+1), zthick(ji,jj) ) & 
     384                                                          * tmask(ji,jj,ik+1) 
    327385         END DO 
    328       END DO 
    329       ! from temperature to heat contain 
    330       zcoef = rau0 * rcp 
    331       htc3(:,:) = zcoef * htc3(:,:) 
    332       CALL iom_put( "hc300", htc3 )      ! first 300m heat content 
    333       ! 
    334       IF( ln_timing )   CALL timing_stop('dia_hth') 
    335       ! 
    336    END SUBROUTINE dia_hth 
    337  
    338 #else 
    339    !!---------------------------------------------------------------------- 
    340    !!   Default option :                                       Empty module 
    341    !!---------------------------------------------------------------------- 
    342    LOGICAL , PUBLIC, PARAMETER ::   lk_diahth = .FALSE.  !: thermocline-20d depths flag 
    343 CONTAINS 
    344    SUBROUTINE dia_hth( kt )         ! Empty routine 
    345       IMPLICIT NONE 
    346       INTEGER, INTENT( in ) :: kt 
    347       WRITE(*,*) 'dia_hth: You should not have seen this print! error?', kt 
    348    END SUBROUTINE dia_hth 
    349 #endif 
     386      ENDDO 
     387      ! 
     388      ! 
     389   END SUBROUTINE dia_hth_htc 
    350390 
    351391   !!====================================================================== 
  • NEMO/trunk/src/OCE/DIA/diaptr.F90

    r11993 r12276  
    1010   !!            3.6  ! 2014-12  (C. Ethe) use of IOM 
    1111   !!            3.6  ! 2016-06  (T. Graham) Addition of diagnostics for CMIP6 
     12   !!            4.0  ! 2010-08  ( C. Ethe, J. Deshayes ) Improvment 
    1213   !!---------------------------------------------------------------------- 
    1314 
     
    4243 
    4344   !                                  !!** namelist  namptr  ** 
    44    REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   htr_adv, htr_ldf, htr_eiv   !: Heat TRansports (adv, diff, Bolus.) 
    45    REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   str_adv, str_ldf, str_eiv   !: Salt TRansports (adv, diff, Bolus.) 
    46    REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   htr_ove, str_ove   !: heat Salt TRansports ( overturn.) 
    47    REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   htr_btr, str_btr   !: heat Salt TRansports ( barotropic ) 
     45   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   hstr_adv, hstr_ldf, hstr_eiv   !: Heat/Salt TRansports(adv, diff, Bolus.) 
     46   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   hstr_ove, hstr_btr, hstr_vtr   !: heat Salt TRansports(overturn, baro, merional) 
    4847 
    4948   LOGICAL, PUBLIC ::   ln_diaptr   !  Poleward transport flag (T) or not (F) 
    5049   LOGICAL, PUBLIC ::   ln_subbas   !  Atlantic/Pacific/Indian basins calculation 
    51    INTEGER, PUBLIC ::   nptr        ! = 1 (l_subbas=F) or = 5 (glo, atl, pac, ind, ipc) (l_subbas=T)  
     50   INTEGER, PARAMETER, PUBLIC ::   nptr = 5  ! (glo, atl, pac, ind, ipc) 
    5251 
    5352   REAL(wp) ::   rc_sv    = 1.e-6_wp   ! conversion from m3/s to Sverdrup 
    5453   REAL(wp) ::   rc_pwatt = 1.e-15_wp  ! conversion from W    to PW (further x rau0 x Cp) 
    55    REAL(wp) ::   rc_ggram = 1.e-6_wp   ! conversion from g    to Pg 
    56  
    57    CHARACTER(len=3), ALLOCATABLE, SAVE, DIMENSION(:)     :: clsubb 
    58    REAL(wp),         ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: btmsk   ! T-point basin interior masks 
    59    REAL(wp),         ALLOCATABLE, SAVE, DIMENSION(:,:)   :: btm30   ! mask out Southern Ocean (=0 south of 30°S) 
    60  
    61    REAL(wp), TARGET, ALLOCATABLE, SAVE, DIMENSION(:)     :: p_fval1d 
    62    REAL(wp), TARGET, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: p_fval2d 
     54   REAL(wp) ::   rc_ggram = 1.e-9_wp   ! conversion from g    to Gg  (further x rau0) 
     55 
     56   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: btmsk   ! T-point basin interior masks 
     57   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: btmsk34 ! mask out Southern Ocean (=0 south of 34°S) 
     58 
     59   REAL(wp), TARGET, ALLOCATABLE, SAVE, DIMENSION(:)   :: p_fval1d 
     60   REAL(wp), TARGET, ALLOCATABLE, SAVE, DIMENSION(:,:) :: p_fval2d 
    6361 
    6462   !! * Substitutions 
     
    8078      REAL(wp) ::   zsfc,zvfc               ! local scalar 
    8179      REAL(wp), DIMENSION(jpi,jpj)     ::  z2d   ! 2D workspace 
    82       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  z3d   ! 3D workspace 
    8380      REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zmask   ! 3D workspace 
     81      REAL(wp), DIMENSION(jpi,jpj,jpk) ::  z3d    ! 3D workspace 
    8482      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts) ::  zts   ! 3D workspace 
    85       REAL(wp), DIMENSION(jpj)     ::  vsum   ! 1D workspace 
    86       REAL(wp), DIMENSION(jpj,jpts)     ::  tssum   ! 1D workspace 
    87   
     83      REAL(wp), DIMENSION(jpj)      ::  zvsum, ztsum, zssum   ! 1D workspace 
    8884      ! 
    8985      !overturning calculation 
    90       REAL(wp), DIMENSION(jpj,jpk,nptr) ::   sjk  , r1_sjk ! i-mean i-k-surface and its inverse 
    91       REAL(wp), DIMENSION(jpj,jpk,nptr) ::   v_msf, sn_jk  , tn_jk ! i-mean T and S, j-Stream-Function 
    92       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zvn   ! 3D workspace 
    93  
    94  
    95       CHARACTER( len = 12 )  :: cl1 
     86      REAL(wp), DIMENSION(jpj,jpk,nptr) :: sjk, r1_sjk, v_msf  ! i-mean i-k-surface and its inverse 
     87      REAL(wp), DIMENSION(jpj,jpk,nptr) :: zt_jk, zs_jk ! i-mean T and S, j-Stream-Function 
     88 
     89      REAL(wp), DIMENSION(jpi,jpj,jpk,nptr)  :: z4d1, z4d2 
     90      REAL(wp), DIMENSION(jpi,jpj,nptr)      :: z3dtr ! i-mean T and S, j-Stream-Function 
    9691      !!---------------------------------------------------------------------- 
    9792      ! 
    9893      IF( ln_timing )   CALL timing_start('dia_ptr') 
    99  
    10094      ! 
    10195      IF( PRESENT( pvtr ) ) THEN 
    102          IF( iom_use("zomsfglo") ) THEN    ! effective MSF 
    103             z3d(1,:,:) = ptr_sjk( pvtr(:,:,:) )  ! zonal cumulative effective transport 
    104             DO jk = 2, jpkm1  
    105               z3d(1,:,jk) = z3d(1,:,jk-1) + z3d(1,:,jk)   ! effective j-Stream-Function (MSF) 
     96         IF( iom_use( 'zomsf' ) ) THEN    ! effective MSF 
     97            DO jn = 1, nptr                                    ! by sub-basins 
     98               z4d1(1,:,:,jn) =  ptr_sjk( pvtr(:,:,:), btmsk34(:,:,jn) )  ! zonal cumulative effective transport excluding closed seas 
     99               DO jk = jpkm1, 1, -1  
     100                  z4d1(1,:,jk,jn) = z4d1(1,:,jk+1,jn) - z4d1(1,:,jk,jn)    ! effective j-Stream-Function (MSF) 
     101               END DO 
     102               DO ji = 1, jpi 
     103                  z4d1(ji,:,:,jn) = z4d1(1,:,:,jn) 
     104               ENDDO 
    106105            END DO 
    107             DO ji = 1, jpi 
    108                z3d(ji,:,:) = z3d(1,:,:) 
    109             ENDDO 
    110             cl1 = TRIM('zomsf'//clsubb(1) ) 
    111             CALL iom_put( cl1, z3d * rc_sv ) 
    112             DO jn = 2, nptr                                    ! by sub-basins 
    113                z3d(1,:,:) =  ptr_sjk( pvtr(:,:,:), btmsk(:,:,jn)*btm30(:,:) )  
    114                DO jk = 2, jpkm1  
    115                   z3d(1,:,jk) = z3d(1,:,jk-1) + z3d(1,:,jk)    ! effective j-Stream-Function (MSF) 
    116                END DO 
    117                DO ji = 1, jpi 
    118                   z3d(ji,:,:) = z3d(1,:,:) 
    119                ENDDO 
    120                cl1 = TRIM('zomsf'//clsubb(jn) ) 
    121                CALL iom_put( cl1, z3d * rc_sv ) 
    122             END DO 
    123          ENDIF 
    124          IF( iom_use("sopstove") .OR. iom_use("sophtove") .OR. iom_use("sopstbtr") .OR. iom_use("sophtbtr") ) THEN 
     106            CALL iom_put( 'zomsf', z4d1 * rc_sv ) 
     107         ENDIF 
     108         IF(  iom_use( 'sopstove' ) .OR. iom_use( 'sophtove' ) .OR.   & 
     109            & iom_use( 'sopstbtr' ) .OR. iom_use( 'sophtbtr' ) ) THEN 
    125110            ! define fields multiplied by scalar 
    126111            zmask(:,:,:) = 0._wp 
    127112            zts(:,:,:,:) = 0._wp 
    128             zvn(:,:,:) = 0._wp 
    129113            DO jk = 1, jpkm1 
    130114               DO jj = 1, jpjm1 
     
    134118                     zts(ji,jj,jk,jp_tem) = (tsn(ji,jj,jk,jp_tem)+tsn(ji,jj+1,jk,jp_tem)) * 0.5 * zvfc  !Tracers averaged onto V grid 
    135119                     zts(ji,jj,jk,jp_sal) = (tsn(ji,jj,jk,jp_sal)+tsn(ji,jj+1,jk,jp_sal)) * 0.5 * zvfc 
    136                      zvn(ji,jj,jk)        = vn(ji,jj,jk)         * zvfc 
    137120                  ENDDO 
    138121               ENDDO 
    139122             ENDDO 
    140123         ENDIF 
    141          IF( iom_use("sopstove") .OR. iom_use("sophtove") ) THEN 
    142              sjk(:,:,1) = ptr_sjk( zmask(:,:,:), btmsk(:,:,1) ) 
    143              r1_sjk(:,:,1) = 0._wp 
    144              WHERE( sjk(:,:,1) /= 0._wp )   r1_sjk(:,:,1) = 1._wp / sjk(:,:,1) 
    145  
    146              ! i-mean T and S, j-Stream-Function, global 
    147              tn_jk(:,:,1) = ptr_sjk( zts(:,:,:,jp_tem) ) * r1_sjk(:,:,1) 
    148              sn_jk(:,:,1) = ptr_sjk( zts(:,:,:,jp_sal) ) * r1_sjk(:,:,1) 
    149              v_msf(:,:,1) = ptr_sjk( zvn(:,:,:) ) 
    150  
    151              htr_ove(:,1) = SUM( v_msf(:,:,1)*tn_jk(:,:,1) ,2 ) 
    152              str_ove(:,1) = SUM( v_msf(:,:,1)*sn_jk(:,:,1) ,2 ) 
    153  
    154              z2d(1,:) = htr_ove(:,1) * rc_pwatt        !  (conversion in PW) 
    155              DO ji = 1, jpi 
    156                z2d(ji,:) = z2d(1,:) 
    157              ENDDO 
    158              cl1 = 'sophtove' 
    159              CALL iom_put( TRIM(cl1), z2d ) 
    160              z2d(1,:) = str_ove(:,1) * rc_ggram        !  (conversion in Gg) 
    161              DO ji = 1, jpi 
    162                z2d(ji,:) = z2d(1,:) 
    163              ENDDO 
    164              cl1 = 'sopstove' 
    165              CALL iom_put( TRIM(cl1), z2d ) 
    166              IF( ln_subbas ) THEN 
    167                 DO jn = 2, nptr 
    168                     sjk(:,:,jn) = ptr_sjk( zmask(:,:,:), btmsk(:,:,jn) ) 
    169                     r1_sjk(:,:,jn) = 0._wp 
    170                     WHERE( sjk(:,:,jn) /= 0._wp )   r1_sjk(:,:,jn) = 1._wp / sjk(:,:,jn) 
    171  
    172                     ! i-mean T and S, j-Stream-Function, basin 
    173                     tn_jk(:,:,jn) = ptr_sjk( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 
    174                     sn_jk(:,:,jn) = ptr_sjk( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 
    175                     v_msf(:,:,jn) = ptr_sjk( zvn(:,:,:), btmsk(:,:,jn) )  
    176                     htr_ove(:,jn) = SUM( v_msf(:,:,jn)*tn_jk(:,:,jn) ,2 ) 
    177                     str_ove(:,jn) = SUM( v_msf(:,:,jn)*sn_jk(:,:,jn) ,2 ) 
    178  
    179                     z2d(1,:) = htr_ove(:,jn) * rc_pwatt !  (conversion in PW) 
    180                     DO ji = 1, jpi 
    181                         z2d(ji,:) = z2d(1,:) 
    182                     ENDDO 
    183                     cl1 = TRIM('sophtove_'//clsubb(jn)) 
    184                     CALL iom_put( cl1, z2d ) 
    185                     z2d(1,:) = str_ove(:,jn) * rc_ggram        ! (conversion in Gg) 
    186                     DO ji = 1, jpi 
    187                         z2d(ji,:) = z2d(1,:) 
    188                     ENDDO 
    189                     cl1 = TRIM('sopstove_'//clsubb(jn)) 
    190                     CALL iom_put( cl1, z2d ) 
    191                 END DO 
    192              ENDIF 
    193          ENDIF 
    194          IF( iom_use("sopstbtr") .OR. iom_use("sophtbtr") ) THEN 
    195          ! Calculate barotropic heat and salt transport here  
    196              sjk(:,1,1) = ptr_sj( zmask(:,:,:), btmsk(:,:,1) ) 
    197              r1_sjk(:,1,1) = 0._wp 
    198              WHERE( sjk(:,1,1) /= 0._wp )   r1_sjk(:,1,1) = 1._wp / sjk(:,1,1) 
    199              
    200             vsum = ptr_sj( zvn(:,:,:), btmsk(:,:,1)) 
    201             tssum(:,jp_tem) = ptr_sj( zts(:,:,:,jp_tem), btmsk(:,:,1) ) 
    202             tssum(:,jp_sal) = ptr_sj( zts(:,:,:,jp_sal), btmsk(:,:,1) ) 
    203             htr_btr(:,1) = vsum * tssum(:,jp_tem) * r1_sjk(:,1,1) 
    204             str_btr(:,1) = vsum * tssum(:,jp_sal) * r1_sjk(:,1,1) 
    205             z2d(1,:) = htr_btr(:,1) * rc_pwatt        !  (conversion in PW) 
    206             DO ji = 2, jpi 
    207                z2d(ji,:) = z2d(1,:) 
    208             ENDDO 
    209             cl1 = 'sophtbtr' 
    210             CALL iom_put( TRIM(cl1), z2d ) 
    211             z2d(1,:) = str_btr(:,1) * rc_ggram        !  (conversion in Gg) 
    212             DO ji = 2, jpi 
    213               z2d(ji,:) = z2d(1,:) 
    214             ENDDO 
    215             cl1 = 'sopstbtr' 
    216             CALL iom_put( TRIM(cl1), z2d ) 
    217             IF( ln_subbas ) THEN 
    218                 DO jn = 2, nptr 
    219                     sjk(:,1,jn) = ptr_sj( zmask(:,:,:), btmsk(:,:,jn) ) 
    220                     r1_sjk(:,1,jn) = 0._wp 
    221                     WHERE( sjk(:,1,jn) /= 0._wp )   r1_sjk(:,1,jn) = 1._wp / sjk(:,1,jn) 
    222                     vsum = ptr_sj( zvn(:,:,:), btmsk(:,:,jn)) 
    223                     tssum(:,jp_tem) = ptr_sj( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) 
    224                     tssum(:,jp_sal) = ptr_sj( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) 
    225                     htr_btr(:,jn) = vsum * tssum(:,jp_tem) * r1_sjk(:,1,jn) 
    226                     str_btr(:,jn) = vsum * tssum(:,jp_sal) * r1_sjk(:,1,jn) 
    227                     z2d(1,:) = htr_btr(:,jn) * rc_pwatt !  (conversion in PW) 
    228                     DO ji = 1, jpi 
    229                         z2d(ji,:) = z2d(1,:) 
    230                     ENDDO 
    231                     cl1 = TRIM('sophtbtr_'//clsubb(jn)) 
    232                     CALL iom_put( cl1, z2d ) 
    233                     z2d(1,:) = str_btr(:,jn) * rc_ggram        ! (conversion in Gg) 
    234                     DO ji = 1, jpi 
    235                         z2d(ji,:) = z2d(1,:) 
    236                     ENDDO 
    237                     cl1 = TRIM('sopstbtr_'//clsubb(jn)) 
    238                     CALL iom_put( cl1, z2d ) 
    239                ENDDO 
    240             ENDIF !ln_subbas 
    241          ENDIF !iom_use("sopstbtr....) 
     124         IF( iom_use( 'sopstove' ) .OR. iom_use( 'sophtove' ) ) THEN 
     125            DO jn = 1, nptr 
     126               sjk(:,:,jn) = ptr_sjk( zmask(:,:,:), btmsk(:,:,jn) ) 
     127               r1_sjk(:,:,jn) = 0._wp 
     128               WHERE( sjk(:,:,jn) /= 0._wp )   r1_sjk(:,:,jn) = 1._wp / sjk(:,:,jn) 
     129               ! i-mean T and S, j-Stream-Function, basin 
     130               zt_jk(:,:,jn) = ptr_sjk( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 
     131               zs_jk(:,:,jn) = ptr_sjk( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 
     132               v_msf(:,:,jn) = ptr_sjk( pvtr(:,:,:), btmsk34(:,:,jn) )  
     133               hstr_ove(:,jp_tem,jn) = SUM( v_msf(:,:,jn)*zt_jk(:,:,jn), 2 ) 
     134               hstr_ove(:,jp_sal,jn) = SUM( v_msf(:,:,jn)*zs_jk(:,:,jn), 2 ) 
     135               ! 
     136            ENDDO 
     137            DO jn = 1, nptr 
     138               z3dtr(1,:,jn) = hstr_ove(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     139               DO ji = 1, jpi 
     140                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     141               ENDDO 
     142            ENDDO 
     143            CALL iom_put( 'sophtove', z3dtr ) 
     144            DO jn = 1, nptr 
     145               z3dtr(1,:,jn) = hstr_ove(:,jp_sal,jn) * rc_ggram !  (conversion in Gg) 
     146               DO ji = 1, jpi 
     147                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     148               ENDDO 
     149            ENDDO 
     150            CALL iom_put( 'sopstove', z3dtr ) 
     151         ENDIF 
     152 
     153         IF( iom_use( 'sopstbtr' ) .OR. iom_use( 'sophtbtr' ) ) THEN 
     154            ! Calculate barotropic heat and salt transport here  
     155            DO jn = 1, nptr 
     156               sjk(:,1,jn) = ptr_sj( zmask(:,:,:), btmsk(:,:,jn) ) 
     157               r1_sjk(:,1,jn) = 0._wp 
     158               WHERE( sjk(:,1,jn) /= 0._wp )   r1_sjk(:,1,jn) = 1._wp / sjk(:,1,jn) 
     159               ! 
     160               zvsum(:) = ptr_sj( pvtr(:,:,:), btmsk34(:,:,jn) ) 
     161               ztsum(:) = ptr_sj( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) 
     162               zssum(:) = ptr_sj( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) 
     163               hstr_btr(:,jp_tem,jn) = zvsum(:) * ztsum(:) * r1_sjk(:,1,jn) 
     164               hstr_btr(:,jp_sal,jn) = zvsum(:) * zssum(:) * r1_sjk(:,1,jn) 
     165               ! 
     166            ENDDO 
     167            DO jn = 1, nptr 
     168               z3dtr(1,:,jn) = hstr_btr(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     169               DO ji = 1, jpi 
     170                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     171               ENDDO 
     172            ENDDO 
     173            CALL iom_put( 'sophtbtr', z3dtr ) 
     174            DO jn = 1, nptr 
     175               z3dtr(1,:,jn) = hstr_btr(:,jp_sal,jn) * rc_ggram !  (conversion in Gg) 
     176               DO ji = 1, jpi 
     177                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     178               ENDDO 
     179            ENDDO 
     180            CALL iom_put( 'sopstbtr', z3dtr ) 
     181         ENDIF  
    242182         ! 
    243183      ELSE 
    244184         ! 
    245          IF( iom_use("zotemglo") ) THEN    ! i-mean i-k-surface  
     185         zmask(:,:,:) = 0._wp 
     186         zts(:,:,:,:) = 0._wp 
     187         IF( iom_use( 'zotem' ) .OR. iom_use( 'zosal' ) .OR. iom_use( 'zosrf' )  ) THEN    ! i-mean i-k-surface  
    246188            DO jk = 1, jpkm1 
    247189               DO jj = 1, jpj 
     
    254196               END DO 
    255197            END DO 
     198            ! 
    256199            DO jn = 1, nptr 
    257200               zmask(1,:,:) = ptr_sjk( zmask(:,:,:), btmsk(:,:,jn) ) 
    258                cl1 = TRIM('zosrf'//clsubb(jn) ) 
    259                CALL iom_put( cl1, zmask ) 
    260                ! 
    261                z3d(1,:,:) = ptr_sjk( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) & 
    262                   &            / MAX( zmask(1,:,:), 10.e-15 ) 
    263                DO ji = 1, jpi 
    264                   z3d(ji,:,:) = z3d(1,:,:) 
    265                ENDDO 
    266                cl1 = TRIM('zotem'//clsubb(jn) ) 
    267                CALL iom_put( cl1, z3d ) 
    268                ! 
    269                z3d(1,:,:) = ptr_sjk( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) & 
    270                   &            / MAX( zmask(1,:,:), 10.e-15 ) 
    271                DO ji = 1, jpi 
    272                   z3d(ji,:,:) = z3d(1,:,:) 
    273                ENDDO 
    274                cl1 = TRIM('zosal'//clsubb(jn) ) 
    275                CALL iom_put( cl1, z3d ) 
    276             END DO 
     201               z4d1(:,:,:,jn) = zmask(:,:,:) 
     202            ENDDO 
     203            CALL iom_put( 'zosrf', z4d1 ) 
     204            ! 
     205            DO jn = 1, nptr 
     206               z4d2(1,:,:,jn) = ptr_sjk( zts(:,:,:,jp_tem), btmsk(:,:,jn) ) & 
     207                  &            / MAX( z4d1(1,:,:,jn), 10.e-15 ) 
     208               DO ji = 1, jpi 
     209                  z4d2(ji,:,:,jn) = z4d2(1,:,:,jn) 
     210               ENDDO 
     211            ENDDO 
     212            CALL iom_put( 'zotem', z4d2 ) 
     213            ! 
     214            DO jn = 1, nptr 
     215               z4d2(1,:,:,jn) = ptr_sjk( zts(:,:,:,jp_sal), btmsk(:,:,jn) ) & 
     216                  &            / MAX( z4d1(1,:,:,jn), 10.e-15 ) 
     217               DO ji = 1, jpi 
     218                  z4d2(ji,:,:,jn) = z4d2(1,:,:,jn) 
     219               ENDDO 
     220            ENDDO 
     221            CALL iom_put( 'zosal', z4d2 ) 
     222            ! 
    277223         ENDIF 
    278224         ! 
    279225         !                                ! Advective and diffusive heat and salt transport 
    280          IF( iom_use("sophtadv") .OR. iom_use("sopstadv") ) THEN    
    281             z2d(1,:) = htr_adv(:,1) * rc_pwatt        !  (conversion in PW) 
    282             DO ji = 1, jpi 
    283                z2d(ji,:) = z2d(1,:) 
    284             ENDDO 
    285             cl1 = 'sophtadv'                  
    286             CALL iom_put( TRIM(cl1), z2d ) 
    287             z2d(1,:) = str_adv(:,1) * rc_ggram        ! (conversion in Gg) 
    288             DO ji = 1, jpi 
    289                z2d(ji,:) = z2d(1,:) 
    290             ENDDO 
    291             cl1 = 'sopstadv' 
    292             CALL iom_put( TRIM(cl1), z2d ) 
    293             IF( ln_subbas ) THEN 
    294               DO jn=2,nptr 
    295                z2d(1,:) = htr_adv(:,jn) * rc_pwatt        !  (conversion in PW) 
    296                DO ji = 1, jpi 
    297                  z2d(ji,:) = z2d(1,:) 
    298                ENDDO 
    299                cl1 = TRIM('sophtadv_'//clsubb(jn))                  
    300                CALL iom_put( cl1, z2d ) 
    301                z2d(1,:) = str_adv(:,jn) * rc_ggram        ! (conversion in Gg) 
    302                DO ji = 1, jpi 
    303                   z2d(ji,:) = z2d(1,:) 
    304                ENDDO 
    305                cl1 = TRIM('sopstadv_'//clsubb(jn))                  
    306                CALL iom_put( cl1, z2d )               
    307               ENDDO 
    308             ENDIF 
    309          ENDIF 
    310          ! 
    311          IF( iom_use("sophtldf") .OR. iom_use("sopstldf") ) THEN    
    312             z2d(1,:) = htr_ldf(:,1) * rc_pwatt        !  (conversion in PW)  
    313             DO ji = 1, jpi 
    314                z2d(ji,:) = z2d(1,:) 
    315             ENDDO 
    316             cl1 = 'sophtldf' 
    317             CALL iom_put( TRIM(cl1), z2d ) 
    318             z2d(1,:) = str_ldf(:,1) * rc_ggram        !  (conversion in Gg) 
    319             DO ji = 1, jpi 
    320                z2d(ji,:) = z2d(1,:) 
    321             ENDDO 
    322             cl1 = 'sopstldf' 
    323             CALL iom_put( TRIM(cl1), z2d ) 
    324             IF( ln_subbas ) THEN 
    325               DO jn=2,nptr 
    326                z2d(1,:) = htr_ldf(:,jn) * rc_pwatt        !  (conversion in PW) 
    327                DO ji = 1, jpi 
    328                  z2d(ji,:) = z2d(1,:) 
    329                ENDDO 
    330                cl1 = TRIM('sophtldf_'//clsubb(jn))                  
    331                CALL iom_put( cl1, z2d ) 
    332                z2d(1,:) = str_ldf(:,jn) * rc_ggram        ! (conversion in Gg) 
    333                DO ji = 1, jpi 
    334                   z2d(ji,:) = z2d(1,:) 
    335                ENDDO 
    336                cl1 = TRIM('sopstldf_'//clsubb(jn))                  
    337                CALL iom_put( cl1, z2d )               
    338               ENDDO 
    339             ENDIF 
    340          ENDIF 
    341  
    342          IF( iom_use("sophteiv") .OR. iom_use("sopsteiv") ) THEN  
    343             z2d(1,:) = htr_eiv(:,1) * rc_pwatt        !  (conversion in PW)  
    344             DO ji = 1, jpi 
    345                z2d(ji,:) = z2d(1,:) 
    346             ENDDO 
    347             cl1 = 'sophteiv' 
    348             CALL iom_put( TRIM(cl1), z2d ) 
    349             z2d(1,:) = str_eiv(:,1) * rc_ggram        !  (conversion in Gg) 
    350             DO ji = 1, jpi 
    351                z2d(ji,:) = z2d(1,:) 
    352             ENDDO 
    353             cl1 = 'sopsteiv' 
    354             CALL iom_put( TRIM(cl1), z2d ) 
    355             IF( ln_subbas ) THEN 
    356                DO jn=2,nptr 
    357                   z2d(1,:) = htr_eiv(:,jn) * rc_pwatt        !  (conversion in PW) 
     226         IF( iom_use( 'sophtadv' ) .OR. iom_use( 'sopstadv' ) ) THEN   
     227            !  
     228            DO jn = 1, nptr 
     229               z3dtr(1,:,jn) = hstr_adv(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     230               DO ji = 1, jpi 
     231                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     232               ENDDO 
     233            ENDDO 
     234            CALL iom_put( 'sophtadv', z3dtr ) 
     235            DO jn = 1, nptr 
     236               z3dtr(1,:,jn) = hstr_adv(:,jp_sal,jn) * rc_ggram !  (conversion in Gg) 
     237               DO ji = 1, jpi 
     238                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     239               ENDDO 
     240            ENDDO 
     241            CALL iom_put( 'sopstadv', z3dtr ) 
     242         ENDIF 
     243         ! 
     244         IF( iom_use( 'sophtldf' ) .OR. iom_use( 'sopstldf' ) ) THEN   
     245            !  
     246            DO jn = 1, nptr 
     247               z3dtr(1,:,jn) = hstr_ldf(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     248               DO ji = 1, jpi 
     249                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     250               ENDDO 
     251            ENDDO 
     252            CALL iom_put( 'sophtldf', z3dtr ) 
     253            DO jn = 1, nptr 
     254               z3dtr(1,:,jn) = hstr_ldf(:,jp_sal,jn) * rc_ggram !  (conversion in Gg) 
     255               DO ji = 1, jpi 
     256                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     257               ENDDO 
     258            ENDDO 
     259            CALL iom_put( 'sopstldf', z3dtr ) 
     260         ENDIF 
     261         ! 
     262         IF( iom_use( 'sophteiv' ) .OR. iom_use( 'sopsteiv' ) ) THEN   
     263            !  
     264            DO jn = 1, nptr 
     265               z3dtr(1,:,jn) = hstr_eiv(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     266               DO ji = 1, jpi 
     267                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     268               ENDDO 
     269            ENDDO 
     270            CALL iom_put( 'sophteiv', z3dtr ) 
     271            DO jn = 1, nptr 
     272               z3dtr(1,:,jn) = hstr_eiv(:,jp_sal,jn) * rc_ggram !  (conversion in Gg) 
     273               DO ji = 1, jpi 
     274                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     275               ENDDO 
     276            ENDDO 
     277            CALL iom_put( 'sopsteiv', z3dtr ) 
     278         ENDIF 
     279         ! 
     280         IF( iom_use( 'sopstvtr' ) .OR. iom_use( 'sophtvtr' ) ) THEN 
     281            zts(:,:,:,:) = 0._wp 
     282            DO jk = 1, jpkm1 
     283               DO jj = 1, jpjm1 
    358284                  DO ji = 1, jpi 
    359                      z2d(ji,:) = z2d(1,:) 
     285                     zvfc = e1v(ji,jj) * e3v_n(ji,jj,jk) 
     286                     zts(ji,jj,jk,jp_tem) = (tsn(ji,jj,jk,jp_tem)+tsn(ji,jj+1,jk,jp_tem)) * 0.5 * zvfc  !Tracers averaged onto V grid 
     287                     zts(ji,jj,jk,jp_sal) = (tsn(ji,jj,jk,jp_sal)+tsn(ji,jj+1,jk,jp_sal)) * 0.5 * zvfc 
    360288                  ENDDO 
    361                   cl1 = TRIM('sophteiv_'//clsubb(jn))                  
    362                   CALL iom_put( cl1, z2d ) 
    363                   z2d(1,:) = str_eiv(:,jn) * rc_ggram        ! (conversion in Gg) 
    364                   DO ji = 1, jpi 
    365                      z2d(ji,:) = z2d(1,:) 
    366                   ENDDO 
    367                   cl1 = TRIM('sopsteiv_'//clsubb(jn))  
    368                   CALL iom_put( cl1, z2d )               
    369                ENDDO 
    370             ENDIF 
     289               ENDDO 
     290             ENDDO 
     291             CALL dia_ptr_hst( jp_tem, 'vtr', zts(:,:,:,jp_tem) ) 
     292             CALL dia_ptr_hst( jp_sal, 'vtr', zts(:,:,:,jp_sal) ) 
     293             DO jn = 1, nptr 
     294                z3dtr(1,:,jn) = hstr_vtr(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     295                DO ji = 1, jpi 
     296                   z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     297                ENDDO 
     298             ENDDO 
     299             CALL iom_put( 'sophtvtr', z3dtr ) 
     300             DO jn = 1, nptr 
     301               z3dtr(1,:,jn) = hstr_vtr(:,jp_sal,jn) * rc_ggram !  (conversion in Gg) 
     302               DO ji = 1, jpi 
     303                  z3dtr(ji,:,jn) = z3dtr(1,:,jn) 
     304               ENDDO 
     305            ENDDO 
     306            CALL iom_put( 'sopstvtr', z3dtr ) 
     307         ENDIF 
     308         ! 
     309         IF( iom_use( 'uocetr_vsum_cumul' ) ) THEN 
     310            CALL iom_get_var(  'uocetr_vsum_op', z2d ) ! get uocetr_vsum_op from xml 
     311            z2d(:,:) = ptr_ci_2d( z2d(:,:) )   
     312            CALL iom_put( 'uocetr_vsum_cumul', z2d ) 
    371313         ENDIF 
    372314         ! 
     
    384326      !! ** Purpose :   Initialization, namelist read 
    385327      !!---------------------------------------------------------------------- 
    386       INTEGER ::  jn           ! local integers 
    387       INTEGER ::  inum, ierr   ! local integers 
    388       INTEGER ::  ios          ! Local integer output status for namelist read 
     328      INTEGER ::  inum, jn, ios, ierr           ! local integers 
    389329      !! 
    390330      NAMELIST/namptr/ ln_diaptr, ln_subbas 
    391       !!---------------------------------------------------------------------- 
     331      REAL(wp), DIMENSION(jpi,jpj) :: zmsk 
     332      !!---------------------------------------------------------------------- 
     333 
    392334 
    393335      REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport 
     
    397339      REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport 
    398340      READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 
    399 902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' ) 
     341902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' ) 
    400342      IF(lwm) WRITE ( numond, namptr ) 
    401343 
     
    406348         WRITE(numout,*) '   Namelist namptr : set ptr parameters' 
    407349         WRITE(numout,*) '      Poleward heat & salt transport (T) or not (F)      ln_diaptr  = ', ln_diaptr 
    408          WRITE(numout,*) '      Global (F) or glo/Atl/Pac/Ind/Indo-Pac basins      ln_subbas  = ', ln_subbas 
    409350      ENDIF 
    410351 
    411352      IF( ln_diaptr ) THEN   
    412353         ! 
    413          IF( ln_subbas ) THEN  
    414             nptr = 5            ! Global, Atlantic, Pacific, Indian, Indo-Pacific 
    415             ALLOCATE( clsubb(nptr) ) 
    416             clsubb(1) = 'glo' ;  clsubb(2) = 'atl'  ;  clsubb(3) = 'pac'  ;  clsubb(4) = 'ind'  ;  clsubb(5) = 'ipc' 
    417          ELSE                
    418             nptr = 1       ! Global only 
    419             ALLOCATE( clsubb(nptr) ) 
    420             clsubb(1) = 'glo'  
    421          ENDIF 
    422  
    423          !                                      ! allocate dia_ptr arrays 
    424354         IF( dia_ptr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_ptr_init : unable to allocate arrays' ) 
    425355 
    426356         rc_pwatt = rc_pwatt * rau0_rcp          ! conversion from K.s-1 to PetaWatt 
     357         rc_ggram = rc_ggram * rau0              ! conversion from m3/s to Gg/s 
    427358 
    428359         IF( lk_mpp )   CALL mpp_ini_znl( numout )     ! Define MPI communicator for zonal sum 
    429360 
    430          IF( ln_subbas ) THEN                ! load sub-basin mask 
    431             CALL iom_open( 'subbasins', inum,  ldstop = .FALSE.  ) 
    432             CALL iom_get( inum, jpdom_data, 'atlmsk', btmsk(:,:,2) )   ! Atlantic basin 
    433             CALL iom_get( inum, jpdom_data, 'pacmsk', btmsk(:,:,3) )   ! Pacific  basin 
    434             CALL iom_get( inum, jpdom_data, 'indmsk', btmsk(:,:,4) )   ! Indian   basin 
    435             CALL iom_close( inum ) 
    436             btmsk(:,:,5) = MAX ( btmsk(:,:,3), btmsk(:,:,4) )          ! Indo-Pacific basin 
    437             WHERE( gphit(:,:) < -30._wp)   ;   btm30(:,:) = 0._wp      ! mask out Southern Ocean 
    438             ELSE WHERE                     ;   btm30(:,:) = ssmask(:,:) 
    439             END WHERE 
    440          ENDIF 
    441     
    442          btmsk(:,:,1) = tmask_i(:,:)                                   ! global ocean 
    443        
    444          DO jn = 1, nptr 
     361         btmsk(:,:,1) = tmask_i(:,:)                  
     362         CALL iom_open( 'subbasins', inum,  ldstop = .FALSE.  ) 
     363         CALL iom_get( inum, jpdom_data, 'atlmsk', btmsk(:,:,2) )   ! Atlantic basin 
     364         CALL iom_get( inum, jpdom_data, 'pacmsk', btmsk(:,:,3) )   ! Pacific  basin 
     365         CALL iom_get( inum, jpdom_data, 'indmsk', btmsk(:,:,4) )   ! Indian   basin 
     366         CALL iom_close( inum ) 
     367         btmsk(:,:,5) = MAX ( btmsk(:,:,3), btmsk(:,:,4) )          ! Indo-Pacific basin 
     368         DO jn = 2, nptr 
    445369            btmsk(:,:,jn) = btmsk(:,:,jn) * tmask_i(:,:)               ! interior domain only 
    446370         END DO 
     371         ! JD : modification so that overturning streamfunction is available in Atlantic at 34S to compare with observations 
     372         WHERE( gphit(:,:)*tmask_i(:,:) < -34._wp) 
     373           zmsk(:,:) = 0._wp      ! mask out Southern Ocean 
     374         ELSE WHERE                   
     375           zmsk(:,:) = ssmask(:,:) 
     376         END WHERE 
     377         btmsk34(:,:,1) = btmsk(:,:,1)                  
     378         DO jn = 2, nptr 
     379            btmsk34(:,:,jn) = btmsk(:,:,jn) * zmsk(:,:)               ! interior domain only 
     380         ENDDO 
    447381 
    448382         ! Initialise arrays to zero because diatpr is called before they are first calculated 
    449383         ! Note that this means diagnostics will not be exactly correct when model run is restarted. 
    450          htr_adv(:,:) = 0._wp  ;  str_adv(:,:) =  0._wp  
    451          htr_ldf(:,:) = 0._wp  ;  str_ldf(:,:) =  0._wp  
    452          htr_eiv(:,:) = 0._wp  ;  str_eiv(:,:) =  0._wp  
    453          htr_ove(:,:) = 0._wp  ;   str_ove(:,:) =  0._wp 
    454          htr_btr(:,:) = 0._wp  ;   str_btr(:,:) =  0._wp 
     384         hstr_adv(:,:,:) = 0._wp            
     385         hstr_ldf(:,:,:) = 0._wp            
     386         hstr_eiv(:,:,:) = 0._wp            
     387         hstr_ove(:,:,:) = 0._wp            
     388         hstr_btr(:,:,:) = 0._wp           ! 
     389         hstr_vtr(:,:,:) = 0._wp           ! 
    455390         ! 
    456391      ENDIF  
     
    471406      INTEGER                                        :: jn    ! 
    472407 
     408      ! 
    473409      IF( cptr == 'adv' ) THEN 
    474          IF( ktra == jp_tem )  htr_adv(:,1) = ptr_sj( pva(:,:,:) ) 
    475          IF( ktra == jp_sal )  str_adv(:,1) = ptr_sj( pva(:,:,:) ) 
     410         IF( ktra == jp_tem )  THEN 
     411             DO jn = 1, nptr 
     412                hstr_adv(:,jp_tem,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     413             ENDDO 
     414         ENDIF 
     415         IF( ktra == jp_sal )  THEN 
     416             DO jn = 1, nptr 
     417                hstr_adv(:,jp_sal,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     418             ENDDO 
     419         ENDIF 
    476420      ENDIF 
     421      ! 
    477422      IF( cptr == 'ldf' ) THEN 
    478          IF( ktra == jp_tem )  htr_ldf(:,1) = ptr_sj( pva(:,:,:) ) 
    479          IF( ktra == jp_sal )  str_ldf(:,1) = ptr_sj( pva(:,:,:) ) 
     423         IF( ktra == jp_tem )  THEN 
     424             DO jn = 1, nptr 
     425                hstr_ldf(:,jp_tem,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     426             ENDDO 
     427         ENDIF 
     428         IF( ktra == jp_sal )  THEN 
     429             DO jn = 1, nptr 
     430                hstr_ldf(:,jp_sal,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     431             ENDDO 
     432         ENDIF 
    480433      ENDIF 
     434      ! 
    481435      IF( cptr == 'eiv' ) THEN 
    482          IF( ktra == jp_tem )  htr_eiv(:,1) = ptr_sj( pva(:,:,:) ) 
    483          IF( ktra == jp_sal )  str_eiv(:,1) = ptr_sj( pva(:,:,:) ) 
     436         IF( ktra == jp_tem )  THEN 
     437             DO jn = 1, nptr 
     438                hstr_eiv(:,jp_tem,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     439             ENDDO 
     440         ENDIF 
     441         IF( ktra == jp_sal )  THEN 
     442             DO jn = 1, nptr 
     443                hstr_eiv(:,jp_sal,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     444             ENDDO 
     445         ENDIF 
    484446      ENDIF 
    485447      ! 
    486       IF( ln_subbas ) THEN 
    487          ! 
    488          IF( cptr == 'adv' ) THEN 
    489              IF( ktra == jp_tem ) THEN  
    490                 DO jn = 2, nptr 
    491                    htr_adv(:,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
    492                 END DO 
    493              ENDIF 
    494              IF( ktra == jp_sal ) THEN  
    495                 DO jn = 2, nptr 
    496                    str_adv(:,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
    497                 END DO 
    498              ENDIF 
    499          ENDIF 
    500          IF( cptr == 'ldf' ) THEN 
    501              IF( ktra == jp_tem ) THEN  
    502                 DO jn = 2, nptr 
    503                     htr_ldf(:,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
    504                  END DO 
    505              ENDIF 
    506              IF( ktra == jp_sal ) THEN  
    507                 DO jn = 2, nptr 
    508                    str_ldf(:,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
    509                 END DO 
    510              ENDIF 
    511          ENDIF 
    512          IF( cptr == 'eiv' ) THEN 
    513              IF( ktra == jp_tem ) THEN  
    514                 DO jn = 2, nptr 
    515                     htr_eiv(:,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
    516                  END DO 
    517              ENDIF 
    518              IF( ktra == jp_sal ) THEN  
    519                 DO jn = 2, nptr 
    520                    str_eiv(:,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
    521                 END DO 
    522              ENDIF 
    523          ENDIF 
    524          ! 
     448      IF( cptr == 'vtr' ) THEN 
     449         IF( ktra == jp_tem )  THEN 
     450             DO jn = 1, nptr 
     451                hstr_vtr(:,jp_tem,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     452             ENDDO 
     453         ENDIF 
     454         IF( ktra == jp_sal )  THEN 
     455             DO jn = 1, nptr 
     456                hstr_vtr(:,jp_sal,jn) = ptr_sj( pva(:,:,:), btmsk(:,:,jn) ) 
     457             ENDDO 
     458         ENDIF 
    525459      ENDIF 
     460      ! 
    526461   END SUBROUTINE dia_ptr_hst 
    527462 
     
    536471      ierr(:) = 0 
    537472      ! 
    538       ALLOCATE( btmsk(jpi,jpj,nptr) ,              & 
    539          &      htr_adv(jpj,nptr) , str_adv(jpj,nptr) ,   & 
    540          &      htr_eiv(jpj,nptr) , str_eiv(jpj,nptr) ,   & 
    541          &      htr_ove(jpj,nptr) , str_ove(jpj,nptr) ,   & 
    542          &      htr_btr(jpj,nptr) , str_btr(jpj,nptr) ,   & 
    543          &      htr_ldf(jpj,nptr) , str_ldf(jpj,nptr) , STAT=ierr(1)  ) 
    544          ! 
    545       ALLOCATE( p_fval1d(jpj), p_fval2d(jpj,jpk), Stat=ierr(2)) 
    546       ! 
    547       ALLOCATE( btm30(jpi,jpj), STAT=ierr(3)  ) 
    548  
    549          ! 
    550       dia_ptr_alloc = MAXVAL( ierr ) 
    551       CALL mpp_sum( 'diaptr', dia_ptr_alloc ) 
     473      IF( .NOT. ALLOCATED( btmsk ) ) THEN 
     474         ALLOCATE( btmsk(jpi,jpj,nptr)    , btmsk34(jpi,jpj,nptr),   & 
     475            &      hstr_adv(jpj,jpts,nptr), hstr_eiv(jpj,jpts,nptr), & 
     476            &      hstr_ove(jpj,jpts,nptr), hstr_btr(jpj,jpts,nptr), & 
     477            &      hstr_ldf(jpj,jpts,nptr), hstr_vtr(jpj,jpts,nptr), STAT=ierr(1)  ) 
     478            ! 
     479         ALLOCATE( p_fval1d(jpj), p_fval2d(jpj,jpk), Stat=ierr(2)) 
     480         ! 
     481         dia_ptr_alloc = MAXVAL( ierr ) 
     482         CALL mpp_sum( 'diaptr', dia_ptr_alloc ) 
     483      ENDIF 
    552484      ! 
    553485   END FUNCTION dia_ptr_alloc 
     
    565497      !! ** Action  : - p_fval: i-k-mean poleward flux of pva 
    566498      !!---------------------------------------------------------------------- 
    567       REAL(wp), INTENT(in), DIMENSION(jpi,jpj,jpk)       ::   pva   ! mask flux array at V-point 
    568       REAL(wp), INTENT(in), DIMENSION(jpi,jpj), OPTIONAL ::   pmsk   ! Optional 2D basin mask 
     499      REAL(wp), INTENT(in), DIMENSION(jpi,jpj,jpk)  ::   pva   ! mask flux array at V-point 
     500      REAL(wp), INTENT(in), DIMENSION(jpi,jpj)      ::   pmsk   ! Optional 2D basin mask 
    569501      ! 
    570502      INTEGER                  ::   ji, jj, jk   ! dummy loop arguments 
     
    577509      ijpj = jpj 
    578510      p_fval(:) = 0._wp 
    579       IF( PRESENT( pmsk ) ) THEN  
    580          DO jk = 1, jpkm1 
    581             DO jj = 2, jpjm1 
    582                DO ji = fs_2, fs_jpim1   ! Vector opt. 
    583                   p_fval(jj) = p_fval(jj) + pva(ji,jj,jk) * tmask_i(ji,jj) * pmsk(ji,jj) 
    584                END DO 
     511      DO jk = 1, jpkm1 
     512         DO jj = 2, jpjm1 
     513            DO ji = fs_2, fs_jpim1   ! Vector opt. 
     514               p_fval(jj) = p_fval(jj) + pva(ji,jj,jk) * pmsk(ji,jj) * tmask_i(ji,jj) 
    585515            END DO 
    586516         END DO 
    587       ELSE 
    588          DO jk = 1, jpkm1 
    589             DO jj = 2, jpjm1 
    590                DO ji = fs_2, fs_jpim1   ! Vector opt. 
    591                   p_fval(jj) = p_fval(jj) + pva(ji,jj,jk) * tmask_i(ji,jj)  
    592                END DO 
    593             END DO 
    594          END DO 
    595       ENDIF 
     517      END DO 
    596518#if defined key_mpp_mpi 
    597519      CALL mpp_sum( 'diaptr', p_fval, ijpj, ncomm_znl) 
     
    612534      !! ** Action  : - p_fval: i-k-mean poleward flux of pva 
    613535      !!---------------------------------------------------------------------- 
    614       REAL(wp) , INTENT(in), DIMENSION(jpi,jpj)           ::   pva   ! mask flux array at V-point 
    615       REAL(wp) , INTENT(in), DIMENSION(jpi,jpj), OPTIONAL ::   pmsk   ! Optional 2D basin mask 
     536      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pva   ! mask flux array at V-point 
     537      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pmsk   ! Optional 2D basin mask 
    616538      ! 
    617539      INTEGER                  ::   ji,jj       ! dummy loop arguments 
     
    624546      ijpj = jpj 
    625547      p_fval(:) = 0._wp 
    626       IF( PRESENT( pmsk ) ) THEN  
    627          DO jj = 2, jpjm1 
    628             DO ji = nldi, nlei   ! No vector optimisation here. Better use a mask ? 
    629                p_fval(jj) = p_fval(jj) + pva(ji,jj) * tmask_i(ji,jj) * pmsk(ji,jj) 
    630             END DO 
     548      DO jj = 2, jpjm1 
     549         DO ji = fs_2, fs_jpim1   ! Vector opt. 
     550            p_fval(jj) = p_fval(jj) + pva(ji,jj) * pmsk(ji,jj) * tmask_i(ji,jj) 
    631551         END DO 
    632       ELSE 
    633          DO jj = 2, jpjm1 
    634             DO ji = nldi, nlei   ! No vector optimisation here. Better use a mask ? 
    635                p_fval(jj) = p_fval(jj) + pva(ji,jj) * tmask_i(ji,jj) 
    636             END DO 
    637          END DO 
    638       ENDIF 
     552      END DO 
    639553#if defined key_mpp_mpi 
    640554      CALL mpp_sum( 'diaptr', p_fval, ijpj, ncomm_znl ) 
     
    643557   END FUNCTION ptr_sj_2d 
    644558 
     559   FUNCTION ptr_ci_2d( pva )   RESULT ( p_fval ) 
     560      !!---------------------------------------------------------------------- 
     561      !!                    ***  ROUTINE ptr_ci_2d  *** 
     562      !! 
     563      !! ** Purpose :   "meridional" cumulated sum computation of a j-flux array 
     564      !! 
     565      !! ** Method  : - j cumulated sum of pva using the interior 2D vmask (umask_i). 
     566      !! 
     567      !! ** Action  : - p_fval: j-cumulated sum of pva 
     568      !!---------------------------------------------------------------------- 
     569      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj)  ::   pva   ! mask flux array at V-point 
     570      ! 
     571      INTEGER                  ::   ji,jj,jc       ! dummy loop arguments 
     572      INTEGER                  ::   ijpj        ! ???  
     573      REAL(wp), DIMENSION(jpi,jpj) :: p_fval ! function value 
     574      !!-------------------------------------------------------------------- 
     575      !  
     576      ijpj = jpj  ! ??? 
     577      p_fval(:,:) = 0._wp 
     578      DO jc = 1, jpnj ! looping over all processors in j axis 
     579         DO jj = 2, jpjm1 
     580            DO ji = fs_2, fs_jpim1   ! Vector opt. 
     581               p_fval(ji,jj) = p_fval(ji,jj-1) + pva(ji,jj) * tmask_i(ji,jj) 
     582            END DO 
     583         END DO 
     584         CALL lbc_lnk( 'diaptr', p_fval, 'U', -1. ) 
     585      END DO 
     586      !  
     587   END FUNCTION ptr_ci_2d 
     588 
     589 
    645590 
    646591   FUNCTION ptr_sjk( pta, pmsk )   RESULT ( p_fval ) 
     
    656601      !! 
    657602      IMPLICIT none 
    658       REAL(wp) , INTENT(in), DIMENSION(jpi,jpj,jpk)           ::   pta    ! mask flux array at V-point 
    659       REAL(wp) , INTENT(in), DIMENSION(jpi,jpj)    , OPTIONAL ::   pmsk   ! Optional 2D basin mask 
     603      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj,jpk) ::   pta    ! mask flux array at V-point 
     604      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj)    ::   pmsk   ! Optional 2D basin mask 
    660605      !! 
    661606      INTEGER                           :: ji, jj, jk ! dummy loop arguments 
     
    673618      p_fval(:,:) = 0._wp 
    674619      ! 
    675       IF( PRESENT( pmsk ) ) THEN  
    676          DO jk = 1, jpkm1 
    677             DO jj = 2, jpjm1 
    678 !!gm here, use of tmask_i  ==> no need of loop over nldi, nlei.... 
    679                DO ji =  nldi, nlei   ! No vector optimisation here. Better use a mask ? 
    680                   p_fval(jj,jk) = p_fval(jj,jk) + pta(ji,jj,jk) * pmsk(ji,jj) 
    681                END DO 
     620      DO jk = 1, jpkm1 
     621         DO jj = 2, jpjm1 
     622            DO ji = fs_2, fs_jpim1   ! Vector opt. 
     623               p_fval(jj,jk) = p_fval(jj,jk) + pta(ji,jj,jk) * pmsk(ji,jj) * tmask_i(ji,jj) 
    682624            END DO 
    683625         END DO 
    684       ELSE  
    685          DO jk = 1, jpkm1 
    686             DO jj = 2, jpjm1 
    687                DO ji =  nldi, nlei   ! No vector optimisation here. Better use a mask ? 
    688                   p_fval(jj,jk) = p_fval(jj,jk) + pta(ji,jj,jk) * tmask_i(ji,jj) 
    689                END DO 
    690             END DO 
    691          END DO 
    692       END IF 
     626      END DO 
    693627      ! 
    694628#if defined key_mpp_mpi 
  • NEMO/trunk/src/OCE/IOM/iom.F90

    r12132 r12276  
    5656   LOGICAL, PUBLIC, PARAMETER ::   lk_iomput = .FALSE.       !: iom_put flag 
    5757#endif 
    58    PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get 
     58   PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get, iom_get_var 
    5959   PUBLIC iom_chkatt, iom_getatt, iom_putatt, iom_getszuld, iom_rstput, iom_delay_rst, iom_put 
    6060   PUBLIC iom_use, iom_context_finalize, iom_miss_val 
     
    6262   PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 
    6363   PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d 
    64    PRIVATE iom_p1d, iom_p2d, iom_p3d 
     64   PRIVATE iom_p1d, iom_p2d, iom_p3d, iom_p4d 
    6565#if defined key_iomput 
    6666   PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 
     
    8383   END INTERFACE 
    8484   INTERFACE iom_put 
    85       MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d 
     85      MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d, iom_p4d 
    8686   END INTERFACE iom_put 
    8787   
     
    108108      TYPE(xios_date)     :: start_date 
    109109      CHARACTER(len=lc) :: clname 
     110      INTEGER             :: irefyear, irefmonth, irefday 
    110111      INTEGER           :: ji, jkmin 
    111112      LOGICAL :: llrst_context              ! is context related to restart 
     
    139140 
    140141      ! Calendar type is now defined in xml file  
     142      IF (.NOT.(xios_getvar('ref_year' ,irefyear ))) irefyear  = 1900 
     143      IF (.NOT.(xios_getvar('ref_month',irefmonth))) irefmonth = 01 
     144      IF (.NOT.(xios_getvar('ref_day'  ,irefday  ))) irefday   = 01 
     145 
    141146      SELECT CASE ( nleapy )        ! Choose calendar for IOIPSL 
    142       CASE ( 1)   ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(1900,01,01,00,00,00), & 
     147      CASE ( 1)   ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(irefyear,irefmonth,irefday,00,00,00), & 
    143148          &                                    start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 
    144       CASE ( 0)   ; CALL xios_define_calendar( TYPE = "NoLeap"   , time_origin = xios_date(1900,01,01,00,00,00), & 
     149      CASE ( 0)   ; CALL xios_define_calendar( TYPE = "NoLeap"   , time_origin = xios_date(irefyear,irefmonth,irefday,00,00,00), & 
    145150          &                                    start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 
    146       CASE (30)   ; CALL xios_define_calendar( TYPE = "D360"     , time_origin = xios_date(1900,01,01,00,00,00), & 
     151      CASE (30)   ; CALL xios_define_calendar( TYPE = "D360"     , time_origin = xios_date(irefyear,irefmonth,irefday,00,00,00), & 
    147152          &                                    start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 
    148153      END SELECT 
     
    223228          CALL iom_set_axis_attr( "icbcla", class_num ) 
    224229          CALL iom_set_axis_attr( "iax_20C", (/ REAL(20,wp) /) )   ! strange syntaxe and idea... 
     230          CALL iom_set_axis_attr( "iax_26C", (/ REAL(26,wp) /) )   ! strange syntaxe and idea... 
    225231          CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) )   ! strange syntaxe and idea... 
     232          CALL iom_set_axis_attr( "basin"  , (/ (REAL(ji,wp), ji=1,5) /) ) 
    226233      ENDIF 
    227234      ! 
     
    806813      CHARACTER(LEN=100)    ::   clinfo    ! info character 
    807814      !--------------------------------------------------------------------- 
    808       ! 
    809       IF( iom_open_init == 0 )   RETURN   ! avoid to use iom_file(jf)%nfid that us not yet initialized 
    810815      ! 
    811816      clinfo = '                    iom_close ~~~  ' 
     
    13421347   END SUBROUTINE iom_get_123d 
    13431348 
     1349   SUBROUTINE iom_get_var( cdname, z2d) 
     1350      CHARACTER(LEN=*), INTENT(in ) ::   cdname 
     1351      REAL(wp), DIMENSION(jpi,jpj) ::   z2d  
     1352#if defined key_iomput 
     1353      IF( xios_field_is_active( cdname, at_current_timestep_arg = .TRUE. ) ) THEN 
     1354         z2d(:,:) = 0._wp 
     1355         CALL xios_recv_field( cdname, z2d) 
     1356      ENDIF 
     1357#else 
     1358      IF( .FALSE. )   WRITE(numout,*) cdname, z2d ! useless test to avoid compilation warnings 
     1359#endif 
     1360   END SUBROUTINE iom_get_var 
     1361 
    13441362 
    13451363   FUNCTION iom_getszuld ( kiomid )   
     
    17111729   END SUBROUTINE iom_p3d 
    17121730 
     1731   SUBROUTINE iom_p4d( cdname, pfield4d ) 
     1732      CHARACTER(LEN=*)                  , INTENT(in) ::   cdname 
     1733      REAL(wp),       DIMENSION(:,:,:,:), INTENT(in) ::   pfield4d 
     1734#if defined key_iomput 
     1735      CALL xios_send_field(cdname, pfield4d) 
     1736#else 
     1737      IF( .FALSE. )   WRITE(numout,*) cdname, pfield4d   ! useless test to avoid compilation warnings 
     1738#endif 
     1739   END SUBROUTINE iom_p4d 
     1740 
     1741 
    17131742#if defined key_iomput 
    17141743   !!---------------------------------------------------------------------- 
     
    20532082      ALLOCATE( zlon(ni*nj) )       ;       zlon(:) = 0._wp 
    20542083      ! 
    2055       CALL dom_ngb( -168.53, 65.03, ix, iy, 'T' ) !  i-line that passes through Bering Strait: Reference latitude (used in plots) 
    2056 !      CALL dom_ngb( 180., 90., ix, iy, 'T' ) !  i-line that passes near the North Pole : Reference latitude (used in plots) 
     2084!      CALL dom_ngb( -168.53, 65.03, ix, iy, 'T' ) !  i-line that passes through Bering Strait: Reference latitude (used in plots) 
     2085      CALL dom_ngb( 180., 90., ix, iy, 'T' ) !  i-line that passes near the North Pole : Reference latitude (used in plots) 
    20572086      CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 
    20582087      CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 
    20592088      CALL iom_set_domain_attr("gznl", lonvalue = zlon,   & 
    20602089         &                             latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /)))   
    2061       CALL iom_set_zoom_domain_attr("znl_T", ibegin=ix-1, jbegin=0, ni=1, nj=jpjglo) 
    2062       CALL iom_set_zoom_domain_attr("znl_W", ibegin=ix-1, jbegin=0, ni=1, nj=jpjglo) 
     2090      CALL iom_set_zoom_domain_attr("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=jpjglo) 
    20632091      ! 
    20642092      CALL iom_update_file_name('ptr') 
  • NEMO/trunk/src/OCE/LDF/ldfdyn.F90

    r12201 r12276  
    115115      !!---------------------------------------------------------------------- 
    116116      ! 
    117       REWIND( numnam_ref )              ! Namelist namdyn_ldf in reference namelist : Lateral physics 
     117      REWIND( numnam_ref ) 
    118118      READ  ( numnam_ref, namdyn_ldf, IOSTAT = ios, ERR = 901) 
    119119901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_ldf in reference namelist' ) 
    120120 
    121       REWIND( numnam_cfg )              ! Namelist namdyn_ldf in configuration namelist : Lateral physics 
     121      REWIND( numnam_cfg ) 
    122122      READ  ( numnam_cfg, namdyn_ldf, IOSTAT = ios, ERR = 902 ) 
    123123902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist' ) 
  • NEMO/trunk/src/OCE/LDF/ldftra.F90

    r11993 r12276  
    152152      ! ================================= 
    153153      ! 
    154       REWIND( numnam_ref )              ! Namelist namtra_ldf in reference namelist : Lateral physics on tracers 
     154      REWIND( numnam_ref ) 
    155155      READ  ( numnam_ref, namtra_ldf, IOSTAT = ios, ERR = 901) 
    156156901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_ldf in reference namelist' ) 
    157       REWIND( numnam_cfg )              ! Namelist namtra_ldf in configuration namelist : Lateral physics on tracers 
     157 
     158      REWIND( numnam_cfg ) 
    158159      READ  ( numnam_cfg, namtra_ldf, IOSTAT = ios, ERR = 902 ) 
    159160902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist' ) 
     
    510511      ENDIF 
    511512      ! 
    512       REWIND( numnam_ref )              ! Namelist namtra_eiv in reference namelist : eddy induced velocity param. 
    513513      READ  ( numnam_ref, namtra_eiv, IOSTAT = ios, ERR = 901) 
    514514901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_eiv in reference namelist' ) 
    515515      ! 
    516       REWIND( numnam_cfg )              ! Namelist namtra_eiv in configuration namelist : eddy induced velocity param. 
    517516      READ  ( numnam_cfg, namtra_eiv, IOSTAT = ios, ERR = 902 ) 
    518517902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist' ) 
     
    662661                  ! eddies using the isopycnal slopes calculated in ldfslp.F :  
    663662                  ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w)) 
    664                   ze3w = e3w_n(ji,jj,jk) * tmask(ji,jj,jk) 
     663                  ze3w = e3w_n(ji,jj,jk) * wmask(ji,jj,jk) 
    665664                  zah(ji,jj) = zah(ji,jj) + zn2 * wslp2(ji,jj,jk) * ze3w 
    666665                  zhw(ji,jj) = zhw(ji,jj) + ze3w 
     
    680679                  ! eddies using the isopycnal slopes calculated in ldfslp.F :  
    681680                  ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w)) 
    682                   ze3w = e3w_n(ji,jj,jk) * tmask(ji,jj,jk) 
     681                  ze3w = e3w_n(ji,jj,jk) * wmask(ji,jj,jk) 
    683682                  zah(ji,jj) = zah(ji,jj) + zn2 * ( wslpi(ji,jj,jk) * wslpi(ji,jj,jk)   & 
    684683                     &                            + wslpj(ji,jj,jk) * wslpj(ji,jj,jk) ) * ze3w 
     
    851850      CALL iom_put( "woce_eiv", zw3d ) 
    852851      ! 
     852      IF( iom_use('weiv_masstr') ) THEN   ! vertical mass transport & its square value 
     853         zw2d(:,:) = rau0 * e1e2t(:,:) 
     854         DO jk = 1, jpk 
     855            zw3d(:,:,jk) = zw3d(:,:,jk) * zw2d(:,:) 
     856         END DO 
     857         CALL iom_put( "weiv_masstr" , zw3d )   
     858      ENDIF 
     859      ! 
     860      IF( iom_use('ueiv_masstr') ) THEN 
     861         zw3d(:,:,:) = 0.e0 
     862         DO jk = 1, jpkm1 
     863            zw3d(:,:,jk) = rau0 * ( psi_uw(:,:,jk+1) - psi_uw(:,:,jk) )  
     864         END DO 
     865         CALL iom_put( "ueiv_masstr", zw3d )                  ! mass transport in i-direction 
     866      ENDIF 
    853867      ! 
    854868      zztmp = 0.5_wp * rau0 * rcp  
     
    870884        CALL iom_put( "ueiv_heattr3d", zztmp * zw3d )                  ! heat transport in i-direction 
    871885      ENDIF 
     886      ! 
     887      IF( iom_use('veiv_masstr') ) THEN 
     888         zw3d(:,:,:) = 0.e0 
     889         DO jk = 1, jpkm1 
     890            zw3d(:,:,jk) = rau0 * ( psi_vw(:,:,jk+1) - psi_vw(:,:,jk) )  
     891         END DO 
     892         CALL iom_put( "veiv_masstr", zw3d )                  ! mass transport in i-direction 
     893      ENDIF 
     894      ! 
    872895      zw2d(:,:)   = 0._wp  
    873896      zw3d(:,:,:) = 0._wp  
     
    885908      CALL iom_put( "veiv_heattr", zztmp * zw3d )                  !  heat transport in j-direction 
    886909      ! 
    887       IF( ln_diaptr )  CALL dia_ptr_hst( jp_tem, 'eiv', 0.5 * zw3d ) 
     910      IF( iom_use( 'sophteiv' ) )   CALL dia_ptr_hst( jp_tem, 'eiv', 0.5 * zw3d ) 
    888911      ! 
    889912      zztmp = 0.5_wp * 0.5 
     
    920943      CALL iom_put( "veiv_salttr", zztmp * zw3d )                  !  salt transport in j-direction 
    921944      ! 
    922       IF( ln_diaptr ) CALL dia_ptr_hst( jp_sal, 'eiv', 0.5 * zw3d ) 
     945      IF( iom_use( 'sopsteiv' ) ) CALL dia_ptr_hst( jp_sal, 'eiv', 0.5 * zw3d ) 
    923946      ! 
    924947      ! 
  • NEMO/trunk/src/OCE/SBC/sbcblk.F90

    r11993 r12276  
    801801      REAL(wp), DIMENSION(jpi,jpj)     ::   zevap, zsnw   ! evaporation and snw distribution after wind blowing (SI3) 
    802802      REAL(wp), DIMENSION(jpi,jpj)     ::   zrhoa 
     803      REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2 
    803804      !!--------------------------------------------------------------------- 
    804805      ! 
     
    913914         qtr_ice_top(:,:,:) = 0._wp  
    914915      END WHERE 
     916      ! 
     917 
     918      IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN 
     919         ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) )  
     920         CALL iom_put( 'evap_ao_cea'  , ztmp(:,:) * tmask(:,:,1) )   ! ice-free oce evap (cell average) 
     921         CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * sst_m(:,:) * rcp * tmask(:,:,1) )   ! heat flux from evap (cell average) 
     922      ENDIF 
     923      IF( iom_use('hflx_rain_cea') ) THEN 
     924         ztmp(:,:) = rcp * ( SUM( (ptsu-rt0) * a_i_b, dim=3 ) + sst_m(:,:) * ( 1._wp - at_i_b(:,:) ) ) 
     925         CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * ztmp(:,:) )   ! heat flux from rain (cell average) 
     926      ENDIF 
     927      IF( iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN 
     928          WHERE( SUM( a_i_b, dim=3 ) > 1.e-10 ) ;   ztmp(:,:) = rcpi * SUM( (ptsu-rt0) * a_i_b, dim=3 ) / SUM( a_i_b, dim=3 ) 
     929          ELSEWHERE                             ;   ztmp(:,:) = rcp * sst_m(:,:)     
     930          ENDWHERE 
     931          ztmp2(:,:) = sprecip(:,:) * ( ztmp(:,:) - rLfus )  
     932          CALL iom_put('hflx_snow_cea'   , ztmp2(:,:) ) ! heat flux from snow (cell average) 
     933          CALL iom_put('hflx_snow_ao_cea', ztmp2(:,:) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 
     934          CALL iom_put('hflx_snow_ai_cea', ztmp2(:,:) *           zsnw(:,:)   ) ! heat flux from snow (over ice) 
     935      ENDIF 
    915936      ! 
    916937      IF(ln_ctl) THEN 
  • NEMO/trunk/src/OCE/SBC/sbccpl.F90

    r12171 r12276  
    573573      IF ( TRIM( sn_rcv_emp%clcat    ) == 'yes' )   srcv(jpr_ievp)%nct       = nn_cats_cpl 
    574574 
    575 #if defined key_si3 
    576       IF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN  
    577          IF( .NOT.srcv(jpr_ts_ice)%laction )  & 
    578             &   CALL ctl_stop( 'sbc_cpl_init: srcv(jpr_ts_ice)%laction should be set to true when ln_cndflx=T' )      
    579       ENDIF 
    580 #endif 
    581575      !                                                      ! ------------------------- ! 
    582576      !                                                      !      Wave breaking        !     
     
    868862      ELSE IF( sn_snd_crt%clvgrd /= 'T' ) THEN   
    869863         CALL ctl_stop( 'sn_snd_crt%clvgrd must be equal to T' ) 
     864         ssnd(jps_ocx1:jps_ivz1)%clgrid  = 'T'      ! all oce and ice components on the same unique grid 
    870865      ENDIF 
    871866      ssnd(jps_ocx1:jps_ivz1)%laction = .TRUE.   ! default: all are send 
     
    10451040      ENDIF 
    10461041      xcplmask(:,:,0) = 1. - SUM( xcplmask(:,:,1:nn_cplmodel), dim = 3 ) 
     1042      ! 
     1043      ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' ) 
     1044      IF( ln_dm2dc .AND. ln_cpl .AND. ncpl_qsr_freq /= 86400 )   & 
     1045         &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 
     1046      IF( ln_dm2dc .AND. ln_cpl ) ncpl_qsr_freq = 86400 / ncpl_qsr_freq 
    10471047      ! 
    10481048   END SUBROUTINE sbc_cpl_init 
     
    11101110      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty, zmsk, zemp, zqns, zqsr 
    11111111      !!---------------------------------------------------------------------- 
    1112       ! 
    1113       IF( kt == nit000 ) THEN 
    1114       !   cannot be done in the init phase when we use agrif as cpl_freq requires that oasis_enddef is done 
    1115          ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' ) 
    1116          IF( ln_dm2dc .AND. ncpl_qsr_freq /= 86400 )   & 
    1117             &   CALL ctl_stop( 'sbc_cpl_rcv: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 
    1118          ncpl_qsr_freq = 86400 / ncpl_qsr_freq   ! used by top 
    1119       ENDIF 
    11201112      ! 
    11211113      IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0) 
     
    12511243      IF( srcv(jpr_co2)%laction )   atm_co2(:,:) = frcv(jpr_co2)%z3(:,:,1) 
    12521244      ! 
     1245      !                                                      ! ================== ! 
     1246      !                                                      !   ice skin temp.   ! 
     1247      !                                                      ! ================== ! 
     1248#if defined key_si3 
     1249      ! needed by Met Office 
     1250      IF( srcv(jpr_ts_ice)%laction ) THEN  
     1251         WHERE    ( frcv(jpr_ts_ice)%z3(:,:,:) > 0.0  )   ;   tsfc_ice(:,:,:) = 0.0  
     1252         ELSEWHERE( frcv(jpr_ts_ice)%z3(:,:,:) < -60. )   ;   tsfc_ice(:,:,:) = -60. 
     1253         ELSEWHERE                                        ;   tsfc_ice(:,:,:) = frcv(jpr_ts_ice)%z3(:,:,:) 
     1254         END WHERE 
     1255      ENDIF  
     1256#endif 
    12531257      !                                                      ! ========================= !  
    12541258      !                                                      ! Mean Sea Level Pressure   !   (taum)  
     
    16261630      !!                   sprecip           solid precipitation over the ocean   
    16271631      !!---------------------------------------------------------------------- 
    1628       REAL(wp), INTENT(in)   , DIMENSION(:,:)             ::   picefr     ! ice fraction                [0 to 1] 
    1629       !                                                   !!           ! optional arguments, used only in 'mixed oce-ice' case or for Met-Office coupling 
    1630       REAL(wp), INTENT(in)   , DIMENSION(:,:,:), OPTIONAL ::   palbi      ! all skies ice albedo  
    1631       REAL(wp), INTENT(in)   , DIMENSION(:,:  ), OPTIONAL ::   psst       ! sea surface temperature     [Celsius] 
    1632       REAL(wp), INTENT(inout), DIMENSION(:,:,:), OPTIONAL ::   pist       ! ice surface temperature     [Kelvin] => inout for Met-Office 
    1633       REAL(wp), INTENT(in)   , DIMENSION(:,:,:), OPTIONAL ::   phs        ! snow depth                  [m] 
    1634       REAL(wp), INTENT(in)   , DIMENSION(:,:,:), OPTIONAL ::   phi        ! ice thickness               [m] 
     1632      REAL(wp), INTENT(in), DIMENSION(:,:)             ::   picefr     ! ice fraction                [0 to 1] 
     1633      !                                                !!           ! optional arguments, used only in 'mixed oce-ice' case 
     1634      REAL(wp), INTENT(in), DIMENSION(:,:,:), OPTIONAL ::   palbi      ! all skies ice albedo  
     1635      REAL(wp), INTENT(in), DIMENSION(:,:  ), OPTIONAL ::   psst       ! sea surface temperature     [Celsius] 
     1636      REAL(wp), INTENT(in), DIMENSION(:,:,:), OPTIONAL ::   pist       ! ice surface temperature     [Kelvin] 
     1637      REAL(wp), INTENT(in), DIMENSION(:,:,:), OPTIONAL ::   phs        ! snow depth                  [m] 
     1638      REAL(wp), INTENT(in), DIMENSION(:,:,:), OPTIONAL ::   phi        ! ice thickness               [m] 
    16351639      ! 
    16361640      INTEGER  ::   ji, jj, jl   ! dummy loop index 
     
    16391643      REAL(wp), DIMENSION(jpi,jpj)     ::   zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip  , zevap_oce, zdevap_ice 
    16401644      REAL(wp), DIMENSION(jpi,jpj)     ::   zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice 
    1641       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice, zqtr_ice_top, ztsu 
     1645      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice    !!gm , zfrqsr_tr_i 
    16421646      !!---------------------------------------------------------------------- 
    16431647      ! 
     
    17701774      IF( iom_use('snow_ao_cea') )  CALL iom_put( 'snow_ao_cea' , sprecip(:,:) * ( 1._wp - zsnw(:,:) )                  )  ! Snow over ice-free ocean  (cell average) 
    17711775      IF( iom_use('snow_ai_cea') )  CALL iom_put( 'snow_ai_cea' , sprecip(:,:) *           zsnw(:,:)                    )  ! Snow over sea-ice         (cell average) 
     1776      IF( iom_use('rain_ao_cea') )  CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * picefr(:,:)         )  ! liquid precipitation over ocean (cell average) 
    17721777      IF( iom_use('subl_ai_cea') )  CALL iom_put( 'subl_ai_cea' , frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) * tmask(:,:,1) )  ! Sublimation over sea-ice (cell average) 
    17731778      IF( iom_use('evap_ao_cea') )  CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1)  & 
     
    18061811! ** NEED TO SORT OUT HOW THIS SHOULD WORK IN THE MULTI-CATEGORY CASE - CURRENTLY NOT ALLOWED WHEN INTERFACE INITIALISED ** 
    18071812         zqns_tot(:,:  ) = frcv(jpr_qnsmix)%z3(:,:,1) 
    1808          IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 
    1809             DO jl = 1, jpl 
    1810                zqns_ice(:,:,jl) = frcv(jpr_qnsmix)%z3(:,:,jl)    & 
    1811                   &             + frcv(jpr_dqnsdt)%z3(:,:,jl) * ( pist(:,:,jl) - ( ( rt0 + psst(:,:) ) * ziceld(:,:)   & 
    1812                   &                                                                + pist(:,:,jl) * picefr(:,:) ) ) 
    1813             END DO 
    1814          ELSE 
    1815             DO jl = 1, jpl 
    1816                zqns_ice(:,:,jl) = frcv(jpr_qnsmix)%z3(:,:, 1)    & 
    1817                   &             + frcv(jpr_dqnsdt)%z3(:,:, 1) * ( pist(:,:,jl) - ( ( rt0 + psst(:,:) ) * ziceld(:,:)   & 
    1818                   &                                                                + pist(:,:,jl) * picefr(:,:) ) ) 
    1819             END DO 
    1820          ENDIF 
     1813         zqns_ice(:,:,1) = frcv(jpr_qnsmix)%z3(:,:,1)    & 
     1814            &            + frcv(jpr_dqnsdt)%z3(:,:,1) * ( pist(:,:,1) - ( (rt0 + psst(:,:  ) ) * ziceld(:,:)   & 
     1815            &                                           + pist(:,:,1) * picefr(:,:) ) ) 
    18211816      END SELECT 
    18221817      !                                      
     
    19031898#endif 
    19041899      ! outputs 
    1905       IF ( srcv(jpr_cal)%laction       ) CALL iom_put('hflx_cal_cea'    , - frcv(jpr_cal)%z3(:,:,1) * rLfus )                      ! latent heat from calving 
    1906       IF ( srcv(jpr_icb)%laction       ) CALL iom_put('hflx_icb_cea'    , - frcv(jpr_icb)%z3(:,:,1) * rLfus )                      ! latent heat from icebergs melting 
    1907       IF ( iom_use('hflx_rain_cea')    ) CALL iom_put('hflx_rain_cea'   , ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) )        ! heat flux from rain (cell average) 
    1908       IF ( iom_use('hflx_evap_cea')    ) CALL iom_put('hflx_evap_cea'   , ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) & 
     1900      IF( srcv(jpr_cal)%laction       ) CALL iom_put('hflx_cal_cea'    , - frcv(jpr_cal)%z3(:,:,1) * rLfus )                      ! latent heat from calving 
     1901      IF( srcv(jpr_icb)%laction       ) CALL iom_put('hflx_icb_cea'    , - frcv(jpr_icb)%z3(:,:,1) * rLfus )                      ! latent heat from icebergs melting 
     1902      IF( iom_use('hflx_rain_cea')    ) CALL iom_put('hflx_rain_cea'   , ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) )        ! heat flux from rain (cell average) 
     1903      IF( iom_use('hflx_evap_cea')    ) CALL iom_put('hflx_evap_cea'   , ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) & 
    19091904           &                                                              * picefr(:,:) ) * zcptn(:,:) * tmask(:,:,1) )            ! heat flux from evap (cell average) 
    1910       IF ( iom_use('hflx_snow_cea')    ) CALL iom_put('hflx_snow_cea'   , sprecip(:,:) * ( zcptsnw(:,:) - rLfus )  )               ! heat flux from snow (cell average) 
    1911       IF ( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 
     1905      IF( iom_use('hflx_prec_cea')    ) CALL iom_put('hflx_prec_cea'   ,  sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) +  &                    ! heat flux from all precip (cell avg) 
     1906         &                                                               ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) ) 
     1907      IF( iom_use('hflx_snow_cea')    ) CALL iom_put('hflx_snow_cea'   , sprecip(:,:) * ( zcptsnw(:,:) - rLfus )  )               ! heat flux from snow (cell average) 
     1908      IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 
    19121909           &                                                              * ( 1._wp - zsnw(:,:) )                  )               ! heat flux from snow (over ocean) 
    1913       IF ( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) &  
     1910      IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) &  
    19141911           &                                                              *           zsnw(:,:)                    )               ! heat flux from snow (over ice) 
    19151912      ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. 
     
    19301927            END DO 
    19311928         ENDIF 
     1929         zqsr_tot(:,:  ) = frcv(jpr_qsrmix)%z3(:,:,1) 
     1930         zqsr_ice(:,:,1) = frcv(jpr_qsrice)%z3(:,:,1) 
    19321931      CASE( 'oce and ice' ) 
    19331932         zqsr_tot(:,:  ) =  ziceld(:,:) * frcv(jpr_qsroce)%z3(:,:,1) 
     
    19491948!       Create solar heat flux over ice using incoming solar heat flux and albedos 
    19501949!       ( see OASIS3 user guide, 5th edition, p39 ) 
    1951          IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 
    1952             DO jl = 1, jpl 
    1953                zqsr_ice(:,:,jl) = frcv(jpr_qsrmix)%z3(:,:,jl) * ( 1.- palbi(:,:,jl) )   & 
    1954                   &            / (  1.- ( alb_oce_mix(:,:   ) * ziceld(:,:)       & 
    1955                   &                     + palbi      (:,:,jl) * picefr(:,:) ) ) 
    1956             END DO 
    1957          ELSE 
    1958             DO jl = 1, jpl 
    1959                zqsr_ice(:,:,jl) = frcv(jpr_qsrmix)%z3(:,:, 1) * ( 1.- palbi(:,:,jl) )   & 
    1960                   &            / (  1.- ( alb_oce_mix(:,:   ) * ziceld(:,:)       & 
    1961                   &                     + palbi      (:,:,jl) * picefr(:,:) ) ) 
    1962             END DO 
    1963          ENDIF 
     1950         zqsr_ice(:,:,1) = frcv(jpr_qsrmix)%z3(:,:,1) * ( 1.- palbi(:,:,1) )   & 
     1951            &            / (  1.- ( alb_oce_mix(:,:  ) * ziceld(:,:)       & 
     1952            &                     + palbi      (:,:,1) * picefr(:,:) ) ) 
    19641953      CASE( 'none'      )       ! Not available as for now: needs additional coding   
    19651954      !                         ! since fields received, here zqsr_tot,  are not defined with none option 
     
    20212010      !                                                      ! ========================= ! 
    20222011      CASE ('coupled') 
    2023          IF( ln_mixcpl ) THEN 
    2024             DO jl=1,jpl 
    2025                qml_ice(:,:,jl) = qml_ice(:,:,jl) * xcplmask(:,:,0) + frcv(jpr_topm)%z3(:,:,jl) * zmsk(:,:) 
    2026                qcn_ice(:,:,jl) = qcn_ice(:,:,jl) * xcplmask(:,:,0) + frcv(jpr_botm)%z3(:,:,jl) * zmsk(:,:) 
    2027             ENDDO 
    2028          ELSE 
    2029             qml_ice(:,:,:) = frcv(jpr_topm)%z3(:,:,:) 
    2030             qcn_ice(:,:,:) = frcv(jpr_botm)%z3(:,:,:) 
    2031          ENDIF 
     2012         qml_ice(:,:,:) = frcv(jpr_topm)%z3(:,:,:) 
     2013         qcn_ice(:,:,:) = frcv(jpr_botm)%z3(:,:,:) 
    20322014      END SELECT 
     2015      ! 
    20332016      !                                                      ! ========================= ! 
    20342017      !                                                      !      Transmitted Qsr      !   [W/m2] 
     
    20372020         ! 
    20382021         !                    ! ===> used prescribed cloud fraction representative for polar oceans in summer (0.81) 
    2039          ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice    ! surface transmission when hi>10cm (Grenfell Maykut 77) 
     2022         ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice    ! surface transmission parameter (Grenfell Maykut 77) 
    20402023         ! 
    2041          WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    2042             zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( ztri + ( 1._wp - ztri ) * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    2043          ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (ztri) when hi>10cm 
    2044             zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ztri 
    2045          ELSEWHERE                                                         ! zero when hs>0 
    2046             zqtr_ice_top(:,:,:) = 0._wp 
    2047          END WHERE 
     2024         qtr_ice_top(:,:,:) = ztri * qsr_ice(:,:,:) 
     2025         WHERE( phs(:,:,:) >= 0.0_wp )   qtr_ice_top(:,:,:) = 0._wp            ! snow fully opaque 
     2026         WHERE( phi(:,:,:) <= 0.1_wp )   qtr_ice_top(:,:,:) = qsr_ice(:,:,:)   ! thin ice transmits all solar radiation 
    20482027         !      
    20492028      ELSEIF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN      !==  conduction flux as surface forcing  ==! 
     
    20512030         !                    ! ===> here we must receive the qtr_ice_top array from the coupler 
    20522031         !                           for now just assume zero (fully opaque ice) 
    2053          zqtr_ice_top(:,:,:) = 0._wp 
    2054          ! 
    2055       ENDIF 
    2056       ! 
    2057       IF( ln_mixcpl ) THEN 
    2058          DO jl=1,jpl 
    2059             qtr_ice_top(:,:,jl) = qtr_ice_top(:,:,jl) * xcplmask(:,:,0) + zqtr_ice_top(:,:,jl) * zmsk(:,:) 
    2060          ENDDO 
    2061       ELSE 
    2062          qtr_ice_top(:,:,:) = zqtr_ice_top(:,:,:) 
    2063       ENDIF 
    2064       !                                                      ! ================== ! 
    2065       !                                                      !   ice skin temp.   ! 
    2066       !                                                      ! ================== ! 
    2067       ! needed by Met Office 
    2068       IF( srcv(jpr_ts_ice)%laction ) THEN  
    2069          WHERE    ( frcv(jpr_ts_ice)%z3(:,:,:) > 0.0  )   ;   ztsu(:,:,:) =   0. + rt0  
    2070          ELSEWHERE( frcv(jpr_ts_ice)%z3(:,:,:) < -60. )   ;   ztsu(:,:,:) = -60. + rt0 
    2071          ELSEWHERE                                        ;   ztsu(:,:,:) = frcv(jpr_ts_ice)%z3(:,:,:) + rt0 
    2072          END WHERE 
    2073          ! 
    2074          IF( ln_mixcpl ) THEN 
    2075             DO jl=1,jpl 
    2076                pist(:,:,jl) = pist(:,:,jl) * xcplmask(:,:,0) + ztsu(:,:,jl) * zmsk(:,:) 
    2077             ENDDO 
    2078          ELSE 
    2079             pist(:,:,:) = ztsu(:,:,:) 
    2080          ENDIF 
     2032         qtr_ice_top(:,:,:) = 0._wp 
    20812033         ! 
    20822034      ENDIF 
     
    22412193         CASE default    ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
    22422194         END SELECT 
    2243          CALL cpl_snd( jps_fice, isec, ztmp3, info ) 
     2195         IF( ssnd(jps_fice)%laction )   CALL cpl_snd( jps_fice, isec, ztmp3, info ) 
    22442196      ENDIF 
    22452197 
     
    23012253      !                                                      !      Ice melt ponds       !  
    23022254      !                                                      ! ------------------------- ! 
    2303       ! needed by Met Office: 1) fraction of ponded ice 2) local/actual pond depth  
     2255      ! needed by Met Office 
    23042256      IF( ssnd(jps_a_p)%laction .OR. ssnd(jps_ht_p)%laction ) THEN  
    23052257         SELECT CASE( sn_snd_mpnd%cldes)   
     
    23072259            SELECT CASE( sn_snd_mpnd%clcat )   
    23082260            CASE( 'yes' )   
    2309                ztmp3(:,:,1:jpl) =  a_ip_frac(:,:,1:jpl) 
    2310                ztmp4(:,:,1:jpl) =  h_ip(:,:,1:jpl)   
     2261               ztmp3(:,:,1:jpl) =  a_ip(:,:,1:jpl) 
     2262               ztmp4(:,:,1:jpl) =  v_ip(:,:,1:jpl)   
    23112263            CASE( 'no' )   
    23122264               ztmp3(:,:,:) = 0.0   
    23132265               ztmp4(:,:,:) = 0.0   
    23142266               DO jl=1,jpl   
    2315                  ztmp3(:,:,1) = ztmp3(:,:,1) + a_ip_frac(:,:,jpl)   
    2316                  ztmp4(:,:,1) = ztmp4(:,:,1) + h_ip(:,:,jpl)  
     2267                 ztmp3(:,:,1) = ztmp3(:,:,1) + a_ip(:,:,jpl)   
     2268                 ztmp4(:,:,1) = ztmp4(:,:,1) + v_ip(:,:,jpl)  
    23172269               ENDDO   
    23182270            CASE default   ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_mpnd%clcat' )   
     
    23522304      !                                                      !  CO2 flux from PISCES     !  
    23532305      !                                                      ! ------------------------- ! 
    2354       IF( ssnd(jps_co2)%laction .AND. l_co2cpl )   CALL cpl_snd( jps_co2, isec, RESHAPE ( oce_co2, (/jpi,jpj,1/) ) , info ) 
     2306      IF( ssnd(jps_co2)%laction .AND. l_co2cpl )   THEN  
     2307         ztmp1(:,:) = oce_co2(:,:) * 1000.  ! conversion in molC/m2/s 
     2308         CALL cpl_snd( jps_co2, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ) , info ) 
     2309      ENDIF 
    23552310      ! 
    23562311      !                                                      ! ------------------------- ! 
  • NEMO/trunk/src/OCE/SBC/sbcmod.F90

    r11993 r12276  
    244244         fwfisf_b(:,:)   = 0._wp   ;   risf_tsc_b(:,:,:) = 0._wp 
    245245      END IF 
     246      ! 
     247      IF( sbc_ssr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_ssr arrays' ) 
     248      IF( .NOT.ln_ssr ) THEN               !* Initialize qrp and erp if no restoring  
     249         qrp(:,:) = 0._wp 
     250         erp(:,:) = 0._wp 
     251      ENDIF 
     252      ! 
     253 
    246254      IF( nn_ice == 0 ) THEN        !* No sea-ice in the domain : ice fraction is always zero 
    247255         IF( nn_components /= jp_iam_opa )   fr_i(:,:) = 0._wp    ! except for OPA in SAS-OPA coupled case 
     
    552560         CALL iom_put( "taum"  , taum       )                   ! wind stress module 
    553561         CALL iom_put( "wspd"  , wndm       )                   ! wind speed  module over free ocean or leads in presence of sea-ice 
     562         CALL iom_put( "qrp", qrp )                             ! heat flux damping 
     563         CALL iom_put( "erp", erp )                             ! freshwater flux damping 
    554564      ENDIF 
    555565      ! 
  • NEMO/trunk/src/OCE/SBC/sbcrnf.F90

    r12168 r12276  
    1919   USE phycst         ! physical constants 
    2020   USE sbc_oce        ! surface boundary condition variables 
    21    USE sbcisf         ! PM we could remove it I think 
    2221   USE eosbn2         ! Equation Of State 
    23    USE closea        ! closed seas 
     22   USE closea, ONLY: l_clo_rnf, clo_rnf ! closed seas 
    2423   ! 
    2524   USE in_out_manager ! I/O manager 
     
    4342   REAL(wp)                   ::      rn_dep_max        !: depth over which runoffs is spread       (ln_rnf_depth_ini =T) 
    4443   INTEGER                    ::      nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 
     44   LOGICAL                    ::   ln_rnf_icb        !: iceberg flux is specified in a file 
    4545   LOGICAL                    ::   ln_rnf_tem        !: temperature river runoffs attribute specified in a file 
    4646   LOGICAL           , PUBLIC ::   ln_rnf_sal        !: salinity    river runoffs attribute specified in a file 
    4747   TYPE(FLD_N)       , PUBLIC ::   sn_rnf            !: information about the runoff file to be read 
    4848   TYPE(FLD_N)                ::   sn_cnf            !: information about the runoff mouth file to be read 
     49   TYPE(FLD_N)                ::   sn_i_rnf        !: information about the iceberg flux file to be read 
    4950   TYPE(FLD_N)                ::   sn_s_rnf          !: information about the salinities of runoff file to be read 
    5051   TYPE(FLD_N)                ::   sn_t_rnf          !: information about the temperatures of runoff file to be read 
     
    6566 
    6667   TYPE(FLD),        ALLOCATABLE, DIMENSION(:) ::   sf_rnf       ! structure: river runoff (file information, fields read) 
     68   TYPE(FLD),        ALLOCATABLE, DIMENSION(:) ::   sf_i_rnf     ! structure: iceberg flux (file information, fields read) 
    6769   TYPE(FLD),        ALLOCATABLE, DIMENSION(:) ::   sf_s_rnf     ! structure: river runoff salinity (file information, fields read)   
    6870   TYPE(FLD),        ALLOCATABLE, DIMENSION(:) ::   sf_t_rnf     ! structure: river runoff temperature (file information, fields read)   
     
    112114      !                                            !-------------------! 
    113115      ! 
    114       IF( .NOT. l_rnfcpl )   CALL fld_read ( kt, nn_fsbc, sf_rnf   )    ! Read Runoffs data and provide it at kt 
     116      ! 
     117      IF( .NOT. l_rnfcpl )  THEN 
     118                            CALL fld_read ( kt, nn_fsbc, sf_rnf   )    ! Read Runoffs data and provide it at kt ( runoffs + iceberg ) 
     119         IF( ln_rnf_icb )   CALL fld_read ( kt, nn_fsbc, sf_i_rnf )    ! idem for iceberg flux if required 
     120      ENDIF 
    115121      IF(   ln_rnf_tem   )   CALL fld_read ( kt, nn_fsbc, sf_t_rnf )    ! idem for runoffs temperature if required 
    116122      IF(   ln_rnf_sal   )   CALL fld_read ( kt, nn_fsbc, sf_s_rnf )    ! idem for runoffs salinity    if required 
     
    118124      IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    119125         ! 
    120          IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)       ! updated runoff value at time step kt 
     126         IF( .NOT. l_rnfcpl ) THEN 
     127             rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt 
     128             IF( ln_rnf_icb ) THEN 
     129                fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt 
     130                CALL iom_put( 'iceberg_cea'  , fwficb(:,:)  )         ! output iceberg flux 
     131                CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
     132             ENDIF 
     133         ENDIF 
    121134         ! 
    122135         !                                                           ! set temperature & salinity content of runoffs 
     
    127140               rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
    128141            END WHERE 
    129             WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp )             ! where fwf comes from melting of ice shelves or iceberg 
    130                rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * rLfusisf * r1_rau0_rcp 
    131             END WHERE 
    132142         ELSE                                                        ! use SST as runoffs temperature 
    133143            !CEOD River is fresh water so must at least be 0 unless we consider ice 
    134             rnf_tsc(:,:,jp_tem) = MAX(sst_m(:,:),0.0_wp) * rnf(:,:) * r1_rau0 
     144            rnf_tsc(:,:,jp_tem) = MAX( sst_m(:,:), 0.0_wp ) * rnf(:,:) * r1_rau0 
    135145         ENDIF 
    136146         !                                                           ! use runoffs salinity data 
    137147         IF( ln_rnf_sal )   rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
    138148         !                                                           ! else use S=0 for runoffs (done one for all in the init) 
    139          IF( iom_use('runoffs') )        CALL iom_put( 'runoffs'     , rnf(:,:)                         )   ! output runoff mass flux 
     149                                         CALL iom_put( 'runoffs'     , rnf(:,:)                         )   ! output runoff mass flux 
    140150         IF( iom_use('hflx_rnf_cea') )   CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rau0 * rcp )   ! output runoff sensible heat (W/m2) 
    141151      ENDIF 
     
    242252      REAL(wp), DIMENSION(jpi,jpj,2) :: zrnfcl     
    243253      !! 
    244       NAMELIST/namsbc_rnf/ cn_dir            , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal,   & 
    245          &                 sn_rnf, sn_cnf    , sn_s_rnf    , sn_t_rnf  , sn_dep_rnf,   & 
     254      NAMELIST/namsbc_rnf/ cn_dir            , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, ln_rnf_icb,   & 
     255         &                 sn_rnf, sn_cnf    , sn_i_rnf, sn_s_rnf    , sn_t_rnf  , sn_dep_rnf,   & 
    246256         &                 ln_rnf_mouth      , rn_hrnf     , rn_avt_rnf, rn_rfact,     & 
    247257         &                 ln_rnf_depth_ini  , rn_dep_max  , rn_rnf_max, nn_rnf_depth_file 
     
    265275      !                                   ! ============ 
    266276      ! 
    267       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    268277      READ  ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 
    269278901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist' ) 
    270279 
    271       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    272280      READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 
    273281902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist' ) 
     
    299307         IF( sn_rnf%ln_tint ) ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) ) 
    300308         CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf', no_print ) 
     309         ! 
     310         IF( ln_rnf_icb ) THEN                      ! Create (if required) sf_i_rnf structure 
     311            IF(lwp) WRITE(numout,*) 
     312            IF(lwp) WRITE(numout,*) '          iceberg flux read in a file' 
     313            ALLOCATE( sf_i_rnf(1), STAT=ierror  ) 
     314            IF( ierror > 0 ) THEN 
     315               CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_i_rnf structure' )   ;   RETURN 
     316            ENDIF 
     317            ALLOCATE( sf_i_rnf(1)%fnow(jpi,jpj,1)   ) 
     318            IF( sn_i_rnf%ln_tint ) ALLOCATE( sf_i_rnf(1)%fdta(jpi,jpj,1,2) ) 
     319            CALL fld_fill (sf_i_rnf, (/ sn_i_rnf /), cn_dir, 'sbc_rnf_init', 'read iceberg flux data', 'namsbc_rnf' ) 
     320         ELSE 
     321            fwficb(:,:) = 0._wp 
     322         ENDIF 
     323 
    301324      ENDIF 
    302325      ! 
     
    439462         !                                      !    - mixed upstream-centered (ln_traadv_cen2=T) 
    440463         ! 
    441          IF ( ln_rnf_depth )   CALL ctl_warn( 'sbc_rnf_init: increased mixing turned on but effects may already',   & 
     464         IF( ln_rnf_depth )   CALL ctl_warn( 'sbc_rnf_init: increased mixing turned on but effects may already',   & 
    442465            &                                              'be spread through depth by ln_rnf_depth'               ) 
    443466         ! 
  • NEMO/trunk/src/OCE/SBC/sbcssr.F90

    r11993 r12276  
    3030   PUBLIC   sbc_ssr        ! routine called in sbcmod 
    3131   PUBLIC   sbc_ssr_init   ! routine called in sbcmod 
     32   PUBLIC   sbc_ssr_alloc  ! routine called in sbcmod 
    3233 
    3334   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   erp   !: evaporation damping   [kg/m2/s] 
    3435   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qrp   !: heat flux damping        [w/m2] 
     36   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   coefice   !: under ice relaxation coefficient 
    3537 
    3638   !                                   !!* Namelist namsbc_ssr * 
     
    4143   LOGICAL         ::   ln_sssr_bnd     ! flag to bound erp term  
    4244   REAL(wp)        ::   rn_sssr_bnd     ! ABS(Max./Min.) value of erp term [mm/day] 
     45   INTEGER         ::   nn_sssr_ice     ! Control of restoring under ice 
    4346 
    4447   REAL(wp) , ALLOCATABLE, DIMENSION(:) ::   buffer   ! Temporary buffer for exchange 
     
    97100                  END DO 
    98101               END DO 
    99                CALL iom_put( "qrp", qrp )                             ! heat flux damping 
     102            ENDIF 
     103            ! 
     104            IF( nn_sssr /= 0 .AND. nn_sssr_ice /= 1 ) THEN 
     105              ! use fraction of ice ( fr_i ) to adjust relaxation under ice if nn_sssr_ice .ne. 1 
     106              ! n.b. coefice is initialised and fixed to 1._wp if nn_sssr_ice = 1 
     107               DO jj = 1, jpj 
     108                  DO ji = 1, jpi 
     109                     SELECT CASE ( nn_sssr_ice ) 
     110                       CASE ( 0 )    ;  coefice(ji,jj) = 1._wp - fr_i(ji,jj)              ! no/reduced damping under ice 
     111                       CASE  DEFAULT ;  coefice(ji,jj) = 1._wp + ( nn_sssr_ice - 1 ) * fr_i(ji,jj) ! reinforced damping (x nn_sssr_ice) under ice ) 
     112                     END SELECT 
     113                  END DO 
     114               END DO 
    100115            ENDIF 
    101116            ! 
     
    105120                  DO ji = 1, jpi 
    106121                     zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths 
     122                        &        *   coefice(ji,jj)            &      ! Optional control of damping under sea-ice 
    107123                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) ) * tmask(ji,jj,1) 
    108124                     sfx(ji,jj) = sfx(ji,jj) + zerp                 ! salt flux 
     
    110126                  END DO 
    111127               END DO 
    112                CALL iom_put( "erp", erp )                             ! freshwater flux damping 
    113128               ! 
    114129            ELSEIF( nn_sssr == 2 ) THEN                               !* Salinity damping term (volume flux (emp) and associated heat flux (qns) 
     
    118133                  DO ji = 1, jpi                             
    119134                     zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths 
     135                        &        *   coefice(ji,jj)            &      ! Optional control of damping under sea-ice 
    120136                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) )   & 
    121137                        &        / MAX(  sss_m(ji,jj), 1.e-20   ) * tmask(ji,jj,1) 
     
    126142                  END DO 
    127143               END DO 
    128                CALL iom_put( "erp", erp )                             ! freshwater flux damping 
    129144            ENDIF 
    130145            ! 
     
    154169      CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files 
    155170      TYPE(FLD_N) ::   sn_sst, sn_sss        ! informations about the fields to be read 
    156       NAMELIST/namsbc_ssr/ cn_dir