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

Changeset 14328


Ignore:
Timestamp:
2021-01-22T12:09:05+01:00 (3 years ago)
Author:
ayoung
Message:

Pulling changes from trunk from r14237 through to r14327 (current)

Location:
NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT
Files:
2 deleted
169 edited
14 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette_wave@13990         sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/INSTALL.rst

    r14229 r14328  
    268268Once changed, one needs to recompile ``nemo`` in order for this change to be taken in account. 
    269269Note that most NEMO configurations will need to specify the following CPP keys: 
    270 ``key_iomput`` for IOs. MPI parallelism is activated by default. Use ``key_mpi_off`` to compile without MPI. 
     270``key_xios`` for IOs. MPI parallelism is activated by default. Use ``key_mpi_off`` to compile without MPI. 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/AGRIF_DEMO/cpp_AGRIF_DEMO.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_si3 key_top key_iomput key_agrif key_qco 
     1bld::tool::fppkeys   key_si3 key_top key_xios key_agrif key_qco 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/AMM12/cpp_AMM12.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_diainstant key_iomput key_qco 
     1 bld::tool::fppkeys   key_diainstant key_xios key_qco 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/C1D_PAPA/cpp_C1D_PAPA.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_c1d key_iomput key_linssh 
     1 bld::tool::fppkeys   key_c1d key_xios key_linssh 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/GYRE_BFM/cpp_GYRE_BFM.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_top key_my_trc key_iomput key_linssh 
     1bld::tool::fppkeys   key_top key_my_trc key_xios key_linssh 
    22inc $BFMDIR/src/nemo/bfm.fcm 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/GYRE_PISCES/cpp_GYRE_PISCES.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_top key_linssh key_iomput 
     1bld::tool::fppkeys   key_top key_linssh key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_ICE_ABL/cpp_ORCA2_ICE_ABL.fcm

    r14229 r14328  
    1 bld::tool::fppkeys key_si3 key_iomput key_qco 
     1bld::tool::fppkeys key_si3 key_xios key_qco 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-pisces.xml

    r11536 r14328  
    3333 
    3434        <file id="file32" name_suffix="_ptrc_T" description="pisces sms variables" > 
    35           <field field_ref="DIC"      /> 
    36           <field field_ref="Alkalini" /> 
    37           <field field_ref="O2"       /> 
    38           <field field_ref="PO4"      /> 
    39           <field field_ref="Si"       /> 
    40           <field field_ref="Fer"      /> 
    41           <field field_ref="NCHL"     /> 
    42           <field field_ref="DCHL"     /> 
    43           <field field_ref="NO3"      /> 
     35          <field field_ref="DIC"       name="DIC"      operation="average" freq_op="1mo" > @DIC_e3t / @e3t </field> 
     36          <field field_ref="Alkalini"  name="Alkalini" operation="average" freq_op="1mo" > @Alkalini_e3t / @e3t </field> 
     37          <field field_ref="O2"        name="O2"       operation="average" freq_op="1mo" > @O2_e3t / @e3t </field> 
     38          <field field_ref="PO4"       name="PO4"      operation="average" freq_op="1mo" > @PO4_e3t / @e3t </field> 
     39          <field field_ref="Si"        name="Si"       operation="average" freq_op="1mo" > @Si_e3t / @e3t </field> 
     40          <field field_ref="Fer"       name="Fer"      operation="average" freq_op="1mo" > @Fer_e3t / @e3t </field> 
     41          <field field_ref="NCHL"      name="NCHL"     operation="average" freq_op="1mo" > @NCHL_e3t / @e3t </field> 
     42          <field field_ref="DCHL"      name="DCHL"     operation="average" freq_op="1mo" > @DCHL_e3t / @e3t </field> 
     43          <field field_ref="NO3"       name="NO3"      operation="average" freq_op="1mo" > @NO3_e3t / @e3t </field> 
    4444        </file> 
    4545 
     
    5353      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 
    5454 
    55         <file id="file34" name_suffix="_ptrc_T" description="pisces sms variables" > 
    56           <field field_ref="DIC"      /> 
    57           <field field_ref="Alkalini" /> 
    58           <field field_ref="O2"       /> 
    59           <field field_ref="CaCO3"    /> 
    60           <field field_ref="PO4"      /> 
    61           <field field_ref="POC"      /> 
    62           <field field_ref="Si"       /> 
    63           <field field_ref="PHY"      /> 
    64           <field field_ref="ZOO"      /> 
    65           <field field_ref="DOC"      /> 
    66           <field field_ref="PHY2"     /> 
    67           <field field_ref="ZOO2"     /> 
    68           <field field_ref="DSi"      /> 
    69           <field field_ref="Fer"      /> 
    70           <field field_ref="BFe"      /> 
    71           <field field_ref="GOC"      /> 
    72           <field field_ref="SFe"      /> 
    73           <field field_ref="DFe"      /> 
    74           <field field_ref="GSi"      /> 
    75           <field field_ref="NFe"      /> 
    76           <field field_ref="NCHL"     /> 
    77           <field field_ref="DCHL"     /> 
    78           <field field_ref="NO3"      /> 
    79           <field field_ref="NH4"      /> 
     55   <file id="file34" name_suffix="_ptrc_T" description="pisces sms variables" > 
     56          <field field_ref="DIC"       name="DIC"      operation="average" freq_op="1y" > @DIC_e3t / @e3t </field> 
     57          <field field_ref="Alkalini"  name="Alkalini" operation="average" freq_op="1y" > @Alkalini_e3t / @e3t </field> 
     58          <field field_ref="O2"        name="O2"       operation="average" freq_op="1y" > @O2_e3t / @e3t </field> 
     59          <field field_ref="CaCO3"     name="CaCO3"    operation="average" freq_op="1y" > @CaCO3_e3t / @e3t </field> 
     60          <field field_ref="PO4"       name="PO4"      operation="average" freq_op="1y" > @PO4_e3t / @e3t </field> 
     61          <field field_ref="POC"       name="POC"      operation="average" freq_op="1y" > @POC_e3t / @e3t </field> 
     62          <field field_ref="Si"        name="Si"       operation="average" freq_op="1y" > @Si_e3t / @e3t </field> 
     63          <field field_ref="PHY"       name="PHY"      operation="average" freq_op="1y" > @PHY_e3t / @e3t </field> 
     64          <field field_ref="ZOO"       name="ZOO"      operation="average" freq_op="1y" > @ZOO_e3t / @e3t </field> 
     65          <field field_ref="DOC"       name="DOC"      operation="average" freq_op="1y" > @DOC_e3t / @e3t </field> 
     66          <field field_ref="PHY2"      name="PHY2"     operation="average" freq_op="1y" > @PHY2_e3t / @e3t </field> 
     67          <field field_ref="ZOO2"      name="ZOO2"     operation="average" freq_op="1y" > @ZOO2_e3t / @e3t </field> 
     68          <field field_ref="DSi"       name="DSi"      operation="average" freq_op="1y" > @DSi_e3t / @e3t </field> 
     69          <field field_ref="Fer"       name="Fer"      operation="average" freq_op="1y" > @Fer_e3t / @e3t </field> 
     70          <field field_ref="BFe"       name="BFe"      operation="average" freq_op="1y" > @BFe_e3t / @e3t </field> 
     71          <field field_ref="GOC"       name="GOC"      operation="average" freq_op="1y" > @GOC_e3t / @e3t </field> 
     72          <field field_ref="SFe"       name="SFe"      operation="average" freq_op="1y" > @SFe_e3t / @e3t </field> 
     73          <field field_ref="DFe"       name="DFe"      operation="average" freq_op="1y" > @DFe_e3t / @e3t </field> 
     74          <field field_ref="GSi"       name="GSi"      operation="average" freq_op="1y" > @GSi_e3t / @e3t </field> 
     75          <field field_ref="NFe"       name="NFe"      operation="average" freq_op="1y" > @NFe_e3t / @e3t </field> 
     76          <field field_ref="NCHL"      name="NCHL"     operation="average" freq_op="1y" > @NCHL_e3t / @e3t </field> 
     77          <field field_ref="DCHL"      name="DCHL"     operation="average" freq_op="1y" > @DCHL_e3t / @e3t </field> 
     78          <field field_ref="NO3"       name="NO3"      operation="average" freq_op="1y" > @NO3_e3t / @e3t </field> 
     79          <field field_ref="NH4"       name="NH4"      operation="average" freq_op="1y" > @NH4_e3t / @e3t </field> 
    8080        </file> 
    8181 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_ICE_PISCES/cpp_ORCA2_ICE_PISCES.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_si3 key_top key_iomput key_qco  
     1bld::tool::fppkeys   key_si3 key_top key_xios key_qco  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_OFF_PISCES/EXPREF/namelist_cfg

    r14229 r14328  
    313313   ln_dynrnf       =  .false.    !  runoffs option enabled (T) or not (F) 
    314314   ln_dynrnf_depth =  .false.    !  runoffs is spread in vertical (T) or not (F) 
    315 !   fwbcorr        = 3.786e-06   !  annual global mean of empmr for ssh correction 
    316  
     315   ! 
    317316   cn_dir      = './'      !  root directory for the ocean data location 
    318317   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_OFF_PISCES/cpp_ORCA2_OFF_PISCES.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_top key_iomput 
     1bld::tool::fppkeys   key_top key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_OFF_TRC/EXPREF/context_nemo.xml

    r13476 r14328  
    2020 
    2121<!-- Fields definition --> 
    22     <field_definition src="./field_def_nemo-oce.xml"/>    <!--  NEMO ocean dynamics     --> 
    23     <field_definition src="./field_def_nemo-innerttrc.xml"/> <!--  NEMO ocean biology      --> 
     22    <field_definition src="./field_def_nemo-oce.xml"/>      <!--  NEMO ocean dynamics     --> 
     23    <field_definition src="./field_def_nemo-pisces.xml"/>    <!--  NEMO ocean biogeochemistry     --> 
     24    <field_definition src="./field_def_nemo-innerttrc.xml"/> <!--  NEMO ocean passive tracers      --> 
    2425 
    2526<!-- Files definition --> 
    26     <file_definition src="./file_def_nemo-innerttrc.xml"/>  <!--  NEMO ocean biology       --> 
     27    <file_definition src="./file_def_nemo-innerttrc.xml"/>  <!--  NEMO ocean passive tracers       --> 
    2728 
    2829 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_OFF_TRC/EXPREF/file_def_nemo-innerttrc.xml

    r12276 r14328  
    3131 
    3232      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 
     33          
     34   <file id="file1" name_suffix="grid_T" description="passive tracers variables" > 
     35           <field field_ref="e3t"     /> 
     36           <field field_ref="ssh"    name="zos"  /> 
     37         </file> 
    3338 
    34         <file id="file1" name_suffix="_ptrc_T" description="passive tracers variables" > 
    35            <field field_ref="Age"    /> 
    36            <field field_ref="CFC11"  /> 
    37            <field field_ref="CFC12"  /> 
    38            <field field_ref="SF6"    /> 
    39            <field field_ref="RC14"   /> 
     39    <file id="file1" name_suffix="_trc" description="passive tracers variables" > 
     40           <field field_ref="Age"     name="Age"     operation="average" freq_op="1y"  > @Age_e3t / @e3t   </field>            
     41           <field field_ref="CFC11"   name="CFC11"   operation="average" freq_op="1y"  > @CFC11_e3t / @e3t </field> 
     42           <field field_ref="CFC12"   name="CFC12"   operation="average" freq_op="1y"  > @CFC12_e3t / @e3t </field> 
     43           <field field_ref="SF6"     name="SF6"     operation="average" freq_op="1y"  > @SF6_e3t / @e3t   </field> 
     44           <field field_ref="RC14"    name="RC14"    operation="average" freq_op="1y"  > @RC14_e3t / @e3t  </field> 
    4045         </file> 
    4146 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_OFF_TRC/EXPREF/namelist_cfg

    r14229 r14328  
    2222   cn_exp      =  "TRACERS"  !  experience name 
    2323   nn_it000    =       1     !  first time step 
    24    nn_itend    =    14600    !  last  time step (std 5475) 
     24   nn_itend    =    1460    !  last  time step (std 5475) 
    2525   nn_date0    =  19600101   !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1) 
    26    nn_stock    =    14600    !  frequency of creation of a restart file (modulo referenced to 1) 
     26   nn_stock    =    1460    !  frequency of creation of a restart file (modulo referenced to 1) 
    2727   ln_mskland  = .true.      !  mask land points in NetCDF outputs (costly: + ~15%) 
    2828   ln_cfmeta   = .true.      !  output additional data to netCDF files required for compliance with the CF metadata standard 
     
    3232&namdom        !   time and space domain 
    3333!----------------------------------------------------------------------- 
    34    ln_linssh   = .true.   !  =T  linear free surface  ==>>  model level are fixed in time 
    3534   ! 
    3635   rn_Dt      = 21600.     !  time step for the dynamics and tracer 
     
    197196&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    198197!----------------------------------------------------------------------- 
     198   ln_drg_OFF  = .true.   !  free-slip   
    199199/ 
    200200!----------------------------------------------------------------------- 
     
    308308&namdta_dyn    !   offline ocean input files                            (OFF_SRC only) 
    309309!----------------------------------------------------------------------- 
    310    ln_dynrnf       =  .false.    !  runoffs option enabled (T) or not (F) 
     310   ln_dynrnf       =  .true.    !  runoffs option enabled (T) or not (F) 
    311311   ln_dynrnf_depth =  .false.    !  runoffs is spread in vertical (T) or not (F) 
    312 !   fwbcorr        = 3.786e-06   !  annual global mean of empmr for ssh correction 
    313  
     312   ! 
    314313   cn_dir      = './'      !  root directory for the ocean data location 
    315    !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! 
    316    !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 
    317    !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   ! 
    318    sn_tem      = 'dyna_grid_T'           ,       120.        , 'votemper'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    319    sn_sal      = 'dyna_grid_T'           ,       120.        , 'vosaline'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    320    sn_mld      = 'dyna_grid_T'           ,       120.        , 'somixhgt'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    321    sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    322    sn_fmf      = 'dyna_grid_T'           ,       120.        , 'iowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    323    sn_ice      = 'dyna_grid_T'           ,       120.        , 'soicecov'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    324    sn_qsr      = 'dyna_grid_T'           ,       120.        , 'soshfldo'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    325    sn_wnd      = 'dyna_grid_T'           ,       120.        , 'sowindsp'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    326    sn_uwd      = 'dyna_grid_U'           ,       120.        , 'uocetr_eff',  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    327    sn_vwd      = 'dyna_grid_V'           ,       120.        , 'vocetr_eff',  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    328    sn_wwd      = 'dyna_grid_W'           ,       120.        , 'wocetr_eff',  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    329    sn_avt      = 'dyna_grid_W'           ,       120.        , 'voddmavs'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    330    sn_ubl      = 'dyna_grid_U'           ,       120.        , 'sobblcox'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    331    sn_vbl      = 'dyna_grid_V'           ,       120.        , 'sobblcoy'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     314   !___________!_________________________!___________________!_____________!_____________!________!___________!__________________!__________!_______________! 
     315   !           !  file name              ! frequency (hours) !   variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 
     316   !           !                         !  (if <0  months)  !     name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   ! 
     317   sn_tem      = 'dyna_grid_T'           ,       120.        , 'thetao'    ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     318   sn_sal      = 'dyna_grid_T'           ,       120.        , 'so'        ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     319   sn_div      = 'dyna_grid_T'           ,       120.        , 'hdivtr'    ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     320   sn_mld      = 'dyna_grid_T'           ,       120.        , 'mldr10_1'  ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     321   sn_emp      = 'dyna_grid_T'           ,       120.        , 'wfo'       ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     322   sn_empb     = 'dyna_grid_T'           ,       120.        , 'wfob'      ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     323   sn_fmf      = 'dyna_grid_T'           ,       120.        , 'fmmflx'    ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     324   sn_rnf      = 'dyna_grid_T'           ,       120.        , 'runoffs'   ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     325   sn_ice      = 'dyna_grid_T'           ,       120.        , 'siconc'    ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     326   sn_qsr      = 'dyna_grid_T'           ,       120.        , 'rsntds'    ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     327   sn_wnd      = 'dyna_grid_T'           ,       120.        , 'windsp'    ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     328   sn_uwd      = 'dyna_grid_U'           ,       120.        , 'uocetr_eff',    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     329   sn_vwd      = 'dyna_grid_V'           ,       120.        , 'vocetr_eff',    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     330   sn_wwd      = 'dyna_grid_W'           ,       120.        , 'wocetr_eff',    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     331   sn_avt      = 'dyna_grid_W'           ,       120.        , 'difvsolog' ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     332   sn_ubl      = 'dyna_grid_U'           ,       120.        , 'ahu_bbl'   ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     333   sn_vbl      = 'dyna_grid_V'           ,       120.        , 'ahv_bbl'   ,    .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    332334/ 
    333335!!====================================================================== 
     
    345347&namzdf        !   vertical physics manager                             (default: NO selection) 
    346348!----------------------------------------------------------------------- 
     349   ln_zdfcst   = .true.      !  constant mixing 
    347350/ 
    348351!----------------------------------------------------------------------- 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_OFF_TRC/cpp_ORCA2_OFF_TRC.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_top key_iomput 
     1bld::tool::fppkeys   key_top key_xios key_qco 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/ORCA2_SAS_ICE/cpp_ORCA2_SAS_ICE.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_si3 key_linssh key_iomput 
     1 bld::tool::fppkeys   key_si3 key_linssh key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/SHARED/README.rst

    r11747 r14328  
    1717Much more information is available from the :xios:`XIOS homepage<>` above and from the NEMO manual. 
    1818 
    19 Use of XIOS for diagnostics is activated using the pre-compiler key ``key_iomput``. 
     19Use of XIOS for diagnostics is activated using the pre-compiler key ``key_xios``. 
    2020 
    2121Extracting and installing XIOS 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/SHARED/namelist_ice_ref

    r14006 r14328  
    210210         rn_apnd_min =   0.15         !     minimum meltwater fraction contributing to pond growth (TOPO and LEV) 
    211211         rn_apnd_max =   0.85         !     maximum meltwater fraction contributing to pond growth (TOPO and LEV) 
    212          rn_pnd_flush=   0.01         !     pond flushing efficiency (tuning parameter) (LEV) 
     212         rn_pnd_flush=   0.1          !     pond flushing efficiency (tuning parameter) (LEV) 
    213213      ln_pnd_CST     = .false.        !  constant  melt ponds 
    214214         rn_apnd     =   0.2          !     prescribed pond fraction, at Tsu=0 degC 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/SHARED/namelist_ref

    r14229 r14328  
    5757      !                          !    = -1 do not do any restart 
    5858   nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    59    nn_write    =       0   !  used only if key_iomput is not defined: output frequency (modulo referenced to nn_it000) 
     59   nn_write    =       0   !  used only if key_xios is not defined: output frequency (modulo referenced to nn_it000) 
    6060      !                          !    =  0 force to write output files only at the end of the run 
    6161      !                          !    = -1 do not do any output file 
     
    10921092   ln_dynrnf       =  .false.    !  runoffs option enabled (T) or not (F) 
    10931093   ln_dynrnf_depth =  .false.    !  runoffs is spread in vertical (T) or not (F) 
    1094    fwbcorr         =    0.0      !  annual global mean of empmr for ssh correction 
    1095  
     1094   ! 
    10961095   cn_dir      = './'      !  root directory for the ocean data location 
    10971096   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/SPITZ12/cpp_SPITZ12.fcm

    r14229 r14328  
    1  bld::tool::fppkeys key_iomput key_si3 key_qco 
     1 bld::tool::fppkeys key_xios key_si3 key_qco 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/cfgs/WED025/cpp_WED025.fcm

    r14232 r14328  
    1  bld::tool::fppkeys key_iomput key_si3 
     1 bld::tool::fppkeys key_xios key_si3 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/.svnignore

    r14113 r14328  
    1111*.toc 
    1212*.xdv 
    13 _minted-* 
     13cache* 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/build

    • Property svn:ignore
      •  

        old new  
        1111*.toc 
        1212*.xdv 
        13 _minted-* 
         13cache* 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/abstract.tex

    r11591 r14328  
    1 %% ================================================================ 
    2 %% Abstract 
    3 %% ================================================================ 
     1%% ================================================================================================= 
     2%% Specific abstract 
     3%% ================================================================================================= 
    44 
    5 %% Common part between NEMO-SI3-TOP 
    6 \NEMO\ (``Nucleus for European Modelling of the Ocean'') is a framework of ocean-related engines. 
    7 It is intended to be a flexible tool for studying the ocean dynamics and thermodynamics (``blue ocean''), 
    8 as well as its interactions with the components of the Earth climate system over 
    9 a wide range of space and time scales. 
    10 Within \NEMO, the ocean engine is interfaced with a sea-ice model (\SIcube\ or 
    11 \href{http://github.com/CICE-Consortium/CICE}{CICE}), 
    12 passive tracers and biogeochemical models (\TOP) and, 
    13 via the \href{http://portal.enes.org/oasis}{OASIS} coupler, 
    14 with several atmospheric general circulation models. 
    15 It also supports two-way grid embedding by means of the \href{http://agrif.imag.fr}{AGRIF} software. 
     5%% Common part 
     6\input{../../global/nemo} 
    167 
    178%% Specific part 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/appendices.tex

    r14113 r14328  
     1%% ================================================================================================= 
     2%% Appendices 
     3%% ================================================================================================= 
    14 
    25\subfile{../subfiles/apdx_s_coord}      %% A. Generalised vertical coordinate 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/authors.tex

    r11591 r14328  
    1 %Romain Bourdall\'{e}-Badie 
    2 %\orcid{0000-0002-8742-3289} \\ 
    3 %Mike Bell                   \\ 
    4 %J\'{e}r\^{o}me Chanut       \\ 
    5 %Emanuela Clementi 
    6 %\orcid{0000-0002-5752-1849} \\ 
    7 %Andrew Coward 
    8 %\orcid{0000-0002-0456-129X} \\ 
    9 %Massimiliano Drudi 
    10 %\orcid{0000-0002-9951-740X} \\ 
    11 %Christian \'{E}th\'{e}      \\ 
    12 %Doroteaciro Iovino 
    13 %\orcid{0000-0001-5132-7255} \\ 
    14 %Dan Lea                     \\ 
    15 %Claire L\'{e}vy 
    16 %\orcid{0000-0003-2518-6692} \\ 
    17 %Gurvan Madec 
    18 %\orcid{0000-0002-6447-4198} \\ 
    19 %Nicolas Martin              \\ 
    20 %S\'{e}bastien Masson 
    21 %\orcid{0000-0002-1694-8117} \\ 
    22 %Pierre Mathiot              \\ 
    23 %Silvia Mocavero 
    24 %\orcid{0000-0002-6309-8282} \\ 
    25 %Simon M\"{u}ller            \\ 
    26 %George Nurser               \\ 
    27 %Guillaume Samson 
    28 %\orcid{0000-0001-7481-6369} \\ 
    29 %Dave Storkey 
     1%% ================================================================================================= 
     2%% Authors 
     3%% ================================================================================================= 
    304 
     5\orcid{0000-0002-6447-4198} Gurvan Madec                \\ 
     6                            Mike Bell                   \\ 
    317\orcid{0000-0002-8742-3289} Romain Bourdall\'{e}-Badie  \\ 
    32                             Mike Bell                   \\ 
    338                            J\'{e}r\^{o}me Chanut       \\ 
    349\orcid{0000-0002-5752-1849} Emanuela Clementi           \\ 
     
    3914                            Dan Lea                     \\ 
    4015\orcid{0000-0003-2518-6692} Claire L\'{e}vy             \\ 
    41 \orcid{0000-0002-6447-4198} Gurvan Madec                \\ 
    4216                            Nicolas Martin              \\ 
    4317\orcid{0000-0002-1694-8117} S\'{e}bastien Masson        \\ 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/bibliography.bib

    r14116 r14328  
    119119  issn          = "0148-0227", 
    120120  doi           = "10.1029/2001jc000922" 
     121} 
     122 
     123@Article{         Asaydavis2016, 
     124  author        = {Asay-Davis, X. S. and Cornford, S. L. and Durand, G. and Galton-Fenzi, B. K. and Gladstone, R. M. and Gudmundsson, G. H. and Hattermann, T. and Holland, D. M. and Holland, D. and Holland, P. R. and Martin, D. F. and Mathiot, P. and Pattyn, F. and Seroussi, H.}, 
     125  title         = {Experimental design for three interrelated marine ice sheet and ocean model intercomparison projects: MISMIP v. 3 (MISMIP$+$), ISOMIP v. 2 (ISOMIP$+$) and MISOMIP v. 1 (MISOMIP1)}, 
     126  journal       = {Geoscientific Model Development}, 
     127  volume        = {9}, 
     128  year          = {2016}, 
     129  number        = {7}, 
     130  pages         = {2471--2497}, 
     131  url           = {https://www.geosci-model-dev.net/9/2471/2016/}, 
     132  doi           = {10.5194/gmd-9-2471-2016} 
    121133} 
    122134 
     
    878890} 
    879891 
     892@Article{         favier2019, 
     893  author        = {Favier, L. and Jourdain, N. C. and Jenkins, A. and Merino, N. and Durand, G. and Gagliardini, O. and Gillet-Chaulet, F. and Mathiot, P.}, 
     894  title         = {Assessment of sub-shelf melting parameterisations using the ocean--ice-sheet coupled model NEMO(v3.6)--Elmer/Ice(v8.3)}, 
     895  journal       = {Geoscientific Model Development}, 
     896  volume        = {12}, 
     897  year          = {2019}, 
     898  number        = {6}, 
     899  pages         = {2255--2283}, 
     900  url           = {https://www.geosci-model-dev.net/12/2255/2019/}, 
     901  doi           = {10.5194/gmd-12-2255-2019} 
     902} 
     903 
    880904@article{         flather_JPO94, 
    881905  title         = "A storm surge prediction model for the northern Bay of 
     
    11861210} 
    11871211 
     1212@article{         grosfeld1997, 
     1213author          = {Grosfeld, K. and Gerdes, R. and Determann, J.}, 
     1214title           = {Thermohaline circulation and interaction between ice shelf cavities and the adjacent open ocean}, 
     1215journal         = {Journal of Geophysical Research: Oceans}, 
     1216 
     1217volume          = {102}, 
     1218number          = {C7}, 
     1219pages           = {15595-15610}, 
     1220doi             = {10.1029/97JC00891}, 
     1221url             = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/97JC00891}, 
     1222year            = {1997} 
     1223} 
     1224 
    11881225@article{         guilyardi.madec.ea_CD01, 
    11891226  title         = "The role of lateral ocean physics in the upper ocean 
     
    14141451  issn          = "0148-0227", 
    14151452  doi           = "10.1029/91jc01842" 
     1453} 
     1454 
     1455@article{         jenkins2001, 
     1456  author        = {Jenkins, Adrian and Hellmer, Hartmut H. and Holland, David M.}, 
     1457  title         = {The Role of Meltwater Advection in the Formulation of Conservative Boundary Conditions at an Ice–Ocean Interface}, 
     1458  journal       = {Journal of Physical Oceanography}, 
     1459  volume        = {31}, 
     1460  number        = {1}, 
     1461  pages         = {285-296}, 
     1462  year          = {2001}, 
     1463  doi           = {10.1175/1520-0485(2001)031<0285:TROMAI>2.0.CO;2}, 
     1464  url           = {https://doi.org/10.1175/1520-0485(2001)031<0285:TROMAI>2.0.CO;2} 
     1465} 
     1466 
     1467@article{         jourdain2017, 
     1468  author        = {Jourdain, Nicolas C. and Mathiot, Pierre and Merino, Nacho and Durand, Gaël and Le Sommer, Julien and Spence, Paul and Dutrieux, Pierre and Madec, Gurvan}, 
     1469  title         = {Ocean circulation and sea-ice thinning induced by melting ice shelves in the Amundsen Sea}, 
     1470  journal       = {Journal of Geophysical Research: Oceans}, 
     1471  volume        = {122}, 
     1472  number        = {3}, 
     1473  pages         = {2550-2573}, 
     1474  keywords      = {Amundsen Sea, ice shelf, efficiency, circumpolar deep water, ocean circulation, sea ice}, 
     1475  doi           = {10.1002/2016JC012509}, 
     1476  url           = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2016JC012509}, 
     1477  year          = {2017} 
    14161478} 
    14171479 
     
    22262288} 
    22272289 
     2290@article{Merino_OM2016, 
     2291title = "Antarctic icebergs melt over the Southern Ocean: Climatology and impact on sea ice", 
     2292journal = "Ocean Modelling", 
     2293volume = "104", 
     2294pages = "99 - 110", 
     2295year = "2016", 
     2296issn = "1463-5003", 
     2297doi = "https://doi.org/10.1016/j.ocemod.2016.05.001", 
     2298url = "http://www.sciencedirect.com/science/article/pii/S1463500316300300", 
     2299author = "Nacho Merino and Julien {Le Sommer} and Gael Durand and Nicolas C. Jourdain and Gurvan Madec and Pierre Mathiot and Jean Tournadre", 
     2300keywords = "Icebergs, Southern Ocean, Sea ice, Freshwater fluxes", 
     2301abstract = "Recent increase in Antarctic freshwater release to the Southern Ocean is suggested to contribute to change in water masses and sea ice. However, climate models differ in their representation of the freshwater sources. Recent improvements in altimetry-based detection of small icebergs and in estimates of the mass loss of Antarctica may help better constrain the values of Antarctic freshwater releases. We propose a model-based seasonal climatology of iceberg melt over the Southern Ocean using state-of-the-art observed glaciological estimates of the Antarctic mass loss. An improved version of a Lagrangian iceberg model is coupled with a global, eddy-permitting ocean/sea ice model and compared to small icebergs observations. Iceberg melt increases sea ice cover, about 10% in annual mean sea ice volume, and decreases sea surface temperature over most of the Southern Ocean, but with distinctive regional patterns. Our results underline the importance of improving the representation of Antarctic freshwater sources. This can be achieved by forcing ocean/sea ice models with a climatological iceberg fresh-water flux." 
     2302} 
     2303 
    22282304@article{         merryfield.holloway.ea_JPO99, 
    22292305  title         = "A Global Ocean Model with Double-Diffusive Mixing", 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/chapters.tex

    r14113 r14328  
    1 \subfile{../subfiles/chap_model_basics}   %% 1. 
    2 \subfile{../subfiles/chap_time_domain}    %% 2.  Time discretisation (time stepping strategy) 
    3 \subfile{../subfiles/chap_DOM}            %% 3.  Space discretisation 
    4 \subfile{../subfiles/chap_TRA}            %% 4.  Tracer advection/diffusion equation 
    5 \subfile{../subfiles/chap_DYN}            %% 5.  Dynamics : momentum equation 
    6 \subfile{../subfiles/chap_SBC}            %% 6.  Surface Boundary Conditions 
    7 \subfile{../subfiles/chap_LBC}            %% 7.  Lateral Boundary Conditions 
    8 \subfile{../subfiles/chap_LDF}            %% 8.  Lateral diffusion 
    9 \subfile{../subfiles/chap_ZDF}            %% 9.  Vertical diffusion 
    10 \subfile{../subfiles/chap_DIA}            %% 10. Outputs and Diagnostics 
    11 \subfile{../subfiles/chap_OBS}            %% 11. Observation operator 
    12 \subfile{../subfiles/chap_ASM}            %% 12. Assimilation increments 
    13 \subfile{../subfiles/chap_STO}            %% 13. Stochastic param. 
    14 \subfile{../subfiles/chap_misc}           %% 14. Miscellaneous topics 
    15 \subfile{../subfiles/chap_cfgs}           %% 15. Predefined configurations 
     1%% ================================================================================================= 
     2%% Chapters 
     3%% ================================================================================================= 
     4 
     5\subfile{../subfiles/chap_model_basics} %% Continuous equations and assumptions 
     6\subfile{../subfiles/chap_time_domain}  %% Time discretisation (time stepping strategy) 
     7\subfile{../subfiles/chap_DOM}          %% Space discretisation 
     8\subfile{../subfiles/chap_TRA}          %% Tracer advection/diffusion equation 
     9\subfile{../subfiles/chap_DYN}          %% Dynamics : momentum equation 
     10\subfile{../subfiles/chap_SBC}          %% Surface Boundary Conditions 
     11\subfile{../subfiles/chap_LBC}          %% Lateral Boundary Conditions 
     12\subfile{../subfiles/chap_LDF}          %% Lateral diffusion 
     13\subfile{../subfiles/chap_ZDF}          %% Vertical diffusion 
     14\subfile{../subfiles/chap_DIA}          %% Outputs and Diagnostics 
     15\subfile{../subfiles/chap_OBS}          %% Observation operator 
     16\subfile{../subfiles/chap_ASM}          %% Assimilation increments 
     17\subfile{../subfiles/chap_STO}          %% Stochastic param. 
     18\subfile{../subfiles/chap_misc}         %% Miscellaneous topics 
     19\subfile{../subfiles/chap_cfgs}         %% Predefined configurations 
    1620 
    1721%% Not included 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/introduction.tex

    r11543 r14328  
    1  
    21\chapter*{Introduction} 
    3  
    4 %\chaptertoc 
    5  
    6 %\paragraph{Changes record} ~\\ 
    7  
    8 %\thispagestyle{plain} 
    9  
    10 %{\footnotesize 
    11 %  \begin{tabularx}{\textwidth}{l||X|X} 
    12 %    Release & Author(s) & Modifications \\ 
    13 %    \hline 
    14 %    {\em x.x} & {\em ...} & {\em ...}   \\ 
    15 %    {\em ...} & {\em ...} & {\em ...}   \\ 
    16 %  \end{tabularx} 
    17 %} 
    18  
    19 %\clearpage 
    202 
    213The \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean (\NEMO) is 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/main/settings.tex

    r11591 r14328  
    1 %% Engine (subfolder name) 
    2 \def \engine{NEMO} 
     1%% Engine 
     2\def\eng{NEMO} 
    33 
    4 %% Cover page settings 
    5 \def \spacetop{  \vspace*{1.85cm} } 
    6 \def \heading{NEMO ocean engine} 
    7 %\def \subheading{} 
    8 \def \spacedown{ \vspace*{0.75cm } } 
    9 \def \authorswidth{ 0.3\linewidth} 
    10 \def \rulelenght{270pt} 
    11 \def \abstractwidth{0.6\linewidth} 
     4%% Cover page 
     5\def\spcup{\vspace*{2.15cm}} 
     6\def\hdg{NEMO ocean engine} 
     7%\def\shdg{} 
     8\def\spcdn{\vspace*{1cm}} 
     9\def\autwd{0.25\linewidth} 
     10\def\lnlg{270pt} 
     11\def\abswd{0.65\linewidth} 
    1212 
    13 %% Manual color (frontpage banner, links and chapter boxes) 
    14 \def \setmanualcolor{ \definecolor{manualcolor}{cmyk}{1, .60, 0, .4} } 
     13%% Color in cmyk model for manual theme (frontpage banner, links and chapter boxes) 
     14\def\clr{1,.60,0,.4} 
    1515 
    1616%% IPSL publication number 
    17 \def \ipslnum{27} 
     17\def\ipsl{27} 
    1818 
    19 %% Zenodo ID, i.e. doi:10.5281/zenodo.\([0-9]*\) 
    20 \def \zid{1464816} 
     19%% Zenodo ID, i.e. doi:10.5281/zenodo.\zid 
     20\def\zid{1464816} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex

    r14178 r14328  
    77 
    88%    {\em 4.0} & {\em Andrew Coward} & {\em Created at v4.0 from materials removed from chap\_DOM that are still relevant to the \forcode{DOMAINcfg} tool and which illustrate and explain the choices to be made by the user when setting up new domains }  \\ 
    9  
    10 \thispagestyle{plain} 
    119 
    1210\chaptertoc 
     
    1816    Release & Author(s) & Modifications \\ 
    1917    \hline 
    20     {\em   4.0} & {\em ...} & {\em ...} \\ 
     18    {\em   next}& {\em Pierre Mathiot} & {\em add ice shelf and closed sea option description } \\ 
     19    {\em   4.0} & {\em Andrew Coward}  & {\em Created at v4.0 from materials removed from chap\_DOM that are still relevant to the \forcode{DOMAINcfg} tool and which illustrate and explain the choices to be made by the user when setting up new domains }  \\ 
    2120    {\em   3.6} & {\em ...} & {\em ...} \\ 
    2221    {\em   3.4} & {\em ...} & {\em ...} \\ 
     
    9190 \item [{\np{jphgr_mesh}{jphgr\_mesh}=0}]  The most general curvilinear orthogonal grids. 
    9291  The coordinates and their first derivatives with respect to $i$ and $j$ are provided 
    93   in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module. 
     92  in a input file (\textit{coordinates.nc}), read in \rou{hgr\_read} subroutine of the domhgr module. 
    9493  This is now the only option available within \NEMO\ itself from v4.0 onwards. 
    9594\item [{\np{jphgr_mesh}{jphgr\_mesh}=1 to 5}] A few simple analytical grids are provided (see below). 
     
    156155The reference coordinate transformation $z_0(k)$ defines the arrays $gdept_0$ and 
    157156$gdepw_0$ for $t$- and $w$-points, respectively. See \autoref{sec:DOMCFG_sco} for the 
    158 S-coordinate options.  As indicated on \autoref{fig:DOM_index_vert} \jp{jpk} is the number of 
    159 $w$-levels.  $gdepw_0(1)$ is the ocean surface.  There are at most \jp{jpk}-1 $t$-points 
     157S-coordinate options.  As indicated on \autoref{fig:DOM_index_vert} \texttt{jpk} is the number of 
     158$w$-levels.  $gdepw_0(1)$ is the ocean surface.  There are at most \texttt{jpk}-1 $t$-points 
    160159inside the ocean, the additional $t$-point at $jk = jpk$ is below the sea floor and is not 
    161160used.  The vertical location of $w$- and $t$-levels is defined from the analytic 
     
    167166 
    168167It is possible to define a simple regular vertical grid by giving zero stretching 
    169 (\np[=0]{ppacr}{ppacr}).  In that case, the parameters \jp{jpk} (number of $w$-levels) 
     168(\np[=0]{ppacr}{ppacr}).  In that case, the parameters \texttt{jpk} (number of $w$-levels) 
    170169and \np{pphmax}{pphmax} (total ocean depth in meters) fully define the grid. 
    171170 
     
    179178\end{gather} 
    180179 
    181 where $k = 1$ to \jp{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $t-$levels.  Such an 
     180where $k = 1$ to \texttt{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $t-$levels.  Such an 
    182181expression allows us to define a nearly uniform vertical location of levels at the ocean 
    183182top and bottom with a smooth hyperbolic tangent transition in between (\autoref{fig:DOMCFG_zgr}). 
     
    227226\end{equation} 
    228227 
    229 With the choice of the stretching $h_{cr} = 3$ and the number of levels \jp{jpk}~$= 31$, 
     228With the choice of the stretching $h_{cr} = 3$ and the number of levels \texttt{jpk}~$= 31$, 
    230229the four coefficients $h_{sur}$, $h_0$, $h_1$, and $h_{th}$ in 
    231230\autoref{eq:DOMCFG_zgr_ana_2} have been determined such that \autoref{eq:DOMCFG_zgr_coef} 
     
    245244  Values from $3$ to $10$ are usual. 
    246245\item \np{ppkth}{ppkth}~$= h_{th}$: is approximately the model level at which maximum stretching occurs 
    247   (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk}) 
     246  (nondimensional, usually of order 1/2 or 2/3 of \texttt{jpk}) 
    248247\item \np{ppdzmin}{ppdzmin}: minimum thickness for the top layer (in meters). 
    249248\item \np{pphmax}{pphmax}: total depth of the ocean (meters). 
     
    251250 
    252251As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are: 
    253 \jp{jpk}~$= 46$, \np{ppacr}{ppacr}~$= 9$, \np{ppkth}{ppkth}~$= 23.563$, \np{ppdzmin}{ppdzmin}~$= 6~m$, 
     252\texttt{jpk}~$= 46$, \np{ppacr}{ppacr}~$= 9$, \np{ppkth}{ppkth}~$= 23.563$, \np{ppdzmin}{ppdzmin}~$= 6~m$, 
    254253\np{pphmax}{pphmax}~$= 5750~m$. 
    255254 
     
    346345  This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount. 
    347346\item [{\np[=1]{nn_bathy}{nn\_bathy}}]: read a bathymetry and ice shelf draft (if needed). 
    348   The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at 
     347  The \textit{bathy\_meter.nc} file (Netcdf format) provides the ocean depth (positive, in meters) at 
    349348  each grid point of the model grid. 
    350349  The bathymetry is usually built by interpolating a standard bathymetry product (\eg\ ETOPO2) onto 
     
    352351  Defining the bathymetry also defines the coastline: where the bathymetry is zero, 
    353352  no wet levels are defined (all levels are masked). 
    354  
    355   The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at 
    356   each grid point of the model grid. 
    357   This file is only needed if \np[=.true.]{ln_isfcav}{ln\_isfcav}. 
    358   Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 
    359353\end{description} 
    360354 
     
    396390bathymetry varies by less than one level thickness from one grid point to the next).  The 
    397391reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry. 
    398 With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than 
     392With partial steps, layers from 1 to \texttt{jpk-2} can have a thickness smaller than 
    399393$e_{3t}(jk)$. 
    400394 
    401 The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger 
     395The model deepest layer (\texttt{jpk-1}) is allowed to have either a smaller or larger 
    402396thickness than $e_{3t}(jpk)$: the maximum thickness allowed is $2*e_{3t}(jpk - 1)$. 
    403397 
     
    592586This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site. 
    593587 
     588\section{Ice shelf cavity definition} 
     589\label{subsec:zgrisf} 
     590 
     591  If the under ice shelf seas are opened (\np{ln_isfcav}{ln\_isfcav}), the depth of the ice shelf/ocean interface has to be include in  
     592  the \textit{isfdraft\_meter} file (Netcdf format). This file need to include the \textit{isf\_draft} variable.  
     593  A positive value will mean ice shelf/ocean or ice shelf bedrock interface below the reference 0m ssh.  
     594  The exact shape of the ice shelf cavity (grounding line position and minimum thickness of the water column under an ice shelf, ...) can be specify in \nam{zgr_isf}{zgr_isf}. 
     595 
     596\begin{listing} 
     597  \caption{\forcode{&namzgr_isf}} 
     598  \label{lst:namzgr_isf} 
     599  \begin{forlines} 
     600!----------------------------------------------------------------------- 
     601&namzgr_isf    !   isf cavity geometry definition                       (default: OFF) 
     602!----------------------------------------------------------------------- 
     603   rn_isfdep_min    = 10.         ! minimum isf draft tickness (if lower, isf draft set to this value) 
     604   rn_glhw_min      = 1.e-3       ! minimum water column thickness to define the grounding line 
     605   rn_isfhw_min     = 10          ! minimum water column thickness in the cavity once the grounding line defined. 
     606   ln_isfchannel    = .false.     ! remove channel (based on 2d mask build from isfdraft-bathy) 
     607   ln_isfconnect    = .false.     ! force connection under the ice shelf (based on 2d mask build from isfdraft-bathy) 
     608      nn_kisfmax       = 999         ! limiter in level on the previous condition. (if change larger than this number, get back to value before we enforce the connection) 
     609      rn_zisfmax       = 7000.       ! limiter in m     on the previous condition. (if change larger than this number, get back to value before we enforce the connection) 
     610   ln_isfcheminey   = .false.     ! close cheminey 
     611   ln_isfsubgl      = .false.     ! remove subglacial lake created by the remapping process 
     612      rn_isfsubgllon   =    0.0      !  longitude of the seed to determine the open ocean 
     613      rn_isfsubgllat   =    0.0      !  latitude  of the seed to determine the open ocean 
     614/ 
     615  \end{forlines} 
     616\end{listing} 
     617 
     618   The options available to define the shape of the under ice shelf cavities are listed in \nam{zgr_isf}{zgr_isf} (\texttt{DOMAINcfg} only, \autoref{lst:namzgr_isf}). 
     619 
     620   \subsection{Model ice shelf draft definition} 
     621   \label{subsec:zgrisf_isfd} 
     622 
     623   First of all, the tool make sure, the ice shelf draft ($h_{isf}$) is sensible and compatible with the bathymetry. 
     624   There are 3 compulsory steps to achieve this: 
     625 
     626   \begin{description} 
     627   \item{\np{rn_isfdep_min}{rn\_isfdep\_min}:} this is the minimum ice shelf draft. This is to make sure there is no ridiculous thin ice shelf. If \np{rn_isfdep_min}{rn\_isfdep\_min} is smaller than the surface level, \np{rn_isfdep_min}{rn\_isfdep\_min} is set to $e3t\_1d(1)$.  
     628   Where $h_{isf} < MAX(e3t\_1d(1),\np{rn_isfdep_min}{rn\_isfdep\_min}$), $h_{isf}$ is set to \np{rn_isfdep_min}{rn\_isfdep\_min}. 
     629 
     630   \item{\np{rn_glhw_min}{rn\_glhw\_min}:} This parameter is used to define the grounding line position. 
     631   Where the difference between the bathymetry and the ice shelf draft is smaller than \np{rn_glhw_min}{rn\_glhw\_min}, the cell are grounded (ie masked).  
     632   This step is needed to take into account possible small mismatch between ice shelf draft value and bathymetry value (sources are coming from different grid, different data processes, rounding error, ...). 
     633 
     634   \item{\np{rn_isfhw_min}{rn\_isfhw\_min}:} This parameter is the minimum water column thickness in the cavity.  
     635   Where the water column thickness is lower than \np{rn_isfhw_min}{rn\_isfhw\_min}, the ice shelf draft is adjusted to match this criterion.  
     636   If for any reason, this adjustement break the minimum ice shelf draft allowed (\np{rn_isfdep_min}{rn\_isfdep\_min}), the cell is masked. 
     637   \end{description} 
     638 
     639   Once all these adjustements are made, if the water column thickness contains one cell wide channels, these channels can be closed using \np{ln_isfchannel}{ln\_isfchannel}.   
     640  
     641   \subsection{Model top level definition} 
     642   After the definition of the ice shelf draft, the tool defines the top level.  
     643   The compulsory criterion is that the water column needs at least 2 wet cells in the water column at U- and V-points. 
     644   To do so, if there one cell wide water column, the tools adjust the ice shelf draft to fillful the requierement.\\ 
     645 
     646   The process is the following: 
     647   \begin{description} 
     648   \item{step 1:} The top level is defined in the same way as the bottom level is defined. 
     649   \item{step 2:} The isolated grid point in the bathymetry are filled (as it is done in a domain without ice shelf) 
     650   \item{step 3:} The tools make sure, the top level is above or equal to the bottom level 
     651   \item{step 4:} If the water column at a U- or V- point is one wet cell wide, the ice shelf draft is adjusted. So the actual top cell become fully open and the new 
     652   top cell thickness is set to the minimum cell thickness allowed (following the same logic as for the bottom partial cell). This step is iterated 4 times to ensure the condition is fullfill along the 4 sides of the cell. 
     653   \end{description} 
     654 
     655   In case of steep slope and shallow water column, it likely that 2 cells are disconnected (bathymetry above its neigbourging ice shelf draft).  
     656   The option \np{ln_isfconnect}{ln\_isfconnect} allow the tool to force the connection between these 2 cells. 
     657   Some limiters in meter or levels on the digging allowed by the tool are available (respectively, \np{rn_zisfmax}{rn\_zisfmax} or \np{rn_kisfmax}{rn\_kisfmax}). 
     658   This will prevent the formation of subglacial lakes at the expense of long vertical pipe to connect cells at very different levels. 
     659 
     660   \subsection{Subglacial lakes} 
     661   Despite careful setting of your ice shelf draft and bathymetry input file as well as setting described in \autoref{subsec:zgrisf_isfd}, some situation are unavoidable. 
     662   For exemple if you setup your ice shelf draft and bathymetry to do ocean/ice sheet coupling,  
     663   you may decide to fill the whole antarctic with a bathymetry and an ice shelf draft value (ice/bedrock interface depth when grounded).  
     664   If you do so, the subglacial lakes will show up (Vostock for example). An other possibility is with coarse vertical resolution, some ice shelves could be cut in 2 parts:  
     665   one connected to the main ocean and an other one closed which can be considered as a subglacial sea be the model.\\ 
     666 
     667   The namelist option \np{ln_isfsubgl}{ln\_isfsubgl} allow you to remove theses subglacial lakes. 
     668   This may be useful for esthetical reason or for stability reasons: 
     669 
     670   \begin{description} 
     671   \item $\bullet$ In a subglacial lakes, in case of very weak circulation (often the case), the only heat flux is the conductive heat flux through the ice sheet.  
     672         This will lead to constant freezing until water reaches -20C.  
     673         This is one of the defitiency of the 3 equation melt formulation (for details on this formulation, see: \autoref{sec:isf}). 
     674   \item $\bullet$ In case of coupling with an ice sheet model,  
     675         the ssh in the subglacial lakes and the main ocean could be very different (ssh initial adjustement for example),  
     676         and so if for any reason both a connected at some point, the model is likely to fall over.\\ 
     677   \end{description} 
     678 
     679\section{Closed sea definition} 
     680\label{sec:clocfg} 
     681 
     682\begin{listing} 
     683  \caption{\forcode{&namclo}} 
     684  \label{lst:namdom_clo} 
     685  \begin{forlines} 
     686!----------------------------------------------------------------------- 
     687&namclo ! (closed sea : need ln_domclo = .true. in namcfg) 
     688!----------------------------------------------------------------------- 
     689   rn_lon_opnsea = -2.0     ! longitude seed of open ocean 
     690   rn_lat_opnsea = -2.0     ! latitude  seed of open ocean 
     691   nn_closea = 8           ! number of closed seas ( = 0; only the open_sea mask will be computed) 
     692   !                name   ! lon_src ! lat_src ! lon_trg ! lat_trg ! river mouth area   ! net evap/precip correction scheme ! radius tgt   ! id trg 
     693   !                       ! (degree)! (degree)! (degree)! (degree)! local/coast/global ! (glo/rnf/emp)                     !     (m)      ! 
     694   ! North American lakes 
     695   sn_lake(1) = 'superior' ,  -86.57 ,  47.30  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2     
     696   sn_lake(2) = 'michigan' ,  -87.06 ,  42.74  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2     
     697   sn_lake(3) = 'huron'    ,  -82.51 ,  44.74  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2     
     698   sn_lake(4) = 'erie'     ,  -81.13 ,  42.25  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2     
     699   sn_lake(5) = 'ontario'  ,  -77.72 ,  43.62  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2     
     700   ! African Lake 
     701   sn_lake(6) = 'victoria' ,   32.93 ,  -1.08  ,  30.44  , 31.37   , 'coast'            , 'emp'                             ,   100000.0 , 3     
     702   ! Asian Lakes 
     703   sn_lake(7) = 'caspian'  ,   50.0  ,  44.0   ,   0.0   ,  0.0    , 'global'           , 'glo'                             ,        0.0 , 1      
     704   sn_lake(8) = 'aral'     ,   60.0  ,  45.0   ,   0.0   ,  0.0    , 'global'           , 'glo'                             ,        0.0 , 1     
     705/ 
     706   \end{forlines} 
     707\end{listing} 
     708 
     709The options available to define the closed seas and how closed sea net fresh water input will be redistributed by NEMO are listed in \nam{clo}{dom_clo} (\texttt{DOMAINcfg} only). 
     710The individual definition of each closed sea is managed by \np{sn_lake}{sn\_lake}. In this fields the user needs to define:\\ 
     711   \begin{description} 
     712   \item $\bullet$    the name of the closed sea (print output purposes). 
     713   \item $\bullet$    the seed location to define the area of the closed sea (if seed on land because not present in this configuration, this closed sea will be ignored).\\ 
     714   \item $\bullet$    the seed location for the target area. 
     715   \item $\bullet$    the type of target area ('local','coast' or 'global'). See point 6 for definition of these cases. 
     716   \item $\bullet$    the type of redistribution scheme for the net fresh water flux over the closed sea (as a runoff in a target area, as emp in a target area, as emp globally). For the runoff case, if the net fwf is negative, it will be redistribut globally. 
     717   \item $\bullet$    the radius of the target area (not used for the 'global' case). So the target defined by a 'local' target area of a radius of 100km, for example, correspond to all the wet points within this radius. The coastal case will return only the coastal point within the specifid radius. 
     718   \item $\bullet$    the target id. This target id is used to group multiple lakes into the same river ouflow (Great Lakes for example). 
     719   \end{description} 
     720 
     721The closed sea module defines a number of masks in the \textit{domain\_cfg} output: 
     722   \begin{description} 
     723   \item[\textit{mask\_opensea}:] a mask of the main ocean without all the closed seas closed. This mask is defined by a flood filling algorithm with an initial seed (localisation defined by \np{rn_lon_opnsea}{rn\_lon\_opnsea} and \np{rn_lat_opnsea}{rn\_lat\_opnsea}). 
     724   \item[\textit{mask\_csglo}, \textit{mask\_csrnf}, \textit{mask\_csemp}:] a mask of all the closed seas defined in the namelist by \np{sn_lake}{sn\_lake} for each redistribution scheme. The total number of defined closed seas has to be defined in \np{nn_closea}{nn\_closea}. 
     725   \item[\textit{mask\_csgrpglo}, \textit{mask\_csgrprnf}, \textit{mask\_csgrpemp}:] a mask of all the closed seas and targets grouped by target id for each type of redistribution scheme. 
     726   \item[\textit{mask\_csundef}:] a mask of all the closed sea not defined in \np{sn_lake}{sn\_lake}. This will allows NEMO to mask them if needed or to inform the user of potential minor issues in its bathymetry. 
     727   \end{description} 
     728    
    594729\subinc{\input{../../global/epilogue}} 
    595730 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/apdx_algos.tex

    r11693 r14328  
    55\chapter{Note on some algorithms} 
    66\label{apdx:ALGOS} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/apdx_diff_opers.tex

    r11693 r14328  
    55\chapter{Diffusive Operators} 
    66\label{apdx:DIFFOPERS} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/apdx_invariants.tex

    r11693 r14328  
    55\chapter{Discrete Invariants of the Equations} 
    66\label{apdx:INVARIANTS} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/apdx_s_coord.tex

    r11693 r14328  
    88%    {\em 4.0} & {\em Mike Bell} & {\em review}  \\ 
    99%    {\em 3.x} & {\em Gurvan Madec} & {\em original}  \\ 
    10  
    11 \thispagestyle{plain} 
    1210 
    1311\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/apdx_triads.tex

    r14113 r14328  
    1515\chapter{Iso-Neutral Diffusion and Eddy Advection using Triads} 
    1616\label{apdx:TRIADS} 
    17  
    18 \thispagestyle{plain} 
    1917 
    2018\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_ASM.tex

    r11693 r14328  
    88%    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\ 
    99%    {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version}  \\ 
    10  
    11 \thispagestyle{plain} 
    1210 
    1311\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_DIA.tex

    r13970 r14328  
    1111%    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\ 
    1212%    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\ 
    13  
    14 \thispagestyle{plain} 
    1513 
    1614\chaptertoc 
     
    666664\end{forlines} 
    667665 
    668 \noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 
     666\noindent will give the following file name radical: \textit{myfile\_ORCA2\_19891231\_freq1d} 
    669667 
    670668%% ================================================================================================= 
     
    19421940When \np[=.true.]{ln_subbas}{ln\_subbas}, transports and stream function are computed for the Atlantic, Indian, 
    19431941Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 
    1944 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 
     1942The sub-basin decomposition requires an input file (\textit{subbasins}) which contains three 2D mask arrays, 
    19451943the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}). 
    19461944 
    19471945\begin{listing} 
    1948   \nlst{namptr} 
     1946%  \nlst{namptr} 
    19491947  \caption{\forcode{&namptr}} 
    19501948  \label{lst:namptr} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_DIU.tex

    r11693 r14328  
    55\chapter{Diurnal SST Models (DIU)} 
    66\label{chap:DIU} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_DOM.tex

    r11693 r14328  
    1414% -    domclo: closed sea and lakes.... 
    1515%              management of closea sea area: specific to global cfg, both forced and coupled 
    16  
    17 \thispagestyle{plain} 
    1816 
    1917\chaptertoc 
     
    368366\label{subsec:DOM_size} 
    369367 
    370 The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and 
    371 \jp{jpkglo} for the $i$, $j$ and $k$ directions, respectively. 
     368The total size of the computational domain is set by the parameters \texttt{jpiglo}, \texttt{jpjglo} and 
     369\texttt{jpkglo} for the $i$, $j$ and $k$ directions, respectively. 
    372370Note, that the variables \texttt{jpi} and \texttt{jpj} refer to 
    373371the size of each processor subdomain when the code is run in parallel using domain decomposition 
     
    379377in which case \np{cn_cfg}{cn\_cfg} and \np{nn_cfg}{nn\_cfg} are set from these values accordingly). 
    380378 
    381 The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}. 
     379The global lateral boundary condition type is selected from 8 options using parameter \texttt{jperio}. 
    382380See \autoref{sec:LBC_jperio} for details on the available options and 
    383 the corresponding values for \jp{jperio}. 
     381the corresponding values for \texttt{jperio}. 
    384382 
    385383%% ================================================================================================= 
     
    465463\begin{enumerate} 
    466464\item the bathymetry given in meters; 
    467 \item the number of levels of the model (\jp{jpk}); 
     465\item the number of levels of the model (\texttt{jpk}); 
    468466\item the analytical transformation $z(i,j,k)$ and the vertical scale factors 
    469467  (derivatives of the transformation); and 
     
    575573every gridcell in the model regardless of the choice of vertical coordinate. 
    576574With constant z-levels, e3 metrics will be uniform across each horizontal level. 
    577 In the partial step case each e3 at the \jp{bottom\_level} 
    578 (and, possibly, \jp{top\_level} if ice cavities are present) 
     575In the partial step case each e3 at the \texttt{bottom\_level} 
     576(and, possibly, \texttt{top\_level} if ice cavities are present) 
    579577may vary from its horizontal neighbours. 
    580578And, in s-coordinates, variations can occur throughout the water column. 
     
    585583those arising from a flat sea surface with zero elevation. 
    586584 
    587 The \jp{bottom\_level} and \jp{top\_level} 2D arrays define 
    588 the \jp{bottom\_level} and top wet levels in each grid column. 
    589 Without ice cavities, \jp{top\_level} is essentially a land mask (0 on land; 1 everywhere else). 
    590 With ice cavities, \jp{top\_level} determines the first wet point below the overlying ice shelf. 
     585The \texttt{bottom\_level} and \texttt{top\_level} 2D arrays define 
     586the \texttt{bottom\_level} and top wet levels in each grid column. 
     587Without ice cavities, \texttt{top\_level} is essentially a land mask (0 on land; 1 everywhere else). 
     588With ice cavities, \texttt{top\_level} determines the first wet point below the overlying ice shelf. 
    591589 
    592590%% ================================================================================================= 
     
    594592\label{subsec:DOM_msk} 
    595593 
    596 From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows: 
     594From \texttt{top\_level} and \texttt{bottom\_level} fields, the mask fields are defined as follows: 
    597595\begin{align*} 
    598596  tmask(i,j,k) &= 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_DYN.tex

    r14177 r14328  
    55\chapter{Ocean Dynamics (DYN)} 
    66\label{chap:DYN} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_LBC.tex

    r14178 r14328  
    55\chapter{Lateral Boundary Condition (LBC)} 
    66\label{chap:LBC} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
     
    161159 
    162160%% ================================================================================================= 
    163 \section[Model domain boundary condition (\forcode{jperio})]{Model domain boundary condition (\protect\jp{jperio})} 
     161\section{Model domain boundary condition (\forcode{jperio})} 
    164162\label{sec:LBC_jperio} 
    165163 
     
    170168 
    171169%% ================================================================================================= 
    172 \subsection[Closed, cyclic (\forcode{=0,1,2,7})]{Closed, cyclic (\protect\jp{jperio}\forcode{=0,1,2,7})} 
     170\subsection{Closed, cyclic (\forcode{jperio={0,1,2,7}})} 
    173171\label{subsec:LBC_jperio012} 
    174172 
    175173The choice of closed or cyclic model domain boundary condition is made by 
    176 setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}. 
     174setting \forcode{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}. 
    177175Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 
    178176The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, 
     
    183181\begin{description} 
    184182 
    185 \item [For closed boundary (\jp{jperio}\forcode{=0})], solid walls are imposed at all model boundaries: 
     183\item [For closed boundary (\forcode{jperio=0})], solid walls are imposed at all model boundaries: 
    186184  first and last rows and columns are set to zero. 
    187185 
    188 \item [For cyclic east-west boundary (\jp{jperio}\forcode{=1})], first and last rows are set to zero (closed) whilst the first column is set to 
     186\item [For cyclic east-west boundary (\forcode{jperio=1})], first and last rows are set to zero (closed) whilst the first column is set to 
    189187  the value of the last-but-one column and the last column to the value of the second one 
    190188  (\autoref{fig:LBC_jperio}-a). 
    191189  Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. 
    192190 
    193 \item [For cyclic north-south boundary (\jp{jperio}\forcode{=2})], first and last columns are set to zero (closed) whilst the first row is set to 
     191\item [For cyclic north-south boundary (\forcode{jperio=2})], first and last columns are set to zero (closed) whilst the first row is set to 
    194192  the value of the last-but-one row and the last row to the value of the second one 
    195193  (\autoref{fig:LBC_jperio}-a). 
    196194  Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. 
    197195 
    198 \item [Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{=7})] combines cases 1 and 2. 
     196\item [Bi-cyclic east-west and north-south boundary (\forcode{jperio=7})] combines cases 1 and 2. 
    199197 
    200198\end{description} 
     
    209207 
    210208%% ================================================================================================= 
    211 \subsection[North-fold (\forcode{=3,6})]{North-fold (\protect\jp{jperio}\forcode{=3,6})} 
     209\subsection{North-fold (\forcode{jperio={3,6}})} 
    212210\label{subsec:LBC_north_fold} 
    213211 
     
    288286Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory. 
    289287For this reason, 
    290 the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 
     288the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \texttt{jpi}, \texttt{jpj}, \texttt{jpk}. 
    291289These dimensions include the internal domain and the overlapping rows. 
    292 The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce}, 
     290The number of rows to exchange (known as the halo) is usually set to one (\forcode{nn_hls=1}, in \mdl{par\_oce}, 
    293291and must be kept to one until further notice). 
    294 The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 
     292The whole domain dimensions are named \texttt{jpiglo}, \texttt{jpjglo} and \texttt{jpk}. 
    295293The relationship between the whole domain and a sub-domain is: 
    296294\begin{gather*} 
     
    299297\end{gather*} 
    300298 
    301 One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj. 
     299One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \texttt{jpi} is now always equal to nlci and \texttt{jpj} equal to nlcj. 
    302300 
    303301An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 
     
    309307with $1 \leq i \leq jpi$, $1  \leq j \leq jpj $ , and  $1  \leq k \leq jpk$. 
    310308 
    311 The 1-d arrays $mig(1:\jp{jpi})$ and $mjg(1:\jp{jpj})$, defined in \rou{dom\_glo} routine (\mdl{domain} module), should be used to get global domain indices from local domain indices. The 1-d arrays, $mi0(1:\jp{jpiglo})$, $mi1(1:\jp{jpiglo})$ and $mj0(1:\jp{jpjglo})$, $mj1(1:\jp{jpjglo})$ have the reverse purpose and should be used to define loop indices expressed in global domain indices (see examples in \mdl{dtastd} module).\\ 
     309The 1-d arrays $mig(1:\texttt{jpi})$ and $mjg(1:\texttt{jpj})$, defined in \rou{dom\_glo} routine (\mdl{domain} module), should be used to get global domain indices from local domain indices. The 1-d arrays, $mi0(1:\texttt{jpiglo})$, $mi1(1:\texttt{jpiglo})$ and $mj0(1:\texttt{jpjglo})$, $mj1(1:\texttt{jpjglo})$ have the reverse purpose and should be used to define loop indices expressed in global domain indices (see examples in \mdl{dtastd} module).\\ 
    312310 
    313311The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). It is therefore possible that an MPI subdomain contains only land points. To save ressources, we try to supress from the computational domain as much land subdomains as possible. For example if $N_{mpi}$ processes are allocated to NEMO, the domain decomposition will be given by the following equation: 
     
    372370The number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}. 
    373371Each boundary set can be either defined as a series of straight line segments directly in the namelist 
    374 (\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \forcode{&nambdy_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\ifile{coordinates.bdy}'' file must be provided). 
    375 The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 
     372(\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \forcode{&nambdy_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\textit{coordinates.bdy.nc}'' file must be provided). 
     373The coordinates.bdy file is analagous to the usual \NEMO\ ``\textit{coordinates.nc}'' file. 
    376374In the example above, there are two boundary sets, the first of which is defined via a file and 
    377375the second is defined in the namelist. 
     
    570568 
    571569The boundary geometry for each set may be defined in a namelist \forcode{&nambdy_index} or 
    572 by reading in a ``\ifile{coordinates.bdy}'' file. 
    573 The \texttt{nambdy\_index} namelist defines a series of straight-line segments for north, east, south and west boundaries. 
    574 One \texttt{nambdy\_index} namelist block is needed for each boundary condition defined by indexes. 
     570by reading in a ``\textit{coordinates.bdy.nc}'' file. 
     571The \forcode{&nambdy_index} namelist defines a series of straight-line segments for north, east, south and west boundaries. 
     572One \forcode{&nambdy_index} namelist block is needed for each boundary condition defined by indexes. 
    575573For the northern boundary, \texttt{nbdysegn} gives the number of segments, 
    576 \jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and 
    577 \jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
     574\texttt{jpjnob} gives the $j$ index for each segment and \texttt{jpindt} and 
     575\texttt{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
    578576These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 
    579577The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np[>1]{nn_rimwidth}{nn\_rimwidth}. 
    580578 
    581 The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 
     579The boundary geometry may also be defined from a ``\textit{coordinates.bdy.nc}'' file. 
    582580\autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above. 
    583581The file should contain the index arrays for each of the $T$, $U$ and $V$ grids. 
     
    633631  \centering 
    634632  \includegraphics[width=0.66\textwidth]{LBC_nc_header} 
    635   \caption[Header for a \protect\ifile{coordinates.bdy} file]{ 
    636     Example of the header for a \protect\ifile{coordinates.bdy} file} 
     633  \caption[Header for a \textit{coordinates.bdy.nc} file]{ 
     634    Example of the header for a \textit{coordinates.bdy.nc} file} 
    637635  \label{fig:LBC_nc_header} 
    638636\end{figure} 
     
    684682\texttt{<constituent>\_z1} and \texttt{<constituent>\_z2} for the real and imaginary parts of 
    685683SSH, respectively, are expected to be available in file 
    686 \ifile{<input>\_grid\_T}, variables \texttt{<constituent>\_u1} and 
     684\textit{<input>\_grid\_T.nc}, variables \texttt{<constituent>\_u1} and 
    687685\texttt{<constituent>\_u2} for the real and imaginary parts of u, respectively, in file 
    688 \ifile{<input>\_grid\_U}, and \texttt{<constituent>\_v1} and 
     686\textit{<input>\_grid\_U.nc}, and \texttt{<constituent>\_v1} and 
    689687\texttt{<constituent>\_v2} for the real and imaginary parts of v, respectively, in file 
    690 \ifile{<input>\_grid\_V}; when data along open boundary segments is used, 
     688\textit{<input>\_grid\_V.nc}; when data along open boundary segments is used, 
    691689variables \texttt{z1} and \texttt{z2} (real and imaginary part of SSH) are 
    692 expected to be available in file \ifile{<input><constituent>\_grid\_T}, 
     690expected to be available in file \textit{<input><constituent>\_grid\_T.nc}, 
    693691variables \texttt{u1} and \texttt{u2} (real and imaginary part of u) in file 
    694 \ifile{<input><constituent>\_grid\_U}, and variables \texttt{v1} and \texttt{v2} 
     692\textit{<input><constituent>\_grid\_U.nc}, and variables \texttt{v1} and \texttt{v2} 
    695693(real and imaginary part of v) in file 
    696 \ifile{<input><constituent>\_grid\_V}.\par 
     694\textit{<input><constituent>\_grid\_V.nc}.\par 
    697695 
    698696Note that the barotropic velocity components are assumed to be defined 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_LDF.tex

    r14113 r14328  
    55\chapter{Lateral Ocean Physics (LDF)} 
    66\label{chap:LDF} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_OBS.tex

    r14177 r14328  
    1414%    {\em --\texttt{"}--} & {\em ... K. Mogensen, A. Vidard, A. Weaver} & {\em ---\texttt{"}---}  \\ 
    1515%\end{tabular} 
    16  
    17 \thispagestyle{plain} 
    1816 
    1917\chaptertoc 
     
    420418 
    421419To use Sea Level Anomaly (SLA) data the mean dynamic topography (MDT) must be provided in a separate file defined on 
    422 the model grid called \ifile{slaReferenceLevel}. 
     420the model grid called \textit{slaReferenceLevel.nc}. 
    423421The MDT is required in order to produce the model equivalent sea level anomaly from the model sea surface height. 
    424422Below is an example header for this file (on the ORCA025 grid). 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_SBC.tex

    r14177 r14328  
    55\chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB, TDE)} 
    66\label{chap:SBC} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
     
    1715    \hline 
    1816    {\em  next} & {\em Simon M{\" u}ller} & {\em Update of \autoref{sec:SBC_TDE}; revision of \autoref{subsec:SBC_fwb}}\\[2mm] 
     17    {\em  next} & {\em Pierre Mathiot} & {\em update of the ice shelf section (2019 developments)}\\[2mm]   
    1918    {\em   4.0} & {\em ...} & {\em ...} \\ 
    2019    {\em   3.6} & {\em ...} & {\em ...} \\ 
     
    7473  (\np[=0..3]{nn_ice}{nn\_ice}), 
    7574\item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np[=.true.]{ln_rnf}{ln\_rnf}), 
    76 \item the addition of ice-shelf melting as lateral inflow (parameterisation) or 
    77   as fluxes applied at the land-ice ocean interface (\np[=.true.]{ln_isf}{ln\_isf}), 
    7875\item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift 
    7976  (\np[=0..2]{nn_fwb}{nn\_fwb}), 
     
    9996One of these is modification by icebergs (see \autoref{sec:SBC_ICB_icebergs}), 
    10097which act as drifting sources of fresh water. 
    101 Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}), 
    102 which provides additional sources of fresh water. 
    10398 
    10499%% ================================================================================================= 
     
    646641parameters. It is therefore recommended to chose version 3.6 over 3. 
    647642 
    648 \subsection{Cool-skin and warm-layer parametrizations} 
    649 %\subsection[Cool-skin and warm-layer parameterizations (\forcode{ln_skin_cs} \& \forcode{ln_skin_wl})]{Cool-skin and warm-layer parameterizations (\protect\np{ln_skin_cs}{ln\_skin\_cs} \& \np{ln_skin_wl}{ln\_skin\_wl})} 
     643\subsection[Cool-skin and warm-layer parameterizations (   \forcode{ln_skin_cs}               \& \forcode{ln_skin_wl}              )] 
     644           {Cool-skin and warm-layer parameterizations (\protect\np{ln_skin_cs}{ln\_skin\_cs} \&      \np{ln_skin_wl}{ln\_skin\_wl})} 
    650645\label{subsec:SBC_skin} 
    651646 
     
    979974  ocean tide model}: Mf, Mm, Ssa, Mtm, Msf, Msqm, Sa, K1, O1, P1, Q1, J1, S1, 
    980975M2, S2, N2, K2, nu2, mu2, 2N2, L2, T2, eps2, lam2, R2, M3, MKS2, MN4, MS4, M4, 
    981 N4, S4, M6, and M8; see file \hf{tide} and \mdl{tide\_mod} for further 
     976N4, S4, M6, and M8; see file \textit{tide.h90} and \mdl{tide\_mod} for further 
    982977information and references\footnote{As a legacy option \np{ln_tide_var} can be 
    983978  set to \forcode{0}, in which case the 19 tidal constituents (M2, N2, 2N2, S2, 
    984979  K2, K1, O1, Q1, P1, M4, Mf, Mm, Msqm, Mtm, S1, MU2, NU2, L2, and T2; see file 
    985   \hf{tide}) and associated parameters that have been available in NEMO version 
     980  \textit{tide.h90}) and associated parameters that have been available in NEMO version 
    986981  4.0 and earlier are available}. Constituents to be included in the tidal forcing 
    987982(surface and lateral boundaries) are selected by enumerating their respective 
     
    10131008potential). The tidal tilt factor $\gamma = 1 + k - h$ includes the 
    10141009Love numbers $k$ and $h$ \citep{love_PRSL09}; this factor is 
    1015 configurable using \np{rn_tide_gamma} (default value 0.7). Optionally, 
     1010configurable using \np{rn_tide_gamma}{rn\_tide\_gamma} (default value 0.7). Optionally, 
    10161011when \np[=.true.]{ln_tide_ramp}{ln\_tide\_ramp}, the equilibrium tidal 
    10171012forcing can be ramped up linearly from zero during the initial 
     
    11831178 
    11841179%% ================================================================================================= 
    1185 \section[Ice shelf melting (\textit{sbcisf.F90})]{Ice shelf melting (\protect\mdl{sbcisf})} 
    1186 \label{sec:SBC_isf} 
     1180\section[Ice Shelf (ISF)]{Interaction with ice shelves (ISF)} 
     1181\label{sec:isf} 
    11871182 
    11881183\begin{listing} 
    1189   \nlst{namsbc_isf} 
    1190   \caption{\forcode{&namsbc_isf}} 
    1191   \label{lst:namsbc_isf} 
     1184  \nlst{namisf} 
     1185  \caption{\forcode{&namisf}} 
     1186  \label{lst:namisf} 
    11921187\end{listing} 
    11931188 
    1194 The namelist variable in \nam{sbc}{sbc}, \np{nn_isf}{nn\_isf}, controls the ice shelf representation. 
    1195 Description and result of sensitivity test to \np{nn_isf}{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. 
    1196 The different options are illustrated in \autoref{fig:SBC_isf}. 
    1197  
     1189The namelist variable in \nam{isf}{isf}, \np{ln_isf}{ln\_isf}, controls the ice shelf interactions: 
    11981190\begin{description} 
    1199   \item [{\np[=1]{nn_isf}{nn\_isf}}]: The ice shelf cavity is represented (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed). 
    1200   The fwf and heat flux are depending of the local water properties. 
    1201  
    1202   Two different bulk formulae are available: 
     1191   \item $\bullet$ representation of the ice shelf/ocean melting/freezing for opened cavity (cav, \np{ln_isfcav_mlt}{ln\_isfcav\_mlt}). 
     1192   \item $\bullet$ parametrisation of the ice shelf/ocean melting/freezing for closed cavities (par, \np{ln_isfpar_mlt}{ln\_isfpar\_mlt}). 
     1193   \item $\bullet$ coupling with an ice sheet model (\np{ln_isfcpl}{ln\_isfcpl}). 
     1194\end{description} 
     1195 
     1196  \subsection{Ocean/Ice shelf fluxes in opened cavities} 
     1197 
     1198     \np{ln_isfcav_mlt}{ln\_isfcav\_mlt}\forcode{ = .true.} activates the ocean/ice shelf thermodynamics interactions at the ice shelf/ocean interface.  
     1199     If \np{ln_isfcav_mlt}\forcode{ = .false.}, thermodynamics interactions are desctivated but the ocean dynamics inside the cavity is still active. 
     1200     The logical flag \np{ln_isfcav}{ln\_isfcav} control whether or not the ice shelf cavities are closed. \np{ln_isfcav}{ln\_isfcav} is not defined in the namelist but in the domcfg.nc input file.\\ 
     1201 
     1202     3 options are available to represent to ice-shelf/ocean fluxes at the interface: 
     1203     \begin{description} 
     1204        \item[\np{cn_isfcav_mlt}\forcode{ = 'spe'}]: 
     1205        The fresh water flux is specified by a forcing fields \np{sn_isfcav_fwf}{sn\_isfcav\_fwf}. Convention of the input file is: positive toward the ocean (i.e. positive for melting and negative for freezing). 
     1206        The latent heat fluxes is derived from the fresh water flux.  
     1207        The heat content flux is derived from the fwf flux assuming a temperature set to the freezing point in the top boundary layer (\np{rn_htbl}{rn\_htbl}) 
     1208 
     1209        \item[\np{cn_isfcav_mlt}\forcode{ = 'oasis'}]: 
     1210        The \forcode{'oasis'} is a prototype of what could be a method to spread precipitation on Antarctic ice sheet as ice shelf melt inside the cavity when a coupled model Atmosphere/Ocean is used.  
     1211        It has not been tested and therefore the model will stop if you try to use it.  
     1212        Actions will be undertake in 2020 to build a comprehensive interface to do so for Greenland, Antarctic and ice shelf (cav), ice shelf (par), icebergs, subglacial runoff and runoff. 
     1213 
     1214        \item[\np{cn_isfcav_mlt}\forcode{ = '2eq'}]: 
     1215        The heat flux and the fresh water flux (negative for melting) resulting from ice shelf melting/freezing are parameterized following \citet{Grosfeld1997}.  
     1216        This formulation is based on a balance between the vertical diffusive heat flux across the ocean top boundary layer (\autoref{eq:ISOMIP1})  
     1217        and the latent heat due to melting/freezing (\autoref{eq:ISOMIP2}): 
     1218 
     1219        \begin{equation} 
     1220        \label{eq:ISOMIP1} 
     1221        \mathcal{Q}_h = \rho c_p \gamma (T_w - T_f) 
     1222        \end{equation} 
     1223        \begin{equation} 
     1224        \label{eq:ISOMIP2} 
     1225        q = \frac{-\mathcal{Q}_h}{L_f} 
     1226        \end{equation} 
     1227         
     1228        where $\mathcal{Q}_h$($W.m^{-2}$) is the heat flux,q($kg.s^{-1}m^{-2}$) the fresh-water flux,  
     1229        $L_f$ the specific latent heat, $T_w$ the temperature averaged over a boundary layer below the ice shelf (explained below),  
     1230        $T_f$ the freezing point using  the  pressure  at  the  ice  shelf  base  and  the  salinity  of the water in the boundary layer,  
     1231        and $\gamma$ the thermal exchange coefficient. 
     1232 
     1233        \item[\np{cn_isfcav_mlt}\forcode{ = '3eq'}]: 
     1234        For realistic studies, the heat and freshwater fluxes are parameterized following \citep{Jenkins2001}. This formulation is based on three equations:  
     1235        a balance between the vertical diffusive heat flux across the boundary layer  
     1236        , the latent heat due to melting/freezing of ice and the vertical diffusive heat flux into the ice shelf (\autoref{eq:3eq1});  
     1237        a balance between the vertical diffusive salt flux across the boundary layer and the salt source or sink represented by the melting/freezing (\autoref{eq:3eq2});  
     1238        and a linear equation for the freezing temperature of sea water (\autoref{eq:3eq3}, detailed of the linearisation coefficient in \citet{AsayDavis2016}): 
     1239 
     1240        \begin{equation} 
     1241        \label{eq:3eq1} 
     1242        c_p \rho \gamma_T (T_w-T_b) = -L_f q - \rho_i c_{p,i} \kappa \frac{T_s - T_b}{h_{isf}} 
     1243        \end{equation} 
     1244        \begin{equation} 
     1245        \label{eq:3eq2} 
     1246        \rho \gamma_S (S_w - S_b) = (S_i - S_b)q 
     1247        \end{equation} 
     1248        \begin{equation} 
     1249        \label{eq:3eq3} 
     1250        T_b = \lambda_1 S_b + \lambda_2 +\lambda_3 z_{isf} 
     1251        \end{equation} 
     1252 
     1253        where $T_b$ is the temperature at the interface, $S_b$ the salinity at the interface, $\gamma_T$ and $\gamma_S$ the exchange coefficients for temperature and salt, respectively,  
     1254        $S_i$ the salinity of the ice (assumed to be 0), $h_{isf}$ the ice shelf thickness, $z_{isf}$ the ice shelf draft, $\rho_i$ the density of the iceshelf,  
     1255        $c_{p,i}$ the specific heat capacity of the ice, $\kappa$ the thermal diffusivity of the ice  
     1256        and $T_s$ the atmospheric surface temperature (at the ice/air interface, assumed to be -20C).  
     1257        The Liquidus slope ($\lambda_1$), the liquidus intercept ($\lambda_2$) and the Liquidus pressure coefficient ($\lambda_3$)  
     1258        for TEOS80 and TEOS10 are described in \citep{AsayDavis2016} and in \citep{Jourdain2017}. 
     1259        The linear system formed by \autoref{eq:3eq1}, \autoref{eq:3eq2} and the linearised equation for the freezing temperature of sea water (\autoref{eq:3eq3}) can be solved for $S_b$ or $T_b$.  
     1260        Afterward, the freshwater flux ($q$) and the heat flux ($\mathcal{Q}_h$) can be computed. 
     1261 
     1262     \end{description} 
     1263 
     1264     \begin{table}[h] 
     1265        \centering 
     1266        \caption{Description of the parameters hard coded into the ISF module} 
     1267        \label{tab:isf} 
     1268        \begin{tabular}{|l|l|l|l|} 
     1269        \hline 
     1270        Symbol    & Description               & Value              & Unit               \\ 
     1271        \hline 
     1272        $C_p$     & Ocean specific heat       & 3992               & $J.kg^{-1}.K^{-1}$ \\ 
     1273        $L_f$     & Ice latent heat of fusion & $3.34 \times 10^5$ & $J.kg^{-1}$        \\ 
     1274        $C_{p,i}$ & Ice specific heat         & 2000               & $J.kg^{-1}.K^{-1}$ \\ 
     1275        $\kappa$  & Heat diffusivity          & $1.54 \times 10^{-6}$& $m^2.s^{-1}$     \\ 
     1276        $\rho_i$  & Ice density               & 920                & $kg.m^3$           \\ 
     1277        \hline 
     1278        \end{tabular} 
     1279     \end{table} 
     1280 
     1281     Temperature and salinity used to compute the fluxes in \autoref{eq:ISOMIP1}, \autoref{eq:3eq1} and \autoref{eq:3eq2} are the average temperature in the top boundary layer \citep{losch_JGR08}.  
     1282     Its thickness is defined by \np{rn_htbl}{rn\_htbl}. 
     1283     The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the first \np{rn_htbl}{rn\_htbl} m. 
     1284     Then, the fluxes are spread over the same thickness (ie over one or several cells). 
     1285     If \np{rn_htbl}{rn\_htbl} is larger than top $e_{3}t$, there is no more direct feedback between the freezing point at the interface and the top cell temperature. 
     1286     This can lead to super-cool temperature in the top cell under melting condition. 
     1287     If \np{rn_htbl}{rn\_htbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\ 
     1288 
     1289     Each melt formula (\np{cn_isfcav_mlt}\forcode{ = '3eq'} or \np{cn_isfcav_mlt}\forcode{ = '2eq'}) depends on an exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice. 
     1290     Below, the exchange coeficient $\Gamma^{T}$ and $\Gamma^{S}$ are respectively defined by \np{rn_gammat0}{rn\_gammat0} and \np{rn_gammas0}{rn\_gammas0}.  
     1291     There are 3 different ways to compute the exchange velocity: 
     1292 
     1293     \begin{description} 
     1294        \item[\np{cn_gammablk}\forcode{='spe'}]: 
     1295        The salt and heat exchange coefficients are constant and defined by: 
     1296\[ 
     1297\gamma^{T} = \Gamma^{T} 
     1298\] 
     1299\[ 
     1300\gamma^{S} = \Gamma^{S} 
     1301\]  
     1302        This is the recommended formulation for ISOMIP. 
     1303 
     1304   \item[\np{cn_gammablk}\forcode{='vel'}]: 
     1305        The salt and heat exchange coefficients are velocity dependent and defined as 
     1306\[ 
     1307\gamma^{T} = \Gamma^{T} \times u_{*}  
     1308\] 
     1309\[ 
     1310\gamma^{S} = \Gamma^{S} \times u_{*} 
     1311\] 
     1312        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_htbl}{rn\_htbl} meters). 
     1313        See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application and ISOMIP+/MISOMIP configuration. 
     1314 
     1315   \item[\np{cn_gammablk}\forcode{'vel\_stab'}]: 
     1316        The salt and heat exchange coefficients are velocity and stability dependent and defined as: 
     1317\[ 
     1318\gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}  
     1319\] 
     1320        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_tbl}{rn\_htbl} meters), 
     1321        $\Gamma_{Turb}$ the contribution of the ocean stability and 
     1322        $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 
     1323        See \citet{holland.jenkins_JPO99} for all the details on this formulation.  
     1324        This formulation has not been extensively tested in NEMO (not recommended). 
     1325     \end{description} 
     1326 
     1327\subsection{Ocean/Ice shelf fluxes in parametrised cavities} 
    12031328 
    12041329  \begin{description} 
    1205   \item [{\np[=1]{nn_isfblk}{nn\_isfblk}}]: The melt rate is based on a balance between the upward ocean heat flux and 
    1206     the latent heat flux at the ice shelf base. A complete description is available in \citet{hunter_trpt06}. 
    1207   \item [{\np[=2]{nn_isfblk}{nn\_isfblk}}]: The melt rate and the heat flux are based on a 3 equations formulation 
    1208     (a heat flux budget at the ice base, a salt flux budget at the ice base and a linearised freezing point temperature equation). 
    1209     A complete description is available in \citet{jenkins_JGR91}. 
     1330 
     1331     \item[\np{cn_isfpar_mlt}\forcode{ = 'bg03'}]: 
     1332     The ice shelf cavities are not represented. 
     1333     The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting. 
     1334     The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL) 
     1335     (\np{sn_isfpar_zmax}{sn\_isfpar\_zmax}) and the base of the ice shelf along the calving front 
     1336     (\np{sn_isfpar_zmin}{sn\_isfpar\_zmin}) as in (\np{cn_isfpar_mlt}\forcode{ = 'spe'}). 
     1337     The effective melting length (\np{sn_isfpar_Leff}{sn\_isfpar\_Leff}) is read from a file. 
     1338     This parametrisation has not been tested since a while and based on \citet{Favier2019},  
     1339     this parametrisation should probably not be used. 
     1340 
     1341     \item[\np{cn_isfpar_mlt}\forcode{ = 'spe'}]: 
     1342     The ice shelf cavity is not represented. 
     1343     The fwf (\np{sn_isfpar_fwf}{sn\_isfpar\_fwf}) is prescribed and distributed along the ice shelf edge between 
     1344     the depth of the average grounding line (GL) (\np{sn_isfpar_zmax}{sn\_isfpar\_zmax}) and 
     1345     the base of the ice shelf along the calving front (\np{sn_isfpar_zmin}{sn\_isfpar\_min}). Convention of the input file is positive toward the ocean (i.e. positive for melting and negative for freezing). 
     1346     The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
     1347 
     1348     \item[\np{cn_isfpar_mlt}\forcode{ = 'oasis'}]: 
     1349     The \forcode{'oasis'} is a prototype of what could be a method to spread precipitation on Antarctic ice sheet as ice shelf melt inside the cavity when a coupled model Atmosphere/Ocean is used.  
     1350     It has not been tested and therefore the model will stop if you try to use it.  
     1351     Action will be undertake in 2020 to build a comprehensive interface to do so for Greenland, Antarctic and ice shelf (cav), ice shelf (par), icebergs, subglacial runoff and runoff. 
     1352 
    12101353  \end{description} 
    12111354 
    1212   Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{losch_JGR08}. 
    1213   Its thickness is defined by \np{rn_hisf_tbl}{rn\_hisf\_tbl}. 
    1214   The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn_hisf_tbl}{rn\_hisf\_tbl} m. 
    1215   Then, the fluxes are spread over the same thickness (ie over one or several cells). 
    1216   If \np{rn_hisf_tbl}{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature. 
    1217   This can lead to super-cool temperature in the top cell under melting condition. 
    1218   If \np{rn_hisf_tbl}{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\ 
    1219  
    1220   Each melt bulk formula depends on a exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice. 
    1221   There are 3 different ways to compute the exchange coeficient: 
    1222   \begin{description} 
    1223   \item [{\np[=0]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0}{rn\_gammas0} and \np{rn_gammat0}{rn\_gammat0}. 
    1224     \begin{gather*} 
    1225        % \label{eq:SBC_isf_gamma_iso} 
    1226       \gamma^{T} = rn\_gammat0 \\ 
    1227       \gamma^{S} = rn\_gammas0 
    1228     \end{gather*} 
    1229     This is the recommended formulation for ISOMIP. 
    1230   \item [{\np[=1]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity dependent and defined as 
    1231     \begin{gather*} 
    1232       \gamma^{T} = rn\_gammat0 \times u_{*} \\ 
    1233       \gamma^{S} = rn\_gammas0 \times u_{*} 
    1234     \end{gather*} 
    1235     where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters). 
    1236     See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application. 
    1237   \item [{\np[=2]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity and stability dependent and defined as: 
    1238     \[ 
    1239       \gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}} 
    1240     \] 
    1241     where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters), 
    1242     $\Gamma_{Turb}$ the contribution of the ocean stability and 
    1243     $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 
    1244     See \citet{holland.jenkins_JPO99} for all the details on this formulation. 
    1245     This formulation has not been extensively tested in \NEMO\ (not recommended). 
    1246   \end{description} 
    1247 \item [{\np[=2]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented. 
    1248   The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting. 
    1249   The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    1250   (\np{sn_depmax_isf}{sn\_depmax\_isf}) and the base of the ice shelf along the calving front 
    1251   (\np{sn_depmin_isf}{sn\_depmin\_isf}) as in (\np[=3]{nn_isf}{nn\_isf}). 
    1252   The effective melting length (\np{sn_Leff_isf}{sn\_Leff\_isf}) is read from a file. 
    1253 \item [{\np[=3]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented. 
    1254   The fwf (\np{sn_rnfisf}{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between 
    1255   the depth of the average grounding line (GL) (\np{sn_depmax_isf}{sn\_depmax\_isf}) and 
    1256   the base of the ice shelf along the calving front (\np{sn_depmin_isf}{sn\_depmin\_isf}). 
    1257   The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    1258 \item [{\np[=4]{nn_isf}{nn\_isf}}]: The ice shelf cavity is opened (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed). 
    1259   However, the fwf is not computed but specified from file \np{sn_fwfisf}{sn\_fwfisf}). 
    1260   The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    1261   As in \np[=1]{nn_isf}{nn\_isf}, the fluxes are spread over the top boundary layer thickness (\np{rn_hisf_tbl}{rn\_hisf\_tbl}) 
    1262 \end{description} 
    1263  
    1264 $\bullet$ \np[=1]{nn_isf}{nn\_isf} and \np[=2]{nn_isf}{nn\_isf} compute a melt rate based on 
     1355\np{cn_isfcav_mlt}\forcode{ = '2eq'}, \np{cn_isfcav_mlt}\forcode{ = '3eq'} and \np{cn_isfpar_mlt}\forcode{ = 'bg03'} compute a melt rate based on 
    12651356the water mass properties, ocean velocities and depth. 
    1266 This flux is thus highly dependent of the model resolution (horizontal and vertical), 
    1267 realism of the water masses onto the shelf ...\\ 
    1268  
    1269 $\bullet$ \np[=3]{nn_isf}{nn\_isf} and \np[=4]{nn_isf}{nn\_isf} read the melt rate from a file. 
     1357The resulting fluxes are thus highly dependent of the model resolution (horizontal and vertical) and  
     1358realism of the water masses onto the shelf.\\ 
     1359 
     1360\np{cn_isfcav_mlt}\forcode{ = 'spe'} and \np{cn_isfpar_mlt}\forcode{ = 'spe'} read the melt rate from a file. 
    12701361You have total control of the fwf forcing. 
    12711362This can be useful if the water masses on the shelf are not realistic or 
    12721363the resolution (horizontal/vertical) are too coarse to have realistic melting or 
    1273 for studies where you need to control your heat and fw input.\\ 
    1274  
    1275 The ice shelf melt is implemented as a volume flux as for the runoff. 
    1276 The fw addition due to the ice shelf melting is, at each relevant depth level, added to 
    1277 the horizontal divergence (\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divhor}. 
    1278 See \autoref{sec:SBC_rnf} for all the details about the divergence correction. 
     1364for studies where you need to control your heat and fw input.  
     1365However, if your forcing is not consistent with the dynamics below you can reach unrealistic low water temperature.\\ 
     1366 
     1367The ice shelf fwf is implemented as a volume flux as for the runoff. 
     1368The fwf addition due to the ice shelf melting is, at each relevant depth level, added to 
     1369the horizontal divergence (\textit{hdivn}) in the subroutine \rou{isf\_hdiv}, called from \mdl{divhor}. 
     1370See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction.\\ 
     1371 
     1372Description and result of sensitivity tests to \np{ln_isfcav_mlt}{ln\_isfcav\_mlt} and \np{ln_isfpar_mlt}{ln\_isfpar\_mlt} are presented in \citet{mathiot.jenkins.ea_GMD17}.  
     1373The different options are illustrated in \autoref{fig:ISF}. 
    12791374 
    12801375\begin{figure}[!t] 
    12811376  \centering 
    1282   \includegraphics[width=0.66\textwidth]{SBC_isf} 
     1377  \includegraphics[width=0.66\textwidth]{SBC_isf_v4.2} 
    12831378  \caption[Ice shelf location and fresh water flux definition]{ 
    12841379    Illustration of the location where the fwf is injected and 
    1285     whether or not the fwf is interactif or not depending of \protect\np{nn_isf}{nn\_isf}.} 
    1286   \label{fig:SBC_isf} 
     1380    whether or not the fwf is interactive or not.} 
     1381  \label{fig:ISF} 
    12871382\end{figure} 
    12881383 
    1289 %% ================================================================================================= 
    1290 \section{Ice sheet coupling} 
    1291 \label{sec:SBC_iscpl} 
    1292  
    1293 \begin{listing} 
    1294   \nlst{namsbc_iscpl} 
    1295   \caption{\forcode{&namsbc_iscpl}} 
    1296   \label{lst:namsbc_iscpl} 
    1297 \end{listing} 
     1384\subsection{Available outputs} 
     1385The following outputs are availables via XIOS: 
     1386\begin{description} 
     1387   \item[for parametrised cavities]: 
     1388      \begin{xmllines} 
     1389 <field id="isftfrz_par"     long_name="freezing point temperature in the parametrization boundary layer" unit="degC"     /> 
     1390 <field id="fwfisf_par"      long_name="Ice shelf melt rate"                           unit="kg/m2/s"  /> 
     1391 <field id="qoceisf_par"     long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     /> 
     1392 <field id="qlatisf_par"     long_name="Ice shelf latent heat flux"                    unit="W/m2"     /> 
     1393 <field id="qhcisf_par"      long_name="Ice shelf heat content flux of injected water" unit="W/m2"     /> 
     1394 <field id="fwfisf3d_par"    long_name="Ice shelf melt rate"                           unit="kg/m2/s"  grid_ref="grid_T_3D" /> 
     1395 <field id="qoceisf3d_par"   long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     1396 <field id="qlatisf3d_par"   long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     1397 <field id="qhcisf3d_par"    long_name="Ice shelf heat content flux of injected water" unit="W/m2"     grid_ref="grid_T_3D" /> 
     1398 <field id="ttbl_par"        long_name="temperature in the parametrisation boundary layer" unit="degC" /> 
     1399 <field id="isfthermald_par" long_name="thermal driving of ice shelf melting"          unit="degC"     /> 
     1400      \end{xmllines} 
     1401   \item[for open cavities]: 
     1402      \begin{xmllines} 
     1403 <field id="isftfrz_cav"     long_name="freezing point temperature at ocean/isf interface"                unit="degC"     /> 
     1404 <field id="fwfisf_cav"      long_name="Ice shelf melt rate"                           unit="kg/m2/s"  /> 
     1405 <field id="qoceisf_cav"     long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     /> 
     1406 <field id="qlatisf_cav"     long_name="Ice shelf latent heat flux"                    unit="W/m2"     /> 
     1407 <field id="qhcisf_cav"      long_name="Ice shelf heat content flux of injected water" unit="W/m2"     /> 
     1408 <field id="fwfisf3d_cav"    long_name="Ice shelf melt rate"                           unit="kg/m2/s"  grid_ref="grid_T_3D" /> 
     1409 <field id="qoceisf3d_cav"   long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     1410 <field id="qlatisf3d_cav"   long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     1411 <field id="qhcisf3d_cav"    long_name="Ice shelf heat content flux of injected water" unit="W/m2"     grid_ref="grid_T_3D" /> 
     1412 <field id="ttbl_cav"        long_name="temperature in Losch tbl"                      unit="degC"     /> 
     1413 <field id="isfthermald_cav" long_name="thermal driving of ice shelf melting"          unit="degC"     /> 
     1414 <field id="isfgammat"       long_name="Ice shelf heat-transfert velocity"             unit="m/s"      /> 
     1415 <field id="isfgammas"       long_name="Ice shelf salt-transfert velocity"             unit="m/s"      /> 
     1416 <field id="stbl"            long_name="salinity in the Losh tbl"                      unit="1e-3"     /> 
     1417 <field id="utbl"            long_name="zonal current in the Losh tbl at T point"      unit="m/s"      /> 
     1418 <field id="vtbl"            long_name="merid current in the Losh tbl at T point"      unit="m/s"      /> 
     1419 <field id="isfustar"        long_name="ustar at T point used in ice shelf melting"    unit="m/s"      /> 
     1420 <field id="qconisf"         long_name="Conductive heat flux through the ice shelf"    unit="W/m2"     /> 
     1421      \end{xmllines} 
     1422\end{description} 
     1423 
     1424%% ================================================================================================= 
     1425\subsection{Ice sheet coupling} 
     1426\label{subsec:ISF_iscpl} 
    12981427 
    12991428Ice sheet/ocean coupling is done through file exchange at the restart step. 
    1300 At each restart step: 
    1301  
    1302 \begin{enumerate} 
    1303 \item the ice sheet model send a new bathymetry and ice shelf draft netcdf file. 
    1304 \item a new domcfg.nc file is built using the DOMAINcfg tools. 
    1305 \item \NEMO\ run for a specific period and output the average melt rate over the period. 
    1306 \item the ice sheet model run using the melt rate outputed in step 4. 
    1307 \item go back to 1. 
    1308 \end{enumerate} 
    1309  
    1310 If \np[=.true.]{ln_iscpl}{ln\_iscpl}, the isf draft is assume to be different at each restart step with 
     1429At each restart step, the procedure is this one: 
     1430 
     1431\begin{description} 
     1432\item[Step 1]: the ice sheet model send a new bathymetry and ice shelf draft netcdf file. 
     1433\item[Step 2]: a new domcfg.nc file is built using the DOMAINcfg tools. 
     1434\item[Step 3]: NEMO run for a specific period and output the average melt rate over the period. 
     1435\item[Step 4]: the ice sheet model run using the melt rate outputed in step 3. 
     1436\item[Step 5]: go back to 1. 
     1437\end{description} 
     1438 
     1439If \np{ln_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step with 
    13111440potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 
    1312 The wetting and drying scheme applied on the restart is very simple and described below for the 6 different possible cases: 
     1441The wetting and drying scheme, applied on the restart, is very simple. The 6 different possible cases for the tracer and ssh are: 
    13131442 
    13141443\begin{description} 
    1315 \item [Thin a cell down]: T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant 
    1316   ($bt_b=bt_n$). 
    1317 \item [Enlarge  a cell]: See case "Thin a cell down" 
    1318 \item [Dry a cell]: mask, T/S, U/V and ssh are set to 0. 
    1319   Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$). 
    1320 \item [Wet a cell]: mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0. 
    1321   If no neighbours, T/S is extrapolated from old top cell value. 
    1322   If no neighbours along i,j and k (both previous test failed), T/S/U/V/ssh and mask are set to 0. 
    1323 \item [Dry a column]: mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0. 
    1324 \item [Wet a column]: set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. 
    1325   If no neighbour, T/S/U/V and mask set to 0. 
     1444   \item[Thin a cell]: 
     1445   T/S/ssh are unchanged. 
     1446 
     1447   \item[Enlarge  a cell]: 
     1448   See case "Thin a cell down" 
     1449 
     1450   \item[Dry a cell]: 
     1451   Mask, T/S, U/V and ssh are set to 0. 
     1452 
     1453   \item[Wet a cell]:  
     1454   Mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$. 
     1455   If no neighbours, T/S is extrapolated from old top cell value.  
     1456   If no neighbours along i,j and k (both previous tests failed), T/S/ssh and mask are set to 0. 
     1457 
     1458   \item[Dry a column]: 
     1459   mask, T/S and ssh are set to 0. 
     1460 
     1461   \item[Wet a column]: 
     1462   set mask to 1, T/S/ssh are extrapolated from neighbours. 
     1463   If no neighbour, T/S/ssh and mask set to 0. 
    13261464\end{description} 
     1465 
     1466The method described above will strongly affect the barotropic transport under an ice shelf when the geometry change. 
     1467In order to keep the model stable, an adjustment of the dynamics at the initialisation after the coupling step is needed.  
     1468The idea behind this is to keep $\pd[\eta]{t}$ as it should be without change in geometry at the initialisation.  
     1469This will prevent any strong velocity due to large pressure gradient.  
     1470To do so, we correct the horizontal divergence before $\pd[\eta]{t}$ is computed in the first time step.\\ 
    13271471 
    13281472Furthermore, as the before and now fields are not compatible (modification of the geometry), 
     
    13311475The horizontal extrapolation to fill new cell with realistic value is called \np{nn_drown}{nn\_drown} times. 
    13321476It means that if the grounding line retreat by more than \np{nn_drown}{nn\_drown} cells between 2 coupling steps, 
    1333 the code will be unable to fill all the new wet cells properly. 
     1477the code will be unable to fill all the new wet cells properly and the model is likely to blow up at the initialisation. 
    13341478The default number is set up for the MISOMIP idealised experiments. 
    13351479This coupling procedure is able to take into account grounding line and calving front migration. 
    1336 However, it is a non-conservative processe. 
     1480However, it is a non-conservative proccess.  
    13371481This could lead to a trend in heat/salt content and volume.\\ 
    13381482 
    13391483In order to remove the trend and keep the conservation level as close to 0 as possible, 
    1340 a simple conservation scheme is available with \np[=.true.]{ln_hsb}{ln\_hsb}. 
    1341 The heat/salt/vol. gain/loss is diagnosed, as well as the location. 
    1342 A correction increment is computed and apply each time step during the next \np{rn_fiscpl}{rn\_fiscpl} time steps. 
    1343 For safety, it is advised to set \np{rn_fiscpl}{rn\_fiscpl} equal to the coupling period (smallest increment possible). 
    1344 The corrective increment is apply into the cell itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry). 
     1484a simple conservation scheme is available with \np{ln_isfcpl_cons}\forcode{ = .true.}. 
     1485The heat/salt/vol. gain/loss are diagnosed, as well as the location. 
     1486A correction increment is computed and applied each time step during the model run. 
     1487The corrective increment are applied into the cells itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry). 
    13451488 
    13461489%% ================================================================================================= 
     
    13901533which are assumed to propagate with their larger parent and thus delay fluxing into the ocean. 
    13911534Melt water (and other variables on the configuration grid) are written into the main \NEMO\ model output files. 
     1535 
     1536By default, iceberg thermodynamic and dynamic are computed using ocean surface variable (sst, ssu, ssv) and the icebergs are not sensible to the bathymetry (only to land) whatever the iceberg draft.  
     1537\citet{Merino_OM2016} developed an option to use vertical profiles of ocean currents and temperature instead (\np{ln_M2016}{ln\_M2016}). 
     1538Full details on the sensitivity to this parameter in done in \citet{Merino_OM2016}.  
     1539If \np{ln_M2016}{ln\_M2016} activated, \np{ln_icb_grd}{ln\_icb\_grd} activate (or not) an option to prevent thick icebergs to move across shallow bank (ie shallower than the iceberg draft). 
     1540This option need to be used with care as it could required to either change the distribution to prevent generation of icebergs with draft larger than the bathymetry  
     1541or to build a variable \forcode{maxclass} to prevent NEMO filling the icebergs classes too thick for the local bathymetry. 
    13921542 
    13931543Extensive diagnostics can be produced. 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_STO.tex

    r11693 r14328  
    55\chapter{Stochastic Parametrization of EOS (STO)} 
    66\label{chap:STO} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_TRA.tex

    r13476 r14328  
    55\chapter{Ocean Tracers (TRA)} 
    66\label{chap:TRA} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
     
    735733  (see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
    736734\item [\textit{fwfisf}] The mass flux associated with ice shelf melt, 
    737   (see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied). 
     735  (see \autoref{sec:isf} for further details on how the ice shelf melt is computed and applied). 
    738736\end{labeling} 
    739737 
     
    930928When \np{nn_geoflx}{nn\_geoflx} is set to 2, 
    931929a spatially varying geothermal heat flux is introduced which is provided in 
    932 the \ifile{geothermal\_heating} NetCDF file 
     930the \textit{geothermal\_heating.nc} NetCDF file 
    933931(\autoref{fig:TRA_geothermal}) \citep{emile-geay.madec_OS09}. 
    934932 
     
    11511149\citep{madec.delecluse.ea_JPO96}. 
    11521150 
    1153 For generating \ifile{resto}, 
     1151For generating \textit{resto.nc}, 
    11541152see the documentation for the DMP tools provided with the source code under \path{./tools/DMP_TOOLS}. 
    11551153 
     
    11751173$\gamma$ is initialized as \np{rn_atfp}{rn\_atfp}, its default value is \forcode{10.e-3}. 
    11761174Note that the forcing correction term in the filter is not applied in linear free surface 
    1177 (\jp{ln\_linssh}\forcode{=.true.}) (see \autoref{subsec:TRA_sbc}). 
     1175(\np[=.true.]{ln_linssh}{ln\_linssh}) (see \autoref{subsec:TRA_sbc}). 
    11781176Not also that in constant volume case, the time stepping is performed on $T$, 
    11791177not on its content, $e_{3t}T$. 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_ZDF.tex

    r14177 r14328  
    88\chapter{Vertical Ocean Physics (ZDF)} 
    99\label{chap:ZDF} 
    10  
    11 \thispagestyle{plain} 
    1210 
    1311\chaptertoc 
     
    11811179These values are assigned in \mdl{zdfdrg}. 
    11821180Note that there is support for local enhancement of these values via an externally defined 2D mask array 
    1183 (\np[=.true.]{ln_boost}{ln\_boost}) given in the \ifile{bfr\_coef} input NetCDF file. 
     1181(\np[=.true.]{ln_boost}{ln\_boost}) given in the \textit{bfr\_coef.nc} input NetCDF file. 
    11841182The mask values should vary from 0 to 1. 
    11851183Locations with a non-zero mask value will have the friction coefficient increased by 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_cfgs.tex

    r14196 r14328  
    55\chapter{Configurations} 
    66\label{chap:CFGS} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
     
    8583the SI3 model (ORCA-ICE) and possibly with PISCES biogeochemical model (ORCA-ICE-PISCES). 
    8684An appropriate namelist is available in \path{./cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2. 
    87 The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file, 
     85The domain of ORCA2 configuration is defined in \textit{ORCA\_R2\_zps\_domcfg.nc} file, 
    8886this file is available in tar file on the \NEMO\ community zenodo platform: \\ 
    8987https://doi.org/10.5281/zenodo.2640723 
     
    152150Each of configuration is set through the \textit{domain\_cfg} domain configuration file, 
    153151which sets the grid size and configuration name parameters. 
    154 The \NEMO\ System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file 
     152The \NEMO\ System Team provides only ORCA2 domain input file "\textit{ORCA\_R2\_zps\_domcfg.nc}" file 
    155153(\autoref{tab:CFGS_ORCA}). 
    156154 
     
    158156  \centering 
    159157  \begin{tabular}{p{4cm} c c c c} 
    160     Horizontal Grid & \jp{ORCA\_index} & \jp{jpiglo} & \jp{jpjglo} \\ 
     158    Horizontal Grid & \texttt{ORCA\_index} & \texttt{jpiglo} & \texttt{jpjglo} \\ 
    161159    \hline \hline 
    162160    % 4   \deg\ &              4   &          92 &          76 \\ 
     
    246244Its horizontal resolution (and thus the size of the domain) is determined by 
    247245setting \np{nn_GYRE}{nn\_GYRE} in \nam{usr_def}{usr\_def}: 
     246 
    248247\begin{align*} 
    249   \jp{jpiglo} = 30 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}} \\ 
    250   \jp{jpjglo} = 20 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}} 
     248   jpiglo = 30 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}} \\ 
     249   jpjglo = 20 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}} 
    251250\end{align*} 
    252251 
    253252Obviously, the namelist parameters have to be adjusted to the chosen resolution, 
    254253see the Configurations pages on the \NEMO\ web site (\NEMO\ Configurations). 
    255 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:DOM_zgr_e3}). 
     254In the vertical, GYRE uses the default 30 ocean levels (\forcode{jpk = 31}, \autoref{fig:DOM_zgr_e3}). 
    256255 
    257256\begin{listing} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_conservation.tex

    r11693 r14328  
    55\chapter{Invariants of the Primitive Equations} 
    66\label{chap:CONS} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_misc.tex

    r14113 r14328  
    55\chapter{Miscellaneous Topics} 
    66\label{chap:MISC} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
     
    1614    Release & Author(s) & Modifications \\ 
    1715    \hline 
     16    {\em   X.X} & {\em Pierre Mathiot} & {update of the closed sea section} 
    1817    {\em   4.0} & {\em ...} & {\em ...} \\ 
    1918    {\em   3.6} & {\em ...} & {\em ...} \\ 
     
    109108\end{figure} 
    110109 
    111 \begin{figure}[!tbp] 
    112   \centering 
    113   \includegraphics[width=0.66\textwidth]{MISC_closea_mask_example} 
    114   \caption[Mask fields for the \protect\mdl{closea} module]{ 
    115     Example of mask fields for the \protect\mdl{closea} module. 
    116     \textit{Left}: a closea\_mask field; 
    117     \textit{Right}: a closea\_mask\_rnf field. 
    118     In this example, if \protect\np{ln_closea}{ln\_closea} is set to \forcode{.true.}, 
    119     the mean freshwater flux over each of the American Great Lakes will be set to zero, 
    120     and the total residual for all the lakes, if negative, will be put into 
    121     the St Laurence Seaway in the area shown.} 
    122   \label{fig:MISC_closea_mask_example} 
    123 \end{figure} 
    124  
    125110%% ================================================================================================= 
    126111\section[Closed seas (\textit{closea.F90})]{Closed seas (\protect\mdl{closea})} 
    127112\label{sec:MISC_closea} 
     113 
     114\begin{listing} 
     115  \nlst{namclo} 
     116  \caption{\forcode{&namclo}} 
     117  \label{lst:namclo} 
     118\end{listing} 
    128119 
    129120Some configurations include inland seas and lakes as ocean 
     
    138129to zero and put the residual flux into the ocean. 
    139130 
    140 Prior to \NEMO\ 4 the locations of inland seas and lakes was set via 
    141 hardcoded indices for various ORCA configurations. From \NEMO\ 4 onwards 
    142 the inland seas and lakes are defined using mask fields in the 
    143 domain configuration file. The options are as follows. 
    144  
    145 \begin{enumerate} 
    146 \item {{\bfseries No ``closea\_mask'' field is included in domain configuration 
    147   file.} In this case the closea module does nothing.} 
    148  
    149 \item {{\bfseries A field called closea\_mask is included in the domain 
    150 configuration file and ln\_closea=.false. in namelist namcfg.} In this 
    151 case the inland seas defined by the closea\_mask field are filled in 
    152 (turned to land points) at run time. That is every point in 
    153 closea\_mask that is nonzero is set to be a land point.} 
    154  
    155 \item {{\bfseries A field called closea\_mask is included in the domain 
    156 configuration file and ln\_closea=.true. in namelist namcfg.} Each 
    157 inland sea or group of inland seas is set to a positive integer value 
    158 in the closea\_mask field (see \autoref{fig:MISC_closea_mask_example} 
    159 for an example). The net surface flux over each inland sea or group of 
     131The inland seas and lakes are defined using mask fields in the 
     132domain configuration file. Special treatment of the closed sea (redistribution of net freshwater or mask those), are defined in \autoref{lst:namclo} and 
     133can be trigger by \np{ln_closea}{ln\_closea}\forcode{=.true.} in namelist namcfg. 
     134 
     135The options available are the following: 
     136\begin{description} 
     137\item[\np{ln_maskcs}{ln\_maskcs}\forcode{ = .true.}] All the closed seas are masked using \textit{mask\_opensea} variable. 
     138\item[\np{ln_maskcs}{ln\_maskcs}\forcode{ = .false.}] The net surface flux over each inland sea or group of 
    160139inland seas is set to zero each timestep and the residual flux is 
    161 distributed over the global ocean (ie. all ocean points where 
    162 closea\_mask is zero).} 
    163  
    164 \item {{\bfseries Fields called closea\_mask and closea\_mask\_rnf are 
    165 included in the domain configuration file and ln\_closea=.true. in 
    166 namelist namcfg.} This option works as for option 3, except that if 
    167 the net surface flux over an inland sea is negative (net 
    168 precipitation) it is put into the ocean at specified runoff points. A 
    169 net positive surface flux (net evaporation) is still spread over the 
    170 global ocean. The mapping from inland seas to runoff points is defined 
    171 by the closea\_mask\_rnf field. Each mapping is defined by a positive 
    172 integer value for the inland sea(s) and the corresponding runoff 
    173 points. An example is given in 
    174 \autoref{fig:MISC_closea_mask_example}. If no mapping is provided for a 
    175 particular inland sea then the residual is spread over the global 
    176 ocean.} 
    177  
    178 \item {{\bfseries Fields called closea\_mask and closea\_mask\_emp are 
    179 included in the domain configuration file and ln\_closea=.true. in 
    180 namelist namcfg.} This option works the same as option 4 except that 
    181 the nonzero net surface flux is sent to the ocean at the specified 
    182 runoff points regardless of whether it is positive or negative. The 
    183 mapping from inland seas to runoff points in this case is defined by 
    184 the closea\_mask\_emp field.} 
    185 \end{enumerate} 
    186  
    187 There is a python routine to create the closea\_mask fields and append 
    188 them to the domain configuration file in the utils/tools/DOMAINcfg directory. 
     140distributed over a target area. 
     141\end{description} 
     142 
     143When \np{ln_maskcs}{ln\_maskcs}\forcode{ = .false.},  
     1443 options are available for the redistribution (set up of these options is done in the tool DOMAINcfg): 
     145\begin{description}[font=$\bullet$ ] 
     146\item[ glo]: The residual flux is redistributed globally. 
     147\item[ emp]: The residual flux is redistributed as emp in a river outflow. 
     148\item[ rnf]: The residual flux is redistributed as rnf in a river outflow if negative. If there is a net evaporation, the residual flux is redistributed globally. 
     149\end{description} 
     150 
     151For each case, 2 masks are needed (\autoref{fig:MISC_closea_mask_example}):  
     152\begin{description} 
     153\item $\bullet$ one describing the 'sources' (ie the closed seas concerned by each options) called \textit{mask\_csglo}, \textit{mask\_csrnf}, \textit{mask\_csemp}.  
     154\item $\bullet$ one describing each group of inland seas (the Great Lakes for example) and the target area (river outflow or world ocean) for each group of inland seas (St Laurence for the Great Lakes for example) called 
     155\textit{mask\_csgrpglo}, \textit{mask\_csgrprnf}, \textit{mask\_csgrpemp}. 
     156\end{description} 
     157 
     158\begin{figure}[!tbp] 
     159  \centering 
     160  \includegraphics[width=0.66\textwidth]{MISC_closea_mask_example} 
     161  \caption[Mask fields for the \protect\mdl{closea} module]{ 
     162    Example of mask fields for the \protect\mdl{closea} module. 
     163    \textit{Left}: a \textit{mask\_csrnf} field; 
     164    \textit{Right}: a \textit{mask\_csgrprnf} field. 
     165    In this example, if \protect\np{ln_closea}{ln\_closea} is set to \forcode{.true.}, 
     166    the mean freshwater flux over each of the American Great Lakes will be set to zero, 
     167    and the total residual for all the lakes, if negative, will be put into 
     168    the St Laurence Seaway in the area shown.} 
     169  \label{fig:MISC_closea_mask_example} 
     170\end{figure} 
     171 
     172Closed sea not defined (because too small, issue in the bathymetry definition ...) are defined in \textit{mask\_csundef}. 
     173These points can be masked using the namelist option \np{ln_mask_csundef}{ln\_mask\_csundef}\forcode{= .true.} or used to correct the bathymetry input file.\\ 
     174 
     175The masks needed for the closed sea can be created using the DOMAINcfg tool in the utils/tools/DOMAINcfg directory. 
     176See \autoref{sec:clocfg} for details on the usage of definition of the closed sea masks. 
    189177 
    190178%% ================================================================================================= 
     
    205193 
    206194\noindent Consider an ORCA1 
    207 configuration using the extended grid domain configuration file: \ifile{eORCA1\_domcfg.nc} 
     195configuration using the extended grid domain configuration file: \textit{eORCA1\_domcfg.nc} 
    208196This file define a horizontal domain of 362x332.  The first row with 
    209197open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran\ indexing) 
     
    226214\noindent Note that with this option, the j-size of the global domain is (extended 
    227215j-size minus \np{open_ocean_jstart}{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value 
    228 for the configuration. This means an alternative version of \ifile{eORCA1\_domcfg.nc} must 
     216for the configuration. This means an alternative version of \textit{eORCA1\_domcfg.nc} must 
    229217be created for when \np{ln_use_jattr}{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a 
    230218convenient way of achieving this: 
     
    234222\end{cmds} 
    235223 
    236 The domain configuration file is unique in this respect since it also contains the value of \jp{jpjglo} 
     224The domain configuration file is unique in this respect since it also contains the value of \texttt{jpjglo} 
    237225that is read and used by the model. 
    238226Any other global, 2D and 3D, netcdf, input field can be prepared for use in a reduced domain by adding the 
     
    374362 
    375363When more information is required for monitoring or debugging purposes, the various 
    376 forms of output can be selected via the \np{sn\_cfctl} structure. As well as simple 
     364forms of output can be selected via the \np{sn_cfctl}{sn\_cfctl} structure. As well as simple 
    377365on-off switches this structure also allows selection of a range of processors for 
    378366individual reporting (where appropriate) and a time-increment option to restrict 
     
    449437systems so bug-hunting efforts using this facility should also utilise the \fortran: 
    450438 
    451 \begin{forlines}  
    452    CALL FLUSH(numout) 
    453 \end{forlines} 
     439\forline|CALL FLUSH(numout)| 
    454440 
    455441statement after any additional write statements to ensure that file contents reflect 
     
    482468 
    483469\begin{forlines} 
    484    sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only 
    485    sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T 
    486      sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    487        sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
    488        sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
    489        sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
    490        sn_cfctl%l_layout  = .FALSE. ! 
    491        sn_cfctl%l_prtctl  = .FALSE. ! 
    492        sn_cfctl%l_prttrc  = .FALSE. ! 
    493        sn_cfctl%l_oasout  = .FALSE. ! 
    494        sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
    495        sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
    496        sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
    497        sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
     470   sn_cfctl%l_glochk  = .false. ! Range sanity checks are local (F) or global (T). Set T for debugging only 
     471   sn_cfctl%l_allon   = .false. ! IF T activate all options. If F deactivate all unless l_config is T 
     472   sn_cfctl%l_config  = .true.  ! IF .true. then control which reports are written with the following 
     473   sn_cfctl%l_runstat = .false. ! switches and which areas produce reports with the proc integer settings. 
     474   sn_cfctl%l_trcstat = .false. ! The default settings for the proc integers should ensure 
     475   sn_cfctl%l_oceout  = .false. ! that  all areas report. 
     476   sn_cfctl%l_layout  = .false. ! 
     477   sn_cfctl%l_prtctl  = .false. ! 
     478   sn_cfctl%l_prttrc  = .false. ! 
     479   sn_cfctl%l_oasout  = .false. ! 
     480   sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
     481   sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
     482   sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
     483   sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
    498484\end{forlines} 
    499485 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_model_basics.tex

    r14113 r14328  
    55\chapter{Model Basics} 
    66\label{chap:MB} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex

    r14178 r14328  
    44 
    55\chapter{ essai \zstar \sstar} 
    6  
    7 \thispagestyle{plain} 
    86 
    97\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/NEMO/subfiles/chap_time_domain.tex

    r11693 r14328  
    55\chapter{Time Domain} 
    66\label{chap:TD} 
    7  
    8 \thispagestyle{plain} 
    97 
    108\chaptertoc 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/SI3/build

    • Property svn:ignore
      •  

        old new  
        1111*.toc 
        1212*.xdv 
        13 _minted-* 
         13cache* 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/TOP/build

    • Property svn:ignore
      •  

        old new  
        1111*.toc 
        1212*.xdv 
        13 _minted-* 
         13cache* 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/TOP/subfiles/miscellaneous.tex

    r14229 r14328  
    2424% 
    2525\begin{minted}{bash} 
    26     bld::tool::fppkeys   key_iomput key_top 
     26    bld::tool::fppkeys   key_xios key_top 
    2727\end{minted} 
    2828 
     
    4242% 
    4343\begin{minted}{bash} 
    44    bld::tool::fppkeys   key_iomput key_top 
     44   bld::tool::fppkeys   key_xios key_top 
    4545 
    4646   src::MYBGC::initialization         <MYBGCPATH>/initialization 
     
    6060%Note that, the additional lines specific for the BGC model source and build paths, can be written into a separate file, e.g. named MYBGC.fcm, and then simply included in the cpp_NEMO_MYBGC.fcm as follow 
    6161% 
    62 %bld::tool::fppkeys  key_zdftke key_dynspg_ts key_iomput key_top 
     62%bld::tool::fppkeys  key_zdftke key_dynspg_ts key_xios key_top 
    6363%inc <MYBGCPATH>/MYBGC.fcm 
    6464%This will enable a more portable compilation structure for all MYBGC related configurations. 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global

    • Property svn:ignore set to
      *.aux
      *.bbl
      *.blg
      *.fdb*
      *.fls
      *.idx
      *.ilg
      *.ind
      *.lo*
      *.out
      *.toc
      *.xdv
      cache*
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/document.tex

    r14113 r14328  
    1  
    21%% ================================================================================================= 
    3 %% Template structure for reference manuals 
     2%% Manual structure 
    43%% ================================================================================================= 
    54 
    6 %% NEMO release version 
    7 \def \version{trunk} 
    8  
    9 %% Preamble 
     5%% Preamble: global configuration 
    106%% ================================================================================================= 
    117 
    12 %% Document layout 
    13 \documentclass[fontsize = 10pt, twoside, abstract]{scrreprt} 
     8%% Layout 
     9%\documentclass[fontsize=10pt,twoside,abstract,draft]{scrreprt} 
     10\documentclass[fontsize=10pt,twoside,abstract      ]{scrreprt} 
    1411 
    15 %% Load manual configuration 
    16 \input{../../global/prologue} 
     12%% Overall configuration  
     13\input{../../global/preamble} 
    1714 
    18 %% End of common preamble between main and sub-files 
    19 %% Override custom cmds for full manual compilation 
    20 \newcommand{\subinc}[1]{#1} 
    21 \newcommand{\subexc}[1]{} 
     15%% Special cmds around to {in,ex}clude content only in subfile 
     16  \newcommand{\subinc}[1]{#1} 
     17  \newcommand{\subexc}[1]{  } 
    2218 
    2319\begin{document} 
    2420 
    25 \renewcommand{\subinc}[1]{} 
     21\renewcommand{\subinc}[1]{  } 
    2622\renewcommand{\subexc}[1]{#1} 
    2723 
    28  
    29 %% Frontmatter 
     24%% Frontmatter: covers 
     25%% ({sub}title, DOI, authors, abstract and color theme are specific to each manual) 
    3026%% ================================================================================================= 
    3127 
     28%\frontmatter %% Not recognized in 'scrreprt' document class 
    3229\pagenumbering{gobble}   %% Disable page numbering temporarily 
     30\pagestyle{empty} 
    3331 
    34 %% Title page 
    3532\input{../../global/frontpage} 
    36  
    37 %% Footer for introductory parts (no header by cleaning default) 
    38 \ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 
    39  
    40 %% Information page (2nd page) 
    4133\input{../../global/info_page} 
    4234 
     35\cleardoublepage 
     36 
     37\pagenumbering{Roman} %% Reactivate page numbering (uppercase roman numbers) 
     38\pagestyle{plain} 
     39%\lastpageref{pagesLTS.0} 
     40 
     41\tableofcontents 
    4342\listoffigures 
    4443\listoflistings 
    4544\listoftables 
     45%\listoftodos 
     46%\lastpageref{pagesLTS.Roman} 
    4647 
    47 \clearpage 
     48\cleardoublepage 
    4849 
    49 \pagenumbering{roman} 
    50 \ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 
     50%% Mainmatter: toc, lists, introduction and primary chapters 
     51%% ================================================================================================= 
     52 
     53%\mainmatter %% Not recognized in 'scrreprt' document class 
     54\pagenumbering{arabic} %% Standard page numbering 
     55\pagestyle{plain} 
    5156 
    5257\input{introduction} 
    5358 
    54 %% Table of Contents 
    55 \tableofcontents 
     59\cleardoublepage 
    5660 
    57 \clearpage 
     61\pagestyle{scrheadings} 
     62\renewcommand{\chapterpagestyle}{empty} 
    5863 
     64\input{chapters} 
    5965 
    60 %% Mainmatter 
     66%% Appendix: subordinate chapters 
    6167%% ================================================================================================= 
    6268 
    63 %% Headings for document body 
    64 \pagenumbering{arabic} 
    65 \lohead{Chap.\ \thechapter\ \leftmark} \rehead{Sect.\ \thesection\ \rightmark} 
    66 \ifoot[]{Page\ \pagemark\ of \pageref*{LastPage}} 
     69\appendix %% Chapter numbering with letters by now 
     70\lohead{Apdx \thechapter\ \leftmark} 
    6771 
    68 \include{chapters} 
     72\input{appendices} 
    6973 
     74\input{../../global/coding_rules} %% Add coding rules on every manual 
    7075 
    71 %% Appendix 
     76%\lastpageref{pagesLTS.arabic} 
     77\cleardoublepage 
     78 
     79%% Backmatter: bibliography, glossaries and indices 
    7280%% ================================================================================================= 
    7381 
    74 \appendix   %% Chapter numbering with letters by now 
    75 \lohead{Apdx\ \thechapter\ \leftmark} 
    76 \include{appendices} 
     82%\backmatter %% Not recognized in 'scrreprt' document class 
     83\pagenumbering{roman} %% Lowercase roman numbers 
     84\pagestyle{plain} 
    7785 
    78 %% Append coding rules for every manual 
    79 \input{../../global/coding_rules} 
    80  
    81  
    82 %% Backmatter 
    83 %% ================================================================================================= 
    84  
    85 %% Bibliography and indexes 
    8686\input{../../global/epilogue} 
    8787 
     88%\lastpageref{pagesLTS.roman} 
     89 
    8890\end{document} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/epilogue.tex

    r14113 r14328  
    1  
    2 \clearpage 
     1%% ================================================================================================= 
     2%% Backmatter 
     3%% ================================================================================================= 
    34 
    45%% Bibliography 
     6%% ================================================================================================= 
     7 
    58\phantomsection 
    69\addcontentsline{toc}{chapter}{Bibliography} 
    7 \lohead{Bibliography} \rehead{Bibliography} 
     10\lohead{Bibliography} 
     11\rehead{Bibliography} 
    812\bibliography{../main/bibliography} 
    913 
    1014\clearpage 
    1115 
    12 %% Indexes 
     16%% Indices 
     17%% ================================================================================================= 
     18 
    1319\phantomsection 
    14 \addcontentsline{toc}{chapter}{Indexes} 
    15 \lohead{Indexes} \rehead{Indexes} 
     20\addcontentsline{toc}{chapter}{Indices} 
     21\lohead{Indices} 
     22\rehead{Indices} 
    1623\printindex[blocks] 
    1724\printindex[keys] 
     
    1926\printindex[parameters] 
    2027\printindex[subroutines] 
     28 
     29\clearpage 
     30 
     31%% Glossary 
     32%% ================================================================================================= 
     33 
     34%\phantomsection 
     35%\addcontentsline{toc}{chapter}{Glossary} 
     36%\lohead{Glossary}\rehead{Glossary} 
     37%\printglossaries 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/frontpage.tex

    r14113 r14328  
     1%% ================================================================================================= 
     2%% Front cover 
     3%% ================================================================================================= 
    14 
    25\begin{titlepage} 
    3 \newgeometry{hmargin = 1.5cm, vmargin = 3cm} 
    4   \setlength{\parindent}{0pt} 
     6 \newgeometry{hmargin=1.5cm,vmargin=3cm} 
     7   \setlength{\parindent}{0pt} 
    58 
    6   \begin{center} 
    7     \begin{minipage}{0.3\textwidth} 
    8       \includegraphics[height=1.5cm]{logos/NEMO_grey} 
    9     \end{minipage}\begin{minipage}{0.6\textwidth} 
    10       \begin{center} 
    11       \Large\slshape 
    12       \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\ 
     9   \begin{center} 
     10 
     11      \begin{minipage}{0.3\textwidth} 
     12         \includegraphics[height=1.5cm]{NEMO_grey} 
     13      \end{minipage} %% Don't insert void line between `minipage` envs 
     14      \begin{minipage}{0.6\textwidth} 
     15         \begin{center} 
     16            \Large\slshape 
     17            \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\ 
     18            \medskip 
     19            \hyperref[resources]{ 
     20               \faWordpress \hspace{1cm} \faCodeFork      \hspace{1cm} 
     21               \faGithub    \hspace{1cm} \faCloudDownload \hspace{1cm} \faEnvelope 
     22            } 
     23         \end{center} 
     24      \end{minipage} 
     25 
     26   \end{center} 
     27 
     28   \spcup 
     29   \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\hdg}} 
     30   \ifdef{\shdg}{\medskip\par\textcolor{white}{\Huge\shdg}}{} 
     31   \spcdn 
     32 
     33   \begin{center} 
     34      \LARGE Version {\ver} - {\today} \\ 
    1335      \medskip 
    14       \hyperref[resources]{\textcolor{black}{ 
    15           \faWordpress \hspace{0.75cm} \faCodeFork      \hspace{0.75cm} 
    16           \faGithub    \hspace{0.75cm} \faCloudDownload \hspace{0.75cm} \faEnvelope 
    17         } 
    18       } 
    19       \end{center} 
    20     \end{minipage} 
    21   \end{center} 
     36      \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{zenodo.\zid}} 
     37   \end{center} 
    2238 
    23   \spacetop 
    24   \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\heading}} 
    25   \ifdef{\subheading}{ 
    26     \medskip 
    27     \par 
    28     \textcolor{white}{\Huge \subheading} 
    29   }{} 
    30   \spacedown 
     39   \vfill 
    3140 
    32   \begin{center} 
    33     \LARGE Version \version\ -\ \today \\ 
    34     \medskip 
    35     \href{http://doi.org/10.5281/zenodo.\zid}{ \includegraphics{badges/zenodo.\zid} } 
    36   \end{center} 
     41   \begin{minipage}{\autwd} 
     42      \raggedleft\input{authors} 
     43   \end{minipage} 
     44   \hspace{15pt} %% Don't insert void line between `minipage` envs 
     45   \begin{minipage}{0.02\linewidth} 
     46      \rule{1pt}{\lnlg} 
     47   \end{minipage} 
     48   \hspace{ 5pt} %%   "     ""    ""   ""     "        ""      "" 
     49   \begin{minipage}{\abswd} 
     50      \begin{abstract} 
     51         \input{abstract} 
     52      \end{abstract} 
     53   \end{minipage} 
    3754 
    38   \vfill 
     55   \vfill 
    3956 
    40   \begin{minipage}{\authorswidth} 
    41     \raggedleft 
    42     \input{authors} 
    43   \end{minipage}\hspace{15pt}\begin{minipage}{0.02\linewidth} 
    44     \rule{1pt}{\rulelenght} 
    45   \end{minipage}\hspace{ 5pt}\begin{minipage}{\abstractwidth} 
    46     \begin{abstract} 
    47       \input{abstract} 
    48     \end{abstract} 
    49   \end{minipage} 
    50  
    51   \vfill 
    52  
    53   \begin{center} 
    54     \Large 
    55     \href{http://www.cmcc.it          }{ \includegraphics[height=1cm]{logos/CMCC} } \hspace{0.25cm} 
    56     \href{http://www.cnrs.fr          }{ \includegraphics[height=1cm]{logos/CNRS} } \hspace{0.25cm} 
    57     \href{http://www.mercator-ocean.fr}{ \includegraphics[height=1cm]{logos/MOI}  } \hspace{0.25cm} 
    58     \href{http://www.metoffice.gov.uk }{ \includegraphics[height=1cm]{logos/UKMO} } \hspace{0.25cm} 
    59     \href{http://nerc.ukri.org        }{ \includegraphics[height=1cm]{logos/NERC} } \\ 
    60     \medskip 
    61     \slshape 
    62     {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel \\ 
    63   \end{center} 
     57   \begin{center} 
     58      \Large 
     59      \CMCC{\includegraphics[height=1cm]{CMCC}} \hspace{0.25cm} 
     60      \CNRS{\includegraphics[height=1cm]{CNRS}} \hspace{0.25cm} 
     61       \MOI{\includegraphics[height=1cm]{MOI} } \hspace{0.25cm} 
     62      \UKMO{\includegraphics[height=1cm]{UKMO}} \hspace{0.25cm} 
     63      \NERC{\includegraphics[height=1cm]{NERC}}                 \\ 
     64      \medskip 
     65      \slshape 
     66         {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel 
     67   \end{center} 
    6468 
    6569\end{titlepage} 
    6670 
    67 \restoregeometry 
     71%\restoregeometry 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/highlighting.tex

    r14113 r14328  
     1%% ================================================================================================= 
    12%% Syntax highlighting configuration 
    2 %% ============================================================================== 
    3  
    4 \usepackage[outputdir=../build, chapter, newfloat]{minted} 
     3%% ================================================================================================= 
    54 
    65%% Global highlighting style 
    7 \definecolor{bg}{HTML}{f8f8f8} 
     6\definecolor{bg}{HTML}{f8f8f8} %% ? 
    87\usemintedstyle{emacs} 
    9 \setminted{bgcolor=bg, fontsize=\scriptsize, breaklines} 
    10 \setminted[xml]{style=borland} %% Specific per language 
     8\setminted{bgcolor=bg,fontsize=\scriptsize,breaklines} 
     9\setminted[xml]{style=borland} %% Specific style for XML 
     10 
     11%% Inline 
     12\newmintinline[forcode]{fortran}{bgcolor=,fontsize=auto} %% \forcode{...} 
     13\newmintinline[xmlcode]{xml}{    bgcolor=,fontsize=auto} %% \xmlcode{...} 
     14\newmintinline[snippet]{console}{bgcolor=,fontsize=auto} %% \snippet{...} 
    1115 
    1216%% Oneliner 
    13 \newmint[forline]{fortran}{}   % \forline|...| 
    14 \newmint[xmlline]{xml}{}       % \xmlline|...| 
    15 \newmint[cmd]{console}{}       % \cmd|...| 
     17\newmint[forline]{fortran}{} %% \forline|...| 
     18\newmint[xmlline]{xml    }{} %% \xmlline|...| 
     19\newmint[cmd]{    console}{} %% \cmd|...| 
    1620 
    1721%% Multi-lines 
    18 \newminted[forlines]{fortran}{}   % \begin{forlines} 
    19 \newminted[xmllines]{xml}{}       % \begin{xmllines} 
    20 \newminted[cmds]{console}{}       % \begin{cmds} 
    21 \newminted[clines]{c}{}           % \begin{clines} 
     22\newminted[forlines]{fortran}{} %% \begin{forlines} 
     23\newminted[xmllines]{xml    }{} %% \begin{xmllines} 
     24\newminted[cmds]{    console}{} %% \begin{cmds} 
     25\newminted[clines]{  c      }{} %% \begin{clines} 
    2226 
    23 %% File 
     27%% File (namelist or module) 
    2428\newmintedfile[forfile]{fortran}{} 
    25  
    26 %% Inline 
    27 \newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto}   % \forcode{...} 
    28 \newmintinline[xmlcode]{xml}{    bgcolor=, fontsize=auto}   % \xmlcode{...} 
    29 \newmintinline[snippet]{console}{bgcolor=, fontsize=auto}   % \snippet{...} 
    3029 
    3130%% Namelists inclusion 
    3231\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}} 
     32%\newcommand{\nlst}[1]{ 
     33%   \begin{listing} 
     34%      \newmintedfile{fortran}{../../../namelists/#1} 
     35%      \caption{\forcode{&#1}} 
     36%      \label{lst:#1} 
     37%   \end{listing} 
     38%} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/info_page.tex

    r14113 r14328  
     1%% ================================================================================================= 
     2%% Back cover 
     3%% ================================================================================================= 
    14 
    2 \thispagestyle{plain} 
     5%% Disclaimer 
     6%% ================================================================================================= 
    37 
    4 %% ================================================================ 
    5 %% Disclaimer 
    6 %% ================================================================ 
    78\subsubsection*{Disclaimer} 
    89 
    910Like all components of the modelling framework, 
    10 the \engine\ core engine is developed under the \href{http://www.cecill.info}{CECILL license}, 
     11the \eng\ core engine is developed under the \href{http://www.cecill.info}{CECILL license}, 
    1112which is a French adaptation of the GNU GPL (\textbf{G}eneral \textbf{P}ublic \textbf{L}icense). 
    1213Anyone may use it freely for research purposes, and is encouraged to 
     
    2021The authors assume no responsibility for problems, errors, or incorrect usage of \NEMO. 
    2122 
    22 %% ================================================================ 
    2323%% External resources 
    24 %% ================================================================ 
     24%% ================================================================================================= 
     25 
    2526\subsubsection*{Other resources} 
    2627\label{resources} 
    2728 
    2829Additional information can be found on: 
     30 
    2931\begin{itemize} 
    30 \item \faWordpress\ the \href{http://www.nemo-ocean.eu}{website} of the project detailing several 
    31   associated applications and an exhaustive users bibliography 
    32 \item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of 
    33   the model with the code repository for the shared reference and some main resources 
    34   (wiki, ticket system, forums, \ldots) \\ 
    35   \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples} 
    36   {repository of the demonstration cases} for research or training 
    37 \item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive} 
    38   delivering the publications issued by the consortium (manuals, reports, datasets, \ldots) 
    39 \item \faEnvelope\ two mailing lists: 
    40   the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for 
    41   top-down communications from the project 
    42   (announcements, calls, job opportunities, \ldots) 
    43   and the \href{http://listes.ipsl.fr/sympa/info/nemo-forge}{forge updates} 
    44   (commits, tickets and forums) 
     32   \item \faWordpress\ the \href{http://www.nemo-ocean.eu}{website} of the project detailing 
     33      several associated applications and an exhaustive users bibliography 
     34   \item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of 
     35      the model with the code repository for the shared reference and some main resources 
     36      (wiki, ticket system, forums, \ldots) \\ 
     37      \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples} 
     38      {repository of the demonstration cases} for research or training 
     39   \item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive} 
     40      delivering the publications issued by the consortium (manuals, reports, datasets, \ldots) 
     41   \item \faEnvelope\ two mailing lists: 
     42      the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for 
     43      top-down communications from the project (announcements, calls, job opportunities, \ldots) 
     44      and the \href{http://listes.ipsl.fr/sympa/info/nemo-forge}{forge updates} 
     45      (commits, tickets and forums) 
    4546\end{itemize} 
    4647 
    47 %% ================================================================ 
    4848%% Citation 
    49 %% ================================================================ 
     49%% ================================================================================================= 
     50 
    5051\subsubsection*{Citation} 
    5152 
     
    5556 
    5657\begin{sloppypar} 
    57   ``{\bfseries \heading}\ifdef{\subheading}{ -- \subheading}{}'', 
    58   {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619, 
    59   Institut Pierre-Simon Laplace (IPSL), 
    60   \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 
     58   ``{\bfseries \hdg}\ifdef{\shdg}{ -- \shdg}{}'', 
     59   {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipsl} --- ISSN 1288-1619, 
     60   Institut Pierre-Simon Laplace (IPSL), 
     61   \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 
    6162\end{sloppypar} 
    6263 
    6364\begin{figure}[b] 
    64   \begin{minipage}[c]{0.7\textwidth} 
    65     \small 
    66     \ttfamily{ 
    67       Scientific Notes of Climate Modelling Center \\ 
    68       ISSN 1288-1619                               \\ 
    69       Institut Pierre-Simon Laplace (IPSL) 
    70     } 
    71   \end{minipage} 
    72   \hfill 
    73   \begin{minipage}[c]{0.25\textwidth} 
    74     \href{http://www.cmc.ipsl.fr}{\includegraphics[width=\textwidth]{logos/IPSL_master}} 
    75   \end{minipage} 
     65 
     66   \begin{minipage}[c]{0.7\textwidth} 
     67      \small 
     68      \ttfamily{ 
     69         Scientific Notes of Climate Modelling Center \\ 
     70         ISSN 1288-1619                               \\ 
     71         Institut Pierre-Simon Laplace (IPSL) 
     72      } 
     73   \end{minipage} 
     74   \hfill %% Don't insert void line between `minipage` envs 
     75   \begin{minipage}[c]{0.25\textwidth} 
     76      \href{http://www.cmc.ipsl.fr}{\includegraphics[width=\textwidth]{IPSL_master}} 
     77   \end{minipage} 
     78 
    7679\end{figure} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/latexmk.pl

    r14113 r14328  
     1## Defaults 
     2#$silent   = 1; 
     3$pdf_mode = 5; 
    14 
    2 ## Defaults 
    3 $do_cd    = 1;   ## Change to the directory of the main source file 
    4 $silent   = 1;   ## Less verbosity 
     5## Using relative paths 
     6$ENV{'openout_any'} = 'a'       ; 
     7$do_cd              = 1         ; 
     8$out_dir            = '../build'; 
    59 
    6 ## Use of 'build' relative directory 
    7 $ENV{'openout_any'}='a'; 
    8 $out_dir = '../build'; 
    9  
    10 ## Global option 
    11 set_tex_cmds( '-shell-escape' ); 
    12  
    13 $makeindex = "makeindex %O -s ../../global/index -o $out_dir/%D $out_dir/%S"; 
     10## Custom cmds 
     11set_tex_cmds('-shell-escape -interaction=batchmode'); 
     12#set_tex_cmds('-shell-escape'); 
     13$makeindex = 'makeindex -s %R.ist %O -o %D %S'; 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/new_cmds.tex

    r14113 r14328  
    1 %% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>} 
    2 %% ============================================================================== 
     1%% ================================================================================================= 
     2%% Global custom commands 
     3%% ================================================================================================= 
    34 
    4 %% Same slanted font for NEMO and its core engines 
    5 \newcommand{\NEMO  }{\textsl{NEMO}} 
    6 \newcommand{\OPA   }{\textsl{OPA}} 
    7 \newcommand{\SIcube}{\textsl{SI$^3$}} 
    8 \newcommand{\TOP   }{\textsl{TOP}} 
    9 \newcommand{\PISCES}{\textsl{PISCES}} 
     5%% \newcommand{<name>}[<args>][<first argument value>]{<code>} 
     6 
     7%% Same font for NEMO and its core engines 
     8\newcommand{\NEMO   }{\textsl{NEMO}} 
     9\newcommand{\OPA    }{\textsl{OPA}} 
     10\newcommand{\SIcube }{\textsl{SI$^3$}} 
     11\newcommand{\TOP    }{\textsl{TOP}} 
     12\newcommand{\PISCES }{\textsl{PISCES}} 
    1013\newcommand{\NEMOVAR}{\textsl{NEMOVAR}} 
    1114 
    12 %% Links for external components 
    13 \newcommand{\AGRIF}{\href{http://agrif.imag.fr}{AGRIF}} 
     15%% URL links for consortium institutes and external components 
     16\newcommand{\CMCC }{\href{http://www.cmcc.it}          } 
     17\newcommand{\CNRS }{\href{http://www.cnrs.fr}          } 
     18\newcommand{\MOI  }{\href{http://www.mercator-ocean.fr}} 
     19\newcommand{\UKMO }{\href{http://www.metoffice.gov.uk} } 
     20\newcommand{\NERC }{\href{http://nerc.ukri.org}        } 
     21\newcommand{\AGRIF}{\href{http://agrif.imag.fr                  }{AGRIF}} 
     22\newcommand{\BFM  }{\href{http://bfm-community.eu               }{BFM}} 
    1423\newcommand{\CICE }{\href{http://github.com/CICE-Consortium/CICE}{CICE}} 
    15 \newcommand{\OASIS}{\href{http://portal.enes.org/oasis}{OASIS}} 
    16 \newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}} 
     24\newcommand{\OASIS}{\href{http://portal.enes.org/oasis          }{OASIS}} 
     25\newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver }{XIOS}} 
    1726 
    1827%% Fortran in small capitals 
     
    2231%% Common aliases 
    2332\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}} 
     33\newcommand{\eg    }{\ensuremath{e.g.}} 
     34\newcommand{\ie    }{\ensuremath{i.e.}} 
    2435\newcommand{\zstar }{\ensuremath{z^\star}} 
    2536\newcommand{\sstar }{\ensuremath{s^\star}} 
    2637\newcommand{\ztilde}{\ensuremath{\tilde z}} 
    2738\newcommand{\stilde}{\ensuremath{\tilde s}} 
    28 \newcommand{\ie}{\ensuremath{i.e.}} 
    29 \newcommand{\eg}{\ensuremath{e.g.}} 
    30  
    31 %% Inline maths 
    32 \newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}} 
    33 \newcommand{\rdt}{\Delta t} 
    3439 
    3540%% Gurvan's comments 
    3641\newcommand{\cmtgm}[1]{} 
    3742 
    38 %% Maths 
     43%% Maths: reduce equation 
     44\newcommand{\fractext}[2]{\textstyle\frac{#1}{#2}} 
    3945\newcommand{\lt}{\left} 
     46\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}} 
     47\newcommand{\rdt}{\Delta t} 
    4048\newcommand{\rt}{\right} 
    41 \newcommand{\vect}[1]{\ensuremath{ \mathbf{#1} }} 
    42 \newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}} 
    43  
    44 %% Convert chapter/section headings to lowercase 
    45 \renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
    46 \renewcommand{\sectionmark}[1]{\markright{#1}{}} 
     49\newcommand{\vect}[1][]{\ensuremath{\mathbf{#1}}} 
    4750 
    4851%% Retrieve month name 
    4952\renewcommand{\today}{ 
    50   \ifcase \month\or January\or February\or March\or 
    51                     April\or   May\or      June\or 
    52                     July\or    August\or   September\or 
    53                     October\or November\or December 
     53  \ifcase \month\or   January\or February\or    March\or    April\or 
     54                          May\or     June\or     July\or   August\or 
     55                    September\or  October\or November\or December 
    5456  \fi, \number \year 
    5557} 
    5658 
    57 %% Link to orcid profile 
    58 \newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidcolor}\aiOrcidSquare}} 
     59%% Workaround for \listoffigures issue 
     60\DeclareRobustCommand{\triad}[6]{ 
     61  \ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}} 
     62} 
    5963 
    60 %% Workaround for \listoffigures 
    61 \DeclareRobustCommand{\triad}[6][]{\ensuremath{ {}_{#2}^{#3} { \mathbb{#4}_{#1} }_{#5}^{\,#6} }} 
    62  
    63 %% New command for ToC 
    64 \newcommand{\chaptertoc}[1][Table of contents]{% 
    65   \thispagestyle{empty} 
    66   \etocsettocstyle{\addsec*{#1}}{}% 
    67   \localtableofcontents% 
     64%% New command for ToC (?) 
     65\newcommand{\chaptertoc}[1][Table of contents]{ 
     66  \etocsettocstyle{\addsec*{#1}}{} 
     67  \localtableofcontents 
    6868  \vfill 
    6969} 
     70 
     71%% ORCID links 
     72\newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidclr}\aiOrcidSquare}} 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/packages.tex

    r14113 r14328  
     1%% ================================================================================================= 
     2%% Packages 
     3%% ================================================================================================= 
    14 
    2 %% LaTeX packages in use 
    3 %% ============================================================================== 
     5%% Document class 
     6\usepackage[footsepline=0.25pt,headsepline=0.25pt]{scrlayer-scrpage} %% KOMA-script 
    47 
    5 %% 'hyperref' pkg is loaded at the end of the preamble for higher compatibility 
    6  
    7 %% KOMA-script 
    8 \usepackage[footsepline=0.25pt, headsepline=0.25pt]{scrlayer-scrpage} 
    9  
    10 %% customization (layout, header/footer styles & contents, background) 
    11 \usepackage{draftwatermark} 
    12 \usepackage[margin = 2cm]{geometry} 
    13 \usepackage[pages = some]{background}   %% 'some' for title page 
    14 \usepackage[Bjornstrup]{fncychap} 
     8%% Customisation (cover page, chapter headings and mark of draft copy) 
     9\usepackage[margin=2cm]{geometry} %% Why 2cm margin? Load geometry before background! 
     10\usepackage[pages=some]{background} %% 'some' for title page 
     11\usepackage[scale=15,color=pink]{draftwatermark} 
     12\usepackage[Bjornstrup]{fncychap} %% Chapter style 
    1513 
    1614%% Fonts 
    1715\usepackage{fontspec} 
    18 %% Issue with fontawesome pkg: path to FontAwesome.otf has to be hard-coded 
    19 \defaultfontfeatures{ 
    20     Path = /home/nicolas/.local/texlive/2020/texmf-dist/fonts/opentype/public/fontawesome/ 
    21 } 
    22 \usepackage{academicons, fontawesome, newtxtext} 
     16%% Issue with path to 'FontAwesome.otf' 
     17\defaultfontfeatures{Path=/usr/local/texlive/2020/texmf-dist/fonts/opentype/public/fontawesome/} 
     18\usepackage{academicons,fontawesome} 
    2319 
    2420%% Formatting 
    2521\usepackage[inline]{enumitem} 
    26 \usepackage{etoc, tabularx, xcolor} 
     22\usepackage{etoc,tabularx,xcolor} 
    2723 
    2824%% Graphics 
    29 \usepackage{caption, graphicx, grffile} 
     25\usepackage{caption} 
     26\graphicspath{{../../../badges/}{../figures/}{../../../logos/}} 
    3027 
    3128%% Labels 
    32 \usepackage{lastpage, natbib} 
     29\usepackage{lastpage,natbib} 
     30%\usepackage{natbib,pageslts} 
    3331 
    34 %% Mathematics 
    35 \usepackage{amsmath, amssymb, mathtools} 
     32%% Mathematics: 'amsmath' is loaded by 'mathtools' 
     33\usepackage{mathtools,amssymb} 
    3634 
    3735%% Versatility 
    3836\usepackage{subfiles} 
    3937 
    40 %% Configuration 
    41 \graphicspath{ {../../../} {../figures/} } 
     38%% Source code listings 
     39\usepackage[cachedir=cache,outputdir=../build,chapter,newfloat]{minted} 
     40%% chapter? newfloat? 
     41 
     42%% Indexing and cross-referencing, loaded at the end for higher compatibility 
     43\usepackage{hyperref,imakeidx} 
    4244 
    4345%% Missing utmr8a font 
    4446\usepackage{times} 
    45  
    46 \usepackage{hyperref}   %% links 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/styles.tex

    r14113 r14328  
    1  
     1%% ================================================================================================= 
    22%% Styles 
    3 %% ============================================================================== 
     3%% ================================================================================================= 
    44 
    55%% Colors 
    6 \setmanualcolor 
    7 \colorlet{manualcolorshaded}{manualcolor!60} 
    8 \definecolor{orcidcolor}{HTML}{A6CE39} 
     6\definecolor{orcidclr}{HTML}{A6CE39} 
     7\definecolor{manclr}{cmyk}{\clr} %% \clr defined for each manual from local settings.tex 
     8\colorlet{manclrshd}{manclr!60} %% Derived color for chapter heading, see below 
     9 
     10%% Cover page 
     11\backgroundsetup{ 
     12   firstpage=true,scale  =1, 
     13   angle    =0   ,opacity=1, 
     14   contents ={ 
     15      \begin{tikzpicture}[remember picture,overlay] 
     16         \path[fill=manclr] (-0.5\paperwidth,7) rectangle (0.5\paperwidth,10); 
     17      \end{tikzpicture} 
     18    } 
     19} 
    920 
    1021%% Page layout 
    11 \pagestyle{scrheadings} 
     22%\pagestyle{scrheadings} 
     23%\renewcommand{\chapterpagestyle}{empty} 
     24\renewcommand{\chaptermark}[1]{ \markboth{#1}{}} %% Convert mark to lowercase 
     25\renewcommand{\sectionmark}[1]{\markright{#1}{}} %%    "     ""  ""     "   
     26\ohead{} %% Clear default headings 
     27\lohead{Chap. \thechapter\  \leftmark} 
     28\rehead{Sect. \thesection\ \rightmark} 
     29\ifoot{Page \thepage\ of \pageref*{LastPage}} 
     30%\ifoot[\pagemark]{Page \thepage\ of \lastpageref*{pagesLTS.arabic}} 
     31\ofoot{\eng\ Reference Manual} 
    1232\addtokomafont{pagehead}{  \sffamily              } 
    1333\addtokomafont{pagefoot}{  \sffamily \footnotesize} 
    1434\addtokomafont{pagenumber}{\sffamily \slshape     } 
    15 \addtokomafont{chapter}{\color{white}} 
    16 \ohead{} \ofoot{}   %% Clear defaults 
     35%\addtokomafont{chapter}{\color{white}} 
    1736 
    18 %% Caption 
    19 \captionsetup{font = footnotesize, justification = justified} 
     37%% Cross-referencing 
     38\hypersetup{ 
     39   pdftitle=\hdg                                          , 
     40   pdfauthor=Gurvan Madec and NEMO System Team            , 
     41   pdfsubject=Reference manual of NEMO modelling framework, 
     42   pdfkeywords=ocean circulation modelling                , 
     43   colorlinks                                             , 
     44   allcolors=manclr 
     45} 
     46\renewcommand{\appendixautorefname}{appendix}          %% `\autoref` uncapitalization 
     47\renewcommand{\equationautorefname}{equation}          %%     ""            "" 
     48\renewcommand{\figureautorefname  }{figure}            %%     ""            "" 
     49\renewcommand{\listingname        }{namelist}          %%     ""            "" 
     50\renewcommand{\listlistingname    }{List of Namelists} %%     ""            "" 
     51\renewcommand{\tableautorefname   }{table}             %%     ""            "" 
    2052 
    21 %% Footnote 
     53%% Misc. (caption and footnote) 
     54\captionsetup{font=footnotesize,justification=justified} 
    2255\renewcommand{\thefootnote}{\fnsymbol{footnote}} 
    2356 
     
    2861\renewcommand{\bibpostamble}{  \end{multicols}   } 
    2962 
    30 %% Catcodes 
     63%% Catcodes (between `\makeatletter` and `\makeatother`) 
    3164\makeatletter 
    3265 
    33 %% Prevent error with tikz and namelist inclusion 
    34 \global\let\tikz@ensure@dollar@catcode=\relax 
     66%\global\let\tikz@ensure@dollar@catcode=\relax %% Prevent error with tikz and namelist inclusion 
    3567 
    36 %% First page 
    37 \backgroundsetup{ 
    38   firstpage = true, 
    39   scale = 1, angle = 0, opacity = 1, 
    40   contents = { 
    41     \begin{tikzpicture}[remember picture, overlay] 
    42       \path [fill = manualcolor] (-0.5\paperwidth, 7) rectangle (0.5\paperwidth, 10); 
    43     \end{tikzpicture} 
    44   } 
     68%% Apply manual color for chap. headings (original snippets from fncychap.sty) 
     69%% !!! Let trailing percent sign to avoid space insertion 
     70\renewcommand{\DOCH}{% %% Upper box with chapter number 
     71   \settowidth{\py}{\CNoV\thechapter}% 
     72   \addtolength{\py}{-10pt}% %% Amount of space by which the number is shifted right 
     73   \fboxsep=0pt% 
     74   \colorbox{manclr}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}% 
     75   \kern-\py\raise20pt% 
     76   \hbox{\color{manclrshd}\CNoV\thechapter}\\ 
     77} 
     78\renewcommand{\DOTI}[1]{% %% Lower box with chapter title 
     79   \nointerlineskip\raggedright% 
     80   \fboxsep=\myhi% 
     81   \vskip-1ex% 
     82   \colorbox{manclr}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 
     83   \vskip 40\p@% 
     84} 
     85\renewcommand{\DOTIS}[1]{% %% Box for unumbered chapter 
     86   \fboxsep=0pt% 
     87   \colorbox{manclr}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\ 
     88   \nointerlineskip\raggedright% 
     89   \fboxsep=\myhi% 
     90   \vskip-1ex% %% Remove white 1pt line 
     91   \colorbox{manclr}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 
     92   \vskip 40\p@% 
    4593} 
    4694 
    47 %% Apply engine color for chapter headings: tweaking snippets from fncychap.sty 
    48 \renewcommand{\DOCH}{% 
    49   \settowidth{\py}{\CNoV\thechapter} 
    50   \addtolength{\py}{-10pt}      % Amount of space by which the 
    51 %                                  % number is shifted right 
    52   \fboxsep=0pt% 
    53   \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}% 
    54   \kern-\py\raise20pt% 
    55   \hbox{\color{manualcolorshaded}\CNoV\thechapter}\\% 
    56 } 
    57 \renewcommand{\DOTI}[1]{% 
    58   \nointerlineskip\raggedright% 
    59   \fboxsep=\myhi% 
    60   \vskip-1ex% 
    61   \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 
    62   \vskip 40\p@% 
    63 } 
    64 \renewcommand{\DOTIS}[1]{% 
    65   \fboxsep=0pt 
    66   \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\% 
    67   \nointerlineskip\raggedright% 
    68   \fboxsep=\myhi% 
    69   \vskip-1ex% Remove white 1pt line 
    70   \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 
    71   \vskip 40\p@% 
    72 } 
    73  
    74 %% Temporary fix 
    75 \def\set@curr@file#1{% 
    76   \begingroup 
    77     \escapechar\m@ne 
    78     \xdef\@curr@file{\expandafter\string\csname #1\endcsname}% 
    79   \endgroup 
    80 } 
    81 \def\quote@name#1{"\quote@@name#1\@gobble""} 
    82 \def\quote@@name#1"{#1\quote@@name} 
    83 \def\unquote@name#1{\quote@@name#1\@gobble"} 
     95%% Temporary fix? 
     96%\def\set@curr@file#1{ 
     97%  \begingroup 
     98%    \escapechar\m@ne 
     99%    \xdef\@curr@file{\expandafter\string\csname #1\endcsname} 
     100%  \endgroup 
     101%} 
     102%\def\quote@name#1{"\quote@@name#1\@gobble""} 
     103%\def\quote@@name#1"{#1\quote@@name} 
     104%\def\unquote@name#1{\quote@@name#1\@gobble"} 
    84105 
    85106\makeatother 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/latex/global/todonotes.tex

    r11187 r14328  
    1 \usepackage[]{todonotes} 
     1%% ================================================================================================= 
     2%% Notes 
     3%% ================================================================================================= 
     4 
     5\usepackage{todonotes} 
    26 
    37\newcounter{ubcomment} 
    4 \newcommand{\ubcomment}[2][]{% 
    5 \refstepcounter{ubcomment}% 
    6 {% 
    7 \todo[linecolor=black,backgroundcolor={green!40!},size=\footnotesize]{% 
    8 \textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}% 
    9 }} 
    10 \newcommand{\ubcommentinline}[2][]{% 
    11 \refstepcounter{ubcomment}% 
    12 {% 
    13 \todo[linecolor=black,inline,backgroundcolor={green!40!},size=\footnotesize]{% 
    14 \textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}% 
     8 
     9\newcommand{\ubcomment         }[2][]{ 
     10\refstepcounter{ubcomment} 
     11{ 
     12\todo[linecolor=black,       backgroundcolor={green!40!},size=\footnotesize ]{ 
     13\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2} 
    1514}} 
    1615 
    17 \newcommand{\ubcommentmultiline}[2]{% 
    18 \refstepcounter{ubcomment}% 
    19 {% 
    20 \todo[linecolor=black,inline,caption={\textbf{{Fixme: UB} 
    21     [\theubcomment] #1}} ,backgroundcolor={green!40!},size=\footnotesize]{% 
    22 \textbf{Fixme: UB [\theubcomment]:}~#2}% 
     16\newcommand{\ubcommentinline   }[2][]{ 
     17\refstepcounter{ubcomment} 
     18{ 
     19\todo[linecolor=black,inline,backgroundcolor={green!40!},size=\footnotesize ]{ 
     20\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2} 
     21}} 
     22 
     23\newcommand{\ubcommentmultiline}[2]{ 
     24\refstepcounter{ubcomment} 
     25{ 
     26\todo[linecolor=black,inline,backgroundcolor={green!40!},size=\footnotesize, 
     27      caption={\textbf{{Fixme: UB} [\theubcomment] #1}}                     ]{ 
     28\textbf{Fixme: UB [              \theubcomment]:}~#2} 
    2329}} 
    2430 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/manual_build.sh

    r11594 r14328  
    2121 
    2222## LaTeX installation, find latexmk should be enough 
    23 [ -z $( which latexmk ) ] && { echo 'latexmk not installed => QUIT'; exit 2; } 
     23[ -z "$( which latexmk )" ] && { echo 'latexmk not installed => QUIT'; exit 2; } 
    2424 
    2525## Pygments package for syntax highlighting of source code (namelists & snippets) 
    2626[ -n "$( ./tools/check_pkg.py pygments )" ] && { echo 'Python pygments is missing => QUIT'; exit 2; } 
    27  
    28 ## Retrieve figures if not already there 
    29 #if [ ! -d latex/figures ]; then 
    30 #    printf "Downloading of shared figures and logos\n\n" 
    31 #    svn co http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null 
    32 #fi 
    33  
    3427 
    3528## Loop on the models 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/namelists/namberg

    r11703 r14328  
    3333   rn_speed_limit          = 0.      ! CFL speed limit for a berg 
    3434 
     35   ln_M2016                = .false. ! use Merino et al. (2016) modification (use of 3d ocean data instead of only sea surface data) 
     36      ln_icb_grd           = .false. ! ground icb when icb bottom level hit oce bottom level (need ln_M2016 to be activated) 
     37 
    3538   cn_dir      = './'      !  root directory for the calving data location 
    3639   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/namelists/namrun

    r11703 r14328  
    2626      !                          !    = -1 do not do any restart 
    2727   nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    28    nn_write    =       0   !  used only if key_iomput is not defined: output frequency (modulo referenced to nn_it000) 
     28   nn_write    =       0   !  used only if key_xios is not defined: output frequency (modulo referenced to nn_it000) 
    2929      !                          !    =  0 force to write output files only at the end of the run 
    3030      !                          !    = -1 do not do any output file 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/tools/check_pkg.py

    r11008 r14328  
    1 #!/usr/bin/env python 
     1#!/usr/bin/env python3 
    22 
    33import sys, importlib 
     
    77      importlib.import_module(argv) 
    88   except ImportError: 
    9       print("Package %s is missing in Python" % argv) 
     9      print("Package %s is missing in Python 3" % argv) 
    1010 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/doc/tools/shr_func.sh

    r14113 r14328  
    88 
    99build() { 
    10     printf "\t¤ Generation of the PDF format\n" 
    11     latexmk -r ./latex/global/latexmk.pl -pdfxe ./latex/$1/main/$1_manual \ 
    12 #  1> /dev/null 
     10    printf "\t¤ Generation of the PDF export of the manual\n" 
     11    latexmk -r ./latex/global/latexmk.pl ./latex/$1/main/$1_manual \ 
     12   1> /dev/null 
    1313    [ -f ./latex/$1/build/$1_manual.pdf ] && mv ./latex/$1/build/$1_manual.pdf . 
    1414    echo 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/ABL/ablmod.F90

    r14235 r14328  
    537537      CALL lbc_lnk_multi( 'ablmod', tq_abl(:,:,:,nt_a,jp_ta), 'T', 1._wp , tq_abl(:,:,:,nt_a,jp_qa), 'T',  1._wp , kfillmode = jpfillnothing )   ! ++++ this should not be needed... 
    538538      ! 
    539 #if defined key_iomput 
     539#if defined key_xios 
    540540      ! 2D & first ABL level 
    541541      IF ( iom_use("pblh"   ) ) CALL iom_put (    "pblh",    pblh(:,:             ) ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/ABL/sbcabl.F90

    r14235 r14328  
    3636   USE sbc_ice, ONLY : wndm_ice, utau_ice, vtau_ice 
    3737#endif 
    38 #if ! defined key_iomput 
     38#if ! defined key_xios 
    3939   USE diawri    , ONLY : dia_wri_alloc_abl 
    4040#endif 
     
    149149      CALL iom_close( inum ) 
    150150 
    151 #if ! defined key_iomput 
     151#if ! defined key_xios 
    152152      IF( dia_wri_alloc_abl()  /= 0 ) CALL ctl_stop( 'STOP', 'abl_init : unable to allocate arrays' ) 
    153153#endif 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/ICE/icerst.F90

    r14072 r14328  
    8888               CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
    8989            ELSE 
    90 #if defined key_iomput 
     90#if defined key_xios 
    9191               cw_icerst_cxt = "rstwi_"//TRIM(ADJUSTL(clkt)) 
    9292               IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/ICE/icethd_pnd.F90

    r14072 r14328  
    511511      !!------------------------------------------------------------------- 
    512512      REAL(wp), PARAMETER :: &   ! shared parameters for topographic melt ponds 
    513          zTd     = 0.15_wp       , & ! temperature difference for freeze-up (C) 
     513         zTd     = 273._wp       , & ! temperature difference for freeze-up (K) 
    514514         zvp_min = 1.e-4_wp          ! minimum pond volume (m) 
    515515 
     
    530530         zv_mlt          ! total amount of meltwater produced 
    531531 
    532       REAL(wp), DIMENSION(jpi,jpj) ::   zvolp, &     !! total melt pond water available before redistribution and drainage 
    533                                         zvolp_res    !! remaining melt pond water available after drainage 
     532      REAL(wp), DIMENSION(jpi,jpj) ::   zvolp_ini , &   !! total melt pond water available before redistribution and drainage 
     533                                        zvolp     , &   !! total melt pond water volume 
     534                                        zvolp_res       !! remaining melt pond water available after drainage 
    534535 
    535536      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z1_a_i 
     
    624625      END DO ! ji 
    625626 
     627      zvolp_ini(:,:) = zvolp(:,:) 
     628 
    626629      !-------------------------------------------------------------- 
    627630      ! Redistribute and drain water from ponds 
     
    637640         DO_2D( 1, 1, 1, 1 ) 
    638641 
    639             IF ( at_i(ji,jj) > 0.01 .AND. hm_i(ji,jj) > rn_himin .AND. vt_ip(ji,jj) > zvp_min * at_i(ji,jj) ) THEN 
     642            IF ( at_i(ji,jj) > 0.01 .AND. hm_i(ji,jj) > rn_himin .AND. zvolp_ini(ji,jj) > zvp_min * at_i(ji,jj) ) THEN 
    640643 
    641644               !-------------------------- 
     
    688691 
    689692                        ! differential growth of base of surface floating ice layer 
    690                         zdTice = MAX( - t_su(ji,jj,jl) - zTd , 0._wp ) ! > 0 
     693                        zdTice = MAX( - ( t_su(ji,jj,jl) - zTd ) , 0._wp ) ! > 0 
    691694                        zomega = rcnd_i * zdTice / zrhoi_L 
    692695                        zdHui  = SQRT( 2._wp * zomega * rDt_ice + ( v_il(ji,jj,jl) / a_i(ji,jj,jl) )**2 ) & 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/C1D/step_c1d.F90

    r14227 r14328  
    142142      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file 
    143143      ! 
    144 #if defined key_iomput 
     144#if defined key_xios 
    145145      IF( kstp == nitend .OR. nstop > 0 )   CALL xios_context_finalize()   ! needed for XIOS 
    146146      ! 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/CRS/crsdom.F90

    r13286 r14328  
    19601960           ENDDO 
    19611961        ENDDO  
    1962         Nje0_crs  = nje0all_crs(nproc + 1)  
    1963         jpj_crs   = jpjall_crs (nproc + 1) 
    1964         Njs0_crs  = njs0all_crs(nproc + 1) 
    1965         njmpp_crs = njmppt_crs (nproc + 1) 
     1962        Nje0_crs  = nje0all_crs(narea)  
     1963        jpj_crs   = jpjall_crs (narea) 
     1964        Njs0_crs  = njs0all_crs(narea) 
     1965        njmpp_crs = njmppt_crs (narea) 
    19661966 
    19671967        ! Calcul suivant un decoupage en i 
     
    20042004         ENDDO  
    20052005         
    2006          Nie0_crs  = nie0all_crs(nproc + 1)  
    2007          jpi_crs   = jpiall_crs (nproc + 1) 
    2008          Nis0_crs  = nis0all_crs(nproc + 1) 
    2009          nimpp_crs = nimppt_crs (nproc + 1) 
     2006         Nie0_crs  = nie0all_crs(narea)  
     2007         jpi_crs   = jpiall_crs (narea) 
     2008         Nis0_crs  = nis0all_crs(narea) 
     2009         nimpp_crs = nimppt_crs (narea) 
    20102010 
    20112011         DO ji = 1, jpi_crs 
     
    20682068         WRITE(numout,*) '~~~~~~~   coarse domain local  j-dimension              jpj = ', jpj 
    20692069         WRITE(numout,*) 
    2070          WRITE(numout,*) ' nproc  = '     , nproc 
     2070         WRITE(numout,*) ' narea  = '     , narea 
    20712071         WRITE(numout,*) ' jpi    = '     , jpi 
    20722072         WRITE(numout,*) ' jpj    = '     , jpj 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/DIA/diadetide.F90

    r12489 r14328  
    1212   USE phycst         , ONLY :   rpi 
    1313   USE tide_mod 
    14 #if defined key_iomput 
     14#if defined key_xios 
    1515   USE xios 
    1616#endif 
     
    4747 
    4848      lk_diadetide = .FALSE. 
    49 #if defined key_iomput 
     49#if defined key_xios 
    5050      ! Enquire detiding activation state (test for presence of detiding-related 
    5151      ! weights field and output file group) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/DIA/diamlr.F90

    r13237 r14328  
    1515   USE iom            , ONLY :   iom_put, iom_use, iom_update_file_name 
    1616   USE timing         , ONLY :   timing_start, timing_stop 
    17 #if defined key_iomput 
     17#if defined key_xios 
    1818   USE xios 
    1919#endif 
     
    6464      !! 
    6565      !!---------------------------------------------------------------------- 
    66 #if defined key_iomput 
     66#if defined key_xios 
    6767 
    6868      TYPE(xios_fieldgroup)                       ::   slxhdl_fldgrp 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/DIA/diawri.F90

    r14179 r14328  
    7070   PUBLIC   dia_wri_state 
    7171   PUBLIC   dia_wri_alloc           ! Called by nemogcm module 
    72 #if ! defined key_iomput    
     72#if ! defined key_xios    
    7373   PUBLIC   dia_wri_alloc_abl       ! Called by sbcabl  module (if ln_abl = .true.) 
    7474#endif 
     
    9595CONTAINS 
    9696 
    97 #if defined key_iomput 
     97#if defined key_xios 
    9898   !!---------------------------------------------------------------------- 
    99    !!   'key_iomput'                                        use IOM library 
     99   !!   'key_xios'                                        use IOM library 
    100100   !!---------------------------------------------------------------------- 
    101101   INTEGER FUNCTION dia_wri_alloc() 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/DOM/dom_oce.F90

    r14223 r14328  
    8686   !                             !: domain MPP decomposition parameters 
    8787   INTEGER             , PUBLIC ::   nimpp, njmpp     !: i- & j-indexes for mpp-subdomain left bottom 
    88    INTEGER             , PUBLIC ::   nproc            !: number for local processor 
    89    INTEGER             , PUBLIC ::   narea            !: number for local area 
     88   INTEGER             , PUBLIC ::   narea            !: number for local area = MPI rank + 1 
    9089   INTEGER             , PUBLIC ::   nbondi, nbondj   !: mark of i- and j-direction local boundaries 
    9190   INTEGER, ALLOCATABLE, PUBLIC ::   nbondi_bdy(:)    !: mark i-direction local boundaries for BDY open boundaries 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/DOM/domain.F90

    r14223 r14328  
    182182      !                                 != ssh initialization 
    183183      ! 
    184       IF( l_offline .OR. l_SAS ) THEN        !* No ocean dynamics calculation : set to 0 
     184      IF( l_SAS ) THEN        !* No ocean dynamics calculation : set to 0 
    185185         ssh(:,:,:) = 0._wp 
    186186#if defined key_agrif 
     
    423423            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    424424         ENDIF 
    425 #if ! defined key_iomput 
     425#if ! defined key_xios 
    426426         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
    427427#endif 
     
    500500         ENDIF 
    501501      ENDIF 
    502 #if ! defined key_iomput 
     502#if ! defined key_xios 
    503503      IF( nn_write == -1 )   CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 
    504504      IF ( nn_write == 0 ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/FLO/flowri.F90

    r13286 r14328  
    199199      !---------------------- 
    200200 
    201 #if defined key_iomput 
     201#if defined key_xios 
    202202         CALL iom_put( "traj_lon"     , zlon ) 
    203203         CALL iom_put( "traj_lat"     , zlat ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/ICB/icbstp.F90

    r14030 r14328  
    126126      !                                   !* Gridded diagnostics 
    127127      !                                   !  To get these iom_put's and those preceding to actually do something 
    128       !                                   !  use key_iomput in cpp file and create content for XML file 
     128      !                                   !  use key_xios in cpp file and create content for XML file 
    129129      ! 
    130130      CALL iom_put( "calving"           , berg_grid%calving      (:,:)   )  ! 'calving mass input' 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/IOM/iom.F90

    r14072 r14328  
    3636   USE phycst          ! physical constants 
    3737   USE dianam          ! build name of file 
    38 #if defined key_iomput 
     38#if defined key_xios 
    3939   USE xios 
    4040# endif 
     
    5252   PUBLIC   !   must be public to be able to access iom_def through iom 
    5353 
    54 #if defined key_iomput 
     54#if defined key_xios 
    5555   LOGICAL, PUBLIC, PARAMETER ::   lk_iomput = .TRUE.        !: iom_put flag 
    5656#else 
     
    6969   PRIVATE iom_p1d_sp, iom_p2d_sp, iom_p3d_sp, iom_p4d_sp 
    7070   PRIVATE iom_p1d_dp, iom_p2d_dp, iom_p3d_dp, iom_p4d_dp 
    71 #if defined key_iomput 
     71#if defined key_xios 
    7272   PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 
    7373   PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_sdate 
     
    115115      INTEGER         , OPTIONAL, INTENT(in)  :: kdid 
    116116      LOGICAL         , OPTIONAL, INTENT(in)  :: ld_closedef 
    117 #if defined key_iomput 
     117#if defined key_xios 
    118118      ! 
    119119      TYPE(xios_duration) :: dtime    = xios_duration(0, 0, 0, 0, 0, 0) 
     
    308308      !!---------------------------------------------------------------------- 
    309309      CHARACTER(len=*), OPTIONAL, INTENT(IN) :: cdname 
    310 #if defined key_iomput 
     310#if defined key_xios 
    311311      LOGICAL :: llrstw 
    312312 
     
    343343      INTEGER, INTENT(IN) :: idnum 
    344344 
    345 #if defined key_iomput 
     345#if defined key_xios 
    346346      INTEGER                                    :: ndims, nvars, natts, unlimitedDimId, dimlen, xtype,mdims 
    347347      TYPE(xios_field)                           :: field_hdl 
     
    449449      !!--------------------------------------------------------------------- 
    450450      CHARACTER(len=*) :: cdrst_file 
    451 #if defined key_iomput 
     451#if defined key_xios 
    452452      TYPE(xios_file) :: file_hdl 
    453453      TYPE(xios_filegroup) :: filegroup_hdl 
     
    488488      REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:, :, :) :: rd3 
    489489      REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:, :, :) :: rs3 
    490 #if defined key_iomput 
     490#if defined key_xios 
    491491      TYPE(xios_field) :: field_hdl 
    492492      TYPE(xios_file) :: file_hdl 
     
    593593      LOGICAL, INTENT(IN)               :: ld_rstr 
    594594      INTEGER :: ji 
    595 #if defined key_iomput 
     595#if defined key_xios 
    596596      TYPE(xios_domaingroup)            :: domaingroup_hdl 
    597597      TYPE(xios_domain)                 :: domain_hdl 
     
    666666      !!--------------------------------------------------------------------- 
    667667      CHARACTER(len=*), INTENT(in) :: cdname 
    668 #if defined key_iomput 
     668#if defined key_xios 
    669669      TYPE(xios_context) :: nemo_hdl 
    670670      IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
     
    955955         ENDIF 
    956956      ELSE 
    957 #if defined key_iomput 
     957#if defined key_xios 
    958958         IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 
    959959         CALL iom_swap(context) 
     
    10031003         ENDIF 
    10041004      ELSE 
    1005 #if defined key_iomput 
     1005#if defined key_xios 
    10061006         IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 
    10071007         CALL iom_swap(context) 
     
    13671367         ! 
    13681368      ELSE        ! read using XIOS. Only if KEY_IOMPUT is defined 
    1369 #if defined key_iomput 
     1369#if defined key_xios 
    13701370!would be good to be able to check which context is active and swap only if current is not restart 
    13711371         idvar = iom_varid( kiomid, cdvar ) 
     
    14221422      CHARACTER(LEN=*), INTENT(in ) ::   cdname 
    14231423      REAL(wp), DIMENSION(jpi,jpj) ::   z2d 
    1424 #if defined key_iomput 
     1424#if defined key_xios 
    14251425      IF( xios_field_is_active( cdname, at_current_timestep_arg = .TRUE. ) ) THEN 
    14261426         z2d(:,:) = 0._wp 
     
    16051605 
    16061606      IF( llx ) THEN 
    1607 #ifdef key_iomput 
     1607#ifdef key_xios 
    16081608         IF( kt == kwrite ) THEN 
    16091609            IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 
     
    16451645 
    16461646      IF( llx ) THEN 
    1647 #ifdef key_iomput 
     1647#ifdef key_xios 
    16481648         IF( kt == kwrite ) THEN 
    16491649            IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 
     
    16861686 
    16871687      IF( llx ) THEN 
    1688 #ifdef key_iomput 
     1688#ifdef key_xios 
    16891689         IF( kt == kwrite ) THEN 
    16901690            IF(lwp) write(numout,*) 'RESTART: write (XIOS 1D) ',trim(cdvar) 
     
    17261726 
    17271727      IF( llx ) THEN 
    1728 #ifdef key_iomput 
     1728#ifdef key_xios 
    17291729         IF( kt == kwrite ) THEN 
    17301730            IF(lwp) write(numout,*) 'RESTART: write (XIOS 1D) ',trim(cdvar) 
     
    17671767 
    17681768      IF( llx ) THEN 
    1769 #ifdef key_iomput 
     1769#ifdef key_xios 
    17701770         IF( kt == kwrite ) THEN 
    17711771            IF(lwp) write(numout,*) 'RESTART: write (XIOS 2D) ',trim(cdvar) 
     
    18071807 
    18081808      IF( llx ) THEN 
    1809 #ifdef key_iomput 
     1809#ifdef key_xios 
    18101810         IF( kt == kwrite ) THEN 
    18111811            IF(lwp) write(numout,*) 'RESTART: write (XIOS 2D) ',trim(cdvar) 
     
    18481848 
    18491849      IF( llx ) THEN 
    1850 #ifdef key_iomput 
     1850#ifdef key_xios 
    18511851         IF( kt == kwrite ) THEN 
    18521852            IF(lwp) write(numout,*) 'RESTART: write (XIOS 3D) ',trim(cdvar) 
     
    18881888 
    18891889      IF( llx ) THEN 
    1890 #ifdef key_iomput 
     1890#ifdef key_xios 
    18911891         IF( kt == kwrite ) THEN 
    18921892            IF(lwp) write(numout,*) 'RESTART: write (XIOS 3D) ',trim(cdvar) 
     
    19661966      REAL(sp)        , INTENT(in) ::   pfield0d 
    19671967      !!      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson 
    1968 #if defined key_iomput 
     1968#if defined key_xios 
    19691969!!clem      zz(:,:)=pfield0d 
    19701970!!clem      CALL xios_send_field(cdname, zz) 
     
    19791979      REAL(dp)        , INTENT(in) ::   pfield0d 
    19801980!!      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson 
    1981 #if defined key_iomput 
     1981#if defined key_xios 
    19821982!!clem      zz(:,:)=pfield0d 
    19831983!!clem      CALL xios_send_field(cdname, zz) 
     
    19921992      CHARACTER(LEN=*)          , INTENT(in) ::   cdname 
    19931993      REAL(sp),     DIMENSION(:), INTENT(in) ::   pfield1d 
    1994 #if defined key_iomput 
     1994#if defined key_xios 
    19951995      CALL xios_send_field( cdname, RESHAPE( (/pfield1d/), (/1,1,SIZE(pfield1d)/) ) ) 
    19961996#else 
     
    20022002      CHARACTER(LEN=*)          , INTENT(in) ::   cdname 
    20032003      REAL(dp),     DIMENSION(:), INTENT(in) ::   pfield1d 
    2004 #if defined key_iomput 
     2004#if defined key_xios 
    20052005      CALL xios_send_field( cdname, RESHAPE( (/pfield1d/), (/1,1,SIZE(pfield1d)/) ) ) 
    20062006#else 
     
    20132013      REAL(sp),     DIMENSION(:,:), INTENT(in) ::   pfield2d 
    20142014      IF( iom_use(cdname) ) THEN 
    2015 #if defined key_iomput 
     2015#if defined key_xios 
    20162016         CALL xios_send_field( cdname, pfield2d ) 
    20172017#else 
     
    20252025      REAL(dp),     DIMENSION(:,:), INTENT(in) ::   pfield2d 
    20262026      IF( iom_use(cdname) ) THEN 
    2027 #if defined key_iomput 
     2027#if defined key_xios 
    20282028         CALL xios_send_field( cdname, pfield2d ) 
    20292029#else 
     
    20372037      REAL(sp),       DIMENSION(:,:,:), INTENT(in) ::   pfield3d 
    20382038      IF( iom_use(cdname) ) THEN 
    2039 #if defined key_iomput 
     2039#if defined key_xios 
    20402040         CALL xios_send_field( cdname, pfield3d ) 
    20412041#else 
     
    20492049      REAL(dp),       DIMENSION(:,:,:), INTENT(in) ::   pfield3d 
    20502050      IF( iom_use(cdname) ) THEN 
    2051 #if defined key_iomput 
     2051#if defined key_xios 
    20522052         CALL xios_send_field( cdname, pfield3d ) 
    20532053#else 
     
    20612061      REAL(sp),       DIMENSION(:,:,:,:), INTENT(in) ::   pfield4d 
    20622062      IF( iom_use(cdname) ) THEN 
    2063 #if defined key_iomput 
     2063#if defined key_xios 
    20642064         CALL xios_send_field (cdname, pfield4d ) 
    20652065#else 
     
    20732073      REAL(dp),       DIMENSION(:,:,:,:), INTENT(in) ::   pfield4d 
    20742074      IF( iom_use(cdname) ) THEN 
    2075 #if defined key_iomput 
     2075#if defined key_xios 
    20762076         CALL xios_send_field (cdname, pfield4d ) 
    20772077#else 
     
    20812081   END SUBROUTINE iom_p4d_dp 
    20822082 
    2083 #if defined key_iomput 
     2083#if defined key_xios 
    20842084   !!---------------------------------------------------------------------- 
    2085    !!   'key_iomput'                                         XIOS interface 
     2085   !!   'key_xios'                                         XIOS interface 
    20862086   !!---------------------------------------------------------------------- 
    20872087 
     
    27132713#else 
    27142714   !!---------------------------------------------------------------------- 
    2715    !!   NOT 'key_iomput'                               a few dummy routines 
     2715   !!   NOT 'key_xios'                               a few dummy routines 
    27162716   !!---------------------------------------------------------------------- 
    27172717   SUBROUTINE iom_setkt( kt, cdname ) 
     
    27352735   LOGICAL FUNCTION iom_use( cdname ) 
    27362736      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    2737 #if defined key_iomput 
     2737#if defined key_xios 
    27382738      iom_use = xios_field_is_active( cdname ) 
    27392739#else 
     
    27462746      REAL(wp)        , INTENT(out) ::   pmiss_val 
    27472747      REAL(dp)                      ::   ztmp_pmiss_val 
    2748 #if defined key_iomput 
     2748#if defined key_xios 
    27492749      ! get missing value 
    27502750      CALL xios_get_field_attr( cdname, default_value = ztmp_pmiss_val ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/IOM/restart.F90

    r14179 r14328  
    119119               CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE. ) 
    120120            ELSE 
    121 #if defined key_iomput 
     121#if defined key_xios 
    122122               cw_ocerst_cxt = "rstw_"//TRIM(ADJUSTL(clkt)) 
    123123               IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/LBC/lib_mpp.F90

    r14229 r14328  
    122122#endif 
    123123 
    124    INTEGER, PARAMETER         ::   nprocmax = 2**10   ! maximun dimension (required to be a power of 2) 
    125  
    126124   INTEGER, PUBLIC ::   mppsize        ! number of process 
    127125   INTEGER, PUBLIC ::   mpprank        ! process number  [ 0 - size-1 ] 
     
    10021000      !!---------------------------------------------------------------------- 
    10031001#if ! defined key_mpi_off 
    1004       !-$$     WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - ngrp_world     : ', ngrp_world 
    1005       !-$$     WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - mpi_comm_world : ', mpi_comm_world 
    1006       !-$$     WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - mpi_comm_oce   : ', mpi_comm_oce 
     1002      !-$$     WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - ngrp_world     : ', ngrp_world 
     1003      !-$$     WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - mpi_comm_world : ', mpi_comm_world 
     1004      !-$$     WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - mpi_comm_oce   : ', mpi_comm_oce 
    10071005      ! 
    10081006      ALLOCATE( kwork(jpnij), STAT=ierr ) 
     
    10151013         ! 
    10161014         CALL MPI_ALLGATHER ( njmpp, 1, mpi_integer, kwork, 1, mpi_integer, mpi_comm_oce, ierr ) 
    1017          !-$$        WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - kwork pour njmpp : ', kwork 
     1015         !-$$        WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - kwork pour njmpp : ', kwork 
    10181016         !-$$        CALL flush(numout) 
    10191017         ! 
     
    10251023            ENDIF 
    10261024         END DO 
    1027          !-$$        WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - ndim_rank_znl : ', ndim_rank_znl 
     1025         !-$$        WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - ndim_rank_znl : ', ndim_rank_znl 
    10281026         !-$$        CALL flush(numout) 
    10291027         ! Allocate the right size to nrank_znl 
     
    10381036            ENDIF 
    10391037         END DO 
    1040          !-$$        WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - nrank_znl : ', nrank_znl 
     1038         !-$$        WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - nrank_znl : ', nrank_znl 
    10411039         !-$$        CALL flush(numout) 
    10421040 
    10431041         ! Create the opa group 
    10441042         CALL MPI_COMM_GROUP(mpi_comm_oce,ngrp_opa,ierr) 
    1045          !-$$        WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - ngrp_opa : ', ngrp_opa 
     1043         !-$$        WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - ngrp_opa : ', ngrp_opa 
    10461044         !-$$        CALL flush(numout) 
    10471045 
    10481046         ! Create the znl group from the opa group 
    10491047         CALL MPI_GROUP_INCL  ( ngrp_opa, ndim_rank_znl, nrank_znl, ngrp_znl, ierr ) 
    1050          !-$$        WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - ngrp_znl ', ngrp_znl 
     1048         !-$$        WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - ngrp_znl ', ngrp_znl 
    10511049         !-$$        CALL flush(numout) 
    10521050 
    10531051         ! Create the znl communicator from the opa communicator, ie the pool of procs in the same row 
    10541052         CALL MPI_COMM_CREATE ( mpi_comm_oce, ngrp_znl, ncomm_znl, ierr ) 
    1055          !-$$        WRITE (numout,*) 'mpp_ini_znl ', nproc, ' - ncomm_znl ', ncomm_znl 
     1053         !-$$        WRITE (numout,*) 'mpp_ini_znl ', mpprank, ' - ncomm_znl ', ncomm_znl 
    10561054         !-$$        CALL flush(numout) 
    10571055         ! 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/LBC/mppini.F90

    r14229 r14328  
    133133      !!                    nbondi    : mark for "east-west local boundary" 
    134134      !!                    nbondj    : mark for "north-south local boundary" 
    135       !!                    nproc     : number for local processor 
    136135      !!                    noea      : number for local neighboring processor 
    137136      !!                    nowe      : number for local neighboring processor 
     
    506505 
    507506      ! just to save nono etc for all proc 
    508       ! warning ii*ij (zone) /= nproc (processors)! 
     507      ! warning ii*ij (zone) /= mpprank (processors)! 
    509508      ! ioso = zone number, ii_noso = proc number 
    510509      ii_noso(:) = -1 
     
    641640         WRITE(inum,'(6i8,a,3i8,a)') jpnij,jpimax,jpjmax,jpk,jpiglo,jpjglo,& 
    642641   &           ' ( local: ',narea,jpi,jpj,' )' 
    643          WRITE(inum,'(a)') 'nproc   jpi  jpj Nis0 Njs0 Nie0 Nje0 nimp njmp nono noso nowe noea nbondi nbondj ' 
     642         WRITE(inum,'(a)') 'narea   jpi  jpj Nis0 Njs0 Nie0 Nje0 nimp njmp nono noso nowe noea nbondi nbondj ' 
    644643 
    645644         DO jproc = 1, jpnij 
    646             WRITE(inum,'(13i5,2i7)')   jproc-1,  jpiall(jproc),  jpjall(jproc),   & 
     645            WRITE(inum,'(13i5,2i7)')     jproc,  jpiall(jproc),  jpjall(jproc),   & 
    647646               &                                nis0all(jproc), njs0all(jproc),   & 
    648647               &                                nie0all(jproc), nje0all(jproc),   & 
     
    668667      ENDIF 
    669668      ! 
    670       nproc = narea-1 
    671669      IF(lwp) THEN 
    672670         WRITE(numout,*) 
    673671         WRITE(numout,*) '   resulting internal parameters : ' 
    674          WRITE(numout,*) '      nproc  = ', nproc 
     672         WRITE(numout,*) '      narea  = ', narea 
    675673         WRITE(numout,*) '      nowe   = ', nowe  , '   noea  =  ', noea 
    676674         WRITE(numout,*) '      nono   = ', nono  , '   noso  =  ', noso 
     
    13261324      ENDIF 
    13271325      ! 
    1328       CALL flio_dom_set ( jpnij, nproc, idid, iglo, iloc, iabsf, iabsl, ihals, ihale, 'BOX', nidom) 
     1326      CALL flio_dom_set ( jpnij, narea-1, idid, iglo, iloc, iabsf, iabsl, ihals, ihale, 'BOX', nidom) 
    13291327      ! 
    13301328   END SUBROUTINE init_ioipsl 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/LDF/ldfslp.F90

    r13497 r14328  
    245245               &                       + 4.*  zww(ji,jj    ,jk)                       ) 
    246246         END_2D 
    247          DO jj = 3, jpj-2                                    ! other rows 
    248             DO ji = 2, jpim1   ! vector opt. 
    249                uslp(ji,jj,jk) = z1_16 * (        zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk)      & 
    250                   &                       +      zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk)      & 
    251                   &                       + 2.*( zwz(ji  ,jj-1,jk) + zwz(ji-1,jj  ,jk)      & 
    252                   &                       +      zwz(ji+1,jj  ,jk) + zwz(ji  ,jj+1,jk) )    & 
    253                   &                       + 4.*  zwz(ji  ,jj  ,jk)                       ) 
    254                vslp(ji,jj,jk) = z1_16 * (        zww(ji-1,jj-1,jk) + zww(ji+1,jj-1,jk)      & 
    255                   &                       +      zww(ji-1,jj+1,jk) + zww(ji+1,jj+1,jk)      & 
    256                   &                       + 2.*( zww(ji  ,jj-1,jk) + zww(ji-1,jj  ,jk)      & 
    257                   &                       +      zww(ji+1,jj  ,jk) + zww(ji  ,jj+1,jk) )    & 
    258                   &                       + 4.*  zww(ji,jj    ,jk)                       ) 
    259             END DO 
    260          END DO 
    261247         !                                 !* decrease along coastal boundaries 
    262248         DO_2D( 0, 0, 0, 0 ) 
     
    321307                 &               + 4.*  zww(ji  ,jj  ,jk)                         ) * zcofw 
    322308         END_2D 
    323          DO jj = 3, jpj-2                               ! other rows 
    324             DO ji = 2, jpim1   ! vector opt. 
    325                zcofw = wmask(ji,jj,jk) * z1_16 
    326                wslpi(ji,jj,jk) = (         zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk)     & 
    327                     &               +      zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk)     & 
    328                     &               + 2.*( zwz(ji  ,jj-1,jk) + zwz(ji-1,jj  ,jk)     & 
    329                     &               +      zwz(ji+1,jj  ,jk) + zwz(ji  ,jj+1,jk) )   & 
    330                     &               + 4.*  zwz(ji  ,jj  ,jk)                         ) * zcofw 
    331  
    332                wslpj(ji,jj,jk) = (         zww(ji-1,jj-1,jk) + zww(ji+1,jj-1,jk)     & 
    333                     &               +      zww(ji-1,jj+1,jk) + zww(ji+1,jj+1,jk)     & 
    334                     &               + 2.*( zww(ji  ,jj-1,jk) + zww(ji-1,jj  ,jk)     & 
    335                     &               +      zww(ji+1,jj  ,jk) + zww(ji  ,jj+1,jk) )   & 
    336                     &               + 4.*  zww(ji  ,jj  ,jk)                         ) * zcofw 
    337             END DO 
    338          END DO 
    339309         !                                        !* decrease in vicinity of topography 
    340310         DO_2D( 0, 0, 0, 0 ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_averg_h2d.F90

    r12377 r14328  
    2121      & e1t, e2t, & 
    2222      & e1f, e2f, & 
    23       & glamt, gphit, & 
    24       & nproc 
     23      & glamt, gphit 
    2524   USE in_out_manager 
    2625   USE obs_const, ONLY : & 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_grid.F90

    r13286 r14328  
    130130               CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 
    131131                  &                             1, jpi, 1, jpj,           & 
    132                   &                             nproc, jpnij,             & 
     132                  &                             narea-1, jpnij,           & 
    133133                  &                             glamt, gphit, tmask,      & 
    134134                  &                             kobsin, plam, pphi,       & 
     
    137137               CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 
    138138                  &                             1, jpi, 1, jpj,           & 
    139                   &                             nproc, jpnij,             & 
     139                  &                             narea-1, jpnij,           & 
    140140                  &                             glamu, gphiu, umask,      & 
    141141                  &                             kobsin, plam, pphi,       & 
     
    144144               CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 
    145145                  &                             1, jpi, 1, jpj,           & 
    146                   &                             nproc, jpnij,             & 
     146                  &                             narea-1, jpnij,           & 
    147147                  &                             glamv, gphiv, vmask,      & 
    148148                  &                             kobsin, plam, pphi,       & 
     
    151151               CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 
    152152                  &                             1, jpi, 1, jpj,           & 
    153                   &                             nproc, jpnij,             & 
     153                  &                             narea-1, jpnij,           & 
    154154                  &                             glamf, gphif, fmask,      & 
    155155                  &                             kobsin, plam, pphi,       & 
     
    176176      !! 
    177177      !! ** Action  : Return kproc holding the observation and kiobsi,kobsj 
    178       !!              valid on kproc=nproc processor only. 
     178      !!              valid on kproc=narea-1 processor only. 
    179179      !!    
    180180      !! History : 
     
    248248         jlon     = jpiglo 
    249249         jlat     = jpjglo 
    250          joffset  = nproc 
     250         joffset  = narea-1 
    251251         jostride = jpnij 
    252252      ELSE 
     
    513513                        IF ( ABS( zlam - zplam(jo) ) < 1e-6 ) THEN 
    514514                           IF ( llinvalidcell(ji,jj) ) THEN 
    515                               kproc(jo) = nproc + 1000000 
     515                              kproc(jo) = narea-1 + 1000000 
    516516                              kobsi(jo) = ji + 1 
    517517                              kobsj(jo) = jj + 1 
    518518                              CYCLE 
    519519                           ELSE 
    520                               kproc(jo) = nproc 
     520                              kproc(jo) = narea-1 
    521521                              kobsi(jo) = ji + 1 
    522522                              kobsj(jo) = jj + 1 
     
    552552                           &          zlamtm(:,ji,jj), zphitm(:,ji,jj) ) ) THEN 
    553553                           IF ( llinvalidcell(ji,jj) ) THEN 
    554                               kproc(jo) = nproc + 1000000 
     554                              kproc(jo) = narea-1 + 1000000 
    555555                              kobsi(jo) = ji + 1 
    556556                              kobsj(jo) = jj + 1 
    557557                              CYCLE 
    558558                           ELSE 
    559                               kproc(jo) = nproc 
     559                              kproc(jo) = narea-1 
    560560                              kobsi(jo) = ji + 1 
    561561                              kobsj(jo) = jj + 1 
     
    584584                           &          zlamtm(:,ji,jj), zphitm(:,ji,jj) ) ) THEN 
    585585                           IF ( llinvalidcell(ji,jj) ) THEN 
    586                               kproc(jo) = nproc + 1000000 
     586                              kproc(jo) = narea-1 + 1000000 
    587587                              kobsi(jo) = ji + 1 
    588588                              kobsj(jo) = jj + 1 
    589589                              CYCLE 
    590590                           ELSE 
    591                               kproc(jo) = nproc 
     591                              kproc(jo) = narea-1 
    592592                              kobsi(jo) = ji + 1 
    593593                              kobsj(jo) = jj + 1 
     
    716716            ! define the following format: "(a,a,ix.x,a,ix.x,a,ix.x,a)" 
    717717            WRITE(clfmt, "('(a,a,i', i1, '.', i1',a,i', i1, '.', i1',a,i', i1, '.', i1',a)')") idg, idg, idg, idg, idg, idg 
    718             WRITE(cfname,      clfmt     ) TRIM(cn_gridsearchfile),'_', nproc,'of', jpni,'by', jpnj,'.nc' 
     718            WRITE(cfname,      clfmt     ) TRIM(cn_gridsearchfile),'_', narea-1,'of', jpni,'by', jpnj,'.nc' 
    719719         ENDIF 
    720720 
     
    820820            CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo,  & 
    821821               &                     1, jpi, 1, jpj,            & 
    822                &                     nproc, jpnij,              & 
     822               &                     narea-1, jpnij,            & 
    823823               &                     glamt, gphit, tmask,       & 
    824824               &                     nlons*nlats, lonsi, latsi, & 
     
    10701070 
    10711071            IF ( ( .NOT. ln_grid_global ) .OR. & 
    1072                & ( ( ln_grid_global ) .AND. ( nproc==0 ) ) ) THEN 
     1072               & ( ( ln_grid_global ) .AND. ( narea-1==0 ) ) ) THEN 
    10731073 
    10741074               CALL chkerr( nf90_create (TRIM(cfname), nf90_clobber, idfile), & 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_mpp.F90

    r14229 r14328  
    1818   !! obs_mpp_sum_integer   : Sum an integer from all processors 
    1919   !!---------------------------------------------------------------------- 
    20    USE dom_oce, ONLY :   nproc, mig, mjg   ! Ocean space and time domain variables 
    2120   USE mpp_map, ONLY :   mppmap 
    2221   USE in_out_manager 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_prep.F90

    r14056 r14328  
    6262      !! * Modules used 
    6363      USE par_oce             ! Ocean parameters 
    64       USE dom_oce, ONLY       :   glamt, gphit, tmask, nproc   ! Geographical information 
     64      USE dom_oce, ONLY       :   glamt, gphit, tmask   ! Geographical information 
    6565      !! * Arguments 
    6666      TYPE(obs_surf), INTENT(INOUT) :: surfdata    ! Full set of surface data 
     
    263263      USE par_oce             ! Ocean parameters 
    264264      USE dom_oce, ONLY : &   ! Geographical information 
    265          & gdept_1d,             & 
    266          & nproc 
     265         & gdept_1d 
    267266 
    268267      !! * Arguments 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_read_prof.F90

    r14056 r14328  
    404404               IF ( ( inpfiles(jj)%ptim(ji) >  djulini(jj) ) .AND. & 
    405405                  & ( inpfiles(jj)%ptim(ji) <= djulend(jj) )       ) THEN 
    406                   IF ( nproc == 0 ) THEN 
    407                      IF ( inpfiles(jj)%iproc(ji,1) >  nproc ) CYCLE 
     406                  IF ( narea == 1 ) THEN 
     407                     IF ( inpfiles(jj)%iproc(ji,1) >  narea-1 ) CYCLE 
    408408                  ELSE 
    409                      IF ( inpfiles(jj)%iproc(ji,1) /= nproc ) CYCLE 
     409                     IF ( inpfiles(jj)%iproc(ji,1) /= narea-1 ) CYCLE 
    410410                  ENDIF 
    411411                  llvalprof = .FALSE. 
     
    538538            & ( inpfiles(jj)%ptim(ji) <= djulend(jj) ) ) THEN 
    539539 
    540             IF ( nproc == 0 ) THEN 
    541                IF ( inpfiles(jj)%iproc(ji,1) >  nproc ) CYCLE 
     540            IF ( narea == 1 ) THEN 
     541               IF ( inpfiles(jj)%iproc(ji,1) >  narea-1 ) CYCLE 
    542542            ELSE 
    543                IF ( inpfiles(jj)%iproc(ji,1) /= nproc ) CYCLE 
     543               IF ( inpfiles(jj)%iproc(ji,1) /= narea-1 ) CYCLE 
    544544            ENDIF 
    545545 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_read_surf.F90

    r14056 r14328  
    300300               IF ( ( inpfiles(jj)%ptim(ji) >  djulini(jj) ) .AND. & 
    301301                  & ( inpfiles(jj)%ptim(ji) <= djulend(jj) )       ) THEN 
    302                   IF ( nproc == 0 ) THEN 
    303                      IF ( inpfiles(jj)%iproc(ji,1) >  nproc ) CYCLE 
     302                  IF ( narea == 1 ) THEN 
     303                     IF ( inpfiles(jj)%iproc(ji,1) >  narea-1 ) CYCLE 
    304304                  ELSE 
    305                      IF ( inpfiles(jj)%iproc(ji,1) /= nproc ) CYCLE 
     305                     IF ( inpfiles(jj)%iproc(ji,1) /= narea-1 ) CYCLE 
    306306                  ENDIF 
    307307                  llvalprof = .FALSE. 
     
    371371            & ( inpfiles(jj)%ptim(ji) <= djulend(jj) ) ) THEN 
    372372 
    373             IF ( nproc == 0 ) THEN 
    374                IF ( inpfiles(jj)%iproc(ji,1) >  nproc ) CYCLE 
     373            IF ( narea == 1 ) THEN 
     374               IF ( inpfiles(jj)%iproc(ji,1) >  narea-1 ) CYCLE 
    375375            ELSE 
    376                IF ( inpfiles(jj)%iproc(ji,1) /= nproc ) CYCLE 
     376               IF ( inpfiles(jj)%iproc(ji,1) /= narea-1 ) CYCLE 
    377377            ENDIF 
    378378 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_utils.F90

    r10068 r14328  
    6666      !! * Modules used 
    6767      USE netcdf             ! NetCDF library 
    68       USE dom_oce, ONLY : &  ! Ocean space and time domain variables 
    69          & nproc 
    7068 
    7169      !! * Arguments 
     
    102100      !! * Modules used 
    103101      USE netcdf             ! NetCDF library 
    104       USE dom_oce, ONLY : &  ! Ocean space and time domain variables 
    105          & nproc 
    106102 
    107103      !! * Arguments 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/OBS/obs_write.F90

    r14056 r14328  
    210210      idg = MAX( INT(LOG10(REAL(jpnij,wp))) + 1, 4 )            ! how many digits to we need to write? min=4, max=9 
    211211      WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg   ! '(a,a,ix.x,a)' 
    212       WRITE(clfname,clfmt) TRIM(clfiletype), '_fdbk_', nproc, '.nc' 
     212      WRITE(clfname,clfmt) TRIM(clfiletype), '_fdbk_', narea-1, '.nc' 
    213213 
    214214      IF(lwp) THEN 
     
    475475      idg = MAX( INT(LOG10(REAL(jpnij,wp))) + 1, 4 )            ! how many digits to we need to write? min=4, max=9 
    476476      WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg   ! '(a,a,ix.x,a)' 
    477       WRITE(clfname,clfmt) TRIM(clfiletype), '_fdbk_', nproc, '.nc' 
     477      WRITE(clfname,clfmt) TRIM(clfiletype), '_fdbk_', narea-1, '.nc' 
    478478 
    479479      IF(lwp) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/SBC/sbcice_cice.F90

    r14215 r14328  
    877877! (may be OK but not 100% sure) 
    878878 
    879       IF(nproc==0) THEN      
     879      IF(narea==1) THEN      
    880880!        pcg(:,:)=0.0 
    881881         DO jn=1,jpnij 
     
    998998! the lbclnk call on pn will replace these with sensible values 
    999999 
    1000       IF(nproc==0) THEN 
     1000      IF(narea==1) THEN 
    10011001         png(:,:,:)=0.0 
    10021002         DO jn=1,jpnij 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/TRA/traadv_fct.F90

    r14189 r14328  
    258258            IF (nn_hls.EQ.1) CALL lbc_lnk_multi( 'traadv_fct', ztu, 'U', -1.0_wp , ztv, 'V', -1.0_wp )   ! Lateral boundary cond. (unchanged sgn) 
    259259            ! 
    260             IF (nn_hls.EQ.1) CALL lbc_lnk_multi( 'traadv_fct', ztu, 'U', -1.0_wp , ztv, 'V', -1.0_wp )   ! Lateral boundary cond. (unchanged sgn) 
    261             ! 
    262260            DO_3D( 0, 0, 0, 0, 1, jpkm1 )    ! Horizontal advective fluxes 
    263261               zC2t_u = pt(ji,jj,jk,jn,Kmm) + pt(ji+1,jj  ,jk,jn,Kmm)   ! 2 x C2 interpolation of T at u- & v-points (x2) 
     
    299297         END IF 
    300298         ! 
    301          IF (nn_hls.EQ.1) THEN 
    302             CALL lbc_lnk_multi( 'traadv_fct', zwi, 'T', 1.0_wp, zwx, 'U', -1.0_wp , zwy, 'V', -1.0_wp, zwz, 'T', 1.0_wp ) 
    303          ELSE 
    304             CALL lbc_lnk( 'traadv_fct', zwi, 'T', 1.0_wp) 
    305          END IF 
    306          ! 
    307299         IF ( ll_zAimp ) THEN 
    308300            DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 )    !* trend and after field with monotonic scheme 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/TRD/trd_oce.F90

    r14045 r14328  
    2727   LOGICAL , PUBLIC ::   l_trddyn        !: momentum trend flag (set from namelist in trdini) 
    2828    
    29 # if ( defined key_trdtrc && defined key_iomput )  ||  defined key_trdmxl_trc 
     29# if ( defined key_trdtrc && defined key_xios )  ||  defined key_trdmxl_trc 
    3030   LOGICAL , PUBLIC ::   l_trdtrc = .TRUE.        !: tracers  trend flag 
    3131# else 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/USR/README.rst

    r11743 r14328  
    3737.. code-block:: console 
    3838 
    39    $ ./makenemo –n 'ORCA2_ICE_PISCES_MINE' -r 'ORCA2_ICE_PISCES' -m 'my_arch' del_key 'key_iomput' add_key 'key_diahth' 
     39   $ ./makenemo –n 'ORCA2_ICE_PISCES_MINE' -r 'ORCA2_ICE_PISCES' -m 'my_arch' del_key 'key_xios' add_key 'key_diahth' 
    4040 
    4141Option 3: Use the SIREN tools to subset an existing model 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/nemogcm.F90

    r14229 r14328  
    233233      CALL nemo_closefile 
    234234      ! 
    235 #if defined key_iomput 
     235#if defined key_xios 
    236236                                    CALL xios_finalize  ! end mpp communications with xios 
    237237      IF( lk_oasis     )            CALL cpl_finalize   ! end coupling and mpp communications with OASIS 
     
    271271      !                             !-------------------------------------------------! 
    272272      ! 
    273 #if defined key_iomput 
     273#if defined key_xios 
    274274      IF( Agrif_Root() ) THEN 
    275275         IF( lk_oasis ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/step.F90

    r14227 r14328  
    9797      ENDIF 
    9898      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    99 # if defined key_iomput 
     99# if defined key_xios 
    100100      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    101101# endif 
     
    384384      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp, Nbb, Nnn )     ! coupled mode : field exchanges 
    385385      ! 
    386 #if defined key_iomput 
     386#if defined key_xios 
    387387      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    388388      ! Finalize contextes if end of simulation or error detected 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/step_oce.F90

    r14143 r14328  
    104104   USE timing          ! Timing 
    105105 
    106 #if defined key_iomput 
     106#if defined key_xios 
    107107   USE xios            ! I/O server 
    108108#endif 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/stpctl.F90

    r14143 r14328  
    1515   !!---------------------------------------------------------------------- 
    1616   !!   stp_ctl      : Control the run 
    17    !!   stp_ctl_SWE  : Control the run (SWE only) 
    1817   !!---------------------------------------------------------------------- 
    1918   USE oce             ! ocean dynamics and tracers variables 
     
    3433 
    3534   PUBLIC stp_ctl           ! routine called by step.F90 
    36    PUBLIC stp_ctl_SWE       ! routine called by stpmlf.F90 
    37  
    38    INTEGER                ::   nrunid   ! netcdf file id 
    39    INTEGER, DIMENSION(8)  ::   nvarid   ! netcdf variable id 
    40    INTEGER, DIMENSION(2)  ::   nvarid_SWE   ! netcdf variable id (SWE only) 
     35 
     36   INTEGER, PARAMETER         ::   jpvar = 8 
     37   INTEGER                    ::   nrunid   ! netcdf file id 
     38   INTEGER, DIMENSION(jpvar)  ::   nvarid   ! netcdf variable id 
    4139   !!---------------------------------------------------------------------- 
    4240   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    4947      !!---------------------------------------------------------------------- 
    5048      !!                    ***  ROUTINE stp_ctl  *** 
    51       !!                      
     49      !! 
    5250      !! ** Purpose :   Control the run 
    5351      !! 
     
    6563      INTEGER, INTENT(in   ) ::   Kmm      ! ocean time level index 
    6664      !! 
     65      INTEGER, PARAMETER              ::   jptst = 4 
    6766      INTEGER                         ::   ji                                    ! dummy loop indices 
    6867      INTEGER                         ::   idtime, istatus 
    69       INTEGER , DIMENSION(9)          ::   iareasum, iareamin, iareamax 
    70       INTEGER , DIMENSION(3,4)        ::   iloc                                  ! min/max loc indices 
     68      INTEGER , DIMENSION(jptst)      ::   iareasum, iareamin, iareamax 
     69      INTEGER , DIMENSION(3,jptst)    ::   iloc                                  ! min/max loc indices 
    7170      REAL(wp)                        ::   zzz, zminsal, zmaxsal                 ! local real  
    72       REAL(wp), DIMENSION(9)          ::   zmax, zmaxlocal 
     71      REAL(wp), DIMENSION(jpvar+1)    ::   zmax 
     72      REAL(wp), DIMENSION(jptst)      ::   zmaxlocal 
    7373      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    7474      LOGICAL, DIMENSION(jpi,jpj,jpk) ::   llmsk 
     
    7878      ! 
    7979      ll_wrtstp  = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    80       ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1  
     80      ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1 
    8181      ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 
    8282      ! 
     
    111111            istatus = NF90_ENDDEF(nrunid) 
    112112         ENDIF 
    113          !     
     113         ! 
    114114      ENDIF 
    115115      ! 
     
    155155         zmax(5:8) = 0._wp 
    156156      ENDIF 
    157       zmax(9) = REAL( nstop, wp )                                                 ! stop indicator 
     157      zmax(jpvar+1) = REAL( nstop, wp )                                           ! stop indicator 
    158158      ! 
    159159      !                                   !==               get global extrema             ==! 
    160160      !                                   !==  done by all processes if writting run.stat  ==! 
    161161      IF( ll_colruns ) THEN 
    162          zmaxlocal(:) = zmax(:) 
     162         zmaxlocal(:) = zmax(1:jptst) 
    163163         CALL mpp_max( "stpctl", zmax )          ! max over the global domain: ok even of ll_0oce = .true.  
    164          nstop = NINT( zmax(9) )                 ! update nstop indicator (now sheared among all local domains) 
     164         nstop = NINT( zmax(jpvar+1) )           ! update nstop indicator (now sheared among all local domains) 
    165165      ELSE 
    166166         ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
    167          IF( ll_0oce )   zmax(1:4) = (/ 0._wp, 0._wp, -1._wp, 1._wp /)   ! default "valid" values... 
    168       ENDIF 
    169       ! 
    170       zmax(3) = -zmax(3)                         ! move back from max(-zz) to min(zz) : easier to manage!  
    171       zmax(5) = -zmax(5)                         ! move back from max(-zz) to min(zz) : easier to manage! 
    172       IF( ll_colruns ) THEN 
    173          zmaxlocal(3) = -zmaxlocal(3)            ! move back from max(-zz) to min(zz) : easier to manage!  
    174          zmaxlocal(5) = -zmaxlocal(5)            ! move back from max(-zz) to min(zz) : easier to manage! 
    175       ENDIF 
     167         IF( ll_0oce )   zmax(1:jptst) = (/ 0._wp, 0._wp, -1._wp, 1._wp /)   ! default "valid" values... 
     168      ENDIF 
     169      ! 
     170      zmax(3) = -zmax(3)                              ! move back from max(-zz) to min(zz) : easier to manage!  
     171      zmax(5) = -zmax(5)                              ! move back from max(-zz) to min(zz) : easier to manage! 
     172      IF( ll_colruns ) zmaxlocal(3) = -zmaxlocal(3)   ! move back from max(-zz) to min(zz) : easier to manage! 
    176173      ! 
    177174      !                                   !==              write "run.stat" files              ==! 
    178175      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    179176      IF( ll_wrtruns ) THEN 
    180          WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3), zmax(4) 
    181          DO ji = 1, 6 + 2 * COUNT( (/ln_zad_Aimp/) ) 
     177         WRITE(numrun,9500) kt, zmax(1:jptst) 
     178         DO ji = 1, jpvar - 2 * COUNT( .NOT. (/ln_zad_Aimp/) ) 
    182179            istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 
    183180         END DO 
     
    188185      ! 
    189186      IF ( ln_SEOS.AND.(rn_b0==0._wp) ) THEN             ! Discard checks on salinity 
    190          zmaxsal = +1.e38                                ! if not used in eos 
    191          zminsal = -1.e38  
     187         zmaxsal =  HUGE(1._wp)                               ! if not used in eos 
     188         zminsal = -HUGE(1._wp) 
    192189      ELSE 
    193190         zmaxsal = 100._wp 
     
    195192      ENDIF  
    196193      !  
    197       IF(  zmax(1) >   20._wp .OR.   &                   ! too large sea surface height ( > 20 m ) 
    198          & zmax(2) >   10._wp .OR.   &                   ! too large velocity ( > 10 m/s) 
    199          & zmax(3) <= zminsal .OR.   &                   ! negative or zero sea surface salinity 
    200          & zmax(4) >= zmaxsal .OR.   &                   ! too large sea surface salinity ( > 100 ) 
    201          & zmax(4) <  zminsal .OR.   &                   ! too large sea surface salinity (keep this line for sea-ice) 
    202          & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
    203          & ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
     194      IF(  zmax(1) >   20._wp .OR.   &                        ! too large sea surface height ( > 20 m ) 
     195         & zmax(2) >   10._wp .OR.   &                        ! too large velocity ( > 10 m/s) 
     196         & zmax(3) <= zminsal .OR.   &                        ! negative or zero sea surface salinity 
     197         & zmax(4) >= zmaxsal .OR.   &                        ! too large sea surface salinity ( > 100 ) 
     198         & zmax(4) <  zminsal .OR.   &                        ! too large sea surface salinity (keep this line for sea-ice) 
     199         & ISNAN( SUM(zmax(1:jptst)) ) .OR.   &               ! NaN encounter in the tests 
     200         & ABS(   SUM(zmax(1:jptst)) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
    204201         ! 
    205202         iloc(:,:) = 0 
     
    217214            ! find which subdomain has the max. 
    218215            iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
    219             DO ji = 1, 9 
     216            DO ji = 1, jptst 
    220217               IF( zmaxlocal(ji) == zmax(ji) ) THEN 
    221218                  iareamin(ji) = narea   ;   iareamax(ji) = narea   ;   iareasum(ji) = 1 
     
    234231            iloc(1:3,3) = MINLOC(       ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 
    235232            iloc(1:3,4) = MAXLOC(       ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 
    236             DO ji = 1, 4   ! local domain indices ==> global domain indices, excluding halos 
     233            DO ji = 1, jptst   ! local domain indices ==> global domain indices, excluding halos 
    237234               iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 
    238235            END DO 
     
    253250         CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file 
    254251         ! 
    255          IF( ll_colruns .or. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
     252         IF( ll_colruns .OR. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    256253            IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    257254            ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     
    271268      ! 
    272269   END SUBROUTINE stp_ctl 
    273  
    274  
    275    SUBROUTINE stp_ctl_SWE( kt, Kmm ) 
    276       !!---------------------------------------------------------------------- 
    277       !!                    ***  ROUTINE stp_ctl_SWE  *** 
    278       !!                      
    279       !! ** Purpose :   Control the run 
    280       !! 
    281       !! ** Method  : - Save the time step in numstp 
    282       !!              - Print it each 50 time steps 
    283       !!              - Stop the run IF problem encountered by setting nstop > 0 
    284       !!                Problems checked: e3t0+ssh minimum smaller that 0 
    285       !!                                  |U|   maximum larger than 10 m/s  
    286       !!                                  ( not for SWE : negative sea surface salinity ) 
    287       !! 
    288       !! ** Actions :   "time.step" file = last ocean time-step 
    289       !!                "run.stat"  file = run statistics 
    290       !!                 nstop indicator sheared among all local domain 
    291       !!---------------------------------------------------------------------- 
    292       INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index 
    293       INTEGER, INTENT(in   ) ::   Kmm      ! ocean time level index 
    294       !! 
    295       INTEGER                         ::   ji                                    ! dummy loop indices 
    296       INTEGER                         ::   idtime, istatus 
    297       INTEGER , DIMENSION(3)          ::   iareasum, iareamin, iareamax 
    298       INTEGER , DIMENSION(3,4)        ::   iloc                                  ! min/max loc indices 
    299       REAL(wp)                        ::   zzz                                   ! local real  
    300       REAL(wp), DIMENSION(3)          ::   zmax, zmaxlocal 
    301       LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    302       LOGICAL, DIMENSION(jpi,jpj,jpk) ::   llmsk 
    303       CHARACTER(len=20)               ::   clname 
    304       !!---------------------------------------------------------------------- 
    305       ! 
    306       IF( nstop > 0 .AND. ngrdstop > -1 )   RETURN   !   stpctl was already called by a child grid 
    307       ! 
    308       ll_wrtstp  = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    309       ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1  
    310       ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 
    311       ! 
    312       IF( kt == nit000 ) THEN 
    313          ! 
    314          IF( lwp ) THEN 
    315             WRITE(numout,*) 
    316             WRITE(numout,*) 'stp_ctl_SWE : time-stepping control' 
    317             WRITE(numout,*) '~~~~~~~~~~~' 
    318          ENDIF 
    319          !                                ! open time.step    ascii file, done only by 1st subdomain 
    320          IF( lwm )   CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    321          ! 
    322          IF( ll_wrtruns ) THEN 
    323             !                             ! open run.stat     ascii file, done only by 1st subdomain 
    324             CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    325             !                             ! open run.stat.nc netcdf file, done only by 1st subdomain 
    326             clname = 'run.stat.nc' 
    327             IF( .NOT. Agrif_Root() )   clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 
    328             istatus = NF90_CREATE( TRIM(clname), NF90_CLOBBER, nrunid ) 
    329             istatus = NF90_DEF_DIM( nrunid, 'time', NF90_UNLIMITED, idtime ) 
    330             istatus = NF90_DEF_VAR( nrunid, 'abs_ssh_max', NF90_DOUBLE, (/ idtime /), nvarid_SWE(1) ) 
    331             istatus = NF90_DEF_VAR( nrunid,   'abs_u_max', NF90_DOUBLE, (/ idtime /), nvarid_SWE(2) ) 
    332             istatus = NF90_ENDDEF(nrunid) 
    333          ENDIF 
    334          !     
    335       ENDIF 
    336       ! 
    337       !                                   !==              write current time step              ==! 
    338       !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    339       IF( lwm .AND. ll_wrtstp ) THEN 
    340          WRITE ( numstp, '(1x, i8)' )   kt 
    341          REWIND( numstp ) 
    342       ENDIF 
    343       !                                   !==            test of local extrema           ==! 
    344       !                                   !==  done by all processes at every time step  ==! 
    345       ! 
    346       llmsk(   1:Nis1,:,:) = .FALSE.                                              ! exclude halos from the checked region 
    347       llmsk(Nie1: jpi,:,:) = .FALSE. 
    348       llmsk(:,   1:Njs1,:) = .FALSE. 
    349       llmsk(:,Nje1: jpj,:) = .FALSE. 
    350       ! 
    351       llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0) == 1._wp         ! define only the inner domain 
    352       ! 
    353       ll_0oce = .NOT. ANY( llmsk(:,:,1) )                                         ! no ocean point in the inner domain? 
    354       ! 
    355       zmax(1) = MINVAL( -e3t_0(:,:,1)-ssh(:,:,Kmm)  , mask = llmsk(:,:,1)  )       ! e3t_Kmm min 
    356       ! 
    357       llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
    358       zmax(2) = MAXVAL(  ABS( uu(:,:,:,Kmm) )      , mask = llmsk(:,:,:) )        ! velocity max (zonal only) 
    359       zmax(3) = REAL( nstop , wp )                                                ! stop indicator 
    360  
    361       !                                   !==               get global extrema             ==! 
    362       !                                   !==  done by all processes if writting run.stat  ==! 
    363       IF( ll_colruns ) THEN 
    364          zmaxlocal(:) = zmax(:) 
    365          CALL mpp_max( "stpctl", zmax )          ! max over the global domain 
    366          nstop = NINT( zmax(3) )                 ! update nstop indicator (now sheared among all local domains) 
    367       ELSE 
    368          ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
    369          IF( ll_0oce )   zmax(1:4) = (/ 0._wp, 0._wp, -1._wp, 1._wp /)   ! default "valid" values... 
    370       ENDIF 
    371       ! 
    372       zmax(1) = -zmax(1)                         ! move back from max(-zz) to min(zz) : easier to manage! 
    373       ! 
    374       !                                   !==              write "run.stat" files              ==! 
    375       !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    376       IF( ll_wrtruns ) THEN 
    377          WRITE(numrun,9500) kt, zmax(1), zmax(2) 
    378          istatus = NF90_PUT_VAR( nrunid, nvarid_SWE(1), (/ zmax(1)/), (/kt/), (/1/) ) 
    379          istatus = NF90_PUT_VAR( nrunid, nvarid_SWE(2), (/ zmax(2)/), (/kt/), (/1/) ) 
    380          IF( kt == nitend )   istatus = NF90_CLOSE(nrunid) 
    381       ENDIF 
    382       !                                   !==               error handling               ==! 
    383       !                                   !==  done by all processes at every time step  ==! 
    384       ! 
    385 !!SWE specific : start 
    386       IF(   zmax(1) <=   0._wp .OR.           &               ! negative e3t_Kmm 
    387          &  zmax(2) >   10._wp .OR.           &               ! too large velocity ( > 10 m/s) 
    388          &  ISNAN( zmax(1) + zmax(2) ) .OR.   &               ! NaN encounter in the tests 
    389          &  ABS(   zmax(1) + zmax(2) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
    390          ! 
    391          iloc(:,:) = 0 
    392          IF( ll_colruns ) THEN   ! zmax is global, so it is the same on all subdomains -> no dead lock with mpp_maxloc 
    393             ! first: close the netcdf file, so we can read it 
    394             IF( lwm .AND. kt /= nitend )   istatus = NF90_CLOSE(nrunid) 
    395             ! get global loc on the min/max 
    396             llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp         ! define only the inner domain 
    397             CALL mpp_minloc( 'stpctl', e3t_0(:,:,1) + ssh(:,:,Kmm), llmsk(:,:,1), zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F 
    398             llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
    399             CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:,Kmm))        , llmsk(:,:,:), zzz, iloc(1:3,2) ) 
    400             ! find which subdomain has the max. 
    401             iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
    402             DO ji = 1, 3 
    403                IF( zmaxlocal(ji) == zmax(ji) ) THEN 
    404                   iareamin(ji) = narea   ;   iareamax(ji) = narea   ;   iareasum(ji) = 1 
    405                ENDIF 
    406             END DO 
    407             CALL mpp_min( "stpctl", iareamin )         ! min over the global domain 
    408             CALL mpp_max( "stpctl", iareamax )         ! max over the global domain 
    409             CALL mpp_sum( "stpctl", iareasum )         ! sum over the global domain 
    410          ELSE                    ! find local min and max locations: 
    411             ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc 
    412             llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp        ! define only the inner domain 
    413             iloc(1:2,1) = MINLOC( e3t_0(:,:,1) + ssh(:,:,Kmm), mask = llmsk(:,:,1) ) 
    414             ! 
    415             llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
    416             iloc(1:3,2) = MAXLOC( ABS(  uu(:,:,:,       Kmm)), mask = llmsk(:,:,:) ) 
    417             iareamin(:) = narea   ;   iareamax(:) = narea   ;   iareasum(:) = 1         ! this is local information 
    418          ENDIF 
    419          ! 
    420          WRITE(ctmp1,*) ' stp_ctl_SWE:  e3t0+ssh < 0 m  or  |U| > 10 m/s  or  NaN encounter in the tests' 
    421          CALL wrt_line( ctmp2, kt, 'e3t0+ssh min',  zmax(1), iloc(:,1), iareasum(1), iareamin(1), iareamax(1) ) 
    422          CALL wrt_line( ctmp3, kt, '|U|   max'   ,  zmax(2), iloc(:,2), iareasum(2), iareamin(2), iareamax(2) ) 
    423          IF( Agrif_Root() ) THEN 
    424             WRITE(ctmp6,*) '      ===> output of last computed fields in output.abort* files' 
    425          ELSE 
    426             WRITE(ctmp6,*) '      ===> output of last computed fields in '//TRIM(Agrif_CFixed())//'_output.abort* files' 
    427          ENDIF 
    428          ! 
    429          CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file 
    430          ! 
    431          IF( ll_colruns .or. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    432             IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ' ', ctmp6 ) 
    433             ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
    434             ENDIF 
    435          ELSE                                    ! only mpi subdomains with errors are here -> STOP now 
    436             CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ctmp3, ' ', ctmp6 ) 
    437          ENDIF 
    438          ! 
    439       ENDIF 
    440 !!SWE specific : end 
    441       ! 
    442       IF( nstop > 0 ) THEN                                                  ! an error was detected and we did not abort yet... 
    443          ngrdstop = Agrif_Fixed()                                           ! store which grid got this error 
    444          IF( .NOT. ll_colruns .AND. jpnij > 1 )   CALL ctl_stop( 'STOP' )   ! we must abort here to avoid MPI deadlock 
    445       ENDIF 
    446       ! 
    447 9500  FORMAT(' it :', i8, '      e3t_min: ', D23.16, ' |U|_max: ', D23.16) 
    448       ! 
    449    END SUBROUTINE stp_ctl_SWE 
    450270 
    451271 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OCE/stpmlf.F90

    r14227 r14328  
    105105      ENDIF 
    106106      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    107 # if defined key_iomput 
     107# if defined key_xios 
    108108      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    109109# endif 
     
    408408      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp, Nbb, Nnn )     ! coupled mode : field exchanges 
    409409      ! 
    410 #if defined key_iomput 
     410#if defined key_xios 
    411411      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    412412      ! Finalize contextes if end of simulation or error detected 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OFF/dtadyn.F90

    r14053 r14328  
    5353   PUBLIC   dta_dyn_init       ! called by nemo_init 
    5454   PUBLIC   dta_dyn            ! called by nemo_gcm 
    55    PUBLIC   dta_dyn_sed_init   ! called by nemo_init 
    56    PUBLIC   dta_dyn_sed        ! called by nemo_gcm 
    5755   PUBLIC   dta_dyn_atf        ! called by nemo_gcm 
    5856#if ! defined key_qco 
    5957   PUBLIC   dta_dyn_sf_interp  ! called by nemo_gcm 
    6058#endif 
     59#if defined key_sed_off 
     60   PUBLIC   dta_dyn_sed_init   ! called by nemo_init 
     61   PUBLIC   dta_dyn_sed        ! called by nemo_gcm 
     62#endif 
    6163 
    6264   CHARACTER(len=100) ::   cn_dir          !: Root directory for location of ssr files 
    6365   LOGICAL            ::   ln_dynrnf       !: read runoff data in file (T) or set to zero (F) 
    6466   LOGICAL            ::   ln_dynrnf_depth       !: read runoff data in file (T) or set to zero (F) 
    65    REAL(wp)           ::   fwbcorr 
    6667 
    6768 
     
    138139      ts(:,:,:,jp_tem,Kmm) = sf_dyn(jf_tem)%fnow(:,:,:)  * tmask(:,:,:)    ! temperature 
    139140      ts(:,:,:,jp_sal,Kmm) = sf_dyn(jf_sal)%fnow(:,:,:)  * tmask(:,:,:)    ! salinity 
    140       wndm(:,:)         = sf_dyn(jf_wnd)%fnow(:,:,1)  * tmask(:,:,1)    ! wind speed - needed for gas exchange 
    141       fmmflx(:,:)       = sf_dyn(jf_fmf)%fnow(:,:,1)  * tmask(:,:,1)    ! downward salt flux (v3.5+) 
    142       fr_i(:,:)         = sf_dyn(jf_ice)%fnow(:,:,1)  * tmask(:,:,1)    ! Sea-ice fraction 
    143       qsr (:,:)         = sf_dyn(jf_qsr)%fnow(:,:,1)  * tmask(:,:,1)    ! solar radiation 
    144       emp (:,:)         = sf_dyn(jf_emp)%fnow(:,:,1)  * tmask(:,:,1)    ! E-P 
     141      wndm(:,:)            = sf_dyn(jf_wnd)%fnow(:,:,1)  * tmask(:,:,1)    ! wind speed - needed for gas exchange 
     142      fmmflx(:,:)          = sf_dyn(jf_fmf)%fnow(:,:,1)  * tmask(:,:,1)    ! downward salt flux (v3.5+) 
     143      fr_i(:,:)            = sf_dyn(jf_ice)%fnow(:,:,1)  * tmask(:,:,1)    ! Sea-ice fraction 
     144      qsr (:,:)            = sf_dyn(jf_qsr)%fnow(:,:,1)  * tmask(:,:,1)    ! solar radiation 
     145      emp (:,:)            = sf_dyn(jf_emp)%fnow(:,:,1)  * tmask(:,:,1)    ! E-P 
    145146      IF( ln_dynrnf ) THEN  
    146          rnf (:,:)      = sf_dyn(jf_rnf)%fnow(:,:,1) * tmask(:,:,1)    ! E-P 
    147          IF( ln_dynrnf_depth .AND. .NOT. ln_linssh )    CALL  dta_dyn_hrnf(Kmm) 
     147         rnf (:,:)         = sf_dyn(jf_rnf)%fnow(:,:,1) * tmask(:,:,1)    ! E-P 
     148         IF( ln_dynrnf_depth .AND. .NOT. ln_linssh )    CALL  dta_dyn_rnf( Kmm ) 
    148149      ENDIF 
    149150      ! 
    150151      uu(:,:,:,Kmm)        = sf_dyn(jf_uwd)%fnow(:,:,:) * umask(:,:,:)    ! effective u-transport 
    151152      vv(:,:,:,Kmm)        = sf_dyn(jf_vwd)%fnow(:,:,:) * vmask(:,:,:)    ! effective v-transport 
    152       ww(:,:,:)        = sf_dyn(jf_wwd)%fnow(:,:,:) * tmask(:,:,:)    ! effective v-transport 
     153      ww(:,:,:)            = sf_dyn(jf_wwd)%fnow(:,:,:) * tmask(:,:,:)    ! effective v-transport 
    153154      ! 
    154155      IF( .NOT.ln_linssh ) THEN 
     
    156157         zhdivtr(:,:,:) = sf_dyn(jf_div)%fnow(:,:,:)  * tmask(:,:,:)    ! effective u-transport 
    157158         emp_b  (:,:)   = sf_dyn(jf_empb)%fnow(:,:,1) * tmask(:,:,1)    ! E-P 
    158          zemp   (:,:)   = ( 0.5_wp * ( emp(:,:) + emp_b(:,:) ) + rnf(:,:) + fwbcorr ) * tmask(:,:,1) 
     159         zemp   (:,:)   = ( 0.5_wp * ( emp(:,:) + emp_b(:,:) ) + rnf(:,:) ) * tmask(:,:,1) 
    159160#if defined key_qco 
    160161         CALL dta_dyn_ssh( kt, zhdivtr, ssh(:,:,Kbb), zemp, ssh(:,:,Kaa) ) 
     
    225226      INTEGER  :: ios                                ! Local integer output status for namelist read 
    226227      INTEGER  :: ji, jj, jk 
    227       REAL(wp) :: zcoef 
    228       INTEGER  :: nkrnf_max 
    229       REAL(wp) :: hrnf_max 
    230228      !! 
    231229      CHARACTER(len=100)            ::  cn_dir        !   Root directory for location of core files 
     
    237235      TYPE(FLD_N) :: sn_div  ! informations about the fields to be read 
    238236      !! 
    239       NAMELIST/namdta_dyn/cn_dir, ln_dynrnf, ln_dynrnf_depth,  fwbcorr, & 
     237      NAMELIST/namdta_dyn/cn_dir, ln_dynrnf, ln_dynrnf_depth, & 
    240238         &                sn_uwd, sn_vwd, sn_wwd, sn_emp,               & 
    241239         &                sn_avt, sn_tem, sn_sal, sn_mld , sn_qsr ,     & 
     
    259257         WRITE(numout,*) '      runoffs option enabled (T) or not (F)            ln_dynrnf        = ', ln_dynrnf 
    260258         WRITE(numout,*) '      runoffs is spread in vertical                    ln_dynrnf_depth  = ', ln_dynrnf_depth 
    261          WRITE(numout,*) '      annual global mean of empmr for ssh correction   fwbcorr          = ', fwbcorr 
    262259         WRITE(numout,*) 
    263260      ENDIF 
     
    355352        DO jk = 1, jpkm1 
    356353           e3t(:,:,jk,Kmm) = e3t_0(:,:,jk) * ( 1._wp + ssh(:,:,Kmm) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
     354           e3t(:,:,jk,Kbb) = e3t_0(:,:,jk) * ( 1._wp + ssh(:,:,Kbb) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
    357355        ENDDO 
    358         e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk) 
    359  
    360         ! Horizontal scale factor interpolations 
    361         ! -------------------------------------- 
    362         CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm), 'U' ) 
    363         CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm), 'V' ) 
    364  
    365         ! Vertical scale factor interpolations 
    366         ! ------------------------------------ 
    367         CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w(:,:,:,Kmm), 'W' ) 
    368 !!gm this should be computed from ssh(Kbb)   
    369         e3t(:,:,:,Kbb)  = e3t(:,:,:,Kmm) 
    370         e3u(:,:,:,Kbb)  = e3u(:,:,:,Kmm) 
    371         e3v(:,:,:,Kbb)  = e3v(:,:,:,Kmm) 
    372  
    373         ! t- and w- points depth 
    374         ! ---------------------- 
    375         gdept(:,:,1,Kmm) = 0.5_wp * e3w(:,:,1,Kmm) 
    376         gdepw(:,:,1,Kmm) = 0.0_wp 
    377  
    378         DO_3D( 1, 1, 1, 1, 2, jpk ) 
    379           !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere 
    380           !    tmask = wmask, ie everywhere expect at jk = mikt 
    381                                                              ! 1 for jk = 
    382                                                              ! mikt 
    383            zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 
    384            gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) 
    385            gdept(ji,jj,jk,Kmm) =      zcoef  * ( gdepw(ji,jj,jk  ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm))  & 
    386                &                + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm)) 
    387         END_3D 
    388  
    389         gdept(:,:,:,Kbb) = gdept(:,:,:,Kmm) 
    390         gdepw(:,:,:,Kbb) = gdepw(:,:,:,Kmm) 
    391         ! 
     356 
     357        CALL dta_dyn_sf_interp( nit000, Kmm ) 
     358        CALL dta_dyn_sf_interp( nit000, Kbb ) 
    392359#endif 
    393360      ENDIF 
    394361      ! 
     362      CALL dta_dyn_rnf_init( Kmm ) 
     363      ! 
     364      CALL dta_dyn( nit000, Kbb, Kmm, Kaa ) 
     365      ! 
     366   END SUBROUTINE dta_dyn_init 
     367 
     368   SUBROUTINE dta_dyn_atf( kt, Kbb, Kmm, Kaa ) 
     369     !!--------------------------------------------------------------------- 
     370      !!                    ***  ROUTINE dta_dyn_swp  *** 
     371      !! 
     372      !! ** Purpose :   Asselin time filter of now SSH 
     373      !!--------------------------------------------------------------------- 
     374      INTEGER, INTENT(in) :: kt             ! time step 
     375      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa  ! ocean time level indices 
     376      ! 
     377      !!--------------------------------------------------------------------- 
     378 
     379      IF( kt == nit000 ) THEN 
     380         IF(lwp) WRITE(numout,*) 
     381         IF(lwp) WRITE(numout,*) 'dta_dyn_atf : Asselin time filter of sea surface height' 
     382         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ ' 
     383      ENDIF 
     384 
     385      ssh(:,:,Kmm) = ssh(:,:,Kmm) + rn_atfp * ( ssh(:,:,Kbb) - 2 * ssh(:,:,Kmm) + ssh(:,:,Kaa))   
     386 
     387      ! 
     388   END SUBROUTINE dta_dyn_atf 
     389    
     390    
     391#if ! defined key_qco   
     392 
     393   SUBROUTINE dta_dyn_sf_interp( kt, Kmm ) 
     394      !!--------------------------------------------------------------------- 
     395      !!                    ***  ROUTINE dta_dyn_sf_interp  *** 
     396      !! 
     397      !! ** Purpose :   Calculate scale factors at U/V/W points and depths 
     398      !!                given the after e3t field 
     399      !!--------------------------------------------------------------------- 
     400      INTEGER, INTENT(in) :: kt   ! time step 
     401      INTEGER, INTENT(in) :: Kmm  ! ocean time level indices 
     402      ! 
     403      INTEGER             :: ji, jj, jk 
     404      REAL(wp)            :: zcoef 
     405      !!--------------------------------------------------------------------- 
     406 
     407      ! Horizontal scale factor interpolations 
     408      ! -------------------------------------- 
     409      CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm), 'U' ) 
     410      CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm), 'V' ) 
     411 
     412      ! Vertical scale factor interpolations 
     413      ! ------------------------------------ 
     414      CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w (:,:,:,Kmm), 'W' ) 
     415 
     416      ! t- and w- points depth 
     417      ! ---------------------- 
     418      gdept(:,:,1,Kmm) = 0.5_wp * e3w(:,:,1,Kmm) 
     419      gdepw(:,:,1,Kmm) = 0.0_wp 
     420      ! 
     421      DO_3D( 1, 1, 1, 1, 2, jpk ) 
     422         zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 
     423         gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) 
     424         gdept(ji,jj,jk,Kmm) =      zcoef  * ( gdepw(ji,jj,jk  ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm))  & 
     425            &                + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm)) 
     426      END_3D 
     427      ! 
     428   END SUBROUTINE dta_dyn_sf_interp 
     429 
     430#endif 
     431 
     432   SUBROUTINE dta_dyn_ssh( kt, phdivtr, psshb,  pemp, pssha, pe3ta ) 
     433      !!---------------------------------------------------------------------- 
     434      !!                ***  ROUTINE dta_dyn_wzv  *** 
     435      !!                    
     436      !! ** Purpose :   compute the after ssh (ssh(:,:,Kaa)) and the now vertical velocity 
     437      !! 
     438      !! ** Method  : Using the incompressibility hypothesis,  
     439      !!        - the ssh increment is computed by integrating the horizontal divergence  
     440      !!          and multiply by the time step. 
     441      !! 
     442      !!        - compute the after scale factor : repartition of ssh INCREMENT proportionnaly 
     443      !!                                           to the level thickness ( z-star case ) 
     444      !! 
     445      !!        - the vertical velocity is computed by integrating the horizontal divergence   
     446      !!          from the bottom to the surface minus the scale factor evolution. 
     447      !!          The boundary conditions are w=0 at the bottom (no flux) 
     448      !! 
     449      !! ** action  :   ssh(:,:,Kaa) / e3t(:,:,k,Kaa) / ww 
     450      !! 
     451      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
     452      !!---------------------------------------------------------------------- 
     453      INTEGER,                                   INTENT(in )    :: kt        !  time-step 
     454      REAL(wp), DIMENSION(jpi,jpj,jpk)          , INTENT(in )   :: phdivtr   ! horizontal divergence transport 
     455      REAL(wp), DIMENSION(jpi,jpj)    , OPTIONAL, INTENT(in )   :: psshb     ! now ssh 
     456      REAL(wp), DIMENSION(jpi,jpj)    , OPTIONAL, INTENT(in )   :: pemp      ! evaporation minus precipitation 
     457      REAL(wp), DIMENSION(jpi,jpj)    , OPTIONAL, INTENT(inout) :: pssha     ! after ssh 
     458      REAL(wp), DIMENSION(jpi,jpj,jpk), OPTIONAL, INTENT(out)   :: pe3ta     ! after vertical scale factor 
     459      ! 
     460      INTEGER                       :: jk 
     461      REAL(wp), DIMENSION(jpi,jpj)  :: zhdiv   
     462      REAL(wp)  :: z2dt   
     463      !!---------------------------------------------------------------------- 
     464      ! 
     465      z2dt = 2._wp * rn_Dt 
     466      ! 
     467      zhdiv(:,:) = 0._wp 
     468      DO jk = 1, jpkm1 
     469         zhdiv(:,:) = zhdiv(:,:) +  phdivtr(:,:,jk) * tmask(:,:,jk) 
     470      END DO 
     471      !                                                ! Sea surface  elevation time-stepping 
     472      pssha(:,:) = ( psshb(:,:) - z2dt * ( r1_rho0 * pemp(:,:)  + zhdiv(:,:) ) ) * ssmask(:,:) 
     473      ! 
     474      IF( PRESENT( pe3ta ) ) THEN                      ! After acale factors at t-points ( z_star coordinate ) 
     475      DO jk = 1, jpkm1 
     476            pe3ta(:,:,jk) = e3t_0(:,:,jk) * ( 1._wp + pssha(:,:) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
     477      END DO 
     478      ENDIF 
     479      ! 
     480   END SUBROUTINE dta_dyn_ssh 
     481 
     482   SUBROUTINE dta_dyn_rnf_init( Kmm ) 
     483      !!---------------------------------------------------------------------- 
     484      !!                  ***  ROUTINE dta_dyn_rnf_init  *** 
     485      !! 
     486      !! ** Purpose :   Initialisation of the runoffs if (ln_rnf=T) 
     487      !! 
     488      !!---------------------------------------------------------------------- 
     489      INTEGER, INTENT(in) :: Kmm  ! ocean time level indices 
     490      ! 
     491      INTEGER  :: inum                   ! local integer 
     492      INTEGER  :: ji, jj, jk 
     493      REAL(wp) :: zcoef 
     494      INTEGER  :: nkrnf_max 
     495      REAL(wp) :: hrnf_max 
     496 
    395497      IF( ln_dynrnf .AND. ln_dynrnf_depth ) THEN       ! read depht over which runoffs are distributed 
    396498         IF(lwp) WRITE(numout,*)  
     
    435537      IF(lwp) WRITE(numout,*) ' ' 
    436538      ! 
    437       CALL dta_dyn( nit000, Kbb, Kmm, Kaa ) 
    438       ! 
    439    END SUBROUTINE dta_dyn_init 
    440  
    441     
    442    SUBROUTINE dta_dyn_sed( kt, Kmm ) 
    443       !!---------------------------------------------------------------------- 
    444       !!                  ***  ROUTINE dta_dyn  *** 
    445       !! 
    446       !! ** Purpose :  Prepares dynamics and physics fields from a NEMO run 
    447       !!               for an off-line simulation of passive tracers 
    448       !! 
    449       !! ** Method : calculates the position of data 
    450       !!             - computes slopes if needed 
    451       !!             - interpolates data if needed 
    452       !!---------------------------------------------------------------------- 
    453       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    454       INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    455       ! 
    456       !!---------------------------------------------------------------------- 
    457       ! 
    458       IF( ln_timing )   CALL timing_start( 'dta_dyn_sed') 
    459       ! 
    460       nsecdyn = nsec_year + nsec1jan000   ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 
    461       ! 
    462       IF( kt == nit000 ) THEN    ;    nprevrec = 0 
    463       ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) 
    464       ENDIF 
    465       CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==! 
    466       ! 
    467       ts(:,:,:,jp_tem,Kmm) = sf_dyn(jf_tem)%fnow(:,:,:)  * tmask(:,:,:)    ! temperature 
    468       ts(:,:,:,jp_sal,Kmm) = sf_dyn(jf_sal)%fnow(:,:,:)  * tmask(:,:,:)    ! salinity 
    469       ! 
    470       CALL eos    ( ts(:,:,:,:,Kmm), rhd, rhop, gdept_0(:,:,:) ) ! In any case, we need rhop 
    471  
    472       IF(sn_cfctl%l_prtctl) THEN                     ! print control 
    473          CALL prt_ctl(tab3d_1=ts(:,:,:,jp_tem,Kmm), clinfo1=' tn      - : ', mask1=tmask,  kdim=jpk   ) 
    474          CALL prt_ctl(tab3d_1=ts(:,:,:,jp_sal,Kmm), clinfo1=' sn      - : ', mask1=tmask,  kdim=jpk   ) 
    475       ENDIF 
    476       ! 
    477       IF( ln_timing )   CALL timing_stop( 'dta_dyn_sed') 
    478       ! 
    479    END SUBROUTINE dta_dyn_sed 
    480  
    481  
    482    SUBROUTINE dta_dyn_sed_init( Kmm ) 
    483       !!---------------------------------------------------------------------- 
    484       !!                  ***  ROUTINE dta_dyn_init  *** 
    485       !! 
    486       !! ** Purpose :   Initialisation of the dynamical data 
    487       !! ** Method  : - read the data namdta_dyn namelist 
    488       !!---------------------------------------------------------------------- 
    489       INTEGER, INTENT( in ) :: Kmm                   ! ocean time level index 
    490       ! 
    491       INTEGER  :: ierr, ierr0, ierr1, ierr2, ierr3   ! return error code 
    492       INTEGER  :: ifpr                               ! dummy loop indice 
    493       INTEGER  :: jfld                               ! dummy loop arguments 
    494       INTEGER  :: inum, idv, idimv                   ! local integer 
    495       INTEGER  :: ios                                ! Local integer output status for namelist read 
    496       !! 
    497       CHARACTER(len=100)            ::  cn_dir        !   Root directory for location of core files 
    498       TYPE(FLD_N), DIMENSION(2) ::  slf_d         ! array of namelist informations on the fields to read 
    499       TYPE(FLD_N) :: sn_tem , sn_sal   !   "                 " 
    500       !! 
    501       NAMELIST/namdta_dyn/cn_dir, ln_dynrnf, ln_dynrnf_depth,  fwbcorr, & 
    502          &                sn_tem, sn_sal 
    503       !!---------------------------------------------------------------------- 
    504       ! 
    505       READ  ( numnam_ref, namdta_dyn, IOSTAT = ios, ERR = 901) 
    506 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdta_dyn in reference namelist' ) 
    507       READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 ) 
    508 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist' ) 
    509       IF(lwm) WRITE ( numond, namdta_dyn ) 
    510       !                                         ! store namelist information in an array 
    511       !                                         ! Control print 
    512       IF(lwp) THEN 
    513          WRITE(numout,*) 
    514          WRITE(numout,*) 'dta_dyn : offline dynamics ' 
    515          WRITE(numout,*) '~~~~~~~ ' 
    516          WRITE(numout,*) '   Namelist namdta_dyn' 
    517          WRITE(numout,*) '      runoffs option enabled (T) or not (F)            ln_dynrnf        = ', ln_dynrnf 
    518          WRITE(numout,*) '      runoffs is spread in vertical                    ln_dynrnf_depth  = ', ln_dynrnf_depth 
    519          WRITE(numout,*) '      annual global mean of empmr for ssh correction   fwbcorr          = ', fwbcorr 
    520          WRITE(numout,*) 
    521       ENDIF 
    522       ! 
    523       jf_tem  = 1     ;   jf_sal  = 2    ;   jfld   = jf_sal 
    524       ! 
    525       slf_d(jf_tem)  = sn_tem    ;   slf_d(jf_sal)  = sn_sal 
    526       ! 
    527       ALLOCATE( sf_dyn(jfld), STAT=ierr )         ! set sf structure 
    528       IF( ierr > 0 )  THEN 
    529          CALL ctl_stop( 'dta_dyn: unable to allocate sf structure' )   ;   RETURN 
    530       ENDIF 
    531       !                                         ! fill sf with slf_i and control print 
    532       CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', 'namdta_dyn' ) 
    533       ! 
    534       ! Open file for each variable to get his number of dimension 
    535       DO ifpr = 1, jfld 
    536          CALL fld_def( sf_dyn(ifpr) ) 
    537          CALL iom_open( sf_dyn(ifpr)%clname, sf_dyn(ifpr)%num ) 
    538          idv   = iom_varid( sf_dyn(ifpr)%num , slf_d(ifpr)%clvar )        ! id of the variable sdjf%clvar 
    539          idimv = iom_file ( sf_dyn(ifpr)%num )%ndims(idv)                 ! number of dimension for variable sdjf%clvar 
    540          CALL iom_close( sf_dyn(ifpr)%num )                               ! close file if already open 
    541          ierr1=0 
    542          IF( idimv == 3 ) THEN    ! 2D variable 
    543                                       ALLOCATE( sf_dyn(ifpr)%fnow(jpi,jpj,1)    , STAT=ierr0 ) 
    544             IF( slf_d(ifpr)%ln_tint ) ALLOCATE( sf_dyn(ifpr)%fdta(jpi,jpj,1,2)  , STAT=ierr1 ) 
    545          ELSE                     ! 3D variable 
    546                                       ALLOCATE( sf_dyn(ifpr)%fnow(jpi,jpj,jpk)  , STAT=ierr0 ) 
    547             IF( slf_d(ifpr)%ln_tint ) ALLOCATE( sf_dyn(ifpr)%fdta(jpi,jpj,jpk,2), STAT=ierr1 ) 
    548          ENDIF 
    549          IF( ierr0 + ierr1 > 0 ) THEN 
    550             CALL ctl_stop( 'dta_dyn_init : unable to allocate sf_dyn array structure' )   ;   RETURN 
    551          ENDIF 
    552       END DO 
    553       ! 
    554       CALL dta_dyn_sed( nit000, Kmm ) 
    555       ! 
    556    END SUBROUTINE dta_dyn_sed_init 
    557  
    558     
    559    SUBROUTINE dta_dyn_atf( kt, Kbb, Kmm, Kaa ) 
    560      !!--------------------------------------------------------------------- 
    561       !!                    ***  ROUTINE dta_dyn_swp  *** 
    562       !! 
    563       !! ** Purpose :   Asselin time filter of now SSH 
    564       !!--------------------------------------------------------------------- 
    565       INTEGER, INTENT(in) :: kt             ! time step 
    566       INTEGER, INTENT(in) :: Kbb, Kmm, Kaa  ! ocean time level indices 
    567       ! 
    568       !!--------------------------------------------------------------------- 
    569  
    570       IF( kt == nit000 ) THEN 
    571          IF(lwp) WRITE(numout,*) 
    572          IF(lwp) WRITE(numout,*) 'dta_dyn_atf : Asselin time filter of sea surface height' 
    573          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ ' 
    574       ENDIF 
    575  
    576       ssh(:,:,Kmm) = ssh(:,:,Kmm) + rn_atfp * ( ssh(:,:,Kbb) - 2 * ssh(:,:,Kmm) + ssh(:,:,Kaa))   
    577  
    578       !! Do we also need to time filter e3t?? 
    579       ! 
    580    END SUBROUTINE dta_dyn_atf 
    581     
    582     
    583 #if ! defined key_qco     
    584    SUBROUTINE dta_dyn_sf_interp( kt, Kmm ) 
    585       !!--------------------------------------------------------------------- 
    586       !!                    ***  ROUTINE dta_dyn_sf_interp  *** 
    587       !! 
    588       !! ** Purpose :   Calculate scale factors at U/V/W points and depths 
    589       !!                given the after e3t field 
    590       !!--------------------------------------------------------------------- 
    591       INTEGER, INTENT(in) :: kt   ! time step 
    592       INTEGER, INTENT(in) :: Kmm  ! ocean time level indices 
    593       ! 
    594       INTEGER             :: ji, jj, jk 
    595       REAL(wp)            :: zcoef 
    596       !!--------------------------------------------------------------------- 
    597  
    598       ! Horizontal scale factor interpolations 
    599       ! -------------------------------------- 
    600       CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm), 'U' ) 
    601       CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm), 'V' ) 
    602  
    603       ! Vertical scale factor interpolations 
    604       ! ------------------------------------ 
    605       CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w (:,:,:,Kmm), 'W' ) 
    606  
    607       ! t- and w- points depth 
    608       ! ---------------------- 
    609       gdept(:,:,1,Kmm) = 0.5_wp * e3w(:,:,1,Kmm) 
    610       gdepw(:,:,1,Kmm) = 0.0_wp 
    611       ! 
    612       DO_3D( 1, 1, 1, 1, 2, jpk ) 
    613          zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 
    614          gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) 
    615          gdept(ji,jj,jk,Kmm) =      zcoef  * ( gdepw(ji,jj,jk  ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm))  & 
    616             &                + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm)) 
    617       END_3D 
    618       ! 
    619    END SUBROUTINE dta_dyn_sf_interp 
    620 #endif 
    621  
    622  
    623    SUBROUTINE dta_dyn_ssh( kt, phdivtr, psshb,  pemp, pssha, pe3ta ) 
    624       !!---------------------------------------------------------------------- 
    625       !!                ***  ROUTINE dta_dyn_wzv  *** 
    626       !!                    
    627       !! ** Purpose :   compute the after ssh (ssh(:,:,Kaa)) and the now vertical velocity 
    628       !! 
    629       !! ** Method  : Using the incompressibility hypothesis,  
    630       !!        - the ssh increment is computed by integrating the horizontal divergence  
    631       !!          and multiply by the time step. 
    632       !! 
    633       !!        - compute the after scale factor : repartition of ssh INCREMENT proportionnaly 
    634       !!                                           to the level thickness ( z-star case ) 
    635       !! 
    636       !!        - the vertical velocity is computed by integrating the horizontal divergence   
    637       !!          from the bottom to the surface minus the scale factor evolution. 
    638       !!          The boundary conditions are w=0 at the bottom (no flux) 
    639       !! 
    640       !! ** action  :   ssh(:,:,Kaa) / e3t(:,:,k,Kaa) / ww 
    641       !! 
    642       !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
    643       !!---------------------------------------------------------------------- 
    644       INTEGER,                                   INTENT(in )    :: kt        !  time-step 
    645       REAL(wp), DIMENSION(jpi,jpj,jpk)          , INTENT(in )   :: phdivtr   ! horizontal divergence transport 
    646       REAL(wp), DIMENSION(jpi,jpj)    , OPTIONAL, INTENT(in )   :: psshb     ! now ssh 
    647       REAL(wp), DIMENSION(jpi,jpj)    , OPTIONAL, INTENT(in )   :: pemp      ! evaporation minus precipitation 
    648       REAL(wp), DIMENSION(jpi,jpj)    , OPTIONAL, INTENT(inout) :: pssha     ! after ssh 
    649       REAL(wp), DIMENSION(jpi,jpj,jpk), OPTIONAL, INTENT(out)   :: pe3ta     ! after vertical scale factor 
    650       ! 
    651       INTEGER                       :: jk 
    652       REAL(wp), DIMENSION(jpi,jpj)  :: zhdiv   
    653       REAL(wp)  :: z2dt   
    654       !!---------------------------------------------------------------------- 
    655       ! 
    656       z2dt = 2._wp * rn_Dt 
    657       ! 
    658       zhdiv(:,:) = 0._wp 
    659       DO jk = 1, jpkm1 
    660          zhdiv(:,:) = zhdiv(:,:) +  phdivtr(:,:,jk) * tmask(:,:,jk) 
    661       END DO 
    662       !                                                ! Sea surface  elevation time-stepping 
    663       pssha(:,:) = ( psshb(:,:) - z2dt * ( r1_rho0 * pemp(:,:)  + zhdiv(:,:) ) ) * ssmask(:,:) 
    664       ! 
    665       IF( PRESENT( pe3ta ) ) THEN                      ! After acale factors at t-points ( z_star coordinate ) 
    666       DO jk = 1, jpkm1 
    667             pe3ta(:,:,jk) = e3t_0(:,:,jk) * ( 1._wp + pssha(:,:) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
    668       END DO 
    669       ENDIF 
    670       ! 
    671    END SUBROUTINE dta_dyn_ssh 
    672  
    673  
    674    SUBROUTINE dta_dyn_hrnf( Kmm ) 
    675       !!---------------------------------------------------------------------- 
    676       !!                  ***  ROUTINE sbc_rnf  *** 
     539   END SUBROUTINE dta_dyn_rnf_init 
     540 
     541   SUBROUTINE dta_dyn_rnf( Kmm ) 
     542      !!---------------------------------------------------------------------- 
     543      !!                  ***  ROUTINE dta_dyn_rnf  *** 
    677544      !! 
    678545      !! ** Purpose :   update the horizontal divergence with the runoff inflow 
    679546      !! 
    680       !! ** Method  : 
    681       !!                CAUTION : rnf is positive (inflow) decreasing the 
    682       !!                          divergence and expressed in m/s 
    683       !! 
    684       !! ** Action  :   phdivn   decreased by the runoff inflow 
    685547      !!---------------------------------------------------------------------- 
    686548      !! 
     
    697559      END_2D 
    698560      ! 
    699    END SUBROUTINE dta_dyn_hrnf 
    700  
    701  
     561   END SUBROUTINE dta_dyn_rnf 
    702562 
    703563   SUBROUTINE dta_dyn_slp( kt, Kbb, Kmm ) 
     
    790650   END SUBROUTINE dta_dyn_slp 
    791651 
    792  
    793652   SUBROUTINE compute_slopes( kt, pts, puslp, pvslp, pwslpi, pwslpj, Kbb, Kmm ) 
    794653      !!--------------------------------------------------------------------- 
     
    835694   END SUBROUTINE compute_slopes 
    836695 
     696#if defined key_sed_off 
     697 
     698   SUBROUTINE dta_dyn_sed( kt, Kmm ) 
     699      !!---------------------------------------------------------------------- 
     700      !!                  ***  ROUTINE dta_dyn  *** 
     701      !! 
     702      !! ** Purpose :  Prepares dynamics and physics fields from a NEMO run 
     703      !!               for an off-line simulation of passive tracers 
     704      !! 
     705      !! ** Method : calculates the position of data 
     706      !!             - computes slopes if needed 
     707      !!             - interpolates data if needed 
     708      !!---------------------------------------------------------------------- 
     709      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     710      INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
     711      ! 
     712      !!---------------------------------------------------------------------- 
     713      ! 
     714      IF( ln_timing )   CALL timing_start( 'dta_dyn_sed') 
     715      ! 
     716      nsecdyn = nsec_year + nsec1jan000   ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 
     717      ! 
     718      IF( kt == nit000 ) THEN    ;    nprevrec = 0 
     719      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) 
     720      ENDIF 
     721      CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==! 
     722      ! 
     723      ts(:,:,:,jp_tem,Kmm) = sf_dyn(jf_tem)%fnow(:,:,:)  * tmask(:,:,:)    ! temperature 
     724      ts(:,:,:,jp_sal,Kmm) = sf_dyn(jf_sal)%fnow(:,:,:)  * tmask(:,:,:)    ! salinity 
     725      ! 
     726      CALL eos    ( ts(:,:,:,:,Kmm), rhd, rhop, gdept_0(:,:,:) ) ! In any case, we need rhop 
     727 
     728      IF(sn_cfctl%l_prtctl) THEN                     ! print control 
     729         CALL prt_ctl(tab3d_1=ts(:,:,:,jp_tem,Kmm), clinfo1=' tn      - : ', mask1=tmask,  kdim=jpk   ) 
     730         CALL prt_ctl(tab3d_1=ts(:,:,:,jp_sal,Kmm), clinfo1=' sn      - : ', mask1=tmask,  kdim=jpk   ) 
     731      ENDIF 
     732      ! 
     733      IF( ln_timing )   CALL timing_stop( 'dta_dyn_sed') 
     734      ! 
     735   END SUBROUTINE dta_dyn_sed 
     736 
     737 
     738   SUBROUTINE dta_dyn_sed_init( Kmm ) 
     739      !!---------------------------------------------------------------------- 
     740      !!                  ***  ROUTINE dta_dyn_init  *** 
     741      !! 
     742      !! ** Purpose :   Initialisation of the dynamical data 
     743      !! ** Method  : - read the data namdta_dyn namelist 
     744      !!---------------------------------------------------------------------- 
     745      INTEGER, INTENT( in ) :: Kmm                   ! ocean time level index 
     746      ! 
     747      INTEGER  :: ierr, ierr0, ierr1, ierr2, ierr3   ! return error code 
     748      INTEGER  :: ifpr                               ! dummy loop indice 
     749      INTEGER  :: jfld                               ! dummy loop arguments 
     750      INTEGER  :: inum, idv, idimv                   ! local integer 
     751      INTEGER  :: ios                                ! Local integer output status for namelist read 
     752      !! 
     753      CHARACTER(len=100)            ::  cn_dir        !   Root directory for location of core files 
     754      TYPE(FLD_N), DIMENSION(2) ::  slf_d         ! array of namelist informations on the fields to read 
     755      TYPE(FLD_N) :: sn_tem , sn_sal   !   "                 " 
     756      !! 
     757      NAMELIST/namdta_dyn/cn_dir, ln_dynrnf, ln_dynrnf_depth,  & 
     758         &                sn_tem, sn_sal 
     759      !!---------------------------------------------------------------------- 
     760      ! 
     761      READ  ( numnam_ref, namdta_dyn, IOSTAT = ios, ERR = 901) 
     762901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdta_dyn in reference namelist' ) 
     763      READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 ) 
     764902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist' ) 
     765      IF(lwm) WRITE ( numond, namdta_dyn ) 
     766      !                                         ! store namelist information in an array 
     767      !                                         ! Control print 
     768      IF(lwp) THEN 
     769         WRITE(numout,*) 
     770         WRITE(numout,*) 'dta_dyn : offline dynamics ' 
     771         WRITE(numout,*) '~~~~~~~ ' 
     772         WRITE(numout,*) '   Namelist namdta_dyn' 
     773         WRITE(numout,*) '      runoffs option enabled (T) or not (F)            ln_dynrnf        = ', ln_dynrnf 
     774         WRITE(numout,*) '      runoffs is spread in vertical                    ln_dynrnf_depth  = ', ln_dynrnf_depth 
     775         WRITE(numout,*) 
     776      ENDIF 
     777      ! 
     778      jf_tem  = 1     ;   jf_sal  = 2    ;   jfld   = jf_sal 
     779      ! 
     780      slf_d(jf_tem)  = sn_tem    ;   slf_d(jf_sal)  = sn_sal 
     781      ! 
     782      ALLOCATE( sf_dyn(jfld), STAT=ierr )         ! set sf structure 
     783      IF( ierr > 0 )  THEN 
     784         CALL ctl_stop( 'dta_dyn: unable to allocate sf structure' )   ;   RETURN 
     785      ENDIF 
     786      !                                         ! fill sf with slf_i and control print 
     787      CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', 'namdta_dyn' ) 
     788      ! 
     789      ! Open file for each variable to get his number of dimension 
     790      DO ifpr = 1, jfld 
     791         CALL fld_def( sf_dyn(ifpr) ) 
     792         CALL iom_open( sf_dyn(ifpr)%clname, sf_dyn(ifpr)%num ) 
     793         idv   = iom_varid( sf_dyn(ifpr)%num , slf_d(ifpr)%clvar )        ! id of the variable sdjf%clvar 
     794         idimv = iom_file ( sf_dyn(ifpr)%num )%ndims(idv)                 ! number of dimension for variable sdjf%clvar 
     795         CALL iom_close( sf_dyn(ifpr)%num )                               ! close file if already open 
     796         ierr1=0 
     797         IF( idimv == 3 ) THEN    ! 2D variable 
     798                                      ALLOCATE( sf_dyn(ifpr)%fnow(jpi,jpj,1)    , STAT=ierr0 ) 
     799            IF( slf_d(ifpr)%ln_tint ) ALLOCATE( sf_dyn(ifpr)%fdta(jpi,jpj,1,2)  , STAT=ierr1 ) 
     800         ELSE                     ! 3D variable 
     801                                      ALLOCATE( sf_dyn(ifpr)%fnow(jpi,jpj,jpk)  , STAT=ierr0 ) 
     802            IF( slf_d(ifpr)%ln_tint ) ALLOCATE( sf_dyn(ifpr)%fdta(jpi,jpj,jpk,2), STAT=ierr1 ) 
     803         ENDIF 
     804         IF( ierr0 + ierr1 > 0 ) THEN 
     805            CALL ctl_stop( 'dta_dyn_init : unable to allocate sf_dyn array structure' )   ;   RETURN 
     806         ENDIF 
     807      END DO 
     808      ! 
     809      CALL dta_dyn_sed( nit000, Kmm ) 
     810      ! 
     811   END SUBROUTINE dta_dyn_sed_init 
     812#endif 
    837813   !!====================================================================== 
    838814END MODULE dtadyn 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/OFF/nemogcm.F90

    r14229 r14328  
    5757   USE mppini         ! shared/distributed memory setting (mpp_init routine) 
    5858   USE lib_mpp        ! distributed memory computing 
    59 #if defined key_iomput 
     59#if defined key_xios 
    6060   USE xios           ! xIOserver 
    6161#endif  
     
    138138         IF( istp /= nit000 )   CALL day        ( istp )         ! Calendar (day was already called at nit000 in day_init) 
    139139                                CALL iom_setkt  ( istp - nit000 + 1, cxios_context )   ! say to iom that we are at time step kstp 
    140 #if defined key_sed_off 
    141                                 CALL dta_dyn_sed( istp,      Nnn      )       ! Interpolation of the dynamical fields 
    142 #else 
     140#if ! defined key_sed_off 
    143141                                CALL dta_dyn    ( istp, Nbb, Nnn, Naa )       ! Interpolation of the dynamical fields 
    144 #endif 
    145 #if ! defined key_sed_off 
    146142         IF( .NOT.ln_linssh ) THEN 
    147143                                CALL dta_dyn_atf( istp, Nbb, Nnn, Naa )       ! time filter of sea  surface height and vertical scale factors 
     
    151147         ENDIF 
    152148                                CALL trc_stp    ( istp, Nbb, Nnn, Nrhs, Naa ) ! time-stepping 
    153 # if defined key_qco 
    154                                 !r3t(:,:,Nnn) = r3t_f(:,:)                     ! update ssh to h0 ratio 
    155                                 !r3u(:,:,Nnn) = r3u_f(:,:) 
    156                                 !r3v(:,:,Nnn) = r3v_f(:,:) 
    157 # endif 
    158 #endif 
    159149         ! Swap time levels 
    160150         Nrhs = Nbb 
    161          Nbb = Nnn 
    162          Nnn = Naa 
    163          Naa = Nrhs 
     151         Nbb  = Nnn 
     152         Nnn  = Naa 
     153         Naa  = Nrhs 
    164154         ! 
    165155#if ! defined key_qco 
    166 # if ! defined key_sed_off 
    167156         IF( .NOT.ln_linssh )   CALL dta_dyn_sf_interp( istp, Nnn )  ! calculate now grid parameters 
    168 # endif 
    169 #endif          
     157#endif   
     158 
     159#else 
     160                                CALL dta_dyn_sed( istp,      Nnn      )       ! Interpolation of the dynamical fields 
     161 
     162#endif 
    170163         CALL stp_ctl    ( istp )             ! Time loop: control and print 
    171164         istp = istp + 1 
     
    175168      END DO 
    176169      ! 
    177 #if defined key_iomput 
     170#if defined key_xios 
    178171      CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 
    179172#endif 
     
    194187      CALL nemo_closefile 
    195188      ! 
    196 #if defined key_iomput 
     189#if defined key_xios 
    197190                     CALL xios_finalize   ! end mpp communications with xios 
    198191#else 
     
    230223      !                             !-------------------------------------------------! 
    231224      ! 
    232 #if defined key_iomput 
     225#if defined key_xios 
    233226      CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
    234227      CALL mpp_start( ilocal_comm ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SAO/nemogcm.F90

    r14227 r14328  
    3535   USE lbcnfd  , ONLY : isendto, nsndto ! Setup of north fold exchanges  
    3636   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    37 #if defined key_iomput 
     37#if defined key_xios 
    3838   USE xios           ! xIOserver 
    3939#endif 
     
    107107      !                             !-------------------------------------------------! 
    108108      ! 
    109 #if defined key_iomput 
     109#if defined key_xios 
    110110      IF( Agrif_Root() ) THEN 
    111111         IF( lk_oasis ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SAS/diawri.F90

    r12933 r14328  
    5252   PUBLIC   dia_wri_state 
    5353   PUBLIC   dia_wri_alloc           ! Called by nemogcm module 
    54 #if ! defined key_iomput    
     54#if ! defined key_xios    
    5555   PUBLIC   dia_wri_alloc_abl       ! Called by sbcabl  module (if ln_abl = .true.) 
    5656#endif 
     
    7171CONTAINS 
    7272 
    73 # if defined key_iomput 
    74    !!---------------------------------------------------------------------- 
    75    !!   'key_iomput'                                        use IOM library 
     73# if defined key_xios 
     74   !!---------------------------------------------------------------------- 
     75   !!   'key_xios'                                        use IOM library 
    7676   !!---------------------------------------------------------------------- 
    7777   INTEGER FUNCTION dia_wri_alloc() 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SAS/nemogcm.F90

    r14229 r14328  
    4242   USE lbcnfd  , ONLY : isendto, nsndto ! Setup of north fold exchanges 
    4343   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    44 #if defined key_iomput 
     44#if defined key_xios 
    4545   USE xios           ! xIOserver 
    4646#endif 
     
    185185      CALL nemo_closefile 
    186186      ! 
    187 #if defined key_iomput 
     187#if defined key_xios 
    188188                                    CALL xios_finalize  ! end mpp communications with xios 
    189189      IF( lk_oasis     )            CALL cpl_finalize   ! end coupling and mpp communications with OASIS 
     
    228228      !                             !-------------------------------------------------! 
    229229      ! 
    230 #if defined key_iomput 
     230#if defined key_xios 
    231231      IF( Agrif_Root() ) THEN 
    232232         IF( lk_oasis ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SAS/step.F90

    r14227 r14328  
    3232   USE lbclnk           ! 
    3333   USE timing           ! Timing             
    34 #if defined key_iomput 
     34#if defined key_xios 
    3535   USE xios 
    3636#endif 
     
    8484      ENDIF 
    8585      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    86 # if defined key_iomput 
     86# if defined key_xios 
    8787      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    8888# endif    
     
    156156      IF( lk_oasis .AND. nstop == 0 ) CALL sbc_cpl_snd( kstp, Nbb, Nnn )       ! coupled mode : field exchanges if OASIS-coupled ice 
    157157 
    158 #if defined key_iomput 
     158#if defined key_xios 
    159159      IF( kstp == nitrst ) THEN 
    160160         IF(.NOT.lwxios) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SAS/stpctl.F90

    r13616 r14328  
    3434   PUBLIC stp_ctl           ! routine called by step.F90 
    3535 
    36    INTEGER                ::   nrunid   ! netcdf file id 
    37    INTEGER, DIMENSION(3)  ::   nvarid   ! netcdf variable id 
     36   INTEGER, PARAMETER         ::   jpvar = 3 
     37   INTEGER                    ::   nrunid   ! netcdf file id 
     38   INTEGER, DIMENSION(jpvar)  ::   nvarid   ! netcdf variable id 
    3839   !!---------------------------------------------------------------------- 
    3940   !! NEMO/SAS 4.0 , NEMO Consortium (2018) 
     
    4647      !!---------------------------------------------------------------------- 
    4748      !!                    ***  ROUTINE stp_ctl  *** 
    48       !!                      
     49      !! 
    4950      !! ** Purpose :   Control the run 
    5051      !! 
     
    6263      INTEGER, INTENT(in   ) ::   Kmm      ! ocean time level index 
    6364      !! 
     65      INTEGER, PARAMETER              ::   jptst = 3 
    6466      INTEGER                         ::   ji                                    ! dummy loop indices 
    6567      INTEGER                         ::   idtime, istatus 
    66       INTEGER , DIMENSION(4)          ::   iareasum, iareamin, iareamax 
    67       INTEGER , DIMENSION(3,3)        ::   iloc                                  ! min/max loc indices 
     68      INTEGER , DIMENSION(jptst)      ::   iareasum, iareamin, iareamax 
     69      INTEGER , DIMENSION(3,jptst)    ::   iloc                                  ! min/max loc indices 
    6870      REAL(wp)                        ::   zzz                                   ! local real  
    69       REAL(wp), DIMENSION(4)          ::   zmax, zmaxlocal 
     71      REAL(wp), DIMENSION(jpvar+1)    ::   zmax 
     72      REAL(wp), DIMENSION(jptst)      ::   zmaxlocal 
    7073      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    7174      LOGICAL, DIMENSION(jpi,jpj)     ::   llmsk 
     
    7578      ! 
    7679      ll_wrtstp  = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    77       ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1  
     80      ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1 
    7881      ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 
    7982      ! 
     
    107110            istatus = NF90_ENDDEF(nrunid) 
    108111         ENDIF 
    109          !     
     112         ! 
    110113      ENDIF 
    111114      ! 
     
    131134      zmax(2) = MAXVAL( ABS( u_ice(:,:) )    , mask = llmsk )                   ! max ice velocity (zonal only) 
    132135      zmax(3) = MAXVAL(     -tm_i (:,:) + rt0, mask = llmsk )                   ! min ice temperature (in degC) 
    133       zmax(4) = REAL( nstop, wp )                                               ! stop indicator 
     136      zmax(jpvar+1) = REAL( nstop, wp )                                         ! stop indicator 
    134137      ! 
    135138      !                                   !==               get global extrema             ==! 
    136139      !                                   !==  done by all processes if writting run.stat  ==! 
    137140      IF( ll_colruns ) THEN 
    138          zmaxlocal(:) = zmax(:) 
     141         zmaxlocal(:) = zmax(1:jptst) 
    139142         CALL mpp_max( "stpctl", zmax )          ! max over the global domain: ok even of ll_0oce = .true. 
    140          nstop = NINT( zmax(4) )                 ! update nstop indicator (now sheared among all local domains) 
     143         nstop = NINT( zmax(jpvar+1) )           ! update nstop indicator (now sheared among all local domains) 
    141144      ELSE 
    142145         ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
    143          IF( ll_0oce )   zmax(1:3) = 0._wp       ! default "valid" values... 
     146         IF( ll_0oce )   zmax(1:jptst) = 0._wp        ! default "valid" values... 
    144147      ENDIF 
    145148      ! 
     
    150153      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    151154      IF( ll_wrtruns ) THEN 
    152          WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 
    153          DO ji = 1, 3 
     155         WRITE(numrun,9500) kt, zmax(1:jptst) 
     156         DO ji = 1, jpvar 
    154157            istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 
    155158         END DO 
     
    159162      !                                   !==  done by all processes at every time step  ==! 
    160163      ! 
    161       IF(   zmax(1) >  100._wp .OR.   &                   ! too large ice thickness maximum ( > 100 m) 
    162          &  zmax(2) >   10._wp .OR.   &                   ! too large ice velocity ( > 10 m/s) 
    163          &  zmax(3) < -101._wp .OR.   &                   ! too cold ice temperature ( < -100 degC) 
    164          &  ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
    165          &  ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
     164      IF(   zmax(1) >  100._wp .OR.   &                       ! too large ice thickness maximum ( > 100 m) 
     165         &  zmax(2) >   10._wp .OR.   &                       ! too large ice velocity ( > 10 m/s) 
     166         &  zmax(3) < -101._wp .OR.   &                       ! too cold ice temperature ( < -100 degC) 
     167         & ISNAN( SUM(zmax(1:jptst)) ) .OR.   &               ! NaN encounter in the tests 
     168         & ABS(   SUM(zmax(1:jptst)) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
    166169         ! 
    167170         iloc(:,:) = 0 
     
    175178            ! find which subdomain has the max. 
    176179            iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
    177             DO ji = 1, 4 
     180            DO ji = 1, jptst 
    178181               IF( zmaxlocal(ji) == zmax(ji) ) THEN 
    179182                  iareamin(ji) = narea   ;   iareamax(ji) = narea   ;   iareasum(ji) = 1 
     
    188191            iloc(1:2,2) = MAXLOC( ABS( u_ice(:,:) )    , mask = llmsk ) 
    189192            iloc(1:2,3) = MINLOC(       tm_i(:,:) - rt0, mask = llmsk ) 
    190             DO ji = 1, 3   ! local domain indices ==> global domain indices, excluding halos 
     193            DO ji = 1, jptst   ! local domain indices ==> global domain indices, excluding halos 
    191194               iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 
    192195            END DO 
     
    206209         CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file 
    207210         ! 
    208          IF( ll_colruns .or. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
     211         IF( ll_colruns .OR. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    209212            IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    210213            ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     
    247250      !!---------------------------------------------------------------------- 
    248251      WRITE(clkt , '(i9)') kt 
    249        
     252 
    250253      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij  ,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
    251254      !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SWE/nemogcm.F90

    r14229 r14328  
    135135      CALL nemo_closefile 
    136136      ! 
    137 #if defined key_iomput 
     137#if defined key_xios 
    138138                       CALL xios_finalize  ! end mpp communications with xios 
    139139#else 
     
    170170      !                             !-------------------------------------------------! 
    171171      ! 
    172 #if defined key_iomput 
     172#if defined key_xios 
    173173      CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
    174174      CALL mpp_start( ilocal_comm ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SWE/stp_oce.F90

    r14137 r14328  
    9393   !                                                   (dyn_asm_inc routine) 
    9494   USE asmbkg          ! writing out state trajectory 
    95    USE stpctl          ! time stepping control            (stp_ctl_SWE routine) 
     95   USE stpctl          ! time stepping control            (stp_ctl routine) 
    9696   USE restart         ! ocean restart                    (rst_wri routine) 
    9797   USE prtctl          ! Print control                    (prt_ctl routine) 
     
    102102   USE timing          ! Timing 
    103103 
    104 #if defined key_iomput 
     104#if defined key_xios 
    105105   USE xios            ! I/O server 
    106106#endif 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SWE/stpmlf.F90

    r14137 r14328  
    222222      ! Control 
    223223      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    224                          CALL stp_ctl_SWE   ( kstp, Nnn ) 
     224                         CALL stp_ctl  ( kstp, Nnn ) 
    225225 
    226226      IF( kstp == nit000 ) THEN                          ! 1st time step only 
     
    231231 
    232232      ! 
    233 #if defined key_iomput 
     233#if defined key_xios 
    234234      IF( kstp == nitend .OR. indic < 0 ) THEN 
    235235!!st : cxios_context needed ? because opened earlier ???          
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/SWE/stprk3.F90

    r14179 r14328  
    319319      ! Control 
    320320      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    321                          CALL stp_ctl_SWE  ( kstp     , Nbb ) 
     321                         CALL stp_ctl      ( kstp     , Nbb ) 
    322322 
    323323      IF( kstp == nit000 ) THEN                          ! 1st time step only 
     
    328328 
    329329      ! 
    330 #if defined key_iomput 
     330#if defined key_xios 
    331331      IF( kstp == nitend .OR. indic < 0 ) THEN  
    332332         CALL iom_context_finalize( cxios_context ) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/AGE/trcwri_age.F90

    r12377 r14328  
    66   !! History :   1.0  !  2009-05 (C. Ethe)  Original code 
    77   !!---------------------------------------------------------------------- 
    8 #if defined key_top &&  defined key_iomput 
     8#if defined key_top &&  defined key_xios 
    99   !!---------------------------------------------------------------------- 
    1010   !! trc_wri_age   :  outputs of concentration fields 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/C14/trcwri_c14.F90

    r13295 r14328  
    77   !! History :   2.0  !  2015 (A. Mouchet)  adapted code for C14 
    88   !!---------------------------------------------------------------------- 
    9 #if defined key_top && defined key_iomput 
     9#if defined key_top && defined key_xios 
    1010   !!---------------------------------------------------------------------- 
    1111   !! trc_wri_c14   :  outputs of ventilation fields 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/CFC/trcwri_cfc.F90

    r12377 r14328  
    66   !! History :   1.0  !  2009-05 (C. Ethe)  Original code 
    77   !!---------------------------------------------------------------------- 
    8 #if defined key_top && defined key_iomput 
     8#if defined key_top && defined key_xios 
    99   !!---------------------------------------------------------------------- 
    1010   !! trc_wri_cfc   :  outputs of concentration fields 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/MY_TRC/trcwri_my_trc.F90

    r12377 r14328  
    44   !!     trc_wri_my_trc   :  outputs of concentration fields 
    55   !!====================================================================== 
    6 #if defined key_top && defined key_iomput 
     6#if defined key_top && defined key_xios 
    77   !!---------------------------------------------------------------------- 
    88   !! History :      !  2007  (C. Ethe, G. Madec)  Original code 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/PISCES/SED/sedrst.F90

    r14039 r14328  
    8484            CALL iom_open( TRIM(clpath)//TRIM(clname), numrsw, ldwrt = .TRUE., kdlev = jpksed, cdcomp = 'SED' ) 
    8585         ELSE 
    86 #if defined key_iomput 
     86#if defined key_xios 
    8787            cw_sedrst_cxt = "rstws_"//TRIM(ADJUSTL(clkt)) 
    8888            IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/PISCES/trcwri_pisces.F90

    r13295 r14328  
    66   !! History :   1.0  !  2009-05 (C. Ethe)  Original code 
    77   !!---------------------------------------------------------------------- 
    8 #if defined key_top && defined key_iomput  
     8#if defined key_top && defined key_xios  
    99   !!---------------------------------------------------------------------- 
    1010   !! trc_wri_pisces   :  outputs of concentration fields 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/README.rst

    r14229 r14328  
    6262Here below the list of preprocessing keys that applies to the TOP interface (beside ``key_top``): 
    6363 
    64 ``key_iomput`` 
     64``key_xios`` 
    6565   use XIOS I/O 
    6666 
     
    320320.. code-block:: perl 
    321321 
    322    bld::tool::fppkeys key_iomput key_top 
     322   bld::tool::fppkeys key_xios key_top 
    323323 
    324324the compilation with :file:`makenemo` will be executed through the following syntax 
     
    348348.. code-block:: perl 
    349349 
    350    bld::tool::fppkeys  key_iomput key_top 
     350   bld::tool::fppkeys  key_xios key_top 
    351351 
    352352   src::MYBGC::initialization         <MYBGCPATH>/initialization 
     
    376376   .. code-block:: perl 
    377377 
    378       bld::tool::fppkeys  key_zdftke key_dynspg_ts key_iomput key_top 
     378      bld::tool::fppkeys  key_zdftke key_dynspg_ts key_xios key_top 
    379379      inc <MYBGCPATH>/MYBGC.fcm 
    380380 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/TRP/trdtrc_oce.F90

    r10425 r14328  
    2424   LOGICAL, DIMENSION(:), ALLOCATABLE ::   ln_trdtrc   !: large trends diagnostic to write or not (namelist) 
    2525 
    26 # if defined key_trdtrc && defined key_iomput 
     26# if defined key_trdtrc && defined key_xios 
    2727   LOGICAL, PARAMETER ::   lk_trdtrc = .TRUE.  
    2828# else 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/trcnam.F90

    r14086 r14328  
    3131   PUBLIC   trc_nam      ! called in trcini 
    3232 
    33    TYPE(PTRACER), DIMENSION(jpmaxtrc), PUBLIC  :: sn_tracer  !: type of tracer for saving if not key_iomput 
     33   TYPE(PTRACER), DIMENSION(jpmaxtrc), PUBLIC  :: sn_tracer  !: type of tracer for saving if not key_xios 
    3434 
    3535   !!---------------------------------------------------------------------- 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/trcrst.F90

    r14086 r14328  
    9696            CALL iom_open( TRIM(clpath)//TRIM(clname), numrtw, ldwrt = .TRUE. ) 
    9797         ELSE 
    98 #if defined key_iomput 
     98#if defined key_xios 
    9999            cw_toprst_cxt = "rstwt_"//TRIM(ADJUSTL(clkt)) 
    100100            IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/src/TOP/trcwri.F90

    r13237 r14328  
    66   !! History :   1.0  !  2009-05 (C. Ethe)  Original code 
    77   !!---------------------------------------------------------------------- 
    8 #if defined key_top && defined key_iomput 
     8#if defined key_top && defined key_xios 
    99   !!---------------------------------------------------------------------- 
    1010   !!   'key_top'                                           TOP models 
     
    2828   PUBLIC trc_wri       
    2929 
     30   !! * Substitutions 
     31#  include "do_loop_substitute.h90" 
     32#  include "domzgr_substitute.h90" 
     33 
    3034CONTAINS 
    3135 
     
    3943      INTEGER, INTENT( in )     :: Kmm  ! time level indices 
    4044      ! 
    41       INTEGER                   :: jn 
     45      INTEGER                   :: jk, jn 
    4246      CHARACTER (len=20)        :: cltra 
    4347      CHARACTER (len=40)        :: clhstnam 
    4448      INTEGER ::   inum = 11            ! temporary logical unit 
     49      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   z3d   ! 3D workspace 
    4550      !!--------------------------------------------------------------------- 
    4651      ! 
     
    5358           WRITE(inum,*) clhstnam 
    5459           CLOSE(inum) 
    55         ENDIF 
     60         ENDIF 
    5661 
    57        ! Output of initial vertical scale factor 
    58        CALL iom_put( "e3t_0", e3t_0(:,:,:) ) 
    59        CALL iom_put( "e3u_0", e3u_0(:,:,:) ) 
    60        CALL iom_put( "e3v_0", e3v_0(:,:,:) ) 
    61        ! 
    62 #if ! defined key_qco 
    63        CALL iom_put( "e3t" , e3t(:,:,:,Kmm) ) 
    64        CALL iom_put( "e3u" , e3u(:,:,:,Kmm) ) 
    65        CALL iom_put( "e3v" , e3v(:,:,:,Kmm) ) 
    66 #endif  
    67        ! 
     62         ! Output of initial vertical scale factor 
     63         CALL iom_put( "e3t_0", e3t_0(:,:,:) ) 
     64         CALL iom_put( "e3u_0", e3u_0(:,:,:) ) 
     65         CALL iom_put( "e3v_0", e3v_0(:,:,:) ) 
     66         ! 
     67         IF( .NOT.ln_linssh )  CALL iom_put( "ssh" , ssh(:,:,Kmm) )              ! sea surface height 
     68         ! 
     69         IF ( iom_use("e3t") ) THEN  ! time-varying e3t 
     70            DO jk = 1, jpk 
     71               z3d(:,:,jk) =  e3t(:,:,jk,Kmm) 
     72            END DO 
     73            CALL iom_put( "e3t", z3d(:,:,:) ) 
     74         ENDIF 
     75         IF ( iom_use("e3u") ) THEN                         ! time-varying e3u 
     76            DO jk = 1, jpk 
     77               z3d(:,:,jk) =  e3u(:,:,jk,Kmm) 
     78            END DO 
     79            CALL iom_put( "e3u", z3d(:,:,:) ) 
     80         ENDIF 
     81         IF ( iom_use("e3v") ) THEN                         ! time-varying e3v 
     82            DO jk = 1, jpk 
     83               z3d(:,:,jk) =  e3v(:,:,jk,Kmm) 
     84            END DO 
     85            CALL iom_put( "e3v", z3d(:,:,:) ) 
     86         ENDIF 
     87         ! 
    6888      ENDIF 
     89      ! 
    6990      ! write the tracer concentrations in the file 
    7091      ! --------------------------------------- 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/BENCH/MY_SRC/usrdef_istate.F90

    r14223 r14328  
    7272         zfact = REAL(jk-1,wp) / REAL(jpk-1,wp)   ! 0 to 1 to add a basic stratification 
    7373         ! temperature choosen to lead to ~50% ice at the beginning if rn_thres_sst = 0.5 
    74          pts(:,:,jk,jp_tem) = 20._wp*z2d(:,:) - 1._wp - 0.5_wp * zfact    ! -1 to -1.5 +/- 1.0 degG 
     74         pts(ji,jj,jk,jp_tem) = 20._wp*z2d(ji,jj) - 1._wp - 0.5_wp * zfact    ! -1 to -1.5 +/- 1.0 degG 
    7575         ! salinity:   
    76          pts(:,:,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(:,:)           ! 30 to 31   +/- 0.05 psu 
     76         pts(ji,jj,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(ji,jj)           ! 30 to 31   +/- 0.05 psu 
    7777         ! velocities: 
    78          pu(:,:,jk) = z2d(:,:) *  0.1_wp * umask(:,:,jk)                  ! +/- 0.005  m/s 
    79          pv(:,:,jk) = z2d(:,:) * 0.01_wp * vmask(:,:,jk)                  ! +/- 0.0005 m/s 
     78         pu(ji,jj,jk) = z2d(ji,jj) *  0.1_wp * umask(ji,jj,jk)                ! +/- 0.005  m/s 
     79         pv(ji,jj,jk) = z2d(ji,jj) * 0.01_wp * vmask(ji,jj,jk)                ! +/- 0.0005 m/s 
    8080      END_3D 
    8181      pts(:,:,jpk,:) = 0._wp 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/BENCH/MY_SRC/usrdef_sbc.F90

    r14223 r14328  
    3030   PRIVATE 
    3131 
    32    PUBLIC   usrdef_sbc_oce      ! routine called in sbcmod module 
    33    PUBLIC   usrdef_sbc_ice_tau  ! routine called by sbcice_lim.F90 for ice dynamics 
    34    PUBLIC   usrdef_sbc_ice_flx  ! routine called by sbcice_lim.F90 for ice thermo 
     32   PUBLIC   usrdef_sbc_oce      ! routine called by sbcmod.F90 for sbc ocean 
     33   PUBLIC   usrdef_sbc_ice_tau  ! routine called by icestp.F90 for ice dynamics 
     34   PUBLIC   usrdef_sbc_ice_flx  ! routine called by icestp.F90 for ice thermo 
    3535 
    3636   !! * Substitutions 
     
    8383         ! 
    8484      ENDIF 
    85        
    8685      ! 
    8786   END SUBROUTINE usrdef_sbc_oce 
     
    9796      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    9897      ! 
    99       REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
     98      REAL(wp) ::   zztmp 
    10099      INTEGER  ::   ji, jj 
    101100      !!--------------------------------------------------------------------- 
     
    106105      ! 
    107106      DO_2D( 0, 0, 0, 0 ) 
    108          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
     107         zztmp = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
     108         utau_ice(ji,jj) = 0.1_wp + zztmp 
     109         vtau_ice(ji,jj) = 0.1_wp + zztmp 
    109110      END_2D 
    110       utau_ice(:,:) = 0.1_wp + z2d(:,:) 
    111       vtau_ice(:,:) = 0.1_wp + z2d(:,:) 
    112111 
    113112      CALL lbc_lnk_multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
     
    121120      !!                     ***  ROUTINE usrdef_sbc_ice_flx  *** 
    122121      !! 
    123       !! ** Purpose :   provide the surface boundary (flux) condition over 
    124       !sea-ice 
     122      !! ** Purpose :   provide the surface boundary (flux) condition over sea-ice 
    125123      !!--------------------------------------------------------------------- 
    126124      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     
    130128      REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing 
    131129      !!--------------------------------------------------------------------- 
     130#if defined key_si3 
    132131      ! 
    133 #if defined key_si3 
    134132      IF( kt==nit000 .AND. lwp)   WRITE(numout,*)' usrdef_sbc_ice : BENCH case: NO flux forcing' 
    135133      ! 
     
    137135      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    138136      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    139       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     137      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    140138 
    141139      ! ice variables 
    142140      alb_ice (:,:,:) = 0.7_wp  ! useless 
    143141      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    144       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     142      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     143      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    145144      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    146145      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
     
    148147      ! ice fields deduced from above 
    149148      zsnw(:,:) = 1._wp 
    150       !!CALL lim_thd_snwblow( at_i_b, zsnw )  ! snow distribution over ice after 
    151       !wind blowing  
     149      !!CALL lim_thd_snwblow( at_i_b, zsnw )  ! snow distribution over ice after wind blowing  
    152150      emp_ice  (:,:)   = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw(:,:) 
    153151      emp_oce  (:,:)   = emp_oce(:,:) - sprecip(:,:) * (1._wp - zsnw(:,:) ) 
     
    164162      ! --- shortwave radiation transmitted thru the surface scattering layer (W/m2) --- ! 
    165163      qtr_ice_top(:,:,:) = 0._wp 
    166  
    167164#endif 
    168165 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/C1D_ASICS/cpp_C1D_ASICS.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_c1d key_qco key_iomput 
     1 bld::tool::fppkeys   key_c1d key_qco key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/CANAL/cpp_CANAL.fcm

    r14229 r14328  
    1  bld::tool::fppkeys key_iomput key_qco  
     1 bld::tool::fppkeys key_xios key_qco  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/CPL_OASIS/cpp_CPL_OASIS.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_si3 key_top key_iomput key_oasis3 key_qco 
     1bld::tool::fppkeys   key_si3 key_top key_xios key_oasis3 key_qco 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DOME/EXPREF/1_namelist_cfg

    r14216 r14328  
    1818/ 
    1919!----------------------------------------------------------------------- 
     20&namusr_def    !   User defined :   OVERFLOW configuration 
     21!----------------------------------------------------------------------- 
     22   !                       !  type of vertical coordinate 
     23   ln_zco      = .false.      ! z-coordinate 
     24   ln_zps      = .true.       ! z-partial-step coordinate 
     25   ln_sco      = .false.      ! s-coordinate 
     26   rn_dx       =   5000.   !  horizontal resolution   [meters] 
     27   rn_dz       =     60.   !  vertical   resolution   [meters] 
     28   rn_f0       =  1.e-4    !  coriolis [s-1] 
     29/ 
     30!----------------------------------------------------------------------- 
    2031&namrun        !   parameters of the run 
    2132!----------------------------------------------------------------------- 
     
    105116!----------------------------------------------------------------------- 
    106117   ln_traadv_fct = .true. !  FCT scheme 
    107       nn_fct_h   =  4            !  =2/4, horizontal 2nd / 4th order 
     118      nn_fct_h   =  2            !  =2/4, horizontal 2nd / 4th order 
    108119      nn_fct_v   =  2            !  =2/4, vertical   2nd / COMPACT 4th order 
    109120/ 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DOME/EXPREF/file_def_nemo-oce.xml

    r14216 r14328  
    88    --> 
    99     
    10     <file_definition type="one_file" name="@expname@" sync_freq="12h" min_digits="4"> 
    11       <file_group id="12h" output_freq="12h"  output_level="10" enabled=".TRUE." >  <!-- 12h files -->   
     10    <file_definition type="one_file" name="@expname@" sync_freq="1d" min_digits="4"> 
     11      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE." >  <!-- 1d files -->   
    1212  
    1313   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DOME/EXPREF/namelist_cfg

    r14216 r14328  
    33!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    44! 
    5 ! 
     5!----------------------------------------------------------------------- 
     6&namusr_def    !   User defined :   OVERFLOW configuration 
     7!----------------------------------------------------------------------- 
     8   !                       !  type of vertical coordinate 
     9   ln_zco      = .false.      ! z-coordinate 
     10   ln_zps      = .true.       ! z-partial-step coordinate 
     11   ln_sco      = .false.      ! s-coordinate 
     12   rn_dx       =   5000.   !  horizontal resolution   [meters] 
     13   rn_dz       =     60.   !  vertical   resolution   [meters] 
     14   rn_f0       =  1.e-4    !  coriolis [s-1] 
     15/ 
    616!----------------------------------------------------------------------- 
    717&namrun        !   parameters of the run 
     
    92102!----------------------------------------------------------------------- 
    93103&namtra_adv    !   advection scheme for tracer 
    94 !----------------------------------------------------------------------- 
     104!---------------------------------------------------------------------- 
    95105   ln_traadv_fct = .true. !  FCT scheme 
    96       nn_fct_h   =  4            !  =2/4, horizontal 2nd / 4th order 
     106      nn_fct_h   =  2            !  =2/4, horizontal 2nd / 4th order 
    97107      nn_fct_v   =  2            !  =2/4, vertical   2nd / COMPACT 4th order 
    98108/ 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DOME/MY_SRC/usrdef_istate.F90

    r14133 r14328  
    1616   USE phycst         ! physical constants 
    1717   USE eosbn2, ONLY: rn_a0 
     18   USE dom_oce 
    1819   ! 
    1920   USE in_out_manager ! I/O manager 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DOME/cpp_DOME.fcm

    r14229 r14328  
    1  bld::tool::fppkeys key_iomput key_agrif key_linssh 
     1 bld::tool::fppkeys key_xios key_agrif key_linssh 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DONUT/EXPREF/file_def_nemo-ice.xml

    r14226 r14328  
    5353       <field field_ref="normstr"          name="normstr" /> 
    5454       <field field_ref="sheastr"          name="sheastr" /> 
    55        <field field_ref="isig1"            name="isig1"   /> 
    56        <field field_ref="isig2"            name="isig2"   /> 
    57        <field field_ref="isig3"            name="isig3"   /> 
     55       <field field_ref="sig1_pnorm"       name="sig1_pnorm"/> 
     56       <field field_ref="sig2_pnorm"       name="sig2_pnorm"/> 
    5857        
    5958       <!-- heat fluxes --> 
     
    6867       <field field_ref="albedo"           name="albedo"     /> 
    6968        
    70      <!-- heat fluxes --> 
    71           <field id="hfxbog"       long_name="heat flux used for bottom ice growth (neg.)"                  unit="W/m2" /> 
    72           <field id="hfxbom"       long_name="heat flux used for bottom ice melt (pos.)"                    unit="W/m2" /> 
    73           <field id="hfxsum"       long_name="heat flux used for surface ice melt"                          unit="W/m2" /> 
    74           <field id="hfxopw"       long_name="heat flux used for open water ice formation"                  unit="W/m2" /> 
    75           <field id="hfxdif"       long_name="heat flux used for ice temperature change"                    unit="W/m2" /> 
    76           <field id="hfxsnw"       long_name="heat flux used for snow melt"                                 unit="W/m2" /> 
    77           <field id="hfxerr"       long_name="heat flux error after heat diffusion"                         unit="W/m2" /> 
    78           <!-- heat fluxes associated with mass exchange --> 
    79           <field id="hfxthd"       long_name="heat fluxes from ice-ocean mass exchange during thermo"       unit="W/m2" /> 
    80           <field id="hfxdyn"       long_name="heat fluxes from ice-ocean mass exchange during dynamic"      unit="W/m2" /> 
    81           <field id="hfxres"       long_name="heat fluxes from undiagnosed processes"                       unit="W/m2" /> 
    82           <field id="hfxsub"       long_name="heat fluxes from ice-atm. mass exchange during sublimation"   unit="W/m2" /> 
    83           <field id="hfxspr"       long_name="heat fluxes from ice-atm. mass exchange during snow precip"   unit="W/m2" /> 
    84           <field id="hfxdhc"       long_name="Heat content variation in snow and ice (neg = ice cooling)"   unit="W/m2" /> 
    85  
    86      <field field_ref="hfxcndtop"        name="hfxcndtop"  /> 
     69       <field field_ref="hfxcndtop"        name="hfxcndtop"  /> 
    8770       <field field_ref="hfxcndbot"        name="hfxcndbot"  /> 
    8871       <field field_ref="hfxsensib"        name="hfxsensib"  /> 
     
    9477       <field field_ref="vfxice"           name="vfxice" /> 
    9578       <field field_ref="vfxsnw"           name="vfxsnw" /> 
    96         
     79 
    9780       <!-- categories --> 
    9881       <field field_ref="icemask_cat"      name="simskcat"/> 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/DONUT/cpp_DONUT.fcm

    r14229 r14328  
    1  bld::tool::fppkeys key_si3 key_qco key_iomput 
     1 bld::tool::fppkeys key_si3 key_qco key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICB/MY_SRC/step.F90

    r14227 r14328  
    9898      ENDIF 
    9999      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    100 # if defined key_iomput 
     100# if defined key_xios 
    101101      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    102102# endif 
     
    150150      ENDIF 
    151151      ! 
    152 #if defined key_iomput 
     152#if defined key_xios 
    153153      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    154154      ! Finalize contextes if end of simulation or error detected 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICB/cpp_ICB.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_iomput key_qco  
     1 bld::tool::fppkeys   key_xios key_qco  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_ADV1D/MY_SRC/usrdef_sbc.F90

    r14072 r14328  
    120120      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    121121      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    122       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     122      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    123123 
    124124      ! ice variables 
    125125      alb_ice (:,:,:) = 0.7_wp  ! useless 
    126126      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    127       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     127      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     128      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    128129      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    129130      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_ADV1D/cpp_ICE_ADV1D.fcm

    r14232 r14328  
    1 bld::tool::fppkeys key_si3 key_iomput key_linssh 
     1bld::tool::fppkeys key_si3 key_xios key_linssh 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_ADV2D/MY_SRC/usrdef_sbc.F90

    r13999 r14328  
    118118      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    119119      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    120       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     120      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    121121 
    122122      ! ice variables 
    123123      alb_ice (:,:,:) = 0.7_wp  ! useless 
    124124      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    125       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     125      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     126      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    126127      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    127128      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_ADV2D/cpp_ICE_ADV2D.fcm

    r14232 r14328  
    1 bld::tool::fppkeys key_si3 key_linssh key_iomput 
     1bld::tool::fppkeys key_si3 key_linssh key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_AGRIF/MY_SRC/usrdef_sbc.F90

    r14072 r14328  
    119119      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    120120      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    121       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     121      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    122122 
    123123      ! ice variables 
    124124      alb_ice (:,:,:) = 0.7_wp  ! useless 
    125125      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    126       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     126      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     127      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    127128      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    128129      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_AGRIF/cpp_ICE_AGRIF.fcm

    r14229 r14328  
    1 bld::tool::fppkeys key_agrif key_si3 key_linssh key_iomput 
     1bld::tool::fppkeys key_agrif key_si3 key_linssh key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90

    r14063 r14328  
    179179      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    180180      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    181       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     181      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    182182 
    183183      ! ice variables 
    184184      alb_ice (:,:,:) = 0.7_wp  ! useless 
    185185      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    186       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     186      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     187      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    187188      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    188189      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ICE_RHEO/cpp_ICE_RHEO.fcm

    r14232 r14328  
    1 bld::tool::fppkeys key_si3 key_linssh key_iomput 
     1bld::tool::fppkeys key_si3 key_linssh key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ISOMIP+/cpp_ISOMIP+.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_iomput  
     1 bld::tool::fppkeys   key_xios  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/ISOMIP/cpp_ISOMIP.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_iomput  
     1 bld::tool::fppkeys   key_xios  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/LOCK_EXCHANGE/cpp_LOCK_EXCHANGE.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_qco key_iomput  
     1 bld::tool::fppkeys   key_qco key_xios  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/OVERFLOW/cpp_OVERFLOW.fcm

    r14229 r14328  
    1 bld::tool::fppkeys   key_qco key_iomput  
     1bld::tool::fppkeys   key_qco key_xios  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/STATION_ASF/MY_SRC/diawri.F90

    r14072 r14328  
    6363CONTAINS 
    6464 
    65 #if defined key_iomput 
    66    !!---------------------------------------------------------------------- 
    67    !!   'key_iomput'                                        use IOM library 
     65#if defined key_xios 
     66   !!---------------------------------------------------------------------- 
     67   !!   'key_xios'                                        use IOM library 
    6868   !!---------------------------------------------------------------------- 
    6969   INTEGER FUNCTION dia_wri_alloc() 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r14229 r14328  
    3434   USE mppini         ! shared/distributed memory setting (mpp_init routine) 
    3535   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    36 #if defined key_iomput 
     36#if defined key_xios 
    3737   USE xios           ! xIOserver 
    3838#endif 
     
    113113      CALL nemo_closefile 
    114114      ! 
    115 #if defined key_iomput 
     115#if defined key_xios 
    116116      CALL xios_finalize  ! end mpp communications with xios 
    117117#else 
     
    148148      !                             !-------------------------------------------------! 
    149149      ! 
    150 #if defined key_iomput 
     150#if defined key_xios 
    151151      IF( Agrif_Root() ) THEN 
    152152         CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/STATION_ASF/MY_SRC/step_c1d.F90

    r14227 r14328  
    7979      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file 
    8080      ! 
    81 #if defined key_iomput 
     81#if defined key_xios 
    8282      IF( kstp == nitend .OR. nstop > 0 )   CALL xios_context_finalize()   ! needed for XIOS 
    8383      ! 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/STATION_ASF/MY_SRC/stpctl.F90

    r14072 r14328  
    3131   PUBLIC stp_ctl           ! routine called by step.F90 
    3232 
    33    INTEGER                ::   nrunid   ! netcdf file id 
    34    INTEGER, DIMENSION(3)  ::   nvarid   ! netcdf variable id 
     33   INTEGER, PARAMETER         ::   jpvar = 3 
     34   INTEGER                    ::   nrunid   ! netcdf file id 
     35   INTEGER, DIMENSION(jpvar)  ::   nvarid   ! netcdf variable id 
    3536   !!---------------------------------------------------------------------- 
    3637   !! NEMO/SAS 4.0 , NEMO Consortium (2018) 
     
    5960      INTEGER, INTENT(in   ) ::   Kmm      ! ocean time level index 
    6061      !! 
     62      INTEGER, PARAMETER              ::   jptst = 3 
    6163      INTEGER                         ::   ji                                    ! dummy loop indices 
    6264      INTEGER                         ::   idtime, istatus 
    63       INTEGER , DIMENSION(4)          ::   iareasum, iareamin, iareamax 
    64       INTEGER , DIMENSION(3,3)        ::   iloc                                  ! min/max loc indices 
    65       REAL(wp)                        ::   zzz                                   ! local real 
    66       REAL(wp), DIMENSION(4)          ::   zmax, zmaxlocal 
     65      INTEGER , DIMENSION(jptst)      ::   iareasum, iareamin, iareamax 
     66      INTEGER , DIMENSION(3,jptst)    ::   iloc                                  ! min/max loc indices 
     67      REAL(wp)                        ::   zzz                                   ! local real  
     68      REAL(wp), DIMENSION(jpvar+1)    ::   zmax 
     69      REAL(wp), DIMENSION(jptst)      ::   zmaxlocal 
    6770      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    6871      LOGICAL, DIMENSION(jpi,jpj)     ::   llmsk 
     
    122125      zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk )                         ! max non-solar heat flux 
    123126      zmax(3) = MAXVAL( ABS( emp(:,:) ), mask = llmsk )                         ! max E-P 
    124       zmax(4) = REAL( nstop, wp )                                               ! stop indicator 
     127      zmax(jpvar+1) = REAL( nstop, wp )                                         ! stop indicator 
    125128      ! 
    126129      !                                   !==               get global extrema             ==! 
    127130      !                                   !==  done by all processes if writting run.stat  ==! 
    128131      IF( ll_colruns ) THEN 
    129          zmaxlocal(:) = zmax(:) 
    130          CALL mpp_max( "stpctl", zmax )          ! max over the global domain 
    131          nstop = NINT( zmax(4) )                 ! update nstop indicator (now sheared among all local domains) 
     132         zmaxlocal(:) = zmax(1:jptst) 
     133         CALL mpp_max( "stpctl", zmax )          ! max over the global domain: ok even of ll_0oce = .true. 
     134         nstop = NINT( zmax(jpvar+1) )           ! update nstop indicator (now sheared among all local domains) 
    132135      ELSE 
    133136         ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
    134          IF( ll_0oce )   zmax(1:3) = 0._wp       ! default "valid" values... 
    135       ENDIF 
    136       !                                   !==               error handling               ==! 
     137         IF( ll_0oce )   zmax(1:jptst) = 0._wp        ! default "valid" values... 
     138      ENDIF 
    137139      !                                   !==              write "run.stat" files              ==! 
    138140      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    139141      IF( ll_wrtruns ) THEN 
    140          WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 
    141          DO ji = 1, 3 
     142         WRITE(numrun,9500) kt, zmax(1:jptst) 
     143         DO ji = 1, jpvar 
    142144            istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 
    143145         END DO 
    144          IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 
     146         IF( kt == nitend )   istatus = NF90_CLOSE(nrunid) 
    145147      END IF 
    146148      !                                   !==               error handling               ==! 
    147149      !                                   !==  done by all processes at every time step  ==! 
    148150      ! 
    149       IF(   zmax(1) >    5._wp .OR.   &                   ! too large wind stress         ( > 5 N/m^2 ) 
    150          &  zmax(2) > 2000._wp .OR.   &                   ! too large non-solar heat flux ( > 2000 W/m^2 ) 
    151          &  zmax(3) > 1.E-3_wp .OR.   &                   ! too large net freshwater flux ( > 1.E-3 kg/m^2/s ) 
    152          &  ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
    153          &  ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
     151      IF(   zmax(1) >    5._wp .OR.   &                       ! too large wind stress         ( > 5 N/m^2 ) 
     152         &  zmax(2) > 2000._wp .OR.   &                       ! too large non-solar heat flux ( > 2000 W/m^2 ) 
     153         &  zmax(3) > 1.E-3_wp .OR.   &                       ! too large net freshwater flux ( > 1.E-3 kg/m^2/s ) 
     154         & ISNAN( SUM(zmax(1:jptst)) ) .OR.   &               ! NaN encounter in the tests 
     155         & ABS(   SUM(zmax(1:jptst)) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
    154156         ! 
    155157         iloc(:,:) = 0 
     
    163165            ! find which subdomain has the max. 
    164166            iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
    165             DO ji = 1, 4 
     167            DO ji = 1, jptst 
    166168               IF( zmaxlocal(ji) == zmax(ji) ) THEN 
    167169                  iareamin(ji) = narea   ;   iareamax(ji) = narea   ;   iareasum(ji) = 1 
     
    176178            iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) 
    177179            iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) 
    178             DO ji = 1, 3   ! local domain indices ==> global domain indices, excluding halos 
     180            DO ji = 1, jptst   ! local domain indices ==> global domain indices, excluding halos 
    179181               iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 
    180182            END DO 
     
    195197         ! 
    196198         IF( ll_colruns .OR. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    197             IF(lwp) THEN 
    198                CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    199             ELSE 
    200                nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     199            IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
     200            ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
    201201            ENDIF 
    202202         ELSE                                    ! only mpi subdomains with errors are here -> STOP now 
     
    239239 
    240240      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij  ,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
    241 !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
     241      !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
    242242      cl4 = '(i'//clfmt//')'   ;   WRITE(clsum, cl4) ksum 
    243243      WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1    ! how many digits to we need to write ? (we decide max = 9) 
    244244      cl4 = '(i'//clfmt//')'   ;   WRITE(clmin, cl4) kmin-1 
    245       WRITE(clmax, cl4) kmax-1 
     245                                   WRITE(clmax, cl4) kmax-1 
    246246      ! 
    247247      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpiglo,wp))) + 1      ! how many digits to we need to write jpiglo? (we decide max = 9) 
     
    259259      ELSE 
    260260         WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpk,wp))) + 1      ! how many digits to we need to write jpk? (we decide max = 9) 
    261 !!! WRITE(clk, '(i'//clfmt//')') kloc(3)               ! this is creating a compilation error with AGRIF 
     261         !!! WRITE(clk, '(i'//clfmt//')') kloc(3)               ! this is creating a compilation error with AGRIF 
    262262         cl4 = '(i'//clfmt//')'   ;   WRITE(clk, cl4) kloc(3)   ! this is ok with AGRIF 
    263263         WRITE(cdline,9400) TRIM(ADJUSTL(clkt)), TRIM(ADJUSTL(cdprefix)), pval, TRIM(cli), TRIM(clj),    TRIM(clk), TRIM(clsuff) 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/STATION_ASF/cpp_STATION_ASF.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_si3 key_c1d key_qco key_iomput 
     1 bld::tool::fppkeys   key_si3 key_c1d key_qco key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/SWG/cpp_SWG.fcm

    r14229 r14328  
    1 bld::tool::fppkeys key_iomput key_qco key_RK3 
     1bld::tool::fppkeys key_xios key_qco key_RK3 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/TSUNAMI/EXPREF/namelist_cfg

    r14225 r14328  
    2525   rn_dx       =     10.   !  x horizontal resolution   [km] 
    2626   rn_dy       =     10.   !  y horizontal resolution   [km] 
    27    rn_dz       =    100.   !  z vertical resolution      [m] 
    2827   rn_0xratio  =      0.2  !  x-domain ratio of the 0 
    2928   rn_0yratio  =      0.4  !  y-domain ratio of the 0 
    30    nn_fcase    =      0    !  F computation (0:f0, 1:Beta, 2:real) 
     29   nn_fcase    =      0    !  Coriolis frequency(f) computation (0:f0, 1:Beta plan, 2:real) 
    3130   rn_ppgphi0  =    38.5   !  Reference latitude      [degrees] 
    3231   nn_perio    =      7 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/TSUNAMI/MY_SRC/stpmlf.F90

    r14225 r14328  
    9898      ENDIF 
    9999      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    100 # if defined key_iomput 
     100# if defined key_xios 
    101101      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    102102# endif 
     
    181181      ENDIF 
    182182 
    183 #if defined key_iomput 
     183#if defined key_xios 
    184184      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    185185      ! Finalize contextes if end of simulation or error detected 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/TSUNAMI/MY_SRC/usrdef_nam.F90

    r14225 r14328  
    3333   REAL(wp), PUBLIC ::   rn_dx      =   30.  ! x horizontal resolution   [km] 
    3434   REAL(wp), PUBLIC ::   rn_dy      =   30.  ! y horizontal resolution   [km] 
    35    REAL(wp), PUBLIC ::   rn_dz      =  500.  ! vertical resolution        [m] 
    3635   REAL(wp), PUBLIC ::   rn_0xratio =    0.5 ! x domain ratio of the 0 
    3736   REAL(wp), PUBLIC ::   rn_0yratio =    0.5 ! x domain ratio of the 0 
     
    6564      ! 
    6665      INTEGER ::   ios      ! Local integer 
    67       REAL(wp)::   zh       ! Local scalars 
    6866      !! 
    69       NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio   & 
     67      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_0xratio, rn_0yratio   & 
    7068         &                 , nn_fcase, rn_ppgphi0, nn_perio 
    7169      !!---------------------------------------------------------------------- 
     
    8179         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 
    8280         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 
    83          rn_dz = Agrif_Parent(rn_dz) 
    8481         rn_ppgphi0 = Agrif_Parent(rn_ppgphi0) 
    8582      ENDIF 
    86       rn_0xratio = 0.5 
     83      rn_0xratio = 0.5   ! not really working I guess...  
    8784      rn_0yratio = 0.5 
    8885#endif 
     
    10097         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    10198      ENDIF 
    102       kpk = MAX( 2, NINT( rn_domszz / rn_dz ) + 1 ) 
    103       ! 
    104       zh  = (kpk-1)*rn_dz 
     99      kpk = 2 
    105100      !                             ! Set the lateral boundary condition of the global domain 
    106101      kperio = 1                    ! TSUNAMI configuration : closed basin 
     
    116111         WRITE(numout,*) '      horizontal x-resolution           rn_dx      = ',     rn_dx, ' km' 
    117112         WRITE(numout,*) '      horizontal y-resolution           rn_dy      = ',     rn_dy, ' km' 
    118          WRITE(numout,*) '      vertical resolution               rn_dz      = ',     rn_dz, '  m' 
    119113         WRITE(numout,*) '      x-domain ratio of the 0           rn_0xratio = ', rn_0xratio 
    120114         WRITE(numout,*) '      y-domain ratio of the 0           rn_0yratio = ', rn_0yratio 
    121          WRITE(numout,*) '          H [m] : ', zh 
    122115         WRITE(numout,*) '      F computation                     nn_fcase   = ',   nn_fcase 
    123116         WRITE(numout,*) '      Reference latitude                rn_ppgphi0 = ', rn_ppgphi0 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/TSUNAMI/cpp_TSUNAMI.fcm

    r14229 r14328  
    1  bld::tool::fppkeys key_qco key_iomput 
     1 bld::tool::fppkeys key_qco key_xios 
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/VORTEX/cpp_VORTEX.fcm

    r14229 r14328  
    1  bld::tool::fppkeys key_iomput key_agrif key_qco  
     1 bld::tool::fppkeys key_xios key_agrif key_qco  
  • NEMO/branches/2020/dev_14237_KERNEL-01_IMMERSE_SEAMOUNT/tests/WAD/cpp_WAD.fcm

    r14229 r14328  
    1  bld::tool::fppkeys   key_iomput key_qco  
     1 bld::tool::fppkeys   key_xios key_qco  
Note: See TracChangeset for help on using the changeset viewer.