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 13056 for utils – NEMO

Changeset 13056 for utils


Ignore:
Timestamp:
2020-06-07T18:26:09+02:00 (4 years ago)
Author:
rblod
Message:

ticket #2129 : cleaning domcfg

Location:
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg
Files:
8 deleted
40 edited
3 moved

Legend:

Unmodified
Added
Removed
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/1_namelist_cfg

    r13024 r13056  
    4343/ 
    4444!----------------------------------------------------------------------- 
    45 &namcrs        !   Grid coarsening for dynamics output and/or 
    46                !   passive tracer coarsened online simulations 
    47 !----------------------------------------------------------------------- 
    48 / 
    49 !----------------------------------------------------------------------- 
    50 &namtsd    !   data : Temperature  & Salinity 
    51 !----------------------------------------------------------------------- 
    52 / 
    53 !----------------------------------------------------------------------- 
    54 &namsbc        !   Surface Boundary Condition (surface module) 
    55 !----------------------------------------------------------------------- 
    56 / 
    57 !----------------------------------------------------------------------- 
    58 &namsbc_core   !   namsbc_core  CORE bulk formulae 
    59 !----------------------------------------------------------------------- 
    60 / 
    61 !----------------------------------------------------------------------- 
    62 &namtra_qsr    !   penetrative solar radiation 
    63 !----------------------------------------------------------------------- 
    64 / 
    65 !----------------------------------------------------------------------- 
    66 &namsbc_rnf    !   runoffs namelist surface boundary condition 
    67 !----------------------------------------------------------------------- 
    68 / 
    69 !----------------------------------------------------------------------- 
    70 &namsbc_ssr    !   surface boundary condition : sea surface restoring 
    71 !----------------------------------------------------------------------- 
    72 / 
    73 !----------------------------------------------------------------------- 
    74 &namsbc_alb    !   albedo parameters 
    75 !----------------------------------------------------------------------- 
    76 / 
    77 !----------------------------------------------------------------------- 
    78 &namberg       !   iceberg parameters 
    79 !----------------------------------------------------------------------- 
    80 / 
    81 !----------------------------------------------------------------------- 
    82 &namlbc        !   lateral momentum boundary condition 
    83 !----------------------------------------------------------------------- 
    84 / 
    85 !----------------------------------------------------------------------- 
    86 &nambfr        !   bottom friction 
    87 !----------------------------------------------------------------------- 
    88 / 
    89 !----------------------------------------------------------------------- 
    90 &nambbc        !   bottom temperature boundary condition                (default: NO) 
    91 !----------------------------------------------------------------------- 
    92    ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom 
    93 / 
    94 !----------------------------------------------------------------------- 
    95 &nambbl        !   bottom boundary layer scheme 
    96 !----------------------------------------------------------------------- 
    97 / 
    98 !----------------------------------------------------------------------- 
    9945&namcfg        !   parameters of the configuration 
    10046!----------------------------------------------------------------------- 
     
    12571   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    12672   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    127    ln_linssh   = .true.   !  linear free surface 
    12873/ 
    12974!----------------------------------------------------------------------- 
     
    14287&namlbc        !   lateral momentum boundary condition                  (default: NO selection) 
    14388!----------------------------------------------------------------------- 
    144 jpni = 0 
    145 jpnj=0 
    14689/ 
    14790!----------------------------------------------------------------------- 
    14891&namagrif      !  AGRIF zoom                                            ("key_agrif") 
    14992ln_bry_south = .TRUE. 
    150 !----------------------------------------------------------------------- 
    151 / 
    152 !----------------------------------------------------------------------- 
    153 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    15493!----------------------------------------------------------------------- 
    15594/ 
     
    161100&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    162101!----------------------------------------------------------------------- 
     102jpni = 0 
     103jpnj=0 
    163104/ 
    164 !----------------------------------------------------------------------- 
    165 &namctl        !   Control prints                                       (default: OFF) 
    166 !----------------------------------------------------------------------- 
    167 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/1_namelist_ref

    r13024 r13056  
    88&namrun        !   parameters of the run 
    99!----------------------------------------------------------------------- 
    10    nn_no       =       0   !  Assimilation cycle index 
    1110   cn_exp      =  "ORCA2"  !  experience name 
    1211   nn_it000    =       1   !  first time step 
     
    1514   nn_time0    =       0   !  initial time of day in hhmm 
    1615   nn_leapy    =       0   !  Leap year calendar (1) or not (0) 
    17    ln_rstart   = .false.   !  start from rest (F) or from a restart file (T) 
    18       nn_euler    =    1      !  = 0 : start with forward time step if ln_rstart=T 
    19       nn_rstctl   =    0      !  restart control ==> activated only if ln_rstart=T 
    20       !                          !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist 
    21       !                          !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart 
    22       !                          !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    23       cn_ocerst_in    = "restart"   !  suffix of ocean restart name (input) 
    24       cn_ocerst_indir = "."         !  directory from which to read input ocean restarts 
    25       cn_ocerst_out   = "restart"   !  suffix of ocean restart name (output) 
    26       cn_ocerst_outdir = "."         !  directory in which to write output ocean restarts 
    27    ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    28    nn_istate   =       0   !  output the initial state (1) or not (0) 
    29    ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 
    30    nn_stock    =    5840   !  frequency of creation of a restart file (modulo referenced to 1) 
    31    nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    32    nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000) 
    3316   ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%) 
    34    ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
    3517   ln_clobber  = .true.    !  clobber (overwrite) an existing file 
    3618   nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 
     19   ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
     20   ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    3721/ 
    3822!----------------------------------------------------------------------- 
     
    7862   ppkth2      =       48.029893720000 ! 
    7963   ppacr2      =       13.000000000000 ! 
    80 // 
     64/ 
    8165!----------------------------------------------------------------------- 
    8266&namcfg        !   parameters of the configuration 
     
    10791   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    10892   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    109    ln_linssh   = .false.   !  linear free surface 
    11093/ 
    11194!----------------------------------------------------------------------- 
     
    189172/ 
    190173!----------------------------------------------------------------------- 
    191 &nam_tide      !   tide parameters                                      ("key_tide") 
    192 !----------------------------------------------------------------------- 
    193    ln_tide_pot = .true.    !  use tidal potential forcing 
    194    ln_tide_ramp= .false.   ! 
    195    rdttideramp =    0.     ! 
    196    clname(1)   = 'DUMMY'   !  name of constituent - all tidal components must be set in namelist_cfg 
    197 / 
    198 !----------------------------------------------------------------------- 
    199 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    200 !----------------------------------------------------------------------- 
    201    ln_bdy         = .false.   !  Use unstructured open boundaries 
    202    nb_bdy         = 0         !  number of open boundary sets 
    203    ln_coords_file = .true.    !  =T : read bdy coordinates from file 
    204       cn_coords_file = 'coordinates.bdy.nc'  !  bdy coordinates files 
    205    ln_mask_file   = .false.   !  =T : read mask from file 
    206       cn_mask_file = ''        !  name of mask file (if ln_mask_file=.TRUE.) 
    207    cn_dyn2d    = 'none'       ! 
    208    nn_dyn2d_dta   =  0        !  = 0, bdy data are equal to the initial state 
    209       !                       !  = 1, bdy data are read in 'bdydata   .nc' files 
    210       !                       !  = 2, use tidal harmonic forcing data from files 
    211       !                       !  = 3, use external data AND tidal harmonic forcing 
    212    cn_dyn3d      =  'none'    ! 
    213    nn_dyn3d_dta  =  0         !  = 0, bdy data are equal to the initial state 
    214    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    215    cn_tra        =  'none'    ! 
    216    nn_tra_dta    =  0         !  = 0, bdy data are equal to the initial state 
    217    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    218    cn_ice        =  'none'    ! 
    219    nn_ice_dta    =  0         !  = 0, bdy data are equal to the initial state 
    220    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    221    rn_ice_tem    = 270.       !  si3 only: arbitrary temperature of incoming sea ice 
    222    rn_ice_sal    = 10.        !  si3 only:      --   salinity           -- 
    223    rn_ice_age    = 30.        !  si3 only:      --   age                -- 
    224 / 
    225 !----------------------------------------------------------------------- 
    226174&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    227175!----------------------------------------------------------------------- 
     
    233181   jpnj        =   1       !  jpnj   number of processors following j (set automatically if < 1) 
    234182/ 
    235 !----------------------------------------------------------------------- 
    236 &namctl        !   Control prints                                       (default: OFF) 
    237 !----------------------------------------------------------------------- 
    238    ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 
    239      sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    240        sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
    241        sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
    242        sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
    243        sn_cfctl%l_layout  = .FALSE. ! 
    244        sn_cfctl%l_mppout  = .FALSE. ! 
    245        sn_cfctl%l_mpptop  = .FALSE. ! 
    246        sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
    247        sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
    248        sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
    249        sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
    250    nn_print    =    0      !  level of print (0 no extra print) 
    251    nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus 
    252    nn_ictle    =    0      !  end   i indice of control sum        multi processor runs 
    253    nn_jctls    =    0      !  start j indice of control               over a subdomain) 
    254    nn_jctle    =    0      !  end   j indice of control 
    255    nn_isplt    =    1      !  number of processors in i-direction 
    256    nn_jsplt    =    1      !  number of processors in j-direction 
    257    ln_timing   = .false.   !  timing by routine write out in timing.output file 
    258    ln_diacfl   = .false.   !  CFL diagnostics write out in cfl_diagnostics.ascii 
    259 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/2_namelist_cfg

    r13024 r13056  
    4343/ 
    4444!----------------------------------------------------------------------- 
    45 &namcrs        !   Grid coarsening for dynamics output and/or 
    46                !   passive tracer coarsened online simulations 
    47 !----------------------------------------------------------------------- 
    48 / 
    49 !----------------------------------------------------------------------- 
    50 &namtsd    !   data : Temperature  & Salinity 
    51 !----------------------------------------------------------------------- 
    52 / 
    53 !----------------------------------------------------------------------- 
    54 &namsbc        !   Surface Boundary Condition (surface module) 
    55 !----------------------------------------------------------------------- 
    56 / 
    57 !----------------------------------------------------------------------- 
    58 &namsbc_core   !   namsbc_core  CORE bulk formulae 
    59 !----------------------------------------------------------------------- 
    60 / 
    61 !----------------------------------------------------------------------- 
    62 &namtra_qsr    !   penetrative solar radiation 
    63 !----------------------------------------------------------------------- 
    64 / 
    65 !----------------------------------------------------------------------- 
    66 &namsbc_rnf    !   runoffs namelist surface boundary condition 
    67 !----------------------------------------------------------------------- 
    68 / 
    69 !----------------------------------------------------------------------- 
    70 &namsbc_ssr    !   surface boundary condition : sea surface restoring 
    71 !----------------------------------------------------------------------- 
    72 / 
    73 !----------------------------------------------------------------------- 
    74 &namsbc_alb    !   albedo parameters 
    75 !----------------------------------------------------------------------- 
    76 / 
    77 !----------------------------------------------------------------------- 
    78 &namberg       !   iceberg parameters 
    79 !----------------------------------------------------------------------- 
    80 / 
    81 !----------------------------------------------------------------------- 
    82 &namlbc        !   lateral momentum boundary condition 
    83 !----------------------------------------------------------------------- 
    84 / 
    85 !----------------------------------------------------------------------- 
    86 &nambfr        !   bottom friction 
    87 !----------------------------------------------------------------------- 
    88 / 
    89 !----------------------------------------------------------------------- 
    90 &nambbc        !   bottom temperature boundary condition                (default: NO) 
    91 !----------------------------------------------------------------------- 
    92    ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom 
    93 / 
    94 !----------------------------------------------------------------------- 
    95 &nambbl        !   bottom boundary layer scheme 
    96 !----------------------------------------------------------------------- 
    97 / 
    98 !----------------------------------------------------------------------- 
    9945&namcfg        !   parameters of the configuration 
    10046!----------------------------------------------------------------------- 
     
    12571   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    12672   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    127    ln_linssh   = .true.   !  linear free surface 
    12873/ 
    12974!----------------------------------------------------------------------- 
     
    14287&namlbc        !   lateral momentum boundary condition                  (default: NO selection) 
    14388!----------------------------------------------------------------------- 
    144 jpni = 0 
    145 jpnj=0 
    14689/ 
    14790!----------------------------------------------------------------------- 
    14891&namagrif      !  AGRIF zoom                                            ("key_agrif") 
    14992ln_bry_south = .TRUE. 
    150 !----------------------------------------------------------------------- 
    151 / 
    152 !----------------------------------------------------------------------- 
    153 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    15493!----------------------------------------------------------------------- 
    15594/ 
     
    161100&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    162101!----------------------------------------------------------------------- 
     102jpni = 0 
     103jpnj=0 
    163104/ 
    164 !----------------------------------------------------------------------- 
    165 &namctl        !   Control prints                                       (default: OFF) 
    166 !----------------------------------------------------------------------- 
    167 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/2_namelist_ref

    r13024 r13056  
    88&namrun        !   parameters of the run 
    99!----------------------------------------------------------------------- 
    10    nn_no       =       0   !  Assimilation cycle index 
    1110   cn_exp      =  "ORCA2"  !  experience name 
    1211   nn_it000    =       1   !  first time step 
     
    1514   nn_time0    =       0   !  initial time of day in hhmm 
    1615   nn_leapy    =       0   !  Leap year calendar (1) or not (0) 
    17    ln_rstart   = .false.   !  start from rest (F) or from a restart file (T) 
    18       nn_euler    =    1      !  = 0 : start with forward time step if ln_rstart=T 
    19       nn_rstctl   =    0      !  restart control ==> activated only if ln_rstart=T 
    20       !                          !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist 
    21       !                          !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart 
    22       !                          !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    23       cn_ocerst_in    = "restart"   !  suffix of ocean restart name (input) 
    24       cn_ocerst_indir = "."         !  directory from which to read input ocean restarts 
    25       cn_ocerst_out   = "restart"   !  suffix of ocean restart name (output) 
    26       cn_ocerst_outdir = "."         !  directory in which to write output ocean restarts 
    27    ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    28    nn_istate   =       0   !  output the initial state (1) or not (0) 
    29    ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 
    30    nn_stock    =    5840   !  frequency of creation of a restart file (modulo referenced to 1) 
    31    nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    32    nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000) 
    3316   ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%) 
    34    ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
    3517   ln_clobber  = .true.    !  clobber (overwrite) an existing file 
    3618   nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 
     19   ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
     20   ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    3721/ 
    3822!----------------------------------------------------------------------- 
     
    7862   ppkth2      =       48.029893720000 ! 
    7963   ppacr2      =       13.000000000000 ! 
    80 // 
     64/ 
    8165!----------------------------------------------------------------------- 
    8266&namcfg        !   parameters of the configuration 
     
    10791   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    10892   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    109    ln_linssh   = .false.   !  linear free surface 
    11093/ 
    11194!----------------------------------------------------------------------- 
     
    189172/ 
    190173!----------------------------------------------------------------------- 
    191 &nam_tide      !   tide parameters                                      ("key_tide") 
    192 !----------------------------------------------------------------------- 
    193    ln_tide_pot = .true.    !  use tidal potential forcing 
    194    ln_tide_ramp= .false.   ! 
    195    rdttideramp =    0.     ! 
    196    clname(1)   = 'DUMMY'   !  name of constituent - all tidal components must be set in namelist_cfg 
    197 / 
    198 !----------------------------------------------------------------------- 
    199 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    200 !----------------------------------------------------------------------- 
    201    ln_bdy         = .false.   !  Use unstructured open boundaries 
    202    nb_bdy         = 0         !  number of open boundary sets 
    203    ln_coords_file = .true.    !  =T : read bdy coordinates from file 
    204       cn_coords_file = 'coordinates.bdy.nc'  !  bdy coordinates files 
    205    ln_mask_file   = .false.   !  =T : read mask from file 
    206       cn_mask_file = ''        !  name of mask file (if ln_mask_file=.TRUE.) 
    207    cn_dyn2d    = 'none'       ! 
    208    nn_dyn2d_dta   =  0        !  = 0, bdy data are equal to the initial state 
    209       !                       !  = 1, bdy data are read in 'bdydata   .nc' files 
    210       !                       !  = 2, use tidal harmonic forcing data from files 
    211       !                       !  = 3, use external data AND tidal harmonic forcing 
    212    cn_dyn3d      =  'none'    ! 
    213    nn_dyn3d_dta  =  0         !  = 0, bdy data are equal to the initial state 
    214    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    215    cn_tra        =  'none'    ! 
    216    nn_tra_dta    =  0         !  = 0, bdy data are equal to the initial state 
    217    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    218    cn_ice        =  'none'    ! 
    219    nn_ice_dta    =  0         !  = 0, bdy data are equal to the initial state 
    220    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    221    rn_ice_tem    = 270.       !  si3 only: arbitrary temperature of incoming sea ice 
    222    rn_ice_sal    = 10.        !  si3 only:      --   salinity           -- 
    223    rn_ice_age    = 30.        !  si3 only:      --   age                -- 
    224 / 
    225 !----------------------------------------------------------------------- 
    226174&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    227175!----------------------------------------------------------------------- 
     
    233181   jpnj        =   1       !  jpnj   number of processors following j (set automatically if < 1) 
    234182/ 
    235 !----------------------------------------------------------------------- 
    236 &namctl        !   Control prints                                       (default: OFF) 
    237 !----------------------------------------------------------------------- 
    238    ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 
    239      sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    240        sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
    241        sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
    242        sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
    243        sn_cfctl%l_layout  = .FALSE. ! 
    244        sn_cfctl%l_mppout  = .FALSE. ! 
    245        sn_cfctl%l_mpptop  = .FALSE. ! 
    246        sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
    247        sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
    248        sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
    249        sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
    250    nn_print    =    0      !  level of print (0 no extra print) 
    251    nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus 
    252    nn_ictle    =    0      !  end   i indice of control sum        multi processor runs 
    253    nn_jctls    =    0      !  start j indice of control               over a subdomain) 
    254    nn_jctle    =    0      !  end   j indice of control 
    255    nn_isplt    =    1      !  number of processors in i-direction 
    256    nn_jsplt    =    1      !  number of processors in j-direction 
    257    ln_timing   = .false.   !  timing by routine write out in timing.output file 
    258    ln_diacfl   = .false.   !  CFL diagnostics write out in cfl_diagnostics.ascii 
    259 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/3_namelist_cfg

    r13024 r13056  
    4343/ 
    4444!----------------------------------------------------------------------- 
    45 &namcrs        !   Grid coarsening for dynamics output and/or 
    46                !   passive tracer coarsened online simulations 
    47 !----------------------------------------------------------------------- 
    48 / 
    49 !----------------------------------------------------------------------- 
    50 &namtsd    !   data : Temperature  & Salinity 
    51 !----------------------------------------------------------------------- 
    52 / 
    53 !----------------------------------------------------------------------- 
    54 &namsbc        !   Surface Boundary Condition (surface module) 
    55 !----------------------------------------------------------------------- 
    56 / 
    57 !----------------------------------------------------------------------- 
    58 &namsbc_core   !   namsbc_core  CORE bulk formulae 
    59 !----------------------------------------------------------------------- 
    60 / 
    61 !----------------------------------------------------------------------- 
    62 &namtra_qsr    !   penetrative solar radiation 
    63 !----------------------------------------------------------------------- 
    64 / 
    65 !----------------------------------------------------------------------- 
    66 &namsbc_rnf    !   runoffs namelist surface boundary condition 
    67 !----------------------------------------------------------------------- 
    68 / 
    69 !----------------------------------------------------------------------- 
    70 &namsbc_ssr    !   surface boundary condition : sea surface restoring 
    71 !----------------------------------------------------------------------- 
    72 / 
    73 !----------------------------------------------------------------------- 
    74 &namsbc_alb    !   albedo parameters 
    75 !----------------------------------------------------------------------- 
    76 / 
    77 !----------------------------------------------------------------------- 
    78 &namberg       !   iceberg parameters 
    79 !----------------------------------------------------------------------- 
    80 / 
    81 !----------------------------------------------------------------------- 
    82 &namlbc        !   lateral momentum boundary condition 
    83 !----------------------------------------------------------------------- 
    84 / 
    85 !----------------------------------------------------------------------- 
    86 &nambfr        !   bottom friction 
    87 !----------------------------------------------------------------------- 
    88 / 
    89 !----------------------------------------------------------------------- 
    90 &nambbc        !   bottom temperature boundary condition                (default: NO) 
    91 !----------------------------------------------------------------------- 
    92    ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom 
    93 / 
    94 !----------------------------------------------------------------------- 
    95 &nambbl        !   bottom boundary layer scheme 
    96 !----------------------------------------------------------------------- 
    97 / 
    98 !----------------------------------------------------------------------- 
    9945&namcfg        !   parameters of the configuration 
    10046!----------------------------------------------------------------------- 
     
    12571   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    12672   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    127    ln_linssh   = .true.   !  linear free surface 
    12873/ 
    12974!----------------------------------------------------------------------- 
     
    14287&namlbc        !   lateral momentum boundary condition                  (default: NO selection) 
    14388!----------------------------------------------------------------------- 
    144 jpni = 0 
    145 jpnj=0 
    14689/ 
    14790!----------------------------------------------------------------------- 
    14891&namagrif      !  AGRIF zoom                                            ("key_agrif") 
    14992   ln_bry_south = .FALSE. 
    150 !----------------------------------------------------------------------- 
    151 / 
    152 !----------------------------------------------------------------------- 
    153 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    15493!----------------------------------------------------------------------- 
    15594/ 
     
    161100&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    162101!----------------------------------------------------------------------- 
     102jpni = 0 
     103jpnj=0 
    163104/ 
    164 !----------------------------------------------------------------------- 
    165 &namctl        !   Control prints                                       (default: OFF) 
    166 !----------------------------------------------------------------------- 
    167 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/3_namelist_ref

    r13024 r13056  
    88&namrun        !   parameters of the run 
    99!----------------------------------------------------------------------- 
    10    nn_no       =       0   !  Assimilation cycle index 
    1110   cn_exp      =  "ORCA2"  !  experience name 
    1211   nn_it000    =       1   !  first time step 
     
    1514   nn_time0    =       0   !  initial time of day in hhmm 
    1615   nn_leapy    =       0   !  Leap year calendar (1) or not (0) 
    17    ln_rstart   = .false.   !  start from rest (F) or from a restart file (T) 
    18       nn_euler    =    1      !  = 0 : start with forward time step if ln_rstart=T 
    19       nn_rstctl   =    0      !  restart control ==> activated only if ln_rstart=T 
    20       !                          !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist 
    21       !                          !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart 
    22       !                          !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    23       cn_ocerst_in    = "restart"   !  suffix of ocean restart name (input) 
    24       cn_ocerst_indir = "."         !  directory from which to read input ocean restarts 
    25       cn_ocerst_out   = "restart"   !  suffix of ocean restart name (output) 
    26       cn_ocerst_outdir = "."         !  directory in which to write output ocean restarts 
    27    ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    28    nn_istate   =       0   !  output the initial state (1) or not (0) 
    29    ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 
    30    nn_stock    =    5840   !  frequency of creation of a restart file (modulo referenced to 1) 
    31    nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    32    nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000) 
    3316   ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%) 
    34    ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
    3517   ln_clobber  = .true.    !  clobber (overwrite) an existing file 
    3618   nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 
     19   ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
     20   ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    3721/ 
    3822!----------------------------------------------------------------------- 
     
    7862   ppkth2      =       48.029893720000 ! 
    7963   ppacr2      =       13.000000000000 ! 
    80 // 
     64/ 
    8165!----------------------------------------------------------------------- 
    8266&namcfg        !   parameters of the configuration 
     
    10791   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    10892   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    109    ln_linssh   = .false.   !  linear free surface 
    11093/ 
    11194!----------------------------------------------------------------------- 
     
    189172/ 
    190173!----------------------------------------------------------------------- 
    191 &nam_tide      !   tide parameters                                      ("key_tide") 
    192 !----------------------------------------------------------------------- 
    193    ln_tide_pot = .true.    !  use tidal potential forcing 
    194    ln_tide_ramp= .false.   ! 
    195    rdttideramp =    0.     ! 
    196    clname(1)   = 'DUMMY'   !  name of constituent - all tidal components must be set in namelist_cfg 
    197 / 
    198 !----------------------------------------------------------------------- 
    199 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    200 !----------------------------------------------------------------------- 
    201    ln_bdy         = .false.   !  Use unstructured open boundaries 
    202    nb_bdy         = 0         !  number of open boundary sets 
    203    ln_coords_file = .true.    !  =T : read bdy coordinates from file 
    204       cn_coords_file = 'coordinates.bdy.nc'  !  bdy coordinates files 
    205    ln_mask_file   = .false.   !  =T : read mask from file 
    206       cn_mask_file = ''        !  name of mask file (if ln_mask_file=.TRUE.) 
    207    cn_dyn2d    = 'none'       ! 
    208    nn_dyn2d_dta   =  0        !  = 0, bdy data are equal to the initial state 
    209       !                       !  = 1, bdy data are read in 'bdydata   .nc' files 
    210       !                       !  = 2, use tidal harmonic forcing data from files 
    211       !                       !  = 3, use external data AND tidal harmonic forcing 
    212    cn_dyn3d      =  'none'    ! 
    213    nn_dyn3d_dta  =  0         !  = 0, bdy data are equal to the initial state 
    214    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    215    cn_tra        =  'none'    ! 
    216    nn_tra_dta    =  0         !  = 0, bdy data are equal to the initial state 
    217    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    218    cn_ice        =  'none'    ! 
    219    nn_ice_dta    =  0         !  = 0, bdy data are equal to the initial state 
    220    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    221    rn_ice_tem    = 270.       !  si3 only: arbitrary temperature of incoming sea ice 
    222    rn_ice_sal    = 10.        !  si3 only:      --   salinity           -- 
    223    rn_ice_age    = 30.        !  si3 only:      --   age                -- 
    224 / 
    225 !----------------------------------------------------------------------- 
    226174&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    227175!----------------------------------------------------------------------- 
     
    233181   jpnj        =   1       !  jpnj   number of processors following j (set automatically if < 1) 
    234182/ 
    235 !----------------------------------------------------------------------- 
    236 &namctl        !   Control prints                                       (default: OFF) 
    237 !----------------------------------------------------------------------- 
    238    ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 
    239      sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    240        sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
    241        sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
    242        sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
    243        sn_cfctl%l_layout  = .FALSE. ! 
    244        sn_cfctl%l_mppout  = .FALSE. ! 
    245        sn_cfctl%l_mpptop  = .FALSE. ! 
    246        sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
    247        sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
    248        sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
    249        sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
    250    nn_print    =    0      !  level of print (0 no extra print) 
    251    nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus 
    252    nn_ictle    =    0      !  end   i indice of control sum        multi processor runs 
    253    nn_jctls    =    0      !  start j indice of control               over a subdomain) 
    254    nn_jctle    =    0      !  end   j indice of control 
    255    nn_isplt    =    1      !  number of processors in i-direction 
    256    nn_jsplt    =    1      !  number of processors in j-direction 
    257    ln_timing   = .false.   !  timing by routine write out in timing.output file 
    258    ln_diacfl   = .false.   !  CFL diagnostics write out in cfl_diagnostics.ascii 
    259 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/cpp_DOMAINcfg.fcm

    r12442 r13056  
    1  bld::tool::fppkeys key_mpp_mpi 
     1 bld::tool::fppkeys key_agrif 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/namelist_cfg

    r13024 r13056  
    4444/ 
    4545!----------------------------------------------------------------------- 
    46 &namcrs        !   Grid coarsening for dynamics output and/or 
    47                !   passive tracer coarsened online simulations 
    48 !----------------------------------------------------------------------- 
    49 / 
    50 !----------------------------------------------------------------------- 
    51 &namtsd    !   data : Temperature  & Salinity 
    52 !----------------------------------------------------------------------- 
    53 / 
    54 !----------------------------------------------------------------------- 
    55 &namsbc        !   Surface Boundary Condition (surface module) 
    56 !----------------------------------------------------------------------- 
    57 / 
    58 !----------------------------------------------------------------------- 
    59 &namsbc_core   !   namsbc_core  CORE bulk formulae 
    60 !----------------------------------------------------------------------- 
    61 / 
    62 !----------------------------------------------------------------------- 
    63 &namtra_qsr    !   penetrative solar radiation 
    64 !----------------------------------------------------------------------- 
    65 / 
    66 !----------------------------------------------------------------------- 
    67 &namsbc_rnf    !   runoffs namelist surface boundary condition 
    68 !----------------------------------------------------------------------- 
    69 / 
    70 !----------------------------------------------------------------------- 
    71 &namsbc_ssr    !   surface boundary condition : sea surface restoring 
    72 !----------------------------------------------------------------------- 
    73 / 
    74 !----------------------------------------------------------------------- 
    75 &namsbc_alb    !   albedo parameters 
    76 !----------------------------------------------------------------------- 
    77 / 
    78 !----------------------------------------------------------------------- 
    79 &namberg       !   iceberg parameters 
    80 !----------------------------------------------------------------------- 
    81 / 
    82 !----------------------------------------------------------------------- 
    83 &namlbc        !   lateral momentum boundary condition 
    84 !----------------------------------------------------------------------- 
    85 / 
    86 !----------------------------------------------------------------------- 
    87 &nambfr        !   bottom friction 
    88 !----------------------------------------------------------------------- 
    89 / 
    90 !----------------------------------------------------------------------- 
    91 &nambbc        !   bottom temperature boundary condition                (default: NO) 
    92 !----------------------------------------------------------------------- 
    93    ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom 
    94 / 
    95 !----------------------------------------------------------------------- 
    96 &nambbl        !   bottom boundary layer scheme 
    97 !----------------------------------------------------------------------- 
    98 / 
    99 !----------------------------------------------------------------------- 
    10046&namcfg        !   parameters of the configuration 
    10147!----------------------------------------------------------------------- 
     
    12672   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    12773   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    128    ln_linssh   = .true.   !  linear free surface 
    12974/ 
    13075!----------------------------------------------------------------------- 
     
    14388&namlbc        !   lateral momentum boundary condition                  (default: NO selection) 
    14489!----------------------------------------------------------------------- 
    145 jpni = 0 
    146 jpnj=0 
    14790/ 
    14891!----------------------------------------------------------------------- 
    14992&namagrif      !  AGRIF zoom                                            ("key_agrif") 
    15093ln_bry_south = .TRUE. 
    151 !----------------------------------------------------------------------- 
    152 / 
    153 !----------------------------------------------------------------------- 
    154 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    15594!----------------------------------------------------------------------- 
    15695/ 
     
    162101&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    163102!----------------------------------------------------------------------- 
     103jpni = 0 
     104jpnj=0 
    164105/ 
    165 !----------------------------------------------------------------------- 
    166 &namctl        !   Control prints                                       (default: OFF) 
    167 !----------------------------------------------------------------------- 
    168 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/namelist_ref

    r13024 r13056  
    99&namrun        !   parameters of the run 
    1010!----------------------------------------------------------------------- 
    11    nn_no       =       0   !  Assimilation cycle index 
    1211   cn_exp      =  "ORCA2"  !  experience name 
    1312   nn_it000    =       1   !  first time step 
     
    1615   nn_time0    =       0   !  initial time of day in hhmm 
    1716   nn_leapy    =       0   !  Leap year calendar (1) or not (0) 
    18    ln_rstart   = .false.   !  start from rest (F) or from a restart file (T) 
    19       nn_euler    =    1      !  = 0 : start with forward time step if ln_rstart=T 
    20       nn_rstctl   =    0      !  restart control ==> activated only if ln_rstart=T 
    21       !                          !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist 
    22       !                          !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart 
    23       !                          !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    24       cn_ocerst_in    = "restart"   !  suffix of ocean restart name (input) 
    25       cn_ocerst_indir = "."         !  directory from which to read input ocean restarts 
    26       cn_ocerst_out   = "restart"   !  suffix of ocean restart name (output) 
    27       cn_ocerst_outdir = "."         !  directory in which to write output ocean restarts 
    28    ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    29    nn_istate   =       0   !  output the initial state (1) or not (0) 
    30    ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 
    31    nn_stock    =    5840   !  frequency of creation of a restart file (modulo referenced to 1) 
    32    nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 
    33    nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000) 
    3417   ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%) 
    35    ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
    3618   ln_clobber  = .true.    !  clobber (overwrite) an existing file 
    3719   nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 
     20   ln_cfmeta   = .false.   !  output additional data to netCDF files required for compliance with the CF metadata standard 
     21   ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    3822/ 
    3923!----------------------------------------------------------------------- 
     
    7963   ppkth2      =       48.029893720000 ! 
    8064   ppacr2      =       13.000000000000 ! 
    81 // 
     65/ 
    8266!----------------------------------------------------------------------- 
    8367&namcfg        !   parameters of the configuration 
     
    10892   ln_sco      = .false.   !  s- or hybrid z-s-coordinate 
    10993   ln_isfcav   = .false.   !  ice shelf cavity             (T: see namzgr_isf) 
    110    ln_linssh   = .false.   !  linear free surface 
    11194/ 
    11295!----------------------------------------------------------------------- 
     
    190173/ 
    191174!----------------------------------------------------------------------- 
    192 &nam_tide      !   tide parameters                                      ("key_tide") 
    193 !----------------------------------------------------------------------- 
    194    ln_tide_pot = .true.    !  use tidal potential forcing 
    195    ln_tide_ramp= .false.   ! 
    196    rdttideramp =    0.     ! 
    197    clname(1)   = 'DUMMY'   !  name of constituent - all tidal components must be set in namelist_cfg 
    198 / 
    199 !----------------------------------------------------------------------- 
    200 &nambdy        !  unstructured open boundaries                          (default: OFF) 
    201 !----------------------------------------------------------------------- 
    202    ln_bdy         = .false.   !  Use unstructured open boundaries 
    203    nb_bdy         = 0         !  number of open boundary sets 
    204    ln_coords_file = .true.    !  =T : read bdy coordinates from file 
    205       cn_coords_file = 'coordinates.bdy.nc'  !  bdy coordinates files 
    206    ln_mask_file   = .false.   !  =T : read mask from file 
    207       cn_mask_file = ''        !  name of mask file (if ln_mask_file=.TRUE.) 
    208    cn_dyn2d    = 'none'       ! 
    209    nn_dyn2d_dta   =  0        !  = 0, bdy data are equal to the initial state 
    210       !                       !  = 1, bdy data are read in 'bdydata   .nc' files 
    211       !                       !  = 2, use tidal harmonic forcing data from files 
    212       !                       !  = 3, use external data AND tidal harmonic forcing 
    213    cn_dyn3d      =  'none'    ! 
    214    nn_dyn3d_dta  =  0         !  = 0, bdy data are equal to the initial state 
    215    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    216    cn_tra        =  'none'    ! 
    217    nn_tra_dta    =  0         !  = 0, bdy data are equal to the initial state 
    218    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    219    cn_ice        =  'none'    ! 
    220    nn_ice_dta    =  0         !  = 0, bdy data are equal to the initial state 
    221    !                          !  = 1, bdy data are read in 'bdydata   .nc' files 
    222    rn_ice_tem    = 270.       !  si3 only: arbitrary temperature of incoming sea ice 
    223    rn_ice_sal    = 10.        !  si3 only:      --   salinity           -- 
    224    rn_ice_age    = 30.        !  si3 only:      --   age                -- 
    225 / 
    226 !----------------------------------------------------------------------- 
    227175&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    228176!----------------------------------------------------------------------- 
     
    234182   jpnj        =   1       !  jpnj   number of processors following j (set automatically if < 1) 
    235183/ 
    236 !----------------------------------------------------------------------- 
    237 &namctl        !   Control prints                                       (default: OFF) 
    238 !----------------------------------------------------------------------- 
    239    ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 
    240      sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    241        sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
    242        sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
    243        sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
    244        sn_cfctl%l_layout  = .FALSE. ! 
    245        sn_cfctl%l_mppout  = .FALSE. ! 
    246        sn_cfctl%l_mpptop  = .FALSE. ! 
    247        sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
    248        sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
    249        sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
    250        sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
    251    nn_print    =    0      !  level of print (0 no extra print) 
    252    nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus 
    253    nn_ictle    =    0      !  end   i indice of control sum        multi processor runs 
    254    nn_jctls    =    0      !  start j indice of control               over a subdomain) 
    255    nn_jctle    =    0      !  end   j indice of control 
    256    nn_isplt    =    1      !  number of processors in i-direction 
    257    nn_jsplt    =    1      !  number of processors in j-direction 
    258    ln_timing   = .false.   !  timing by routine write out in timing.output file 
    259    ln_diacfl   = .false.   !  CFL diagnostics write out in cfl_diagnostics.ascii 
    260 / 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_connect.F90

    r13055 r13056  
     1MODULE agrif_connect 
     2 
     3   USE dom_oce 
     4   USE domzgr 
     5   USE agrif_parameters 
     6   USE agrif_profiles 
     7 
     8   IMPLICIT NONE 
     9   PRIVATE 
     10 
     11   PUBLIC agrif_boundary_connections  
     12 
     13CONTAINS 
     14 
    115#if defined key_agrif 
    2 subroutine agrif_boundary_connections 
    3 use agrif_profiles 
    4 use agrif_parameters 
    5 implicit none 
    6 external connect_e3t_copy, connect_e3t_connect, connect_bottom_level,connect_e3u, connect_e3v 
    7 if (agrif_root()) return 
    8  
    9 call Agrif_connection() 
    10  
    11 call Agrif_Bc_variable(bottom_level_id, procname = connect_bottom_level) 
    12  
    13 call Agrif_Bc_variable(e3t_copy_id, procname = connect_e3t_copy) 
    14  
    15 Allocate(e3t_interp(jpi,jpj,jpk)) 
    16 e3t_interp = -10. 
    17 Agrif_UseSpecialValue = .TRUE. 
    18 Agrif_SpecialValue = 0. 
    19 call Agrif_Bc_variable(e3t_connect_id, procname = connect_e3t_connect) 
    20 Agrif_UseSpecialValue = .FALSE. 
    21  
    22 ! Call Agrif_make_connection() 
    23  
    24       Agrif_SpecialValue    = 0. 
    25       Agrif_UseSpecialValue = ln_spc_dyn 
    26       ! 
    27 !      CALL Agrif_Bc_variable( e3u_id, procname=connect_e3u ) 
    28 !      CALL Agrif_Bc_variable( e3v_id, procname=connect_e3v ) 
    29       ! 
     16 
     17   SUBROUTINE agrif_boundary_connections 
     18      !!---------------------------------------------------------------------- 
     19      !!                  ***  ROUTINE agrif_boundary_connections  *** 
     20      !!----------------------------------------------------------------------   
     21      IF( Agrif_Root() ) return 
     22 
     23      CALL agrif_connection() 
     24      ! 
     25      CALL Agrif_Bc_variable(bottom_level_id, procname = connect_bottom_level) 
     26      !  
     27      CALL Agrif_Bc_variable(e3t_copy_id, procname = connect_e3t_copy) 
     28 
     29      ALLOCATE(e3t_interp(jpi,jpj,jpk)) 
     30      e3t_interp = -10. 
     31      Agrif_UseSpecialValue = .TRUE. 
     32      Agrif_SpecialValue = 0. 
     33      CALL Agrif_Bc_variable(e3t_connect_id, procname = connect_e3t_connect) 
    3034      Agrif_UseSpecialValue = .FALSE. 
    31        
    32 end subroutine agrif_boundary_connections 
    33  
    34  
    35     SUBROUTINE connect_e3t_copy( ptab, i1, i2, j1, j2, k1, k2, before, nb,ndir) 
    36     USE dom_oce 
    37     USE domzgr 
    38     USE agrif_parameters 
    39       !!---------------------------------------------------------------------- 
    40       !!                  ***  ROUTINE interpsshn  *** 
    41       !!----------------------------------------------------------------------   
    42       INTEGER                         , INTENT(in   ) ::   i1, i2, j1, j2, k1, k2 
    43       REAL, DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) ::   ptab 
    44       LOGICAL                         , INTENT(in   ) ::   before 
    45       INTEGER                         , INTENT(in   ) ::   nb , ndir 
    46       LOGICAL  ::   western_side, eastern_side,northern_side,southern_side 
     35      !     
     36   END SUBROUTINE agrif_boundary_connections 
     37 
     38   SUBROUTINE connect_e3t_copy( ptab, i1, i2, j1, j2, k1, k2, before, nb,ndir) 
     39      !!---------------------------------------------------------------------- 
     40      !!                  ***  ROUTINE connect_e3t_copy  *** 
     41      !!----------------------------------------------------------------------   
     42      INTEGER                               , INTENT(in   ) ::   i1, i2, j1, j2, k1, k2 
     43      REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) ::   ptab 
     44      LOGICAL                               , INTENT(in   ) ::   before 
     45      INTEGER                               , INTENT(in   ) ::   nb , ndir 
    4746      ! 
    4847      !!----------------------------------------------------------------------  
    49       INTEGER :: ji,jj,jk       
    50       ! 
    51          western_side  = (nb == 1).AND.(ndir == 1) 
    52          eastern_side  = (nb == 1).AND.(ndir == 2) 
    53          southern_side = (nb == 2).AND.(ndir == 1) 
    54          northern_side = (nb == 2).AND.(ndir == 2) 
    55  
     48      ! 
    5649      IF( before) THEN 
    5750         ptab(i1:i2,j1:j2,k1:k2) = e3t_0(i1:i2,j1:j2,k1:k2) 
     
    6255   END SUBROUTINE connect_e3t_copy 
    6356    
    64     SUBROUTINE connect_bottom_level( ptab, i1, i2, j1, j2, before, nb,ndir) 
    65     USE dom_oce 
    66     USE domzgr 
    67       !!---------------------------------------------------------------------- 
    68       !!                  ***  ROUTINE interpsshn  *** 
     57   SUBROUTINE connect_bottom_level( ptab, i1, i2, j1, j2, before, nb,ndir) 
     58      !!---------------------------------------------------------------------- 
     59      !!                  ***  ROUTINE connect_bottom_level  *** 
    6960      !!----------------------------------------------------------------------   
    7061      INTEGER                         , INTENT(in   ) ::   i1, i2, j1, j2 
    71       REAL, DIMENSION(i1:i2,j1:j2)    , INTENT(inout) ::   ptab 
     62      REAL(wp), DIMENSION(i1:i2,j1:j2), INTENT(inout) ::   ptab 
    7263      LOGICAL                         , INTENT(in   ) ::   before 
    7364      INTEGER                         , INTENT(in   ) ::   nb , ndir 
    74       LOGICAL  ::   western_side, eastern_side,northern_side,southern_side 
    7565      ! 
    7666      !!----------------------------------------------------------------------  
    77       INTEGER :: ji,jj      
    78       ! 
    79          western_side  = (nb == 1).AND.(ndir == 1) 
    80          eastern_side  = (nb == 1).AND.(ndir == 2) 
    81          southern_side = (nb == 2).AND.(ndir == 1) 
    82          northern_side = (nb == 2).AND.(ndir == 2) 
    83  
     67      ! 
    8468      IF( before) THEN 
    8569         ptab(i1:i2,j1:j2) = mbkt(i1:i2,j1:j2)*ssmask(i1:i2,j1:j2) 
     
    9074         ELSEWHERE 
    9175           ssmask(i1:i2,j1:j2) = 1. 
    92          END WHERE 
    93             
     76         END WHERE            
    9477      ENDIF 
    9578      ! 
    9679   END SUBROUTINE connect_bottom_level 
    9780    
    98     SUBROUTINE connect_e3t_connect( ptab, i1, i2, j1, j2, k1, k2, before, nb,ndir) 
    99     USE dom_oce 
    100     USE domzgr 
    101       !!---------------------------------------------------------------------- 
    102       !!                  ***  ROUTINE interpsshn  *** 
    103       !!----------------------------------------------------------------------   
    104       INTEGER                         , INTENT(in   ) ::   i1, i2, j1, j2, k1, k2 
    105       REAL, DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) ::   ptab 
    106       LOGICAL                         , INTENT(in   ) ::   before 
    107       INTEGER                         , INTENT(in   ) ::   nb , ndir 
    108       LOGICAL  ::   western_side, eastern_side,northern_side,southern_side 
     81   SUBROUTINE connect_e3t_connect( ptab, i1, i2, j1, j2, k1, k2, before, nb,ndir) 
     82      !!---------------------------------------------------------------------- 
     83      !!                  ***  ROUTINE connect_e3t_connect  *** 
     84      !!----------------------------------------------------------------------   
     85      INTEGER                               , INTENT(in   ) ::   i1, i2, j1, j2, k1, k2 
     86      REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) ::   ptab 
     87      LOGICAL                               , INTENT(in   ) ::   before 
     88      INTEGER                               , INTENT(in   ) ::   nb , ndir 
    10989      ! 
    11090      !!----------------------------------------------------------------------  
    111       INTEGER :: ji,jj,jk     
    112       REAL,DIMENSION(i1:i2,j1:j2) :: bathy_local       
    113       ! 
    114          western_side  = (nb == 1).AND.(ndir == 1) 
    115          eastern_side  = (nb == 1).AND.(ndir == 2) 
    116          southern_side = (nb == 2).AND.(ndir == 1) 
    117          northern_side = (nb == 2).AND.(ndir == 2) 
    118  
     91      INTEGER :: ji, jj, jk  
     92      REAL(wp), DIMENSION(i1:i2,j1:j2) :: bathy_local    
     93      ! 
    11994      IF( before) THEN 
    120          do jk=1,jpk 
    121          do jj=j1,j2 
    122          do ji=i1,i2 
    123           if (mbkt(ji,jj)>=jk) then 
    124             ptab(ji,jj,jk) = e3t_0(ji,jj,jk) 
    125           else 
    126             ptab(ji,jj,jk) = 0. 
    127           endif 
    128          enddo 
    129          enddo 
    130          enddo 
    131           
    132          do jj=j1,j2 
    133          do ji=i1,i2 
    134            ptab(ji,jj,jpk+1) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj) 
    135          enddo 
    136          enddo 
    137  
    138       ELSE 
    139          do jj=j1,j2 
    140          do ji=i1,i2 
    141            bathy_local (ji,jj) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj) 
    142          enddo 
    143          enddo 
    144           
    145          DO jk=1,jpk 
    146            DO jj=j1,j2 
    147              DO ji=i1,i2 
    148              if (e3t_interp(ji,jj,jk) == -10) then ! the connection has not yet been done 
    149                  e3t_interp(ji,jj,jk) = MAX(ptab(ji,jj,jk),MIN(e3zps_min, e3t_1d(jk)*e3zps_rat )) 
    150                  e3t_interp(ji,jj,jk) = MIN(e3t_interp(ji,jj,jk),e3t_1d(jk)) 
    151                  e3t_0(ji,jj,jk) = ztabramp(ji,jj)*e3t_0(ji,jj,jk)+(1.-ztabramp(ji,jj))*e3t_interp(ji,jj,jk) 
    152              endif 
    153              ENDDO 
    154            ENDDO 
    155          ENDDO 
    156       ENDIF 
    157       ! 
    158    END SUBROUTINE connect_e3t_connect 
    159     
    160    SUBROUTINE connect_e3u( ptab, i1, i2, j1, j2, k1, k2,before, nb, ndir ) 
    161    USE dom_oce 
    162       !!---------------------------------------------------------------------- 
    163       !!                  *** ROUTINE interpun *** 
    164       !!---------------------------------------------     
    165       !! 
    166       INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 
    167       REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: ptab 
    168       LOGICAL, INTENT(in) :: before 
    169       INTEGER, INTENT(in) :: nb , ndir 
    170       !! 
    171       INTEGER :: ji,jj,jk 
    172       REAL(wp) :: zrhoy 
    173       ! vertical interpolation: 
    174       REAL(wp), DIMENSION(k1:k2) :: tabin, h_in 
    175       REAL(wp), DIMENSION(1:jpk) :: h_out 
    176       INTEGER  :: N_in, N_out, iref 
    177       REAL(wp) :: h_diff 
    178       LOGICAL  :: western_side, eastern_side 
    179       !!---------------------------------------------     
    180       ! 
    181       IF (before) THEN  
    18295         DO jk=1,jpk 
    18396            DO jj=j1,j2 
    18497               DO ji=i1,i2 
    185                  if (min(mbkt(ji,jj),mbkt(ji+1,jj))<jk) then 
    186                   ptab(ji,jj,jk) = 0. 
    187                  else 
    188                   ptab(ji,jj,jk) = e2u(ji,jj) * e3u_0(ji,jj,jk) 
    189                  endif 
    190 # if defined key_vertical 
    191                   ptab(ji,jj,jk,2) = (umask(ji,jj,jk) * e2u(ji,jj) * e3u_n(ji,jj,jk)) 
    192 # endif 
     98                  IF( mbkt(ji,jj) .GE. jk ) THEN 
     99                     ptab(ji,jj,jk) = e3t_0(ji,jj,jk) 
     100                  ELSE 
     101                     ptab(ji,jj,jk) = 0. 
     102                  ENDIF 
    193103               END DO 
    194104            END DO 
    195105         END DO 
     106         ! 
     107         DO jj=j1,j2 
     108            DO ji=i1,i2 
     109               ptab(ji,jj,jpk+1) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj) 
     110            END DO 
     111         END DO 
    196112      ELSE 
    197          zrhoy = Agrif_rhoy() 
    198 # if defined key_vertical 
    199 ! VERTICAL REFINEMENT BEGIN 
    200          western_side  = (nb == 1).AND.(ndir == 1) 
    201          eastern_side  = (nb == 1).AND.(ndir == 2) 
    202  
    203          DO ji=i1,i2 
    204             iref = ji 
    205             IF (western_side) iref = MAX(2,ji) 
    206             IF (eastern_side) iref = MIN(nlci-2,ji) 
    207             DO jj=j1,j2 
    208                N_in = 0 
    209                DO jk=k1,k2 
    210                   IF (ptab(ji,jj,jk,2) == 0) EXIT 
    211                   N_in = N_in + 1 
    212                   tabin(jk) = ptab(ji,jj,jk,1)/ptab(ji,jj,jk,2) 
    213                   h_in(N_in) = ptab(ji,jj,jk,2)/(e2u(ji,jj)*zrhoy)  
    214               ENDDO 
    215           
    216               IF (N_in == 0) THEN 
    217                  ua(ji,jj,:) = 0._wp 
    218                  CYCLE 
    219               ENDIF 
    220           
    221               N_out = 0 
    222               DO jk=1,jpk 
    223                  if (umask(iref,jj,jk) == 0) EXIT 
    224                  N_out = N_out + 1 
    225                  h_out(N_out) = e3u_a(iref,jj,jk) 
    226               ENDDO 
    227           
    228               IF (N_out == 0) THEN 
    229                  ua(ji,jj,:) = 0._wp 
    230                  CYCLE 
    231               ENDIF 
    232           
    233               IF (N_in * N_out > 0) THEN 
    234                  h_diff = sum(h_out(1:N_out))-sum(h_in(1:N_in)) 
    235 ! Should be able to remove the next IF/ELSEIF statement once scale factors are dealt with properly 
    236                  if (h_diff < -1.e4) then 
    237                     print *,'CHECK YOUR BATHY ...', h_diff, sum(h_out(1:N_out)), sum(h_in(1:N_in)) 
    238 !                    stop 
    239                  endif 
    240               ENDIF 
    241               call reconstructandremap(tabin(1:N_in),h_in(1:N_in),ua(ji,jj,1:N_out),h_out(1:N_out),N_in,N_out) 
    242             ENDDO 
    243          ENDDO 
    244  
    245 # else 
    246          DO jk = 1, jpkm1 
    247             DO jj=j1,j2 
    248             do ji=i1,i2 
    249               if (min(mbkt(ji+1,jj),mbkt(ji,jj))<jk) then 
    250                 e3u_0(ji,jj,jk)=e3t_1d(jk) 
    251               else 
    252                 e3u_0(ji,jj,jk) = MAX(ptab(ji,jj,jk) / ( zrhoy * e2u(ji,jj) ),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)) 
    253               endif 
    254             enddo 
    255                 
    256             END DO 
    257          END DO 
    258 # endif 
    259  
    260       ENDIF 
    261       !  
    262    END SUBROUTINE connect_e3u 
    263     
    264    SUBROUTINE connect_e3v( ptab, i1, i2, j1, j2, k1, k2, before, nb, ndir ) 
    265    USE dom_oce 
    266       !!---------------------------------------------------------------------- 
    267       !!                  *** ROUTINE interpvn *** 
    268       !!---------------------------------------------------------------------- 
    269       ! 
    270       INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 
    271       REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: ptab 
    272       LOGICAL, INTENT(in) :: before 
    273       INTEGER, INTENT(in) :: nb , ndir 
    274       ! 
    275       INTEGER :: ji,jj,jk 
    276       REAL(wp) :: zrhox 
    277       ! vertical interpolation: 
    278       REAL(wp), DIMENSION(k1:k2) :: tabin, h_in 
    279       REAL(wp), DIMENSION(1:jpk) :: h_out 
    280       INTEGER  :: N_in, N_out, jref 
    281       REAL(wp) :: h_diff 
    282       LOGICAL  :: northern_side,southern_side 
    283       !!---------------------------------------------     
    284       !       
    285       IF (before) THEN           
    286          DO jk=k1,k2 
     113         DO jj=j1,j2 
     114            DO ji=i1,i2 
     115               bathy_local (ji,jj) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj) 
     116            END DO 
     117         END DO 
     118         ! 
     119         DO jk=1,jpk 
    287120            DO jj=j1,j2 
    288121               DO ji=i1,i2 
    289                  if (min(mbkt(ji,jj),mbkt(ji,jj+1))<jk) then 
    290                   ptab(ji,jj,jk) = 0. 
    291                  else 
    292                   ptab(ji,jj,jk) = (e1v(ji,jj) * e3v_0(ji,jj,jk)) 
    293                  endif 
    294 # if defined key_vertical 
    295                   ptab(ji,jj,jk,2) = vmask(ji,jj,jk) * e1v(ji,jj) * e3v_n(ji,jj,jk) 
    296 # endif 
    297                END DO 
    298             END DO 
    299          END DO 
    300       ELSE        
    301          zrhox = Agrif_rhox() 
    302 # if defined key_vertical 
    303  
    304          southern_side = (nb == 2).AND.(ndir == 1) 
    305          northern_side = (nb == 2).AND.(ndir == 2) 
    306  
    307          DO jj=j1,j2 
    308             jref = jj 
    309             IF (southern_side) jref = MAX(2,jj) 
    310             IF (northern_side) jref = MIN(nlcj-2,jj) 
    311             DO ji=i1,i2 
    312                N_in = 0 
    313                DO jk=k1,k2 
    314                   if (ptab(ji,jj,jk,2) == 0) EXIT 
    315                   N_in = N_in + 1 
    316                   tabin(jk) = ptab(ji,jj,jk,1)/ptab(ji,jj,jk,2) 
    317                   h_in(N_in) = ptab(ji,jj,jk,2)/(e1v(ji,jj)*zrhox) 
    318                END DO 
    319                IF (N_in == 0) THEN 
    320                   va(ji,jj,:) = 0._wp 
    321                   CYCLE 
    322                ENDIF 
    323           
    324                N_out = 0 
    325                DO jk=1,jpk 
    326                   if (vmask(ji,jref,jk) == 0) EXIT 
    327                   N_out = N_out + 1 
    328                   h_out(N_out) = e3v_a(ji,jref,jk) 
    329                END DO 
    330                IF (N_out == 0) THEN 
    331                  va(ji,jj,:) = 0._wp 
    332                  CYCLE 
    333                ENDIF 
    334                call reconstructandremap(tabin(1:N_in),h_in(1:N_in),va(ji,jj,1:N_out),h_out(1:N_out),N_in,N_out) 
    335             END DO 
    336          END DO 
    337 # else 
    338          DO jk = 1, jpkm1 
    339           DO jj=j1,j2 
    340           DO ji=i1,i2 
    341               if (min(mbkt(ji,jj),mbkt(ji,jj+1))<jk) then 
    342                 e3v_0(ji,jj,jk)=e3t_1d(jk) 
    343               else 
    344                 e3v_0(ji,jj,jk) = MAX(ptab(ji,jj,jk) / ( zrhox * e1v(ji,jj) ),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)) 
    345               endif 
    346           ENDDO 
    347           ENDDO 
    348          END DO 
    349 # endif 
    350       ENDIF 
    351       !         
    352    END SUBROUTINE connect_e3v 
     122                  IF( e3t_interp(ji,jj,jk) == -10 ) THEN ! the connection has not yet been done 
     123                     e3t_interp(ji,jj,jk) = MAX( ptab(ji,jj,jk),MIN(e3zps_min, e3t_1d(jk)*e3zps_rat) ) 
     124                     e3t_interp(ji,jj,jk) = MIN( e3t_interp(ji,jj,jk),e3t_1d(jk) ) 
     125                     e3t_0(ji,jj,jk) = ztabramp(ji,jj)*e3t_0(ji,jj,jk)+(1.-ztabramp(ji,jj))*e3t_interp(ji,jj,jk) 
     126                  ENDIF 
     127             END DO 
     128           END DO 
     129         END DO 
     130      ENDIF 
     131      ! 
     132   END SUBROUTINE connect_e3t_connect 
     133    
     134   SUBROUTINE agrif_connection 
     135      !!---------------------------------------------------------------------- 
     136      !!                 *** ROUTINE  Agrif_connection *** 
     137      !!---------------------------------------------------------------------- 
     138      INTEGER  ::   ji, jj, ind1, ind2 
     139      INTEGER  ::   ispongearea, istart 
     140      REAL(wp) ::   z1_spongearea 
     141      !!---------------------------------------------------------------------- 
     142      ! 
     143      ! Define ramp from boundaries towards domain interior at T-points 
     144      ! Store it in ztabramp 
     145 
     146      ALLOCATE(ztabramp(jpi,jpj)) 
     147      ispongearea = 1 + npt_connect * Agrif_irhox() 
     148      istart = npt_copy * Agrif_irhox() 
     149      z1_spongearea = 1._wp / REAL( ispongearea, wp ) 
     150       
     151      ztabramp(:,:) = 0._wp 
     152 
     153      ! --- West --- ! 
     154      IF( ((nbondi == -1) .OR. (nbondi == 2) ).AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6)) THEN 
     155         ind1 = 1+nbghostcells + istart 
     156         ind2 = ind1 + ispongearea  
     157         DO jj = 1, jpj 
     158            DO ji = ind1, ind2                 
     159               ztabramp(ji,jj) = REAL( ind2 - ji ) * z1_spongearea * umask(ind1,jj,1) 
     160            END DO 
     161         ENDDO 
     162      ENDIF 
     163 
     164      ! --- East --- ! 
     165      IF( ((nbondi == 1) .OR. (nbondi == 2) ).AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6)) THEN 
     166         ind2 = nlci - nbghostcells - istart 
     167         ind1 = ind2 -ispongearea        
     168         DO jj = 1, jpj 
     169            DO ji = ind1, ind2 
     170               ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL( ji - ind1 ) * z1_spongearea * umask(ind2-1,jj,1) ) 
     171            ENDDO 
     172         ENDDO 
     173      ENDIF 
     174 
     175      ! --- South --- ! 
     176      IF(( (nbondj == -1) .OR. (nbondj == 2) ).AND.(ln_bry_south)) THEN 
     177         ind1 = 1+nbghostcells + istart 
     178         ind2 = ind1 + ispongearea  
     179         DO jj = ind1, ind2  
     180            DO ji = 1, jpi 
     181               ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL( ind2 - jj ) * z1_spongearea * vmask(ji,ind1,1) ) 
     182            END DO 
     183         ENDDO 
     184      ENDIF 
     185 
     186      ! --- North --- ! 
     187      IF( (nbondj == 1) .OR. (nbondj == 2) ) THEN 
     188         ind2 = nlcj - nbghostcells - istart 
     189         ind1 = ind2 -ispongearea          
     190         DO jj = ind1, ind2 
     191            DO ji = 1, jpi 
     192               ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL( jj - ind1 ) * z1_spongearea * vmask(ji,ind2-1,1) ) 
     193            END DO 
     194         ENDDO 
     195      ENDIF 
     196      ! 
     197   END SUBROUTINE agrif_connection 
    353198 
    354199#else 
    355 subroutine agrif_boundary_connections_empty 
    356 end subroutine agrif_boundary_connections_empty 
     200   SUBROUTINE agrif_boundary_connections 
     201   END SUBROUTINE agrif_boundary_connections 
    357202#endif 
     203 
     204END MODULE agrif_connect 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_dom_update.F90

    r13055 r13056  
     1MODULE agrif_dom_update 
     2 
     3   USE dom_oce 
     4   USE domzgr 
     5   USE agrif_parameters 
     6   USE agrif_profiles 
     7    
     8   IMPLICIT none 
     9   PRIVATE 
     10 
     11   PUBLIC agrif_update_all 
     12 
     13CONTAINS  
     14 
    115#if defined key_agrif 
    2 subroutine agrif_update_all 
    3 USE agrif_parameters 
    4 USE agrif_profiles 
    5 external update_bottom_level, update_e3t, update_e3u, update_e3v 
    616 
    7 if (agrif_root()) return 
     17   SUBROUTINE agrif_update_all 
     18      !!---------------------------------------------------------------------- 
     19      !!                  ***  ROUTINE agrif_update_all  *** 
     20      !!----------------------------------------------------------------------   
     21      ! 
     22      IF( Agrif_Root() ) return 
    823 
    9 call agrif_update_variable(bottom_level_id,locupdate=(/npt_copy,0/),procname = update_bottom_level) 
     24      CALL agrif_update_variable(bottom_level_id,locupdate=(/npt_copy,0/),procname = update_bottom_level) 
     25      ! 
     26      Agrif_UseSpecialValueInUpdate = .TRUE. 
     27      Agrif_SpecialValueFineGrid    = 0._wp          
     28      CALL agrif_update_variable(e3t_id,procname = update_e3t) 
     29      Agrif_UseSpecialValueInUpdate = .FALSE. 
     30      !     
     31   END SUBROUTINE agrif_update_all 
    1032 
    11  
    12       Agrif_UseSpecialValueInUpdate = .TRUE. 
    13       Agrif_SpecialValueFineGrid    = 0._wp 
    14        
    15 call agrif_update_variable(e3t_id,procname = update_e3t) 
    16       Agrif_UseSpecialValueInUpdate = .FALSE. 
    17  
    18 !call agrif_update_variable(e3u_id,procname = update_e3u) 
    19 !call agrif_update_variable(e3v_id,procname = update_e3v) 
    20        
    21 end subroutine agrif_update_all 
    22  
    23     SUBROUTINE update_bottom_level( ptab, i1, i2, j1, j2, before, nb,ndir) 
    24     USE dom_oce 
    25     USE domzgr 
     33   SUBROUTINE update_bottom_level( ptab, i1, i2, j1, j2, before, nb,ndir) 
    2634      !!---------------------------------------------------------------------- 
    2735      !!                  ***  ROUTINE interpsshn  *** 
     
    3139      LOGICAL                         , INTENT(in   ) ::   before 
    3240      INTEGER                         , INTENT(in   ) ::   nb , ndir 
    33       LOGICAL  ::   western_side, eastern_side,northern_side,southern_side 
    3441      ! 
    3542      !!----------------------------------------------------------------------  
    36       INTEGER :: ji,jj      
    3743      ! 
    38          western_side  = (nb == 1).AND.(ndir == 1) 
    39          eastern_side  = (nb == 1).AND.(ndir == 2) 
    40          southern_side = (nb == 2).AND.(ndir == 1) 
    41          northern_side = (nb == 2).AND.(ndir == 2) 
    42  
    4344      IF( before) THEN 
    4445         ptab(i1:i2,j1:j2) = mbkt(i1:i2,j1:j2)*ssmask(i1:i2,j1:j2) 
     
    4647         mbkt(i1:i2,j1:j2) = nint(ptab(i1:i2,j1:j2)) 
    4748          
    48          WHERE (mbkt(i1:i2,j1:j2)==0) 
    49            ssmask(i1:i2,j1:j2) = 0. 
     49         WHERE ( mbkt(i1:i2,j1:j2) .EQ. 0 ) 
     50            ssmask(i1:i2,j1:j2) = 0. 
    5051         ELSEWHERE 
    51            ssmask(i1:i2,j1:j2) = 1. 
    52          END WHERE 
    53             
     52            ssmask(i1:i2,j1:j2) = 1. 
     53         END WHERE            
    5454      ENDIF 
    5555      ! 
     
    5757    
    5858   SUBROUTINE update_e3t( tabres, i1, i2, j1, j2, k1, k2,  before ) 
    59    USE dom_oce 
    60    implicit none 
    6159      !!--------------------------------------------- 
    62       !!           *** update_e3t updateT *** 
     60      !!           *** update_e3t *** 
    6361      !!--------------------------------------------- 
    6462      INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 
     
    7068      ! 
    7169      IF (before) THEN 
    72             DO jk=k1,k2 
    73                DO jj=j1,j2 
    74                   DO ji=i1,i2 
    75                    if (mbkt(ji,jj) <= jk) then 
    76                      tabres(ji,jj,jk) = e3t_0(ji,jj,jk) 
    77                    else 
    78                      tabres(ji,jj,jk) = 0. 
     70         DO jk=k1,k2 
     71            DO jj=j1,j2 
     72               DO ji=i1,i2 
     73                   IF( mbkt(ji,jj) .LE. jk ) THEN 
     74                      tabres(ji,jj,jk) = e3t_0(ji,jj,jk) 
     75                   ELSE 
     76                      tabres(ji,jj,jk) = 0. 
    7977                   endif 
    80                   END DO 
    8178               END DO 
    8279            END DO 
    83       ELSE 
    84             DO jk=k1,k2 
    85                DO jj=j1,j2 
    86                   DO ji=i1,i2 
    87                    if (mbkt(ji,jj) <= jk) then 
    88                      e3t_0(ji,jj,jk) = MAX(tabres(ji,jj,jk),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)) 
    89                    else 
    90                      e3t_0(ji,jj,jk) = e3t_1d(jk) 
    91                    endif 
    92                   END DO 
    93                END DO 
    94             END DO 
    95          ! 
    96       ENDIF 
    97       !  
    98    END SUBROUTINE update_e3t 
    99     
    100    SUBROUTINE update_e3u( tabres, i1, i2, j1, j2, k1, k2, before ) 
    101    USE dom_oce 
    102    implicit none 
    103       !!--------------------------------------------- 
    104       !!           *** ROUTINE update_e3u *** 
    105       !!--------------------------------------------- 
    106       INTEGER                               , INTENT(in   ) :: i1, i2, j1, j2, k1, k2 
    107       REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres 
    108       LOGICAL                                     , INTENT(in   ) :: before 
    109       ! 
    110       INTEGER  :: ji, jj, jk 
    111       REAL :: zrhoy 
    112       !!--------------------------------------------- 
    113       !  
    114       IF( before ) THEN 
    115          zrhoy = Agrif_Rhoy() 
    116          DO jk = k1, k2 
    117           do jj=j1,j2 
    118           do ji=i1,i2 
    119            if (min(mbkt(ji,jj),mbkt(ji+1,jj))<=jk) then 
    120             tabres(ji,jj,jk) = zrhoy * e2u(ji,jj) * MIN(e3zps_min,e3t_1d(jk)*e3zps_rat) 
    121            else 
    122             tabres(ji,jj,jk) = zrhoy * e2u(ji,jj) * e3u_0(ji,jj,jk) 
    123            endif 
    124           enddo 
    125           enddo 
    12680         END DO 
    12781      ELSE 
     
    12983            DO jj=j1,j2 
    13084               DO ji=i1,i2 
    131                  if (min(mbkt(ji,jj),mbkt(ji+1,jj))<=jk) then 
    132                    e3u_0(ji,jj,jk)=MAX(tabres(ji,jj,jk) / e2u(ji,jj),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)) 
    133                  else 
    134                    e3u_0(ji,jj,jk) = e3t_1d(jk) 
    135                  endif 
     85                   IF( mbkt(ji,jj) .LE.jk ) THEN 
     86                      e3t_0(ji,jj,jk) = MAX(tabres(ji,jj,jk),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)) 
     87                   ELSE 
     88                      e3t_0(ji,jj,jk) = e3t_1d(jk) 
     89                   ENDIF 
    13690               END DO 
    13791            END DO 
     
    14094      ENDIF 
    14195      !  
    142    END SUBROUTINE update_e3u 
    143     
    144    SUBROUTINE update_e3v( tabres, i1, i2, j1, j2, k1, k2, before ) 
    145    USE dom_oce 
    146    implicit none 
    147       !!--------------------------------------------- 
    148       !!           *** ROUTINE update_e3v *** 
    149       !!--------------------------------------------- 
    150       INTEGER                               , INTENT(in   ) :: i1, i2, j1, j2, k1, k2 
    151       REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres 
    152       LOGICAL                                     , INTENT(in   ) :: before 
    153       ! 
    154       INTEGER  :: ji, jj, jk 
    155       REAL :: zrhox 
    156       !!--------------------------------------------- 
    157       !  
    158       IF( before ) THEN 
    159          zrhox = Agrif_Rhox() 
    160          DO jk = k1, k2 
    161           do jj=j1,j2 
    162           do ji=i1,i2 
    163            if (min(mbkt(ji,jj),mbkt(ji,jj+1))<=jk) then 
    164             tabres(ji,jj,jk) = zrhox * e1v(ji,jj) * MIN(e3zps_min,e3t_1d(jk)*e3zps_rat) 
    165            else 
    166             tabres(ji,jj,jk) = zrhox * e1v(ji,jj) * e3v_0(ji,jj,jk) 
    167            endif 
    168           enddo 
    169           enddo 
    170          END DO 
    171       ELSE 
    172          DO jk=k1,k2 
    173             DO jj=j1,j2 
    174                DO ji=i1,i2 
    175                  if (min(mbkt(ji,jj),mbkt(ji,jj+1))<=jk) then 
    176                    e3v_0(ji,jj,jk)=MAX(tabres(ji,jj,jk) / e1v(ji,jj),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)) 
    177                  else 
    178                    e3v_0(ji,jj,jk) = e3t_1d(jk) 
    179                  endif 
    180                END DO 
    181             END DO 
    182          END DO 
    183          ! 
    184       ENDIF 
    185       !  
    186    END SUBROUTINE update_e3v 
    187     
     96   END SUBROUTINE update_e3t 
     97       
    18898#else 
    189 subroutine agrif_update_all_empty 
    190 end subroutine agrif_update_all_empty 
     99   SUBROUTINE agrif_update_all 
     100   END SUBROUTINE agrif_update_all 
    191101#endif 
     102 
     103END MODULE agrif_dom_update 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_domzgr.F90

    r13024 r13056  
     1MODULE agrif_domzgr 
     2 
     3   USE agrif_profiles 
     4   USE dom_oce 
     5 
     6   IMPLICIT NONE 
     7   PRIVATE 
     8   
     9   PUBLIC :: agrif_create_bathy_meter 
     10  
     11 
     12CONTAINS 
     13 
    114#if defined key_agrif 
    2 subroutine agrif_domzgr 
    3 end subroutine agrif_domzgr 
    415 
    5 subroutine agrif_create_bathy_meter 
    6 use agrif_profiles 
    7 external :: init_bathy 
     16   SUBROUTINE agrif_create_bathy_meter 
    817 
    9 call Agrif_Init_variable(bathy_id, procname = init_bathy) 
     18      CALL Agrif_Init_variable(bathy_id, procname = init_bathy) 
    1019 
    11 end subroutine agrif_create_bathy_meter 
     20   END SUBROUTINE agrif_create_bathy_meter 
    1221 
    13     SUBROUTINE init_bathy( ptab, i1, i2, j1, j2, before, nb,ndir) 
    14     use dom_oce 
     22   SUBROUTINE init_bathy( ptab, i1, i2, j1, j2, before, nb,ndir) 
    1523      !!---------------------------------------------------------------------- 
    1624      !!                  ***  ROUTINE interpsshn  *** 
     
    2028      LOGICAL                         , INTENT(in   ) ::   before 
    2129      INTEGER                         , INTENT(in   ) ::   nb , ndir 
    22       LOGICAL  ::   western_side, eastern_side,northern_side,southern_side 
    2330      ! 
    2431      !!----------------------------------------------------------------------   
    2532      INTEGER :: ji,jj 
    26       ! 
    27          western_side  = (nb == 1).AND.(ndir == 1) 
    28          eastern_side  = (nb == 1).AND.(ndir == 2) 
    29          southern_side = (nb == 2).AND.(ndir == 1) 
    30          northern_side = (nb == 2).AND.(ndir == 2) 
     33 
    3134      IF( before) THEN 
    3235         ptab(i1:i2,j1:j2) = bathy(i1:i2,j1:j2) 
    33  
    34          do jj=j1,j2 
    35             do ji=i1,i2 
    36          ptab(ji,jj) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj) 
    37       enddo 
    38       enddo 
     36         DO jj=j1,j2 
     37            DO ji=i1,i2 
     38               ptab(ji,jj) = SUM( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj) 
     39            END DO 
     40         END DO 
    3941      ELSE 
    4042         bathy(i1:i2,j1:j2)=ptab 
     
    4244      ! 
    4345   END SUBROUTINE init_bathy 
     46 
    4447#else 
    45 subroutine agrif_domzgr_empty 
    46 end subroutine agrif_domzgr_empty 
     48   SUBROUTINE agrif_create_bathy_meter 
     49   END SUBROUTINE agrif_create_bathy_meter 
    4750#endif 
     51END MODULE agrif_domzgr 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_modutil.f90

    r13024 r13056  
    1 ! 
    21MODULE agrif_modutil 
    32  ! 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_parameters.F90

    r13024 r13056  
    1 #ifdef key_agrif 
    2 module agrif_parameters 
    3 USE par_kind 
     1MODULE agrif_parameters 
     2    
     3   USE par_kind 
    44 
    5 INTEGER :: nn_cln_update 
    6 LOGICAL :: ln_spc_dyn 
    7 REAL(wp) :: rn_sponge_tra 
    8 REAL(wp) :: rn_sponge_dyn 
    9 LOGICAL :: ln_chk_bathy 
    10 INTEGER :: npt_copy 
    11 INTEGER :: npt_connect 
    12 LOGICAL :: ln_bry_south = .TRUE. 
    13 REAL(wp), PUBLIC, ALLOCATABLE, SAVE        , DIMENSION(:,:) ::   ztabramp 
    14 REAL(wp), PUBLIC, ALLOCATABLE, SAVE        , DIMENSION(:,:,:) ::   e3t_interp 
     5   PUBLIC  
    156 
    16 end module agrif_parameters 
    17 #else 
    18 subroutine agrif_parameters_empty 
    19 end subroutine agrif_parameters_empty 
     7#if defined key_agrif 
     8 
     9   INTEGER :: nn_cln_update 
     10   LOGICAL :: ln_spc_dyn 
     11   REAL(wp) :: rn_sponge_tra 
     12   REAL(wp) :: rn_sponge_dyn 
     13   LOGICAL :: ln_chk_bathy 
     14   INTEGER :: npt_copy 
     15   INTEGER :: npt_connect 
     16   LOGICAL :: ln_bry_south = .TRUE. 
     17   REAL(wp), PUBLIC, ALLOCATABLE, SAVE        , DIMENSION(:,:) ::   ztabramp 
     18   REAL(wp), PUBLIC, ALLOCATABLE, SAVE        , DIMENSION(:,:,:) ::   e3t_interp 
     19 
    2020#endif 
     21 
     22END MODULE agrif_parameters 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_profiles.F90

    r12414 r13056  
    1 module agrif_profiles 
     1MODULE agrif_profiles 
    22 
    3 integer :: glamt_id, glamu_id, glamv_id,glamf_id 
    4 integer :: gphit_id, gphiu_id, gphiv_id,gphif_id 
    5 integer :: e1t_id, e1u_id, e1v_id, e1f_id 
    6 integer :: e2t_id, e2u_id, e2v_id, e2f_id 
     3  PUBLIC 
     4 
     5#if defined key_agrif 
     6 
     7INTEGER :: glamt_id, glamu_id, glamv_id,glamf_id 
     8INTEGER :: gphit_id, gphiu_id, gphiv_id,gphif_id 
     9INTEGER :: e1t_id, e1u_id, e1v_id, e1f_id 
     10INTEGER :: e2t_id, e2u_id, e2v_id, e2f_id 
    711 
    812 
    9 integer :: bathy_id 
     13INTEGER :: bathy_id 
    1014 
    1115! Vertical scale factors 
    1216 
    13 integer :: e3t_id 
    14 integer :: e3t_copy_id 
    15 integer :: e3t_connect_id 
    16 integer :: e3u_id, e3v_id 
     17INTEGER :: e3t_id 
     18INTEGER :: e3t_copy_id 
     19INTEGER :: e3t_connect_id 
     20INTEGER :: e3u_id, e3v_id 
    1721 
    1822! Bottom level 
    19 integer :: bottom_level_id 
    20 end module agrif_profiles 
     23INTEGER :: bottom_level_id 
     24 
     25# endif 
     26END MODULE agrif_profiles 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_recompute_scales.F90

    r13055 r13056  
    1 #if defined key_agrif 
    2 subroutine agrif_recompute_scalefactors 
     1MODULE agrif_recompute_scales 
     2 
    33   USE dom_oce 
    44   USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    55   USE lib_mpp 
    6 implicit none 
    7 INTEGER :: ji,jj,jk,ikb,ikt 
     6 
     7   IMPLICiT NONE 
     8 
     9   PRIVATE 
     10 
     11   PUBLIC agrif_recompute_scalefactors 
     12 
     13CONTAINS 
     14 
     15#if defined key_agrif 
     16   SUBROUTINE agrif_recompute_scalefactors 
     17      !!---------------------------------------------------------------------- 
     18      !!                     ***  ROUTINE nemo_gcm  *** 
     19      !!---------------------------------------------------------------------- 
     20      ! 
     21      INTEGER :: ji, jj, jk, ikb, ikt 
    822 
    923      ! Scale factors and depth at U-, V-, UW and VW-points 
     
    8599      IF( MINVAL( gdept_0(:,:,:) ) <  0._wp )   CALL ctl_stop( '    zgr_zps :   e r r o r   gdept_0 <  0' ) 
    86100      IF( MINVAL( gdepw_0(:,:,:) ) <  0._wp )   CALL ctl_stop( '    zgr_zps :   e r r o r   gdepw_0 <  0' ) 
    87        
    88 end subroutine agrif_recompute_scalefactors 
     101      !  
     102   END SUBROUTINE agrif_recompute_scalefactors 
    89103#else 
    90 subroutine agrif_recompute_scalefactors_empty 
    91 end subroutine agrif_recompute_scalefactors_empty 
     104   SUBROUTINE agrif_recompute_scalefactors 
     105   END SUBROUTINE agrif_recompute_scalefactors 
    92106#endif 
     107END MODULE agrif_recompute_scales     
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_user.F90

    r13024 r13056  
    11#if defined key_agrif 
     2   SUBROUTINE agrif_user() 
     3      !!---------------------------------------------------------------------- 
     4      !!                 *** ROUTINE agrif_user *** 
     5      !!---------------------------------------------------------------------- 
     6   END SUBROUTINE agrif_user 
     7 
    28   SUBROUTINE agrif_initworkspace() 
    39      !!---------------------------------------------------------------------- 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/daymod.f90

    r13024 r13056  
    2828   ! 
    2929   USE in_out_manager ! I/O manager 
    30    USE prtctl         ! Print control 
    3130   USE iom            ! 
    32    USE timing         ! Timing 
    3331 
    3432   IMPLICIT NONE 
     
    3634 
    3735   PUBLIC   day        ! called by step.F90 
    38    PUBLIC   day_init   ! called by istate.F90 
    3936   PUBLIC   day_mth    ! Needed by TAM 
    4037 
     
    4744   !!---------------------------------------------------------------------- 
    4845CONTAINS 
    49  
    50    SUBROUTINE day_init 
    51       !!---------------------------------------------------------------------- 
    52       !!                   ***  ROUTINE day_init  *** 
    53       !! 
    54       !! ** Purpose :   Initialization of the calendar values to their values 1 time step before nit000 
    55       !!                because day will be called at the beginning of step 
    56       !! 
    57       !! ** Action  : - nyear        : current year 
    58       !!              - nmonth       : current month of the year nyear 
    59       !!              - nday         : current day of the month nmonth 
    60       !!              - nday_year    : current day of the year nyear 
    61       !!              - nsec_year    : current time step counted in second since 00h jan 1st of the current year 
    62       !!              - nsec_month   : current time step counted in second since 00h 1st day of the current month 
    63       !!              - nsec_day     : current time step counted in second since 00h of the current day 
    64       !!              - nsec1jan000  : second since Jan. 1st 00h of nit000 year and Jan. 1st 00h of the current year 
    65       !!              - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth 
    66       !!---------------------------------------------------------------------- 
    67       INTEGER  ::   inbday, idweek   ! local integers 
    68       REAL(wp) ::   zjul             ! local scalar 
    69       !!---------------------------------------------------------------------- 
    70       ! 
    71       ! max number of seconds between each restart 
    72       IF( REAL( nitend - nit000 + 1 ) * rdt > REAL( HUGE( nsec1jan000 ) ) ) THEN 
    73          CALL ctl_stop( 'The number of seconds between each restart exceeds the integer 4 max value: 2^31-1. ',   & 
    74             &           'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 
    75       ENDIF 
    76       nsecd   = NINT( rday       ) 
    77       nsecd05 = NINT( 0.5 * rday ) 
    78       ndt     = NINT(       rdt  ) 
    79       ndt05   = NINT( 0.5 * rdt  ) 
    80  
    81  
    82       ! set the calandar from ndastp (read in restart file and namelist) 
    83       nyear   =   ndastp / 10000 
    84       nmonth  = ( ndastp - (nyear * 10000) ) / 100 
    85       nday    =   ndastp - (nyear * 10000) - ( nmonth * 100 ) 
    86  
    87       nhour   =   nn_time0 / 100 
    88       nminute = ( nn_time0 - nhour * 100 ) 
    89  
    90       CALL ymds2ju( nyear, nmonth, nday, nhour*3600._wp+nminute*60._wp, fjulday )   
    91       IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < 0.1 / rday )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    92       IF( nn_time0*3600 - ndt05 .lt. 0 ) fjulday = fjulday + 1.                    ! move back to the day at nit000 (and not at nit000 - 1) 
    93  
    94       nsec1jan000 = 0 
    95       CALL day_mth 
    96  
    97       IF ( nday == 0 ) THEN     !   for ex if ndastp = ndate0 - 1 
    98          nmonth = nmonth - 1 
    99          nday = nmonth_len(nmonth) 
    100       ENDIF 
    101       IF ( nmonth == 0 ) THEN   ! go at the end of previous year 
    102          nmonth = 12 
    103          nyear = nyear - 1 
    104          nsec1jan000 = nsec1jan000 - nsecd * nyear_len(0) 
    105          IF( nleapy == 1 )   CALL day_mth 
    106       ENDIF 
    107  
    108       ! day since january 1st 
    109       nday_year = nday + SUM( nmonth_len(1:nmonth - 1) ) 
    110  
    111       !compute number of days between last monday and today 
    112       CALL ymds2ju( 1900, 01, 01, 0.0, zjul )  ! compute julian day value of 01.01.1900 (our reference that was a Monday) 
    113       inbday = FLOOR(fjulday - zjul)            ! compute nb day between  01.01.1900 and start of current day 
    114       idweek = MOD(inbday, 7)                  ! compute nb day between last monday and current day 
    115       IF (idweek .lt. 0) idweek=idweek+7       ! Avoid negative values for dates before 01.01.1900 
    116  
    117       ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step 
    118       IF (nhour*3600+nminute*60-ndt05 .gt. 0) THEN 
    119          ! 1 timestep before current middle of first time step is still the same day 
    120          nsec_year  = (nday_year-1) * nsecd + nhour*3600+nminute*60 - ndt05  
    121          nsec_month = (nday-1)      * nsecd + nhour*3600+nminute*60 - ndt05     
    122       ELSE 
    123          ! 1 time step before the middle of the first time step is the previous day  
    124          nsec_year  = nday_year * nsecd + nhour*3600+nminute*60 - ndt05  
    125          nsec_month = nday      * nsecd + nhour*3600+nminute*60 - ndt05    
    126       ENDIF 
    127       nsec_week  = idweek    * nsecd + nhour*3600+nminute*60 - ndt05 
    128       nsec_day   =             nhour*3600+nminute*60 - ndt05  
    129       IF( nsec_day .lt. 0 ) nsec_day = nsec_day + nsecd 
    130       IF( nsec_week .lt. 0 ) nsec_week = nsec_week + nsecd*7 
    131  
    132       ! control print 
    133       IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8,a,i8,a,i8)')   & 
    134            &                   ' =======>> 1/2 time step before the start of the run DATE Y/M/D = ',   & 
    135            &                   nyear, '/', nmonth, '/', nday, '  nsec_day:', nsec_day, '  nsec_week:', nsec_week, '  & 
    136            &                   nsec_month:', nsec_month , '  nsec_year:' , nsec_year 
    137  
    138       ! Up to now, calendar parameters are related to the end of previous run (nit000-1) 
    139       ! call day to set the calendar parameters at the begining of the current simulaton. needed by iom_init 
    140       CALL day( nit000 ) 
    141       ! 
    142       IF( lwxios ) THEN 
    143 ! define variables in restart file when writing with XIOS 
    144           CALL iom_set_rstw_var_active('kt') 
    145           CALL iom_set_rstw_var_active('ndastp') 
    146           CALL iom_set_rstw_var_active('adatrj') 
    147           CALL iom_set_rstw_var_active('ntime') 
    148       ENDIF 
    149  
    150    END SUBROUTINE day_init 
    151  
    15246 
    15347   SUBROUTINE day_mth 
     
    228122      !!---------------------------------------------------------------------- 
    229123      ! 
    230       IF( ln_timing )   CALL timing_start('day') 
    231       ! 
    232124      zprec = 0.1 / rday 
    233125      !                                                 ! New time-step 
     
    273165 
    274166      IF( nsec_week > 7*nsecd )   nsec_week = ndt05     ! New week 
    275  
    276       IF(ln_ctl) THEN 
    277          WRITE(charout,FMT="('kt =', I4,'  d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 
    278          CALL prt_ctl_info(charout) 
    279       ENDIF 
    280  
    281       IF( lrst_oce         ) CALL day_rst( kt, 'WRITE' )      ! write day restart information 
    282       ! 
    283       IF( ln_timing )   CALL timing_stop('day') 
    284167      ! 
    285168   END SUBROUTINE day 
    286169 
    287  
    288    SUBROUTINE day_rst( kt, cdrw ) 
    289       !!--------------------------------------------------------------------- 
    290       !!                   ***  ROUTINE day_rst  *** 
    291       !! 
    292       !!  ** Purpose : Read or write calendar in restart file: 
    293       !! 
    294       !!  WRITE(READ) mode: 
    295       !!       kt        : number of time step since the begining of the experiment at the 
    296       !!                   end of the current(previous) run 
    297       !!       adatrj(0) : number of elapsed days since the begining of the experiment at the 
    298       !!                   end of the current(previous) run (REAL -> keep fractions of day) 
    299       !!       ndastp    : date at the end of the current(previous) run (coded as yyyymmdd integer) 
    300       !! 
    301       !!   According to namelist parameter nrstdt, 
    302       !!       nrstdt = 0  no control on the date (nit000 is  arbitrary). 
    303       !!       nrstdt = 1  we verify that nit000 is equal to the last 
    304       !!                   time step of previous run + 1. 
    305       !!       In both those options, the  exact duration of the experiment 
    306       !!       since the beginning (cumulated duration of all previous restart runs) 
    307       !!       is not stored in the restart and is assumed to be (nit000-1)*rdt. 
    308       !!       This is valid is the time step has remained constant. 
    309       !! 
    310       !!       nrstdt = 2  the duration of the experiment in days (adatrj) 
    311       !!                    has been stored in the restart file. 
    312       !!---------------------------------------------------------------------- 
    313       INTEGER         , INTENT(in) ::   kt         ! ocean time-step 
    314       CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag 
    315       ! 
    316       REAL(wp) ::   zkt, zndastp, zdayfrac, ksecs, ktime 
    317       INTEGER  ::   ihour, iminute 
    318       !!---------------------------------------------------------------------- 
    319  
    320       IF( TRIM(cdrw) == 'READ' ) THEN 
    321  
    322          IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 
    323             ! Get Calendar informations 
    324             CALL iom_get( numror, 'kt', zkt, ldxios = lrxios )   ! last time-step of previous run 
    325             IF(lwp) THEN 
    326                WRITE(numout,*) ' *** Info read in restart : ' 
    327                WRITE(numout,*) '   previous time-step                               : ', NINT( zkt ) 
    328                WRITE(numout,*) ' *** restart option' 
    329                SELECT CASE ( nrstdt ) 
    330                CASE ( 0 )   ;   WRITE(numout,*) ' nrstdt = 0 : no control of nit000' 
    331                CASE ( 1 )   ;   WRITE(numout,*) ' nrstdt = 1 : no control the date at nit000 (use ndate0 read in the namelist)' 
    332                CASE ( 2 )   ;   WRITE(numout,*) ' nrstdt = 2 : calendar parameters read in restart' 
    333                END SELECT 
    334                WRITE(numout,*) 
    335             ENDIF 
    336             ! Control of date 
    337             IF( nit000 - NINT( zkt ) /= 1 .AND. nrstdt /= 0 )                                         & 
    338                  &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 & 
    339                  &                  ' verify the restart file or rerun with nrstdt = 0 (namelist)' ) 
    340             ! define ndastp and adatrj 
    341             IF ( nrstdt == 2 ) THEN 
    342                ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 
    343                CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 
    344                ndastp = NINT( zndastp ) 
    345                CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios ) 
    346           CALL iom_get( numror, 'ntime' , ktime  , ldxios = lrxios ) 
    347           nn_time0=INT(ktime) 
    348                ! calculate start time in hours and minutes 
    349           zdayfrac=adatrj-INT(adatrj) 
    350           ksecs = NINT(zdayfrac*86400)        ! Nearest second to catch rounding errors in adatrj          
    351           ihour = INT(ksecs/3600) 
    352           iminute = ksecs/60-ihour*60 
    353             
    354                ! Add to nn_time0 
    355                nhour   =   nn_time0 / 100 
    356                nminute = ( nn_time0 - nhour * 100 ) 
    357           nminute=nminute+iminute 
    358            
    359           IF( nminute >= 60 ) THEN 
    360              nminute=nminute-60 
    361         nhour=nhour+1 
    362           ENDIF 
    363           nhour=nhour+ihour 
    364           IF( nhour >= 24 ) THEN 
    365         nhour=nhour-24 
    366              adatrj=adatrj+1 
    367           ENDIF           
    368           nn_time0 = nhour * 100 + nminute 
    369           adatrj = INT(adatrj)                    ! adatrj set to integer as nn_time0 updated           
    370             ELSE 
    371                ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 
    372                ndastp = ndate0        ! ndate0 read in the namelist in dom_nam 
    373                nhour   =   nn_time0 / 100 
    374                nminute = ( nn_time0 - nhour * 100 ) 
    375                IF( nhour*3600+nminute*60-ndt05 .lt. 0 )  ndastp=ndastp-1      ! Start hour is specified in the namelist (default 0) 
    376                adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    377                ! note this is wrong if time step has changed during run 
    378             ENDIF 
    379          ELSE 
    380             ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 
    381             ndastp = ndate0           ! ndate0 read in the namelist in dom_nam 
    382             nhour   =   nn_time0 / 100 
    383        nminute = ( nn_time0 - nhour * 100 ) 
    384             IF( nhour*3600+nminute*60-ndt05 .lt. 0 )  ndastp=ndastp-1      ! Start hour is specified in the namelist (default 0) 
    385             adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    386          ENDIF 
    387          IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error 
    388          ! 
    389          IF(lwp) THEN 
    390             WRITE(numout,*) ' *** Info used values : ' 
    391             WRITE(numout,*) '   date ndastp                                      : ', ndastp 
    392             WRITE(numout,*) '   number of elapsed days since the begining of run : ', adatrj 
    393        WRITE(numout,*) '   nn_time0                                         : ',nn_time0 
    394             WRITE(numout,*) 
    395          ENDIF 
    396          ! 
    397       ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 
    398          ! 
    399          IF( kt == nitrst ) THEN 
    400             IF(lwp) WRITE(numout,*) 
    401             IF(lwp) WRITE(numout,*) 'rst_write : write oce restart file  kt =', kt 
    402             IF(lwp) WRITE(numout,*) '~~~~~~~' 
    403          ENDIF 
    404          ! calendar control 
    405          IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
    406          CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp)  , ldxios = lwxios )   ! time-step 
    407          CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp)  , ldxios = lwxios )   ! date 
    408          CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj             , ldxios = lwxios            )   ! number of elapsed days since 
    409          !                                                                                                   ! the begining of the run [s] 
    410          CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp), ldxios = lwxios ) ! time 
    411          IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    412       ENDIF 
    413       ! 
    414    END SUBROUTINE day_rst 
    415  
    416170   !!====================================================================== 
    417171END MODULE daymod 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/depth_e3.F90

    r13024 r13056  
    1919   USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    2020   USE lib_mpp           ! distributed memory computing library 
    21    USE timing            ! Timing 
    2221 
    2322   IMPLICIT NONE 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dom_oce.F90

    r13024 r13056  
    9595   !! ---------------------------- 
    9696   !                                   !!* Namelist namdom : time & space domain * 
    97    LOGICAL , PUBLIC ::   ln_linssh      !: =T  linear free surface ==>> model level are fixed in time 
    9897   LOGICAL , PUBLIC ::   ln_meshmask    !: =T  create a mesh-mask file (mesh_mask.nc) 
    9998   REAL(wp), PUBLIC ::   rn_isfhmin     !: threshold to discriminate grounded ice to floating ice 
     
    146145   INTEGER             , PUBLIC ::   narea            !: number for local area 
    147146   INTEGER             , PUBLIC ::   nbondi, nbondj   !: mark of i- and j-direction local boundaries 
    148    INTEGER, ALLOCATABLE, PUBLIC ::   nbondi_bdy(:)    !: mark i-direction local boundaries for BDY open boundaries 
    149    INTEGER, ALLOCATABLE, PUBLIC ::   nbondj_bdy(:)    !: mark j-direction local boundaries for BDY open boundaries 
    150    INTEGER, ALLOCATABLE, PUBLIC ::   nbondi_bdy_b(:)  !: mark i-direction of neighbours local boundaries for BDY open boundaries   
    151    INTEGER, ALLOCATABLE, PUBLIC ::   nbondj_bdy_b(:)  !: mark j-direction of neighbours local boundaries for BDY open boundaries   
    152147 
    153148   INTEGER, PUBLIC ::   npolj             !: north fold mark (0, 3 or 4) 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domain.F90

    r13024 r13056  
    6868      !!---------------------------------------------------------------------- 
    6969      ! 
    70      ! IF( nn_timing == 1 )   CALL timing_start('dom_init') 
    71       ! 
    7270      IF(lwp) THEN 
    7371         WRITE(numout,*) 
     
    105103      !!---------------------------------------------------------------------- 
    106104      USE ioipsl 
    107       NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list,                 & 
    108                        nn_no   , cn_exp   , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl ,     & 
    109          &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     & 
    110          &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
     105      NAMELIST/namrun/ cn_exp   ,    &           
     106         &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  ,     & 
     107         &             ln_mskland  , ln_clobber   , nn_chunksz,     & 
    111108         &             ln_cfmeta, ln_iscpl 
    112   !    NAMELIST/namdom/ nn_bathy, cn_topo, cn_bath, cn_lon, cn_lat, nn_interp,                        & 
    113   !       &             rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,                       & 
    114   !       &             rn_atfp , rn_rdt   , ln_crs      , jphgr_msh ,                                & 
    115   !       &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m,                         & 
    116   !       &             ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh,                  & 
    117   !       &             ppa2, ppkth2, ppacr2 
    118109 
    119110      NAMELIST/namdom/ nn_bathy, cn_topo, cn_bath, cn_lon, cn_lat, rn_scale, nn_interp, & 
     
    149140 
    150141      cexper = cn_exp 
    151       nrstdt = nn_rstctl 
    152142      nit000 = nn_it000 
    153143      nitend = nn_itend 
    154144      ndate0 = nn_date0 
    155145      nleapy = nn_leapy 
    156       ninist = nn_istate 
    157       nstock = nn_stock 
    158       nstocklist = nn_stocklist 
    159       nwrite = nn_write 
    160       neuler = nn_euler 
    161       IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
    162          WRITE(ctmp1,*) 'ln_rstart =.FALSE., nn_euler is forced to 0 ' 
    163          CALL ctl_warn( ctmp1 ) 
    164          neuler = 0 
    165       ENDIF 
    166  
    167       !                             ! control of output frequency 
    168       IF ( nstock == 0 .OR. nstock > nitend ) THEN 
    169          WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
    170          CALL ctl_warn( ctmp1 ) 
    171          nstock = nitend 
    172       ENDIF 
    173       IF ( nwrite == 0 ) THEN 
    174          WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 
    175          CALL ctl_warn( ctmp1 ) 
    176          nwrite = nitend 
    177       ENDIF 
    178  
    179  
    180  
    181  
    182       SELECT CASE ( nleapy )        ! Choose calendar for IOIPSL 
    183       CASE (  1 )  
    184          CALL ioconf_calendar('gregorian') 
    185          IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "gregorian", i.e. leap year' 
    186       CASE (  0 ) 
    187          CALL ioconf_calendar('noleap') 
    188          IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "noleap", i.e. no leap year' 
    189       CASE ( 30 ) 
    190          CALL ioconf_calendar('360d') 
    191          IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "360d", i.e. 360 days in a year' 
    192       END SELECT 
    193  
    194146 
    195147      !  
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dombat.F90

    r13024 r13056  
    77   USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    88   USE lib_mpp           ! distributed memory computing library 
    9    USE timing            ! Timing 
    109#if defined key_agrif 
    1110   USE agrif_modutil 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dombat_util.f90

    r12414 r13056  
    1 ! 
    21MODULE agrif_modutil 
    32  ! 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domcfg.f90

    r12414 r13056  
    9999         WRITE(numout,*) 
    100100         WRITE(numout,*) '   conversion from local to global domain indices (and vise versa) done' 
    101          IF( nn_print >= 1 ) THEN 
    102             WRITE(numout,*) 
    103             WRITE(numout,*) '          conversion local  ==> global i-index domain (mig)' 
    104             WRITE(numout,25)              (mig(ji),ji = 1,jpi) 
    105             WRITE(numout,*) 
    106             WRITE(numout,*) '          conversion global ==> local  i-index domain' 
    107             WRITE(numout,*) '             starting index (mi0)' 
    108             WRITE(numout,25)              (mi0(ji),ji = 1,jpiglo) 
    109             WRITE(numout,*) '             ending index (mi1)' 
    110             WRITE(numout,25)              (mi1(ji),ji = 1,jpiglo) 
    111             WRITE(numout,*) 
    112             WRITE(numout,*) '          conversion local  ==> global j-index domain (mjg)' 
    113             WRITE(numout,25)              (mjg(jj),jj = 1,jpj) 
    114             WRITE(numout,*) 
    115             WRITE(numout,*) '          conversion global ==> local  j-index domain' 
    116             WRITE(numout,*) '             starting index (mj0)' 
    117             WRITE(numout,25)              (mj0(jj),jj = 1,jpjglo) 
    118             WRITE(numout,*) '             ending index (mj1)' 
    119             WRITE(numout,25)              (mj1(jj),jj = 1,jpjglo) 
    120          ENDIF 
     101 
     102!            WRITE(numout,*) 
     103!            WRITE(numout,*) '          conversion local  ==> global i-index domain (mig)' 
     104!            WRITE(numout,25)              (mig(ji),ji = 1,jpi) 
     105!            WRITE(numout,*) 
     106!            WRITE(numout,*) '          conversion global ==> local  i-index domain' 
     107!            WRITE(numout,*) '             starting index (mi0)' 
     108!            WRITE(numout,25)              (mi0(ji),ji = 1,jpiglo) 
     109!            WRITE(numout,*) '             ending index (mi1)' 
     110!            WRITE(numout,25)              (mi1(ji),ji = 1,jpiglo) 
     111!            WRITE(numout,*) 
     112!            WRITE(numout,*) '          conversion local  ==> global j-index domain (mjg)' 
     113!            WRITE(numout,25)              (mjg(jj),jj = 1,jpj) 
     114!            WRITE(numout,*) 
     115!            WRITE(numout,*) '          conversion global ==> local  j-index domain' 
     116!            WRITE(numout,*) '             starting index (mj0)' 
     117!            WRITE(numout,25)              (mj0(jj),jj = 1,jpjglo) 
     118!            WRITE(numout,*) '             ending index (mj1)' 
     119!            WRITE(numout,25)              (mj1(jj),jj = 1,jpjglo) 
    121120      ENDIF 
    122121 25   FORMAT( 100(10x,19i4,/) ) 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domclo.F90

    r13024 r13056  
    1212   USE domngb          ! closest point algorithm 
    1313   USE phycst          ! rpi, rad, ra 
    14    USE domutil         ! flood filling algorithm (fill_pool) 
     14   USE domutl          ! flood filling algorithm (fill_pool) 
    1515   USE in_out_manager  ! I/O manager 
    1616   USE lbclnk          ! lateral boundary condition - MPP exchanges 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domhgr.F90

    r13024 r13056  
    286286         gphi0 = zphi1 + zsin_alpha * ze1deg * REAL( jpjglo-2 , wp ) 
    287287         ! 
    288          IF( nprint==1 .AND. lwp )   THEN 
    289             WRITE(numout,*) '          ze1', ze1, 'cosalpha', zcos_alpha, 'sinalpha', zsin_alpha 
    290             WRITE(numout,*) '          ze1deg', ze1deg, 'glam0', glam0, 'gphi0', gphi0 
    291          ENDIF 
     288    !        WRITE(numout,*) '          ze1', ze1, 'cosalpha', zcos_alpha, 'sinalpha', zsin_alpha 
     289    !        WRITE(numout,*) '          ze1deg', ze1deg, 'glam0', glam0, 'gphi0', gphi0 
    292290         ! 
    293291         DO jj = 1, jpj 
     
    343341      e1_e2v(:,:) = e1v(:,:) / e2v(:,:) 
    344342 
    345       IF( lwp .AND. nn_print >=1 .AND. .NOT.ln_rstart ) THEN      ! Control print : Grid informations (if not restart) 
     343      IF( lwp ) THEN      ! Control print : Grid informations (if not restart) 
    346344         WRITE(numout,*) 
    347345         WRITE(numout,*) '          longitude and e1 scale factors' 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domisf.F90

    r12414 r13056  
    1414   !!--------------------------------------------------------------------- 
    1515   USE dom_oce 
    16    USE domutil           ! flood filling algorithm 
     16   USE domutl            ! flood filling algorithm 
    1717   USE domngb            ! find nearest neighbourg 
    1818   USE in_out_manager    ! I/O manager 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dommsk.F90

    r13024 r13056  
    2727   USE domwri         ! domain: write the meshmask file 
    2828   USE usrdef_fmask   ! user defined fmask 
    29    USE bdy_oce        ! open boundary 
    3029   ! 
    3130   USE in_out_manager ! I/O manager 
     
    9796      !! 
    9897      NAMELIST/namlbc/ rn_shlat, ln_vorlat 
    99       NAMELIST/nambdy/ ln_bdy ,nb_bdy, ln_coords_file, cn_coords_file,         & 
    100          &             ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta,     & 
    101          &             cn_dyn3d, nn_dyn3d_dta, cn_tra, nn_tra_dta,             & 
    102          &             ln_tra_dmp, ln_dyn3d_dmp, rn_time_dmp, rn_time_dmp_out, & 
    103          &             cn_ice, nn_ice_dta,                                     & 
    104          &             rn_ice_tem, rn_ice_sal, rn_ice_age,                     & 
    105          &             ln_vol, nn_volctl, nn_rimwidth, nb_jpk_bdy 
    10698      !!--------------------------------------------------------------------- 
    10799      ! 
     
    183175      CALL lbc_lnk( 'dommsk', tmask  , 'T', 1._wp )      ! Lateral boundary conditions 
    184176 
    185      ! Mask corrections for bdy (read in mppini2) 
    186       REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    187       READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    188 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist', lwp ) 
    189       REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    190       READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    191 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist', lwp ) 
    192       ! ------------------------ 
    193       IF ( ln_bdy .AND. ln_mask_file ) THEN 
    194          CALL iom_open( cn_mask_file, inum ) 
    195          CALL iom_get ( inum, jpdom_data, 'bdy_msk', bdytmask(:,:) ) 
    196          CALL iom_close( inum ) 
    197          DO jk = 1, jpkm1 
    198             DO jj = 1, jpj 
    199                DO ji = 1, jpi 
    200                   tmask(ji,jj,jk) = tmask(ji,jj,jk) * bdytmask(ji,jj) 
    201                END DO 
    202             END DO 
    203          END DO 
    204       ENDIF 
    205           
    206177      !  Ocean/land mask at u-, v-, and f-points   (computed from tmask) 
    207178      ! ---------------------------------------- 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domutl.F90

    r13024 r13056  
    1 MODULE domutil 
     1MODULE domutl 
    22   !! 
    33   !!====================================================================== 
     
    7272         END IF 
    7373      END IF 
    74       nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutil', nseed )  ! nseed =0 means on land => WARNING later on 
     74      nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutl', nseed )  ! nseed =0 means on land => WARNING later on 
    7575      ! 
    7676      ! loop until the stack size is 0 or if the pool is larger than the critical size 
     
    106106            ! 
    107107            ! exchange seed 
    108             nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutil', nseed )  ! this is the sum of all the point check this iteration 
     108            nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutl', nseed )  ! this is the sum of all the point check this iteration 
    109109            ! 
    110110            rseedmap_b(:,:,:)=rseedmap(:,:,:) 
    111             CALL lbc_lnk('domutil', rseedmap, 'T', 1.) 
     111            CALL lbc_lnk('domutl', rseedmap, 'T', 1.) 
    112112            ! 
    113113            ! build new list of seed 
     
    168168         END IF 
    169169      END IF 
    170       nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutil', nseed )  ! nseed =0 means on land => WARNING later on 
     170      nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutl', nseed )  ! nseed =0 means on land => WARNING later on 
    171171      ! 
    172172      ! loop until the stack size is 0 or if the pool is larger than the critical size 
     
    195195            ! 
    196196            ! exchange seed 
    197             nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutil', nseed )  ! this is the sum of all the point check this iteration 
    198             ! 
    199             CALL lbc_lnk('domutil', rseedmap, 'T', 1.) 
     197            nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutl', nseed )  ! this is the sum of all the point check this iteration 
     198            ! 
     199            CALL lbc_lnk('domutl', rseedmap, 'T', 1.) 
    200200            ! 
    201201            ! build new list of seed 
     
    268268   END SUBROUTINE del_head_idx 
    269269   ! 
    270 END MODULE domutil 
     270END MODULE domutl 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domzgr.F90

    r13024 r13056  
    4545   USE dombat 
    4646   USE domisf 
     47   USE agrif_domzgr 
    4748 
    4849   IMPLICIT NONE 
     
    119120 
    120121 
    121       NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav, ln_linssh 
     122      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav 
    122123      !!---------------------------------------------------------------------- 
    123124      ! 
     
    172173         WRITE(numout,*) '      s- or hybrid z-s-coordinate    ln_sco    = ', ln_sco 
    173174         WRITE(numout,*) '      ice shelf cavities             ln_isfcav = ', ln_isfcav 
    174          WRITE(numout,*) '      linear free surface            ln_linssh = ', ln_linssh 
    175       ENDIF 
    176  
    177       IF( ln_linssh .AND. lwp) WRITE(numout,*) '   linear free surface: the vertical mesh does not change in time' 
     175      ENDIF 
    178176 
    179177      ioptio = 0                       ! Check Vertical coordinate options 
     
    209207      ENDIF 
    210208      ! 
    211       IF( nprint == 1 .AND. lwp )   THEN 
     209      IF( lwp )   THEN 
    212210         WRITE(numout,*) ' MIN val k_top   ', MINVAL(   k_top(:,:) ), ' MAX ', MAXVAL( k_top(:,:) ) 
    213211         WRITE(numout,*) ' MIN val k_bot   ', MINVAL(   k_bot(:,:) ), ' MAX ', MAXVAL( k_bot(:,:) ) 
     
    15351533        hiff(:,:) = MIN( hiff(:,:), hbatf(:,:) ) 
    15361534 
    1537       IF( nprint == 1 .AND. lwp )   THEN 
     1535      IF( lwp )   THEN 
    15381536         WRITE(numout,*) ' MAX val hif   t ', MAXVAL( hift (:,:) ), ' f ', MAXVAL( hiff (:,:) ),  & 
    15391537            &                        ' u ',   MAXVAL( hifu (:,:) ), ' v ', MAXVAL( hifv (:,:) ) 
     
    15911589         END DO 
    15921590      END DO 
    1593       IF( nprint == 1 .AND. lwp ) WRITE(numout,*) ' MIN val mbathy h90 ', MINVAL( mbathy(:,:) ),   & 
     1591      IF(lwp ) WRITE(numout,*) ' MIN val mbathy h90 ', MINVAL( mbathy(:,:) ),   & 
    15941592         &                                                       ' MAX ', MAXVAL( mbathy(:,:) ) 
    15951593 
    1596       IF( nprint == 1  .AND. lwp )   THEN         ! min max values over the local domain 
     1594      IF( lwp )   THEN         ! min max values over the local domain 
    15971595         WRITE(numout,*) ' MIN val mbathy  ', MINVAL( mbathy(:,:)    ), ' MAX ', MAXVAL( mbathy(:,:) ) 
    15981596         WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ),   & 
     
    19821980        z_gsigt(jk) = -fssig( REAL(jk,wp)        ) 
    19831981      END DO 
    1984       IF( nprint == 1 .AND. lwp )   WRITE(numout,*) 'z_gsigw 1 jpk    ', z_gsigw(1), z_gsigw(jpk) 
     1982      IF( lwp )   WRITE(numout,*) 'z_gsigw 1 jpk    ', z_gsigw(1), z_gsigw(jpk) 
    19851983      ! 
    19861984      ! Coefficients for vertical scale factors at w-, t- levels 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/in_out_manager.F90

    r12414 r13056  
    2222   !!---------------------------------------------------------------------- 
    2323   CHARACTER(lc) ::   cn_exp           !: experiment name used for output filename 
    24    CHARACTER(lc) ::   cn_ocerst_in     !: suffix of ocean restart name (input) 
    25    CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory 
    26    CHARACTER(lc) ::   cn_ocerst_out    !: suffix of ocean restart name (output) 
    27    CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory 
    28    LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file 
    29    LOGICAL       ::   ln_rst_list      !: output restarts at list of times (T) or by frequency (F) 
    30    INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2) 
    31    INTEGER       ::   nn_rstssh   = 0  !: hand made initilization of ssh or not (1/0) 
    3224   INTEGER       ::   nn_it000         !: index of the first time step 
    3325   INTEGER       ::   nn_itend         !: index of the last time step 
     
    3527   INTEGER       ::   nn_time0         !: initial time of day in hhmm 
    3628   INTEGER       ::   nn_leapy         !: Leap year calendar flag (0/1 or 30) 
    37    INTEGER       ::   nn_istate        !: initial state output flag (0/1) 
    38    INTEGER       ::   nn_write         !: model standard output frequency 
    39    INTEGER       ::   nn_stock         !: restart file frequency 
    40    INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times 
    4129   LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%) 
    4230   LOGICAL       ::   ln_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard 
     
    4533   LOGICAL       ::   ln_xios_read     !: use xios to read single file restart 
    4634   INTEGER       ::   nn_wxios         !: write resart using xios 0 - no, 1 - single, 2 - multiple file output 
    47    INTEGER       ::   nn_no            !: Assimilation cycle 
    4835 
    4936#if defined key_netcdf4 
     
    7461 
    7562   CHARACTER(lc) ::   cexper                      !: experiment name used for output filename 
    76    INTEGER       ::   nrstdt                      !: control of the time step (0, 1 or 2) 
    7763   INTEGER       ::   nit000                      !: index of the first time step 
    7864   INTEGER       ::   nitend                      !: index of the last time step 
    7965   INTEGER       ::   ndate0                      !: initial calendar date aammjj 
    8066   INTEGER       ::   nleapy                      !: Leap year calendar flag (0/1 or 30) 
    81    INTEGER       ::   ninist                      !: initial state output flag (0/1) 
    82    INTEGER       ::   nwrite                      !: model standard output frequency 
    83    INTEGER       ::   nstock                      !: restart file frequency 
    84    INTEGER, DIMENSION(10) :: nstocklist           !: restart dump times 
    85  
    86    !!---------------------------------------------------------------------- 
    87    !! was in restart but moved here because of the OFF line... better solution should be found... 
    88    !!---------------------------------------------------------------------- 
    89    INTEGER ::   nitrst                !: time step at which restart file should be written 
    90    LOGICAL ::   lrst_oce              !: logical to control the oce restart write  
    91    LOGICAL ::   lrst_ice              !: logical to control the ice restart write  
    92    INTEGER ::   numror = 0            !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90) 
    93    INTEGER ::   numrir                !: logical unit for ice   restart (read) 
    94    INTEGER ::   numrow                !: logical unit for ocean restart (write) 
    95    INTEGER ::   numriw                !: logical unit for ice   restart (write) 
    96    INTEGER ::   nrst_lst              !: number of restart to output next 
    97  
    98    !!---------------------------------------------------------------------- 
    99    !!                    output monitoring 
    100    !!---------------------------------------------------------------------- 
    101    LOGICAL ::   ln_ctl           !: run control for debugging 
    102    TYPE :: sn_ctl                !: optional use structure for finer control over output selection 
    103       LOGICAL :: l_config  = .FALSE.  !: activate/deactivate finer control 
    104                                       !  Note if l_config is True then ln_ctl is ignored. 
    105                                       !  Otherwise setting ln_ctl True is equivalent to setting 
    106                                       !  all the following logicals in this structure True 
    107       LOGICAL :: l_runstat = .FALSE.  !: Produce/do not produce run.stat file (T/F) 
    108       LOGICAL :: l_trcstat = .FALSE.  !: Produce/do not produce tracer.stat file (T/F) 
    109       LOGICAL :: l_oceout  = .FALSE.  !: Produce all ocean.outputs    (T) or just one (F) 
    110       LOGICAL :: l_layout  = .FALSE.  !: Produce all layout.dat files (T) or just one (F) 
    111       LOGICAL :: l_mppout  = .FALSE.  !: Produce/do not produce mpp.output_XXXX files (T/F) 
    112       LOGICAL :: l_mpptop  = .FALSE.  !: Produce/do not produce mpp.top.output_XXXX files (T/F) 
    113                                       !  Optional subsetting of processor report files 
    114                                       !  Default settings of 0/1000000/1 should ensure all areas report. 
    115                                       !  Set to a more restrictive range to select specific areas 
    116       INTEGER :: procmin   = 0        !: Minimum narea to output 
    117       INTEGER :: procmax   = 1000000  !: Maximum narea to output 
    118       INTEGER :: procincr  = 1        !: narea increment to output 
    119       INTEGER :: ptimincr  = 1        !: timestep increment to output (time.step and run.stat) 
    120    END TYPE sn_ctl 
    121  
    122    TYPE (sn_ctl) :: sn_cfctl     !: run control structure for selective output 
    123    LOGICAL ::   ln_timing        !: run control for timing 
    124    LOGICAL ::   ln_diacfl        !: flag whether to create CFL diagnostics 
    125    INTEGER ::   nn_print         !: level of print (0 no print) 
    126    INTEGER ::   nn_ictls         !: Start i indice for the SUM control 
    127    INTEGER ::   nn_ictle         !: End   i indice for the SUM control 
    128    INTEGER ::   nn_jctls         !: Start j indice for the SUM control 
    129    INTEGER ::   nn_jctle         !: End   j indice for the SUM control 
    130    INTEGER ::   nn_isplt         !: number of processors following i 
    131    INTEGER ::   nn_jsplt         !: number of processors following j 
    132    INTEGER ::   nn_bench         !: benchmark parameter (0/1) 
    133    INTEGER ::   nn_bit_cmp = 0   !: bit reproducibility  (0/1) 
    134    !                                           
    135    INTEGER ::   nprint, nictls, nictle, njctls, njctle, isplt, jsplt    !: OLD namelist names 
    136  
    137    INTEGER ::   ijsplt     =    1      !: nb of local domain = nb of processors 
    13867 
    13968   !!---------------------------------------------------------------------- 
     
    14877   INTEGER ::   numnam_cfg      =   -1      !: logical unit for configuration specific namelist 
    14978   INTEGER ::   numond          =   -1      !: logical unit for Output Namelist Dynamics 
    150    INTEGER ::   numnam_ice_ref  =   -1      !: logical unit for ice reference namelist 
    151    INTEGER ::   numnam_ice_cfg  =   -1      !: logical unit for ice reference namelist 
    15279   INTEGER ::   numoni          =   -1      !: logical unit for Output Namelist Ice 
    153    INTEGER ::   numevo_ice      =   -1      !: logical unit for ice variables (temp. evolution) 
    15480   INTEGER ::   numrun          =   -1      !: logical unit for run statistics 
    155    INTEGER ::   numdct_in       =   -1      !: logical unit for transports computing 
    156    INTEGER ::   numdct_vol      =   -1      !: logical unit for voulume transports output 
    157    INTEGER ::   numdct_heat     =   -1      !: logical unit for heat    transports output 
    158    INTEGER ::   numdct_salt     =   -1      !: logical unit for salt    transports output 
    159    INTEGER ::   numfl           =   -1      !: logical unit for floats ascii output 
    160    INTEGER ::   numflo          =   -1      !: logical unit for floats ascii output 
    16181 
    16282   !!---------------------------------------------------------------------- 
     
    17494   LOGICAL       ::   lwm      = .FALSE.    !: boolean : true on the 1st processor only (always) 
    17595   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only .OR. ln_ctl 
    176    LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area 
    17796   CHARACTER(lc) ::   cxios_context         !: context name used in xios 
    17897   CHARACTER(lc) ::   crxios_context         !: context name used in xios to read restart 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/ioipsl.f90

    r12414 r13056  
    99  USE calendar    
    1010  USE stringop 
    11   USE fliocom     
    1211 
    1312END MODULE ioipsl 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/lbclnk.F90

    r12414 r13056  
    77   !!   NEMO     1.0  ! 2002-09  (G. Madec)  F90: Free form and module 
    88   !!            3.2  ! 2009-03  (R. Benshila)  External north fold treatment   
    9    !!            3.5  ! 2012     (S.Mocavero, I. Epicoco)  optimization of BDY comm. via lbc_bdy_lnk and lbc_obc_lnk 
     9   !!            3.5  ! 2012     (S.Mocavero, I. Epicoco)  optimization of BDY comm. 
    1010   !!            3.4  ! 2012-12  (R. Bourdalle-Badie, G. Reffray)  add a C1D case   
    1111   !!            3.6  ! 2015-06  (O. Tintó and M. Castrillo)  add lbc_lnk_multi   
     
    2121   !!---------------------------------------------------------------------- 
    2222   !!   lbc_lnk       : generic interface for mpp_lnk_3d and mpp_lnk_2d routines defined in lib_mpp 
    23    !!   lbc_bdy_lnk   : generic interface for mpp_lnk_bdy_2d and mpp_lnk_bdy_3d routines defined in lib_mpp 
    2423   !!---------------------------------------------------------------------- 
    2524   USE par_oce        ! ocean dynamics and tracers    
     
    3736   END INTERFACE 
    3837   ! 
    39    INTERFACE lbc_bdy_lnk 
    40       MODULE PROCEDURE mpp_lnk_bdy_2d, mpp_lnk_bdy_3d, mpp_lnk_bdy_4d 
    41    END INTERFACE 
    42    ! 
    4338   INTERFACE lbc_lnk_icb 
    4439      MODULE PROCEDURE mpp_lnk_2d_icb 
     
    4742   PUBLIC   lbc_lnk       ! ocean/ice lateral boundary conditions 
    4843   PUBLIC   lbc_lnk_multi ! modified ocean/ice lateral boundary conditions 
    49    PUBLIC   lbc_bdy_lnk   ! ocean lateral BDY boundary conditions 
    5044   PUBLIC   lbc_lnk_icb   ! iceberg lateral boundary conditions 
    5145 
     
    6963   !!   lbc_lnk_3d    : set the lateral boundary condition on a 3D variable on ocean mesh 
    7064   !!   lbc_lnk_2d    : set the lateral boundary condition on a 2D variable on ocean mesh 
    71    !!   lbc_bdy_lnk   : set the lateral BDY boundary condition 
    7265   !!---------------------------------------------------------------------- 
    7366   USE dom_oce        ! ocean space and time domain  
     
    8881   END INTERFACE 
    8982   ! 
    90    INTERFACE lbc_bdy_lnk 
    91       MODULE PROCEDURE lbc_bdy_lnk_2d, lbc_bdy_lnk_3d, lbc_bdy_lnk_4d 
    92    END INTERFACE 
    93    ! 
    9483   INTERFACE lbc_lnk_icb 
    9584      MODULE PROCEDURE lbc_lnk_2d_icb 
     
    9887   PUBLIC   lbc_lnk       ! ocean/ice  lateral boundary conditions 
    9988   PUBLIC   lbc_lnk_multi ! modified ocean/ice lateral boundary conditions 
    100    PUBLIC   lbc_bdy_lnk   ! ocean lateral BDY boundary conditions 
    10189   PUBLIC   lbc_lnk_icb   ! iceberg lateral boundary conditions 
    10290    
     
    172160 
    173161   !!---------------------------------------------------------------------- 
    174    !!                   ***  routine lbc_bdy_lnk_(2,3,4)d  *** 
    175    !! 
    176    !!   wrapper rountine to 'lbc_lnk_3d'. This wrapper is used 
    177    !!   to maintain the same interface with regards to the mpp case 
    178    !!---------------------------------------------------------------------- 
    179     
    180    SUBROUTINE lbc_bdy_lnk_4d( cdname, pt4d, cd_type, psgn, ib_bdy ) 
    181       !!---------------------------------------------------------------------- 
    182       CHARACTER(len=*)          , INTENT(in   ) ::   cdname      ! name of the calling subroutine 
    183       REAL(wp), DIMENSION(:,:,:,:), INTENT(inout) ::   pt4d      ! 3D array on which the lbc is applied 
    184       CHARACTER(len=1)          , INTENT(in   ) ::   cd_type   ! nature of pt3d grid-points 
    185       REAL(wp)                  , INTENT(in   ) ::   psgn      ! sign used across north fold  
    186       INTEGER                   , INTENT(in   ) ::   ib_bdy    ! BDY boundary set 
    187       !!---------------------------------------------------------------------- 
    188       CALL lbc_lnk_4d( cdname, pt4d, cd_type, psgn) 
    189    END SUBROUTINE lbc_bdy_lnk_4d 
    190  
    191    SUBROUTINE lbc_bdy_lnk_3d( cdname, pt3d, cd_type, psgn, ib_bdy ) 
    192       !!---------------------------------------------------------------------- 
    193       CHARACTER(len=*)          , INTENT(in   ) ::   cdname      ! name of the calling subroutine 
    194       REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   pt3d      ! 3D array on which the lbc is applied 
    195       CHARACTER(len=1)          , INTENT(in   ) ::   cd_type   ! nature of pt3d grid-points 
    196       REAL(wp)                  , INTENT(in   ) ::   psgn      ! sign used across north fold  
    197       INTEGER                   , INTENT(in   ) ::   ib_bdy    ! BDY boundary set 
    198       !!---------------------------------------------------------------------- 
    199       CALL lbc_lnk_3d( cdname, pt3d, cd_type, psgn) 
    200    END SUBROUTINE lbc_bdy_lnk_3d 
    201  
    202  
    203    SUBROUTINE lbc_bdy_lnk_2d( cdname, pt2d, cd_type, psgn, ib_bdy ) 
    204       !!---------------------------------------------------------------------- 
    205       CHARACTER(len=*)        , INTENT(in   ) ::   cdname      ! name of the calling subroutine 
    206       REAL(wp), DIMENSION(:,:), INTENT(inout) ::   pt2d      ! 3D array on which the lbc is applied 
    207       CHARACTER(len=1)        , INTENT(in   ) ::   cd_type   ! nature of pt3d grid-points 
    208       REAL(wp)                , INTENT(in   ) ::   psgn      ! sign used across north fold  
    209       INTEGER                 , INTENT(in   ) ::   ib_bdy    ! BDY boundary set 
    210       !!---------------------------------------------------------------------- 
    211       CALL lbc_lnk_2d( cdname, pt2d, cd_type, psgn) 
    212    END SUBROUTINE lbc_bdy_lnk_2d 
    213  
    214162 
    215163!!gm  This routine should be removed with an optional halos size added in argument of generic routines 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/lib_mpp.F90

    r13024 r13056  
    1919   !!            3.2  !  2009  (O. Marti)    add mpp_ini_znl 
    2020   !!            4.0  !  2011  (G. Madec)  move ctl_ routines from in_out_manager 
    21    !!            3.5  !  2012  (S.Mocavero, I. Epicoco) Add mpp_lnk_bdy_3d/2d routines to optimize the BDY comm. 
    2221   !!            3.5  !  2013  (C. Ethe, G. Madec)  message passing arrays as local variables  
    2322   !!            3.5  !  2013  (S.Mocavero, I.Epicoco - CMCC) north fold optimizations 
     
    8786   PUBLIC   mpp_ini_znl 
    8887   PUBLIC   mppsend, mpprecv                          ! needed by TAM and ICB routines 
    89    PUBLIC   mpp_lnk_bdy_2d, mpp_lnk_bdy_3d, mpp_lnk_bdy_4d 
    9088    
    9189   !! * Interfaces 
     
    179177   INTEGER,          DIMENSION(nbdelay), PUBLIC  ::   ndelayid = -1     !: mpi request id of the delayed operations 
    180178 
    181    ! timing summary report 
    182    REAL(wp), DIMENSION(2), PUBLIC ::  waiting_time = 0._wp 
    183    REAL(wp)              , PUBLIC ::  compute_time = 0._wp, elapsed_time = 0._wp 
    184     
    185179   REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::   tampon   ! buffer in case of bsend 
    186180 
     
    435429 
    436430   !!---------------------------------------------------------------------- 
    437    !!                   ***  routine mpp_lnk_bdy_(2,3,4)d  *** 
    438    !! 
    439    !!   * Argument : dummy argument use in mpp_lnk_... routines 
    440    !!                ptab   :   array or pointer of arrays on which the boundary condition is applied 
    441    !!                cd_nat :   nature of array grid-points 
    442    !!                psgn   :   sign used across the north fold boundary 
    443    !!                kb_bdy :   BDY boundary set 
    444    !!                kfld   :   optional, number of pt3d arrays 
    445    !!---------------------------------------------------------------------- 
    446    ! 
    447    !                       !==  2D array and array of 2D pointer  ==! 
    448    ! 
    449 #  define DIM_2d 
    450 #     define ROUTINE_BDY           mpp_lnk_bdy_2d 
    451 #     include "mpp_bdy_generic.h90" 
    452 #     undef ROUTINE_BDY 
    453 #  undef DIM_2d 
    454    ! 
    455    !                       !==  3D array and array of 3D pointer  ==! 
    456    ! 
    457 #  define DIM_3d 
    458 #     define ROUTINE_BDY           mpp_lnk_bdy_3d 
    459 #     include "mpp_bdy_generic.h90" 
    460 #     undef ROUTINE_BDY 
    461 #  undef DIM_3d 
    462    ! 
    463    !                       !==  4D array and array of 4D pointer  ==! 
    464    ! 
    465 #  define DIM_4d 
    466 #     define ROUTINE_BDY           mpp_lnk_bdy_4d 
    467 #     include "mpp_bdy_generic.h90" 
    468 #     undef ROUTINE_BDY 
    469 #  undef DIM_4d 
    470  
    471    !!---------------------------------------------------------------------- 
    472431   !! 
    473432   !!   load_array  &   mpp_lnk_2d_9    à generaliser a 3D et 4D 
     
    640599      ! send y_in into todelay(idvar)%y1d with a non-blocking communication 
    641600#if defined key_mpi2 
    642       IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.) 
    643601      CALL  mpi_allreduce( y_in(:), todelay(idvar)%y1d(:), isz, MPI_DOUBLE_COMPLEX, mpi_sumdd, ilocalcomm, ndelayid(idvar), ierr ) 
    644       IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    645602#else 
    646603      CALL mpi_iallreduce( y_in(:), todelay(idvar)%y1d(:), isz, MPI_DOUBLE_COMPLEX, mpi_sumdd, ilocalcomm, ndelayid(idvar), ierr ) 
     
    703660      ! send p_in into todelay(idvar)%z1d with a non-blocking communication 
    704661#if defined key_mpi2 
    705       IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.) 
    706662      CALL  mpi_allreduce( p_in(:), todelay(idvar)%z1d(:), isz, MPI_DOUBLE_PRECISION, mpi_max, ilocalcomm, ndelayid(idvar), ierr ) 
    707       IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    708663#else 
    709664      CALL mpi_iallreduce( p_in(:), todelay(idvar)%z1d(:), isz, MPI_DOUBLE_PRECISION, mpi_max, ilocalcomm, ndelayid(idvar), ierr ) 
     
    725680      IF( ndelayid(kid) /= -2 ) THEN   
    726681#if ! defined key_mpi2 
    727          IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.) 
    728682         CALL mpi_wait( ndelayid(kid), MPI_STATUS_IGNORE, ierr )                        ! make sure todelay(kid) is received 
    729          IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    730683#endif 
    731684         IF( ASSOCIATED(todelay(kid)%y1d) )   todelay(kid)%z1d(:) = REAL(todelay(kid)%y1d(:), wp)  ! define %z1d from %y1d 
     
    12361189      itaille = jpimax * ( ipj + 2*kextj ) 
    12371190      ! 
    1238       IF( ln_timing ) CALL tic_tac(.TRUE.) 
    12391191      CALL MPI_ALLGATHER( znorthloc_e(1,1-kextj)    , itaille, MPI_DOUBLE_PRECISION,    & 
    12401192         &                znorthgloio_e(1,1-kextj,1), itaille, MPI_DOUBLE_PRECISION,    & 
    12411193         &                ncomm_north, ierr ) 
    12421194      ! 
    1243       IF( ln_timing ) CALL tic_tac(.FALSE.) 
    12441195      ! 
    12451196      DO jr = 1, ndim_rank_north            ! recover the global north array 
     
    13671318      !                           ! Migrations 
    13681319      imigr = ipreci * ( jpj + 2*kextj ) 
    1369       ! 
    1370       IF( ln_timing ) CALL tic_tac(.TRUE.) 
    13711320      ! 
    13721321      SELECT CASE ( nbondi ) 
     
    13881337      END SELECT 
    13891338      ! 
    1390       IF( ln_timing ) CALL tic_tac(.FALSE.) 
    1391       ! 
    13921339      !                           ! Write Dirichlet lateral conditions 
    13931340      iihom = jpi - nn_hls 
     
    14241371      !                           ! Migrations 
    14251372      imigr = iprecj * ( jpi + 2*kexti ) 
    1426       ! 
    1427       IF( ln_timing ) CALL tic_tac(.TRUE.) 
    14281373      ! 
    14291374      SELECT CASE ( nbondj ) 
     
    14441389         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    14451390      END SELECT 
    1446       ! 
    1447       IF( ln_timing ) CALL tic_tac(.FALSE.) 
    14481391      ! 
    14491392      !                           ! Write Dirichlet lateral conditions 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_allreduce_generic.h90

    r12414 r13056  
    6161      ! 
    6262      ALLOCATE(work(ipi)) 
    63       IF( ln_timing ) CALL tic_tac(.TRUE., ld_global = .TRUE.) 
    6463      CALL mpi_allreduce( ARRAY_IN(:), work, ipi, MPI_TYPE, MPI_OPERATION, ilocalcomm, ierror ) 
    65       IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    6664      DO ii = 1, ipi 
    6765         ARRAY_IN(ii) = work(ii) 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_lnk_generic.h90

    r12414 r13056  
    154154      imigr = nn_hls * jpj * ipk * ipl * ipf       
    155155      ! 
    156       IF( ln_timing ) CALL tic_tac(.TRUE.) 
    157       ! 
    158156      SELECT CASE ( nbondi ) 
    159157      CASE ( -1 ) 
     
    173171         IF(l_isend)   CALL mpi_wait(ml_req1, ml_stat, ml_err ) 
    174172      END SELECT 
    175       ! 
    176       IF( ln_timing ) CALL tic_tac(.FALSE.) 
    177173      ! 
    178174      !                           ! Write Dirichlet lateral conditions 
     
    276272      imigr = nn_hls * jpi * ipk * ipl * ipf 
    277273      ! 
    278       IF( ln_timing ) CALL tic_tac(.TRUE.) 
    279       !  
    280274      SELECT CASE ( nbondj ) 
    281275      CASE ( -1 ) 
     
    296290      END SELECT 
    297291      ! 
    298       IF( ln_timing ) CALL tic_tac(.FALSE.) 
    299       !                           ! Write Dirichlet lateral conditions 
    300292      ijhom = nlcj-nn_hls 
    301293      ! 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_loc_generic.h90

    r13024 r13056  
    6767      zain(2,:) = REAL(index0, wp) 
    6868      ! 
    69       IF( ln_timing ) CALL tic_tac(.TRUE., ld_global = .TRUE.) 
    7069      CALL MPI_ALLREDUCE( zain, zaout, 1, MPI_2DOUBLE_PRECISION, MPI_OPERATION ,MPI_COMM_OCE, ierror) 
    71       IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    7270      ! 
    7371      pmin      = zaout(1,1) 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_nfd_generic.h90

    r12414 r13056  
    154154         ! a better test should be: a testing if "suppressed land-processors" belongs to the north-pole folding 
    155155         IF ( jpni*jpnj /= jpnij ) ztabr(:,:,:,:,:) = 0._wp 
    156          ! 
    157          ! start waiting time measurement 
    158          IF( ln_timing ) CALL tic_tac(.TRUE.) 
    159156         ! 
    160157         DO jr = 1, nsndto 
     
    208205         ENDIF 
    209206         ! 
    210          IF( ln_timing ) CALL tic_tac(.FALSE.) 
    211          ! 
    212207         ! North fold boundary condition 
    213208         ! 
     
    248243         IF ( jpni*jpnj /= jpnij ) ztab(:,:,:,:,:) = 0._wp 
    249244         ! 
    250          ! start waiting time measurement 
    251          IF( ln_timing ) CALL tic_tac(.TRUE.) 
    252245         CALL MPI_ALLGATHER( znorthloc  , ibuffsize, MPI_DOUBLE_PRECISION,                & 
    253246            &                znorthgloio, ibuffsize, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 
    254247         ! 
    255          ! stop waiting time measurement 
    256          IF( ln_timing ) CALL tic_tac(.FALSE.) 
    257248         ! 
    258249         DO jr = 1, ndim_rank_north         ! recover the global north array 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mppini.F90

    r13024 r13056  
    1717   !!  mpp_init          : Lay out the global domain over processors with/without land processor elimination 
    1818   !!  mpp_init_mask     : Read global bathymetric information to facilitate land suppression 
    19    !!  mpp_init_ioipsl   : IOIPSL initialization in mpp  
    2019   !!  mpp_init_partition: Calculate MPP domain decomposition 
    2120   !!  factorise         : Calculate the factors of the no. of MPI processes 
     
    2322   !!---------------------------------------------------------------------- 
    2423   USE dom_oce        ! ocean space and time domain 
    25    USE bdy_oce        ! open BounDarY   
    2624   ! 
    2725   USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges  
     
    3735 
    3836   INTEGER :: numbot = -1  ! 'bottom_level' local logical unit 
    39    INTEGER :: numbdy = -1  ! 'bdy_msk'      local logical unit 
    4037    
    4138   !!---------------------------------------------------------------------- 
     
    8380      nbondi = 2 
    8481      nbondj = 2 
    85       nidom  = FLIO_DOM_NONE 
    8682      npolj = jperio 
    8783      l_Iperio = jpni == 1 .AND. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7) 
     
    186182      INTEGER, ALLOCATABLE, DIMENSION(:,:) ::   ilej, ildj, ioso, iowe         !  -     - 
    187183      LOGICAL, ALLOCATABLE, DIMENSION(:,:) ::   llisoce                        !  -     - 
    188       NAMELIST/nambdy/ ln_bdy, nb_bdy, ln_coords_file, cn_coords_file,           & 
    189            &             ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta,     & 
    190            &             cn_dyn3d, nn_dyn3d_dta, cn_tra, nn_tra_dta,             &   
    191            &             ln_tra_dmp, ln_dyn3d_dmp, rn_time_dmp, rn_time_dmp_out, & 
    192            &             cn_ice, nn_ice_dta,                                     & 
    193            &             rn_ice_tem, rn_ice_sal, rn_ice_age,                     & 
    194            &             ln_vol, nn_volctl, nn_rimwidth, nb_jpk_bdy 
    195       !!---------------------------------------------------------------------- 
    196  
    197       llwrtlay = lwp .OR. ln_ctl .OR. sn_cfctl%l_layout 
    198       ! do we need to take into account bdy_msk? 
    199       REWIND( numnam_ref )              ! Namelist nambdy in reference namelist : BDY 
    200       READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    201 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist (mppini)', lwp ) 
    202       REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist : BDY 
    203       READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    204 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist (mppini)', lwp ) 
     184      !!---------------------------------------------------------------------- 
     185 
     186      llwrtlay = lwp  
    205187      ! 
    206188      IF(               ln_read_cfg ) CALL iom_open( cn_domcfg,    numbot ) 
    207       IF( ln_bdy .AND. ln_mask_file ) CALL iom_open( cn_mask_file, numbdy ) 
    208189      ! 
    209190      !  1. Dimension arrays for subdomains 
     
    280261 
    281262      IF( numbot /= -1 )   CALL iom_close( numbot ) 
    282       IF( numbdy /= -1 )   CALL iom_close( numbdy ) 
    283263     
    284264      ALLOCATE(  nfiimpp(jpni,jpnj), nfipproc(jpni,jpnj), nfilcit(jpni,jpnj) ,    & 
     
    666646      ENDIF 
    667647      ! 
    668       CALL mpp_init_ioipsl       ! Prepare NetCDF output file (if necessary) 
    669       ! 
    670648      IF( ln_nnogather ) THEN 
    671649         CALL mpp_init_nfdcom     ! northfold neighbour lists 
     
    902880 
    903881      ! if therr is no land and no print 
    904       IF( .NOT. llist .AND. numbot == -1 .AND. numbdy == -1 ) THEN 
     882      IF( .NOT. llist .AND. numbot == -1 ) THEN 
    905883         ! get the smaller partition which gives the smallest subdomain size 
    906884         ii = MINLOC(inbij1, mask = iszij1 == MINVAL(iszij1), dim = 1) 
     
    997975      !!---------------------------------------------------------------------- 
    998976      ! do nothing if there is no land-sea mask 
    999       IF( numbot == -1 .and. numbdy == -1 ) THEN 
     977      IF( numbot == -1 ) THEN 
    1000978         propland = 0. 
    1001979         RETURN 
     
    10531031      !!---------------------------------------------------------------------- 
    10541032      ! do nothing if there is no land-sea mask 
    1055       IF( numbot == -1 .AND. numbdy == -1 ) THEN 
     1033      IF( numbot == -1 ) THEN 
    10561034         ldisoce(:,:) = .TRUE. 
    10571035         RETURN 
     
    11081086      ! 
    11091087      INTEGER                           ::   inumsave                ! local logical unit 
    1110       REAL(wp), DIMENSION(jpiglo,kjcnt) ::   zbot, zbdy  
     1088      REAL(wp), DIMENSION(jpiglo,kjcnt) ::   zbot 
    11111089      !!---------------------------------------------------------------------- 
    11121090      ! 
     
    11191097      ENDIF 
    11201098 
    1121        IF( numbdy /= -1 ) THEN                  ! Adjust with bdy_msk if it exists     
    1122          CALL iom_get ( numbdy, jpdom_unknown, 'bdy_msk', zbdy, kstart = (/1,kjstr/), kcount = (/jpiglo, kjcnt/) ) 
    1123          zbot(:,:) = zbot(:,:) * zbdy(:,:) 
    1124       ENDIF 
    11251099      ! 
    11261100      ldoce(:,:) = zbot(:,:) > 0. 
     
    11281102      ! 
    11291103   END SUBROUTINE mpp_init_readbot_strip 
    1130  
    1131  
    1132    SUBROUTINE mpp_init_ioipsl 
    1133       !!---------------------------------------------------------------------- 
    1134       !!                  ***  ROUTINE mpp_init_ioipsl  *** 
    1135       !! 
    1136       !! ** Purpose :    
    1137       !! 
    1138       !! ** Method  :    
    1139       !! 
    1140       !! History : 
    1141       !!   9.0  !  04-03  (G. Madec )  MPP-IOIPSL  
    1142       !!   " "  !  08-12  (A. Coward)  addition in case of jpni*jpnj < jpnij 
    1143       !!---------------------------------------------------------------------- 
    1144       INTEGER, DIMENSION(2) ::   iglo, iloc, iabsf, iabsl, ihals, ihale, idid 
    1145       !!---------------------------------------------------------------------- 
    1146  
    1147       ! The domain is split only horizontally along i- or/and j- direction 
    1148       ! So we need at the most only 1D arrays with 2 elements. 
    1149       ! Set idompar values equivalent to the jpdom_local_noextra definition 
    1150       ! used in IOM. This works even if jpnij .ne. jpni*jpnj. 
    1151       iglo(1) = jpiglo 
    1152       iglo(2) = jpjglo 
    1153       iloc(1) = nlci 
    1154       iloc(2) = nlcj 
    1155       iabsf(1) = nimppt(narea) 
    1156       iabsf(2) = njmppt(narea) 
    1157       iabsl(:) = iabsf(:) + iloc(:) - 1 
    1158       ihals(1) = nldi - 1 
    1159       ihals(2) = nldj - 1 
    1160       ihale(1) = nlci - nlei 
    1161       ihale(2) = nlcj - nlej 
    1162       idid(1) = 1 
    1163       idid(2) = 2 
    1164  
    1165       IF(lwp) THEN 
    1166           WRITE(numout,*) 
    1167           WRITE(numout,*) 'mpp_init_ioipsl :   iloc  = ', iloc (1), iloc (2) 
    1168           WRITE(numout,*) '~~~~~~~~~~~~~~~     iabsf = ', iabsf(1), iabsf(2) 
    1169           WRITE(numout,*) '                    ihals = ', ihals(1), ihals(2) 
    1170           WRITE(numout,*) '                    ihale = ', ihale(1), ihale(2) 
    1171       ENDIF 
    1172       ! 
    1173       CALL flio_dom_set ( jpnij, nproc, idid, iglo, iloc, iabsf, iabsl, ihals, ihale, 'BOX', nidom) 
    1174       ! 
    1175    END SUBROUTINE mpp_init_ioipsl   
    1176  
    11771104 
    11781105   SUBROUTINE mpp_init_nfdcom 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/nemogcm.F90

    r13024 r13056  
    5656   USE lbcnfd , ONLY  : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges  
    5757 
     58   USE agrif_connect 
     59   USE agrif_dom_update 
     60   USE agrif_recompute_scales 
     61 
    5862   IMPLICIT NONE 
    5963   PRIVATE 
     
    6468 
    6569   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing 
    66     
    67 #if defined key_agrif  
    68    external agrif_boundary_connections, agrif_update_all, agrif_recompute_scalefactors 
    69 #endif 
    7070 
    7171   !!---------------------------------------------------------------------- 
     
    144144      CHARACTER(len=120), DIMENSION(60) ::   cltxt, cltxt2, clnam 
    145145      !! 
    146       NAMELIST/namctl/ ln_ctl   , sn_cfctl, nn_print, nn_ictls, nn_ictle,   & 
    147          &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,             & 
    148          &             ln_timing, ln_diacfl 
    149146      NAMELIST/namcfg/ ln_e3_dep,                                & 
    150147         &             cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
     
    157154      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    158155      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    159       ! 
    160       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    161       READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    162 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 
    163       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    164       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    165 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    166156      ! 
    167157      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
     
    184174 
    185175      lwm = (narea == 1)                                    ! control of output namelists 
    186       lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
     176      lwp = (narea == 1)                                    ! control of all listing output print 
    187177 
    188178      IF(lwm) THEN 
     
    190180         ! file has been opened in call to mynode. nammpp has already been 
    191181         ! written in mynode (if lk_mpp_mpi) 
    192          WRITE( numond, namctl ) 
    193182         WRITE( numond, namcfg ) 
    194183      ENDIF 
     
    258247      !                             !-------------------------------! 
    259248 
    260       CALL nemo_ctl                          ! Control prints & Benchmark 
    261  
    262249      !                                      ! Domain decomposition 
    263250        ! 
     
    269256   END SUBROUTINE nemo_init 
    270257 
    271  
    272    SUBROUTINE nemo_ctl 
    273       !!---------------------------------------------------------------------- 
    274       !!                     ***  ROUTINE nemo_ctl  *** 
    275       !! 
    276       !! ** Purpose :   control print setting 
    277       !! 
    278       !! ** Method  : - print namctl information and check some consistencies 
    279       !!---------------------------------------------------------------------- 
    280       ! 
    281       IF(lwp) THEN                  ! control print 
    282          WRITE(numout,*) 
    283          WRITE(numout,*) 'nemo_ctl: Control prints' 
    284          WRITE(numout,*) '~~~~~~~~' 
    285          WRITE(numout,*) '   Namelist namctl' 
    286          WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl 
    287          WRITE(numout,*) '       finer control over o/p sn_cfctl%l_config  = ', sn_cfctl%l_config 
    288          WRITE(numout,*) '                              sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 
    289          WRITE(numout,*) '                              sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat 
    290          WRITE(numout,*) '                              sn_cfctl%l_oceout  = ', sn_cfctl%l_oceout 
    291          WRITE(numout,*) '                              sn_cfctl%l_layout  = ', sn_cfctl%l_layout 
    292          WRITE(numout,*) '                              sn_cfctl%l_mppout  = ', sn_cfctl%l_mppout 
    293          WRITE(numout,*) '                              sn_cfctl%l_mpptop  = ', sn_cfctl%l_mpptop 
    294          WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin   
    295          WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax   
    296          WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
    297          WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr  
    298          WRITE(numout,*) '      level of print                  nn_print   = ', nn_print 
    299          WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls 
    300          WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle 
    301          WRITE(numout,*) '      Start j indice for SUM control  nn_jctls   = ', nn_jctls 
    302          WRITE(numout,*) '      End j indice for SUM control    nn_jctle   = ', nn_jctle 
    303          WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt 
    304          WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt 
    305          WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
    306          WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
    307       ENDIF 
    308       ! 
    309       nprint    = nn_print          ! convert DOCTOR namelist names into OLD names 
    310       nictls    = nn_ictls 
    311       nictle    = nn_ictle 
    312       njctls    = nn_jctls 
    313       njctle    = nn_jctle 
    314       isplt     = nn_isplt 
    315       jsplt     = nn_jsplt 
    316  
    317       ! 
    318       !                             ! Parameter control 
    319       ! 
    320       IF( ln_ctl ) THEN                 ! sub-domain area indices for the control prints 
    321          IF( lk_mpp .AND. jpnij > 1 ) THEN 
    322             isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain 
    323          ELSE 
    324             IF( isplt == 1 .AND. jsplt == 1  ) THEN 
    325                CALL ctl_warn( ' - isplt & jsplt are equal to 1',   & 
    326                   &           ' - the print control will be done over the whole domain' ) 
    327             ENDIF 
    328             ijsplt = isplt * jsplt            ! total number of processors ijsplt 
    329          ENDIF 
    330          IF(lwp) WRITE(numout,*)'          - The total number of processors over which the' 
    331          IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt 
    332          ! 
    333          !                              ! indices used for the SUM control 
    334          IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area 
    335             lsp_area = .FALSE. 
    336          ELSE                                             ! print control done over a specific  area 
    337             lsp_area = .TRUE. 
    338             IF( nictls < 1 .OR. nictls > jpiglo )   THEN 
    339                CALL ctl_warn( '          - nictls must be 1<=nictls>=jpiglo, it is forced to 1' ) 
    340                nictls = 1 
    341             ENDIF 
    342             IF( nictle < 1 .OR. nictle > jpiglo )   THEN 
    343                CALL ctl_warn( '          - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' ) 
    344                nictle = jpiglo 
    345             ENDIF 
    346             IF( njctls < 1 .OR. njctls > jpjglo )   THEN 
    347                CALL ctl_warn( '          - njctls must be 1<=njctls>=jpjglo, it is forced to 1' ) 
    348                njctls = 1 
    349             ENDIF 
    350             IF( njctle < 1 .OR. njctle > jpjglo )   THEN 
    351                CALL ctl_warn( '          - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' ) 
    352                njctle = jpjglo 
    353             ENDIF 
    354          ENDIF 
    355       ENDIF 
    356       ! 
    357 !      IF( 1._wp /= SIGN(1._wp,-0._wp)  )   CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows f2003 standard.',  & 
    358 !         &                                                'Compile with key_nosignedzero enabled:',   & 
    359 !         &                                                '--> add -Dkey_nosignedzero to the definition of %CPP in your arch file' ) 
    360       ! 
    361 #if defined key_agrif 
    362       IF( ln_timing )   CALL ctl_stop( 'AGRIF not implemented with ln_timing = true') 
    363 #endif 
    364       ! 
    365    END SUBROUTINE nemo_ctl 
    366  
    367  
    368258   SUBROUTINE nemo_closefile 
    369259      !!---------------------------------------------------------------------- 
     
    381271      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    382272      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    383       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    384       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    385       IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    386       IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
    387273      IF( numout          /=  6 )   CLOSE( numout          )   ! standard model output file 
    388       IF( numdct_vol      /= -1 )   CLOSE( numdct_vol      )   ! volume transports 
    389       IF( numdct_heat     /= -1 )   CLOSE( numdct_heat     )   ! heat transports 
    390       IF( numdct_salt     /= -1 )   CLOSE( numdct_salt     )   ! salt transports 
    391274      ! 
    392275      numout = 6                                     ! redefine numout in case it is used after this point... 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/par_oce.f90

    r13024 r13056  
    1313   PUBLIC 
    1414 
     15   INTEGER , PUBLIC                                      ::   nn_dttrc      !: frequency of step on passive tracers 
    1516   CHARACTER(lc) ::   cp_cfg           !: name of the configuration 
    1617   CHARACTER(lc) ::   cp_cfz           !: name of the zoom of configuration 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/phycst.F90

    r12414 r13056  
    3737   REAL(wp), PUBLIC ::   ra       = 6371229._wp      !: earth radius                       [m] 
    3838   REAL(wp), PUBLIC ::   grav     = 9.80665_wp       !: gravity                            [m/s2]    
    39    REAL(wp), PUBLIC ::   rt0      = 273.15_wp        !: freezing point of fresh water [Kelvin] 
    4039 
    41    REAL(wp), PUBLIC ::   rau0                        !: volumic mass of reference     [kg/m3] 
    42    REAL(wp), PUBLIC ::   r1_rau0                     !: = 1. / rau0                   [m3/kg] 
    43    REAL(wp), PUBLIC ::   rcp                         !: ocean specific heat           [J/Kelvin] 
    44    REAL(wp), PUBLIC ::   r1_rcp                      !: = 1. / rcp                    [Kelvin/J] 
    45    REAL(wp), PUBLIC ::   rau0_rcp                    !: = rau0 * rcp  
    46    REAL(wp), PUBLIC ::   r1_rau0_rcp                 !: = 1. / ( rau0 * rcp ) 
    47  
    48    REAL(wp), PUBLIC ::   emic     =    0.97_wp       !: emissivity of snow or ice (not used?) 
    49  
    50    REAL(wp), PUBLIC ::   sice     =    6.0_wp        !: salinity of ice (for pisces)          [psu] 
    51    REAL(wp), PUBLIC ::   soce     =   34.7_wp        !: salinity of sea (for pisces and isf)  [psu] 
    52    REAL(wp), PUBLIC ::   rLevap   =    2.5e+6_wp     !: latent heat of evaporation (water) 
    53    REAL(wp), PUBLIC ::   vkarmn   =    0.4_wp        !: von Karman constant 
    54    REAL(wp), PUBLIC ::   stefan   =    5.67e-8_wp    !: Stefan-Boltzmann constant  
    55  
    56    REAL(wp), PUBLIC ::   rhos     =  330._wp         !: volumic mass of snow                                  [kg/m3] 
    57    REAL(wp), PUBLIC ::   rhoi     =  917._wp         !: volumic mass of sea ice                               [kg/m3] 
    58    REAL(wp), PUBLIC ::   rhow     = 1000._wp         !: volumic mass of freshwater in melt ponds              [kg/m3] 
    59    REAL(wp), PUBLIC ::   rcnd_i   =    2.034396_wp   !: thermal conductivity of fresh ice                     [W/m/K] 
    60    REAL(wp), PUBLIC ::   rcpi     = 2067.0_wp        !: specific heat of fresh ice                            [J/kg/K] 
    61    REAL(wp), PUBLIC ::   rLsub    =    2.834e+6_wp   !: pure ice latent heat of sublimation                   [J/kg] 
    62    REAL(wp), PUBLIC ::   rLfus    =    0.334e+6_wp   !: latent heat of fusion of fresh ice                    [J/kg] 
    63    REAL(wp), PUBLIC ::   rTmlt    =    0.054_wp      !: decrease of seawater meltpoint with salinity 
    64  
    65    REAL(wp), PUBLIC ::   r1_rhoi                     !: 1 / rhoi 
    66    REAL(wp), PUBLIC ::   r1_rhos                     !: 1 / rhos 
    67    REAL(wp), PUBLIC ::   r1_rcpi                     !: 1 / rcpi 
    6840   !!---------------------------------------------------------------------- 
    6941   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    8961#endif 
    9062 
    91       r1_rhoi = 1._wp / rhoi 
    92       r1_rhos = 1._wp / rhos 
    93       r1_rcpi = 1._wp / rcpi 
    94  
    95       IF(lwp) THEN 
    96          WRITE(numout,*) 
    97          WRITE(numout,*) 'phy_cst : initialization of ocean parameters and constants' 
    98          WRITE(numout,*) '~~~~~~~' 
    99          WRITE(numout,*) '      mathematical constant                 rpi = ', rpi 
    100          WRITE(numout,*) '      day                                rday   = ', rday,   ' s' 
    101          WRITE(numout,*) '      sideral year                       rsiyea = ', rsiyea, ' s' 
    102          WRITE(numout,*) '      sideral day                        rsiday = ', rsiday, ' s' 
    103          WRITE(numout,*) '      omega                              omega  = ', omega,  ' s^-1' 
    104          WRITE(numout,*) 
    105          WRITE(numout,*) '      nb of months per year               raamo = ', raamo, ' months' 
    106          WRITE(numout,*) '      nb of hours per day                 rjjhh = ', rjjhh, ' hours' 
    107          WRITE(numout,*) '      nb of minutes per hour              rhhmm = ', rhhmm, ' mn' 
    108          WRITE(numout,*) '      nb of seconds per minute            rmmss = ', rmmss, ' s' 
    109          WRITE(numout,*) 
    110          WRITE(numout,*) '      earth radius                         ra   = ', ra   , ' m' 
    111          WRITE(numout,*) '      gravity                              grav = ', grav , ' m/s^2' 
    112          WRITE(numout,*) 
    113          WRITE(numout,*) '      freezing point of water              rt0  = ', rt0  , ' K' 
    114          WRITE(numout,*) 
    115          WRITE(numout,*) '   reference density and heat capacity now defined in eosbn2.f90' 
    116          WRITE(numout,*) 
    117          WRITE(numout,*) '      thermal conductivity of pure ice          = ', rcnd_i  , ' J/s/m/K' 
    118          WRITE(numout,*) '      thermal conductivity of snow is defined in a namelist ' 
    119          WRITE(numout,*) '      fresh ice specific heat                   = ', rcpi    , ' J/kg/K' 
    120          WRITE(numout,*) '      latent heat of fusion of fresh ice / snow = ', rLfus   , ' J/kg' 
    121          WRITE(numout,*) '      latent heat of subl.  of fresh ice / snow = ', rLsub   , ' J/kg' 
    122          WRITE(numout,*) '      density of sea ice                        = ', rhoi    , ' kg/m^3' 
    123          WRITE(numout,*) '      density of snow                           = ', rhos    , ' kg/m^3' 
    124          WRITE(numout,*) '      density of freshwater (in melt ponds)     = ', rhow    , ' kg/m^3' 
    125          WRITE(numout,*) '      salinity of ice (for pisces)              = ', sice    , ' psu' 
    126          WRITE(numout,*) '      salinity of sea (for pisces and isf)      = ', soce    , ' psu' 
    127          WRITE(numout,*) '      latent heat of evaporation (water)        = ', rLevap  , ' J/m^3'  
    128          WRITE(numout,*) '      von Karman constant                       = ', vkarmn  
    129          WRITE(numout,*) '      Stefan-Boltzmann constant                 = ', stefan  , ' J/s/m^2/K^4' 
    130          WRITE(numout,*) 
    131          WRITE(numout,*) '      conversion: degre ==> radian          rad = ', rad 
    132          WRITE(numout,*) 
    133          WRITE(numout,*) '      smallest real computer value       rsmall = ', rsmall 
    134       ENDIF 
    135  
    13663   END SUBROUTINE phy_cst 
    13764 
  • utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/step_oce.f90

    r13024 r13056  
    1111   USE daymod           ! calendar                         (day     routine) 
    1212 
    13  
    14    USE prtctl           ! Print control                    (prt_ctl routine) 
    15  
    1613   USE in_out_manager   ! I/O manager 
    1714   USE iom              ! 
    1815   USE lbclnk 
    19    USE timing           ! Timing 
    20  
    21  
    2216 
    2317   !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.