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

Changeset 4345


Ignore:
Timestamp:
2014-01-10T16:59:04+01:00 (10 years ago)
Author:
clem
Message:

clean the glob_sum diags and make scalar.nc work

Location:
branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/domain_def.xml

    r4100 r4345  
    55    <!--   My zoom: example of hand defined zoom   --> 
    66         <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 
    7     <!--   Eq section   --> 
     7         <domain id="1point" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="1" zoom_nj="1" /> 
     8         <!--   Eq section   --> 
    89         <domain id="EqT" zoom_ibegin="1" zoom_jbegin="0000" zoom_ni="0000" zoom_nj="1" /> 
    910         <!--   TAO   --> 
     
    170171      <domain_group id="scalarpoint"> 
    171172         <domain id="scalarpoint" long_name="scalar"/> 
     173         <!-- 
    172174         <domain id="1point" zoom_ibegin="1" zoom_jbegin="1" zoom_ni="1" zoom_nj="1" /> 
     175         --> 
    173176      </domain_group> 
    174177 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/field_def.xml

    r4100 r4345  
    214214          
    215215         <field id="iceconc"      long_name="ice concentration"                                            unit="%"        /> 
    216          <field id="icebopr"      long_name="daily bottom thermo ice prod."                                unit="km3/day"   /> 
    217          <field id="icedypr"      long_name="daily  dynamic ice prod."                                     unit="km3/day"   /> 
     216         <field id="icebopr"      long_name="daily bottom thermo ice prod."                                unit="m/day"   /> 
     217         <field id="icedypr"      long_name="daily  dynamic ice prod."                                     unit="m/day"   /> 
    218218    <field id="ioceflxb"     long_name="Oceanic flux at the ice base"                                 unit="W/m2"     /> 
    219219         <field id="uice_ipa"     long_name="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      /> 
     
    231231         <field id="micesalt"     long_name="Mean ice salinity"                                            unit="psu"      /> 
    232232         <field id="miceage"      long_name="Mean ice age"                                                 unit="years"    /> 
    233          <field id="icelapr"      long_name="daily lateral thermo ice prod."                               unit="km3/day"   /> 
    234          <field id="icesipr"      long_name="daily snowice ice prod."                                      unit="km3/day"   /> 
     233         <field id="icelapr"      long_name="daily lateral thermo ice prod."                               unit="m/day"   /> 
     234         <field id="icesipr"      long_name="daily snowice ice prod."                                      unit="m/day"   /> 
    235235         <field id="micet"        long_name="Mean ice temperature"                                         unit="degC"     /> 
    236236         <field id="icehc"        long_name="ice total heat content"                                       unit="10^9 J"   />  
     
    243243         <field id="icestr"       long_name="ice strength"                                                 unit="N/m"      /> 
    244244         <field id="icevel"       long_name="ice velocity"                                                 unit="m/s"      /> 
    245          <field id="isume"        long_name="surface melt"                                                 unit="km3/day"   /> 
    246          <field id="ibome"        long_name="bottom melt"                                                  unit="km3/day"   /> 
     245         <field id="isume"        long_name="surface melt"                                                 unit="m/day"   /> 
     246         <field id="ibome"        long_name="bottom melt"                                                  unit="m/day"   /> 
    247247         <field id="idive"        long_name="divergence"                                                   unit="10-8s-1"  /> 
    248248         <field id="ishear"       long_name="shear"                                                        unit="10-8s-1"  /> 
    249          <field id="icerepr"      long_name="daily resultant ice prod./melting from limupdate"             unit="km3/day"   /> 
    250          <field id="icevolu"      long_name="ice volume"                                                   unit="km3"      /> 
    251          <field id="snowvol"      long_name="snow volume"                                                  unit="km3"      /> 
     249         <field id="icerepr"      long_name="daily resultant ice prod./melting from limupdate"             unit="m/day"   /> 
     250         <field id="icevolu"      long_name="ice volume"                                                   unit="m"      /> 
     251         <field id="snowvol"      long_name="snow volume"                                                  unit="m"      /> 
    252252         <field id="sfxmec"       long_name="salt flux from ridging rafting"                               unit="psu*kg/m2/day" /> 
    253253         <field id="sfxres"       long_name="salt flux from lipupdate (resultant)"                         unit="psu*kg/m2/day" /> 
    254          <field id="icetrp"       long_name="ice volume transport"                                         unit="km3/day"   /> 
     254         <field id="icetrp"       long_name="ice volume transport"                                         unit="m/day"   /> 
    255255 
    256256 
     
    333333         <field id="fram_trans" long_name="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" /> 
    334334       <!-- available with ln_diahsb --> 
    335     <field id="bgtemper"     long_name="global mean temperature"                  unit="degC"   /> 
    336     <field id="bgsaline"     long_name="global mean salinity"                     unit="psu"    /> 
    337     <field id="bgheatco"     long_name="global mean heat content"                 unit="10^9J"  /> 
    338     <field id="bgsaltco"     long_name="global mean salt content"                 unit="psu*m3" /> 
    339     <field id="bgvolssh"     long_name="global mean ssh volume"                   unit="km3"     /> 
    340     <field id="bgvoltot"     long_name="global mean volume"                       unit="km3"     /> 
    341     <field id="bgsshtot"     long_name="global mean ssh"                          unit="m"      /> 
    342     <field id="bgfrcvol"     long_name="global mean volume from forcing"          unit="km3"     /> 
    343     <field id="bgfrctem"     long_name="global mean heat content from forcing"    unit="10^9J"  /> 
    344     <field id="bgfrcsal"     long_name="global mean salt content from forcing"    unit="psu*km3" /> 
     335    <field id="bgtemper" long_name="global mean temperature variation"            unit="degC"/> 
     336    <field id="bgsaline" long_name="global mean salinity variation"               unit="psu"/> 
     337    <field id="bgheatco" long_name="global mean heat content variation"           unit="10^20J"/> 
     338    <field id="bgsaltco" long_name="global mean salt content variation"           unit="psu*km3" /> 
     339    <field id="bgvolssh" long_name="global mean volume variation (ssh)"           unit="km3"/> 
     340    <field id="bgvole3t" long_name="global mean volume variation (e3t)"           unit="km3"/> 
     341    <field id="bgfrcvol" long_name="global mean volume variation from forcing"    unit="km3"/> 
     342    <field id="bgfrctem" long_name="global mean forcing from heat content variation"   unit="degC"/> 
     343    <field id="bgfrcsal" long_name="global mean forcing salt content variation"        unit="psu"/> 
     344    <field id="bgmistem" long_name="global mean temperature error due to free surface" unit="degC"/> 
     345    <field id="bgmissal" long_name="global mean salinity error due to free surface"    unit="psu"/> 
    345346      </field_group> 
    346347 
    347348      <field_group id="SBC_scalar"  domain_ref="1point" > 
    348          <!-- available with ln_limdiahsb --> 
     349         <!-- available with ln_limdiaout --> 
    349350    <field id="ibgvoltot"    long_name="global mean ice volume"                   unit="km3"   /> 
    350351    <field id="sbgvoltot"    long_name="global mean snow volume"                  unit="km3"   /> 
     
    352353    <field id="ibgsaline"    long_name="global mean ice salinity"                 unit="psu"   /> 
    353354    <field id="ibgtemper"    long_name="global mean ice temperature"              unit="degC"   /> 
    354     <field id="ibgheatco"    long_name="global mean ice heat content"             unit="10^9J"   /> 
     355    <field id="ibgheatco"    long_name="global mean ice heat content"             unit="10^20J"   /> 
     356    <field id="sbgheatco"    long_name="global mean snow heat content"            unit="10^20J"   /> 
    355357    <field id="ibgsaltco"    long_name="global mean ice salt content"             unit="psu*km3"   /> 
    356     <field id="sbgheatco"    long_name="global mean snow heat content"            unit="10^9J"   /> 
    357     <field id="ibgfrcsfx"    long_name="global mean salt content from sfx"        unit="psu*km3"   /> 
    358     <field id="ibgfrcemp"    long_name="global mean volume from emp"              unit="km3"      /> 
    359     <field id="ibgsfx"       long_name="global mean emps"                         unit="psu*kg/m2/day"   /> 
    360     <field id="ibgemp"       long_name="global mean emp"                          unit="kg/m2/day"   /> 
    361     <field id="ibgsfxbri"    long_name="global mean ice sfx_bri"                  unit="psu*kg/m2/day"   /> 
    362     <field id="ibgsfxthd"    long_name="global mean ice sfx_thd"                  unit="psu*kg/m2/day"   /> 
    363     <field id="ibgsfxres"    long_name="global mean ice sfx_res"                  unit="psu*kg/m2/day"   /> 
    364     <field id="ibgsfxmec"    long_name="global mean ice fsalt_rpo"                unit="psu*kg/m2/day"   /> 
    365     <field id="ibggrpme"     long_name="global mean ice growth+melt volume"       unit="km3"      /> 
     358 
     359    <field id="ibgemp"       long_name="global mean volume flux (emp)"               unit="m/day"   /> 
     360    <field id="ibgempbog"    long_name="global mean volume flux (bottom growth)"     unit="m/day"   /> 
     361    <field id="ibgemplag"    long_name="global mean volume flux (open water growth)" unit="m/day"   /> 
     362    <field id="ibgempsig"    long_name="global mean volume flux (snow-ice growth)"   unit="m/day"   /> 
     363    <field id="ibgempdyg"    long_name="global mean volume flux (dynamic growth)"    unit="m/day"   /> 
     364    <field id="ibgempbom"    long_name="global mean volume flux (bottom melt)"       unit="m/day"   /> 
     365    <field id="ibgempsum"    long_name="global mean volume flux (surface melt)"      unit="m/day"   /> 
     366    <field id="ibgempres"    long_name="global mean volume flux (resultant)"         unit="m/day"   /> 
     367 
     368    <field id="ibgsfx"       long_name="global mean salt flux (total)"            unit="psu*m/day"   /> 
     369    <field id="ibgsfxbri"    long_name="global mean salt flux (brines)"           unit="psu*m/day"   /> 
     370    <field id="ibgsfxthd"    long_name="global mean salt flux (thermo)"           unit="psu*m/day"   /> 
     371    <field id="ibgsfxmec"    long_name="global mean salt flux (dynamic)"          unit="psu*m/day"   /> 
     372    <field id="ibgsfxres"    long_name="global mean salt flux (resultant)"        unit="psu*m/day"   /> 
     373 
     374    <field id="ibgfrcvol"    long_name="global mean forcing volume (emp)"         unit="km3"      /> 
     375    <field id="ibgfrcsfx"    long_name="global mean forcing salt   (sfx)"         unit="psu*km3"   /> 
     376    <field id="ibggrme"      long_name="global mean ice growth+melt volume"       unit="km3"      /> 
    366377      </field_group> 
    367378   
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef.xml

    r4100 r4345  
    128128   </file> 
    129129 
    130  
    131    <file id="file7" name_suffix="_scalar" description="scalar variables" > 
     130        <file id="file7" name_suffix="_scalar" description="scalar variables" > 
    132131          <field field_ref="voltot"       name="scvoltot"  /> 
    133132          <field field_ref="sshtot"       name="scsshtot"  /> 
     
    137136          <field field_ref="temptot"      name="sctemtot"  /> 
    138137          <field field_ref="saltot"       name="scsaltot"  /> 
    139     
    140           <!-- available with ln_diahsb --> 
    141      <field field_ref="bgtemper"     name="bgtemper"    /> 
    142      <field field_ref="bgsaline"     name="bgsaline"    /> 
    143      <field field_ref="bgheatco"     name="bgheatco"    /> 
    144      <field field_ref="bgsaltco"     name="bgsaltco"    /> 
    145      <field field_ref="bgvolssh"     name="bgvolssh"    /> 
    146      <field field_ref="bgvoltot"     name="bgvoltot"    /> 
    147      <field field_ref="bgsshtot"     name="bgsshtot"    /> 
    148      <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
    149      <field field_ref="bgfrctem"     name="bgfrctem"    /> 
    150      <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
    151      <!-- available with ln_limdiahsb --> 
    152      <field field_ref="ibgvoltot"    name="ibgvoltot"   /> 
    153      <field field_ref="sbgvoltot"    name="sbgvoltot"   /> 
    154      <field field_ref="ibgarea"      name="ibgarea"     /> 
    155      <field field_ref="ibgsaline"    name="ibgsaline"   /> 
    156      <field field_ref="ibgtemper"    name="ibgtemper"   /> 
    157      <field field_ref="ibgheatco"    name="ibgheatco"   /> 
    158      <field field_ref="ibgsaltco"    name="ibgsaltco"   /> 
    159      <field field_ref="sbgheatco"    name="sbgheatco"   /> 
    160      <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  /> 
    161      <field field_ref="ibgfrcemp"    name="ibgfrcemp"   /> 
    162      <field field_ref="ibgsfx"       name="ibgsfx"     /> 
    163      <field field_ref="ibgemp"       name="ibgemp"      /> 
    164      <field field_ref="ibgsfxbri"    name="ibgsfxbri"    /> 
    165      <field field_ref="ibgsfxthd"    name="ibgsfxthd"    /> 
    166      <field field_ref="ibgsfxres"    name="ibgsfxres" /> 
    167      <field field_ref="ibgsfxmec"    name="ibgsfxmec" /> 
    168      <field field_ref="ibggrpme"     name="ibggrpme"    /> 
    169  
    170    </file> 
    171  
    172    <!-- 
    173    <file id="file8" name_suffix="_Tides" description="tidal harmonics" > 
    174      <field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       /> 
    175      <field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  /> 
    176      <field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "      /> 
    177      <field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  /> 
    178      <field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       /> 
    179      <field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  /> 
    180    </file> 
    181    --> 
     138 
     139          <field field_ref="bgtemper"     name="bgtemper"    /> 
     140          <field field_ref="bgsaline"     name="bgsaline"    /> 
     141          <field field_ref="bgheatco"     name="bgheatco"    /> 
     142          <field field_ref="bgsaltco"     name="bgsaltco"    /> 
     143          <field field_ref="bgvolssh"     name="bgvolssh"    />  
     144          <field field_ref="bgvole3t"     name="bgvole3t"    /> 
     145          <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
     146          <field field_ref="bgfrctem"     name="bgfrctem"    /> 
     147          <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
     148          <field field_ref="bgmistem"     name="bgmistem"    /> 
     149          <field field_ref="bgmissal"     name="bgmissal"    /> 
     150        </file> 
     151 
     152        <file id="file8" name_suffix="_SBC_scalar" description="scalar variables" > 
     153          <field field_ref="ibgvoltot"    name="ibgvoltot"   /> 
     154          <field field_ref="sbgvoltot"    name="sbgvoltot"   /> 
     155          <field field_ref="ibgarea"      name="ibgarea"     /> 
     156          <field field_ref="ibgsaline"    name="ibgsaline"   /> 
     157          <field field_ref="ibgtemper"    name="ibgtemper"   /> 
     158          <field field_ref="ibgheatco"    name="ibgheatco"   /> 
     159          <field field_ref="sbgheatco"    name="sbgheatco"   /> 
     160          <field field_ref="ibgsaltco"    name="ibgsaltco"   /> 
     161 
     162          <field field_ref="ibgemp"       name="ibgemp"      /> 
     163          <field field_ref="ibgempbog"    name="ibgempbog"      /> 
     164          <field field_ref="ibgemplag"    name="ibgemplag"      /> 
     165          <field field_ref="ibgempsig"    name="ibgempsig"      /> 
     166          <field field_ref="ibgempdyg"    name="ibgempdyg"      /> 
     167          <field field_ref="ibgempbom"    name="ibgempbom"      /> 
     168          <field field_ref="ibgempsum"    name="ibgempsum"      /> 
     169          <field field_ref="ibgempres"    name="ibgempres"      /> 
     170 
     171          <field field_ref="ibgsfx"       name="ibgsfx"     /> 
     172          <field field_ref="ibgsfxbri"    name="ibgsfxbri"    /> 
     173          <field field_ref="ibgsfxthd"    name="ibgsfxthd"    /> 
     174          <field field_ref="ibgsfxmec"    name="ibgsfxmec" /> 
     175          <field field_ref="ibgsfxres"    name="ibgsfxres" /> 
     176 
     177          <field field_ref="ibgfrcvol"    name="ibgfrcvol"   /> 
     178          <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  /> 
     179          <field field_ref="ibggrme"      name="ibggrme"    /> 
     180        </file> 
    182181 
    183182      </file_group> 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_default.xml

    r4100 r4345  
    128128   </file> 
    129129 
    130  
    131    <file id="file7" name_suffix="_scalar" description="scalar variables" > 
     130        <file id="file7" name_suffix="_scalar" description="scalar variables" enabled=".true." > 
    132131          <field field_ref="voltot"       name="scvoltot"  /> 
    133132          <field field_ref="sshtot"       name="scsshtot"  /> 
     
    137136          <field field_ref="temptot"      name="sctemtot"  /> 
    138137          <field field_ref="saltot"       name="scsaltot"  /> 
    139     
    140           <!-- available with ln_diahsb --> 
    141      <field field_ref="bgtemper"     name="bgtemper"    /> 
    142      <field field_ref="bgsaline"     name="bgsaline"    /> 
    143      <field field_ref="bgheatco"     name="bgheatco"    /> 
    144      <field field_ref="bgsaltco"     name="bgsaltco"    /> 
    145      <field field_ref="bgvolssh"     name="bgvolssh"    /> 
    146      <field field_ref="bgvoltot"     name="bgvoltot"    /> 
    147      <field field_ref="bgsshtot"     name="bgsshtot"    /> 
    148      <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
    149      <field field_ref="bgfrctem"     name="bgfrctem"    /> 
    150      <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
    151      <!-- available with ln_limdiahsb --> 
    152      <field field_ref="ibgvoltot"    name="ibgvoltot"   /> 
    153      <field field_ref="sbgvoltot"    name="sbgvoltot"   /> 
    154      <field field_ref="ibgarea"      name="ibgarea"     /> 
    155      <field field_ref="ibgsaline"    name="ibgsaline"   /> 
    156      <field field_ref="ibgtemper"    name="ibgtemper"   /> 
    157      <field field_ref="ibgheatco"    name="ibgheatco"   /> 
    158      <field field_ref="ibgsaltco"    name="ibgsaltco"   /> 
    159      <field field_ref="sbgheatco"    name="sbgheatco"   /> 
    160      <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  /> 
    161      <field field_ref="ibgfrcemp"    name="ibgfrcemp"   /> 
    162      <field field_ref="ibgsfx"       name="ibgsfx"     /> 
    163      <field field_ref="ibgemp"       name="ibgemp"      /> 
    164      <field field_ref="ibgsfxbri"    name="ibgsfxbri"    /> 
    165      <field field_ref="ibgsfxthd"    name="ibgsfxthd"    /> 
    166      <field field_ref="ibgsfxres"    name="ibgsfxres" /> 
    167      <field field_ref="ibgsfxmec"    name="ibgsfxmec" /> 
    168      <field field_ref="ibggrpme"     name="ibggrpme"    /> 
    169  
    170    </file> 
    171  
    172    <!-- 
    173    <file id="file8" name_suffix="_Tides" description="tidal harmonics" > 
    174      <field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       /> 
    175      <field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  /> 
    176      <field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "      /> 
    177      <field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  /> 
    178      <field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       /> 
    179      <field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  /> 
    180    </file> 
    181    --> 
     138 
     139          <field field_ref="bgtemper"     name="bgtemper"    /> 
     140          <field field_ref="bgsaline"     name="bgsaline"    /> 
     141          <field field_ref="bgheatco"     name="bgheatco"    /> 
     142          <field field_ref="bgsaltco"     name="bgsaltco"    /> 
     143          <field field_ref="bgvolssh"     name="bgvolssh"    />  
     144          <field field_ref="bgvole3t"     name="bgvole3t"    /> 
     145          <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
     146          <field field_ref="bgfrctem"     name="bgfrctem"    /> 
     147          <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
     148          <field field_ref="bgmistem"     name="bgmistem"    /> 
     149          <field field_ref="bgmissal"     name="bgmissal"    /> 
     150        </file> 
     151 
     152        <file id="file8" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." > 
     153          <field field_ref="ibgvoltot"    name="ibgvoltot"   /> 
     154          <field field_ref="sbgvoltot"    name="sbgvoltot"   /> 
     155          <field field_ref="ibgarea"      name="ibgarea"     /> 
     156          <field field_ref="ibgsaline"    name="ibgsaline"   /> 
     157          <field field_ref="ibgtemper"    name="ibgtemper"   /> 
     158          <field field_ref="ibgheatco"    name="ibgheatco"   /> 
     159          <field field_ref="sbgheatco"    name="sbgheatco"   /> 
     160          <field field_ref="ibgsaltco"    name="ibgsaltco"   /> 
     161 
     162          <field field_ref="ibgemp"       name="ibgemp"      /> 
     163          <field field_ref="ibgempbog"    name="ibgempbog"      /> 
     164          <field field_ref="ibgemplag"    name="ibgemplag"      /> 
     165          <field field_ref="ibgempsig"    name="ibgempsig"      /> 
     166          <field field_ref="ibgempdyg"    name="ibgempdyg"      /> 
     167          <field field_ref="ibgempbom"    name="ibgempbom"      /> 
     168          <field field_ref="ibgempsum"    name="ibgempsum"      /> 
     169          <field field_ref="ibgempres"    name="ibgempres"      /> 
     170 
     171          <field field_ref="ibgsfx"       name="ibgsfx"     /> 
     172          <field field_ref="ibgsfxbri"    name="ibgsfxbri"    /> 
     173          <field field_ref="ibgsfxthd"    name="ibgsfxthd"    /> 
     174          <field field_ref="ibgsfxmec"    name="ibgsfxmec" /> 
     175          <field field_ref="ibgsfxres"    name="ibgsfxres" /> 
     176 
     177          <field field_ref="ibgfrcvol"    name="ibgfrcvol"   /> 
     178          <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  /> 
     179          <field field_ref="ibggrme"      name="ibggrme"    /> 
     180        </file> 
    182181 
    183182      </file_group> 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist

    r4100 r4345  
    900900&namhsb       !  Heat and salt budgets 
    901901!----------------------------------------------------------------------- 
    902    ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
     902   ln_diahsb  = .true.    !  check the heat and salt budgets (T) or not (F) 
    903903/ 
    904904!----------------------------------------------------------------------- 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_ice

    r4100 r4345  
    2222   ln_nicep    = .false.   !  Ice points output for debug (yes or no) 
    2323   ln_limdiahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
    24    ln_limdiaout  = .false.    !  output the heat and salt budgets (T) or not (F) 
     24   ln_limdiaout  = .true.    !  output the heat and salt budgets (T) or not (F) 
    2525/ 
    2626!----------------------------------------------------------------------- 
     
    4949   cw          =   5.0e-03 !  drag coefficient for oceanic stress 
    5050   angvg       =   0.0     !  turning angle for oceanic stress 
    51    pstar       =   4.0e+04 !  1st bulk-rheology parameter 
     51   pstar       =   2.0e+04 !  1st bulk-rheology parameter 
    5252   c_rhg       =  20.0     !  2nd bulk-rhelogy parameter 
    5353   etamn       =   0.0e+07 !  minimun value for viscosity 
     
    5858   telast      =9600.0     !  timescale for elastic waves, SB, 720.0 
    5959   alphaevp    =   1.0     !  coefficient for the solution of internal ice stresses 
    60    hminrhg     =   0.0   !  ice thickness (m) below which ice velocity equal ocean velocity 
     60   hminrhg     =   0.001   !  ice thickness (m) below which ice velocity equal ocean velocity 
    6161/ 
    6262!----------------------------------------------------------------------- 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_ice_lim3

    r4336 r4345  
    2222   ln_nicep    = .false.   !  Ice points output for debug (yes or no) 
    2323   ln_limdiahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
    24    ln_limdiaout  = .false.    !  output the heat and salt budgets (T) or not (F) 
     24   ln_limdiaout  = .true.    !  output the heat and salt budgets (T) or not (F) 
    2525/ 
    2626!----------------------------------------------------------------------- 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_1D.F90

    r4332 r4345  
    4444      REAL(wp), DIMENSION(:),   INTENT(in)    ::   zhti, zhts, zai    ! input ice/snow variables 
    4545      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   zht_i, zht_s, za_i ! output ice/snow variables 
    46       REAL(wp)                     ::  epsi06 = 1.0e-6 
    47       REAL(wp)                     ::  zc1, zc2, zc3, zx1, zdh   ! local scalars 
     46      REAL(wp) :: epsi06 = 1.0e-6 
     47      REAL(wp) :: zc1, zc2, zc3, zx1, zdh   ! local scalars 
    4848      REAL(wp), DIMENSION(0:jpl)   ::   zhi_max         !:Boundary of ice thickness categories in thickness space 
    4949  
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90

    r4045 r4345  
    3434   !!PUBLIC   lim_diahsb_rst   ! routine called by ice_init.F90 
    3535 
    36    REAL(wp), SAVE  ::   frc_sal, frc_vol   ! global forcing trends 
    37    REAL(wp), SAVE   ::   bg_grpme           ! global ice growth+melt trends 
     36   REAL(dp) ::   frc_sal, frc_vol   ! global forcing trends 
     37   REAL(dp) ::   bg_grme            ! global ice growth+melt trends 
    3838   REAL(wp) ::   epsi06 = 1.e-6_wp  ! small number 
    3939   REAL(wp) ::   epsi03 = 1.e-3_wp  ! small number 
     
    5757      !! ** Purpose: Compute the ice global heat content, salt content and volume conservation 
    5858      !!  
    59       !! ** Method : - Compute the deviation of heat content, salt content and volume 
    60       !!             at the current time step from their values at nit000 
    61       !!             - Compute the contribution of forcing and remove it from these deviations 
     59      !!--------------------------------------------------------------------------- 
    6260      !! 
    63       !!--------------------------------------------------------------------------- 
    64       !! 
    65       REAL(wp)   ::   zbg_ivo, zbg_svo, zbg_are, zbg_sal ,zbg_tem ,zbg_ihc ,zbg_shc 
    66       REAL(wp)   ::   zbg_sfx, zbg_emp, zbg_sfx_bri, zbg_sfx_thd, zbg_sfx_res, zbg_sfx_mec  
    67       REAL(wp)   ::   z_frc_vol, z_frc_sal, z_bg_grpme  
    68       REAL(wp)   ::   zdeltat, z1_area                     !    -     - 
     61      REAL(dp)   ::   zbg_ivo, zbg_svo, zbg_are, zbg_sal ,zbg_tem ,zbg_ihc ,zbg_shc 
     62      REAL(dp)   ::   zbg_sfx, zbg_sfx_bri, zbg_sfx_thd, zbg_sfx_res, zbg_sfx_mec  
     63      REAL(dp)   ::   zbg_emp, zbg_emp_bog, zbg_emp_lag, zbg_emp_sig, zbg_emp_dyg, zbg_emp_bom, zbg_emp_sum, zbg_emp_res  
     64      REAL(dp)   ::   z_frc_vol, z_frc_sal, z_bg_grme  
     65      REAL(dp)   ::   z1_area                     !    -     - 
     66      REAL(dp)   ::   zinda, zindb 
    6967      !!--------------------------------------------------------------------------- 
    7068      IF( nn_timing == 1 )   CALL timing_start('lim_diahsb') 
     
    7371 
    7472      ! 1/area 
    75       z1_area = 1.0 / MAX( glob_sum( area(:,:) * tms(:,:) ),epsi06 ) 
     73      z1_area = 1.d0 / MAX( glob_sum( area(:,:) * tms(:,:) ), epsi06 ) 
     74 
     75      zinda = MAX( 0.d0 , SIGN( 1.d0 , glob_sum( area(:,:) * tms(:,:) ) - epsi06 ) ) 
    7676      ! ----------------------- ! 
    7777      ! 1 -  Content variations ! 
     
    8080      zbg_svo = glob_sum( vt_s(:,:) * area(:,:) * tms(:,:) ) ! volume snow 
    8181      zbg_are = glob_sum( at_i(:,:) * area(:,:) * tms(:,:) ) ! area 
    82       zbg_sal = glob_sum( SUM(smv_i(:,:,:),dim=3) * area(:,:) * tms(:,:) ) ! mean salt content 
    83       zbg_tem = glob_sum( (tm_i(:,:)-rtt) * vt_i(:,:) * area(:,:) * tms(:,:) )  ! mean temp content 
     82      zbg_sal = glob_sum( SUM( smv_i(:,:,:), dim=3 ) * area(:,:) * tms(:,:) )      ! mean salt content 
     83      zbg_tem = glob_sum( ( tm_i(:,:) - rtt ) * vt_i(:,:) * area(:,:) * tms(:,:) )  ! mean temp content 
    8484 
    8585      !zbg_ihc = glob_sum( et_i(:,:) * area(:,:) * tms(:,:) ) / MAX( zbg_ivo,epsi06 ) ! ice heat content 
    8686      !zbg_shc = glob_sum( et_s(:,:) * area(:,:) * tms(:,:) ) / MAX( zbg_svo,epsi06 ) ! snow heat content 
    8787 
    88       zbg_ihc = glob_sum( et_i(:,:) ) ! ice heat content  [10^9 J] 
    89       zbg_shc = glob_sum( et_s(:,:) ) ! snow heat content [10^9 J] 
    90  
    91       zbg_sfx      = glob_sum(      sfx(:,:) * area(:,:) * tms(:,:) ) * z1_area 
    92       zbg_emp       = glob_sum(       emp(:,:) * area(:,:) * tms(:,:) ) * z1_area 
    93       zbg_sfx_bri     = glob_sum(     sfx_bri(:,:) * area(:,:) * tms(:,:) ) * z1_area 
    94       zbg_sfx_thd     = glob_sum(     sfx_thd(:,:) * area(:,:) * tms(:,:) ) * z1_area 
    95       zbg_sfx_res = glob_sum( sfx_res(:,:) * area(:,:) * tms(:,:) ) * z1_area 
    96       zbg_sfx_mec = glob_sum( sfx_mec(:,:) * area(:,:) * tms(:,:) ) * z1_area 
     88      zbg_ihc = glob_sum( et_i(:,:) * 1.e-11 ) ! ice heat content  [10^9*1.e-11 J] 
     89      zbg_shc = glob_sum( et_s(:,:) * 1.e-11 ) ! snow heat content [10^9*1.e-11 J] 
     90 
     91      zbg_emp     = zinda * glob_sum(         emp(:,:) * area(:,:) * tms(:,:) ) * z1_area         * r1_rau0 * rday 
     92      zbg_emp_bog = zinda * glob_sum( diag_bot_gr(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     93      zbg_emp_lag = zinda * glob_sum( diag_lat_gr(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     94      zbg_emp_sig = zinda * glob_sum( diag_sni_gr(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     95      zbg_emp_dyg = zinda * glob_sum( diag_dyn_gr(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     96      zbg_emp_bom = zinda * glob_sum( diag_bot_me(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     97      zbg_emp_sum = zinda * glob_sum( diag_sur_me(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     98      zbg_emp_res = zinda * glob_sum( diag_res_pr(:,:) * area(:,:) * tms(:,:) ) * z1_area * rhoic * r1_rau0 * rday 
     99 
     100      zbg_sfx     = zinda * glob_sum(     sfx(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday 
     101      zbg_sfx_bri = zinda * glob_sum( sfx_bri(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday 
     102      zbg_sfx_thd = zinda * glob_sum( sfx_thd(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday 
     103      zbg_sfx_res = zinda * glob_sum( sfx_res(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday 
     104      zbg_sfx_mec = zinda * glob_sum( sfx_mec(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday 
    97105       
    98106      ! --------------------------------------------- ! 
    99107      ! 2 - Trends due to forcing and ice growth/melt ! 
    100108      ! --------------------------------------------- ! 
    101       z_frc_vol = ( 1.e0 / rau0 ) * glob_sum( - emp(:,:) * area(:,:) * tms(:,:) ) ! volume fluxes 
    102       z_frc_sal = ( 1.e0 / rau0 ) * glob_sum(  sfx(:,:) * area(:,:) * tms(:,:) ) ! salt fluxes 
    103       z_bg_grpme = glob_sum( ( diag_bot_gr(:,:) + diag_lat_gr(:,:) + diag_sni_gr(:,:) + diag_dyn_gr(:,:) + & 
     109      z_frc_vol = r1_rau0 * glob_sum( - emp(:,:) * area(:,:) * tms(:,:) ) ! volume fluxes 
     110      z_frc_sal = r1_rau0 * glob_sum(   sfx(:,:) * area(:,:) * tms(:,:) ) ! salt fluxes 
     111      z_bg_grme = glob_sum( ( diag_bot_gr(:,:) + diag_lat_gr(:,:) + diag_sni_gr(:,:) + diag_dyn_gr(:,:) + & 
    104112                          &    diag_bot_me(:,:) + diag_sur_me(:,:) + diag_res_pr(:,:) ) * area(:,:) * tms(:,:) ) ! volume fluxes 
    105113      ! 
    106114      frc_vol  = frc_vol  + z_frc_vol  * rdt_ice 
    107115      frc_sal  = frc_sal  + z_frc_sal  * rdt_ice 
    108       bg_grpme = bg_grpme + z_bg_grpme * rdt_ice 
     116      bg_grme  = bg_grme  + z_bg_grme * rdt_ice 
    109117       
    110118      ! difference 
     
    115123      ! 3 - Diagnostics writing ! 
    116124      ! ----------------------- ! 
    117       !zdeltat  = 1.e0 / ( ( kt - nit000 + 1 ) * rdt_ice ) 
    118       ! 
    119       CALL iom_put( 'ibgvoltot',zbg_ivo * rhoic / rau0 * 1.e-9 ) ! m3 (equivalent liquid)          
    120       CALL iom_put( 'sbgvoltot',zbg_svo * rhosn / rau0 * 1.e-9 )  ! m3 (equivalent liquid)        
    121       CALL iom_put( 'ibgarea',zbg_are * 1.e-6 )          
    122       CALL iom_put( 'ibgsaline',zbg_sal / MAX( zbg_ivo,epsi03 ) )          
    123       CALL iom_put( 'ibgtemper',zbg_tem / MAX( zbg_ivo,epsi03 ) )          
    124       CALL iom_put( 'ibgheatco',zbg_ihc )           ! 10^9 J         
    125       CALL iom_put( 'ibgsaltco',zbg_sal * rhoic / rau0 * 1.e-9 ) ! psu*km3         
    126       CALL iom_put( 'sbgheatco',zbg_shc )           ! 10^9 J 
    127       CALL iom_put( 'ibgfrcemp',frc_vol * 1.e-9 )           !vol - forcing : km3 (equivalent liquid)          
    128       CALL iom_put( 'ibgfrcsfx',frc_sal * 1.e-9 )          !sal - forcing : psu*km3    
    129       CALL iom_put( 'ibgsfx',zbg_sfx *rday)             
    130       CALL iom_put( 'ibgemp',zbg_emp *rday)               
    131       CALL iom_put( 'ibgsfxbri',zbg_sfx_bri *rday)          
    132       CALL iom_put( 'ibgsfxthd',zbg_sfx_thd *rday)          
    133       CALL iom_put( 'ibgsfxres',zbg_sfx_res *rday)          
    134       CALL iom_put( 'ibgsfxmec',zbg_sfx_mec *rday)          
    135       CALL iom_put( 'ibggrpme',bg_grpme * rhoic / rau0 * 1.e-9 ) ! km3 (equivalent liquid)          
     125      zindb = MAX( 0.d0 , SIGN( 1.d0 , zbg_ivo - epsi06 ) ) 
     126      ! 
     127      CALL iom_put( 'ibgvoltot' , zbg_ivo * rhoic * r1_rau0 * 1.e-9        )   ! ice volume (km3 equivalent liquid)          
     128      CALL iom_put( 'sbgvoltot' , zbg_svo * rhosn * r1_rau0 * 1.e-9        )   ! snw volume (km3 equivalent liquid)        
     129      CALL iom_put( 'ibgarea'   , zbg_are * 1.e-6                          )   ! ice area   (km2) 
     130      CALL iom_put( 'ibgsaline' , zindb * zbg_sal / MAX( zbg_ivo, epsi06 ) )   ! ice saline (psu) 
     131      CALL iom_put( 'ibgtemper' , zindb * zbg_tem / MAX( zbg_ivo, epsi06 ) )   ! ice temper (C) 
     132      CALL iom_put( 'ibgheatco' , zbg_ihc                                  )   ! ice heat content (1.e20 J)         
     133      CALL iom_put( 'sbgheatco' , zbg_shc                                  )   ! snw heat content (1.e20 J) 
     134      CALL iom_put( 'ibgsaltco' , zbg_sal * rhoic * r1_rau0 * 1.e-9        )   ! ice salt content (psu*km3 equivalent liquid)         
     135 
     136      CALL iom_put( 'ibgemp'    , zbg_emp                                  )   ! volume flux emp (m/day liquid) 
     137      CALL iom_put( 'ibgempbog' , zbg_emp_bog                              )   ! volume flux bottom growth     -(m/day equivalent liquid) 
     138      CALL iom_put( 'ibgemplag' , zbg_emp_lag                              )   ! volume flux open water growth - 
     139      CALL iom_put( 'ibgempsig' , zbg_emp_sig                              )   ! volume flux snow ice growth   - 
     140      CALL iom_put( 'ibgempdyg' , zbg_emp_dyg                              )   ! volume flux dynamic growth    - 
     141      CALL iom_put( 'ibgempbom' , zbg_emp_bom                              )   ! volume flux bottom melt       - 
     142      CALL iom_put( 'ibgempsum' , zbg_emp_sum                              )   ! volume flux surface melt      - 
     143      CALL iom_put( 'ibgempres' , zbg_emp_res                              )   ! volume flux resultant         - 
     144           
     145      CALL iom_put( 'ibgsfx'    , zbg_sfx                                  )   ! salt flux         -(psu*m/day equivalent liquid)        
     146      CALL iom_put( 'ibgsfxbri' , zbg_sfx_bri                              )   ! salt flux brines  -       
     147      CALL iom_put( 'ibgsfxthd' , zbg_sfx_thd                              )   ! salt flux thermo  -     
     148      CALL iom_put( 'ibgsfxmec' , zbg_sfx_mec                              )   ! salt flux dynamic -     
     149      CALL iom_put( 'ibgsfxres' , zbg_sfx_res                              )   ! salt flux result  -     
     150 
     151      CALL iom_put( 'ibgfrcvol' , frc_vol * 1.e-9                          )   ! vol - forcing     (km3 equivalent liquid)  
     152      CALL iom_put( 'ibgfrcsfx' , frc_sal * 1.e-9                          )   ! sal - forcing     (psu*km3 equivalent liquid)    
     153      CALL iom_put( 'ibggrme'   , bg_grme * rhoic * r1_rau0 * 1.e-9        )   ! vol growth + melt (km3 equivalent liquid)          
    136154      ! 
    137155      IF( lrst_ice )   CALL lim_diahsb_rst( numit, 'WRITE' ) 
     
    172190      ! 2 - initial conservation variables ! 
    173191      ! ---------------------------------- ! 
    174       !frc_vol = 0._wp                                           ! volume       trend due to forcing 
    175       !frc_sal = 0._wp                                           ! salt content   -    -   -    -          
    176       !bg_grpme = 0._wp                                          ! ice growth + melt volume trend 
     192      !frc_vol = 0.d0                                           ! volume       trend due to forcing 
     193      !frc_sal = 0.d0                                           ! salt content   -    -   -    -          
     194      !bg_grme = 0.d0                                           ! ice growth + melt volume trend 
    177195      ! 
    178196      CALL lim_diahsb_rst( nstart, 'READ' )  !* read or initialize all required files 
     
    196214     IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise  
    197215        IF( ln_rstart ) THEN                   !* Read the restart file 
    198            id1 = iom_varid( numrir, 'frc_vol'  , ldstop = .TRUE. ) 
     216           !id1 = iom_varid( numrir, 'frc_vol'  , ldstop = .TRUE. ) 
    199217           ! 
     218           IF(lwp) WRITE(numout,*) '~~~~~~~' 
     219           IF(lwp) WRITE(numout,*) ' lim_diahsb_rst at it= ', kt,' date= ', ndastp 
     220           IF(lwp) WRITE(numout,*) '~~~~~~~' 
    200221           CALL iom_get( numrir, 'frc_vol', frc_vol ) 
    201222           CALL iom_get( numrir, 'frc_sal', frc_sal ) 
    202            CALL iom_get( numrir, 'bg_grpme', bg_grpme ) 
    203        ELSE 
    204             frc_vol = 0._wp                                            
    205             frc_sal = 0._wp                                                   
    206             bg_grpme = 0._wp                                         
     223           CALL iom_get( numrir, 'bg_grme', bg_grme ) 
     224        ELSE 
     225           IF(lwp) WRITE(numout,*) '~~~~~~~' 
     226           IF(lwp) WRITE(numout,*) ' lim_diahsb at initial state ' 
     227           IF(lwp) WRITE(numout,*) '~~~~~~~' 
     228           frc_vol  = 0.d0                                            
     229           frc_sal  = 0.d0                                                   
     230           bg_grme  = 0.d0                                         
    207231       ENDIF    
    208232 
    209233     ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file 
    210234        !                                   ! ------------------- 
    211         IF(lwp) WRITE(numout,*) '---- limdia-rst ----' 
     235        IF(lwp) WRITE(numout,*) '~~~~~~~' 
     236        IF(lwp) WRITE(numout,*) ' lim_diahsb_rst at it= ', kt,' date= ', ndastp 
     237        IF(lwp) WRITE(numout,*) '~~~~~~~' 
    212238        CALL iom_rstput( kt, nitrst, numriw, 'frc_vol'   , frc_vol     ) 
    213239        CALL iom_rstput( kt, nitrst, numriw, 'frc_sal'   , frc_sal     ) 
    214         CALL iom_rstput( kt, nitrst, numriw, 'bg_grpme'  , bg_grpme     ) 
     240        CALL iom_rstput( kt, nitrst, numriw, 'bg_grme'   , bg_grme     ) 
    215241        ! 
    216242     ENDIF 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90

    r4332 r4345  
    14771477            END DO 
    14781478         END DO 
    1479          zmask_glo = glob_sum(zmask) 
     1479         !zmask_glo = glob_sum(zmask) 
    14801480         !IF( ln_nicep .AND. lwp ) WRITE(numout,*) zmask_glo, ' cells of ice zapped in the ocean ' 
    14811481 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r4332 r4345  
    427427               !-Calculate stress tensor components zs1 and zs2  
    428428               !-at centre of grid cells (see section 3.5 of CICE user's guide). 
    429                zs1(ji,jj) = ( zs1(ji,jj) - dtotel*( ( 1._wp - alphaevp) * zs1(ji,jj) +   & 
    430                   &          ( delta / deltat(ji,jj) - zdd(ji,jj) / deltat(ji,jj) ) * zpresh(ji,jj) ) )  &        
    431                   &          / ( 1._wp + alphaevp * dtotel ) 
    432  
    433                zs2(ji,jj) = ( zs2(ji,jj) - dtotel * ( ( 1._wp - alphaevp ) * ecc2 * zs2(ji,jj) -   & 
    434                              zdt(ji,jj) / deltat(ji,jj) * zpresh(ji,jj) ) )   & 
    435                   &          / ( 1._wp + alphaevp * ecc2 * dtotel ) 
     429               !zs1(ji,jj) = ( zs1(ji,jj) - dtotel*( ( 1._wp - alphaevp) * zs1(ji,jj) +   & 
     430               !   &          ( delta / deltat(ji,jj) - zdd(ji,jj) / deltat(ji,jj) ) * zpresh(ji,jj) ) )  &        
     431               !   &          / ( 1._wp + alphaevp * dtotel ) 
     432 
     433               !zs2(ji,jj) = ( zs2(ji,jj) - dtotel * ( ( 1._wp - alphaevp ) * ecc2 * zs2(ji,jj) -   & 
     434               !              zdt(ji,jj) / deltat(ji,jj) * zpresh(ji,jj) ) )   & 
     435               !   &          / ( 1._wp + alphaevp * ecc2 * dtotel ) 
    436436 
    437437               ! new formulation from S. Bouillon to help stabilizing the code (no need of alphaevp) 
    438                !zs1(ji,jj) = ( zs1(ji,jj) + dtotel * ( ( zdd(ji,jj) / deltat(ji,jj) - delta / deltat(ji,jj) )  & 
    439                !   &         * zpresh(ji,jj) ) ) / ( 1._wp + dtotel ) 
    440                !zs2(ji,jj) = ( zs2(ji,jj) + dtotel * ( ecci * zdt(ji,jj) / deltat(ji,jj) * zpresh(ji,jj) ) )  & 
    441                !   &         / ( 1._wp + dtotel ) 
     438               zs1(ji,jj) = ( zs1(ji,jj) + dtotel * ( ( zdd(ji,jj) / deltat(ji,jj) - delta / deltat(ji,jj) )  & 
     439                  &         * zpresh(ji,jj) ) ) / ( 1._wp + dtotel ) 
     440               zs2(ji,jj) = ( zs2(ji,jj) + dtotel * ( ecci * zdt(ji,jj) / deltat(ji,jj) * zpresh(ji,jj) ) )  & 
     441                  &         / ( 1._wp + dtotel ) 
    442442 
    443443            END DO 
     
    473473 
    474474               !-Calculate stress tensor component zs12 at corners (see section 3.5 of CICE user's guide). 
    475                zs12(ji,jj) = ( zs12(ji,jj) - dtotel * ( (1.0-alphaevp) * ecc2 * zs12(ji,jj) - zds(ji,jj) /  & 
    476                   &          ( 2._wp * deltac(ji,jj) ) * zpreshc(ji,jj) ) )  & 
    477                   &          / ( 1._wp + alphaevp * ecc2 * dtotel )  
     475               !zs12(ji,jj) = ( zs12(ji,jj) - dtotel * ( (1.0-alphaevp) * ecc2 * zs12(ji,jj) - zds(ji,jj) /  & 
     476               !   &          ( 2._wp * deltac(ji,jj) ) * zpreshc(ji,jj) ) )  & 
     477               !   &          / ( 1._wp + alphaevp * ecc2 * dtotel )  
    478478 
    479479               ! new formulation from S. Bouillon to help stabilizing the code (no need of alphaevp) 
    480                !zs12(ji,jj) = ( zs12(ji,jj) + dtotel *  & 
    481                !   &          ( ecci * zds(ji,jj) / ( 2._wp * deltac(ji,jj) ) * zpreshc(ji,jj) ) )  & 
    482                !   &          / ( 1.0 + dtotel )  
     480               zs12(ji,jj) = ( zs12(ji,jj) + dtotel *  & 
     481                  &          ( ecci * zds(ji,jj) / ( 2._wp * deltac(ji,jj) ) * zpreshc(ji,jj) ) )  & 
     482                  &          / ( 1.0 + dtotel )  
    483483 
    484484            END DO ! ji 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r4332 r4345  
    2424   !!---------------------------------------------------------------------- 
    2525   USE par_oce          ! ocean parameters 
     26   USE phycst           ! physical constants 
    2627   USE par_ice          ! ice parameters 
    2728   USE dom_oce          ! ocean domain 
     29   USE dom_ice,    ONLY : tms 
     30   USE ice              ! LIM sea-ice variables 
    2831   USE sbc_ice          ! Surface boundary condition: sea-ice fields 
    2932   USE sbc_oce          ! Surface boundary condition: ocean fields 
    30    USE phycst           ! physical constants 
     33   USE sbccpl 
     34   USE cpl_oasis3, ONLY : lk_cpl 
     35   USE oce       , ONLY : iatte, oatte, sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n 
    3136   USE albedo           ! albedo parameters 
    32    USE ice              ! LIM sea-ice variables 
    33    USE lbclnk           ! ocean lateral boundary condition 
    34    USE in_out_manager   ! I/O manager 
     37   USE lbclnk           ! ocean lateral boundary condition - MPP exchanges 
    3538   USE lib_mpp          ! MPP library 
    3639   USE wrk_nemo         ! work arrays 
     40   USE in_out_manager   ! I/O manager 
    3741   USE prtctl           ! Print control 
    38    USE cpl_oasis3, ONLY : lk_cpl 
     42   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    3943   USE traqsr           ! clem: add penetration of solar flux into the calculation of heat budget 
    40    USE oce,        ONLY : iatte, oatte, sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n 
    41    USE dom_ice,    ONLY : tms 
    42    USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    4344 
    4445   IMPLICIT NONE 
     
    438439      ENDIF ! .NOT. ln_rstart 
    439440      ! 
    440 !!?      IF( .NOT. ln_rstart ) THEN           ! delete the initial ssh below sea-ice area 
    441 !!?         ! 
    442 !!?         zarea     = glob_sum( e1e2t(:,:) )           ! interior global domain surface 
    443 !!?         zsum      = glob_sum( e1e2t(:,:) * ( snwice_mass(:,:) ) ) / zarea * r1_rau0 
    444 !!?         sshn(:,:) = sshn(:,:) - zsum  
    445 !!?         sshb(:,:) = sshb(:,:) - zsum 
    446 !!?      ENDIF 
    447       ! 
    448441 
    449442   END SUBROUTINE lim_sbc_init 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90

    r4220 r4345  
    3737   LOGICAL, PUBLIC ::   ln_diahsb  = .FALSE.   !: check the heat and salt budgets 
    3838 
    39    REAL(wp), SAVE                                ::   frc_t      , frc_s     , frc_v   ! global forcing trends 
    40    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   ssh_ini              ! 
    41    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   hc_loc_ini, sc_loc_ini, e3t_ini  ! 
    42    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   hcssh_loc_ini, scssh_loc_ini     ! 
     39   REAL(dp)                                ::   surf_tot                ! 
     40   REAL(dp)                                ::   frc_t      , frc_s     , frc_v   ! global forcing trends 
     41   REAL(dp)                                ::   frc_wn_t      , frc_wn_s ! global forcing trends 
     42   REAL(dp), DIMENSION(:,:)  , ALLOCATABLE ::   surf      , ssh_ini              ! 
     43   REAL(dp), DIMENSION(:,:,:), ALLOCATABLE ::   hc_loc_ini, sc_loc_ini, e3t_ini  ! 
     44   REAL(dp), DIMENSION(:,:)  , ALLOCATABLE ::   ssh_hc_loc_ini, ssh_sc_loc_ini 
    4345 
    4446   !! * Substitutions 
     
    6870      !! 
    6971      INTEGER    ::   jk                          ! dummy loop indice 
    70       REAL(wp)   ::   zdiff_hc    , zdiff_sc      ! heat and salt content variations 
    71       REAL(wp)   ::   zdiff_v1    , zdiff_v2      ! volume variation 
    72       REAL(wp)   ::   z_hc        , z_sc          ! heat and salt content 
    73       REAL(wp)   ::   z_v1        , z_v2          ! volume 
    74       REAL(wp)   ::   zdeltat                     !    -     - 
    75       REAL(wp)   ::   z_frc_trd_t , z_frc_trd_s   !    -     - 
    76       REAL(wp)   ::   z_frc_trd_v                 !    -     - 
    77       REAL(wp), POINTER, DIMENSION(:,:)   ::   zsurf              ! 
     72      REAL(dp)   ::   zdiff_hc    , zdiff_sc      ! heat and salt content variations 
     73      REAL(dp)   ::   zdiff_hc1   , zdiff_sc1     ! -   -   -   -   -   -   -   -  
     74      REAL(dp)   ::   zdiff_v1    , zdiff_v2      ! volume variation 
     75      REAL(dp)   ::   zerr_hc1    , zerr_sc1       ! heat and salt content misfit 
     76      REAL(dp)   ::   zvol_tot                    ! volume 
     77      REAL(dp)   ::   z_frc_trd_t , z_frc_trd_s   !    -     - 
     78      REAL(dp)   ::   z_frc_trd_v                 !    -     - 
     79      REAL(dp)   ::   z_wn_trd_t , z_wn_trd_s   !    -     - 
     80      REAL(dp)   ::   z_ssh_hc , z_ssh_sc   !    -     - 
    7881      !!--------------------------------------------------------------------------- 
    7982      IF( nn_timing == 1 )   CALL timing_start('dia_hsb')       
    8083 
    81       CALL wrk_alloc( jpi, jpj, zsurf ) 
    82    
    83       zsurf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:)      ! masked surface grid cell area 
    84        
    8584      ! ------------------------- ! 
    8685      ! 1 - Trends due to forcing ! 
    8786      ! ------------------------- ! 
    88       z_frc_trd_v = r1_rau0 * glob_sum( - ( emp(:,:) - rnf(:,:) ) * zsurf(:,:) ) ! volume fluxes 
    89       z_frc_trd_t =           glob_sum( sbc_tsc(:,:,jp_tem) * zsurf(:,:) )       ! heat fluxes 
    90       z_frc_trd_s =           glob_sum( sbc_tsc(:,:,jp_sal) * zsurf(:,:) )       ! salt fluxes 
    91       ! 
    92       IF( ln_rnf    )   z_frc_trd_t = z_frc_trd_t + glob_sum( rnf_tsc(:,:,jp_tem) * zsurf(:,:) ) 
    93       IF( ln_rnf_sal)   z_frc_trd_s = z_frc_trd_s + glob_sum( rnf_tsc(:,:,jp_sal) * zsurf(:,:) ) 
     87      z_frc_trd_v = r1_rau0 * glob_sum( - ( emp(:,:) - rnf(:,:) ) * surf(:,:) ) ! volume fluxes 
     88      z_frc_trd_t =           glob_sum( sbc_tsc(:,:,jp_tem) * surf(:,:) )       ! heat fluxes 
     89      z_frc_trd_s =           glob_sum( sbc_tsc(:,:,jp_sal) * surf(:,:) )       ! salt fluxes 
     90      ! Add runoff heat & salt input 
     91      IF( ln_rnf    )   z_frc_trd_t = z_frc_trd_t + glob_sum( rnf_tsc(:,:,jp_tem) * surf(:,:) ) 
     92      IF( ln_rnf_sal)   z_frc_trd_s = z_frc_trd_s + glob_sum( rnf_tsc(:,:,jp_sal) * surf(:,:) ) 
    9493 
    9594      ! Add penetrative solar radiation 
    96       IF( ln_traqsr )   z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( qsr     (:,:) * zsurf(:,:) ) 
     95      IF( ln_traqsr )   z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( qsr     (:,:) * surf(:,:) ) 
    9796      ! Add geothermal heat flux 
    98       IF( ln_trabbc )   z_frc_trd_t = z_frc_trd_t +               glob_sum( qgh_trd0(:,:) * zsurf(:,:) ) 
    99       ! 
     97      IF( ln_trabbc )   z_frc_trd_t = z_frc_trd_t +               glob_sum( qgh_trd0(:,:) * surf(:,:) ) 
     98      ! 
     99      IF( .NOT. lk_vvl ) THEN 
     100         z_wn_trd_t = - glob_sum( surf(:,:) * wn(:,:,1) * tsb(:,:,1,jp_tem) ) 
     101         z_wn_trd_s = - glob_sum( surf(:,:) * wn(:,:,1) * tsb(:,:,1,jp_sal) ) 
     102      ENDIF 
     103 
    100104      frc_v = frc_v + z_frc_trd_v * rdt 
    101105      frc_t = frc_t + z_frc_trd_t * rdt 
    102106      frc_s = frc_s + z_frc_trd_s * rdt 
     107      !                                          ! Advection flux through fixed surface (z=0) 
     108      IF( .NOT. lk_vvl ) THEN 
     109         frc_wn_t = frc_wn_t + z_wn_trd_t * rdt 
     110         frc_wn_s = frc_wn_s + z_wn_trd_s * rdt 
     111      ENDIF 
    103112 
    104113      ! ------------------------ ! 
    105       ! 2a -  Content variations ! 
     114      ! 2 -  Content variations ! 
    106115      ! ------------------------ ! 
    107       zdiff_v2 = 0._wp 
    108       zdiff_hc = 0._wp 
    109       zdiff_sc = 0._wp 
     116      zdiff_v2 = 0.d0 
     117      zdiff_hc = 0.d0 
     118      zdiff_sc = 0.d0 
     119 
    110120      ! volume variation (calculated with ssh) 
    111       zdiff_v1 = glob_sum( zsurf(:,:) * ( sshn(:,:) - ssh_ini(:,:) ) ) 
     121      zdiff_v1 = glob_sum( surf(:,:) * ( sshn(:,:) - ssh_ini(:,:) ) ) 
     122 
     123      ! heat & salt content variation (associated with ssh) 
     124      IF( .NOT. lk_vvl ) THEN 
     125         z_ssh_hc = glob_sum( surf(:,:) * ( tsn(:,:,1,jp_tem) * sshn(:,:) - ssh_hc_loc_ini(:,:) ) ) 
     126         z_ssh_sc = glob_sum( surf(:,:) * ( tsn(:,:,1,jp_sal) * sshn(:,:) - ssh_sc_loc_ini(:,:) ) ) 
     127      ENDIF 
     128 
    112129      DO jk = 1, jpkm1 
    113130         ! volume variation (calculated with scale factors) 
    114          zdiff_v2 = zdiff_v2 + glob_sum( zsurf(:,:) * tmask(:,:,jk) * ( fse3t_n(:,:,jk) - e3t_ini(:,:,jk) ) ) 
     131         zdiff_v2 = zdiff_v2 + glob_sum( surf(:,:) * tmask(:,:,jk) & 
     132            &                           * ( fse3t_n(:,:,jk) - e3t_ini(:,:,jk) ) ) 
    115133         ! heat content variation 
    116          zdiff_hc = zdiff_hc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem)   & 
    117             &                           - hc_loc_ini(:,:,jk) ) ) 
     134         zdiff_hc = zdiff_hc + glob_sum(  surf(:,:) * tmask(:,:,jk) &  
     135            &                           * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) - hc_loc_ini(:,:,jk) ) ) 
    118136         ! salt content variation 
    119          zdiff_sc = zdiff_sc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal)   & 
    120             &                           - sc_loc_ini(:,:,jk) ) ) 
     137         zdiff_sc = zdiff_sc + glob_sum(  surf(:,:) * tmask(:,:,jk)   & 
     138            &                           * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) - sc_loc_ini(:,:,jk) ) ) 
    121139      ENDDO 
    122140 
    123141      ! Substract forcing from heat content, salt content and volume variations 
    124       !frc_v = zdiff_v2 - frc_v 
    125       !frc_t = zdiff_hc - frc_t 
    126       !frc_s = zdiff_sc - frc_s 
    127        
    128       ! add ssh if not vvl 
     142      zdiff_v1 = zdiff_v1 - frc_v 
     143      IF( lk_vvl )   zdiff_v2 = zdiff_v2 - frc_v 
     144      zdiff_hc = zdiff_hc - frc_t 
     145      zdiff_sc = zdiff_sc - frc_s 
    129146      IF( .NOT. lk_vvl ) THEN 
    130         zdiff_v2 = zdiff_v2 + zdiff_v1 
    131         zdiff_hc = zdiff_hc + glob_sum( zsurf(:,:) * ( sshn(:,:) * tsn(:,:,1,jp_tem)   & 
    132                &                           - hcssh_loc_ini(:,:) ) ) 
    133         zdiff_sc = zdiff_sc + glob_sum( zsurf(:,:) * ( sshn(:,:) * tsn(:,:,1,jp_sal)   & 
    134                &                           - scssh_loc_ini(:,:) ) ) 
    135       ENDIF 
    136       ! 
    137       ! ----------------------- ! 
    138       ! 2b -  Content           ! 
    139       ! ----------------------- ! 
    140       z_v2 = 0._wp 
    141       z_hc = 0._wp 
    142       z_sc = 0._wp 
    143       ! volume (calculated with ssh) 
    144       z_v1 = glob_sum( zsurf(:,:) * sshn(:,:) ) 
    145       DO jk = 1, jpkm1 
    146          ! volume (calculated with scale factors) 
    147          z_v2 = z_v2 + glob_sum( zsurf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) ) 
    148          ! heat content 
    149          z_hc = z_hc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) ) 
    150          ! salt content 
    151          z_sc = z_sc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) ) 
    152       ENDDO 
    153       ! add ssh if not vvl 
    154       IF( .NOT. lk_vvl ) THEN 
    155         z_v2 = z_v2 + z_v1 
    156         z_hc = z_hc + glob_sum( zsurf(:,:) * sshn(:,:) * tsn(:,:,1,jp_tem) ) 
    157         z_sc = z_sc + glob_sum( zsurf(:,:) * sshn(:,:) * tsn(:,:,1,jp_sal) ) 
     147         zdiff_hc1 = zdiff_hc + z_ssh_hc  
     148         zdiff_sc1 = zdiff_sc + z_ssh_sc 
     149         zerr_hc1  = z_ssh_hc - frc_wn_t 
     150         zerr_sc1  = z_ssh_sc - frc_wn_s 
    158151      ENDIF 
    159152 
     
    161154      ! 3 - Diagnostics writing ! 
    162155      ! ----------------------- ! 
    163       zdeltat  = 1.e0 / ( ( kt - nit000 + 1 ) * rdt ) 
    164 ! 
    165       CALL iom_put( 'bgtemper' , z_hc / z_v2 )                      ! Temperature (C)  
    166       CALL iom_put( 'bgsaline' , z_sc / z_v2 )                      ! Salinity (psu) 
    167       CALL iom_put( 'bgheatco' , zdiff_hc * rau0 * rcp * 1.e-9_wp ) ! Heat content variation (10^9 J) 
    168       CALL iom_put( 'bgsaltco' , zdiff_sc * 1.e-9 )                 ! Salt content variation (psu*km3)  
    169       CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9 )                    ! volume ssh (km3)   
    170       CALL iom_put( 'bgsshtot' , zdiff_v1 / glob_sum(zsurf) )          ! ssh (m)   
    171       CALL iom_put( 'bgvoltot' , zdiff_v2 * 1.e-9 )                 ! volume total (km3)  
    172       CALL iom_put( 'bgfrcvol' , frc_v * 1.e-9 )                     ! vol - surface forcing (volume)  
    173       CALL iom_put( 'bgfrctem' , frc_t * rau0 * rcp * 1.e-9_wp ) ! hc  - surface forcing (heat content)  
    174       CALL iom_put( 'bgfrcsal' , frc_s * 1.e-9 )                     ! sc  - surface forcing (salt content)  
    175       ! 
    176       CALL wrk_dealloc( jpi, jpj, zsurf ) 
    177       ! 
     156      zvol_tot   = 0.d0                                                   ! total ocean volume 
     157      DO jk = 1, jpkm1 
     158         zvol_tot  = zvol_tot + glob_sum( surf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) ) 
     159      END DO 
     160 
     161      IF( lk_vvl ) THEN 
     162        CALL iom_put( 'bgtemper' , zdiff_hc / zvol_tot )              ! Temperature variation (C)  
     163        CALL iom_put( 'bgsaline' , zdiff_sc / zvol_tot )              ! Salinity    variation (psu) 
     164        CALL iom_put( 'bgheatco' , zdiff_hc * 1.e-20 * rau0 * rcp )   ! Heat content variation (1.e20 J)  
     165        CALL iom_put( 'bgsaltco' , zdiff_sc * 1.e-9    )              ! Salt content variation (psu*km3) 
     166        CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9    )              ! volume ssh variation (km3)   
     167        CALL iom_put( 'bgvole3t' , zdiff_v2 * 1.e-9    )              ! volume e3t variation (km3)   
     168        CALL iom_put( 'bgfrcvol' , frc_v    * 1.e-9    )              ! vol - surface forcing (km3)  
     169        CALL iom_put( 'bgfrctem' , frc_t / zvol_tot    )              ! hc  - surface forcing (C)  
     170        CALL iom_put( 'bgfrcsal' , frc_s / zvol_tot    )              ! sc  - surface forcing (psu)  
     171      ELSE 
     172        CALL iom_put( 'bgtemper' , zdiff_hc1 / zvol_tot)              ! Heat content variation (C)  
     173        CALL iom_put( 'bgsaline' , zdiff_sc1 / zvol_tot)              ! Salt content variation (psu) 
     174        CALL iom_put( 'bgheatco' , zdiff_hc1 * 1.e-20 * rau0 * rcp )  ! Heat content variation (1.e20 J)  
     175        CALL iom_put( 'bgsaltco' , zdiff_sc1 * 1.e-9    )             ! Salt content variation (psu*km3) 
     176        CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9    )              ! volume ssh variation (km3)   
     177        CALL iom_put( 'bgfrcvol' , frc_v    * 1.e-9    )              ! vol - surface forcing (km3)  
     178        CALL iom_put( 'bgfrctem' , frc_t / zvol_tot    )              ! hc  - surface forcing (C)  
     179        CALL iom_put( 'bgfrcsal' , frc_s / zvol_tot    )              ! sc  - surface forcing (psu)  
     180        CALL iom_put( 'bgmistem' , zerr_hc1 / zvol_tot )              ! hc  - error due to free surface (C) 
     181        CALL iom_put( 'bgmissal' , zerr_sc1 / zvol_tot )              ! sc  - error due to free surface (psu) 
     182      ENDIF 
     183      ! 
     184      IF( lrst_oce )   CALL dia_hsb_rst( kt, 'WRITE' ) 
     185 
    178186      IF( nn_timing == 1 )   CALL timing_stop('dia_hsb') 
    179187! 
     
    208216         WRITE(numout,*) '   Namelist namhsb : set hsb parameters' 
    209217         WRITE(numout,*) '      Switch for hsb diagnostic (T) or not (F)  ln_diahsb  = ', ln_diahsb 
     218         WRITE(numout,*) 
    210219      ENDIF 
    211220 
    212221      IF( .NOT. ln_diahsb )   RETURN 
    213  
    214          ! ------------------- ! 
    215          ! 1 - Allocate memory ! 
    216          ! ------------------- ! 
    217          ALLOCATE( hc_loc_ini(jpi,jpj,jpk), STAT=ierror ) 
    218          IF( ierror > 0 ) THEN 
    219             CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' )   ;   RETURN 
    220          ENDIF 
    221          ALLOCATE( sc_loc_ini(jpi,jpj,jpk), STAT=ierror ) 
    222          IF( ierror > 0 ) THEN 
    223             CALL ctl_stop( 'dia_hsb: unable to allocate sc_loc_ini' )   ;   RETURN 
    224          ENDIF 
    225          ALLOCATE( hcssh_loc_ini(jpi,jpj), STAT=ierror ) 
    226          IF( ierror > 0 ) THEN 
    227             CALL ctl_stop( 'dia_hsb: unable to allocate hcssh_loc_ini' )   ;   RETURN 
    228          ENDIF 
    229          ALLOCATE( scssh_loc_ini(jpi,jpj), STAT=ierror ) 
    230          IF( ierror > 0 ) THEN 
    231             CALL ctl_stop( 'dia_hsb: unable to allocate scssh_loc_ini' )   ;   RETURN 
    232          ENDIF 
    233          ALLOCATE( e3t_ini(jpi,jpj,jpk)   , STAT=ierror ) 
    234          IF( ierror > 0 ) THEN 
    235             CALL ctl_stop( 'dia_hsb: unable to allocate e3t_ini' )      ;   RETURN 
    236          ENDIF 
    237          ALLOCATE( ssh_ini(jpi,jpj)       , STAT=ierror ) 
    238          IF( ierror > 0 ) THEN 
    239             CALL ctl_stop( 'dia_hsb: unable to allocate ssh_ini' )      ;   RETURN 
    240          ENDIF 
    241           
    242          ! ----------------------------------------------- ! 
    243          ! 2 - Time independant variables and file opening ! 
    244          ! ----------------------------------------------- ! 
    245          IF(lwp) WRITE(numout,*) "dia_hsb: heat salt volume budgets activated" 
    246          IF( lk_obc .or. lk_bdy ) THEN 
    247             CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' )          
    248          ENDIF 
    249          ! 
    250          CALL dia_hsb_rst( nit000, 'READ' )  !* read or initialize all required files 
     222!      IF( .NOT. lk_mpp_rep ) & 
     223!        CALL ctl_stop (' Your global mpp_sum if performed in single precision - 64 bits -', & 
     224!             &         ' whereas the global sum to be precise must be done in double precision ',& 
     225!             &         ' please add key_mpp_rep') 
     226 
     227      ! ------------------- ! 
     228      ! 1 - Allocate memory ! 
     229      ! ------------------- ! 
     230      ALLOCATE( hc_loc_ini(jpi,jpj,jpk), sc_loc_ini(jpi,jpj,jpk), & 
     231         &      e3t_ini(jpi,jpj,jpk), surf(jpi,jpj),  ssh_ini(jpi,jpj), STAT=ierror ) 
     232      IF( ierror > 0 ) THEN 
     233         CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' )   ;   RETURN 
     234      ENDIF 
     235 
     236      IF(.NOT. lk_vvl ) ALLOCATE( ssh_hc_loc_ini(jpi,jpj), ssh_sc_loc_ini(jpi,jpj),STAT=ierror ) 
     237      IF( ierror > 0 ) THEN 
     238         CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' )   ;   RETURN 
     239      ENDIF 
     240 
     241      ! ----------------------------------------------- ! 
     242      ! 2 - Time independant variables and file opening ! 
     243      ! ----------------------------------------------- ! 
     244      IF(lwp) WRITE(numout,*) "dia_hsb: heat salt volume budgets activated" 
     245      IF(lwp) WRITE(numout,*) '~~~~~~~' 
     246      surf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:)      ! masked surface grid cell area 
     247      surf_tot  = glob_sum( surf(:,:) )                                       ! total ocean surface area 
     248 
     249      IF( lk_bdy ) CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' )          
     250      ! 
     251      ! ---------------------------------- ! 
     252      ! 4 - initial conservation variables ! 
     253      ! ---------------------------------- ! 
     254      CALL dia_hsb_rst( nit000, 'READ' )  !* read or initialize all required files 
    251255      ! 
    252256   END SUBROUTINE dia_hsb_init 
     
    271275           !id1 = iom_varid( numror, 'frc_vol'  , ldstop = .FALSE. ) 
    272276           ! 
     277           IF(lwp) WRITE(numout,*) '~~~~~~~' 
     278           IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 
     279           IF(lwp) WRITE(numout,*) '~~~~~~~' 
    273280           CALL iom_get( numror, 'frc_v', frc_v ) 
    274281           CALL iom_get( numror, 'frc_t', frc_t ) 
    275282           CALL iom_get( numror, 'frc_s', frc_s ) 
    276  
     283           IF( .NOT. lk_vvl ) THEN 
     284              CALL iom_get( numror, 'frc_wn_t', frc_wn_t ) 
     285              CALL iom_get( numror, 'frc_wn_s', frc_wn_s ) 
     286           ENDIF 
    277287           CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini ) 
    278288           CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini ) 
    279289           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini ) 
    280290           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini ) 
    281            CALL iom_get( numror, jpdom_autoglo, 'hcssh_loc_ini', hcssh_loc_ini ) 
    282            CALL iom_get( numror, jpdom_autoglo, 'scssh_loc_ini', scssh_loc_ini ) 
     291           IF( .NOT. lk_vvl ) THEN 
     292              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini ) 
     293              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini ) 
     294           ENDIF 
    283295       ELSE 
     296          IF(lwp) WRITE(numout,*) '~~~~~~~' 
     297          IF(lwp) WRITE(numout,*) ' dia_hsb at initial state ' 
     298          IF(lwp) WRITE(numout,*) '~~~~~~~' 
    284299          ssh_ini(:,:) = sshn(:,:)                                       ! initial ssh 
    285300          DO jk = 1, jpk 
     
    288303             sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * fse3t_n(:,:,jk)   ! initial salt content 
    289304          END DO 
    290           hcssh_loc_ini(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:)   ! initial heat content in ssh 
    291           scssh_loc_ini(:,:) = tsn(:,:,1,jp_sal) * sshn(:,:)   ! initial salt content in ssh 
    292           frc_v = 0._wp                                            
    293           frc_t = 0._wp                                            
    294           frc_s = 0._wp                                                   
     305          frc_v = 0.d0                                           ! volume       trend due to forcing 
     306          frc_t = 0.d0                                           ! heat content   -    -   -    -    
     307          frc_s = 0.d0                                           ! salt content   -    -   -    -         
     308          IF( .NOT. lk_vvl ) THEN 
     309             ssh_hc_loc_ini(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:)   ! initial heat content in ssh 
     310             ssh_sc_loc_ini(:,:) = tsn(:,:,1,jp_sal) * sshn(:,:)   ! initial salt content in ssh 
     311             frc_wn_t = 0.d0                                       ! initial heat content misfit due to free surface 
     312             frc_wn_s = 0.d0                                       ! initial salt content misfit due to free surface 
     313          ENDIF 
    295314       ENDIF 
    296315 
    297316     ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file 
    298317        !                                   ! ------------------- 
    299         IF(lwp) WRITE(numout,*) '---- dia-rst ----' 
     318        IF(lwp) WRITE(numout,*) '~~~~~~~' 
     319        IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 
     320        IF(lwp) WRITE(numout,*) '~~~~~~~' 
     321 
    300322        CALL iom_rstput( kt, nitrst, numrow, 'frc_v'   , frc_v     ) 
    301323        CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t     ) 
    302324        CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s     ) 
    303          
     325        IF( .NOT. lk_vvl ) THEN 
     326           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t ) 
     327           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s ) 
     328        ENDIF 
    304329        CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini ) 
    305330        CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini ) 
    306331        CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini ) 
    307332        CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini ) 
    308         CALL iom_rstput( kt, nitrst, numrow, 'hcssh_loc_ini', hcssh_loc_ini ) 
    309         CALL iom_rstput( kt, nitrst, numrow, 'scssh_loc_ini', scssh_loc_ini ) 
     333        IF( .NOT. lk_vvl ) THEN 
     334           CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini ) 
     335           CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini ) 
     336        ENDIF 
    310337        ! 
    311338     ENDIF 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r4220 r4345  
    982982      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    983983      REAL(wp)        , INTENT(in) ::   pfield0d 
     984      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson 
    984985#if defined key_iomput 
    985       CALL xios_send_field(cdname, (/pfield0d/)) 
     986      zz(:,:)=pfield0d 
     987      CALL xios_send_field(cdname, zz) 
     988      !CALL xios_send_field(cdname, (/pfield0d/))  
    986989#else 
    987990      IF( .FALSE. )   WRITE(numout,*) cdname, pfield0d   ! useless test to avoid compilation warnings 
     
    11551158      !! 
    11561159      !!---------------------------------------------------------------------- 
    1157       REAL(wp), DIMENSION(1,1) ::   zz = 1. 
     1160      REAL(wp), DIMENSION(1) ::   zz = 1. 
    11581161      !!---------------------------------------------------------------------- 
    11591162      CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea, jbegin=1, ni=1, nj=1) 
    1160       CALL iom_set_domain_attr('scalarpoint', data_dim=1) 
    1161       CALL iom_set_domain_attr('scalarpoint', lonvalue=(/ zz /), latvalue=(/ zz /)) 
     1163      CALL iom_set_domain_attr('scalarpoint', data_dim=2, data_ibegin = 1, data_ni = 1, data_jbegin = 1, data_nj = 1) 
     1164      zz=REAL(narea,wp) 
     1165      CALL iom_set_domain_attr('scalarpoint', lonvalue=zz, latvalue=zz) 
    11621166 
    11631167   END SUBROUTINE set_scalar 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90

    r4045 r4345  
    217217         CALL iom_nf90_check(NF90_Inquire_Variable(if90id, ivarid, dimids = idimid(1:i_nvd)), clinfo)   ! dimensions ids 
    218218         iom_file(kiomid)%luld(kiv) = .FALSE.   ! default value 
     219         iom_file(kiomid)%dimsz(:,kiv) = 0      ! reset dimsz in case previously used 
    219220         DO ji = 1, i_nvd                       ! dimensions size 
    220221            CALL iom_nf90_check(NF90_Inquire_Dimension(if90id, idimid(ji), len = iom_file(kiomid)%dimsz(ji,kiv)), clinfo)    
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90

    r4332 r4345  
    2727   USE iceini          ! LIM-3: ice initialisation 
    2828   USE dom_ice         ! LIM-3: ice domain 
    29    USE domvvl          ! domain: variable volume level(fse3t_m) 
    3029 
    3130   USE sbc_oce         ! Surface boundary condition: ocean fields 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/step.F90

    r4332 r4345  
    244244      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    245245 
    246       IF( lrst_oce .AND. ln_diahsb )   CALL dia_hsb_rst( kstp, 'WRITE' ) 
    247246      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    248247      ! Control and restarts 
Note: See TracChangeset for help on using the changeset viewer.