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

Changeset 11413


Ignore:
Timestamp:
2019-08-06T17:59:22+02:00 (5 years ago)
Author:
gsamson
Message:

dev_r11265_ABL : see #2131

  • merge src and cfgs from HPC-13_IRRMANN_BDY_optimization branch @ r11402 with dev_r11265_ABL branch @ r11363
  • change ORCA2 results due to ice rheology "cleaning" (see commit r11377)
Location:
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D
Files:
87 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/1_namelist_cfg

    r11267 r11413  
    363363!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    364364!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    365 !!   namflo       float parameters                                      ("key_float") 
    366 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    367 !!   namdct       transports through some sections                      ("key_diadct") 
     365!!   namflo       float parameters                                      (default: OFF) 
     366!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     367!!   nam_diadct   transports through some sections                      (default: OFF) 
    368368!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    369369!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/2_namelist_cfg

    r11267 r11413  
    312312!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    313313!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    314 !!   namflo       float parameters                                      ("key_float") 
    315 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    316 !!   namdct       transports through some sections                      ("key_diadct") 
     314!!   namflo       float parameters                                      (default: OFF) 
     315!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     316!!   nam_diadct   transports through some sections                      (default: OFF) 
    317317!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    318318!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/3_namelist_cfg

    r11267 r11413  
    312312!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    313313!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    314 !!   namflo       float parameters                                      ("key_float") 
    315 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    316 !!   namdct       transports through some sections                      ("key_diadct") 
     314!!   namflo       float parameters                                      (default: OFF) 
     315!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     316!!   nam_diadct   transports through some sections                      (default: OFF) 
    317317!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    318318!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/namelist_cfg

    r11275 r11413  
    362362!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    363363!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    364 !!   namflo       float parameters                                      ("key_float") 
    365 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    366 !!   namdct       transports through some sections                      ("key_diadct") 
     364!!   namflo       float parameters                                      (default: OFF) 
     365!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     366!!   nam_diadct   transports through some sections                      (default: OFF) 
    367367!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    368368!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AMM12/EXPREF/context_nemo.xml

    r9930 r11413  
    66<context id="nemo"> 
    77<!-- $id$ --> 
     8    <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> 
     17    </variable_definition> 
    818<!-- Fields definition --> 
    919    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     
    1828     
    1929    <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"            /> 
     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"              /> 
    2939    </axis_definition> 
    3040  
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AMM12/EXPREF/namelist_cfg

    r11268 r11413  
    350350!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    351351!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    352 !!   namflo       float parameters                                      ("key_float") 
    353 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    354 !!   namdct       transports through some sections                      ("key_diadct") 
     352!!   namflo       float parameters                                      (default: OFF) 
     353!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     354!!   nam_diadct   transports through some sections                      (default: OFF) 
    355355!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    356356!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/C1D_PAPA/EXPREF/namelist_cfg

    r11275 r11413  
    418418!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    419419!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    420 !!   namflo       float parameters                                      ("key_float") 
    421 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    422 !!   namdct       transports through some sections                      ("key_diadct") 
     420!!   namflo       float parameters                                      (default: OFF) 
     421!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     422!!   nam_diadct   transports through some sections                      (default: OFF) 
    423423!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    424424!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
     
    443443/ 
    444444!----------------------------------------------------------------------- 
    445 &namflo        !   float parameters                                     ("key_float") 
    446 !----------------------------------------------------------------------- 
    447 / 
    448 !----------------------------------------------------------------------- 
    449 &nam_diaharm   !   Harmonic analysis of tidal constituents              ("key_diaharm") 
    450 !----------------------------------------------------------------------- 
    451 / 
    452 !----------------------------------------------------------------------- 
    453 &namdct        ! transports through some sections                       ("key_diadct") 
     445&namflo        !   float parameters                                     (default: OFF) 
     446!----------------------------------------------------------------------- 
     447/ 
     448!----------------------------------------------------------------------- 
     449&nam_diaharm   !   Harmonic analysis of tidal constituents              (default: OFF) 
     450!----------------------------------------------------------------------- 
     451/ 
     452!----------------------------------------------------------------------- 
     453&nam_diadct    ! transports through some sections                       (default: OFF) 
    454454!----------------------------------------------------------------------- 
    455455/ 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90

    r10072 r11413  
    3939CONTAINS 
    4040 
    41    SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     41   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    4242      !!---------------------------------------------------------------------- 
    4343      !!                     ***  ROUTINE dom_nam  *** 
     
    5151      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5252      !!---------------------------------------------------------------------- 
    53       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt, ldnam    ! stored print information 
    5453      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    5554      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    5756      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    5857      ! 
    59       INTEGER ::   ios, ii   ! Local integer 
     58      INTEGER ::   ios   ! Local integer 
    6059      !! 
    6160      NAMELIST/namusr_def/ rn_bathy 
    6261      !!---------------------------------------------------------------------- 
    6362      ! 
    64       ii = 1 
    65       ! 
    6663      REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6764      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    68 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', .TRUE. ) 
     65902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
    6966      ! 
    70       WRITE( ldnam(:), namusr_def ) 
     67      IF(lwm)   WRITE( numond, namusr_def ) 
    7168      ! 
    7269      cd_cfg = 'C1D'               ! name & resolution (not used) 
     
    7774      kpj = 3 
    7875      kpk = 75  
    79       ! 
    80       !                             ! control print 
    81       WRITE(ldtxt(ii),*) '   '                                                                            ;   ii = ii + 1 
    82       WRITE(ldtxt(ii),*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'     ;   ii = ii + 1 
    83       WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                   ;   ii = ii + 1 
    84       WRITE(ldtxt(ii),*) '   Namelist namusr_def : C1 case'                                               ;   ii = ii + 1 
    85       WRITE(ldtxt(ii),*) '      type of vertical coordinate : '                                           ;   ii = ii + 1 
    86       WRITE(ldtxt(ii),*) '         z-coordinate flag                     ln_zco = ', ln_zco               ;   ii = ii + 1 
    87       WRITE(ldtxt(ii),*) '         z-partial-step coordinate flag        ln_zps = ', ln_zps               ;   ii = ii + 1 
    88       WRITE(ldtxt(ii),*) '         s-coordinate flag                     ln_sco = ', ln_sco               ;   ii = ii + 1 
    89       WRITE(ldtxt(ii),*) '      C1D domain = 3 x 3 x75 grid-points                '                       ;   ii = ii + 1 
    90       WRITE(ldtxt(ii),*) '         resulting global domain size :        jpiglo = ', kpi                  ;   ii = ii + 1 
    91       WRITE(ldtxt(ii),*) '                                               jpjglo = ', kpj                  ;   ii = ii + 1 
    92       WRITE(ldtxt(ii),*) '                                               jpkglo = ', kpk                  ;   ii = ii + 1 
    93  
    94       ! 
    9576      !                             ! Set the lateral boundary condition of the global domain 
    9677      kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 
    9778      ! 
    98       WRITE(ldtxt(ii),*) '   Lateral boundary condition of the global domain'                           ;   ii = ii + 1 
    99       WRITE(ldtxt(ii),*) '      C1D : closed basin                 jperio = ', kperio                   ;   ii = ii + 1 
     79      !                             ! control print 
     80      IF(lwp) THEN 
     81         WRITE(numout,*) '   ' 
     82         WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg' 
     83         WRITE(numout,*) '~~~~~~~~~~~ ' 
     84         WRITE(numout,*) '   Namelist namusr_def : C1 case' 
     85         WRITE(numout,*) '      type of vertical coordinate : ' 
     86         WRITE(numout,*) '         z-coordinate flag                     ln_zco = ', ln_zco 
     87         WRITE(numout,*) '         z-partial-step coordinate flag        ln_zps = ', ln_zps 
     88         WRITE(numout,*) '         s-coordinate flag                     ln_sco = ', ln_sco 
     89         WRITE(numout,*) '      C1D domain = 3 x 3 x75 grid-points                ' 
     90         WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
     91         WRITE(numout,*) '                                               jpjglo = ', kpj 
     92         WRITE(numout,*) '                                               jpkglo = ', kpk 
     93         WRITE(numout,*) '   Lateral boundary condition of the global domain' 
     94         WRITE(numout,*) '      C1D : closed basin                       jperio = ', kperio 
     95      ENDIF 
    10096      ! 
    10197   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_BFM/EXPREF/context_nemo.xml

    r9930 r11413  
    66<context id="nemo"> 
    77<!-- $id$ --> 
     8    <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> 
     17    </variable_definition> 
    818<!-- Fields definition --> 
    919    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     
    1929     
    2030    <axis_definition> 
    21       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    22       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    23       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    24       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    25       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    26       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    27       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    28       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    29       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
     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"              /> 
    3040    </axis_definition> 
    3141  
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_BFM/EXPREF/namelist_cfg

    r10072 r11413  
    227227!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    228228!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    229 !!   namflo       float parameters                                      ("key_float") 
    230 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    231 !!   namdct       transports through some sections                      ("key_diadct") 
     229!!   namflo       float parameters                                      (default: OFF) 
     230!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     231!!   nam_diadct   transports through some sections                      (default: OFF) 
    232232!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    233233!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_PISCES/EXPREF/context_nemo.xml

    r9930 r11413  
    66<context id="nemo"> 
    77<!-- $id$ --> 
     8    <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> 
     17    </variable_definition> 
    818<!-- Fields definition --> 
    919    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     
    1929     
    2030    <axis_definition> 
    21       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    22       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    23       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    24       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    25       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    26       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    27       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    28       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    29       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
     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"              /> 
    3040    </axis_definition> 
    3141  
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_PISCES/EXPREF/namelist_cfg

    r10072 r11413  
    221221!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    222222!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    223 !!   namflo       float parameters                                      ("key_float") 
    224 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    225 !!   namdct       transports through some sections                      ("key_diadct") 
     223!!   namflo       float parameters                                      (default: OFF) 
     224!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     225!!   nam_diadct   transports through some sections                      (default: OFF) 
    226226!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    227227!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_ABL/cpp_ORCA2_ICE_ABL.fcm

    r11306 r11413  
    1 bld::tool::fppkeys   key_mpp_mpi key_iomput key_si3 
     1bld::tool::fppkeys   key_mpp_mpi key_si3 key_iomput 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/context_nemo.xml

    r11275 r11413  
    66<context id="nemo"> 
    77<!-- $id$ --> 
     8    <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> 
     17    </variable_definition> 
    818<!-- Fields definition --> 
    919    <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     -->  
     
    2232     
    2333    <axis_definition> 
    24       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    25       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    26       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    27       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    28       <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down" /> 
    29       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    30       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    31       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    32       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    33       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
     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"              /> 
    3444      <!-- ABL vertical axis definition --> 
    3545      <axis id="ght_abl" long_name="ABL Vertical T levels" unit="m" positive="up"   /> 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml

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

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

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

    r11275 r11413  
    390390!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    391391!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    392 !!   namflo       float parameters                                      ("key_float") 
    393 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    394 !!   namdct       transports through some sections                      ("key_diadct") 
     392!!   namflo       float parameters                                      (default: OFF) 
     393!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     394!!   nam_diadct   transports through some sections                      (default: OFF) 
    395395!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    396396!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_PISCES/EXPREF/context_nemo.xml

    r10226 r11413  
    66<context id="nemo"> 
    77<!-- $id$ --> 
     8    <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> 
     17    </variable_definition> 
    818<!-- Fields definition --> 
    919    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  Ocean biology                     --> 
     
    1929     
    2030    <axis_definition> 
    21       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    22       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    23       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    24       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    25       <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down" /> 
    26       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    27       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    28       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    29       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    30       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
     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"              /> 
    3141    </axis_definition> 
    3242  
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_PISCES/EXPREF/file_def_nemo.xml

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

    r11267 r11413  
    376376!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    377377!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    378 !!   namflo       float parameters                                      ("key_float") 
    379 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    380 !!   namdct       transports through some sections                      ("key_diadct") 
     378!!   namflo       float parameters                                      (default: OFF) 
     379!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     380!!   nam_diadct   transports through some sections                      (default: OFF) 
    381381!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    382382!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
     
    401401/ 
    402402!----------------------------------------------------------------------- 
    403 &namflo        !   float parameters                                     ("key_float") 
    404 !----------------------------------------------------------------------- 
    405 / 
    406 !----------------------------------------------------------------------- 
    407 &nam_diaharm   !   Harmonic analysis of tidal constituents              ("key_diaharm") 
    408 !----------------------------------------------------------------------- 
    409 / 
    410 !----------------------------------------------------------------------- 
    411 &namdct        ! transports through some sections                       ("key_diadct") 
     403&namflo        !   float parameters                                     (default: OFF) 
     404!----------------------------------------------------------------------- 
     405/ 
     406!----------------------------------------------------------------------- 
     407&nam_diaharm   !   Harmonic analysis of tidal constituents              (default: OFF) 
     408!----------------------------------------------------------------------- 
     409/ 
     410!----------------------------------------------------------------------- 
     411&nam_diadct    !   transports through some sections                     (default: OFF) 
    412412!----------------------------------------------------------------------- 
    413413/ 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_TRC/EXPREF/context_nemo.xml

    r9930 r11413  
    66<context id="nemo"> 
    77<!-- $id$ --> 
     8    <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> 
     17    </variable_definition> 
    818<!-- Fields definition --> 
    919    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  Ocean biology                     --> 
     
    1929     
    2030    <axis_definition> 
    21       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    22       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    23       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    24       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    25       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    26       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    27       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    28       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    29       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
     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"              /> 
    3040    </axis_definition> 
    3141  
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_TRC/EXPREF/namelist_cfg

    r11267 r11413  
    374374!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    375375!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    376 !!   namflo       float parameters                                      ("key_float") 
     376!!   namflo       float parameters                                      (default: OFF) 
    377377!!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    378378!!   namdct       transports through some sections                      ("key_diadct") 
     
    399399/ 
    400400!----------------------------------------------------------------------- 
    401 &namflo        !   float parameters                                     ("key_float") 
     401&namflo        !   float parameters                                     (default: OFF) 
    402402!----------------------------------------------------------------------- 
    403403/ 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_SAS_ICE/EXPREF/namelist_cfg

    r11275 r11413  
    5858!----------------------------------------------------------------------- 
    5959   nn_fsbc     = 1         !  frequency of SBC module call 
     60                           !     (also = the frequency of sea-ice & iceberg model call) 
     61                     ! Type of air-sea fluxes  
    6062   ln_blk      = .true.    !  Bulk formulation                          (T => fill namsbc_blk ) 
    61    nn_ice      = 2         !  =2  sea-ice model                         ("key_SI3" or "key_cice") 
     63   ln_abl      = .false.   !  ABL  formulation                          (T => fill namsbc_abl ) 
     64                     ! Sea-ice : 
     65   nn_ice      = 2         !  =2 or 3 automatically for SI3 or CICE    ("key_si3" or "key_cice") 
     66                           !          except in AGRIF zoom where it has to be specified 
    6267/ 
    6368!----------------------------------------------------------------------- 
     
    176181!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    177182!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    178 !!   namflo       float parameters                                      ("key_float") 
    179 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    180 !!   namdct       transports through some sections                      ("key_diadct") 
     183!!   namflo       float parameters                                      (default: OFF) 
     184!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     185!!   nam_diadct   transports through some sections                      (default: OFF) 
    181186!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    182187!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/domain_def_nemo.xml

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

    r11363 r11413  
    3232  
    3333     <!-- general fields --> 
    34           <field id="icemass"      long_name="Sea-ice mass per area"                                   standard_name="sea_ice_amount"                            unit="kg/m2"/> 
     34          <field id="icemass"      long_name="Sea-ice mass per gridcell area"                          standard_name="sea_ice_amount"                            unit="kg/m2"/> 
    3535          <field id="snwmass"      long_name="Snow mass per area"                                      standard_name="liquid_water_content_of_surface_snow"      unit="kg/m2"/> 
    36           <field id="iceconc"      long_name="Sea-ice area fraction"                                   standard_name="sea_ice_area_fraction"                     unit=""    /> 
    37           <field id="icevolu"      long_name="Sea-ice volume per area"                                 standard_name="sea_ice_thickness"                         unit="m"   /> 
    38           <field id="icethic"      long_name="Sea-ice thickness per area"                              standard_name="sea_ice_thickness"                         unit="m"   /> 
    39           <field id="snwthic"      long_name="Snow thickness per area"                                 standard_name="snow_thickness"                            unit="m"   /> 
    40           <field id="icebrv"       long_name="brine volume"                                                                                                      unit="%"   /> 
    41           <field id="iceage"       long_name="ice age"                                                                                                           unit="days"/> 
    42           <field id="icehnew"      long_name="frazil ice collection thickness"                                                                                   unit="m"   /> 
    43           <field id="snwvolu"      long_name="snow volume"                                                                                                       unit="m"   /> 
    44           <field id="icefrb"       long_name="Sea-ice freeboard"                                       standard_name="sea_ice_freeboard"                         unit="m"   /> 
    45           <field id="icealb"       long_name="Sea-ice or snow albedo"                                  standard_name="sea_ice_albedo"                            unit=""    /> 
    46           <field id="tau_icebfr"   long_name="ice friction on ocean bottom for landfast ice"                                                                     unit="N/2" /> 
     36          <field id="iceconc"      long_name="Sea-ice area fraction"                                   standard_name="sea_ice_area_fraction"                     unit=""     /> 
     37          <field id="icevolu"      long_name="Sea-ice volume per area"                                 standard_name="sea_ice_thickness"                         unit="m"    /> 
     38          <field id="icethic"      long_name="Sea-ice thickness"                                       standard_name="sea_ice_thickness"                         unit="m"    /> 
     39          <field id="snwthic"      long_name="Snow thickness"                                          standard_name="snow_thickness"                            unit="m"    /> 
     40          <field id="icebrv"       long_name="brine volume"                                                                                                      unit="%"    /> 
     41          <field id="iceage"       long_name="ice age"                                                                                                           unit="days" detect_missing_value="true"/> 
     42          <field id="icehnew"      long_name="frazil ice collection thickness"                                                                                   unit="m"    /> 
     43          <field id="snwvolu"      long_name="snow volume"                                                                                                       unit="m"    /> 
     44          <field id="icefrb"       long_name="Sea-ice freeboard"                                       standard_name="sea_ice_freeboard"                         unit="m"    /> 
     45          <field id="icealb"       long_name="Sea-ice or snow albedo"                                  standard_name="sea_ice_albedo"                            unit=""    detect_missing_value="true" /> 
    4746      
    4847     <!-- melt ponds --> 
     
    5150      
    5251     <!-- heat --> 
    53           <field id="icetemp"      long_name="Mean ice temperature"                                                                                              unit="degC" /> 
    54           <field id="snwtemp"      long_name="Mean snow temperature"                                                                                             unit="degC" /> 
    55           <field id="icettop"      long_name="temperature at the ice surface"                                                                                    unit="degC" /> 
    56           <field id="icetbot"      long_name="temperature at the ice bottom"                                                                                     unit="degC" /> 
    57           <field id="icetsni"      long_name="temperature at the snow-ice interface"                                                                             unit="degC" /> 
     52          <field id="icetemp"      long_name="Mean ice temperature"                                                                                              unit="degC" detect_missing_value="true" /> 
     53          <field id="snwtemp"      long_name="Mean snow temperature"                                                                                             unit="degC" detect_missing_value="true" /> 
     54          <field id="icettop"      long_name="temperature at the ice surface"                                                                                    unit="degC" detect_missing_value="true" /> 
     55          <field id="icetbot"      long_name="temperature at the ice bottom"                                                                                     unit="degC" detect_missing_value="true" /> 
     56          <field id="icetsni"      long_name="temperature at the snow-ice interface"                                                                             unit="degC" detect_missing_value="true" /> 
    5857          <field id="icehc"        long_name="ice heat content"                                                                                                  unit="J/m2" />  
    5958          <field id="snwhc"        long_name="snow heat content"                                                                                                 unit="J/m2" /> 
    6059      
    6160     <!-- salt --> 
    62           <field id="icesalt"      long_name="Sea ice salinity"                                                                                                  unit="g/kg"  /> 
     61          <field id="icesalt"      long_name="Sea ice salinity"                                                                                                  unit="g/kg"  detect_missing_value="true" /> 
    6362          <field id="icesalm"      long_name="Mass of salt in sea ice per area"                        standard_name="sea_ice_salt_mass"                         unit="kg/m2" /> 
    6463      
     
    7170          <field id="utau_oi"      long_name="X-component of ocean stress on sea ice"                  standard_name="sea_ice_base_upward_x_stress"              unit="N/m2" /> 
    7271          <field id="vtau_oi"      long_name="Y-component of ocean stress on sea ice"                  standard_name="sea_ice_base_upward_y_stress"              unit="N/m2" /> 
     72          <field id="utau_bi"      long_name="X-component of ocean bottom stress on sea ice -landfast" standard_name="ocean_bottom_upward_x_stress"              unit="N/m2" /> 
     73          <field id="vtau_bi"      long_name="Y-component of ocean bottom stress on sea ice -landfast" standard_name="ocean_bottom_upward_y_stress"              unit="N/m2" /> 
    7374          <field id="isig1"        long_name="1st principal stress component for EVP rhg"                                                                        unit=""     /> 
    7475          <field id="isig2"        long_name="2nd principal stress component for EVP rhg"                                                                        unit=""     /> 
     
    9495      
    9596     <!-- trends --> 
    96           <field id="afxthd"       long_name="sea-ice area fraction change from thermodynamics"  standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics" unit="s-1" /> 
    97           <field id="afxdyn"       long_name="sea-ice area fraction change from dynamics"        standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics" unit="s-1" /> 
    98      <field id="afxtot"       long_name="area tendency (total)"                                                                                               unit="s-1" /> 
     97          <field id="afxthd"       long_name="sea-ice area fraction change from thermodynamics" standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics" unit="s-1" /> 
     98          <field id="afxdyn"       long_name="sea-ice area fraction change from dynamics"       standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics" unit="s-1" /> 
     99     <field id="afxtot"       long_name="area tendency (total)"                                                                                              unit="s-1" /> 
    99100      
    100101     <!-- momentum (advection) --> 
     
    170171          <field id="e3t_m"    unit="m"    /> 
    171172          <field id="frq_m"    unit="-"    /> 
    172  
    173      <!-- categories --> 
    174      <field id="iceconc_cat"  long_name="Sea-ice concentration per category"                unit=""       grid_ref="grid_T_3D_ncatice" /> 
    175           <field id="icethic_cat"  long_name="Sea-ice thickness per category"                    unit="m"      grid_ref="grid_T_3D_ncatice" /> 
    176           <field id="snwthic_cat"  long_name="Snow thickness per category"                       unit="m"      grid_ref="grid_T_3D_ncatice" /> 
    177           <field id="icesalt_cat"  long_name="Sea-Ice Bulk salinity per category"                unit="g/kg"   grid_ref="grid_T_3D_ncatice" /> 
    178           <field id="icetemp_cat"  long_name="Ice temperature per category"                      unit="degC"   grid_ref="grid_T_3D_ncatice" /> 
    179           <field id="snwtemp_cat"  long_name="Snow temperature per category"                     unit="degC"   grid_ref="grid_T_3D_ncatice" /> 
    180           <field id="icettop_cat"  long_name="Ice/snow surface temperature per category"         unit="degC"   grid_ref="grid_T_3D_ncatice" /> 
    181           <field id="iceapnd_cat"  long_name="Ice melt pond concentration per category"          unit="%"      grid_ref="grid_T_3D_ncatice" />  
    182           <field id="icehpnd_cat"  long_name="Ice melt pond thickness per category"              unit="m"      grid_ref="grid_T_3D_ncatice" />  
    183           <field id="iceafpnd_cat" long_name="Ice melt pond fraction per category"               unit="m"      grid_ref="grid_T_3D_ncatice" />  
    184           <field id="icemask_cat"  long_name="Fraction of time step with sea ice (per category)" unit=""       grid_ref="grid_T_3D_ncatice" /> 
    185           <field id="iceage_cat"   long_name="Ice age per category"                              unit="days"   grid_ref="grid_T_3D_ncatice" /> 
    186           <field id="icebrv_cat"   long_name="Brine volume per category"                         unit="%"      grid_ref="grid_T_3D_ncatice" /> 
    187173 
    188174     <!-- ================= --> 
     
    251237          <field id="xmtrptot"     long_name="X-component of sea-ice mass transport"                   standard_name="sea_ice_x_transport"                   unit="kg/s" > xmtrpice + xmtrpsnw </field> 
    252238          <field id="ymtrptot"     long_name="Y-component of sea-ice mass transport"                   standard_name="sea_ice_y_transport"                   unit="kg/s" > ymtrpice + ymtrpsnw </field> 
    253  
    254      <!-- categories --> 
    255           <field id="iceconc_cat_cmip"     long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit=""  grid_ref="grid_T_3D_ncatice" > iceconc_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
    256           <field id="icethic_cat_cmip"     long_name="Sea-ice thickness in thickness categories"       standard_name="sea_ice_thickness_over_categories"     detect_missing_value="true" unit="m" grid_ref="grid_T_3D_ncatice" > icethic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
    257           <field id="snwthic_cat_cmip"     long_name="Snow thickness in thickness categories"          standard_name="snow_thickness_over_categories"        detect_missing_value="true" unit="m" grid_ref="grid_T_3D_ncatice" > snwthic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
    258           <field id="iceconc_cat_pct_cmip" long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="%" grid_ref="grid_T_3D_ncatice" > iceconc_cat*100. * icemask_cat + $missval * (1.-icemask_cat) </field> 
    259239     
    260240   </field_group> <!-- SBC_2D --> 
    261241 
     242   <!-- categories --> 
     243        <field_group id="SBC_3D" grid_ref="grid_T_ncatice" > 
     244 
     245          <!-- standard ice fields -->   
     246     <field id="iceconc_cat"  long_name="Sea-ice concentration per category"                unit=""        /> 
     247          <field id="icethic_cat"  long_name="Sea-ice thickness per category"                    unit="m"       detect_missing_value="true" /> 
     248          <field id="snwthic_cat"  long_name="Snow thickness per category"                       unit="m"       detect_missing_value="true" /> 
     249          <field id="icesalt_cat"  long_name="Sea-Ice Bulk salinity per category"                unit="g/kg"    detect_missing_value="true" /> 
     250          <field id="icetemp_cat"  long_name="Ice temperature per category"                      unit="degC"    detect_missing_value="true" /> 
     251          <field id="snwtemp_cat"  long_name="Snow temperature per category"                     unit="degC"    detect_missing_value="true" /> 
     252          <field id="icettop_cat"  long_name="Ice/snow surface temperature per category"         unit="degC"    detect_missing_value="true" /> 
     253          <field id="iceapnd_cat"  long_name="Ice melt pond concentration per category"          unit=""        />  
     254          <field id="icehpnd_cat"  long_name="Ice melt pond thickness per category"              unit="m"       detect_missing_value="true" />  
     255          <field id="iceafpnd_cat" long_name="Ice melt pond fraction per category"               unit=""        />  
     256          <field id="icemask_cat"  long_name="Fraction of time step with sea ice (per category)" unit=""        /> 
     257          <field id="iceage_cat"   long_name="Ice age per category"                              unit="days"    detect_missing_value="true" /> 
     258          <field id="icebrv_cat"   long_name="Brine volume per category"                         unit="%"       detect_missing_value="true" /> 
     259 
     260          <!-- Add-ons for SIMIP --> 
     261          <field id="iceconc_cat_cmip"     long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit=""   > iceconc_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
     262          <field id="icethic_cat_cmip"     long_name="Sea-ice thickness in thickness categories"       standard_name="sea_ice_thickness_over_categories"     detect_missing_value="true" unit="m"  > icethic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
     263          <field id="snwthic_cat_cmip"     long_name="Snow thickness in thickness categories"          standard_name="snow_thickness_over_categories"        detect_missing_value="true" unit="m"  > snwthic_cat      * icemask_cat + $missval * (1.-icemask_cat) </field> 
     264          <field id="iceconc_cat_pct_cmip" long_name="Sea-ice area fractions in thickness categories"  standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="%"  > iceconc_cat*100. * icemask_cat + $missval * (1.-icemask_cat) </field> 
     265 
     266   </field_group> <!-- SBC_3D --> 
     267    
    262268   <!-- scalar variables --> 
    263    <field_group id="SBC_0D"  grid_ref="grid_1point" > 
     269   <field_group id="SBC_scalar"  grid_ref="grid_scalar" > 
     270          <field id="NH_iceextt"      long_name="Sea ice extent North"                   standard_name="sea_ice_extent_n"                   unit="1e6_km2"  /> 
     271          <field id="SH_iceextt"      long_name="Sea ice extent South"                   standard_name="sea_ice_extent_s"                   unit="1e6_km2"  /> 
     272          <field id="NH_icevolu"      long_name="Sea ice volume North"                   standard_name="sea_ice_volume_n"                   unit="1e3_km3"  /> 
     273          <field id="SH_icevolu"      long_name="Sea ice volume South"                   standard_name="sea_ice_volume_s"                   unit="1e3_km3"  /> 
     274          <field id="NH_icearea"      long_name="Sea ice area North"                     standard_name="sea_ice_area_n"                     unit="1e6_km2"  /> 
     275          <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  /> 
     276 
    264277          <!-- available with ln_icediaout --> 
    265278          <field id="ibgfrcvoltop"    long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)"   unit="km3"      /> 
     
    283296          <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"    /> 
    284297 
    285           <field id="NH_iceextt"      long_name="Sea ice extent North"                   standard_name="sea_ice_extent_n"                   unit="1e6_km2"  /> 
    286           <field id="SH_iceextt"      long_name="Sea ice extent South"                   standard_name="sea_ice_extent_s"                   unit="1e6_km2"  /> 
    287           <field id="NH_icevolu"      long_name="Sea ice volume North"                   standard_name="sea_ice_volume_n"                   unit="1e3_km3"  /> 
    288           <field id="SH_icevolu"      long_name="Sea ice volume South"                   standard_name="sea_ice_volume_s"                   unit="1e3_km3"  /> 
    289           <field id="NH_icearea"      long_name="Sea ice area North"                     standard_name="sea_ice_area_n"                     unit="1e6_km2"  /> 
    290           <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  /> 
    291  
     298     <!-- available later --> 
     299     <!-- 
    292300          <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" /> 
    293301          <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" />   
    294302          <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" /> 
    295    </field_group> <!-- SBC_0D --> 
     303          --> 
     304   </field_group> 
    296305   
    297306   <!--  
     
    301310       
    302311   <field_group id="myvarICE"        grid_ref="grid_T_2D" > 
    303           <field field_ref="icethic"          name="sithic"  /> 
    304           <field field_ref="icevolu"          name="sivolu"  /> 
    305           <field field_ref="iceconc"          name="siconc"  /> 
     312     <!-- ice mask --> 
     313     <field field_ref="icemask"          name="simsk"   /> 
     314     <field field_ref="icemask05"        name="simsk05" /> 
     315     <field field_ref="icemask15"        name="simsk15" /> 
     316      
     317     <!-- general --> 
     318     <field field_ref="snwvolu"          name="snvolu" /> 
     319     <field field_ref="snwthic"          name="snthic" /> 
     320     <field field_ref="icethic"          name="sithic" /> 
     321<!-- 
     322     <field field_ref="icethic"          name="sithic_max" operation="maximum" /> 
     323     <field field_ref="icethic"          name="sithic_min" operation="minimum" /> 
     324--> 
     325     <field field_ref="fasticepres"      name="fasticepres" /> 
     326     <field field_ref="icevolu"          name="sivolu" /> 
     327     <field field_ref="iceconc"          name="siconc" /> 
     328     <field field_ref="icesalt"          name="sisali" /> 
     329     <field field_ref="iceapnd"          name="siapnd" /> 
     330     <field field_ref="icevpnd"          name="sivpnd" /> 
     331          <field field_ref="iceage"           name="siage"  /> 
     332     <field field_ref="sst_m"            name="sst_m"  /> 
     333     <field field_ref="sss_m"            name="sss_m"  /> 
     334      
     335     <!-- heat --> 
     336     <field field_ref="icetemp"          name="sitemp" /> 
     337     <field field_ref="snwtemp"          name="sntemp" /> 
     338     <field field_ref="icettop"          name="sittop" /> 
     339     <field field_ref="icetbot"          name="sitbot" /> 
     340     <field field_ref="icetsni"          name="sitsni" /> 
     341      
     342     <!-- momentum --> 
     343     <field field_ref="uice"             name="sivelu"  /> 
     344     <field field_ref="vice"             name="sivelv"  /> 
     345     <field field_ref="icevel"           name="sivelo"  /> 
     346     <field field_ref="utau_ai"          name="utau_ai" /> 
     347     <field field_ref="vtau_ai"          name="vtau_ai" /> 
     348     <field field_ref="utau_oi"          name="utau_oi" /> 
     349     <field field_ref="vtau_oi"          name="vtau_oi" /> 
     350      
     351     <!-- rheology --> 
     352     <field field_ref="icediv"           name="sidive"  /> 
     353     <field field_ref="iceshe"           name="sishea"  /> 
     354     <field field_ref="icestr"           name="sistre"  /> 
     355     <field field_ref="normstr"          name="normstr" /> 
     356     <field field_ref="sheastr"          name="sheastr" /> 
     357     <field field_ref="isig1"            name="isig1"   /> 
     358     <field field_ref="isig2"            name="isig2"   /> 
     359     <field field_ref="isig3"            name="isig3"   /> 
     360      
     361     <!-- heat fluxes --> 
     362     <field field_ref="qt_oce_ai"        name="qt_oce_ai"  /> 
     363     <field field_ref="qt_atm_oi"        name="qt_atm_oi"  /> 
     364     <field field_ref="qtr_ice_top"      name="qtr_ice_top"/> 
     365     <field field_ref="qtr_ice_bot"      name="qtr_ice_bot"/> 
     366     <field field_ref="qt_ice"           name="qt_ice"     /> 
     367     <field field_ref="qsr_ice"          name="qsr_ice"    /> 
     368     <field field_ref="qns_ice"          name="qns_ice"    /> 
     369     <field field_ref="qemp_ice"         name="qemp_ice"   /> 
     370     <field field_ref="albedo"           name="albedo"     /> 
     371          <field field_ref="icealb"           name="icealb"     /> 
     372      
     373     <field field_ref="hfxcndtop"        name="hfxcndtop"  /> 
     374     <field field_ref="hfxcndbot"        name="hfxcndbot"  /> 
     375     <field field_ref="hfxsensib"        name="hfxsensib"  /> 
     376 
     377     <field field_ref="icehc"         name="icehc"  /> 
     378     <field field_ref="snwhc"         name="snwhc"  /> 
     379     <field field_ref="hfxbog"        name="hfxbog"  /> 
     380     <field field_ref="hfxbom"        name="hfxbom"  /> 
     381     <field field_ref="hfxsum"        name="hfxsum"  /> 
     382     <field field_ref="hfxopw"        name="hfxopw"  /> 
     383     <field field_ref="hfxdif"        name="hfxdif"  /> 
     384     <field field_ref="hfxsnw"        name="hfxsnw"  /> 
     385     <field field_ref="hfxerr"        name="hfxerr"  /> 
     386     <field field_ref="hfxthd"        name="hfxthd"  /> 
     387     <field field_ref="hfxdyn"        name="hfxdyn"  /> 
     388     <field field_ref="hfxres"        name="hfxres"  /> 
     389     <field field_ref="hfxsub"        name="hfxsub"  /> 
     390     <field field_ref="hfxspr"        name="hfxspr"  /> 
     391 
     392<!-- 
     393     <field field_ref="hfxdhc"        name="hfxbudget"  operation="average" freq_op="1d" > @qt_atm_oi - @qt_oce_ai -@hfxdhc </field> 
     394--> 
     395      
     396     <!-- salt fluxes --> 
     397     <field field_ref="sfxice"           name="sfxice" /> 
     398      
     399     <!-- mass fluxes --> 
     400     <field field_ref="vfxice"           name="vfxice" /> 
     401     <field field_ref="vfxsnw"           name="vfxsnw" /> 
     402 
     403     <field field_ref="vfxbom"           name="vfxbom" /> 
     404     <field field_ref="vfxbog"           name="vfxbog" /> 
     405     <field field_ref="vfxsum"           name="vfxsum" /> 
     406     <field field_ref="vfxopw"           name="vfxopw" /> 
     407     <field field_ref="vfxlam"           name="vfxlam" /> 
     408     <field field_ref="vfxsni"           name="vfxsni" /> 
     409     <field field_ref="vfxdyn"           name="vfxdyn" /> 
     410     <field field_ref="vfxres"           name="vfxres" /> 
     411     <field field_ref="vfxpnd"           name="vfxpnd" /> 
     412     <field field_ref="vfxsub"           name="vfxsub" /> 
     413     <field field_ref="vfxsub_err"       name="vfxsub_err" /> 
     414          <field field_ref="vfxthin"          name="vfxthin" /> 
     415    
     416     <!-- diag error for negative ice volume after advection --> 
     417     <field field_ref="iceneg_pres"      name="sineg_pres" /> 
     418     <field field_ref="iceneg_volu"      name="sineg_volu" /> 
     419     <field field_ref="iceneg_hfx"       name="sineg_hfx"  /> 
     420        </field_group> 
     421 
     422 
     423        <field_group id="myvarICE_cat"        grid_ref="grid_T_ncatice" > 
     424 
     425     <!-- categories --> 
     426     <field field_ref="icemask_cat"      name="simskcat"/> 
     427     <field field_ref="snwthic_cat"      name="snthicat"/> 
     428     <field field_ref="iceconc_cat"      name="siconcat"/> 
     429     <field field_ref="icethic_cat"      name="sithicat"/> 
     430     <field field_ref="icesalt_cat"      name="sisalcat"/> 
     431     <field field_ref="icetemp_cat"      name="sitemcat"/> 
     432     <field field_ref="snwtemp_cat"      name="sntemcat"/> 
     433     <field field_ref="icettop_cat"      name="sitopcat"/> 
     434 
    306435   </field_group>     
    307436 
    308    <field_group id="ICE_globalbudget"  grid_ref="grid_1point" > 
     437   <field_group id="ICE_globalbudget"  grid_ref="grid_scalar" > 
     438     <!-- global contents --> 
    309439        <field field_ref="ibgvol_tot"       name="ibgvol_tot"   /> 
    310440     <field field_ref="sbgvol_tot"       name="sbgvol_tot"   /> 
     
    314444        <field field_ref="sbgheat_tot"      name="sbgheat_tot"  /> 
    315445 
    316         <field field_ref="ibgvolume"        name="ibgvolume"    /> 
     446     <!-- global drifts (conservation checks) --> 
     447     <field field_ref="ibgvolume"        name="ibgvolume"    /> 
    317448        <field field_ref="ibgsaltco"        name="ibgsaltco"    /> 
    318449        <field field_ref="ibgheatco"        name="ibgheatco"    /> 
    319450          <field field_ref="ibgheatfx"        name="ibgheatfx"    /> 
    320451 
     452     <!-- global forcings  --> 
    321453        <field field_ref="ibgfrcvoltop"     name="ibgfrcvoltop" /> 
    322454        <field field_ref="ibgfrcvolbot"     name="ibgfrcvolbot" /> 
     
    335467 
    336468   <!-- SIMIP monthly scalar variables --> 
    337    <field_group id="SImon_scalars"   grid_ref="grid_1point" > 
     469   <field_group id="SImon_scalars"   grid_ref="grid_scalar" > 
    338470          <!-- Integrated quantities --> 
    339471          <field field_ref="NH_iceextt"       name="siextentn"    /> 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/field_def_nemo-oce.xml

    r11363 r11413  
    343343   </field_group> 
    344344    
    345    <!-- scalar variables --> 
    346    <field_group id="SBC_0D"  grid_ref="grid_1point" > 
    347    </field_group> 
    348345 
    349346      </field_group> <!-- SBC --> 
     
    515512      <field id="ahmf_3d"      long_name=" 3D      f-eddy viscosity coefficient"   unit="m2/s or m4/s"  grid_ref="grid_T_3D"/> 
    516513 
    517       <field_group id="scalar"  grid_ref="grid_T_2D"  > 
     514      <field_group id="scalar"  grid_ref="grid_scalar"  > 
    518515         <!-- Need to have a salinity reference climatological file : sali_ref_clim_monthly --> 
    519516        <field id="voltot"     long_name="global total volume"                          standard_name="sea_water_volume"                               unit="m3"   /> 
     
    542539      </field_group> 
    543540       
    544       <!-- variables available with key_float --> 
     541      <!-- variables available with ln_floats --> 
    545542 
    546543      <field_group id="floatvar" grid_ref="grid_T_nfloat"  operation="instant" > 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/field_def_nemo-pisces.xml

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

    r11363 r11413  
    77       </grid> 
    88        <!--  --> 
    9        <grid id="grid_T_3D_ncatice" > 
     9       <grid id="grid_T_ncatice" > 
    1010         <domain id="grid_T" /> 
    1111         <axis id="ncatice" /> 
     
    4949       </grid> 
    5050        <!--  --> 
    51        <grid id="grid_1point" > 
    52          <domain domain_ref="1point"/> 
    53        </grid> 
    54         <!--  --> 
    5551       <grid id="grid_T_nfloat" > 
    5652         <domain id="grid_T" /> 
    5753         <axis id="nfloat" /> 
    5854       </grid> 
     55      <!-- scalars --> 
     56      <grid id="grid_scalar" > 
     57        <scalar/> 
     58      </grid> 
    5959 
    6060       <!-- ABL grid definition --> 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/namelist_ice_ref

    r10911 r11413  
    11!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    2 !! SI3 namelist:   
     2!! SI3 Reference namelist: 
    33!!              1 - Generic parameters                 (nampar) 
    44!!              2 - Ice thickness discretization       (namitd) 
     
    5656   rn_ishlat        =   2.            !  lbc : free slip (0) ; partial slip (0-2) ; no slip (2) ; strong slip (>2) 
    5757   ln_landfast_L16  = .false.         !  landfast: parameterization from Lemieux 2016 
    58    ln_landfast_home = .false.         !  landfast: parameterization from "home made" 
    5958      rn_depfra     =   0.125         !        fraction of ocean depth that ice must reach to initiate landfast 
    6059                                      !          recommended range: [0.1 ; 0.25] - L16=0.125 - home=0.15 
     
    189188   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    190189   ln_iceini_file   = .false.         !  netcdf file provided for initialization (T) or not (F) 
    191    rn_thres_sst     =   2.0           !  max delta temp. above Tfreeze with initial ice = (sst - tfreeze) 
    192    rn_hts_ini_n     =   0.3           !  initial real snow thickness (m), North 
     190   rn_thres_sst     =   2.0           !  max temp. above Tfreeze with initial ice = (sst - tfreeze) 
     191   rn_hti_ini_n     =   3.0           !  initial ice thickness       (m), North 
     192   rn_hti_ini_s     =   1.0           !        "            "             South 
     193   rn_hts_ini_n     =   0.3           !  initial snow thickness      (m), North 
    193194   rn_hts_ini_s     =   0.3           !        "            "             South 
    194    rn_hti_ini_n     =   3.0           !  initial real ice thickness  (m), North 
    195    rn_hti_ini_s     =   1.0           !        "            "             South 
    196195   rn_ati_ini_n     =   0.9           !  initial ice concentration   (-), North 
    197196   rn_ati_ini_s     =   0.9           !        "            "             South 
    198197   rn_smi_ini_n     =   6.3           !  initial ice salinity     (g/kg), North 
    199198   rn_smi_ini_s     =   6.3           !        "            "             South 
    200    rn_tmi_ini_n     = 270.            !  initial ice/snw temperature (K), North 
     199   rn_tmi_ini_n     = 270.            !  initial ice temperature    (K), North 
    201200   rn_tmi_ini_s     = 270.            !        "            "             South 
    202  
     201   rn_tsu_ini_n     = 270.            !  initial surface temperature (K), North 
     202   rn_tsu_ini_s     = 270.            !        "            "             South 
     203   rn_tms_ini_n     = 270.            !  initial snw temperature     (K), North 
     204   rn_tms_ini_s     = 270.            !        "            "             South 
     205   rn_apd_ini_n     =   0.2           !  initial pond fraction       (-), North 
     206   rn_apd_ini_s     =   0.2           !        "            "             South 
     207   rn_hpd_ini_n     =   0.05          !  initial pond depth          (m), North 
     208   rn_hpd_ini_s     =   0.05          !        "            "             South 
     209   !        ! if ln_iceini_file=T 
    203210   sn_hti = 'Ice_initialization'    , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
    204211   sn_hts = 'Ice_initialization'    , -12 ,'hts'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
    205212   sn_ati = 'Ice_initialization'    , -12 ,'ati'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
     213   sn_smi = 'Ice_initialization'    , -12 ,'smi'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
     214   sn_tmi = 'Ice_initialization'    , -12 ,'tmi'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
    206215   sn_tsu = 'Ice_initialization'    , -12 ,'tsu'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
    207    sn_tmi = 'Ice_initialization'    , -12 ,'tmi'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
    208    sn_smi = 'Ice_initialization'    , -12 ,'smi'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
     216   sn_tms = 'NOT USED'              , -12 ,'tms'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
     217   sn_apd = 'NOT USED'              , -12 ,'apd'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
     218   sn_hpd = 'NOT USED'              , -12 ,'hpd'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
    209219   cn_dir='./' 
    210220/ 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/namelist_ref

    r11363 r11413  
    5050      cn_ocerst_indir = "."         !  directory from which to read input ocean restarts 
    5151      cn_ocerst_out   = "restart"   !  suffix of ocean restart name (output) 
    52       cn_ocerst_outdir = "."         !  directory in which to write output ocean restarts 
     52      cn_ocerst_outdir = "."        !  directory in which to write output ocean restarts 
    5353   ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    5454   nn_istate   =       0   !  output the initial state (1) or not (0) 
    5555   ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 
    56    nn_stock    =    5840   !  frequency of creation of a restart file (modulo referenced to 1) 
     56   nn_stock    =       0   !  used only if ln_rst_list = F: output restart freqeuncy (modulo referenced to 1) 
     57      !                          !    =  0 force to write restart files only at the end of the run 
     58      !                          !    = -1 do not do any restart 
    5759   nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    58    nn_write    =    5840   !  frequency of write in the output file   (modulo referenced to nn_it000) 
     60   nn_write    =       0   !  used only if key_iomput is not defined: output frequency (modulo referenced to nn_it000) 
     61      !                          !    =  0 force to write output files only at the end of the run 
     62      !                          !    = -1 do not do any output file 
    5963   ln_mskland  = .false.   !  mask land points in NetCDF outputs 
    6064   ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
     
    195199   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx ) 
    196200   ln_blk      = .false.   !  Bulk formulation                          (T => fill namsbc_blk ) 
    197    ln_abl      = .false.   !  ABL  formulation                          (T => fill namsbc_abl ) 
    198201      !              ! Type of coupling (Ocean/Ice/Atmosphere) : 
    199202   ln_cpl      = .false.   !  atmosphere coupled   formulation          ( requires key_oasis3 ) 
     
    277280   sn_snow     = 'ncar_precip.15JUNE2009_fill',   -1.        , 'SNOW'    ,   .false.   , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc' , ''       , '' 
    278281   sn_slp      = 'slp.15JUNE2009_fill'        ,    6.        , 'SLP'     ,   .false.   , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc' , ''       , '' 
    279    sn_hpgi     = 'NOT USED'                   ,   24.        , 'xxx'  ,   .false.   , .true. , 'yearly'  , '' , ''       , '' 
    280    sn_hpgj     = 'NOT USED'                   ,   24.        , 'xxx'  ,   .false.   , .true. , 'yearly'  , '' , ''       , '' 
    281 / 
    282 !----------------------------------------------------------------------- 
    283 &namsbc_abl    !   Atmospheric Boundary Layer formulation           (ln_abl = T) 
    284 !----------------------------------------------------------------------- 
    285    cn_dir         = './'      !  root directory for the location of the ABL grid file 
    286    cn_dom         = 'dom_cfg_abl.nc' 
    287    ln_hpgls_frc   = .false. 
    288    ln_geos_winds  = .false. 
    289    nn_dyn_restore = 1 
    290    rn_ldyn_min   =  16.       !  magnitude of the nudging on ABL dynamics at the bottom of the ABL   [hour] 
    291    rn_ldyn_max   =  1.6       !  magnitude of the nudging on ABL dynamics at the top of the ABL   [hour] 
    292    rn_ltra_min   =  16.       !  magnitude of the nudging on ABL tracers  at the bottom of the ABL   [hour] 
    293    rn_ltra_max   =  1.6       !  magnitude of the nudging on ABL tracers  at the top of the ABL   [hour] 
    294    nn_amxl        = 0         ! mixing length: = 0 Deardorff 80 length-scale 
    295                               !                = 1 length-scale based on the distance to the PBL height 
    296                               !                = 2 Bougeault & Lacarrere 89 length-scale 
    297    rn_Cm         = 0.0667     ! 0.126 in MesoNH 
    298    rn_Ct         = 0.1667     ! 0.143 in MesoNH 
    299    rn_Ce         = 0.4        ! 0.4   in MesoNH 
    300    rn_Ceps       = 0.7        ! 0.85  in MesoNH 
    301    rn_Rod        = 0.15       ! c0 in RMCA17 mixing length formulation (not yet implemented) 
    302    rn_Ric        = 0.139      !  Critical Richardson number (to compute PBL height and diffusivities) 
    303    ln_smth_pblh  = .false.   !  Smoothing of PBL height with a 2d Hanning filter 
    304282/ 
    305283!----------------------------------------------------------------------- 
     
    589567!----------------------------------------------------------------------- 
    590568   ln_tide     = .false.      ! Activate tides 
    591    ln_tide_pot   = .true.                !  use tidal potential forcing 
    592    ln_scal_load  = .false.               ! Use scalar approximation for  
    593    ln_read_load  = .false.               ! Or read load potential from file 
    594    cn_tide_load  = 'tide_LOAD_grid_T.nc'  ! filename for load potential      
    595    ln_tide_ramp  = .false.               !  Use linear ramp for tides at startup 
    596    rn_scal_load  = 0.094               !     load potential  
    597    rdttideramp   =    0.                 !  ramp duration in days 
    598    clname        = 'FOUR'               !  name of constituent - all tidal components must be set in namelist_cfg 
     569      ln_tide_pot   = .false.               !  use tidal potential forcing 
     570         ln_scal_load  = .false.               ! Use scalar approximation for 
     571            rn_scal_load = 0.094               !     load potential 
     572         ln_read_load  = .false.               ! Or read load potential from file 
     573            cn_tide_load = 'tide_LOAD_grid_T.nc'  ! filename for load potential 
     574            !       
     575      ln_tide_ramp  = .false.               !  Use linear ramp for tides at startup 
     576         rdttideramp   =    0.                 !  ramp duration in days 
     577      clname(1)     = 'DUMMY'               !  name of constituent - all tidal components must be set in namelist_cfg 
    599578/ 
    600579!----------------------------------------------------------------------- 
     
    876855   rn_lf_cutoff  =  5.0             !  cutoff frequency for low-pass filter  [days] 
    877856   rn_zdef_max   =  0.9             !  maximum fractional e3t deformation 
    878    ln_vvl_dbg    = .true.           !  debug prints    (T/F) 
     857   ln_vvl_dbg    = .false.          !  debug prints    (T/F) 
    879858/ 
    880859!----------------------------------------------------------------------- 
     
    11271106!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    11281107!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    1129 !!   namflo       float parameters                                      ("key_float") 
    1130 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    1131 !!   namdct       transports through some sections                      ("key_diadct") 
     1108!!   namflo       float parameters                                      (default: OFF) 
     1109!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     1110!!   nam_diadct   transports through some sections                      (default: OFF) 
    11321111!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    11331112!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
     
    11641143&namhsb        !  Heat and salt budgets                                 (default: OFF) 
    11651144!----------------------------------------------------------------------- 
    1166    ln_diahsb   = .false.   !  check the heat and salt budgets (T) or not (F) 
     1145   ln_diahsb   = .false.   !  output the heat and salt budgets (T) or not (F) 
    11671146/ 
    11681147!----------------------------------------------------------------------- 
     
    11731152/ 
    11741153!----------------------------------------------------------------------- 
    1175 &namflo        !   float parameters                                     ("key_float") 
    1176 !----------------------------------------------------------------------- 
    1177    jpnfl       = 1         !  total number of floats during the run 
    1178    jpnnewflo   = 0         !  number of floats for the restart 
    1179    ln_rstflo   = .false.   !  float restart (T) or not (F) 
    1180    nn_writefl  =      75   !  frequency of writing in float output file 
    1181    nn_stockfl  =    5475   !  frequency of creation of the float restart file 
    1182    ln_argo     = .false.   !  Argo type floats (stay at the surface each 10 days) 
    1183    ln_flork4   = .false.   !  trajectories computed with a 4th order Runge-Kutta (T) 
    1184    !                       !  or computed with Blanke' scheme (F) 
    1185    ln_ariane   = .true.    !  Input with Ariane tool convention(T) 
    1186    ln_flo_ascii = .true.    !  Output with Ariane tool netcdf convention(F) or ascii file (T) 
    1187 / 
    1188 !----------------------------------------------------------------------- 
    1189 &nam_diaharm   !   Harmonic analysis of tidal constituents              ("key_diaharm") 
    1190 !----------------------------------------------------------------------- 
    1191     nit000_han = 1         ! First time step used for harmonic analysis 
    1192     nitend_han = 75        ! Last time step used for harmonic analysis 
    1193     nstep_han  = 15        ! Time step frequency for harmonic analysis 
    1194     tname(1)   = 'M2'      ! Name of tidal constituents 
    1195     tname(2)   = 'K1' 
    1196 / 
    1197 !----------------------------------------------------------------------- 
    1198 &namdct        ! transports through some sections                       ("key_diadct") 
    1199 !----------------------------------------------------------------------- 
    1200     nn_dct     = 15        !  time step frequency for transports computing 
    1201     nn_dctwri  = 15        !  time step frequency for transports writing 
    1202     nn_secdebug = 112       !      0 : no section to debug 
    1203     !                      !     -1 : debug all section 
    1204     !                      !  0 < n : debug section number n 
     1154&namflo        !   float parameters                                     (default: OFF) 
     1155!----------------------------------------------------------------------- 
     1156   ln_floats   = .false.      ! activate floats or not 
     1157      jpnfl       = 1         !    total number of floats during the run 
     1158      jpnnewflo   = 0         !    number of floats for the restart 
     1159      ln_rstflo   = .false.   !    float restart (T) or not (F) 
     1160      nn_writefl  =      75   !    frequency of writing in float output file 
     1161      nn_stockfl  =    5475   !    frequency of creation of the float restart file 
     1162      ln_argo     = .false.   !    Argo type floats (stay at the surface each 10 days) 
     1163      ln_flork4   = .false.   !    trajectories computed with a 4th order Runge-Kutta (T) 
     1164      !                       !    or computed with Blanke' scheme (F) 
     1165      ln_ariane   = .true.    !    Input with Ariane tool convention(T) 
     1166      ln_flo_ascii= .true.    !    Output with Ariane tool netcdf convention(F) or ascii file (T) 
     1167/ 
     1168!----------------------------------------------------------------------- 
     1169&nam_diaharm   !   Harmonic analysis of tidal constituents              (default: OFF) 
     1170!----------------------------------------------------------------------- 
     1171    ln_diaharm = .false.   ! Choose tidal harmonic output or not 
     1172       nit000_han = 1      !    First time step used for harmonic analysis 
     1173       nitend_han = 75     !    Last time step used for harmonic analysis 
     1174       nstep_han  = 15     !    Time step frequency for harmonic analysis 
     1175       tname(1)   = 'M2'   !    Name of tidal constituents 
     1176       tname(2)   = 'K1'   !              --- 
     1177/ 
     1178!----------------------------------------------------------------------- 
     1179&nam_diadct    !   transports through some sections                     (default: OFF) 
     1180!----------------------------------------------------------------------- 
     1181    ln_diadct  = .false.   ! Calculate transport thru sections or not 
     1182       nn_dct     = 15     !  time step frequency for transports computing 
     1183       nn_dctwri  = 15     !  time step frequency for transports writing 
     1184       nn_secdebug = 112   !      0 : no section to debug 
     1185       !                   !     -1 : debug all section 
     1186       !                   !  0 < n : debug section number n 
    12051187/ 
    12061188!----------------------------------------------------------------------- 
     
    13201302&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    13211303!----------------------------------------------------------------------- 
    1322    cn_mpi_send =  'I'      !  mpi send/recieve type   ='S', 'B', or 'I' for standard send, 
    1323    !                       !  buffer blocking send or immediate non-blocking sends, resp. 
    1324    nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation 
     1304   ln_listonly =  .false.  !  do nothing else than listing the best domain decompositions (with land domains suppression) 
     1305   !                       !  if T: the largest number of cores tested is defined by max(mppsize, jpni*jpnj) 
    13251306   ln_nnogather =  .true.  !  activate code to avoid mpi_allgather use at the northfold 
    1326    jpni        =   0       !  jpni   number of processors following i (set automatically if < 1) 
    1327    jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1) 
     1307   jpni        =   0       !  number of processors following i (set automatically if < 1), see also ln_listonly = T 
     1308   jpnj        =   0       !  number of processors following j (set automatically if < 1), see also ln_listonly = T 
    13281309/ 
    13291310!----------------------------------------------------------------------- 
     
    13321313   ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 
    13331314     sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    1334        sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
     1315       sn_cfctl%l_runstat = .TRUE. ! switches and which areas produce reports with the proc integer settings. 
    13351316       sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
    13361317       sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SPITZ12/EXPREF/file_def_nemo-ice.xml

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

    r9572 r11413  
    8181        <file id="file15" name_suffix="_scalar" description="scalar variables" > 
    8282          <!-- global drifts (conservation checks) --> 
    83           <field field_ref="bgtemper"     grid_ref="grid_1point"   name="bgtemper"    /> 
    84           <field field_ref="bgsaline"     grid_ref="grid_1point"   name="bgsaline"    /> 
    85           <field field_ref="bgheatco"     grid_ref="grid_1point"   name="bgheatco"    /> 
    86           <field field_ref="bgheatfx"     grid_ref="grid_1point"   name="bgheatfx"    /> 
    87           <field field_ref="bgsaltco"     grid_ref="grid_1point"   name="bgsaltco"    /> 
    88           <field field_ref="bgvolssh"     grid_ref="grid_1point"   name="bgvolssh"    /> 
    89           <field field_ref="bgvole3t"     grid_ref="grid_1point"   name="bgvole3t"    /> 
     83          <field field_ref="bgtemper"     name="bgtemper"    /> 
     84          <field field_ref="bgsaline"     name="bgsaline"    /> 
     85          <field field_ref="bgheatco"     name="bgheatco"    /> 
     86          <field field_ref="bgheatfx"     name="bgheatfx"    /> 
     87          <field field_ref="bgsaltco"     name="bgsaltco"    /> 
     88          <field field_ref="bgvolssh"     name="bgvolssh"    /> 
     89          <field field_ref="bgvole3t"     name="bgvole3t"    /> 
    9090 
    9191          <!-- global surface forcings  --> 
    92           <field field_ref="bgfrcvol"     grid_ref="grid_1point"   name="bgfrcvol"    /> 
    93           <field field_ref="bgfrctem"     grid_ref="grid_1point"   name="bgfrctem"    /> 
    94           <field field_ref="bgfrchfx"     grid_ref="grid_1point"   name="bgfrchfx"    /> 
    95           <field field_ref="bgfrcsal"     grid_ref="grid_1point"   name="bgfrcsal"    /> 
     92          <field field_ref="bgfrcvol"     name="bgfrcvol"    /> 
     93          <field field_ref="bgfrctem"     name="bgfrctem"    /> 
     94          <field field_ref="bgfrchfx"     name="bgfrchfx"    /> 
     95          <field field_ref="bgfrcsal"     name="bgfrcsal"    /> 
    9696        </file> 
    9797 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SPITZ12/EXPREF/namelist_cfg

    r11275 r11413  
    351351!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    352352!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    353 !!   namflo       float parameters                                      ("key_float") 
    354 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    355 !!   namdct       transports through some sections                      ("key_diadct") 
     353!!   namflo       float parameters                                      (default: OFF) 
     354!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     355!!   nam_diadct   transports through some sections                      (default: OFF) 
    356356!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    357357!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ref_cfgs.txt

    r11306 r11413  
    99ORCA2_ICE_PISCES OCE TOP ICE NST 
    1010ORCA2_ICE_ABL OCE ICE ABL 
     11ORCA2_SAS_ICE_ABL OCE SAS ICE ABL 
     12ORCA2_ICE OCE ICE 
    1113SPITZ12 OCE ICE 
     14eORCA025_ICE OCE ICE 
     15eORCA025_ICE_ABL OCE ICE ABL 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/ice.F90

    r10882 r11413  
    102102   !! vt_i        |      -      |    Total ice vol. per unit area | m     | 
    103103   !! vt_s        |      -      |    Total snow vol. per unit ar. | m     | 
     104   !! st_i        |      -      |    Total Sea ice salt content   | pss.m | 
    104105   !! sm_i        |      -      |    Mean sea ice salinity        | pss   | 
    105106   !! tm_i        |      -      |    Mean sea ice temperature     | K     | 
     
    135136   REAL(wp), PUBLIC ::   rn_ishlat        !: lateral boundary condition for sea-ice 
    136137   LOGICAL , PUBLIC ::   ln_landfast_L16  !: landfast ice parameterizationfrom lemieux2016  
    137    LOGICAL , PUBLIC ::   ln_landfast_home !: landfast ice parameterizationfrom home made  
    138138   REAL(wp), PUBLIC ::   rn_depfra        !:    fraction of ocean depth that ice must reach to initiate landfast ice 
    139139   REAL(wp), PUBLIC ::   rn_icebfr        !:    maximum bottom stress per unit area of contact (lemieux2016) or per unit volume (home)  
     
    213213   REAL(wp), PUBLIC, PARAMETER ::   epsi20 = 1.e-20_wp  !: small number  
    214214 
    215    !                                     !!** some other parameters for advection using the ULTIMATE-MACHO scheme 
    216    LOGICAL, PUBLIC, DIMENSION(2) :: l_split_advumx = .FALSE.    ! force one iteration at the first time-step 
    217  
    218215   !                                     !!** define arrays 
    219216   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   u_oce,v_oce !: surface ocean velocity used in ice dynamics 
     
    251248   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_res     !: mass flux from residual component of wfx_ice             [kg.m-2.s-1] 
    252249   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_err_sub !: mass flux error after sublimation                        [kg.m-2.s-1] 
    253  
    254    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_tot     !: ice concentration tendency (total)        [s-1] 
    255250 
    256251   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_bog     !: salt flux due to ice bottom growth                   [pss.kg.m-2.s-1 => g.m-2.s-1] 
     
    309304   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   u_ice, v_ice !: components of the ice velocity                          (m/s) 
    310305   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   vt_i , vt_s  !: ice and snow total volume per unit area                 (m) 
     306   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   st_i         !: Total ice salinity content                              (pss.m) 
    311307   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   at_i         !: ice total fractional area (ice concentration) 
    312308   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ato_i        !: =1-at_i ; total open water fractional area 
     
    409405         &      wfx_bog    (jpi,jpj) , wfx_dyn   (jpi,jpj) , wfx_bom(jpi,jpj) , wfx_sum(jpi,jpj) ,           & 
    410406         &      wfx_res    (jpi,jpj) , wfx_sni   (jpi,jpj) , wfx_opw(jpi,jpj) , wfx_spr(jpi,jpj) ,           & 
    411          &      afx_tot    (jpi,jpj) , rn_amax_2d(jpi,jpj),                                                  & 
     407         &      rn_amax_2d (jpi,jpj) ,                                                                       & 
    412408         &      qsb_ice_bot(jpi,jpj) , qlead     (jpi,jpj) ,                                                 & 
    413409         &      sfx_res    (jpi,jpj) , sfx_bri   (jpi,jpj) , sfx_dyn(jpi,jpj) , sfx_sub(jpi,jpj) , sfx_lam(jpi,jpj) ,  & 
     
    429425      ii = ii + 1 
    430426      ALLOCATE( u_ice(jpi,jpj) , v_ice(jpi,jpj) ,                                   & 
    431          &      vt_i (jpi,jpj) , vt_s (jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) ,  & 
    432          &      et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s (jpi,jpj) ,  & 
    433          &      sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s (jpi,jpj) ,  & 
     427         &      vt_i (jpi,jpj) , vt_s (jpi,jpj) , st_i(jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) ,  & 
     428         &      et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s(jpi,jpj) ,  & 
     429         &      sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s(jpi,jpj) ,  & 
    434430         &      om_i (jpi,jpj) , bvm_i(jpi,jpj) , tau_icebfr(jpi,jpj)            , STAT=ierr(ii) ) 
    435431 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icecor.F90

    r10994 r11413  
    1717   USE phycst         ! physical constants 
    1818   USE ice            ! sea-ice: variable 
    19    USE ice1D          ! sea-ice: thermodynamic sea-ice variables 
     19   USE ice1D          ! sea-ice: thermodynamic variables 
    2020   USE iceitd         ! sea-ice: rebining 
    2121   USE icevar         ! sea-ice: operations 
     
    7878      !                             !----------------------------------------------------- 
    7979      at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) 
    80       DO jl  = 1, jpl 
     80      DO jl = 1, jpl 
    8181         WHERE( at_i(:,:) > rn_amax_2d(:,:) )   a_i(:,:,jl) = a_i(:,:,jl) * rn_amax_2d(:,:) / at_i(:,:) 
    8282      END DO 
     
    8484      !                             !----------------------------------------------------- 
    8585      IF ( nn_icesal == 2 ) THEN    !  salinity must stay in bounds [Simin,Simax]        ! 
    86       !                             !----------------------------------------------------- 
     86         !                          !----------------------------------------------------- 
    8787         zzc = rhoi * r1_rdtice 
    8888         DO jl = 1, jpl 
     
    117117            END DO 
    118118         END DO 
    119          CALL lbc_lnk_multi( 'icecor', u_ice, 'U', -1., v_ice, 'V', -1. )            ! lateral boundary conditions 
     119         CALL lbc_lnk_multi( 'icecor', u_ice, 'U', -1., v_ice, 'V', -1. ) 
    120120      ENDIF 
    121121 
    122 !!gm I guess the trends are only out on demand  
    123 !!   So please, only do this is it exite an iom_use of on a these variables 
    124 !!   furthermore, only allocate the diag_ arrays in this case  
    125 !!   and do the iom_put here so that it is only a local allocation 
    126 !!gm  
    127122      !                             !----------------------------------------------------- 
    128123      SELECT CASE( kn )             !  Diagnostics                                       ! 
     
    130125      CASE( 1 )                        !--- dyn trend diagnostics 
    131126         ! 
    132 !!gm   here I think the number of ice cat is too small to use a SUM instruction... 
    133          DO jj = 1, jpj 
    134             DO ji = 1, jpi             
    135                !                 ! heat content variation (W.m-2) 
    136                diag_heat(ji,jj) = - (  SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) )    &  
    137                   &                  + SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) )  ) * r1_rdtice 
    138                !                 ! salt, volume 
    139                diag_sice(ji,jj) = SUM( sv_i(ji,jj,:) - sv_i_b(ji,jj,:) ) * rhoi * r1_rdtice 
    140                diag_vice(ji,jj) = SUM( v_i (ji,jj,:) - v_i_b (ji,jj,:) ) * rhoi * r1_rdtice 
    141                diag_vsnw(ji,jj) = SUM( v_s (ji,jj,:) - v_s_b (ji,jj,:) ) * rhos * r1_rdtice 
    142             END DO 
    143          END DO 
     127         IF( ln_icediachk .OR. iom_use('hfxdhc') ) THEN 
     128            diag_heat(:,:) = - SUM(SUM( e_i (:,:,1:nlay_i,:) - e_i_b (:,:,1:nlay_i,:), dim=4 ), dim=3 ) * r1_rdtice &      ! W.m-2 
     129               &             - SUM(SUM( e_s (:,:,1:nlay_s,:) - e_s_b (:,:,1:nlay_s,:), dim=4 ), dim=3 ) * r1_rdtice 
     130            diag_sice(:,:) =   SUM(     sv_i(:,:,:)          - sv_i_b(:,:,:)                  , dim=3 ) * r1_rdtice * rhoi 
     131            diag_vice(:,:) =   SUM(     v_i (:,:,:)          - v_i_b (:,:,:)                  , dim=3 ) * r1_rdtice * rhoi 
     132            diag_vsnw(:,:) =   SUM(     v_s (:,:,:)          - v_s_b (:,:,:)                  , dim=3 ) * r1_rdtice * rhos 
     133         ENDIF 
    144134         !                       ! concentration tendency (dynamics) 
    145          zafx   (:,:) = SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice  
    146          afx_tot(:,:) = zafx(:,:) 
    147          IF( iom_use('afxdyn') )   CALL iom_put( 'afxdyn' , zafx(:,:) ) 
     135         IF( iom_use('afxdyn') .OR. iom_use('afxthd') .OR. iom_use('afxtot') ) THEN  
     136            zafx(:,:) = SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice  
     137            CALL iom_put( 'afxdyn' , zafx ) 
     138         ENDIF 
    148139         ! 
    149140      CASE( 2 )                        !--- thermo trend diagnostics & ice aging 
     
    151142         oa_i(:,:,:) = oa_i(:,:,:) + a_i(:,:,:) * rdt_ice   ! ice natural aging incrementation 
    152143         ! 
    153 !!gm   here I think the number of ice cat is too small to use a SUM instruction... 
    154          DO jj = 1, jpj 
    155             DO ji = 1, jpi             
    156                !                 ! heat content variation (W.m-2) 
    157                diag_heat(ji,jj) = diag_heat(ji,jj) - (  SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) )    &  
    158                   &                                   + SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) )  ) * r1_rdtice 
    159                !                 ! salt, volume 
    160                diag_sice(ji,jj) = diag_sice(ji,jj) + SUM( sv_i(ji,jj,:) - sv_i_b(ji,jj,:) ) * rhoi * r1_rdtice 
    161                diag_vice(ji,jj) = diag_vice(ji,jj) + SUM( v_i (ji,jj,:) - v_i_b (ji,jj,:) ) * rhoi * r1_rdtice 
    162                diag_vsnw(ji,jj) = diag_vsnw(ji,jj) + SUM( v_s (ji,jj,:) - v_s_b (ji,jj,:) ) * rhos * r1_rdtice 
    163             END DO 
    164          END DO 
     144         IF( ln_icediachk .OR. iom_use('hfxdhc') ) THEN 
     145            diag_heat(:,:) = diag_heat(:,:) & 
     146               &             - SUM(SUM( e_i (:,:,1:nlay_i,:) - e_i_b (:,:,1:nlay_i,:), dim=4 ), dim=3 ) * r1_rdtice & 
     147               &             - SUM(SUM( e_s (:,:,1:nlay_s,:) - e_s_b (:,:,1:nlay_s,:), dim=4 ), dim=3 ) * r1_rdtice 
     148            diag_sice(:,:) = diag_sice(:,:) & 
     149               &             + SUM(     sv_i(:,:,:)          - sv_i_b(:,:,:)                  , dim=3 ) * r1_rdtice * rhoi 
     150            diag_vice(:,:) = diag_vice(:,:) & 
     151               &             + SUM(     v_i (:,:,:)          - v_i_b (:,:,:)                  , dim=3 ) * r1_rdtice * rhoi 
     152            diag_vsnw(:,:) = diag_vsnw(:,:) & 
     153               &             + SUM(     v_s (:,:,:)          - v_s_b (:,:,:)                  , dim=3 ) * r1_rdtice * rhos 
     154            CALL iom_put ( 'hfxdhc' , diag_heat )  
     155         ENDIF 
    165156         !                       ! concentration tendency (total + thermo) 
    166          zafx   (:,:) = SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice 
    167          afx_tot(:,:) = afx_tot(:,:) + zafx(:,:) 
    168          IF( iom_use('afxthd') )   CALL iom_put( 'afxthd' , zafx(:,:) ) 
    169          IF( iom_use('afxtot') )   CALL iom_put( 'afxtot' , afx_tot(:,:) ) 
     157         IF( iom_use('afxdyn') .OR. iom_use('afxthd') .OR. iom_use('afxtot') ) THEN  
     158            zafx(:,:) = zafx(:,:) + SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice 
     159            CALL iom_put( 'afxthd' , SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice ) 
     160            CALL iom_put( 'afxtot' , zafx ) 
     161         ENDIF 
    170162         ! 
    171163      END SELECT 
     
    174166      IF( ln_icediachk   )   CALL ice_cons_hsm(1, 'icecor', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    175167      IF( ln_ctl         )   CALL ice_prt3D   ('icecor')                                                             ! prints 
    176       IF( ln_icectl .AND. kn == 2 )   CALL ice_prt( kt, iiceprt, jiceprt, 2, ' - Final state - ' )                   ! prints 
     168      IF( ln_icectl .AND. kn == 2 ) & 
     169         &                   CALL ice_prt     ( kt, iiceprt, jiceprt, 2, ' - Final state - ' )                       ! prints 
    177170      IF( ln_timing      )   CALL timing_stop ('icecor')                                                             ! timing 
    178171      ! 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icectl.F90

    r10994 r11413  
    157157            ! check conservation issues 
    158158            IF ( ABS( zv ) > zv_sill )   WRITE(numout,*) 'violation volume [Mt/day]     (',cd_routine,') = ',zv 
    159             IF ( ABS( zs ) > zs_sill )   WRITE(numout,*) 'violation saline [psu*Mt/day] (',cd_routine,') = ',zs 
     159            IF ( ABS( zs ) > zs_sill )   WRITE(numout,*) 'violation saline [Mkg/day]    (',cd_routine,') = ',zs 
    160160            IF ( ABS( zt ) > zt_sill )   WRITE(numout,*) 'violation enthalpy [GW]       (',cd_routine,') = ',zt 
    161161            ! check maximum ice concentration 
     
    218218      IF(lwp) THEN 
    219219         IF( ABS( zvfx ) > zv_sill )   WRITE(numout,*) 'violation vfx  [Mt/day]       (',cd_routine,') = ',zvfx 
    220          IF( ABS( zsfx ) > zs_sill )   WRITE(numout,*) 'violation sfx  [psu*Mt/day]   (',cd_routine,') = ',zsfx 
     220         IF( ABS( zsfx ) > zs_sill )   WRITE(numout,*) 'violation sfx  [Mkg/day]      (',cd_routine,') = ',zsfx 
    221221         !!IF( ABS( zhfx ) > zt_sill )   WRITE(numout,*) 'violation hfx  [GW]           (',cd_routine,') = ',zhfx 
    222222      ENDIF 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedia.F90

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

    r11348 r11413  
    163163            END DO 
    164164            CALL lbc_lnk( 'icedyn', zdivu_i, 'T', 1. ) 
    165             CALL iom_put( "icediv" , zdivu_i(:,:) ) 
     165            ! output 
     166            CALL iom_put( 'icediv' , zdivu_i ) 
     167 
    166168            DEALLOCATE( zdivu_i ) 
    167169 
     
    219221      NAMELIST/namdyn/ ln_dynALL, ln_dynRHGADV, ln_dynADV1D, ln_dynADV2D, rn_uice, rn_vice,  & 
    220222         &             rn_ishlat ,                                                           & 
    221          &             ln_landfast_L16, ln_landfast_home, rn_depfra, rn_icebfr, rn_lfrelax, rn_tensile 
     223         &             ln_landfast_L16, rn_depfra, rn_icebfr, rn_lfrelax, rn_tensile 
    222224      !!------------------------------------------------------------------- 
    223225      ! 
     
    242244         WRITE(numout,*) '      lateral boundary condition for sea ice dynamics        rn_ishlat       = ', rn_ishlat 
    243245         WRITE(numout,*) '      Landfast: param from Lemieux 2016                      ln_landfast_L16 = ', ln_landfast_L16 
    244          WRITE(numout,*) '      Landfast: param from home made                         ln_landfast_home= ', ln_landfast_home 
    245246         WRITE(numout,*) '         fraction of ocean depth that ice must reach         rn_depfra       = ', rn_depfra 
    246247         WRITE(numout,*) '         maximum bottom stress per unit area of contact      rn_icebfr       = ', rn_icebfr 
     
    269270      ENDIF 
    270271      !                                      !--- Landfast ice 
    271       IF( .NOT.ln_landfast_L16 .AND. .NOT.ln_landfast_home )   tau_icebfr(:,:) = 0._wp 
    272       ! 
    273       IF ( ln_landfast_L16 .AND. ln_landfast_home ) THEN 
    274          CALL ctl_stop( 'ice_dyn_init: choose one and only one landfast parameterization (ln_landfast_L16 or ln_landfast_home)' ) 
    275       ENDIF 
     272      IF( .NOT.ln_landfast_L16 )   tau_icebfr(:,:) = 0._wp 
    276273      ! 
    277274      CALL ice_dyn_rdgrft_init          ! set ice ridging/rafting parameters 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn_adv.F90

    r11348 r11413  
    100100      diag_trp_vi(:,:) = SUM(     v_i (:,:,:)          - v_i_b (:,:,:)                  , dim=3 ) * r1_rdtice 
    101101      diag_trp_vs(:,:) = SUM(     v_s (:,:,:)          - v_s_b (:,:,:)                  , dim=3 ) * r1_rdtice 
    102       IF( iom_use('icemtrp') )   CALL iom_put( "icemtrp" , diag_trp_vi * rhoi          )   ! ice mass transport 
    103       IF( iom_use('snwmtrp') )   CALL iom_put( "snwmtrp" , diag_trp_vs * rhos          )   ! snw mass transport 
    104       IF( iom_use('salmtrp') )   CALL iom_put( "salmtrp" , diag_trp_sv * rhoi * 1.e-03 )   ! salt mass transport (kg/m2/s) 
    105       IF( iom_use('dihctrp') )   CALL iom_put( "dihctrp" , -diag_trp_ei                )   ! advected ice heat content (W/m2) 
    106       IF( iom_use('dshctrp') )   CALL iom_put( "dshctrp" , -diag_trp_es                )   ! advected snw heat content (W/m2) 
     102      IF( iom_use('icemtrp') )   CALL iom_put( 'icemtrp' , diag_trp_vi * rhoi          )   ! ice mass transport 
     103      IF( iom_use('snwmtrp') )   CALL iom_put( 'snwmtrp' , diag_trp_vs * rhos          )   ! snw mass transport 
     104      IF( iom_use('salmtrp') )   CALL iom_put( 'salmtrp' , diag_trp_sv * rhoi * 1.e-03 )   ! salt mass transport (kg/m2/s) 
     105      IF( iom_use('dihctrp') )   CALL iom_put( 'dihctrp' , -diag_trp_ei                 )   ! advected ice heat content (W/m2) 
     106      IF( iom_use('dshctrp') )   CALL iom_put( 'dshctrp' , -diag_trp_es                 )   ! advected snw heat content (W/m2) 
    107107 
    108108      ! controls 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn_rhg.F90

    r11348 r11413  
    6969         WRITE(numout,*)'ice_dyn_rhg: sea-ice rheology' 
    7070         WRITE(numout,*)'~~~~~~~~~~~' 
    71       ENDIF 
    72       ! 
    73       IF( ln_landfast_home ) THEN      !-- Landfast ice parameterization 
    74          tau_icebfr(:,:) = 0._wp 
    75          DO jl = 1, jpl 
    76             WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_depfra )   tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr 
    77          END DO 
    7871      ENDIF 
    7972      ! 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn_rhg_evp.F90

    r10891 r11413  
    112112      REAL(wp), DIMENSION(:,:), INTENT(  out) ::   pshear_i  , pdivu_i   , pdelta_i      ! 
    113113      !! 
    114       LOGICAL, PARAMETER ::   ll_bdy_substep = .TRUE. ! temporary option to call bdy at each sub-time step (T) 
    115       !                                                                              or only at the main time step (F) 
    116114      INTEGER ::   ji, jj       ! dummy loop indices 
    117115      INTEGER ::   jter         ! local integers 
     
    137135      ! 
    138136      REAL(wp), DIMENSION(jpi,jpj) ::   zdt_m                           ! (dt / ice-snow_mass) on T points 
    139       REAL(wp), DIMENSION(jpi,jpj) ::   zaU   , zaV                     ! ice fraction on U/V points 
     137      REAL(wp), DIMENSION(jpi,jpj) ::   zaU  , zaV                      ! ice fraction on U/V points 
    140138      REAL(wp), DIMENSION(jpi,jpj) ::   zmU_t, zmV_t                    ! (ice-snow_mass / dt) on U/V points 
    141139      REAL(wp), DIMENSION(jpi,jpj) ::   zmf                             ! coriolis parameter at T points 
    142       REAL(wp), DIMENSION(jpi,jpj) ::   zTauU_ia , ztauV_ia             ! ice-atm. stress at U-V points 
    143       REAL(wp), DIMENSION(jpi,jpj) ::   zTauU_ib , ztauV_ib             ! ice-bottom stress at U-V points (landfast param) 
    144       REAL(wp), DIMENSION(jpi,jpj) ::   zspgU , zspgV                   ! surface pressure gradient at U/V points 
    145140      REAL(wp), DIMENSION(jpi,jpj) ::   v_oceU, u_oceV, v_iceU, u_iceV  ! ocean/ice u/v component on V/U points                            
    146       REAL(wp), DIMENSION(jpi,jpj) ::   zfU   , zfV                     ! internal stresses 
    147141      ! 
    148142      REAL(wp), DIMENSION(jpi,jpj) ::   zds                             ! shear 
     
    152146      !                                                                 !    ocean surface (ssh_m) if ice is not embedded 
    153147      !                                                                 !    ice bottom surface if ice is embedded    
    154       REAL(wp), DIMENSION(jpi,jpj) ::   zCorx, zCory                    ! Coriolis stress array 
    155       REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_oi, ztauy_oi              ! Ocean-to-ice stress array 
    156       ! 
    157       REAL(wp), DIMENSION(jpi,jpj) ::   zswitchU, zswitchV              ! dummy arrays 
    158       REAL(wp), DIMENSION(jpi,jpj) ::   zmaskU, zmaskV                  ! mask for ice presence 
     148      REAL(wp), DIMENSION(jpi,jpj) ::   zfU  , zfV                      ! internal stresses 
     149      REAL(wp), DIMENSION(jpi,jpj) ::   zspgU, zspgV                    ! surface pressure gradient at U/V points 
     150      REAL(wp), DIMENSION(jpi,jpj) ::   zCorU, zCorV                    ! Coriolis stress array 
     151      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_ai, ztauy_ai              ! ice-atm. stress at U-V points 
     152      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_oi, ztauy_oi              ! ice-ocean stress at U-V points 
     153      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_bi, ztauy_bi              ! ice-OceanBottom stress at U-V points (landfast) 
     154      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_base, ztauy_base          ! ice-bottom stress at U-V points (landfast) 
     155      ! 
     156      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk01x, zmsk01y                ! dummy arrays 
     157      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00x, zmsk00y                ! mask for ice presence 
    159158      REAL(wp), DIMENSION(jpi,jpj) ::   zfmask, zwf                     ! mask at F points for the ice 
    160159 
     
    163162      REAL(wp), PARAMETER          ::   zamin  = 0.001_wp               ! ice concentration below which ice velocity becomes very small 
    164163      !! --- diags 
    165       REAL(wp), DIMENSION(jpi,jpj) ::   zswi 
     164      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00 
    166165      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zsig1, zsig2, zsig3 
    167166      !! --- SIMIP diags 
    168       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_sig1      ! Average normal stress in sea ice    
    169       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_sig2      ! Maximum shear stress in sea ice 
    170       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_dssh_dx   ! X-direction sea-surface tilt term (N/m2) 
    171       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_dssh_dy   ! X-direction sea-surface tilt term (N/m2) 
    172       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_corstrx   ! X-direction coriolis stress (N/m2) 
    173       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_corstry   ! Y-direction coriolis stress (N/m2) 
    174       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_intstrx   ! X-direction internal stress (N/m2) 
    175       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_intstry   ! Y-direction internal stress (N/m2) 
    176       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_utau_oi   ! X-direction ocean-ice stress 
    177       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_vtau_oi   ! Y-direction ocean-ice stress   
    178167      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_xmtrp_ice ! X-component of ice mass transport (kg/s) 
    179168      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_ymtrp_ice ! Y-component of ice mass transport (kg/s) 
     
    264253 
    265254      ! landfast param from Lemieux(2016): add isotropic tensile strength (following Konig Beatty and Holland, 2010) 
    266       IF( ln_landfast_L16 .OR. ln_landfast_home ) THEN   ;   zkt = rn_tensile 
    267       ELSE                                               ;   zkt = 0._wp 
     255      IF( ln_landfast_L16 ) THEN   ;   zkt = rn_tensile 
     256      ELSE                         ;   zkt = 0._wp 
    268257      ENDIF 
    269258      ! 
     
    308297             
    309298            ! Drag ice-atm. 
    310             zTauU_ia(ji,jj) = zaU(ji,jj) * utau_ice(ji,jj) 
    311             zTauV_ia(ji,jj) = zaV(ji,jj) * vtau_ice(ji,jj) 
     299            ztaux_ai(ji,jj) = zaU(ji,jj) * utau_ice(ji,jj) 
     300            ztauy_ai(ji,jj) = zaV(ji,jj) * vtau_ice(ji,jj) 
    312301 
    313302            ! Surface pressure gradient (- m*g*GRAD(ssh)) at U-V points 
     
    316305 
    317306            ! masks 
    318             zmaskU(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassU ) )  ! 0 if no ice 
    319             zmaskV(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassV ) )  ! 0 if no ice 
     307            zmsk00x(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassU ) )  ! 0 if no ice 
     308            zmsk00y(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassV ) )  ! 0 if no ice 
    320309 
    321310            ! switches 
    322             IF( zmassU <= zmmin .AND. zaU(ji,jj) <= zamin ) THEN   ;   zswitchU(ji,jj) = 0._wp 
    323             ELSE                                                   ;   zswitchU(ji,jj) = 1._wp   ;   ENDIF 
    324             IF( zmassV <= zmmin .AND. zaV(ji,jj) <= zamin ) THEN   ;   zswitchV(ji,jj) = 0._wp 
    325             ELSE                                                   ;   zswitchV(ji,jj) = 1._wp   ;   ENDIF 
     311            IF( zmassU <= zmmin .AND. zaU(ji,jj) <= zamin ) THEN   ;   zmsk01x(ji,jj) = 0._wp 
     312            ELSE                                                   ;   zmsk01x(ji,jj) = 1._wp   ;   ENDIF 
     313            IF( zmassV <= zmmin .AND. zaV(ji,jj) <= zamin ) THEN   ;   zmsk01y(ji,jj) = 0._wp 
     314            ELSE                                                   ;   zmsk01y(ji,jj) = 1._wp   ;   ENDIF 
    326315 
    327316         END DO 
     
    339328               ! ice-bottom stress at U points 
    340329               zvCr = zaU(ji,jj) * rn_depfra * hu_n(ji,jj) 
    341                zTauU_ib(ji,jj)   = rn_icebfr * MAX( 0._wp, zvU - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaU(ji,jj) ) ) 
     330               ztaux_base(ji,jj) = - rn_icebfr * MAX( 0._wp, zvU - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaU(ji,jj) ) ) 
    342331               ! ice-bottom stress at V points 
    343332               zvCr = zaV(ji,jj) * rn_depfra * hv_n(ji,jj) 
    344                zTauV_ib(ji,jj)   = rn_icebfr * MAX( 0._wp, zvV - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaV(ji,jj) ) ) 
     333               ztauy_base(ji,jj) = - rn_icebfr * MAX( 0._wp, zvV - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaV(ji,jj) ) ) 
    345334               ! ice_bottom stress at T points 
    346335               zvCr = at_i(ji,jj) * rn_depfra * ht_n(ji,jj) 
    347                tau_icebfr(ji,jj) = rn_icebfr * MAX( 0._wp, vt_i(ji,jj) - zvCr ) * EXP( -rn_crhg * ( 1._wp - at_i(ji,jj) ) ) 
     336               tau_icebfr(ji,jj) = - rn_icebfr * MAX( 0._wp, vt_i(ji,jj) - zvCr ) * EXP( -rn_crhg * ( 1._wp - at_i(ji,jj) ) ) 
    348337            END DO 
    349338         END DO 
    350339         CALL lbc_lnk( 'icedyn_rhg_evp', tau_icebfr(:,:), 'T', 1. ) 
    351340         ! 
    352       ELSEIF( ln_landfast_home ) THEN          !-- Home made 
     341      ELSE                               !-- no landfast 
    353342         DO jj = 2, jpjm1 
    354343            DO ji = fs_2, fs_jpim1 
    355                zTauU_ib(ji,jj) = tau_icebfr(ji,jj) 
    356                zTauV_ib(ji,jj) = tau_icebfr(ji,jj) 
    357             END DO 
    358          END DO 
    359          ! 
    360       ELSE                                     !-- no landfast 
    361          DO jj = 2, jpjm1 
    362             DO ji = fs_2, fs_jpim1 
    363                zTauU_ib(ji,jj) = 0._wp 
    364                zTauV_ib(ji,jj) = 0._wp 
     344               ztaux_base(ji,jj) = 0._wp 
     345               ztauy_base(ji,jj) = 0._wp 
    365346            END DO 
    366347         END DO 
    367348      ENDIF 
    368       IF( iom_use('tau_icebfr') )   CALL iom_put( 'tau_icebfr', tau_icebfr(:,:) ) 
    369349 
    370350      !------------------------------------------------------------------------------! 
     
    372352      !------------------------------------------------------------------------------! 
    373353      ! 
    374       !                                               !----------------------! 
     354      !                                               ! ==================== ! 
    375355      DO jter = 1 , nn_nevp                           !    loop over jter    ! 
    376          !                                            !----------------------!         
     356         !                                            ! ==================== !         
    377357         l_full_nf_update = jter == nn_nevp   ! false: disable full North fold update (performances) for iter = 1 to nn_nevp-1 
    378358         ! 
     
    504484                  !                 !--- tau_bottom/v_ice 
    505485                  zvel  = 5.e-05_wp + SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj) ) 
    506                   zTauB = - zTauV_ib(ji,jj) / zvel 
     486                  zTauB = ztauy_base(ji,jj) / zvel 
     487                  !                 !--- OceanBottom-to-Ice stress 
     488                  ztauy_bi(ji,jj) = zTauB * v_ice(ji,jj) 
    507489                  ! 
    508490                  !                 !--- Coriolis at V-points (energy conserving formulation) 
    509                   zCory(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
     491                  zCorV(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
    510492                     &    ( zmf(ji,jj  ) * ( e2u(ji,jj  ) * u_ice(ji,jj  ) + e2u(ji-1,jj  ) * u_ice(ji-1,jj  ) )  & 
    511493                     &    + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 
    512494                  ! 
    513495                  !                 !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    514                   zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj) 
     496                  zTauE = zfV(ji,jj) + ztauy_ai(ji,jj) + zCorV(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj) 
    515497                  ! 
    516498                  !                 !--- landfast switch => 0 = static friction ; 1 = sliding friction 
    517                   rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauV_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
     499                  rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE + ztauy_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
    518500                  ! 
    519501                  IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 
    520                   v_ice(ji,jj) = ( (          rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) )         & ! previous velocity 
    521                      &                                  + zTauE + zTauO * v_ice(ji,jj)                                            & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    522                      &                                  ) / MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
    523                                     + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )           & ! static friction => slow decrease to v=0 
    524                      &             ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) )                     & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
    525                      &           ) * zmaskV(ji,jj) 
     502                     v_ice(ji,jj) = ( (          rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) )       & ! previous velocity 
     503                        &                                  + zTauE + zTauO * v_ice(ji,jj) )                                        & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     504                        &                                  / MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
     505                        &               + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )           & ! static friction => slow decrease to v=0 
     506                        &             ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) )                     & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
     507                        &           )   * zmsk00y(ji,jj) 
    526508                  ELSE               !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 
    527                   v_ice(ji,jj) = ( (           rswitch   * ( zmV_t(ji,jj)  * v_ice(ji,jj)                             & ! previous velocity 
    528                      &                                     + zTauE + zTauO * v_ice(ji,jj)                             & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    529                      &                                     ) / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB )             & ! m/dt + tau_io(only ice part) + landfast 
    530                      &              + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )  & ! static friction => slow decrease to v=0 
    531                      &              ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) )        & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
    532                      &            ) * zmaskV(ji,jj) 
     509                     v_ice(ji,jj) = ( (           rswitch   * ( zmV_t(ji,jj)  * v_ice(ji,jj)                                       & ! previous velocity 
     510                        &                                     + zTauE + zTauO * v_ice(ji,jj) )                                     & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     511                        &                                     / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB )                         & ! m/dt + tau_io(only ice part) + landfast 
     512                        &                + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )          & ! static friction => slow decrease to v=0 
     513                        &              ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
     514                        &            )   * zmsk00y(ji,jj) 
    533515                  ENDIF 
    534516               END DO 
     
    540522            CALL agrif_interp_ice( 'V' ) 
    541523#endif 
    542             IF( ln_bdy .AND. ll_bdy_substep ) CALL bdy_ice_dyn( 'V' ) 
     524            IF( ln_bdy CALL bdy_ice_dyn( 'V' ) 
    543525            ! 
    544526            DO jj = 2, jpjm1 
     
    552534                  !                 !--- tau_bottom/u_ice 
    553535                  zvel  = 5.e-05_wp + SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj) ) 
    554                   zTauB = - zTauU_ib(ji,jj) / zvel 
     536                  zTauB = ztaux_base(ji,jj) / zvel 
     537                  !                 !--- OceanBottom-to-Ice stress 
     538                  ztaux_bi(ji,jj) = zTauB * u_ice(ji,jj) 
    555539                  ! 
    556540                  !                 !--- Coriolis at U-points (energy conserving formulation) 
    557                   zCorx(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
     541                  zCorU(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
    558542                     &    ( zmf(ji  ,jj) * ( e1v(ji  ,jj) * v_ice(ji  ,jj) + e1v(ji  ,jj-1) * v_ice(ji  ,jj-1) )  & 
    559543                     &    + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 
    560544                  ! 
    561545                  !                 !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    562                   zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj) 
     546                  zTauE = zfU(ji,jj) + ztaux_ai(ji,jj) + zCorU(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj) 
    563547                  ! 
    564548                  !                 !--- landfast switch => 0 = static friction ; 1 = sliding friction 
    565                   rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauU_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
     549                  rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE + ztaux_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
    566550                  ! 
    567551                  IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 
    568                   u_ice(ji,jj) = ( (          rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) )         & ! previous velocity 
    569                      &                                     + zTauE + zTauO * u_ice(ji,jj)                                         & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    570                      &                                  ) / MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
    571                      &              + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )              & ! static friction => slow decrease to v=0 
    572                      &              ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin  
    573                      &            ) * zmaskU(ji,jj) 
     552                     u_ice(ji,jj) = ( (          rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) )       & ! previous velocity 
     553                        &                                  + zTauE + zTauO * u_ice(ji,jj) )                                        & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     554                        &                                  / MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
     555                        &                + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )          & ! static friction => slow decrease to v=0 
     556                        &              ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin  
     557                        &            )   * zmsk00x(ji,jj) 
    574558                  ELSE               !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 
    575                   u_ice(ji,jj) = ( (           rswitch   * ( zmU_t(ji,jj)  * u_ice(ji,jj)                             & ! previous velocity 
    576                      &                                     + zTauE + zTauO * u_ice(ji,jj)                             & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    577                      &                                     ) / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB )             & ! m/dt + tau_io(only ice part) + landfast 
    578                      &              + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )  & ! static friction => slow decrease to v=0 
    579                      &              ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) )        & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin  
    580                      &            ) * zmaskU(ji,jj) 
     559                     u_ice(ji,jj) = ( (           rswitch   * ( zmU_t(ji,jj)  * u_ice(ji,jj)                                       & ! previous velocity 
     560                        &                                     + zTauE + zTauO * u_ice(ji,jj) )                                     & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     561                        &                                     / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB )                         & ! m/dt + tau_io(only ice part) + landfast 
     562                        &                + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )          & ! static friction => slow decrease to v=0 
     563                        &              ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin  
     564                        &            )   * zmsk00x(ji,jj) 
    581565                  ENDIF 
    582566               END DO 
     
    588572            CALL agrif_interp_ice( 'U' ) 
    589573#endif 
    590             IF( ln_bdy .AND. ll_bdy_substep ) CALL bdy_ice_dyn( 'U' ) 
     574            IF( ln_bdy CALL bdy_ice_dyn( 'U' ) 
    591575            ! 
    592576         ELSE ! odd iterations 
     
    602586                  !                 !--- tau_bottom/u_ice 
    603587                  zvel  = 5.e-05_wp + SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj) ) 
    604                   zTauB = - zTauU_ib(ji,jj) / zvel 
     588                  zTauB = ztaux_base(ji,jj) / zvel 
     589                  !                 !--- OceanBottom-to-Ice stress 
     590                  ztaux_bi(ji,jj) = zTauB * u_ice(ji,jj) 
    605591                  ! 
    606592                  !                 !--- Coriolis at U-points (energy conserving formulation) 
    607                   zCorx(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
     593                  zCorU(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
    608594                     &    ( zmf(ji  ,jj) * ( e1v(ji  ,jj) * v_ice(ji  ,jj) + e1v(ji  ,jj-1) * v_ice(ji  ,jj-1) )  & 
    609595                     &    + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 
    610596                  ! 
    611597                  !                 !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    612                   zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj) 
     598                  zTauE = zfU(ji,jj) + ztaux_ai(ji,jj) + zCorU(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj) 
    613599                  ! 
    614600                  !                 !--- landfast switch => 0 = static friction ; 1 = sliding friction 
    615                   rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauU_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
     601                  rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE + ztaux_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
    616602                  ! 
    617603                  IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 
    618                   u_ice(ji,jj) = ( (          rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) )         & ! previous velocity 
    619                      &                                     + zTauE + zTauO * u_ice(ji,jj)                                         & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    620                      &                                  ) / MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
    621                      &              + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )              & ! static friction => slow decrease to v=0 
    622                      &              ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin  
    623                      &            ) * zmaskU(ji,jj) 
     604                     u_ice(ji,jj) = ( (          rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) )       & ! previous velocity 
     605                        &                                  + zTauE + zTauO * u_ice(ji,jj) )                                        & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     606                        &                                  / MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
     607                        &                + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )          & ! static friction => slow decrease to v=0 
     608                        &              ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin  
     609                        &            )   * zmsk00x(ji,jj) 
    624610                  ELSE               !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 
    625                   u_ice(ji,jj) = ( (           rswitch   * ( zmU_t(ji,jj)  * u_ice(ji,jj)                             & ! previous velocity 
    626                      &                                     + zTauE + zTauO * u_ice(ji,jj)                             & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    627                      &                                     ) / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB )             & ! m/dt + tau_io(only ice part) + landfast 
    628                      &              + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )  & ! static friction => slow decrease to v=0 
    629                      &              ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) )        & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
    630                      &            ) * zmaskU(ji,jj) 
     611                     u_ice(ji,jj) = ( (           rswitch   * ( zmU_t(ji,jj)  * u_ice(ji,jj)                                       & ! previous velocity 
     612                        &                                     + zTauE + zTauO * u_ice(ji,jj) )                                     & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     613                        &                                     / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB )                         & ! m/dt + tau_io(only ice part) + landfast 
     614                        &                + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )          & ! static friction => slow decrease to v=0 
     615                        &              ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
     616                        &            )   * zmsk00x(ji,jj) 
    631617                  ENDIF 
    632618               END DO 
     
    638624            CALL agrif_interp_ice( 'U' ) 
    639625#endif 
    640             IF( ln_bdy .AND. ll_bdy_substep ) CALL bdy_ice_dyn( 'U' ) 
     626            IF( ln_bdy CALL bdy_ice_dyn( 'U' ) 
    641627            ! 
    642628            DO jj = 2, jpjm1 
     
    650636                  !                 !--- tau_bottom/v_ice 
    651637                  zvel  = 5.e-05_wp + SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj) ) 
    652                   zTauB = - zTauV_ib(ji,jj) / zvel 
     638                  zTauB = ztauy_base(ji,jj) / zvel 
     639                  !                 !--- OceanBottom-to-Ice stress 
     640                  ztauy_bi(ji,jj) = zTauB * v_ice(ji,jj) 
    653641                  ! 
    654642                  !                 !--- Coriolis at v-points (energy conserving formulation) 
    655                   zCory(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
     643                  zCorV(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
    656644                     &    ( zmf(ji,jj  ) * ( e2u(ji,jj  ) * u_ice(ji,jj  ) + e2u(ji-1,jj  ) * u_ice(ji-1,jj  ) )  & 
    657645                     &    + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 
    658646                  ! 
    659647                  !                 !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    660                   zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj) 
     648                  zTauE = zfV(ji,jj) + ztauy_ai(ji,jj) + zCorV(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj) 
    661649                  ! 
    662650                  !                 !--- landfast switch => 0 = static friction ; 1 = sliding friction 
    663                   rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, zTauE - zTauV_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
     651                  rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, zTauE + ztauy_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 
    664652                  ! 
    665653                  IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 
    666                   v_ice(ji,jj) = ( (          rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) )         & ! previous velocity 
    667                      &                                  + zTauE + zTauO * v_ice(ji,jj)                                            & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    668                      &                                  ) / MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
    669                                     + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )           & ! static friction => slow decrease to v=0 
    670                      &             ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) )                     & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
    671                      &           ) * zmaskV(ji,jj) 
     654                     v_ice(ji,jj) = ( (          rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) )       & ! previous velocity 
     655                        &                                  + zTauE + zTauO * v_ice(ji,jj) )                                        & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     656                        &                                  / MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 
     657                        &               + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )           & ! static friction => slow decrease to v=0 
     658                        &             ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) )                     & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
     659                        &           )   * zmsk00y(ji,jj) 
    672660                  ELSE               !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 
    673                   v_ice(ji,jj) = ( (           rswitch   * ( zmV_t(ji,jj)  * v_ice(ji,jj)                             & ! previous velocity 
    674                      &                                     + zTauE + zTauO * v_ice(ji,jj)                             & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
    675                      &                                     ) / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB )             & ! m/dt + tau_io(only ice part) + landfast 
    676                      &              + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )  & ! static friction => slow decrease to v=0 
    677                      &              ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) )        & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
    678                      &            ) * zmaskV(ji,jj) 
     661                     v_ice(ji,jj) = ( (           rswitch   * ( zmV_t(ji,jj)  * v_ice(ji,jj)                                       & ! previous velocity 
     662                        &                                     + zTauE + zTauO * v_ice(ji,jj) )                                     & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 
     663                        &                                     / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB )                         & ! m/dt + tau_io(only ice part) + landfast 
     664                        &                + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )          & ! static friction => slow decrease to v=0 
     665                        &              ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) )                    & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 
     666                        &            )   * zmsk00y(ji,jj) 
    679667                  ENDIF 
    680668               END DO 
     
    686674            CALL agrif_interp_ice( 'V' ) 
    687675#endif 
    688             IF( ln_bdy .AND. ll_bdy_substep ) CALL bdy_ice_dyn( 'V' ) 
     676            IF( ln_bdy CALL bdy_ice_dyn( 'V' ) 
    689677            ! 
    690678         ENDIF 
     
    701689      END DO                                              !  end loop over jter  ! 
    702690      !                                                   ! ==================== ! 
    703       ! 
    704       IF( ln_bdy .AND. .NOT.ll_bdy_substep ) THEN 
    705          CALL bdy_ice_dyn( 'U' ) 
    706          CALL bdy_ice_dyn( 'V' ) 
    707       ENDIF 
    708691      ! 
    709692      !------------------------------------------------------------------------------! 
     
    764747      DO jj = 1, jpj 
    765748         DO ji = 1, jpi 
    766             zswi(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
     749            zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
    767750         END DO 
    768751      END DO 
    769752 
     753      ! --- ice-ocean, ice-atm. & ice-oceanbottom(landfast) stresses --- ! 
     754      IF(  iom_use('utau_oi') .OR. iom_use('vtau_oi') .OR. iom_use('utau_ai') .OR. iom_use('vtau_ai') .OR. & 
     755         & iom_use('utau_bi') .OR. iom_use('vtau_bi') ) THEN 
     756         ! 
     757         CALL lbc_lnk_multi( 'icedyn_rhg_evp', ztaux_oi, 'U', -1., ztauy_oi, 'V', -1., ztaux_ai, 'U', -1., ztauy_ai, 'V', -1., & 
     758            &                                  ztaux_bi, 'U', -1., ztauy_bi, 'V', -1. ) 
     759         ! 
     760         CALL iom_put( 'utau_oi' , ztaux_oi * zmsk00 ) 
     761         CALL iom_put( 'vtau_oi' , ztauy_oi * zmsk00 ) 
     762         CALL iom_put( 'utau_ai' , ztaux_ai * zmsk00 ) 
     763         CALL iom_put( 'vtau_ai' , ztauy_ai * zmsk00 ) 
     764         CALL iom_put( 'utau_bi' , ztaux_bi * zmsk00 ) 
     765         CALL iom_put( 'vtau_bi' , ztauy_bi * zmsk00 ) 
     766      ENDIF 
     767        
    770768      ! --- divergence, shear and strength --- ! 
    771       IF( iom_use('icediv') )   CALL iom_put( "icediv" , pdivu_i (:,:) * zswi(:,:) )   ! divergence 
    772       IF( iom_use('iceshe') )   CALL iom_put( "iceshe" , pshear_i(:,:) * zswi(:,:) )   ! shear 
    773       IF( iom_use('icestr') )   CALL iom_put( "icestr" , strength(:,:) * zswi(:,:) )   ! Ice strength 
    774  
    775       ! --- charge ellipse --- ! 
    776       IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') ) THEN 
     769      IF( iom_use('icediv') )   CALL iom_put( 'icediv' , pdivu_i  * zmsk00 )   ! divergence 
     770      IF( iom_use('iceshe') )   CALL iom_put( 'iceshe' , pshear_i * zmsk00 )   ! shear 
     771      IF( iom_use('icestr') )   CALL iom_put( 'icestr' , strength * zmsk00 )   ! strength 
     772 
     773      ! --- stress tensor --- ! 
     774      IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') .OR. iom_use('normstr') .OR. iom_use('sheastr') ) THEN 
    777775         ! 
    778776         ALLOCATE( zsig1(jpi,jpj) , zsig2(jpi,jpj) , zsig3(jpi,jpj) ) 
     
    780778         DO jj = 2, jpjm1 
    781779            DO ji = 2, jpim1 
    782                zdum1 = ( zswi(ji-1,jj) * pstress12_i(ji-1,jj) + zswi(ji  ,jj-1) * pstress12_i(ji  ,jj-1) +  &  ! stress12_i at T-point 
    783                   &      zswi(ji  ,jj) * pstress12_i(ji  ,jj) + zswi(ji-1,jj-1) * pstress12_i(ji-1,jj-1) )  & 
    784                   &    / MAX( 1._wp, zswi(ji-1,jj) + zswi(ji,jj-1) + zswi(ji,jj) + zswi(ji-1,jj-1) ) 
     780               zdum1 = ( zmsk00(ji-1,jj) * pstress12_i(ji-1,jj) + zmsk00(ji  ,jj-1) * pstress12_i(ji  ,jj-1) +  &  ! stress12_i at T-point 
     781                  &      zmsk00(ji  ,jj) * pstress12_i(ji  ,jj) + zmsk00(ji-1,jj-1) * pstress12_i(ji-1,jj-1) )  & 
     782                  &    / MAX( 1._wp, zmsk00(ji-1,jj) + zmsk00(ji,jj-1) + zmsk00(ji,jj) + zmsk00(ji-1,jj-1) ) 
    785783 
    786784               zshear = SQRT( pstress2_i(ji,jj) * pstress2_i(ji,jj) + 4._wp * zdum1 * zdum1 ) ! shear stress   
    787785 
    788                zdum2 = zswi(ji,jj) / MAX( 1._wp, strength(ji,jj) ) 
     786               zdum2 = zmsk00(ji,jj) / MAX( 1._wp, strength(ji,jj) ) 
    789787 
    790788!!               zsig1(ji,jj) = 0.5_wp * zdum2 * ( pstress1_i(ji,jj) + zshear ) ! principal stress (y-direction, see Hunke & Dukowicz 2002) 
     
    799797         CALL lbc_lnk_multi( 'icedyn_rhg_evp', zsig1, 'T', 1., zsig2, 'T', 1., zsig3, 'T', 1. ) 
    800798         ! 
    801          IF( iom_use('isig1') )   CALL iom_put( "isig1" , zsig1 ) 
    802          IF( iom_use('isig2') )   CALL iom_put( "isig2" , zsig2 ) 
    803          IF( iom_use('isig3') )   CALL iom_put( "isig3" , zsig3 ) 
    804          ! 
     799         CALL iom_put( 'isig1' , zsig1 ) 
     800         CALL iom_put( 'isig2' , zsig2 ) 
     801         CALL iom_put( 'isig3' , zsig3 ) 
     802         ! 
     803         ! Stress tensor invariants (normal and shear stress N/m) 
     804         IF( iom_use('normstr') )   CALL iom_put( 'normstr' ,       ( zs1(:,:) + zs2(:,:) )                       * zmsk00(:,:) ) ! Normal stress 
     805         IF( iom_use('sheastr') )   CALL iom_put( 'sheastr' , SQRT( ( zs1(:,:) - zs2(:,:) )**2 + 4*zs12(:,:)**2 ) * zmsk00(:,:) ) ! Shear stress 
     806 
    805807         DEALLOCATE( zsig1 , zsig2 , zsig3 ) 
    806808      ENDIF 
    807809       
    808810      ! --- SIMIP --- ! 
    809       IF ( iom_use( 'normstr'  ) .OR. iom_use( 'sheastr'  ) .OR. iom_use( 'dssh_dx'  ) .OR. iom_use( 'dssh_dy'  ) .OR. & 
    810          & iom_use( 'corstrx'  ) .OR. iom_use( 'corstry'  ) .OR. iom_use( 'intstrx'  ) .OR. iom_use( 'intstry'  ) .OR. & 
    811          & iom_use( 'utau_oi'  ) .OR. iom_use( 'vtau_oi'  ) .OR. iom_use( 'xmtrpice' ) .OR. iom_use( 'ymtrpice' ) .OR. & 
    812          & iom_use( 'xmtrpsnw' ) .OR. iom_use( 'ymtrpsnw' ) .OR. iom_use( 'xatrp'    ) .OR. iom_use( 'yatrp'    ) ) THEN 
    813  
    814          ALLOCATE( zdiag_sig1     (jpi,jpj) , zdiag_sig2     (jpi,jpj) , zdiag_dssh_dx  (jpi,jpj) , zdiag_dssh_dy  (jpi,jpj) ,  & 
    815             &      zdiag_corstrx  (jpi,jpj) , zdiag_corstry  (jpi,jpj) , zdiag_intstrx  (jpi,jpj) , zdiag_intstry  (jpi,jpj) ,  & 
    816             &      zdiag_utau_oi  (jpi,jpj) , zdiag_vtau_oi  (jpi,jpj) , zdiag_xmtrp_ice(jpi,jpj) , zdiag_ymtrp_ice(jpi,jpj) ,  & 
    817             &      zdiag_xmtrp_snw(jpi,jpj) , zdiag_ymtrp_snw(jpi,jpj) , zdiag_xatrp    (jpi,jpj) , zdiag_yatrp    (jpi,jpj) ) 
    818           
     811      IF(  iom_use('dssh_dx') .OR. iom_use('dssh_dy') .OR. & 
     812         & iom_use('corstrx') .OR. iom_use('corstry') .OR. iom_use('intstrx') .OR. iom_use('intstry') ) THEN 
     813         ! 
     814         CALL lbc_lnk_multi( 'icedyn_rhg_evp', zspgU, 'U', -1., zspgV, 'V', -1., & 
     815            &                                  zCorU, 'U', -1., zCorV, 'V', -1., zfU, 'U', -1., zfV, 'V', -1. ) 
     816 
     817         CALL iom_put( 'dssh_dx' , zspgU * zmsk00 )   ! Sea-surface tilt term in force balance (x) 
     818         CALL iom_put( 'dssh_dy' , zspgV * zmsk00 )   ! Sea-surface tilt term in force balance (y) 
     819         CALL iom_put( 'corstrx' , zCorU * zmsk00 )   ! Coriolis force term in force balance (x) 
     820         CALL iom_put( 'corstry' , zCorV * zmsk00 )   ! Coriolis force term in force balance (y) 
     821         CALL iom_put( 'intstrx' , zfU   * zmsk00 )   ! Internal force term in force balance (x) 
     822         CALL iom_put( 'intstry' , zfV   * zmsk00 )   ! Internal force term in force balance (y) 
     823      ENDIF 
     824 
     825      IF(  iom_use('xmtrpice') .OR. iom_use('ymtrpice') .OR. & 
     826         & iom_use('xmtrpsnw') .OR. iom_use('ymtrpsnw') .OR. iom_use('xatrp') .OR. iom_use('yatrp') ) THEN 
     827         ! 
     828         ALLOCATE( zdiag_xmtrp_ice(jpi,jpj) , zdiag_ymtrp_ice(jpi,jpj) , & 
     829            &      zdiag_xmtrp_snw(jpi,jpj) , zdiag_ymtrp_snw(jpi,jpj) , zdiag_xatrp(jpi,jpj) , zdiag_yatrp(jpi,jpj) ) 
     830         ! 
    819831         DO jj = 2, jpjm1 
    820832            DO ji = 2, jpim1 
    821                rswitch  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
    822                 
    823                ! Stress tensor invariants (normal and shear stress N/m) 
    824                zdiag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * rswitch                                 ! normal stress 
    825                zdiag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * rswitch   ! shear stress 
    826                 
    827                ! Stress terms of the momentum equation (N/m2) 
    828                zdiag_dssh_dx(ji,jj) = zspgU(ji,jj) * rswitch     ! sea surface slope stress term 
    829                zdiag_dssh_dy(ji,jj) = zspgV(ji,jj) * rswitch 
    830                 
    831                zdiag_corstrx(ji,jj) = zCorx(ji,jj) * rswitch     ! Coriolis stress term 
    832                zdiag_corstry(ji,jj) = zCory(ji,jj) * rswitch 
    833                 
    834                zdiag_intstrx(ji,jj) = zfU(ji,jj)   * rswitch     ! internal stress term 
    835                zdiag_intstry(ji,jj) = zfV(ji,jj)   * rswitch 
    836                 
    837                zdiag_utau_oi(ji,jj) = ztaux_oi(ji,jj) * rswitch  ! oceanic stress 
    838                zdiag_vtau_oi(ji,jj) = ztauy_oi(ji,jj) * rswitch 
    839                 
    840833               ! 2D ice mass, snow mass, area transport arrays (X, Y) 
    841                zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * rswitch 
    842                zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * rswitch 
    843                 
     834               zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * zmsk00(ji,jj) 
     835               zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * zmsk00(ji,jj) 
     836 
    844837               zdiag_xmtrp_ice(ji,jj) = rhoi * zfac_x * ( vt_i(ji+1,jj) + vt_i(ji,jj) ) ! ice mass transport, X-component 
    845838               zdiag_ymtrp_ice(ji,jj) = rhoi * zfac_y * ( vt_i(ji,jj+1) + vt_i(ji,jj) ) !        ''           Y-   '' 
    846                 
     839 
    847840               zdiag_xmtrp_snw(ji,jj) = rhos * zfac_x * ( vt_s(ji+1,jj) + vt_s(ji,jj) ) ! snow mass transport, X-component 
    848841               zdiag_ymtrp_snw(ji,jj) = rhos * zfac_y * ( vt_s(ji,jj+1) + vt_s(ji,jj) ) !          ''          Y-   '' 
    849                 
     842 
    850843               zdiag_xatrp(ji,jj)     = zfac_x * ( at_i(ji+1,jj) + at_i(ji,jj) )        ! area transport,      X-component 
    851844               zdiag_yatrp(ji,jj)     = zfac_y * ( at_i(ji,jj+1) + at_i(ji,jj) )        !        ''            Y-   '' 
    852                 
    853             END DO 
    854          END DO 
    855           
    856          CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_sig1   , 'T',  1., zdiag_sig2   , 'T',  1.,   & 
    857             &                zdiag_dssh_dx, 'U', -1., zdiag_dssh_dy, 'V', -1.,   & 
    858             &                zdiag_corstrx, 'U', -1., zdiag_corstry, 'V', -1.,   &  
    859             &                zdiag_intstrx, 'U', -1., zdiag_intstry, 'V', -1.    ) 
    860                    
    861          CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_utau_oi  , 'U', -1., zdiag_vtau_oi  , 'V', -1.,   & 
    862             &                zdiag_xmtrp_ice, 'U', -1., zdiag_xmtrp_snw, 'U', -1.,   & 
    863             &                zdiag_xatrp    , 'U', -1., zdiag_ymtrp_ice, 'V', -1.,   & 
    864             &                zdiag_ymtrp_snw, 'V', -1., zdiag_yatrp    , 'V', -1.    ) 
    865           
    866          IF( iom_use('normstr' ) )   CALL iom_put( 'normstr'  ,  zdiag_sig1(:,:)      )   ! Normal stress 
    867          IF( iom_use('sheastr' ) )   CALL iom_put( 'sheastr'  ,  zdiag_sig2(:,:)      )   ! Shear stress 
    868          IF( iom_use('dssh_dx' ) )   CALL iom_put( 'dssh_dx'  ,  zdiag_dssh_dx(:,:)   )   ! Sea-surface tilt term in force balance (x) 
    869          IF( iom_use('dssh_dy' ) )   CALL iom_put( 'dssh_dy'  ,  zdiag_dssh_dy(:,:)   )   ! Sea-surface tilt term in force balance (y) 
    870          IF( iom_use('corstrx' ) )   CALL iom_put( 'corstrx'  ,  zdiag_corstrx(:,:)   )   ! Coriolis force term in force balance (x) 
    871          IF( iom_use('corstry' ) )   CALL iom_put( 'corstry'  ,  zdiag_corstry(:,:)   )   ! Coriolis force term in force balance (y) 
    872          IF( iom_use('intstrx' ) )   CALL iom_put( 'intstrx'  ,  zdiag_intstrx(:,:)   )   ! Internal force term in force balance (x) 
    873          IF( iom_use('intstry' ) )   CALL iom_put( 'intstry'  ,  zdiag_intstry(:,:)   )   ! Internal force term in force balance (y) 
    874          IF( iom_use('utau_oi' ) )   CALL iom_put( 'utau_oi'  ,  zdiag_utau_oi(:,:)   )   ! Ocean stress term in force balance (x) 
    875          IF( iom_use('vtau_oi' ) )   CALL iom_put( 'vtau_oi'  ,  zdiag_vtau_oi(:,:)   )   ! Ocean stress term in force balance (y) 
    876          IF( iom_use('xmtrpice') )   CALL iom_put( 'xmtrpice' ,  zdiag_xmtrp_ice(:,:) )   ! X-component of sea-ice mass transport (kg/s) 
    877          IF( iom_use('ymtrpice') )   CALL iom_put( 'ymtrpice' ,  zdiag_ymtrp_ice(:,:) )   ! Y-component of sea-ice mass transport  
    878          IF( iom_use('xmtrpsnw') )   CALL iom_put( 'xmtrpsnw' ,  zdiag_xmtrp_snw(:,:) )   ! X-component of snow mass transport (kg/s) 
    879          IF( iom_use('ymtrpsnw') )   CALL iom_put( 'ymtrpsnw' ,  zdiag_ymtrp_snw(:,:) )   ! Y-component of snow mass transport 
    880          IF( iom_use('xatrp'   ) )   CALL iom_put( 'xatrp'    ,  zdiag_xatrp(:,:)     )   ! X-component of ice area transport 
    881          IF( iom_use('yatrp'   ) )   CALL iom_put( 'yatrp'    ,  zdiag_yatrp(:,:)     )   ! Y-component of ice area transport 
    882  
    883          DEALLOCATE( zdiag_sig1      , zdiag_sig2      , zdiag_dssh_dx   , zdiag_dssh_dy   ,  & 
    884             &        zdiag_corstrx   , zdiag_corstry   , zdiag_intstrx   , zdiag_intstry   ,  & 
    885             &        zdiag_utau_oi   , zdiag_vtau_oi   , zdiag_xmtrp_ice , zdiag_ymtrp_ice ,  & 
    886             &        zdiag_xmtrp_snw , zdiag_ymtrp_snw , zdiag_xatrp     , zdiag_yatrp     ) 
     845 
     846            END DO 
     847         END DO 
     848 
     849         CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_xmtrp_ice, 'U', -1., zdiag_ymtrp_ice, 'V', -1., & 
     850            &                                  zdiag_xmtrp_snw, 'U', -1., zdiag_ymtrp_snw, 'V', -1., & 
     851            &                                  zdiag_xatrp    , 'U', -1., zdiag_yatrp    , 'V', -1. ) 
     852 
     853         CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice )   ! X-component of sea-ice mass transport (kg/s) 
     854         CALL iom_put( 'ymtrpice' , zdiag_ymtrp_ice )   ! Y-component of sea-ice mass transport  
     855         CALL iom_put( 'xmtrpsnw' , zdiag_xmtrp_snw )   ! X-component of snow mass transport (kg/s) 
     856         CALL iom_put( 'ymtrpsnw' , zdiag_ymtrp_snw )   ! Y-component of snow mass transport 
     857         CALL iom_put( 'xatrp'    , zdiag_xatrp     )   ! X-component of ice area transport 
     858         CALL iom_put( 'yatrp'    , zdiag_yatrp     )   ! Y-component of ice area transport 
     859 
     860         DEALLOCATE( zdiag_xmtrp_ice , zdiag_ymtrp_ice , & 
     861            &        zdiag_xmtrp_snw , zdiag_ymtrp_snw , zdiag_xatrp , zdiag_yatrp ) 
    887862 
    888863      ENDIF 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/iceistate.F90

    r11348 r11413  
    2222   USE eosbn2         ! equation of state 
    2323   USE domvvl         ! Variable volume 
    24    USE ice            ! sea-ice variables 
    25    USE icevar         ! ice_var_salprof 
     24   USE ice            ! sea-ice: variables 
     25   USE ice1D          ! sea-ice: thermodynamics variables 
     26   USE icetab         ! sea-ice: 1D <==> 2D transformation 
     27   USE icevar         ! sea-ice: operations 
    2628   ! 
    2729   USE in_out_manager ! I/O manager 
     
    3638   PUBLIC   ice_istate        ! called by icestp.F90 
    3739   PUBLIC   ice_istate_init   ! called by icestp.F90 
    38  
    39    INTEGER , PARAMETER ::   jpfldi = 6           ! maximum number of files to read 
    40    INTEGER , PARAMETER ::   jp_hti = 1           ! index of ice thickness (m)    at T-point 
    41    INTEGER , PARAMETER ::   jp_hts = 2           ! index of snow thicknes (m)    at T-point 
    42    INTEGER , PARAMETER ::   jp_ati = 3           ! index of ice fraction (%) at T-point 
    43    INTEGER , PARAMETER ::   jp_tsu = 4           ! index of ice surface temp (K)    at T-point 
    44    INTEGER , PARAMETER ::   jp_tmi = 5           ! index of ice temp at T-point 
    45    INTEGER , PARAMETER ::   jp_smi = 6           ! index of ice sali at T-point 
    46    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   si  ! structure of input fields (file informations, fields read) 
    4740   ! 
    4841   !                             !! ** namelist (namini) ** 
    49    LOGICAL  ::   ln_iceini        ! initialization or not 
    50    LOGICAL  ::   ln_iceini_file   ! Ice initialization state from 2D netcdf file 
    51    REAL(wp) ::   rn_thres_sst     ! threshold water temperature for initial sea ice 
    52    REAL(wp) ::   rn_hts_ini_n     ! initial snow thickness in the north 
    53    REAL(wp) ::   rn_hts_ini_s     ! initial snow thickness in the south 
    54    REAL(wp) ::   rn_hti_ini_n     ! initial ice thickness in the north 
    55    REAL(wp) ::   rn_hti_ini_s     ! initial ice thickness in the south 
    56    REAL(wp) ::   rn_ati_ini_n     ! initial leads area in the north 
    57    REAL(wp) ::   rn_ati_ini_s     ! initial leads area in the south 
    58    REAL(wp) ::   rn_smi_ini_n     ! initial salinity  
    59    REAL(wp) ::   rn_smi_ini_s     ! initial salinity 
    60    REAL(wp) ::   rn_tmi_ini_n     ! initial temperature 
    61    REAL(wp) ::   rn_tmi_ini_s     ! initial temperature 
    62     
     42   LOGICAL, PUBLIC  ::   ln_iceini        !: Ice initialization or not 
     43   LOGICAL, PUBLIC  ::   ln_iceini_file   !: Ice initialization from 2D netcdf file 
     44   REAL(wp) ::   rn_thres_sst 
     45   REAL(wp) ::   rn_hti_ini_n, rn_hts_ini_n, rn_ati_ini_n, rn_smi_ini_n, rn_tmi_ini_n, rn_tsu_ini_n, rn_tms_ini_n 
     46   REAL(wp) ::   rn_hti_ini_s, rn_hts_ini_s, rn_ati_ini_s, rn_smi_ini_s, rn_tmi_ini_s, rn_tsu_ini_s, rn_tms_ini_s 
     47   REAL(wp) ::   rn_apd_ini_n, rn_hpd_ini_n 
     48   REAL(wp) ::   rn_apd_ini_s, rn_hpd_ini_s 
     49   ! 
     50   !                              ! if ln_iceini_file = T 
     51   INTEGER , PARAMETER ::   jpfldi = 9           ! maximum number of files to read 
     52   INTEGER , PARAMETER ::   jp_hti = 1           ! index of ice thickness    (m) 
     53   INTEGER , PARAMETER ::   jp_hts = 2           ! index of snw thickness    (m) 
     54   INTEGER , PARAMETER ::   jp_ati = 3           ! index of ice fraction     (-) 
     55   INTEGER , PARAMETER ::   jp_smi = 4           ! index of ice salinity     (g/kg) 
     56   INTEGER , PARAMETER ::   jp_tmi = 5           ! index of ice temperature  (K) 
     57   INTEGER , PARAMETER ::   jp_tsu = 6           ! index of ice surface temp (K) 
     58   INTEGER , PARAMETER ::   jp_tms = 7           ! index of snw temperature  (K) 
     59   INTEGER , PARAMETER ::   jp_apd = 8           ! index of pnd fraction     (-) 
     60   INTEGER , PARAMETER ::   jp_hpd = 9           ! index of pnd depth        (m) 
     61   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   si  ! structure of input fields (file informations, fields read) 
     62   !    
    6363   !!---------------------------------------------------------------------- 
    6464   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
     
    6868CONTAINS 
    6969 
    70    SUBROUTINE ice_istate 
     70   SUBROUTINE ice_istate( kt ) 
    7171      !!------------------------------------------------------------------- 
    7272      !!                    ***  ROUTINE ice_istate  *** 
     
    8787      !! 
    8888      !! ** Notes   : o_i, t_su, t_s, t_i, sz_i must be filled everywhere, even 
    89       !!              where there is no ice (clem: I do not know why, is it mandatory?)  
     89      !!              where there is no ice 
    9090      !!-------------------------------------------------------------------- 
     91      INTEGER, INTENT(in) ::   kt   ! time step  
     92      !! 
    9193      INTEGER  ::   ji, jj, jk, jl         ! dummy loop indices 
    92       INTEGER  ::   i_hemis, i_fill, jl0   ! local integers 
    93       REAL(wp) ::   ztmelts, zdh 
    94       REAL(wp) ::   zarg, zV, zconv, zdv, zfac 
     94      REAL(wp) ::   ztmelts 
    9595      INTEGER , DIMENSION(4)           ::   itest 
    9696      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d 
    9797      REAL(wp), DIMENSION(jpi,jpj)     ::   zswitch    ! ice indicator 
    98       REAL(wp), DIMENSION(jpi,jpj)     ::   zht_i_ini, zat_i_ini, zvt_i_ini            !data from namelist or nc file 
    99       REAL(wp), DIMENSION(jpi,jpj)     ::   zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file 
    100       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zh_i_ini , za_i_ini                        !data by cattegories to fill 
     98      REAL(wp), DIMENSION(jpi,jpj)     ::   zht_i_ini, zat_i_ini, ztm_s_ini            !data from namelist or nc file 
     99      REAL(wp), DIMENSION(jpi,jpj)     ::   zt_su_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file 
     100      REAL(wp), DIMENSION(jpi,jpj)     ::   zapnd_ini, zhpnd_ini                       !data from namelist or nc file 
     101      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zti_3d , zts_3d                            !temporary arrays 
     102      !! 
     103      REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   zhi_2d, zhs_2d, zai_2d, zti_2d, zts_2d, ztsu_2d, zsi_2d 
    101104      !-------------------------------------------------------------------- 
    102105 
     
    105108      IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    106109 
    107       !-------------------------------------------------------------------- 
    108       ! 1) Set surface and bottom temperatures to initial values 
    109       !-------------------------------------------------------------------- 
    110       ! 
    111       ! init surface temperature 
     110      !--------------------------- 
     111      ! 1) 1st init. of the fields 
     112      !--------------------------- 
     113      ! 
     114      ! basal temperature (considered at freezing point)   [Kelvin] 
     115      CALL eos_fzp( sss_m(:,:), t_bo(:,:) ) 
     116      t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1)  
     117      ! 
     118      ! surface temperature and conductivity 
    112119      DO jl = 1, jpl 
    113120         t_su   (:,:,jl) = rt0 * tmask(:,:,1)  ! temp at the surface 
     
    115122      END DO 
    116123      ! 
    117       ! init basal temperature (considered at freezing point)   [Kelvin] 
    118       CALL eos_fzp( sss_m(:,:), t_bo(:,:) ) 
    119       t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1)  
    120  
     124      ! ice and snw temperatures 
     125      DO jl = 1, jpl 
     126         DO jk = 1, nlay_i 
     127            t_i(:,:,jk,jl) = rt0 * tmask(:,:,1) 
     128         END DO 
     129         DO jk = 1, nlay_s 
     130            t_s(:,:,jk,jl) = rt0 * tmask(:,:,1) 
     131         END DO 
     132      END DO 
     133      ! 
     134      ! specific temperatures for coupled runs 
     135      tn_ice (:,:,:) = t_i (:,:,1,:) 
     136      t1_ice (:,:,:) = t_i (:,:,1,:) 
     137 
     138      ! heat contents 
     139      e_i (:,:,:,:) = 0._wp 
     140      e_s (:,:,:,:) = 0._wp 
     141       
     142      ! general fields 
     143      a_i (:,:,:) = 0._wp 
     144      v_i (:,:,:) = 0._wp 
     145      v_s (:,:,:) = 0._wp 
     146      sv_i(:,:,:) = 0._wp 
     147      oa_i(:,:,:) = 0._wp 
     148      ! 
     149      h_i (:,:,:) = 0._wp 
     150      h_s (:,:,:) = 0._wp 
     151      s_i (:,:,:) = 0._wp 
     152      o_i (:,:,:) = 0._wp 
     153      ! 
     154      ! melt ponds 
     155      a_ip     (:,:,:) = 0._wp 
     156      v_ip     (:,:,:) = 0._wp 
     157      a_ip_frac(:,:,:) = 0._wp 
     158      h_ip     (:,:,:) = 0._wp 
     159      ! 
     160      ! ice velocities 
     161      u_ice (:,:) = 0._wp 
     162      v_ice (:,:) = 0._wp 
     163      ! 
     164      !------------------------------------------------------------------------ 
     165      ! 2) overwrite some of the fields with namelist parameters or netcdf file 
     166      !------------------------------------------------------------------------ 
    121167      IF( ln_iceini ) THEN 
    122          !----------------------------------------------------------- 
    123          ! 2) Compute or read sea ice variables ===> single category 
    124          !----------------------------------------------------------- 
    125          ! 
    126168         !                             !---------------! 
    127169         IF( ln_iceini_file )THEN      ! Read a file   ! 
    128170            !                          !---------------! 
    129             ! 
    130             zht_i_ini(:,:)  = si(jp_hti)%fnow(:,:,1) 
    131             zht_s_ini(:,:)  = si(jp_hts)%fnow(:,:,1) 
    132             zat_i_ini(:,:)  = si(jp_ati)%fnow(:,:,1) 
    133             zts_u_ini(:,:)  = si(jp_tsu)%fnow(:,:,1) 
    134             ztm_i_ini(:,:)  = si(jp_tmi)%fnow(:,:,1) 
    135             zsm_i_ini(:,:)  = si(jp_smi)%fnow(:,:,1) 
    136             ! 
    137             WHERE( zat_i_ini(:,:) > 0._wp ) ; zswitch(:,:) = tmask(:,:,1)  
    138             ELSEWHERE                       ; zswitch(:,:) = 0._wp 
     171            WHERE( ff_t(:,:) >= 0._wp )   ;   zswitch(:,:) = 1._wp 
     172            ELSEWHERE                     ;   zswitch(:,:) = 0._wp 
    139173            END WHERE 
    140             zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:) 
    141             ! 
     174            ! 
     175            CALL fld_read( kt, 1, si ) ! input fields provided at the current time-step 
     176            ! 
     177            ! -- mandatory fields -- ! 
     178            zht_i_ini(:,:) = si(jp_hti)%fnow(:,:,1) 
     179            zht_s_ini(:,:) = si(jp_hts)%fnow(:,:,1) 
     180            zat_i_ini(:,:) = si(jp_ati)%fnow(:,:,1) 
     181 
     182            ! -- optional fields -- ! 
     183            !    if fields do not exist then set them to the values present in the namelist (except for snow and surface temperature) 
     184            ! 
     185            ! ice salinity 
     186            IF( TRIM(si(jp_smi)%clrootname) == 'NOT USED' ) & 
     187               &     si(jp_smi)%fnow(:,:,1) = ( rn_smi_ini_n * zswitch + rn_smi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     188            zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 
     189            ! 
     190            ! ice temperature 
     191            IF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) & 
     192               &     si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     193            ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 
     194            ! 
     195            ! surface temperature => set to ice temperature if it exists 
     196            IF    ( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 
     197                     si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     198            ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 
     199                     si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
     200            ENDIF 
     201            zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 
     202            ! 
     203            ! snow temperature => set to ice temperature if it exists 
     204            IF    ( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 
     205                     si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     206            ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 
     207                     si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
     208            ENDIF 
     209            ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 
     210            ! 
     211            ! ponds 
     212            IF( TRIM(si(jp_apd)%clrootname) == 'NOT USED' ) & 
     213               &     si(jp_apd)%fnow(:,:,1) = ( rn_apd_ini_n * zswitch + rn_apd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     214            zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 
     215            IF( TRIM(si(jp_hpd)%clrootname) == 'NOT USED' ) & 
     216               &     si(jp_hpd)%fnow(:,:,1) = ( rn_hpd_ini_n * zswitch + rn_hpd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     217            zhpnd_ini(:,:) = si(jp_hpd)%fnow(:,:,1) 
     218            ! 
     219            ! change the switch for the following 
     220            WHERE( zat_i_ini(:,:) > 0._wp )   ;   zswitch(:,:) = tmask(:,:,1)  
     221            ELSEWHERE                         ;   zswitch(:,:) = 0._wp 
     222            END WHERE 
    142223            !                          !---------------! 
    143224         ELSE                          ! Read namelist ! 
    144225            !                          !---------------! 
    145             ! no ice if sst <= t-freez + ttest 
     226            ! no ice if (sst - Tfreez) >= thresold 
    146227            WHERE( ( sst_m(:,:) - (t_bo(:,:) - rt0) ) * tmask(:,:,1) >= rn_thres_sst )   ;   zswitch(:,:) = 0._wp  
    147228            ELSEWHERE                                                                    ;   zswitch(:,:) = tmask(:,:,1) 
     
    153234               zht_s_ini(:,:) = rn_hts_ini_n * zswitch(:,:) 
    154235               zat_i_ini(:,:) = rn_ati_ini_n * zswitch(:,:) 
    155                zts_u_ini(:,:) = rn_tmi_ini_n * zswitch(:,:) 
    156236               zsm_i_ini(:,:) = rn_smi_ini_n * zswitch(:,:) 
    157237               ztm_i_ini(:,:) = rn_tmi_ini_n * zswitch(:,:) 
     238               zt_su_ini(:,:) = rn_tsu_ini_n * zswitch(:,:) 
     239               ztm_s_ini(:,:) = rn_tms_ini_n * zswitch(:,:) 
     240               zapnd_ini(:,:) = rn_apd_ini_n * zswitch(:,:) 
     241               zhpnd_ini(:,:) = rn_hpd_ini_n * zswitch(:,:) 
    158242            ELSEWHERE 
    159243               zht_i_ini(:,:) = rn_hti_ini_s * zswitch(:,:) 
    160244               zht_s_ini(:,:) = rn_hts_ini_s * zswitch(:,:) 
    161245               zat_i_ini(:,:) = rn_ati_ini_s * zswitch(:,:) 
    162                zts_u_ini(:,:) = rn_tmi_ini_s * zswitch(:,:) 
    163246               zsm_i_ini(:,:) = rn_smi_ini_s * zswitch(:,:) 
    164247               ztm_i_ini(:,:) = rn_tmi_ini_s * zswitch(:,:) 
     248               zt_su_ini(:,:) = rn_tsu_ini_s * zswitch(:,:) 
     249               ztm_s_ini(:,:) = rn_tms_ini_s * zswitch(:,:) 
     250               zapnd_ini(:,:) = rn_apd_ini_s * zswitch(:,:) 
     251               zhpnd_ini(:,:) = rn_hpd_ini_s * zswitch(:,:) 
    165252            END WHERE 
    166             zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:) 
    167253            ! 
    168254         ENDIF 
     255         !-------------! 
     256         ! fill fields ! 
     257         !-------------! 
     258         ! select ice covered grid points 
     259         npti = 0 ; nptidx(:) = 0 
     260         DO jj = 1, jpj 
     261            DO ji = 1, jpi 
     262               IF ( zht_i_ini(ji,jj) > 0._wp ) THEN 
     263                  npti         = npti  + 1 
     264                  nptidx(npti) = (jj - 1) * jpi + ji 
     265               ENDIF 
     266            END DO 
     267         END DO 
     268 
     269         ! move to 1D arrays: (jpi,jpj) -> (jpi*jpj) 
     270         CALL tab_2d_1d( npti, nptidx(1:npti), h_i_1d (1:npti)  , zht_i_ini ) 
     271         CALL tab_2d_1d( npti, nptidx(1:npti), h_s_1d (1:npti)  , zht_s_ini ) 
     272         CALL tab_2d_1d( npti, nptidx(1:npti), at_i_1d(1:npti)  , zat_i_ini ) 
     273         CALL tab_2d_1d( npti, nptidx(1:npti), t_i_1d (1:npti,1), ztm_i_ini ) 
     274         CALL tab_2d_1d( npti, nptidx(1:npti), t_s_1d (1:npti,1), ztm_s_ini ) 
     275         CALL tab_2d_1d( npti, nptidx(1:npti), t_su_1d(1:npti)  , zt_su_ini ) 
     276         CALL tab_2d_1d( npti, nptidx(1:npti), s_i_1d (1:npti)  , zsm_i_ini ) 
     277 
     278         ! allocate temporary arrays 
     279         ALLOCATE( zhi_2d(npti,jpl), zhs_2d(npti,jpl), zai_2d (npti,jpl), & 
     280            &      zti_2d(npti,jpl), zts_2d(npti,jpl), ztsu_2d(npti,jpl), zsi_2d(npti,jpl) ) 
    169281          
    170          !------------------------------------------------------------------ 
    171          ! 3) Distribute ice concentration and thickness into the categories 
    172          !------------------------------------------------------------------ 
    173          ! a gaussian distribution for ice concentration is used 
    174          ! then we check whether the distribution fullfills 
    175          ! volume and area conservation, positivity and ice categories bounds 
    176  
    177          IF( jpl == 1 ) THEN 
    178             ! 
    179             zh_i_ini(:,:,1) = zht_i_ini(:,:) 
    180             za_i_ini(:,:,1) = zat_i_ini(:,:)             
    181             ! 
    182          ELSE 
    183             zh_i_ini(:,:,:) = 0._wp  
    184             za_i_ini(:,:,:) = 0._wp 
    185             ! 
     282         ! distribute 1-cat into jpl-cat: (jpi*jpj) -> (jpi*jpj,jpl) 
     283         CALL ice_var_itd( h_i_1d(1:npti)  , h_s_1d(1:npti)  , at_i_1d(1:npti),                   zhi_2d, zhs_2d, zai_2d , & 
     284            &              t_i_1d(1:npti,1), t_s_1d(1:npti,1), t_su_1d(1:npti), s_i_1d(1:npti),   zti_2d, zts_2d, ztsu_2d, zsi_2d ) 
     285 
     286         ! move to 3D arrays: (jpi*jpj,jpl) -> (jpi,jpj,jpl) 
     287         DO jl = 1, jpl 
     288            zti_3d(:,:,jl) = rt0 * tmask(:,:,1) 
     289            zts_3d(:,:,jl) = rt0 * tmask(:,:,1) 
     290         END DO 
     291         CALL tab_2d_3d( npti, nptidx(1:npti), zhi_2d  , h_i  ) 
     292         CALL tab_2d_3d( npti, nptidx(1:npti), zhs_2d  , h_s  ) 
     293         CALL tab_2d_3d( npti, nptidx(1:npti), zai_2d  , a_i  ) 
     294         CALL tab_2d_3d( npti, nptidx(1:npti), zti_2d  , zti_3d ) 
     295         CALL tab_2d_3d( npti, nptidx(1:npti), zts_2d  , zts_3d ) 
     296         CALL tab_2d_3d( npti, nptidx(1:npti), ztsu_2d , t_su ) 
     297         CALL tab_2d_3d( npti, nptidx(1:npti), zsi_2d  , s_i  ) 
     298 
     299         ! deallocate temporary arrays 
     300         DEALLOCATE( zhi_2d, zhs_2d, zai_2d , & 
     301            &        zti_2d, zts_2d, ztsu_2d, zsi_2d ) 
     302 
     303         ! Melt ponds: distribute uniformely over the categories 
     304         IF ( ln_pnd_CST .OR. ln_pnd_H12 ) THEN 
     305            DO jl = 1, jpl 
     306               a_ip_frac(:,:,jl) = zapnd_ini(:,:) 
     307               h_ip     (:,:,jl) = zhpnd_ini(:,:) 
     308               a_ip     (:,:,jl) = a_ip_frac(:,:,jl) * a_i (:,:,jl)  
     309               v_ip     (:,:,jl) = h_ip     (:,:,jl) * a_ip(:,:,jl) 
     310            END DO 
     311         ENDIF 
     312           
     313         ! calculate extensive and intensive variables 
     314         CALL ice_var_salprof ! for sz_i 
     315         DO jl = 1, jpl 
    186316            DO jj = 1, jpj 
    187317               DO ji = 1, jpi 
    188                   ! 
    189                   IF( zat_i_ini(ji,jj) > 0._wp .AND. zht_i_ini(ji,jj) > 0._wp )THEN 
    190  
    191                      ! find which category (jl0) the input ice thickness falls into 
    192                      jl0 = jpl 
    193                      DO jl = 1, jpl 
    194                         IF ( ( zht_i_ini(ji,jj) >  hi_max(jl-1) ) .AND. ( zht_i_ini(ji,jj) <= hi_max(jl) ) ) THEN 
    195                            jl0 = jl 
    196                            CYCLE 
    197                         ENDIF 
    198                      END DO 
    199                      ! 
    200                      itest(:) = 0 
    201                      i_fill   = jpl + 1                                            !------------------------------------ 
    202                      DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) )   ! iterative loop on i_fill categories 
    203                         !                                                          !------------------------------------ 
    204                         i_fill = i_fill - 1 
    205                         ! 
    206                         zh_i_ini(ji,jj,:) = 0._wp  
    207                         za_i_ini(ji,jj,:) = 0._wp 
    208                         itest(:) = 0 
    209                         ! 
    210                         IF ( i_fill == 1 ) THEN      !-- case very thin ice: fill only category 1 
    211                            zh_i_ini(ji,jj,1) = zht_i_ini(ji,jj) 
    212                            za_i_ini(ji,jj,1) = zat_i_ini(ji,jj) 
    213                         ELSE                         !-- case ice is thicker: fill categories >1 
    214                            ! thickness 
    215                            DO jl = 1, i_fill-1 
    216                               zh_i_ini(ji,jj,jl) = hi_mean(jl) 
    217                            END DO 
    218                            ! 
    219                            ! concentration 
    220                            za_i_ini(ji,jj,jl0) = zat_i_ini(ji,jj) / SQRT(REAL(jpl)) 
    221                            DO jl = 1, i_fill - 1 
    222                               IF( jl /= jl0 )THEN 
    223                                  zarg               = ( zh_i_ini(ji,jj,jl) - zht_i_ini(ji,jj) ) / ( 0.5_wp * zht_i_ini(ji,jj) ) 
    224                                  za_i_ini(ji,jj,jl) = za_i_ini(ji,jj,jl0) * EXP(-zarg**2) 
    225                               ENDIF 
    226                            END DO 
    227  
    228                            ! last category 
    229                            za_i_ini(ji,jj,i_fill) = zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:i_fill-1) ) 
    230                            zV = SUM( za_i_ini(ji,jj,1:i_fill-1) * zh_i_ini(ji,jj,1:i_fill-1) ) 
    231                            zh_i_ini(ji,jj,i_fill) = ( zvt_i_ini(ji,jj) - zV ) / MAX( za_i_ini(ji,jj,i_fill), epsi10 )  
    232  
    233                            ! correction if concentration of upper cat is greater than lower cat 
    234                            !   (it should be a gaussian around jl0 but sometimes it is not) 
    235                            IF ( jl0 /= jpl ) THEN 
    236                               DO jl = jpl, jl0+1, -1 
    237                                  IF ( za_i_ini(ji,jj,jl) > za_i_ini(ji,jj,jl-1) ) THEN 
    238                                     zdv = zh_i_ini(ji,jj,jl) * za_i_ini(ji,jj,jl) 
    239                                     zh_i_ini(ji,jj,jl    ) = 0._wp 
    240                                     za_i_ini(ji,jj,jl    ) = 0._wp 
    241                                     za_i_ini(ji,jj,1:jl-1) = za_i_ini(ji,jj,1:jl-1)  & 
    242                                        &                     + zdv / MAX( REAL(jl-1) * zht_i_ini(ji,jj), epsi10 ) 
    243                                  END IF 
    244                               ENDDO 
    245                            ENDIF 
    246                            ! 
    247                         ENDIF 
    248                         ! 
    249                         ! Compatibility tests 
    250                         zconv = ABS( zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:jpl) ) )           ! Test 1: area conservation 
    251                         IF ( zconv < epsi06 ) itest(1) = 1 
    252                         ! 
    253                         zconv = ABS(       zat_i_ini(ji,jj)       * zht_i_ini(ji,jj)   &         ! Test 2: volume conservation 
    254                            &        - SUM( za_i_ini (ji,jj,1:jpl) * zh_i_ini (ji,jj,1:jpl) ) ) 
    255                         IF ( zconv < epsi06 ) itest(2) = 1 
    256                         ! 
    257                         IF ( zh_i_ini(ji,jj,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1           ! Test 3: thickness of the last category is in-bounds ? 
    258                         ! 
    259                         itest(4) = 1 
    260                         DO jl = 1, i_fill 
    261                            IF ( za_i_ini(ji,jj,jl) < 0._wp ) itest(4) = 0                        ! Test 4: positivity of ice concentrations 
    262                         END DO 
    263                         !                                                          !---------------------------- 
    264                      END DO                                                        ! end iteration on categories 
    265                      !                                                             !---------------------------- 
    266                      IF( lwp .AND. SUM(itest) /= 4 ) THEN  
    267                         WRITE(numout,*) 
    268                         WRITE(numout,*) ' !!!! ALERT itest is not equal to 4      !!! ' 
    269                         WRITE(numout,*) ' !!!! Something is wrong in the SI3 initialization procedure ' 
    270                         WRITE(numout,*) 
    271                         WRITE(numout,*) ' *** itest_i (i=1,4) = ', itest(:) 
    272                         WRITE(numout,*) ' zat_i_ini : ', zat_i_ini(ji,jj) 
    273                         WRITE(numout,*) ' zht_i_ini : ', zht_i_ini(ji,jj) 
    274                      ENDIF 
    275                      ! 
    276                   ENDIF 
    277                   ! 
     318                  v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) 
     319                  v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) 
     320                  sv_i(ji,jj,jl) = MIN( MAX( rn_simin , s_i(ji,jj,jl) ) , rn_simax ) * v_i(ji,jj,jl) 
    278321               END DO 
    279322            END DO 
    280          ENDIF 
    281           
    282          !--------------------------------------------------------------------- 
    283          ! 4) Fill in sea ice arrays 
    284          !--------------------------------------------------------------------- 
    285          ! 
    286          ! Ice concentration, thickness and volume, ice salinity, ice age, surface temperature 
    287          DO jl = 1, jpl ! loop over categories 
    288             DO jj = 1, jpj 
    289                DO ji = 1, jpi 
    290                   a_i(ji,jj,jl)  = zswitch(ji,jj) * za_i_ini(ji,jj,jl)                       ! concentration 
    291                   h_i(ji,jj,jl)  = zswitch(ji,jj) * zh_i_ini(ji,jj,jl)                       ! ice thickness 
    292                   s_i(ji,jj,jl)  = zswitch(ji,jj) * zsm_i_ini(ji,jj)                         ! salinity 
    293                   o_i(ji,jj,jl)  = 0._wp                                                     ! age (0 day) 
    294                   t_su(ji,jj,jl) = zswitch(ji,jj) * zts_u_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rt0 ! surf temp 
    295                   ! 
    296                   IF( zht_i_ini(ji,jj) > 0._wp )THEN 
    297                     h_s(ji,jj,jl)= h_i(ji,jj,jl) * ( zht_s_ini(ji,jj) / zht_i_ini(ji,jj) )  ! snow depth 
    298                   ELSE 
    299                     h_s(ji,jj,jl)= 0._wp 
    300                   ENDIF 
    301                   ! 
    302                   ! This case below should not be used if (h_s/h_i) is ok in namelist 
    303                   ! In case snow load is in excess that would lead to transformation from snow to ice 
    304                   ! Then, transfer the snow excess into the ice (different from icethd_dh) 
    305                   zdh = MAX( 0._wp, ( rhos * h_s(ji,jj,jl) + ( rhoi - rau0 ) * h_i(ji,jj,jl) ) * r1_rau0 )  
    306                   ! recompute h_i, h_s avoiding out of bounds values 
    307                   h_i(ji,jj,jl) = MIN( hi_max(jl), h_i(ji,jj,jl) + zdh ) 
    308                   h_s(ji,jj,jl) = MAX( 0._wp, h_s(ji,jj,jl) - zdh * rhoi * r1_rhos ) 
    309                   ! 
    310                   ! ice volume, salt content, age content 
    311                   v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl)              ! ice volume 
    312                   v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl)              ! snow volume 
    313                   sv_i(ji,jj,jl) = MIN( s_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) ! salt content 
    314                   oa_i(ji,jj,jl) = o_i(ji,jj,jl) * a_i(ji,jj,jl)               ! age content 
    315                END DO 
    316             END DO 
    317          END DO 
    318          ! 
    319          IF( nn_icesal /= 2 )  THEN         ! for constant salinity in time 
    320             CALL ice_var_salprof 
    321             sv_i = s_i * v_i 
    322          ENDIF 
    323          !   
    324          ! Snow temperature and heat content 
    325          DO jk = 1, nlay_s 
    326             DO jl = 1, jpl ! loop over categories 
     323         END DO 
     324         ! 
     325         DO jl = 1, jpl 
     326            DO jk = 1, nlay_s 
    327327               DO jj = 1, jpj 
    328328                  DO ji = 1, jpi 
    329                      t_s(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rt0 
    330                      ! Snow energy of melting 
    331                      e_s(ji,jj,jk,jl) = zswitch(ji,jj) * rhos * ( rcpi * ( rt0 - t_s(ji,jj,jk,jl) ) + rLfus ) 
    332                      ! 
    333                      ! Mutliply by volume, and divide by number of layers to get heat content in J/m2 
    334                      e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * v_s(ji,jj,jl) * r1_nlay_s 
     329                     t_s(ji,jj,jk,jl) = zts_3d(ji,jj,jl) 
     330                     e_s(ji,jj,jk,jl) = zswitch(ji,jj) * v_s(ji,jj,jl) * r1_nlay_s * & 
     331                        &               rhos * ( rcpi * ( rt0 - t_s(ji,jj,jk,jl) ) + rLfus ) 
    335332                  END DO 
    336333               END DO 
     
    338335         END DO 
    339336         ! 
    340          ! Ice salinity, temperature and heat content 
    341          DO jk = 1, nlay_i 
    342             DO jl = 1, jpl ! loop over categories 
     337         DO jl = 1, jpl 
     338            DO jk = 1, nlay_i 
    343339               DO jj = 1, jpj 
    344340                  DO ji = 1, jpi 
    345                      t_i (ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rt0  
    346                      sz_i(ji,jj,jk,jl) = zswitch(ji,jj) * zsm_i_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rn_simin 
    347                      ztmelts          = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 !Melting temperature in K 
    348                      ! 
    349                      ! heat content per unit volume 
    350                      e_i(ji,jj,jk,jl) = zswitch(ji,jj) * rhoi * (   rcpi    * ( ztmelts - t_i(ji,jj,jk,jl) )           & 
    351                         &             + rLfus * ( 1._wp - (ztmelts-rt0) / MIN( (t_i(ji,jj,jk,jl)-rt0) , -epsi20 )  )   & 
    352                         &             - rcp  * ( ztmelts - rt0 ) ) 
    353                      ! 
    354                      ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 
    355                      e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * v_i(ji,jj,jl) * r1_nlay_i 
     341                     t_i (ji,jj,jk,jl) = zti_3d(ji,jj,jl)  
     342                     ztmelts          = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 ! melting temperature in K 
     343                     e_i(ji,jj,jk,jl) = zswitch(ji,jj) * v_i(ji,jj,jl) * r1_nlay_i * & 
     344                        &               rhoi * (  rcpi  * ( ztmelts - t_i(ji,jj,jk,jl) ) + & 
     345                        &                         rLfus * ( 1._wp - (ztmelts-rt0) / MIN( (t_i(ji,jj,jk,jl)-rt0), -epsi20 ) ) & 
     346                        &                       - rcp   * ( ztmelts - rt0 ) ) 
    356347                  END DO 
    357348               END DO 
    358349            END DO 
    359350         END DO 
    360          ! 
    361          tn_ice (:,:,:) = t_su (:,:,:) 
    362          t1_ice (:,:,:) = t_i (:,:,1,:)   ! initialisation of 1st layer temp for coupled simu 
    363  
    364          ! Melt pond volume and fraction 
    365          IF ( ln_pnd_CST .OR. ln_pnd_H12 ) THEN   ;   zfac = 1._wp 
    366          ELSE                                     ;   zfac = 0._wp 
    367          ENDIF  
    368          DO jl = 1, jpl 
    369             a_ip_frac(:,:,jl) = rn_apnd * zswitch(:,:) * zfac 
    370             h_ip     (:,:,jl) = rn_hpnd * zswitch(:,:) * zfac 
    371          END DO 
    372          a_ip(:,:,:) = a_ip_frac(:,:,:) * a_i (:,:,:)  
    373          v_ip(:,:,:) = h_ip     (:,:,:) * a_ip(:,:,:) 
    374          ! 
    375       ELSE ! if ln_iceini=false 
    376          a_i  (:,:,:) = 0._wp 
    377          v_i  (:,:,:) = 0._wp 
    378          v_s  (:,:,:) = 0._wp 
    379          sv_i (:,:,:) = 0._wp 
    380          oa_i (:,:,:) = 0._wp 
    381          h_i  (:,:,:) = 0._wp 
    382          h_s  (:,:,:) = 0._wp 
    383          s_i  (:,:,:) = 0._wp 
    384          o_i  (:,:,:) = 0._wp 
    385          ! 
    386          e_i(:,:,:,:) = 0._wp 
    387          e_s(:,:,:,:) = 0._wp 
    388          ! 
    389          DO jl = 1, jpl 
    390             DO jk = 1, nlay_i 
    391                t_i(:,:,jk,jl) = rt0 * tmask(:,:,1) 
    392             END DO 
    393             DO jk = 1, nlay_s 
    394                t_s(:,:,jk,jl) = rt0 * tmask(:,:,1) 
    395             END DO 
    396          END DO 
    397  
    398          tn_ice (:,:,:) = t_i (:,:,1,:) 
    399          t1_ice (:,:,:) = t_i (:,:,1,:)   ! initialisation of 1st layer temp for coupled simu 
    400           
    401          a_ip(:,:,:)      = 0._wp 
    402          v_ip(:,:,:)      = 0._wp 
    403          a_ip_frac(:,:,:) = 0._wp 
    404          h_ip     (:,:,:) = 0._wp 
     351 
     352         ! specific temperatures for coupled runs 
     353         tn_ice(:,:,:) = t_su(:,:,:) 
     354         t1_ice(:,:,:) = t_i (:,:,1,:) 
    405355         ! 
    406356      ENDIF ! ln_iceini 
    407357      ! 
    408       at_i (:,:) = 0.0_wp 
    409       DO jl = 1, jpl 
    410          at_i (:,:) = at_i (:,:) + a_i (:,:,jl) 
    411       END DO 
    412       ! 
    413       ! --- set ice velocities --- ! 
    414       u_ice (:,:) = 0._wp 
    415       v_ice (:,:) = 0._wp 
    416       ! fields needed for ice_dyn_adv_umx 
    417       l_split_advumx(1) = .FALSE. 
     358      at_i(:,:) = SUM( a_i, dim=3 ) 
    418359      ! 
    419360      !---------------------------------------------- 
    420       ! 5) Snow-ice mass (case ice is fully embedded) 
     361      ! 3) Snow-ice mass (case ice is fully embedded) 
    421362      !---------------------------------------------- 
    422363      snwice_mass  (:,:) = tmask(:,:,1) * SUM( rhos * v_s(:,:,:) + rhoi * v_i(:,:,:), dim=3  )   ! snow+ice mass 
     
    470411       
    471412      !------------------------------------ 
    472       ! 6) store fields at before time-step 
     413      ! 4) store fields at before time-step 
    473414      !------------------------------------ 
    474415      ! it is only necessary for the 1st interpolation by Agrif 
     
    508449      ! 
    509450      CHARACTER(len=256) ::  cn_dir          ! Root directory for location of ice files 
    510       TYPE(FLD_N)                    ::   sn_hti, sn_hts, sn_ati, sn_tsu, sn_tmi, sn_smi 
     451      TYPE(FLD_N)                    ::   sn_hti, sn_hts, sn_ati, sn_smi, sn_tmi, sn_tsu, sn_tms, sn_apd, sn_hpd 
    511452      TYPE(FLD_N), DIMENSION(jpfldi) ::   slf_i                 ! array of namelist informations on the fields to read 
    512453      ! 
    513       NAMELIST/namini/ ln_iceini, ln_iceini_file, rn_thres_sst, rn_hts_ini_n, rn_hts_ini_s,  & 
    514          &             rn_hti_ini_n, rn_hti_ini_s, rn_ati_ini_n, rn_ati_ini_s, rn_smi_ini_n, & 
    515          &             rn_smi_ini_s, rn_tmi_ini_n, rn_tmi_ini_s,                             & 
    516          &             sn_hti, sn_hts, sn_ati, sn_tsu, sn_tmi, sn_smi, cn_dir 
     454      NAMELIST/namini/ ln_iceini, ln_iceini_file, rn_thres_sst, & 
     455         &             rn_hti_ini_n, rn_hti_ini_s, rn_hts_ini_n, rn_hts_ini_s, & 
     456         &             rn_ati_ini_n, rn_ati_ini_s, rn_smi_ini_n, rn_smi_ini_s, & 
     457         &             rn_tmi_ini_n, rn_tmi_ini_s, rn_tsu_ini_n, rn_tsu_ini_s, rn_tms_ini_n, rn_tms_ini_s, & 
     458         &             rn_apd_ini_n, rn_apd_ini_s, rn_hpd_ini_n, rn_hpd_ini_s, & 
     459         &             sn_hti, sn_hts, sn_ati, sn_tsu, sn_tmi, sn_smi, sn_tms, sn_apd, sn_hpd, cn_dir 
    517460      !!----------------------------------------------------------------------------- 
    518461      ! 
     
    526469      ! 
    527470      slf_i(jp_hti) = sn_hti  ;  slf_i(jp_hts) = sn_hts 
    528       slf_i(jp_ati) = sn_ati  ;  slf_i(jp_tsu) = sn_tsu 
    529       slf_i(jp_tmi) = sn_tmi  ;  slf_i(jp_smi) = sn_smi 
     471      slf_i(jp_ati) = sn_ati  ;  slf_i(jp_smi) = sn_smi 
     472      slf_i(jp_tmi) = sn_tmi  ;  slf_i(jp_tsu) = sn_tsu   ;   slf_i(jp_tms) = sn_tms 
     473      slf_i(jp_apd) = sn_apd  ;  slf_i(jp_hpd) = sn_hpd 
    530474      ! 
    531475      IF(lwp) THEN                          ! control print 
     
    534478         WRITE(numout,*) '~~~~~~~~~~~~~~~' 
    535479         WRITE(numout,*) '   Namelist namini:' 
    536          WRITE(numout,*) '      initialization with ice (T) or not (F)                 ln_iceini       = ', ln_iceini 
    537          WRITE(numout,*) '      ice initialization from a netcdf file                  ln_iceini_file  = ', ln_iceini_file 
    538          WRITE(numout,*) '      max delta ocean temp. above Tfreeze with initial ice   rn_thres_sst    = ', rn_thres_sst 
    539          WRITE(numout,*) '      initial snow thickness in the north                    rn_hts_ini_n    = ', rn_hts_ini_n 
    540          WRITE(numout,*) '      initial snow thickness in the south                    rn_hts_ini_s    = ', rn_hts_ini_s  
    541          WRITE(numout,*) '      initial ice thickness  in the north                    rn_hti_ini_n    = ', rn_hti_ini_n 
    542          WRITE(numout,*) '      initial ice thickness  in the south                    rn_hti_ini_s    = ', rn_hti_ini_s 
    543          WRITE(numout,*) '      initial ice concentr.  in the north                    rn_ati_ini_n    = ', rn_ati_ini_n 
    544          WRITE(numout,*) '      initial ice concentr.  in the north                    rn_ati_ini_s    = ', rn_ati_ini_s 
    545          WRITE(numout,*) '      initial  ice salinity  in the north                    rn_smi_ini_n    = ', rn_smi_ini_n 
    546          WRITE(numout,*) '      initial  ice salinity  in the south                    rn_smi_ini_s    = ', rn_smi_ini_s 
    547          WRITE(numout,*) '      initial  ice/snw temp  in the north                    rn_tmi_ini_n    = ', rn_tmi_ini_n 
    548          WRITE(numout,*) '      initial  ice/snw temp  in the south                    rn_tmi_ini_s    = ', rn_tmi_ini_s 
     480         WRITE(numout,*) '      ice initialization (T) or not (F)                ln_iceini      = ', ln_iceini 
     481         WRITE(numout,*) '      ice initialization from a netcdf file            ln_iceini_file = ', ln_iceini_file 
     482         WRITE(numout,*) '      max ocean temp. above Tfreeze with initial ice   rn_thres_sst   = ', rn_thres_sst 
     483         IF( ln_iceini .AND. .NOT.ln_iceini_file ) THEN 
     484            WRITE(numout,*) '      initial snw thickness in the north-south         rn_hts_ini     = ', rn_hts_ini_n,rn_hts_ini_s  
     485            WRITE(numout,*) '      initial ice thickness in the north-south         rn_hti_ini     = ', rn_hti_ini_n,rn_hti_ini_s 
     486            WRITE(numout,*) '      initial ice concentr  in the north-south         rn_ati_ini     = ', rn_ati_ini_n,rn_ati_ini_s 
     487            WRITE(numout,*) '      initial ice salinity  in the north-south         rn_smi_ini     = ', rn_smi_ini_n,rn_smi_ini_s 
     488            WRITE(numout,*) '      initial surf temperat in the north-south         rn_tsu_ini     = ', rn_tsu_ini_n,rn_tsu_ini_s 
     489            WRITE(numout,*) '      initial ice temperat  in the north-south         rn_tmi_ini     = ', rn_tmi_ini_n,rn_tmi_ini_s 
     490            WRITE(numout,*) '      initial snw temperat  in the north-south         rn_tms_ini     = ', rn_tms_ini_n,rn_tms_ini_s 
     491            WRITE(numout,*) '      initial pnd fraction  in the north-south         rn_apd_ini     = ', rn_apd_ini_n,rn_apd_ini_s 
     492            WRITE(numout,*) '      initial pnd depth     in the north-south         rn_hpd_ini     = ', rn_hpd_ini_n,rn_hpd_ini_s 
     493         ENDIF 
    549494      ENDIF 
    550495      ! 
     
    554499         ALLOCATE( si(jpfldi), STAT=ierror ) 
    555500         IF( ierror > 0 ) THEN 
    556             CALL ctl_stop( 'Ice_ini in iceistate: unable to allocate si structure' )   ;   RETURN 
     501            CALL ctl_stop( 'ice_istate_ini in iceistate: unable to allocate si structure' )   ;   RETURN 
    557502         ENDIF 
    558503         ! 
    559504         DO ifpr = 1, jpfldi 
    560505            ALLOCATE( si(ifpr)%fnow(jpi,jpj,1) ) 
    561             ALLOCATE( si(ifpr)%fdta(jpi,jpj,1,2) ) 
     506            IF( slf_i(ifpr)%ln_tint )  ALLOCATE( si(ifpr)%fdta(jpi,jpj,1,2) ) 
    562507         END DO 
    563508         ! 
    564509         ! fill si with slf_i and control print 
    565          CALL fld_fill( si, slf_i, cn_dir, 'ice_istate', 'ice istate ini', 'numnam_ice' ) 
    566          ! 
    567          CALL fld_read( nit000, 1, si )                ! input fields provided at the current time-step 
     510         CALL fld_fill( si, slf_i, cn_dir, 'ice_istate_ini', 'initialization of sea ice fields', 'numnam_ice' ) 
    568511         ! 
    569512      ENDIF 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icerst.F90

    r10425 r11413  
    1414   !!   ice_rst_read  : read  restart file  
    1515   !!---------------------------------------------------------------------- 
    16    USE ice            ! sea-ice variables 
     16   USE ice            ! sea-ice: variables 
    1717   USE dom_oce        ! ocean domain 
     18   USE phycst  , ONLY : rt0 
    1819   USE sbc_oce , ONLY : nn_fsbc, ln_cpl 
    19    USE icectl 
     20   USE iceistate      ! sea-ice: initial state 
     21   USE icectl         ! sea-ice: control 
    2022   ! 
    2123   USE in_out_manager ! I/O manager 
     
    5355      IF( kt == nit000 )   lrst_ice = .FALSE.   ! default definition 
    5456 
     57      IF( ln_rst_list .OR. nn_stock /= -1 ) THEN 
    5558      ! in order to get better performances with NetCDF format, we open and define the ice restart file  
    5659      ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice  
    5760      ! restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 
    58       IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc    & 
     61      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nn_stock == nn_fsbc    & 
    5962         &                             .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 
    6063         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
     
    8184         ENDIF 
    8285      ENDIF 
     86      ENDIF 
    8387      ! 
    8488      IF( ln_icectl )   CALL ice_prt( kt, iiceprt, jiceprt, 1, ' - Beginning the time step - ' )   ! control print 
     
    118122 
    119123      ! Prognostic variables 
    120       CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i  ) 
    121       CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s  ) 
    122       CALL iom_rstput( iter, nitrst, numriw, 'sv_i', sv_i ) 
    123       CALL iom_rstput( iter, nitrst, numriw, 'oa_i', oa_i ) 
    124       CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i  ) 
    125       CALL iom_rstput( iter, nitrst, numriw, 't_su', t_su ) 
    126       ! Melt ponds 
    127       CALL iom_rstput( iter, nitrst, numriw, 'a_ip', a_ip ) 
    128       CALL iom_rstput( iter, nitrst, numriw, 'v_ip', v_ip ) 
     124      CALL iom_rstput( iter, nitrst, numriw, 'v_i'  , v_i   ) 
     125      CALL iom_rstput( iter, nitrst, numriw, 'v_s'  , v_s   ) 
     126      CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i  ) 
     127      CALL iom_rstput( iter, nitrst, numriw, 'a_i'  , a_i   ) 
     128      CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su  ) 
     129      CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice ) 
     130      CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice ) 
     131      CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i  ) 
     132      CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip  ) 
     133      CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip  ) 
    129134      ! Snow enthalpy 
    130135      DO jk = 1, nlay_s  
     
    141146         CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    142147      END DO 
    143       ! ice velocity 
    144       CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice ) ! u_ice 
    145       CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice ) ! v_ice 
    146148      ! fields needed for Met Office (Jules) coupling 
    147149      IF( ln_cpl ) THEN 
     
    169171      INTEGER           ::   jk 
    170172      LOGICAL           ::   llok 
    171       INTEGER           ::   id1            ! local integer 
     173      INTEGER           ::   id0, id1, id2, id3, id4   ! local integer 
    172174      CHARACTER(len=25) ::   znam 
    173175      CHARACTER(len=2)  ::   zchar, zchar1 
     
    184186      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kdlev = jpl ) 
    185187 
    186       CALL iom_get( numrir, 'nn_fsbc', zfice ) 
    187       CALL iom_get( numrir, 'kt_ice' , ziter )     
    188       IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', ziter 
    189       IF(lwp) WRITE(numout,*) '   in any case we force it to nit000 - 1 : ', nit000 - 1 
    190  
    191       ! Control of date 
    192       IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 )   & 
    193          &     CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nit000 in ice restart',  & 
    194          &                   '   verify the file or rerun with the value 0 for the',        & 
    195          &                   '   control of time parameter  nrstdt' ) 
    196       IF( NINT(zfice) /= nn_fsbc          .AND. ABS( nrstdt ) == 1 )   & 
    197          &     CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart',  & 
    198          &                   '   verify the file or rerun with the value 0 for the',         & 
    199          &                   '   control of time parameter  nrstdt' ) 
    200  
    201       ! Prognostic variables  
    202       CALL iom_get( numrir, jpdom_autoglo, 'v_i' , v_i  ) 
    203       CALL iom_get( numrir, jpdom_autoglo, 'v_s' , v_s  ) 
    204       CALL iom_get( numrir, jpdom_autoglo, 'sv_i', sv_i ) 
    205       CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 
    206       CALL iom_get( numrir, jpdom_autoglo, 'a_i' , a_i  ) 
    207       CALL iom_get( numrir, jpdom_autoglo, 't_su', t_su ) 
    208       ! Melt ponds 
    209       id1 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 
    210       IF( id1 > 0 ) THEN                       ! fields exist (melt ponds) 
    211          CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 
    212          CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 
    213       ELSE                                     ! start from rest 
    214          IF(lwp) WRITE(numout,*) '   ==>>   previous run without melt ponds output then set it to zero' 
    215          a_ip(:,:,:) = 0._wp 
    216          v_ip(:,:,:) = 0._wp 
    217       ENDIF 
    218       ! Snow enthalpy 
    219       DO jk = 1, nlay_s 
    220          WRITE(zchar1,'(I2.2)') jk 
    221          znam = 'e_s'//'_l'//zchar1 
    222          CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 
    223          e_s(:,:,jk,:) = z3d(:,:,:) 
    224       END DO 
    225       ! Ice enthalpy 
    226       DO jk = 1, nlay_i 
    227          WRITE(zchar1,'(I2.2)') jk 
    228          znam = 'e_i'//'_l'//zchar1 
    229          CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 
    230          e_i(:,:,jk,:) = z3d(:,:,:) 
    231       END DO 
    232       ! ice velocity 
    233       CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 
    234       CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 
    235  
    236       CALL iom_delay_rst( 'READ', 'ICE', numrir )   ! read only ice delayed global communication variables 
    237  
    238       ! fields needed for Met Office (Jules) coupling 
    239       IF( ln_cpl ) THEN 
    240          CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 
    241          CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice  ) 
     188      ! test if v_i exists  
     189      id0 = iom_varid( numrir, 'v_i' , ldstop = .FALSE. ) 
     190 
     191      !                    ! ------------------------------ ! 
     192      IF( id0 > 0 ) THEN   ! == case of a normal restart == ! 
     193         !                 ! ------------------------------ ! 
     194          
     195         ! Time info 
     196         CALL iom_get( numrir, 'nn_fsbc', zfice ) 
     197         CALL iom_get( numrir, 'kt_ice' , ziter )     
     198         IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', ziter 
     199         IF(lwp) WRITE(numout,*) '   in any case we force it to nit000 - 1 : ', nit000 - 1 
     200 
     201         ! Control of date 
     202         IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 )   & 
     203            &     CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nit000 in ice restart',  & 
     204            &                   '   verify the file or rerun with the value 0 for the',        & 
     205            &                   '   control of time parameter  nrstdt' ) 
     206         IF( NINT(zfice) /= nn_fsbc          .AND. ABS( nrstdt ) == 1 )   & 
     207            &     CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart',  & 
     208            &                   '   verify the file or rerun with the value 0 for the',         & 
     209            &                   '   control of time parameter  nrstdt' ) 
     210 
     211         ! --- mandatory fields --- !  
     212         CALL iom_get( numrir, jpdom_autoglo, 'v_i'  , v_i   ) 
     213         CALL iom_get( numrir, jpdom_autoglo, 'v_s'  , v_s   ) 
     214         CALL iom_get( numrir, jpdom_autoglo, 'sv_i' , sv_i  ) 
     215         CALL iom_get( numrir, jpdom_autoglo, 'a_i'  , a_i   ) 
     216         CALL iom_get( numrir, jpdom_autoglo, 't_su' , t_su  ) 
     217         CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 
     218         CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 
     219         ! Snow enthalpy 
     220         DO jk = 1, nlay_s 
     221            WRITE(zchar1,'(I2.2)') jk 
     222            znam = 'e_s'//'_l'//zchar1 
     223            CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 
     224            e_s(:,:,jk,:) = z3d(:,:,:) 
     225         END DO 
     226         ! Ice enthalpy 
     227         DO jk = 1, nlay_i 
     228            WRITE(zchar1,'(I2.2)') jk 
     229            znam = 'e_i'//'_l'//zchar1 
     230            CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 
     231            e_i(:,:,jk,:) = z3d(:,:,:) 
     232         END DO 
     233         ! -- optional fields -- ! 
     234         ! ice age 
     235         id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 
     236         IF( id1 > 0 ) THEN                       ! fields exist 
     237            CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 
     238         ELSE                                     ! start from rest 
     239            IF(lwp) WRITE(numout,*) '   ==>>   previous run without ice age output then set it to zero' 
     240            oa_i(:,:,:) = 0._wp 
     241         ENDIF 
     242         ! melt ponds 
     243         id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 
     244         IF( id2 > 0 ) THEN                       ! fields exist 
     245            CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 
     246            CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 
     247         ELSE                                     ! start from rest 
     248            IF(lwp) WRITE(numout,*) '   ==>>   previous run without melt ponds output then set it to zero' 
     249            a_ip(:,:,:) = 0._wp 
     250            v_ip(:,:,:) = 0._wp 
     251         ENDIF 
     252         ! fields needed for Met Office (Jules) coupling 
     253         IF( ln_cpl ) THEN 
     254            id3 = iom_varid( numrir, 'cnd_ice' , ldstop = .FALSE. ) 
     255            id4 = iom_varid( numrir, 't1_ice'  , ldstop = .FALSE. ) 
     256            IF( id3 > 0 .AND. id4 > 0 ) THEN         ! fields exist 
     257               CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 
     258               CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice  ) 
     259            ELSE                                     ! start from rest 
     260               IF(lwp) WRITE(numout,*) '   ==>>   previous run without conductivity output then set it to zero' 
     261               cnd_ice(:,:,:) = 0._wp 
     262               t1_ice (:,:,:) = rt0 
     263            ENDIF 
     264         ENDIF 
     265 
     266         CALL iom_delay_rst( 'READ', 'ICE', numrir )   ! read only ice delayed global communication variables 
     267 
     268         !                 ! ---------------------------------- ! 
     269      ELSE                 ! == case of a simplified restart == ! 
     270         !                 ! ---------------------------------- ! 
     271         CALL ctl_warn('ice_rst_read: you are using a simplified ice restart') 
     272         ! 
     273         CALL ice_istate_init 
     274         CALL ice_istate( nit000 ) 
     275         ! 
     276         IF( .NOT.ln_iceini .OR. .NOT.ln_iceini_file ) & 
     277            &   CALL ctl_stop('STOP', 'ice_rst_read: you need ln_ice_ini=T and ln_iceini_file=T') 
     278         ! 
    242279      ENDIF 
    243280 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icesbc.F90

    r11360 r11413  
    118118      INTEGER, INTENT(in) ::   ksbc   ! flux formulation (user defined, bulk or Pure Coupled) 
    119119      ! 
    120       INTEGER  ::   ji, jj, jl                                ! dummy loop index 
    121       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
    122       REAL(wp), DIMENSION(jpi,jpj)     ::   zalb              ! 2D workspace 
     120      INTEGER  ::   ji, jj, jl      ! dummy loop index 
     121      REAL(wp) ::   zmiss_val       ! missing value retrieved from xios  
     122      REAL(wp), DIMENSION(jpi,jpj,jpl)              ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
     123      REAL(wp), DIMENSION(:,:)        , ALLOCATABLE ::   zalb, zmsk00      ! 2D workspace 
    123124      !!-------------------------------------------------------------------- 
    124125      ! 
     
    130131         WRITE(numout,*)'~~~~~~~~~~~~~~~' 
    131132      ENDIF 
     133 
     134      ! get missing value from xml 
     135      CALL iom_miss_val( "icetemp", zmiss_val ) 
    132136 
    133137      ! --- cloud-sky and overcast-sky ice albedos --- ! 
     
    157161 
    158162      !--- output ice albedo and surface albedo ---! 
    159       IF( iom_use('icealb') ) THEN 
    160          WHERE( at_i_b <= epsi06 )   ;   zalb(:,:) = rn_alb_oce 
    161          ELSEWHERE                   ;   zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 
     163      IF( iom_use('icealb') .OR. iom_use('albedo') ) THEN 
     164 
     165         ALLOCATE( zalb(jpi,jpj), zmsk00(jpi,jpj) ) 
     166 
     167         WHERE( at_i_b <= epsi06 ) 
     168            zmsk00(:,:) = 0._wp 
     169            zalb  (:,:) = rn_alb_oce 
     170         ELSEWHERE 
     171            zmsk00(:,:) = 1._wp             
     172            zalb  (:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 
    162173         END WHERE 
    163          CALL iom_put( "icealb" , zalb(:,:) ) 
    164       ENDIF 
    165       IF( iom_use('albedo') ) THEN 
     174         ! ice albedo 
     175         CALL iom_put( 'icealb' , zalb * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     176         ! ice+ocean albedo 
    166177         zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) + rn_alb_oce * ( 1._wp - at_i_b ) 
    167          CALL iom_put( "albedo" , zalb(:,:) ) 
     178         CALL iom_put( 'albedo' , zalb ) 
     179 
     180         DEALLOCATE( zalb, zmsk00 ) 
     181 
    168182      ENDIF 
    169183      ! 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icestp.F90

    r11348 r11413  
    254254      IF( .NOT. ln_rstart ) THEN              ! start from rest: sea-ice deduced from sst 
    255255         CALL ice_istate_init 
    256          CALL ice_istate 
     256         CALL ice_istate( nit000 ) 
    257257      ELSE                                    ! start from a restart file 
    258258         CALL ice_rst_read 
     
    425425      wfx_err_sub(:,:) = 0._wp 
    426426      ! 
    427       afx_tot(:,:) = 0._wp   ; 
    428       ! 
    429427      diag_heat(:,:) = 0._wp ;   diag_sice(:,:) = 0._wp 
    430428      diag_vice(:,:) = 0._wp ;   diag_vsnw(:,:) = 0._wp 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/iceupdate.F90

    r10425 r11413  
    198198      ! --- salt fluxes [kg/m2/s] --- ! 
    199199      !                           ! sfxice =  sfxbog + sfxbom + sfxsum + sfxsni + sfxopw + sfxres + sfxdyn + sfxbri + sfxsub + sfxlam 
    200       IF( iom_use('sfxice'  ) )   CALL iom_put( "sfxice", sfx     * 1.e-03 )   ! salt flux from total ice growth/melt 
    201       IF( iom_use('sfxbog'  ) )   CALL iom_put( "sfxbog", sfx_bog * 1.e-03 )   ! salt flux from bottom growth 
    202       IF( iom_use('sfxbom'  ) )   CALL iom_put( "sfxbom", sfx_bom * 1.e-03 )   ! salt flux from bottom melting 
    203       IF( iom_use('sfxsum'  ) )   CALL iom_put( "sfxsum", sfx_sum * 1.e-03 )   ! salt flux from surface melting 
    204       IF( iom_use('sfxlam'  ) )   CALL iom_put( "sfxlam", sfx_lam * 1.e-03 )   ! salt flux from lateral melting 
    205       IF( iom_use('sfxsni'  ) )   CALL iom_put( "sfxsni", sfx_sni * 1.e-03 )   ! salt flux from snow ice formation 
    206       IF( iom_use('sfxopw'  ) )   CALL iom_put( "sfxopw", sfx_opw * 1.e-03 )   ! salt flux from open water formation 
    207       IF( iom_use('sfxdyn'  ) )   CALL iom_put( "sfxdyn", sfx_dyn * 1.e-03 )   ! salt flux from ridging rafting 
    208       IF( iom_use('sfxbri'  ) )   CALL iom_put( "sfxbri", sfx_bri * 1.e-03 )   ! salt flux from brines 
    209       IF( iom_use('sfxres'  ) )   CALL iom_put( "sfxres", sfx_res * 1.e-03 )   ! salt flux from undiagnosed processes 
    210       IF( iom_use('sfxsub'  ) )   CALL iom_put( "sfxsub", sfx_sub * 1.e-03 )   ! salt flux from sublimation 
     200      IF( iom_use('sfxice'  ) )   CALL iom_put( 'sfxice', sfx     * 1.e-03 )   ! salt flux from total ice growth/melt 
     201      IF( iom_use('sfxbog'  ) )   CALL iom_put( 'sfxbog', sfx_bog * 1.e-03 )   ! salt flux from bottom growth 
     202      IF( iom_use('sfxbom'  ) )   CALL iom_put( 'sfxbom', sfx_bom * 1.e-03 )   ! salt flux from bottom melting 
     203      IF( iom_use('sfxsum'  ) )   CALL iom_put( 'sfxsum', sfx_sum * 1.e-03 )   ! salt flux from surface melting 
     204      IF( iom_use('sfxlam'  ) )   CALL iom_put( 'sfxlam', sfx_lam * 1.e-03 )   ! salt flux from lateral melting 
     205      IF( iom_use('sfxsni'  ) )   CALL iom_put( 'sfxsni', sfx_sni * 1.e-03 )   ! salt flux from snow ice formation 
     206      IF( iom_use('sfxopw'  ) )   CALL iom_put( 'sfxopw', sfx_opw * 1.e-03 )   ! salt flux from open water formation 
     207      IF( iom_use('sfxdyn'  ) )   CALL iom_put( 'sfxdyn', sfx_dyn * 1.e-03 )   ! salt flux from ridging rafting 
     208      IF( iom_use('sfxbri'  ) )   CALL iom_put( 'sfxbri', sfx_bri * 1.e-03 )   ! salt flux from brines 
     209      IF( iom_use('sfxres'  ) )   CALL iom_put( 'sfxres', sfx_res * 1.e-03 )   ! salt flux from undiagnosed processes 
     210      IF( iom_use('sfxsub'  ) )   CALL iom_put( 'sfxsub', sfx_sub * 1.e-03 )   ! salt flux from sublimation 
    211211 
    212212      ! --- mass fluxes [kg/m2/s] --- ! 
    213       IF( iom_use('emp_oce' ) )   CALL iom_put( "emp_oce", emp_oce )   ! emp over ocean (taking into account the snow blown away from the ice) 
    214       IF( iom_use('emp_ice' ) )   CALL iom_put( "emp_ice", emp_ice )   ! emp over ice   (taking into account the snow blown away from the ice) 
     213      CALL iom_put( 'emp_oce', emp_oce )   ! emp over ocean (taking into account the snow blown away from the ice) 
     214      CALL iom_put( 'emp_ice', emp_ice )   ! emp over ice   (taking into account the snow blown away from the ice) 
    215215 
    216216      !                           ! vfxice = vfxbog + vfxbom + vfxsum + vfxsni + vfxopw + vfxdyn + vfxres + vfxlam + vfxpnd 
    217       IF( iom_use('vfxice'  ) )   CALL iom_put( "vfxice" , wfx_ice )   ! mass flux from total ice growth/melt 
    218       IF( iom_use('vfxbog'  ) )   CALL iom_put( "vfxbog" , wfx_bog )   ! mass flux from bottom growth 
    219       IF( iom_use('vfxbom'  ) )   CALL iom_put( "vfxbom" , wfx_bom )   ! mass flux from bottom melt  
    220       IF( iom_use('vfxsum'  ) )   CALL iom_put( "vfxsum" , wfx_sum )   ! mass flux from surface melt  
    221       IF( iom_use('vfxlam'  ) )   CALL iom_put( "vfxlam" , wfx_lam )   ! mass flux from lateral melt  
    222       IF( iom_use('vfxsni'  ) )   CALL iom_put( "vfxsni" , wfx_sni )   ! mass flux from snow-ice formation 
    223       IF( iom_use('vfxopw'  ) )   CALL iom_put( "vfxopw" , wfx_opw )   ! mass flux from growth in open water 
    224       IF( iom_use('vfxdyn'  ) )   CALL iom_put( "vfxdyn" , wfx_dyn )   ! mass flux from dynamics (ridging) 
    225       IF( iom_use('vfxres'  ) )   CALL iom_put( "vfxres" , wfx_res )   ! mass flux from undiagnosed processes  
    226       IF( iom_use('vfxpnd'  ) )   CALL iom_put( "vfxpnd" , wfx_pnd )   ! mass flux from melt ponds 
    227       IF( iom_use('vfxsub'  ) )   CALL iom_put( "vfxsub" , wfx_ice_sub )   ! mass flux from ice sublimation (ice-atm.) 
    228       IF( iom_use('vfxsub_err') ) CALL iom_put( "vfxsub_err", wfx_err_sub )   ! "excess" of sublimation sent to ocean       
    229  
    230       IF ( iom_use( "vfxthin" ) ) THEN   ! mass flux from ice growth in open water + thin ice (<20cm) => comparable to observations   
     217      CALL iom_put( 'vfxice'    , wfx_ice    )   ! mass flux from total ice growth/melt 
     218      CALL iom_put( 'vfxbog'    , wfx_bog    )   ! mass flux from bottom growth 
     219      CALL iom_put( 'vfxbom'    , wfx_bom    )   ! mass flux from bottom melt  
     220      CALL iom_put( 'vfxsum'    , wfx_sum    )   ! mass flux from surface melt  
     221      CALL iom_put( 'vfxlam'    , wfx_lam    )   ! mass flux from lateral melt  
     222      CALL iom_put( 'vfxsni'    , wfx_sni    )   ! mass flux from snow-ice formation 
     223      CALL iom_put( 'vfxopw'    , wfx_opw    )   ! mass flux from growth in open water 
     224      CALL iom_put( 'vfxdyn'    , wfx_dyn    )   ! mass flux from dynamics (ridging) 
     225      CALL iom_put( 'vfxres'    , wfx_res    )   ! mass flux from undiagnosed processes  
     226      CALL iom_put( 'vfxpnd'    , wfx_pnd    )   ! mass flux from melt ponds 
     227      CALL iom_put( 'vfxsub'    , wfx_ice_sub )   ! mass flux from ice sublimation (ice-atm.) 
     228      CALL iom_put( 'vfxsub_err', wfx_err_sub )   ! "excess" of sublimation sent to ocean       
     229 
     230      IF ( iom_use( 'vfxthin' ) ) THEN   ! mass flux from ice growth in open water + thin ice (<20cm) => comparable to observations   
    231231         WHERE( hm_i(:,:) < 0.2 .AND. hm_i(:,:) > 0. ) ; z2d = wfx_bog 
    232232         ELSEWHERE                                     ; z2d = 0._wp 
    233233         END WHERE 
    234          CALL iom_put( "vfxthin", wfx_opw + z2d ) 
    235       ENDIF 
    236  
    237       !                              ! vfxsnw = vfxsnw_sni + vfxsnw_dyn + vfxsnw_sum 
    238       IF( iom_use('vfxsnw'     ) )   CALL iom_put( "vfxsnw"     , wfx_snw     )   ! mass flux from total snow growth/melt 
    239       IF( iom_use('vfxsnw_sum' ) )   CALL iom_put( "vfxsnw_sum" , wfx_snw_sum )   ! mass flux from snow melt at the surface 
    240       IF( iom_use('vfxsnw_sni' ) )   CALL iom_put( "vfxsnw_sni" , wfx_snw_sni )   ! mass flux from snow melt during snow-ice formation  
    241       IF( iom_use('vfxsnw_dyn' ) )   CALL iom_put( "vfxsnw_dyn" , wfx_snw_dyn )   ! mass flux from dynamics (ridging)  
    242       IF( iom_use('vfxsnw_sub' ) )   CALL iom_put( "vfxsnw_sub" , wfx_snw_sub )   ! mass flux from snow sublimation (ice-atm.)  
    243       IF( iom_use('vfxsnw_pre' ) )   CALL iom_put( "vfxsnw_pre" , wfx_spr     )   ! snow precip 
     234         CALL iom_put( 'vfxthin', wfx_opw + z2d ) 
     235      ENDIF 
     236 
     237      !                            ! vfxsnw = vfxsnw_sni + vfxsnw_dyn + vfxsnw_sum 
     238      CALL iom_put( 'vfxsnw'     , wfx_snw     )   ! mass flux from total snow growth/melt 
     239      CALL iom_put( 'vfxsnw_sum' , wfx_snw_sum )   ! mass flux from snow melt at the surface 
     240      CALL iom_put( 'vfxsnw_sni' , wfx_snw_sni )   ! mass flux from snow melt during snow-ice formation  
     241      CALL iom_put( 'vfxsnw_dyn' , wfx_snw_dyn )   ! mass flux from dynamics (ridging)  
     242      CALL iom_put( 'vfxsnw_sub' , wfx_snw_sub )   ! mass flux from snow sublimation (ice-atm.)  
     243      CALL iom_put( 'vfxsnw_pre' , wfx_spr     )   ! snow precip 
    244244 
    245245      ! --- heat fluxes [W/m2] --- ! 
    246246      !                              ! qt_atm_oi - qt_oce_ai = hfxdhc - ( dihctrp + dshctrp ) 
    247       IF( iom_use('qsr_oce'    ) )   CALL iom_put( "qsr_oce"    , qsr_oce * ( 1._wp - at_i_b )                               )   !     solar flux at ocean surface 
    248       IF( iom_use('qns_oce'    ) )   CALL iom_put( "qns_oce"    , qns_oce * ( 1._wp - at_i_b ) + qemp_oce                    )   ! non-solar flux at ocean surface 
    249       IF( iom_use('qsr_ice'    ) )   CALL iom_put( "qsr_ice"    , SUM( qsr_ice * a_i_b, dim=3 )                              )   !     solar flux at ice surface 
    250       IF( iom_use('qns_ice'    ) )   CALL iom_put( "qns_ice"    , SUM( qns_ice * a_i_b, dim=3 ) + qemp_ice                   )   ! non-solar flux at ice surface 
    251       IF( iom_use('qtr_ice_bot') )   CALL iom_put( "qtr_ice_bot", SUM( qtr_ice_bot * a_i_b, dim=3 )                          )   !     solar flux transmitted thru ice 
    252       IF( iom_use('qtr_ice_top') )   CALL iom_put( "qtr_ice_top", SUM( qtr_ice_top * a_i_b, dim=3 )                          )   !     solar flux transmitted thru ice surface 
    253       IF( iom_use('qt_oce'     ) )   CALL iom_put( "qt_oce"     ,      ( qsr_oce + qns_oce ) * ( 1._wp - at_i_b ) + qemp_oce ) 
    254       IF( iom_use('qt_ice'     ) )   CALL iom_put( "qt_ice"     , SUM( ( qns_ice + qsr_ice ) * a_i_b, dim=3 )     + qemp_ice ) 
    255       IF( iom_use('qt_oce_ai'  ) )   CALL iom_put( "qt_oce_ai"  , qt_oce_ai * tmask(:,:,1)                                   )   ! total heat flux at the ocean   surface: interface oce-(ice+atm)  
    256       IF( iom_use('qt_atm_oi'  ) )   CALL iom_put( "qt_atm_oi"  , qt_atm_oi * tmask(:,:,1)                                   )   ! total heat flux at the oce-ice surface: interface atm-(ice+oce)  
    257       IF( iom_use('qemp_oce'   ) )   CALL iom_put( "qemp_oce"   , qemp_oce                                                   )   ! Downward Heat Flux from E-P over ocean 
    258       IF( iom_use('qemp_ice'   ) )   CALL iom_put( "qemp_ice"   , qemp_ice                                                   )   ! Downward Heat Flux from E-P over ice 
     247      IF( iom_use('qsr_oce'    ) )   CALL iom_put( 'qsr_oce'    , qsr_oce * ( 1._wp - at_i_b )                               )   !     solar flux at ocean surface 
     248      IF( iom_use('qns_oce'    ) )   CALL iom_put( 'qns_oce'    , qns_oce * ( 1._wp - at_i_b ) + qemp_oce                    )   ! non-solar flux at ocean surface 
     249      IF( iom_use('qsr_ice'    ) )   CALL iom_put( 'qsr_ice'    , SUM( qsr_ice * a_i_b, dim=3 )                              )   !     solar flux at ice surface 
     250      IF( iom_use('qns_ice'    ) )   CALL iom_put( 'qns_ice'    , SUM( qns_ice * a_i_b, dim=3 ) + qemp_ice                   )   ! non-solar flux at ice surface 
     251      IF( iom_use('qtr_ice_bot') )   CALL iom_put( 'qtr_ice_bot', SUM( qtr_ice_bot * a_i_b, dim=3 )                          )   !     solar flux transmitted thru ice 
     252      IF( iom_use('qtr_ice_top') )   CALL iom_put( 'qtr_ice_top', SUM( qtr_ice_top * a_i_b, dim=3 )                          )   !     solar flux transmitted thru ice surface 
     253      IF( iom_use('qt_oce'     ) )   CALL iom_put( 'qt_oce'     ,      ( qsr_oce + qns_oce ) * ( 1._wp - at_i_b ) + qemp_oce ) 
     254      IF( iom_use('qt_ice'     ) )   CALL iom_put( 'qt_ice'     , SUM( ( qns_ice + qsr_ice ) * a_i_b, dim=3 )     + qemp_ice ) 
     255      IF( iom_use('qt_oce_ai'  ) )   CALL iom_put( 'qt_oce_ai'  , qt_oce_ai * tmask(:,:,1)                                   )   ! total heat flux at the ocean   surface: interface oce-(ice+atm)  
     256      IF( iom_use('qt_atm_oi'  ) )   CALL iom_put( 'qt_atm_oi'  , qt_atm_oi * tmask(:,:,1)                                   )   ! total heat flux at the oce-ice surface: interface atm-(ice+oce)  
     257      IF( iom_use('qemp_oce'   ) )   CALL iom_put( 'qemp_oce'   , qemp_oce                                                   )   ! Downward Heat Flux from E-P over ocean 
     258      IF( iom_use('qemp_ice'   ) )   CALL iom_put( 'qemp_ice'   , qemp_ice                                                   )   ! Downward Heat Flux from E-P over ice 
    259259 
    260260      ! heat fluxes from ice transformations 
    261       !                              ! hfxdhc = hfxbog + hfxbom + hfxsum + hfxopw + hfxdif + hfxsnw - ( hfxthd + hfxdyn + hfxres + hfxsub + hfxspr ) 
    262       IF( iom_use('hfxbog'     ) )   CALL iom_put ("hfxbog"     , hfx_bog             )   ! heat flux used for ice bottom growth  
    263       IF( iom_use('hfxbom'     ) )   CALL iom_put ("hfxbom"     , hfx_bom             )   ! heat flux used for ice bottom melt 
    264       IF( iom_use('hfxsum'     ) )   CALL iom_put ("hfxsum"     , hfx_sum             )   ! heat flux used for ice surface melt 
    265       IF( iom_use('hfxopw'     ) )   CALL iom_put ("hfxopw"     , hfx_opw             )   ! heat flux used for ice formation in open water 
    266       IF( iom_use('hfxdif'     ) )   CALL iom_put ("hfxdif"     , hfx_dif             )   ! heat flux used for ice temperature change 
    267       IF( iom_use('hfxsnw'     ) )   CALL iom_put ("hfxsnw"     , hfx_snw             )   ! heat flux used for snow melt  
    268       IF( iom_use('hfxerr'     ) )   CALL iom_put ("hfxerr"     , hfx_err_dif        )   ! heat flux error after heat diffusion (included in qt_oce_ai) 
     261      !                            ! hfxdhc = hfxbog + hfxbom + hfxsum + hfxopw + hfxdif + hfxsnw - ( hfxthd + hfxdyn + hfxres + hfxsub + hfxspr ) 
     262      CALL iom_put ('hfxbog'     , hfx_bog     )   ! heat flux used for ice bottom growth  
     263      CALL iom_put ('hfxbom'     , hfx_bom     )   ! heat flux used for ice bottom melt 
     264      CALL iom_put ('hfxsum'     , hfx_sum     )   ! heat flux used for ice surface melt 
     265      CALL iom_put ('hfxopw'     , hfx_opw     )   ! heat flux used for ice formation in open water 
     266      CALL iom_put ('hfxdif'     , hfx_dif     )   ! heat flux used for ice temperature change 
     267      CALL iom_put ('hfxsnw'     , hfx_snw     )   ! heat flux used for snow melt  
     268      CALL iom_put ('hfxerr'     , hfx_err_dif )   ! heat flux error after heat diffusion (included in qt_oce_ai) 
    269269 
    270270      ! heat fluxes associated with mass exchange (freeze/melt/precip...) 
    271       IF( iom_use('hfxthd'     ) )   CALL iom_put ("hfxthd"     , hfx_thd             )   !   
    272       IF( iom_use('hfxdyn'     ) )   CALL iom_put ("hfxdyn"     , hfx_dyn             )   !   
    273       IF( iom_use('hfxres'     ) )   CALL iom_put ("hfxres"     , hfx_res             )   !   
    274       IF( iom_use('hfxsub'     ) )   CALL iom_put ("hfxsub"     , hfx_sub             )   !   
    275       IF( iom_use('hfxspr'     ) )   CALL iom_put ("hfxspr"     , hfx_spr             )   ! Heat flux from snow precip heat content  
     271      CALL iom_put ('hfxthd'     , hfx_thd     )   !   
     272      CALL iom_put ('hfxdyn'     , hfx_dyn     )   !   
     273      CALL iom_put ('hfxres'     , hfx_res     )   !   
     274      CALL iom_put ('hfxsub'     , hfx_sub     )   !   
     275      CALL iom_put ('hfxspr'     , hfx_spr     )   ! Heat flux from snow precip heat content  
    276276 
    277277      ! other heat fluxes 
    278       IF( iom_use('hfxsensib'  ) )   CALL iom_put( "hfxsensib"  ,     -qsb_ice_bot * at_i_b         )   ! Sensible oceanic heat flux 
    279       IF( iom_use('hfxcndbot'  ) )   CALL iom_put( "hfxcndbot"  , SUM( qcn_ice_bot * a_i_b, dim=3 ) )   ! Bottom conduction flux 
    280       IF( iom_use('hfxcndtop'  ) )   CALL iom_put( "hfxcndtop"  , SUM( qcn_ice_top * a_i_b, dim=3 ) )   ! Surface conduction flux 
    281  
    282       ! diags 
    283       IF( iom_use('hfxdhc'     ) )   CALL iom_put ("hfxdhc"     , diag_heat           )   ! Heat content variation in snow and ice  
    284       ! 
     278      IF( iom_use('hfxsensib'  ) )   CALL iom_put( 'hfxsensib'  ,     -qsb_ice_bot * at_i_b         )   ! Sensible oceanic heat flux 
     279      IF( iom_use('hfxcndbot'  ) )   CALL iom_put( 'hfxcndbot'  , SUM( qcn_ice_bot * a_i_b, dim=3 ) )   ! Bottom conduction flux 
     280      IF( iom_use('hfxcndtop'  ) )   CALL iom_put( 'hfxcndtop'  , SUM( qcn_ice_top * a_i_b, dim=3 ) )   ! Surface conduction flux 
     281 
    285282      ! controls 
    286283      !--------- 
     
    413410      !! ** Method  :   use of IOM library 
    414411      !!---------------------------------------------------------------------- 
    415       CHARACTER(len=*) , INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag 
     412      CHARACTER(len=*) , INTENT(in) ::   cdrw   ! 'READ'/'WRITE' flag 
    416413      INTEGER, OPTIONAL, INTENT(in) ::   kt     ! ice time-step 
    417414      ! 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icevar.F90

    r11348 r11413  
    3232   !!                        - vt_s(jpi,jpj) 
    3333   !!                        - at_i(jpi,jpj) 
     34   !!                        - st_i(jpi,jpj) 
    3435   !!                        - et_s(jpi,jpj)  total snow heat content 
    3536   !!                        - et_i(jpi,jpj)  total ice thermal content  
     
    4647   !!   ice_var_zapneg    : remove negative ice fields 
    4748   !!   ice_var_roundoff  : remove negative values arising from roundoff erros 
    48    !!   ice_var_itd       : convert 1-cat to jpl-cat 
    49    !!   ice_var_itd2      : convert N-cat to jpl-cat 
     49   !!   ice_var_itd       : convert N-cat to M-cat 
    5050   !!   ice_var_bv        : brine volume 
    5151   !!   ice_var_enthalpy  : compute ice and snow enthalpies from temperature 
     
    104104      ! 
    105105      !                                      ! integrated values 
    106       vt_i(:,:) =       SUM( v_i(:,:,:)           , dim=3 ) 
    107       vt_s(:,:) =       SUM( v_s(:,:,:)           , dim=3 ) 
    108       at_i(:,:) =       SUM( a_i(:,:,:)           , dim=3 ) 
    109       et_s(:,:)  = SUM( SUM( e_s(:,:,:,:), dim=4 ), dim=3 ) 
    110       et_i(:,:)  = SUM( SUM( e_i(:,:,:,:), dim=4 ), dim=3 ) 
     106      vt_i(:,:) =       SUM( v_i (:,:,:)           , dim=3 ) 
     107      vt_s(:,:) =       SUM( v_s (:,:,:)           , dim=3 ) 
     108      st_i(:,:) =       SUM( sv_i(:,:,:)           , dim=3 ) 
     109      at_i(:,:) =       SUM( a_i (:,:,:)           , dim=3 ) 
     110      et_s(:,:)  = SUM( SUM( e_s (:,:,:,:), dim=4 ), dim=3 ) 
     111      et_i(:,:)  = SUM( SUM( e_i (:,:,:,:), dim=4 ), dim=3 ) 
    111112      ! 
    112113      at_ip(:,:) = SUM( a_ip(:,:,:), dim=3 ) ! melt ponds 
     
    142143         tm_si(:,:) = SUM( t_si(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 
    143144         om_i (:,:) = SUM( oa_i(:,:,:)              , dim=3 ) * z1_at_i(:,:) 
    144          sm_i (:,:) = SUM( sv_i(:,:,:)              , dim=3 ) * z1_vt_i(:,:) 
     145         sm_i (:,:) =      st_i(:,:)                          * z1_vt_i(:,:) 
    145146         ! 
    146147         tm_i(:,:) = 0._wp 
     
    268269      ! 
    269270      ! integrated values  
    270       vt_i (:,:) = SUM( v_i, dim=3 ) 
    271       vt_s (:,:) = SUM( v_s, dim=3 ) 
    272       at_i (:,:) = SUM( a_i, dim=3 ) 
     271      vt_i (:,:) = SUM( v_i , dim=3 ) 
     272      vt_s (:,:) = SUM( v_s , dim=3 ) 
     273      at_i (:,:) = SUM( a_i , dim=3 ) 
    273274      ! 
    274275   END SUBROUTINE ice_var_glo2eqv 
     
    538539 
    539540      ! to be sure that at_i is the sum of a_i(jl) 
    540       at_i (:,:) = SUM( a_i(:,:,:), dim=3 ) 
    541       vt_i (:,:) = SUM( v_i(:,:,:), dim=3 ) 
     541      at_i (:,:) = SUM( a_i (:,:,:), dim=3 ) 
     542      vt_i (:,:) = SUM( v_i (:,:,:), dim=3 ) 
     543!!clem add? 
     544!      vt_s (:,:) = SUM( v_s (:,:,:), dim=3 ) 
     545!      st_i (:,:) = SUM( sv_i(:,:,:), dim=3 ) 
     546!      et_s(:,:)  = SUM( SUM( e_s (:,:,:,:), dim=4 ), dim=3 ) 
     547!      et_i(:,:)  = SUM( SUM( e_i (:,:,:,:), dim=4 ), dim=3 ) 
     548!!clem 
    542549 
    543550      ! open water = 1 if at_i=0 
     
    932939               IF ( i_fill == 1 ) THEN      !-- case very thin ice: fill only category 1 
    933940                  ph_i(ji,1) = phti(ji) 
    934                   pa_i (ji,1) = pati (ji) 
     941                  pa_i(ji,1) = pati (ji) 
    935942               ELSE                         !-- case ice is thicker: fill categories >1 
    936943                  ! thickness 
     
    975982               IF ( zconv < epsi06 )   itest(2) = 1                                        ! Test 2: volume conservation 
    976983               ! 
    977                IF ( ph_i(ji,i_fill) >= hi_max(i_fill-1) )   itest(3) = 1                  ! Test 3: thickness of the last category is in-bounds ? 
     984               IF ( ph_i(ji,i_fill) >= hi_max(i_fill-1) )   itest(3) = 1                   ! Test 3: thickness of the last category is in-bounds ? 
    978985               ! 
    979986               itest(4) = 1 
    980987               DO jl = 1, i_fill 
    981                   IF ( pa_i(ji,jl) < 0._wp ) itest(4) = 0                                ! Test 4: positivity of ice concentrations 
     988                  IF ( pa_i(ji,jl) < 0._wp ) itest(4) = 0                                  ! Test 4: positivity of ice concentrations 
    982989               END DO 
    983990               !                                         !---------------------------- 
     
    10891096      ELSEIF( icat == 1 ) THEN          ! input cat = 1          ! 
    10901097         !                              ! ---------------------- ! 
    1091          CALL  ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1),            ph_i(:,:), ph_s(:,:), pa_i (:,:), & 
    1092             &                    ptmi(:,1), ptms(:,1), ptmsu(:,1), psmi(:,1), pt_i(:,:), pt_s(:,:), pt_su(:,:), ps_i(:,:) ) 
     1098         CALL  ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1),            ph_i(:,:), ph_s(:,:), pa_i (:,:) ) 
     1099!!         CALL  ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1),            ph_i(:,:), ph_s(:,:), pa_i (:,:), & 
     1100!!            &                    ptmi(:,1), ptms(:,1), ptmsu(:,1), psmi(:,1), pt_i(:,:), pt_s(:,:), pt_su(:,:), ps_i(:,:) ) 
    10931101         !                              ! ---------------------- ! 
    10941102      ELSEIF( jpl == 1 ) THEN           ! output cat = 1         ! 
    10951103         !                              ! ---------------------- ! 
    1096          CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1), & 
    1097             &                    ptmi(:,:), ptms(:,:), ptmsu(:,:), psmi(:,:), pt_i(:,1), pt_s(:,1), pt_su(:,1), ps_i(:,1) )          
     1104         CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1) ) 
     1105!!         CALL  ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:),            ph_i(:,1), ph_s(:,1), pa_i (:,1), & 
     1106!!            &                    ptmi(:,:), ptms(:,:), ptmsu(:,:), psmi(:,:), pt_i(:,1), pt_s(:,1), pt_su(:,1), ps_i(:,1) )          
    10981107         !                              ! ----------------------- ! 
    10991108      ELSE                              ! input cat /= output cat ! 
  • NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icewri.F90

    r10911 r11413  
    5050      INTEGER  ::   ji, jj, jk, jl  ! dummy loop indices 
    5151      REAL(wp) ::   z2da, z2db, zrho1, zrho2 
    52       REAL(wp), DIMENSION(jpi,jpj)     ::   z2d, zfast !  2D workspace 
     52      REAL(wp) ::   zmiss_val       ! missing value retrieved from xios  
     53      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d, zfast                     ! 2D workspace 
    5354      REAL(wp), DIMENSION(jpi,jpj)     ::   zmsk00, zmsk05, zmsk15, zmsksn ! O%, 5% and 15% concentration mask and snow mask 
    5455      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zmsk00l, zmsksnl               ! cat masks 
     
    5859      REAL(wp) ::   zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh  
    5960      !!------------------------------------------------------------------- 
    60  
     61      ! 
    6162      IF( ln_timing )   CALL timing_start('icewri') 
     63 
     64      ! get missing value from xml 
     65      CALL iom_miss_val( 'icetemp', zmiss_val ) 
    6266 
    6367      ! brine volume 
     
    8589      ! Standard outputs 
    8690      !----------------- 
    87       zrho1 = ( rau0 - rhoi ) * r1_rau0; zrho2 = rhos * r1_rau0 
     91      zrho1 = ( rau0 - rhoi ) * r1_rau0 ; zrho2 = rhos * r1_rau0 
    8892      ! masks 
    89       IF( iom_use('icemask'  ) )   CALL iom_put( "icemask"  , zmsk00              )   ! ice mask 0% 
    90       IF( iom_use('icemask05') )   CALL iom_put( "icemask05", zmsk05              )   ! ice mask 5% 
    91       IF( iom_use('icemask15') )   CALL iom_put( "icemask15", zmsk15              )   ! ice mask 15% 
     93      CALL iom_put( 'icemask'  , zmsk00 )   ! ice mask 0% 
     94      CALL iom_put( 'icemask05', zmsk05 )   ! ice mask 5% 
     95      CALL iom_put( 'icemask15', zmsk15 )   ! ice mask 15% 
     96      CALL iom_put( 'icepres'  , zmsk00 )   ! Ice presence (1 or 0)  
    9297      ! 
    9398      ! general fields 
    94       IF( iom_use('icemass'  ) )   CALL iom_put( "icemass", rhoi * vt_i * zmsk00  )   ! Ice mass per cell area  
    95       IF( iom_use('snwmass'  ) )   CALL iom_put( "snwmass", rhos * vt_s * zmsksn  )   ! Snow mass per cell area 
    96       IF( iom_use('icepres'  ) )   CALL iom_put( "icepres", zmsk00                )   ! Ice presence (1 or 0)  
    97       IF( iom_use('iceconc'  ) )   CALL iom_put( "iceconc", at_i  * zmsk00        )   ! ice concentration 
    98       IF( iom_use('icevolu'  ) )   CALL iom_put( "icevolu", vt_i  * zmsk00        )   ! ice volume = mean ice thickness over the cell 
    99       IF( iom_use('icethic'  ) )   CALL iom_put( "icethic", hm_i  * zmsk00        )   ! ice thickness 
    100       IF( iom_use('snwthic'  ) )   CALL iom_put( "snwthic", hm_s  * zmsk00        )   ! snw thickness 
    101       IF( iom_use('icebrv'   ) )   CALL iom_put( "icebrv" , bvm_i * zmsk00 * 100. )   ! brine volume 
    102       IF( iom_use('iceage'   ) )   CALL iom_put( "iceage" , om_i  * zmsk15 / rday )   ! ice age 
    103       IF( iom_use('icehnew'  ) )   CALL iom_put( "icehnew", ht_i_new              )   ! new ice thickness formed in the leads 
    104       IF( iom_use('snwvolu'  ) )   CALL iom_put( "snwvolu", vt_s  * zmsksn        )   ! snow volume 
    105       IF( iom_use('icefrb') ) THEN 
     99      IF( iom_use('icemass' ) )   CALL iom_put( 'icemass', vt_i * rhoi * zmsk00 )                                           ! Ice mass per cell area  
     100      IF( iom_use('snwmass' ) )   CALL iom_put( 'snwmass', vt_s * rhos * zmsksn )                                           ! Snow mass per cell area 
     101      IF( iom_use('iceconc' ) )   CALL iom_put( 'iceconc', at_i        * zmsk00 )                                           ! ice concentration 
     102      IF( iom_use('icevolu' ) )   CALL iom_put( 'icevolu', vt_i        * zmsk00 )                                           ! ice volume = mean ice thickness over the cell 
     103      IF( iom_use('icethic' ) )   CALL iom_put( 'icethic', hm_i        * zmsk00 )                                           ! ice thickness 
     104      IF( iom_use('snwthic' ) )   CALL iom_put( 'snwthic', hm_s        * zmsk00 )                                           ! snw thickness 
     105      IF( iom_use('icebrv'  ) )   CALL iom_put( 'icebrv' , bvm_i* 100. * zmsk00 )                                           ! brine volume 
     106      IF( iom_use('iceage'  ) )   CALL iom_put( 'iceage' , om_i / rday * zmsk15 + zmiss_val * ( 1._wp - zmsk15 ) )          ! ice age 
     107      IF( iom_use('icehnew' ) )   CALL iom_put( 'icehnew', ht_i_new             )                                           ! new ice thickness formed in the leads 
     108      IF( iom_use('snwvolu' ) )   CALL iom_put( 'snwvolu', vt_s        * zmsksn )                                           ! snow volume 
     109      IF( iom_use('icefrb'  ) ) THEN                                                                                        ! Ice freeboard 
    106110         z2d(:,:) = ( zrho1 * hm_i(:,:) - zrho2 * hm_s(:,:) )                                          
    107111         WHERE( z2d < 0._wp )   z2d = 0._wp 
    108                                    CALL iom_put( "icefrb" , z2d * zmsk00          )   ! Ice freeboard 
     112                                  CALL iom_put( 'icefrb' , z2d * zmsk00         ) 
    109113      ENDIF 
    110       ! 
    111114      ! melt ponds 
    112       IF( iom_use('iceapnd'  ) )   CALL iom_put( "iceapnd", at_ip  * zmsk00       )   ! melt pond total fraction 
    113       IF( iom_use('icevpnd'  ) )   CALL iom_put( "icevpnd", vt_ip  * zmsk00       )   ! melt pond total volume per unit area 
    114       ! 
     115      IF( iom_use('iceapnd' ) )   CALL iom_put( 'iceapnd', at_ip  * zmsk00      )                                           ! melt pond total fraction 
     116      IF( iom_use('icevpnd' ) )   CALL iom_put( 'icevpnd', vt_ip  * zmsk00      )                                           ! melt pond total volume per unit area 
    115117      ! salt 
    116       IF( iom_use('icesalt'  ) )   CALL iom_put( "icesalt", sm_i  * zmsk00        )   ! mean ice salinity 
    117       IF( iom_use('icesalm'  ) )   CALL iom_put( "icesalm", SUM( sv_i, DIM = 3 ) * rhoi * 1.0e-3 * zmsk00 )   ! Mass of salt in sea ice per cell area 
    118  
     118      IF( iom_use('icesalt' ) )   CALL iom_put( 'icesalt', sm_i                 * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! mean ice salinity 
     119      IF( iom_use('icesalm' ) )   CALL iom_put( 'icesalm', st_i * rhoi * 1.0e-3 * zmsk00 )                                  ! Mass of salt in sea ice per cell area 
    119120      ! heat