- Timestamp:
- 2020-06-07T18:26:09+02:00 (4 years ago)
- 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 43 43 / 44 44 !----------------------------------------------------------------------- 45 &namcrs ! Grid coarsening for dynamics output and/or46 ! passive tracer coarsened online simulations47 !-----------------------------------------------------------------------48 /49 !-----------------------------------------------------------------------50 &namtsd ! data : Temperature & Salinity51 !-----------------------------------------------------------------------52 /53 !-----------------------------------------------------------------------54 &namsbc ! Surface Boundary Condition (surface module)55 !-----------------------------------------------------------------------56 /57 !-----------------------------------------------------------------------58 &namsbc_core ! namsbc_core CORE bulk formulae59 !-----------------------------------------------------------------------60 /61 !-----------------------------------------------------------------------62 &namtra_qsr ! penetrative solar radiation63 !-----------------------------------------------------------------------64 /65 !-----------------------------------------------------------------------66 &namsbc_rnf ! runoffs namelist surface boundary condition67 !-----------------------------------------------------------------------68 /69 !-----------------------------------------------------------------------70 &namsbc_ssr ! surface boundary condition : sea surface restoring71 !-----------------------------------------------------------------------72 /73 !-----------------------------------------------------------------------74 &namsbc_alb ! albedo parameters75 !-----------------------------------------------------------------------76 /77 !-----------------------------------------------------------------------78 &namberg ! iceberg parameters79 !-----------------------------------------------------------------------80 /81 !-----------------------------------------------------------------------82 &namlbc ! lateral momentum boundary condition83 !-----------------------------------------------------------------------84 /85 !-----------------------------------------------------------------------86 &nambfr ! bottom friction87 !-----------------------------------------------------------------------88 /89 !-----------------------------------------------------------------------90 &nambbc ! bottom temperature boundary condition (default: NO)91 !-----------------------------------------------------------------------92 ln_trabbc = .true. ! Apply a geothermal heating at the ocean bottom93 /94 !-----------------------------------------------------------------------95 &nambbl ! bottom boundary layer scheme96 !-----------------------------------------------------------------------97 /98 !-----------------------------------------------------------------------99 45 &namcfg ! parameters of the configuration 100 46 !----------------------------------------------------------------------- … … 125 71 ln_sco = .false. ! s- or hybrid z-s-coordinate 126 72 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 127 ln_linssh = .true. ! linear free surface128 73 / 129 74 !----------------------------------------------------------------------- … … 142 87 &namlbc ! lateral momentum boundary condition (default: NO selection) 143 88 !----------------------------------------------------------------------- 144 jpni = 0145 jpnj=0146 89 / 147 90 !----------------------------------------------------------------------- 148 91 &namagrif ! AGRIF zoom ("key_agrif") 149 92 ln_bry_south = .TRUE. 150 !-----------------------------------------------------------------------151 /152 !-----------------------------------------------------------------------153 &nambdy ! unstructured open boundaries (default: OFF)154 93 !----------------------------------------------------------------------- 155 94 / … … 161 100 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 162 101 !----------------------------------------------------------------------- 102 jpni = 0 103 jpnj=0 163 104 / 164 !-----------------------------------------------------------------------165 &namctl ! Control prints (default: OFF)166 !-----------------------------------------------------------------------167 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/1_namelist_ref
r13024 r13056 8 8 &namrun ! parameters of the run 9 9 !----------------------------------------------------------------------- 10 nn_no = 0 ! Assimilation cycle index11 10 cn_exp = "ORCA2" ! experience name 12 11 nn_it000 = 1 ! first time step … … 15 14 nn_time0 = 0 ! initial time of day in hhmm 16 15 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=T19 nn_rstctl = 0 ! restart control ==> activated only if ln_rstart=T20 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist21 ! ! = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart22 ! ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart23 cn_ocerst_in = "restart" ! suffix of ocean restart name (input)24 cn_ocerst_indir = "." ! directory from which to read input ocean restarts25 cn_ocerst_out = "restart" ! suffix of ocean restart name (output)26 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts27 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model28 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 written32 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000)33 16 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 standard35 17 ln_clobber = .true. ! clobber (overwrite) an existing file 36 18 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 37 21 / 38 22 !----------------------------------------------------------------------- … … 78 62 ppkth2 = 48.029893720000 ! 79 63 ppacr2 = 13.000000000000 ! 80 / /64 / 81 65 !----------------------------------------------------------------------- 82 66 &namcfg ! parameters of the configuration … … 107 91 ln_sco = .false. ! s- or hybrid z-s-coordinate 108 92 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 109 ln_linssh = .false. ! linear free surface110 93 / 111 94 !----------------------------------------------------------------------- … … 189 172 / 190 173 !----------------------------------------------------------------------- 191 &nam_tide ! tide parameters ("key_tide")192 !-----------------------------------------------------------------------193 ln_tide_pot = .true. ! use tidal potential forcing194 ln_tide_ramp= .false. !195 rdttideramp = 0. !196 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg197 /198 !-----------------------------------------------------------------------199 &nambdy ! unstructured open boundaries (default: OFF)200 !-----------------------------------------------------------------------201 ln_bdy = .false. ! Use unstructured open boundaries202 nb_bdy = 0 ! number of open boundary sets203 ln_coords_file = .true. ! =T : read bdy coordinates from file204 cn_coords_file = 'coordinates.bdy.nc' ! bdy coordinates files205 ln_mask_file = .false. ! =T : read mask from file206 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 state209 ! ! = 1, bdy data are read in 'bdydata .nc' files210 ! ! = 2, use tidal harmonic forcing data from files211 ! ! = 3, use external data AND tidal harmonic forcing212 cn_dyn3d = 'none' !213 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state214 ! ! = 1, bdy data are read in 'bdydata .nc' files215 cn_tra = 'none' !216 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state217 ! ! = 1, bdy data are read in 'bdydata .nc' files218 cn_ice = 'none' !219 nn_ice_dta = 0 ! = 0, bdy data are equal to the initial state220 ! ! = 1, bdy data are read in 'bdydata .nc' files221 rn_ice_tem = 270. ! si3 only: arbitrary temperature of incoming sea ice222 rn_ice_sal = 10. ! si3 only: -- salinity --223 rn_ice_age = 30. ! si3 only: -- age --224 /225 !-----------------------------------------------------------------------226 174 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 227 175 !----------------------------------------------------------------------- … … 233 181 jpnj = 1 ! jpnj number of processors following j (set automatically if < 1) 234 182 / 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 T239 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following240 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 ensure242 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 info250 nn_print = 0 ! level of print (0 no extra print)251 nn_ictls = 0 ! start i indice of control sum (use to compare mono versus252 nn_ictle = 0 ! end i indice of control sum multi processor runs253 nn_jctls = 0 ! start j indice of control over a subdomain)254 nn_jctle = 0 ! end j indice of control255 nn_isplt = 1 ! number of processors in i-direction256 nn_jsplt = 1 ! number of processors in j-direction257 ln_timing = .false. ! timing by routine write out in timing.output file258 ln_diacfl = .false. ! CFL diagnostics write out in cfl_diagnostics.ascii259 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/2_namelist_cfg
r13024 r13056 43 43 / 44 44 !----------------------------------------------------------------------- 45 &namcrs ! Grid coarsening for dynamics output and/or46 ! passive tracer coarsened online simulations47 !-----------------------------------------------------------------------48 /49 !-----------------------------------------------------------------------50 &namtsd ! data : Temperature & Salinity51 !-----------------------------------------------------------------------52 /53 !-----------------------------------------------------------------------54 &namsbc ! Surface Boundary Condition (surface module)55 !-----------------------------------------------------------------------56 /57 !-----------------------------------------------------------------------58 &namsbc_core ! namsbc_core CORE bulk formulae59 !-----------------------------------------------------------------------60 /61 !-----------------------------------------------------------------------62 &namtra_qsr ! penetrative solar radiation63 !-----------------------------------------------------------------------64 /65 !-----------------------------------------------------------------------66 &namsbc_rnf ! runoffs namelist surface boundary condition67 !-----------------------------------------------------------------------68 /69 !-----------------------------------------------------------------------70 &namsbc_ssr ! surface boundary condition : sea surface restoring71 !-----------------------------------------------------------------------72 /73 !-----------------------------------------------------------------------74 &namsbc_alb ! albedo parameters75 !-----------------------------------------------------------------------76 /77 !-----------------------------------------------------------------------78 &namberg ! iceberg parameters79 !-----------------------------------------------------------------------80 /81 !-----------------------------------------------------------------------82 &namlbc ! lateral momentum boundary condition83 !-----------------------------------------------------------------------84 /85 !-----------------------------------------------------------------------86 &nambfr ! bottom friction87 !-----------------------------------------------------------------------88 /89 !-----------------------------------------------------------------------90 &nambbc ! bottom temperature boundary condition (default: NO)91 !-----------------------------------------------------------------------92 ln_trabbc = .true. ! Apply a geothermal heating at the ocean bottom93 /94 !-----------------------------------------------------------------------95 &nambbl ! bottom boundary layer scheme96 !-----------------------------------------------------------------------97 /98 !-----------------------------------------------------------------------99 45 &namcfg ! parameters of the configuration 100 46 !----------------------------------------------------------------------- … … 125 71 ln_sco = .false. ! s- or hybrid z-s-coordinate 126 72 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 127 ln_linssh = .true. ! linear free surface128 73 / 129 74 !----------------------------------------------------------------------- … … 142 87 &namlbc ! lateral momentum boundary condition (default: NO selection) 143 88 !----------------------------------------------------------------------- 144 jpni = 0145 jpnj=0146 89 / 147 90 !----------------------------------------------------------------------- 148 91 &namagrif ! AGRIF zoom ("key_agrif") 149 92 ln_bry_south = .TRUE. 150 !-----------------------------------------------------------------------151 /152 !-----------------------------------------------------------------------153 &nambdy ! unstructured open boundaries (default: OFF)154 93 !----------------------------------------------------------------------- 155 94 / … … 161 100 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 162 101 !----------------------------------------------------------------------- 102 jpni = 0 103 jpnj=0 163 104 / 164 !-----------------------------------------------------------------------165 &namctl ! Control prints (default: OFF)166 !-----------------------------------------------------------------------167 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/2_namelist_ref
r13024 r13056 8 8 &namrun ! parameters of the run 9 9 !----------------------------------------------------------------------- 10 nn_no = 0 ! Assimilation cycle index11 10 cn_exp = "ORCA2" ! experience name 12 11 nn_it000 = 1 ! first time step … … 15 14 nn_time0 = 0 ! initial time of day in hhmm 16 15 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=T19 nn_rstctl = 0 ! restart control ==> activated only if ln_rstart=T20 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist21 ! ! = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart22 ! ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart23 cn_ocerst_in = "restart" ! suffix of ocean restart name (input)24 cn_ocerst_indir = "." ! directory from which to read input ocean restarts25 cn_ocerst_out = "restart" ! suffix of ocean restart name (output)26 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts27 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model28 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 written32 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000)33 16 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 standard35 17 ln_clobber = .true. ! clobber (overwrite) an existing file 36 18 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 37 21 / 38 22 !----------------------------------------------------------------------- … … 78 62 ppkth2 = 48.029893720000 ! 79 63 ppacr2 = 13.000000000000 ! 80 / /64 / 81 65 !----------------------------------------------------------------------- 82 66 &namcfg ! parameters of the configuration … … 107 91 ln_sco = .false. ! s- or hybrid z-s-coordinate 108 92 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 109 ln_linssh = .false. ! linear free surface110 93 / 111 94 !----------------------------------------------------------------------- … … 189 172 / 190 173 !----------------------------------------------------------------------- 191 &nam_tide ! tide parameters ("key_tide")192 !-----------------------------------------------------------------------193 ln_tide_pot = .true. ! use tidal potential forcing194 ln_tide_ramp= .false. !195 rdttideramp = 0. !196 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg197 /198 !-----------------------------------------------------------------------199 &nambdy ! unstructured open boundaries (default: OFF)200 !-----------------------------------------------------------------------201 ln_bdy = .false. ! Use unstructured open boundaries202 nb_bdy = 0 ! number of open boundary sets203 ln_coords_file = .true. ! =T : read bdy coordinates from file204 cn_coords_file = 'coordinates.bdy.nc' ! bdy coordinates files205 ln_mask_file = .false. ! =T : read mask from file206 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 state209 ! ! = 1, bdy data are read in 'bdydata .nc' files210 ! ! = 2, use tidal harmonic forcing data from files211 ! ! = 3, use external data AND tidal harmonic forcing212 cn_dyn3d = 'none' !213 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state214 ! ! = 1, bdy data are read in 'bdydata .nc' files215 cn_tra = 'none' !216 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state217 ! ! = 1, bdy data are read in 'bdydata .nc' files218 cn_ice = 'none' !219 nn_ice_dta = 0 ! = 0, bdy data are equal to the initial state220 ! ! = 1, bdy data are read in 'bdydata .nc' files221 rn_ice_tem = 270. ! si3 only: arbitrary temperature of incoming sea ice222 rn_ice_sal = 10. ! si3 only: -- salinity --223 rn_ice_age = 30. ! si3 only: -- age --224 /225 !-----------------------------------------------------------------------226 174 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 227 175 !----------------------------------------------------------------------- … … 233 181 jpnj = 1 ! jpnj number of processors following j (set automatically if < 1) 234 182 / 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 T239 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following240 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 ensure242 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 info250 nn_print = 0 ! level of print (0 no extra print)251 nn_ictls = 0 ! start i indice of control sum (use to compare mono versus252 nn_ictle = 0 ! end i indice of control sum multi processor runs253 nn_jctls = 0 ! start j indice of control over a subdomain)254 nn_jctle = 0 ! end j indice of control255 nn_isplt = 1 ! number of processors in i-direction256 nn_jsplt = 1 ! number of processors in j-direction257 ln_timing = .false. ! timing by routine write out in timing.output file258 ln_diacfl = .false. ! CFL diagnostics write out in cfl_diagnostics.ascii259 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/3_namelist_cfg
r13024 r13056 43 43 / 44 44 !----------------------------------------------------------------------- 45 &namcrs ! Grid coarsening for dynamics output and/or46 ! passive tracer coarsened online simulations47 !-----------------------------------------------------------------------48 /49 !-----------------------------------------------------------------------50 &namtsd ! data : Temperature & Salinity51 !-----------------------------------------------------------------------52 /53 !-----------------------------------------------------------------------54 &namsbc ! Surface Boundary Condition (surface module)55 !-----------------------------------------------------------------------56 /57 !-----------------------------------------------------------------------58 &namsbc_core ! namsbc_core CORE bulk formulae59 !-----------------------------------------------------------------------60 /61 !-----------------------------------------------------------------------62 &namtra_qsr ! penetrative solar radiation63 !-----------------------------------------------------------------------64 /65 !-----------------------------------------------------------------------66 &namsbc_rnf ! runoffs namelist surface boundary condition67 !-----------------------------------------------------------------------68 /69 !-----------------------------------------------------------------------70 &namsbc_ssr ! surface boundary condition : sea surface restoring71 !-----------------------------------------------------------------------72 /73 !-----------------------------------------------------------------------74 &namsbc_alb ! albedo parameters75 !-----------------------------------------------------------------------76 /77 !-----------------------------------------------------------------------78 &namberg ! iceberg parameters79 !-----------------------------------------------------------------------80 /81 !-----------------------------------------------------------------------82 &namlbc ! lateral momentum boundary condition83 !-----------------------------------------------------------------------84 /85 !-----------------------------------------------------------------------86 &nambfr ! bottom friction87 !-----------------------------------------------------------------------88 /89 !-----------------------------------------------------------------------90 &nambbc ! bottom temperature boundary condition (default: NO)91 !-----------------------------------------------------------------------92 ln_trabbc = .true. ! Apply a geothermal heating at the ocean bottom93 /94 !-----------------------------------------------------------------------95 &nambbl ! bottom boundary layer scheme96 !-----------------------------------------------------------------------97 /98 !-----------------------------------------------------------------------99 45 &namcfg ! parameters of the configuration 100 46 !----------------------------------------------------------------------- … … 125 71 ln_sco = .false. ! s- or hybrid z-s-coordinate 126 72 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 127 ln_linssh = .true. ! linear free surface128 73 / 129 74 !----------------------------------------------------------------------- … … 142 87 &namlbc ! lateral momentum boundary condition (default: NO selection) 143 88 !----------------------------------------------------------------------- 144 jpni = 0145 jpnj=0146 89 / 147 90 !----------------------------------------------------------------------- 148 91 &namagrif ! AGRIF zoom ("key_agrif") 149 92 ln_bry_south = .FALSE. 150 !-----------------------------------------------------------------------151 /152 !-----------------------------------------------------------------------153 &nambdy ! unstructured open boundaries (default: OFF)154 93 !----------------------------------------------------------------------- 155 94 / … … 161 100 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 162 101 !----------------------------------------------------------------------- 102 jpni = 0 103 jpnj=0 163 104 / 164 !-----------------------------------------------------------------------165 &namctl ! Control prints (default: OFF)166 !-----------------------------------------------------------------------167 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/3_namelist_ref
r13024 r13056 8 8 &namrun ! parameters of the run 9 9 !----------------------------------------------------------------------- 10 nn_no = 0 ! Assimilation cycle index11 10 cn_exp = "ORCA2" ! experience name 12 11 nn_it000 = 1 ! first time step … … 15 14 nn_time0 = 0 ! initial time of day in hhmm 16 15 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=T19 nn_rstctl = 0 ! restart control ==> activated only if ln_rstart=T20 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist21 ! ! = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart22 ! ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart23 cn_ocerst_in = "restart" ! suffix of ocean restart name (input)24 cn_ocerst_indir = "." ! directory from which to read input ocean restarts25 cn_ocerst_out = "restart" ! suffix of ocean restart name (output)26 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts27 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model28 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 written32 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000)33 16 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 standard35 17 ln_clobber = .true. ! clobber (overwrite) an existing file 36 18 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 37 21 / 38 22 !----------------------------------------------------------------------- … … 78 62 ppkth2 = 48.029893720000 ! 79 63 ppacr2 = 13.000000000000 ! 80 / /64 / 81 65 !----------------------------------------------------------------------- 82 66 &namcfg ! parameters of the configuration … … 107 91 ln_sco = .false. ! s- or hybrid z-s-coordinate 108 92 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 109 ln_linssh = .false. ! linear free surface110 93 / 111 94 !----------------------------------------------------------------------- … … 189 172 / 190 173 !----------------------------------------------------------------------- 191 &nam_tide ! tide parameters ("key_tide")192 !-----------------------------------------------------------------------193 ln_tide_pot = .true. ! use tidal potential forcing194 ln_tide_ramp= .false. !195 rdttideramp = 0. !196 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg197 /198 !-----------------------------------------------------------------------199 &nambdy ! unstructured open boundaries (default: OFF)200 !-----------------------------------------------------------------------201 ln_bdy = .false. ! Use unstructured open boundaries202 nb_bdy = 0 ! number of open boundary sets203 ln_coords_file = .true. ! =T : read bdy coordinates from file204 cn_coords_file = 'coordinates.bdy.nc' ! bdy coordinates files205 ln_mask_file = .false. ! =T : read mask from file206 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 state209 ! ! = 1, bdy data are read in 'bdydata .nc' files210 ! ! = 2, use tidal harmonic forcing data from files211 ! ! = 3, use external data AND tidal harmonic forcing212 cn_dyn3d = 'none' !213 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state214 ! ! = 1, bdy data are read in 'bdydata .nc' files215 cn_tra = 'none' !216 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state217 ! ! = 1, bdy data are read in 'bdydata .nc' files218 cn_ice = 'none' !219 nn_ice_dta = 0 ! = 0, bdy data are equal to the initial state220 ! ! = 1, bdy data are read in 'bdydata .nc' files221 rn_ice_tem = 270. ! si3 only: arbitrary temperature of incoming sea ice222 rn_ice_sal = 10. ! si3 only: -- salinity --223 rn_ice_age = 30. ! si3 only: -- age --224 /225 !-----------------------------------------------------------------------226 174 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 227 175 !----------------------------------------------------------------------- … … 233 181 jpnj = 1 ! jpnj number of processors following j (set automatically if < 1) 234 182 / 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 T239 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following240 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 ensure242 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 info250 nn_print = 0 ! level of print (0 no extra print)251 nn_ictls = 0 ! start i indice of control sum (use to compare mono versus252 nn_ictle = 0 ! end i indice of control sum multi processor runs253 nn_jctls = 0 ! start j indice of control over a subdomain)254 nn_jctle = 0 ! end j indice of control255 nn_isplt = 1 ! number of processors in i-direction256 nn_jsplt = 1 ! number of processors in j-direction257 ln_timing = .false. ! timing by routine write out in timing.output file258 ln_diacfl = .false. ! CFL diagnostics write out in cfl_diagnostics.ascii259 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/cpp_DOMAINcfg.fcm
r12442 r13056 1 bld::tool::fppkeys key_ mpp_mpi1 bld::tool::fppkeys key_agrif -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/namelist_cfg
r13024 r13056 44 44 / 45 45 !----------------------------------------------------------------------- 46 &namcrs ! Grid coarsening for dynamics output and/or47 ! passive tracer coarsened online simulations48 !-----------------------------------------------------------------------49 /50 !-----------------------------------------------------------------------51 &namtsd ! data : Temperature & Salinity52 !-----------------------------------------------------------------------53 /54 !-----------------------------------------------------------------------55 &namsbc ! Surface Boundary Condition (surface module)56 !-----------------------------------------------------------------------57 /58 !-----------------------------------------------------------------------59 &namsbc_core ! namsbc_core CORE bulk formulae60 !-----------------------------------------------------------------------61 /62 !-----------------------------------------------------------------------63 &namtra_qsr ! penetrative solar radiation64 !-----------------------------------------------------------------------65 /66 !-----------------------------------------------------------------------67 &namsbc_rnf ! runoffs namelist surface boundary condition68 !-----------------------------------------------------------------------69 /70 !-----------------------------------------------------------------------71 &namsbc_ssr ! surface boundary condition : sea surface restoring72 !-----------------------------------------------------------------------73 /74 !-----------------------------------------------------------------------75 &namsbc_alb ! albedo parameters76 !-----------------------------------------------------------------------77 /78 !-----------------------------------------------------------------------79 &namberg ! iceberg parameters80 !-----------------------------------------------------------------------81 /82 !-----------------------------------------------------------------------83 &namlbc ! lateral momentum boundary condition84 !-----------------------------------------------------------------------85 /86 !-----------------------------------------------------------------------87 &nambfr ! bottom friction88 !-----------------------------------------------------------------------89 /90 !-----------------------------------------------------------------------91 &nambbc ! bottom temperature boundary condition (default: NO)92 !-----------------------------------------------------------------------93 ln_trabbc = .true. ! Apply a geothermal heating at the ocean bottom94 /95 !-----------------------------------------------------------------------96 &nambbl ! bottom boundary layer scheme97 !-----------------------------------------------------------------------98 /99 !-----------------------------------------------------------------------100 46 &namcfg ! parameters of the configuration 101 47 !----------------------------------------------------------------------- … … 126 72 ln_sco = .false. ! s- or hybrid z-s-coordinate 127 73 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 128 ln_linssh = .true. ! linear free surface129 74 / 130 75 !----------------------------------------------------------------------- … … 143 88 &namlbc ! lateral momentum boundary condition (default: NO selection) 144 89 !----------------------------------------------------------------------- 145 jpni = 0146 jpnj=0147 90 / 148 91 !----------------------------------------------------------------------- 149 92 &namagrif ! AGRIF zoom ("key_agrif") 150 93 ln_bry_south = .TRUE. 151 !-----------------------------------------------------------------------152 /153 !-----------------------------------------------------------------------154 &nambdy ! unstructured open boundaries (default: OFF)155 94 !----------------------------------------------------------------------- 156 95 / … … 162 101 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 163 102 !----------------------------------------------------------------------- 103 jpni = 0 104 jpnj=0 164 105 / 165 !-----------------------------------------------------------------------166 &namctl ! Control prints (default: OFF)167 !-----------------------------------------------------------------------168 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/namelist_ref
r13024 r13056 9 9 &namrun ! parameters of the run 10 10 !----------------------------------------------------------------------- 11 nn_no = 0 ! Assimilation cycle index12 11 cn_exp = "ORCA2" ! experience name 13 12 nn_it000 = 1 ! first time step … … 16 15 nn_time0 = 0 ! initial time of day in hhmm 17 16 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=T20 nn_rstctl = 0 ! restart control ==> activated only if ln_rstart=T21 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist22 ! ! = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart23 ! ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart24 cn_ocerst_in = "restart" ! suffix of ocean restart name (input)25 cn_ocerst_indir = "." ! directory from which to read input ocean restarts26 cn_ocerst_out = "restart" ! suffix of ocean restart name (output)27 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts28 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model29 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 written33 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000)34 17 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 standard36 18 ln_clobber = .true. ! clobber (overwrite) an existing file 37 19 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 38 22 / 39 23 !----------------------------------------------------------------------- … … 79 63 ppkth2 = 48.029893720000 ! 80 64 ppacr2 = 13.000000000000 ! 81 / /65 / 82 66 !----------------------------------------------------------------------- 83 67 &namcfg ! parameters of the configuration … … 108 92 ln_sco = .false. ! s- or hybrid z-s-coordinate 109 93 ln_isfcav = .false. ! ice shelf cavity (T: see namzgr_isf) 110 ln_linssh = .false. ! linear free surface111 94 / 112 95 !----------------------------------------------------------------------- … … 190 173 / 191 174 !----------------------------------------------------------------------- 192 &nam_tide ! tide parameters ("key_tide")193 !-----------------------------------------------------------------------194 ln_tide_pot = .true. ! use tidal potential forcing195 ln_tide_ramp= .false. !196 rdttideramp = 0. !197 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg198 /199 !-----------------------------------------------------------------------200 &nambdy ! unstructured open boundaries (default: OFF)201 !-----------------------------------------------------------------------202 ln_bdy = .false. ! Use unstructured open boundaries203 nb_bdy = 0 ! number of open boundary sets204 ln_coords_file = .true. ! =T : read bdy coordinates from file205 cn_coords_file = 'coordinates.bdy.nc' ! bdy coordinates files206 ln_mask_file = .false. ! =T : read mask from file207 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 state210 ! ! = 1, bdy data are read in 'bdydata .nc' files211 ! ! = 2, use tidal harmonic forcing data from files212 ! ! = 3, use external data AND tidal harmonic forcing213 cn_dyn3d = 'none' !214 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state215 ! ! = 1, bdy data are read in 'bdydata .nc' files216 cn_tra = 'none' !217 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state218 ! ! = 1, bdy data are read in 'bdydata .nc' files219 cn_ice = 'none' !220 nn_ice_dta = 0 ! = 0, bdy data are equal to the initial state221 ! ! = 1, bdy data are read in 'bdydata .nc' files222 rn_ice_tem = 270. ! si3 only: arbitrary temperature of incoming sea ice223 rn_ice_sal = 10. ! si3 only: -- salinity --224 rn_ice_age = 30. ! si3 only: -- age --225 /226 !-----------------------------------------------------------------------227 175 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 228 176 !----------------------------------------------------------------------- … … 234 182 jpnj = 1 ! jpnj number of processors following j (set automatically if < 1) 235 183 / 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 T240 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following241 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 ensure243 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 info251 nn_print = 0 ! level of print (0 no extra print)252 nn_ictls = 0 ! start i indice of control sum (use to compare mono versus253 nn_ictle = 0 ! end i indice of control sum multi processor runs254 nn_jctls = 0 ! start j indice of control over a subdomain)255 nn_jctle = 0 ! end j indice of control256 nn_isplt = 1 ! number of processors in i-direction257 nn_jsplt = 1 ! number of processors in j-direction258 ln_timing = .false. ! timing by routine write out in timing.output file259 ln_diacfl = .false. ! CFL diagnostics write out in cfl_diagnostics.ascii260 / -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_connect.F90
r13055 r13056 1 MODULE 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 13 CONTAINS 14 1 15 #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) 30 34 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 47 46 ! 48 47 !!---------------------------------------------------------------------- 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 ! 56 49 IF( before) THEN 57 50 ptab(i1:i2,j1:j2,k1:k2) = e3t_0(i1:i2,j1:j2,k1:k2) … … 62 55 END SUBROUTINE connect_e3t_copy 63 56 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 *** 69 60 !!---------------------------------------------------------------------- 70 61 INTEGER , INTENT(in ) :: i1, i2, j1, j2 71 REAL , DIMENSION(i1:i2,j1:j2), INTENT(inout) :: ptab62 REAL(wp), DIMENSION(i1:i2,j1:j2), INTENT(inout) :: ptab 72 63 LOGICAL , INTENT(in ) :: before 73 64 INTEGER , INTENT(in ) :: nb , ndir 74 LOGICAL :: western_side, eastern_side,northern_side,southern_side75 65 ! 76 66 !!---------------------------------------------------------------------- 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 ! 84 68 IF( before) THEN 85 69 ptab(i1:i2,j1:j2) = mbkt(i1:i2,j1:j2)*ssmask(i1:i2,j1:j2) … … 90 74 ELSEWHERE 91 75 ssmask(i1:i2,j1:j2) = 1. 92 END WHERE 93 76 END WHERE 94 77 ENDIF 95 78 ! 96 79 END SUBROUTINE connect_bottom_level 97 80 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 109 89 ! 110 90 !!---------------------------------------------------------------------- 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 ! 119 94 IF( before) THEN 120 do jk=1,jpk121 do jj=j1,j2122 do ji=i1,i2123 if (mbkt(ji,jj)>=jk) then124 ptab(ji,jj,jk) = e3t_0(ji,jj,jk)125 else126 ptab(ji,jj,jk) = 0.127 endif128 enddo129 enddo130 enddo131 132 do jj=j1,j2133 do ji=i1,i2134 ptab(ji,jj,jpk+1) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj)135 enddo136 enddo137 138 ELSE139 do jj=j1,j2140 do ji=i1,i2141 bathy_local (ji,jj) = SUM ( e3t_0(ji,jj, 1:mbkt(ji,jj) ) ) * ssmask(ji,jj)142 enddo143 enddo144 145 DO jk=1,jpk146 DO jj=j1,j2147 DO ji=i1,i2148 if (e3t_interp(ji,jj,jk) == -10) then ! the connection has not yet been done149 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 endif153 ENDDO154 ENDDO155 ENDDO156 ENDIF157 !158 END SUBROUTINE connect_e3t_connect159 160 SUBROUTINE connect_e3u( ptab, i1, i2, j1, j2, k1, k2,before, nb, ndir )161 USE dom_oce162 !!----------------------------------------------------------------------163 !! *** ROUTINE interpun ***164 !!---------------------------------------------165 !!166 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2167 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: ptab168 LOGICAL, INTENT(in) :: before169 INTEGER, INTENT(in) :: nb , ndir170 !!171 INTEGER :: ji,jj,jk172 REAL(wp) :: zrhoy173 ! vertical interpolation:174 REAL(wp), DIMENSION(k1:k2) :: tabin, h_in175 REAL(wp), DIMENSION(1:jpk) :: h_out176 INTEGER :: N_in, N_out, iref177 REAL(wp) :: h_diff178 LOGICAL :: western_side, eastern_side179 !!---------------------------------------------180 !181 IF (before) THEN182 95 DO jk=1,jpk 183 96 DO jj=j1,j2 184 97 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 193 103 END DO 194 104 END DO 195 105 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 196 112 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 287 120 DO jj=j1,j2 288 121 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 353 198 354 199 #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 357 202 #endif 203 204 END MODULE agrif_connect -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_dom_update.F90
r13055 r13056 1 MODULE 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 13 CONTAINS 14 1 15 #if defined key_agrif 2 subroutine agrif_update_all3 USE agrif_parameters4 USE agrif_profiles5 external update_bottom_level, update_e3t, update_e3u, update_e3v6 16 7 if (agrif_root()) return 17 SUBROUTINE agrif_update_all 18 !!---------------------------------------------------------------------- 19 !! *** ROUTINE agrif_update_all *** 20 !!---------------------------------------------------------------------- 21 ! 22 IF( Agrif_Root() ) return 8 23 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 10 32 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) 26 34 !!---------------------------------------------------------------------- 27 35 !! *** ROUTINE interpsshn *** … … 31 39 LOGICAL , INTENT(in ) :: before 32 40 INTEGER , INTENT(in ) :: nb , ndir 33 LOGICAL :: western_side, eastern_side,northern_side,southern_side34 41 ! 35 42 !!---------------------------------------------------------------------- 36 INTEGER :: ji,jj37 43 ! 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 43 44 IF( before) THEN 44 45 ptab(i1:i2,j1:j2) = mbkt(i1:i2,j1:j2)*ssmask(i1:i2,j1:j2) … … 46 47 mbkt(i1:i2,j1:j2) = nint(ptab(i1:i2,j1:j2)) 47 48 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. 50 51 ELSEWHERE 51 ssmask(i1:i2,j1:j2) = 1. 52 END WHERE 53 52 ssmask(i1:i2,j1:j2) = 1. 53 END WHERE 54 54 ENDIF 55 55 ! … … 57 57 58 58 SUBROUTINE update_e3t( tabres, i1, i2, j1, j2, k1, k2, before ) 59 USE dom_oce60 implicit none61 59 !!--------------------------------------------- 62 !! *** update_e3t updateT***60 !! *** update_e3t *** 63 61 !!--------------------------------------------- 64 62 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 … … 70 68 ! 71 69 IF (before) THEN 72 73 74 75 if (mbkt(ji,jj) <= jk) then76 tabres(ji,jj,jk) = e3t_0(ji,jj,jk)77 else78 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. 79 77 endif 80 END DO81 78 END DO 82 79 END DO 83 ELSE84 DO jk=k1,k285 DO jj=j1,j286 DO ji=i1,i287 if (mbkt(ji,jj) <= jk) then88 e3t_0(ji,jj,jk) = MAX(tabres(ji,jj,jk),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat))89 else90 e3t_0(ji,jj,jk) = e3t_1d(jk)91 endif92 END DO93 END DO94 END DO95 !96 ENDIF97 !98 END SUBROUTINE update_e3t99 100 SUBROUTINE update_e3u( tabres, i1, i2, j1, j2, k1, k2, before )101 USE dom_oce102 implicit none103 !!---------------------------------------------104 !! *** ROUTINE update_e3u ***105 !!---------------------------------------------106 INTEGER , INTENT(in ) :: i1, i2, j1, j2, k1, k2107 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres108 LOGICAL , INTENT(in ) :: before109 !110 INTEGER :: ji, jj, jk111 REAL :: zrhoy112 !!---------------------------------------------113 !114 IF( before ) THEN115 zrhoy = Agrif_Rhoy()116 DO jk = k1, k2117 do jj=j1,j2118 do ji=i1,i2119 if (min(mbkt(ji,jj),mbkt(ji+1,jj))<=jk) then120 tabres(ji,jj,jk) = zrhoy * e2u(ji,jj) * MIN(e3zps_min,e3t_1d(jk)*e3zps_rat)121 else122 tabres(ji,jj,jk) = zrhoy * e2u(ji,jj) * e3u_0(ji,jj,jk)123 endif124 enddo125 enddo126 80 END DO 127 81 ELSE … … 129 83 DO jj=j1,j2 130 84 DO ji=i1,i2 131 if (min(mbkt(ji,jj),mbkt(ji+1,jj))<=jk) then132 e3u_0(ji,jj,jk)=MAX(tabres(ji,jj,jk) / e2u(ji,jj),MIN(e3zps_min,e3t_1d(jk)*e3zps_rat))133 else134 e3u_0(ji,jj,jk) = e3t_1d(jk)135 endif85 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 136 90 END DO 137 91 END DO … … 140 94 ENDIF 141 95 ! 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 188 98 #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 191 101 #endif 102 103 END MODULE agrif_dom_update -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_domzgr.F90
r13024 r13056 1 MODULE 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 12 CONTAINS 13 1 14 #if defined key_agrif 2 subroutine agrif_domzgr3 end subroutine agrif_domzgr4 15 5 subroutine agrif_create_bathy_meter 6 use agrif_profiles 7 external :: init_bathy 16 SUBROUTINE agrif_create_bathy_meter 8 17 9 callAgrif_Init_variable(bathy_id, procname = init_bathy)18 CALL Agrif_Init_variable(bathy_id, procname = init_bathy) 10 19 11 end subroutineagrif_create_bathy_meter20 END SUBROUTINE agrif_create_bathy_meter 12 21 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) 15 23 !!---------------------------------------------------------------------- 16 24 !! *** ROUTINE interpsshn *** … … 20 28 LOGICAL , INTENT(in ) :: before 21 29 INTEGER , INTENT(in ) :: nb , ndir 22 LOGICAL :: western_side, eastern_side,northern_side,southern_side23 30 ! 24 31 !!---------------------------------------------------------------------- 25 32 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 31 34 IF( before) THEN 32 35 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 39 41 ELSE 40 42 bathy(i1:i2,j1:j2)=ptab … … 42 44 ! 43 45 END SUBROUTINE init_bathy 46 44 47 #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 47 50 #endif 51 END MODULE agrif_domzgr -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_modutil.f90
r13024 r13056 1 !2 1 MODULE agrif_modutil 3 2 ! -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_parameters.F90
r13024 r13056 1 #ifdef key_agrif 2 module agrif_parameters 3 USE par_kind1 MODULE agrif_parameters 2 3 USE par_kind 4 4 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 15 6 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 20 20 #endif 21 22 END MODULE agrif_parameters -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_profiles.F90
r12414 r13056 1 moduleagrif_profiles1 MODULE agrif_profiles 2 2 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 7 INTEGER :: glamt_id, glamu_id, glamv_id,glamf_id 8 INTEGER :: gphit_id, gphiu_id, gphiv_id,gphif_id 9 INTEGER :: e1t_id, e1u_id, e1v_id, e1f_id 10 INTEGER :: e2t_id, e2u_id, e2v_id, e2f_id 7 11 8 12 9 integer:: bathy_id13 INTEGER :: bathy_id 10 14 11 15 ! Vertical scale factors 12 16 13 integer:: e3t_id14 integer:: e3t_copy_id15 integer:: e3t_connect_id16 integer:: e3u_id, e3v_id17 INTEGER :: e3t_id 18 INTEGER :: e3t_copy_id 19 INTEGER :: e3t_connect_id 20 INTEGER :: e3u_id, e3v_id 17 21 18 22 ! Bottom level 19 integer :: bottom_level_id 20 end module agrif_profiles 23 INTEGER :: bottom_level_id 24 25 # endif 26 END 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 1 MODULE agrif_recompute_scales 2 3 3 USE dom_oce 4 4 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 5 5 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 13 CONTAINS 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 8 22 9 23 ! Scale factors and depth at U-, V-, UW and VW-points … … 85 99 IF( MINVAL( gdept_0(:,:,:) ) < 0._wp ) CALL ctl_stop( ' zgr_zps : e r r o r gdept_0 < 0' ) 86 100 IF( MINVAL( gdepw_0(:,:,:) ) < 0._wp ) CALL ctl_stop( ' zgr_zps : e r r o r gdepw_0 < 0' ) 87 88 end subroutineagrif_recompute_scalefactors101 ! 102 END SUBROUTINE agrif_recompute_scalefactors 89 103 #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 92 106 #endif 107 END MODULE agrif_recompute_scales -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/agrif_user.F90
r13024 r13056 1 1 #if defined key_agrif 2 SUBROUTINE agrif_user() 3 !!---------------------------------------------------------------------- 4 !! *** ROUTINE agrif_user *** 5 !!---------------------------------------------------------------------- 6 END SUBROUTINE agrif_user 7 2 8 SUBROUTINE agrif_initworkspace() 3 9 !!---------------------------------------------------------------------- -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/daymod.f90
r13024 r13056 28 28 ! 29 29 USE in_out_manager ! I/O manager 30 USE prtctl ! Print control31 30 USE iom ! 32 USE timing ! Timing33 31 34 32 IMPLICIT NONE … … 36 34 37 35 PUBLIC day ! called by step.F90 38 PUBLIC day_init ! called by istate.F9039 36 PUBLIC day_mth ! Needed by TAM 40 37 … … 47 44 !!---------------------------------------------------------------------- 48 45 CONTAINS 49 50 SUBROUTINE day_init51 !!----------------------------------------------------------------------52 !! *** ROUTINE day_init ***53 !!54 !! ** Purpose : Initialization of the calendar values to their values 1 time step before nit00055 !! because day will be called at the beginning of step56 !!57 !! ** Action : - nyear : current year58 !! - nmonth : current month of the year nyear59 !! - nday : current day of the month nmonth60 !! - nday_year : current day of the year nyear61 !! - nsec_year : current time step counted in second since 00h jan 1st of the current year62 !! - nsec_month : current time step counted in second since 00h 1st day of the current month63 !! - nsec_day : current time step counted in second since 00h of the current day64 !! - nsec1jan000 : second since Jan. 1st 00h of nit000 year and Jan. 1st 00h of the current year65 !! - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth66 !!----------------------------------------------------------------------67 INTEGER :: inbday, idweek ! local integers68 REAL(wp) :: zjul ! local scalar69 !!----------------------------------------------------------------------70 !71 ! max number of seconds between each restart72 IF( REAL( nitend - nit000 + 1 ) * rdt > REAL( HUGE( nsec1jan000 ) ) ) THEN73 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 ENDIF76 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 / 1000084 nmonth = ( ndastp - (nyear * 10000) ) / 10085 nday = ndastp - (nyear * 10000) - ( nmonth * 100 )86 87 nhour = nn_time0 / 10088 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 error92 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 = 095 CALL day_mth96 97 IF ( nday == 0 ) THEN ! for ex if ndastp = ndate0 - 198 nmonth = nmonth - 199 nday = nmonth_len(nmonth)100 ENDIF101 IF ( nmonth == 0 ) THEN ! go at the end of previous year102 nmonth = 12103 nyear = nyear - 1104 nsec1jan000 = nsec1jan000 - nsecd * nyear_len(0)105 IF( nleapy == 1 ) CALL day_mth106 ENDIF107 108 ! day since january 1st109 nday_year = nday + SUM( nmonth_len(1:nmonth - 1) )110 111 !compute number of days between last monday and today112 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 day114 idweek = MOD(inbday, 7) ! compute nb day between last monday and current day115 IF (idweek .lt. 0) idweek=idweek+7 ! Avoid negative values for dates before 01.01.1900116 117 ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step118 IF (nhour*3600+nminute*60-ndt05 .gt. 0) THEN119 ! 1 timestep before current middle of first time step is still the same day120 nsec_year = (nday_year-1) * nsecd + nhour*3600+nminute*60 - ndt05121 nsec_month = (nday-1) * nsecd + nhour*3600+nminute*60 - ndt05122 ELSE123 ! 1 time step before the middle of the first time step is the previous day124 nsec_year = nday_year * nsecd + nhour*3600+nminute*60 - ndt05125 nsec_month = nday * nsecd + nhour*3600+nminute*60 - ndt05126 ENDIF127 nsec_week = idweek * nsecd + nhour*3600+nminute*60 - ndt05128 nsec_day = nhour*3600+nminute*60 - ndt05129 IF( nsec_day .lt. 0 ) nsec_day = nsec_day + nsecd130 IF( nsec_week .lt. 0 ) nsec_week = nsec_week + nsecd*7131 132 ! control print133 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_year137 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_init140 CALL day( nit000 )141 !142 IF( lwxios ) THEN143 ! define variables in restart file when writing with XIOS144 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 ENDIF149 150 END SUBROUTINE day_init151 152 46 153 47 SUBROUTINE day_mth … … 228 122 !!---------------------------------------------------------------------- 229 123 ! 230 IF( ln_timing ) CALL timing_start('day')231 !232 124 zprec = 0.1 / rday 233 125 ! ! New time-step … … 273 165 274 166 IF( nsec_week > 7*nsecd ) nsec_week = ndt05 ! New week 275 276 IF(ln_ctl) THEN277 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear278 CALL prt_ctl_info(charout)279 ENDIF280 281 IF( lrst_oce ) CALL day_rst( kt, 'WRITE' ) ! write day restart information282 !283 IF( ln_timing ) CALL timing_stop('day')284 167 ! 285 168 END SUBROUTINE day 286 169 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 the296 !! end of the current(previous) run297 !! adatrj(0) : number of elapsed days since the begining of the experiment at the298 !! 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 last304 !! time step of previous run + 1.305 !! In both those options, the exact duration of the experiment306 !! 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-step314 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag315 !316 REAL(wp) :: zkt, zndastp, zdayfrac, ksecs, ktime317 INTEGER :: ihour, iminute318 !!----------------------------------------------------------------------319 320 IF( TRIM(cdrw) == 'READ' ) THEN321 322 IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN323 ! Get Calendar informations324 CALL iom_get( numror, 'kt', zkt, ldxios = lrxios ) ! last time-step of previous run325 IF(lwp) THEN326 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 SELECT334 WRITE(numout,*)335 ENDIF336 ! Control of date337 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 adatrj341 IF ( nrstdt == 2 ) THEN342 ! 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 minutes349 zdayfrac=adatrj-INT(adatrj)350 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj351 ihour = INT(ksecs/3600)352 iminute = ksecs/60-ihour*60353 354 ! Add to nn_time0355 nhour = nn_time0 / 100356 nminute = ( nn_time0 - nhour * 100 )357 nminute=nminute+iminute358 359 IF( nminute >= 60 ) THEN360 nminute=nminute-60361 nhour=nhour+1362 ENDIF363 nhour=nhour+ihour364 IF( nhour >= 24 ) THEN365 nhour=nhour-24366 adatrj=adatrj+1367 ENDIF368 nn_time0 = nhour * 100 + nminute369 adatrj = INT(adatrj) ! adatrj set to integer as nn_time0 updated370 ELSE371 ! 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_nam373 nhour = nn_time0 / 100374 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 ) / rday377 ! note this is wrong if time step has changed during run378 ENDIF379 ELSE380 ! 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_nam382 nhour = nn_time0 / 100383 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 ) / rday386 ENDIF387 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error388 !389 IF(lwp) THEN390 WRITE(numout,*) ' *** Info used values : '391 WRITE(numout,*) ' date ndastp : ', ndastp392 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj393 WRITE(numout,*) ' nn_time0 : ',nn_time0394 WRITE(numout,*)395 ENDIF396 !397 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN398 !399 IF( kt == nitrst ) THEN400 IF(lwp) WRITE(numout,*)401 IF(lwp) WRITE(numout,*) 'rst_write : write oce restart file kt =', kt402 IF(lwp) WRITE(numout,*) '~~~~~~~'403 ENDIF404 ! calendar control405 IF( lwxios ) CALL iom_swap( cwxios_context )406 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step407 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date408 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj , ldxios = lwxios ) ! number of elapsed days since409 ! ! the begining of the run [s]410 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), ldxios = lwxios ) ! time411 IF( lwxios ) CALL iom_swap( cxios_context )412 ENDIF413 !414 END SUBROUTINE day_rst415 416 170 !!====================================================================== 417 171 END MODULE daymod -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/depth_e3.F90
r13024 r13056 19 19 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 20 20 USE lib_mpp ! distributed memory computing library 21 USE timing ! Timing22 21 23 22 IMPLICIT NONE -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dom_oce.F90
r13024 r13056 95 95 !! ---------------------------- 96 96 ! !!* Namelist namdom : time & space domain * 97 LOGICAL , PUBLIC :: ln_linssh !: =T linear free surface ==>> model level are fixed in time98 97 LOGICAL , PUBLIC :: ln_meshmask !: =T create a mesh-mask file (mesh_mask.nc) 99 98 REAL(wp), PUBLIC :: rn_isfhmin !: threshold to discriminate grounded ice to floating ice … … 146 145 INTEGER , PUBLIC :: narea !: number for local area 147 146 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 boundaries149 INTEGER, ALLOCATABLE, PUBLIC :: nbondj_bdy(:) !: mark j-direction local boundaries for BDY open boundaries150 INTEGER, ALLOCATABLE, PUBLIC :: nbondi_bdy_b(:) !: mark i-direction of neighbours local boundaries for BDY open boundaries151 INTEGER, ALLOCATABLE, PUBLIC :: nbondj_bdy_b(:) !: mark j-direction of neighbours local boundaries for BDY open boundaries152 147 153 148 INTEGER, PUBLIC :: npolj !: north fold mark (0, 3 or 4) -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domain.F90
r13024 r13056 68 68 !!---------------------------------------------------------------------- 69 69 ! 70 ! IF( nn_timing == 1 ) CALL timing_start('dom_init')71 !72 70 IF(lwp) THEN 73 71 WRITE(numout,*) … … 105 103 !!---------------------------------------------------------------------- 106 104 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, & 111 108 & 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, ppacr2118 109 119 110 NAMELIST/namdom/ nn_bathy, cn_topo, cn_bath, cn_lon, cn_lat, rn_scale, nn_interp, & … … 149 140 150 141 cexper = cn_exp 151 nrstdt = nn_rstctl152 142 nit000 = nn_it000 153 143 nitend = nn_itend 154 144 ndate0 = nn_date0 155 145 nleapy = nn_leapy 156 ninist = nn_istate157 nstock = nn_stock158 nstocklist = nn_stocklist159 nwrite = nn_write160 neuler = nn_euler161 IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN162 WRITE(ctmp1,*) 'ln_rstart =.FALSE., nn_euler is forced to 0 '163 CALL ctl_warn( ctmp1 )164 neuler = 0165 ENDIF166 167 ! ! control of output frequency168 IF ( nstock == 0 .OR. nstock > nitend ) THEN169 WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend170 CALL ctl_warn( ctmp1 )171 nstock = nitend172 ENDIF173 IF ( nwrite == 0 ) THEN174 WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend175 CALL ctl_warn( ctmp1 )176 nwrite = nitend177 ENDIF178 179 180 181 182 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL183 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 SELECT193 194 146 195 147 ! -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dombat.F90
r13024 r13056 7 7 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 8 8 USE lib_mpp ! distributed memory computing library 9 USE timing ! Timing10 9 #if defined key_agrif 11 10 USE agrif_modutil -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dombat_util.f90
r12414 r13056 1 !2 1 MODULE agrif_modutil 3 2 ! -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domcfg.f90
r12414 r13056 99 99 WRITE(numout,*) 100 100 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) 121 120 ENDIF 122 121 25 FORMAT( 100(10x,19i4,/) ) -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domclo.F90
r13024 r13056 12 12 USE domngb ! closest point algorithm 13 13 USE phycst ! rpi, rad, ra 14 USE domut il! flood filling algorithm (fill_pool)14 USE domutl ! flood filling algorithm (fill_pool) 15 15 USE in_out_manager ! I/O manager 16 16 USE lbclnk ! lateral boundary condition - MPP exchanges -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domhgr.F90
r13024 r13056 286 286 gphi0 = zphi1 + zsin_alpha * ze1deg * REAL( jpjglo-2 , wp ) 287 287 ! 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 292 290 ! 293 291 DO jj = 1, jpj … … 343 341 e1_e2v(:,:) = e1v(:,:) / e2v(:,:) 344 342 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) 346 344 WRITE(numout,*) 347 345 WRITE(numout,*) ' longitude and e1 scale factors' -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domisf.F90
r12414 r13056 14 14 !!--------------------------------------------------------------------- 15 15 USE dom_oce 16 USE domut il! flood filling algorithm16 USE domutl ! flood filling algorithm 17 17 USE domngb ! find nearest neighbourg 18 18 USE in_out_manager ! I/O manager -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/dommsk.F90
r13024 r13056 27 27 USE domwri ! domain: write the meshmask file 28 28 USE usrdef_fmask ! user defined fmask 29 USE bdy_oce ! open boundary30 29 ! 31 30 USE in_out_manager ! I/O manager … … 97 96 !! 98 97 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_bdy106 98 !!--------------------------------------------------------------------- 107 99 ! … … 183 175 CALL lbc_lnk( 'dommsk', tmask , 'T', 1._wp ) ! Lateral boundary conditions 184 176 185 ! Mask corrections for bdy (read in mppini2)186 REWIND( numnam_ref ) ! Namelist nambdy in reference namelist :Unstructured open boundaries187 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 boundaries190 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 ) THEN194 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, jpkm1198 DO jj = 1, jpj199 DO ji = 1, jpi200 tmask(ji,jj,jk) = tmask(ji,jj,jk) * bdytmask(ji,jj)201 END DO202 END DO203 END DO204 ENDIF205 206 177 ! Ocean/land mask at u-, v-, and f-points (computed from tmask) 207 178 ! ---------------------------------------- -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domutl.F90
r13024 r13056 1 MODULE domut il1 MODULE domutl 2 2 !! 3 3 !!====================================================================== … … 72 72 END IF 73 73 END IF 74 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domut il', nseed ) ! nseed =0 means on land => WARNING later on74 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domutl', nseed ) ! nseed =0 means on land => WARNING later on 75 75 ! 76 76 ! loop until the stack size is 0 or if the pool is larger than the critical size … … 106 106 ! 107 107 ! exchange seed 108 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domut il', nseed ) ! this is the sum of all the point check this iteration108 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domutl', nseed ) ! this is the sum of all the point check this iteration 109 109 ! 110 110 rseedmap_b(:,:,:)=rseedmap(:,:,:) 111 CALL lbc_lnk('domut il', rseedmap, 'T', 1.)111 CALL lbc_lnk('domutl', rseedmap, 'T', 1.) 112 112 ! 113 113 ! build new list of seed … … 168 168 END IF 169 169 END IF 170 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domut il', nseed ) ! nseed =0 means on land => WARNING later on170 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domutl', nseed ) ! nseed =0 means on land => WARNING later on 171 171 ! 172 172 ! loop until the stack size is 0 or if the pool is larger than the critical size … … 195 195 ! 196 196 ! exchange seed 197 nseed=SUM(rseedmap); IF( lk_mpp ) CALL mpp_sum('domut il', nseed ) ! this is the sum of all the point check this iteration198 ! 199 CALL lbc_lnk('domut il', 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.) 200 200 ! 201 201 ! build new list of seed … … 268 268 END SUBROUTINE del_head_idx 269 269 ! 270 END MODULE domut il270 END MODULE domutl -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/domzgr.F90
r13024 r13056 45 45 USE dombat 46 46 USE domisf 47 USE agrif_domzgr 47 48 48 49 IMPLICIT NONE … … 119 120 120 121 121 NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav , ln_linssh122 NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav 122 123 !!---------------------------------------------------------------------- 123 124 ! … … 172 173 WRITE(numout,*) ' s- or hybrid z-s-coordinate ln_sco = ', ln_sco 173 174 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 178 176 179 177 ioptio = 0 ! Check Vertical coordinate options … … 209 207 ENDIF 210 208 ! 211 IF( nprint == 1 .AND.lwp ) THEN209 IF( lwp ) THEN 212 210 WRITE(numout,*) ' MIN val k_top ', MINVAL( k_top(:,:) ), ' MAX ', MAXVAL( k_top(:,:) ) 213 211 WRITE(numout,*) ' MIN val k_bot ', MINVAL( k_bot(:,:) ), ' MAX ', MAXVAL( k_bot(:,:) ) … … 1535 1533 hiff(:,:) = MIN( hiff(:,:), hbatf(:,:) ) 1536 1534 1537 IF( nprint == 1 .AND.lwp ) THEN1535 IF( lwp ) THEN 1538 1536 WRITE(numout,*) ' MAX val hif t ', MAXVAL( hift (:,:) ), ' f ', MAXVAL( hiff (:,:) ), & 1539 1537 & ' u ', MAXVAL( hifu (:,:) ), ' v ', MAXVAL( hifv (:,:) ) … … 1591 1589 END DO 1592 1590 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(:,:) ), & 1594 1592 & ' MAX ', MAXVAL( mbathy(:,:) ) 1595 1593 1596 IF( nprint == 1 .AND.lwp ) THEN ! min max values over the local domain1594 IF( lwp ) THEN ! min max values over the local domain 1597 1595 WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 1598 1596 WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ), & … … 1982 1980 z_gsigt(jk) = -fssig( REAL(jk,wp) ) 1983 1981 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) 1985 1983 ! 1986 1984 ! Coefficients for vertical scale factors at w-, t- levels -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/in_out_manager.F90
r12414 r13056 22 22 !!---------------------------------------------------------------------- 23 23 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 directory26 CHARACTER(lc) :: cn_ocerst_out !: suffix of ocean restart name (output)27 CHARACTER(lc) :: cn_ocerst_outdir !: restart output directory28 LOGICAL :: ln_rstart !: start from (F) rest or (T) a restart file29 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)32 24 INTEGER :: nn_it000 !: index of the first time step 33 25 INTEGER :: nn_itend !: index of the last time step … … 35 27 INTEGER :: nn_time0 !: initial time of day in hhmm 36 28 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 frequency39 INTEGER :: nn_stock !: restart file frequency40 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times41 29 LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) 42 30 LOGICAL :: ln_cfmeta !: output additional data to netCDF files required for compliance with the CF metadata standard … … 45 33 LOGICAL :: ln_xios_read !: use xios to read single file restart 46 34 INTEGER :: nn_wxios !: write resart using xios 0 - no, 1 - single, 2 - multiple file output 47 INTEGER :: nn_no !: Assimilation cycle48 35 49 36 #if defined key_netcdf4 … … 74 61 75 62 CHARACTER(lc) :: cexper !: experiment name used for output filename 76 INTEGER :: nrstdt !: control of the time step (0, 1 or 2)77 63 INTEGER :: nit000 !: index of the first time step 78 64 INTEGER :: nitend !: index of the last time step 79 65 INTEGER :: ndate0 !: initial calendar date aammjj 80 66 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 frequency83 INTEGER :: nstock !: restart file frequency84 INTEGER, DIMENSION(10) :: nstocklist !: restart dump times85 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 written90 LOGICAL :: lrst_oce !: logical to control the oce restart write91 LOGICAL :: lrst_ice !: logical to control the ice restart write92 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 next97 98 !!----------------------------------------------------------------------99 !! output monitoring100 !!----------------------------------------------------------------------101 LOGICAL :: ln_ctl !: run control for debugging102 TYPE :: sn_ctl !: optional use structure for finer control over output selection103 LOGICAL :: l_config = .FALSE. !: activate/deactivate finer control104 ! Note if l_config is True then ln_ctl is ignored.105 ! Otherwise setting ln_ctl True is equivalent to setting106 ! all the following logicals in this structure True107 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 files114 ! Default settings of 0/1000000/1 should ensure all areas report.115 ! Set to a more restrictive range to select specific areas116 INTEGER :: procmin = 0 !: Minimum narea to output117 INTEGER :: procmax = 1000000 !: Maximum narea to output118 INTEGER :: procincr = 1 !: narea increment to output119 INTEGER :: ptimincr = 1 !: timestep increment to output (time.step and run.stat)120 END TYPE sn_ctl121 122 TYPE (sn_ctl) :: sn_cfctl !: run control structure for selective output123 LOGICAL :: ln_timing !: run control for timing124 LOGICAL :: ln_diacfl !: flag whether to create CFL diagnostics125 INTEGER :: nn_print !: level of print (0 no print)126 INTEGER :: nn_ictls !: Start i indice for the SUM control127 INTEGER :: nn_ictle !: End i indice for the SUM control128 INTEGER :: nn_jctls !: Start j indice for the SUM control129 INTEGER :: nn_jctle !: End j indice for the SUM control130 INTEGER :: nn_isplt !: number of processors following i131 INTEGER :: nn_jsplt !: number of processors following j132 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 names136 137 INTEGER :: ijsplt = 1 !: nb of local domain = nb of processors138 67 139 68 !!---------------------------------------------------------------------- … … 148 77 INTEGER :: numnam_cfg = -1 !: logical unit for configuration specific namelist 149 78 INTEGER :: numond = -1 !: logical unit for Output Namelist Dynamics 150 INTEGER :: numnam_ice_ref = -1 !: logical unit for ice reference namelist151 INTEGER :: numnam_ice_cfg = -1 !: logical unit for ice reference namelist152 79 INTEGER :: numoni = -1 !: logical unit for Output Namelist Ice 153 INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution)154 80 INTEGER :: numrun = -1 !: logical unit for run statistics 155 INTEGER :: numdct_in = -1 !: logical unit for transports computing156 INTEGER :: numdct_vol = -1 !: logical unit for voulume transports output157 INTEGER :: numdct_heat = -1 !: logical unit for heat transports output158 INTEGER :: numdct_salt = -1 !: logical unit for salt transports output159 INTEGER :: numfl = -1 !: logical unit for floats ascii output160 INTEGER :: numflo = -1 !: logical unit for floats ascii output161 81 162 82 !!---------------------------------------------------------------------- … … 174 94 LOGICAL :: lwm = .FALSE. !: boolean : true on the 1st processor only (always) 175 95 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 area177 96 CHARACTER(lc) :: cxios_context !: context name used in xios 178 97 CHARACTER(lc) :: crxios_context !: context name used in xios to read restart -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/ioipsl.f90
r12414 r13056 9 9 USE calendar 10 10 USE stringop 11 USE fliocom12 11 13 12 END MODULE ioipsl -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/lbclnk.F90
r12414 r13056 7 7 !! NEMO 1.0 ! 2002-09 (G. Madec) F90: Free form and module 8 8 !! 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_lnk9 !! 3.5 ! 2012 (S.Mocavero, I. Epicoco) optimization of BDY comm. 10 10 !! 3.4 ! 2012-12 (R. Bourdalle-Badie, G. Reffray) add a C1D case 11 11 !! 3.6 ! 2015-06 (O. Tintó and M. Castrillo) add lbc_lnk_multi … … 21 21 !!---------------------------------------------------------------------- 22 22 !! 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_mpp24 23 !!---------------------------------------------------------------------- 25 24 USE par_oce ! ocean dynamics and tracers … … 37 36 END INTERFACE 38 37 ! 39 INTERFACE lbc_bdy_lnk40 MODULE PROCEDURE mpp_lnk_bdy_2d, mpp_lnk_bdy_3d, mpp_lnk_bdy_4d41 END INTERFACE42 !43 38 INTERFACE lbc_lnk_icb 44 39 MODULE PROCEDURE mpp_lnk_2d_icb … … 47 42 PUBLIC lbc_lnk ! ocean/ice lateral boundary conditions 48 43 PUBLIC lbc_lnk_multi ! modified ocean/ice lateral boundary conditions 49 PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions50 44 PUBLIC lbc_lnk_icb ! iceberg lateral boundary conditions 51 45 … … 69 63 !! lbc_lnk_3d : set the lateral boundary condition on a 3D variable on ocean mesh 70 64 !! lbc_lnk_2d : set the lateral boundary condition on a 2D variable on ocean mesh 71 !! lbc_bdy_lnk : set the lateral BDY boundary condition72 65 !!---------------------------------------------------------------------- 73 66 USE dom_oce ! ocean space and time domain … … 88 81 END INTERFACE 89 82 ! 90 INTERFACE lbc_bdy_lnk91 MODULE PROCEDURE lbc_bdy_lnk_2d, lbc_bdy_lnk_3d, lbc_bdy_lnk_4d92 END INTERFACE93 !94 83 INTERFACE lbc_lnk_icb 95 84 MODULE PROCEDURE lbc_lnk_2d_icb … … 98 87 PUBLIC lbc_lnk ! ocean/ice lateral boundary conditions 99 88 PUBLIC lbc_lnk_multi ! modified ocean/ice lateral boundary conditions 100 PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions101 89 PUBLIC lbc_lnk_icb ! iceberg lateral boundary conditions 102 90 … … 172 160 173 161 !!---------------------------------------------------------------------- 174 !! *** routine lbc_bdy_lnk_(2,3,4)d ***175 !!176 !! wrapper rountine to 'lbc_lnk_3d'. This wrapper is used177 !! to maintain the same interface with regards to the mpp case178 !!----------------------------------------------------------------------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 subroutine183 REAL(wp), DIMENSION(:,:,:,:), INTENT(inout) :: pt4d ! 3D array on which the lbc is applied184 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points185 REAL(wp) , INTENT(in ) :: psgn ! sign used across north fold186 INTEGER , INTENT(in ) :: ib_bdy ! BDY boundary set187 !!----------------------------------------------------------------------188 CALL lbc_lnk_4d( cdname, pt4d, cd_type, psgn)189 END SUBROUTINE lbc_bdy_lnk_4d190 191 SUBROUTINE lbc_bdy_lnk_3d( cdname, pt3d, cd_type, psgn, ib_bdy )192 !!----------------------------------------------------------------------193 CHARACTER(len=*) , INTENT(in ) :: cdname ! name of the calling subroutine194 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied195 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points196 REAL(wp) , INTENT(in ) :: psgn ! sign used across north fold197 INTEGER , INTENT(in ) :: ib_bdy ! BDY boundary set198 !!----------------------------------------------------------------------199 CALL lbc_lnk_3d( cdname, pt3d, cd_type, psgn)200 END SUBROUTINE lbc_bdy_lnk_3d201 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 subroutine206 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pt2d ! 3D array on which the lbc is applied207 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points208 REAL(wp) , INTENT(in ) :: psgn ! sign used across north fold209 INTEGER , INTENT(in ) :: ib_bdy ! BDY boundary set210 !!----------------------------------------------------------------------211 CALL lbc_lnk_2d( cdname, pt2d, cd_type, psgn)212 END SUBROUTINE lbc_bdy_lnk_2d213 214 162 215 163 !!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 19 19 !! 3.2 ! 2009 (O. Marti) add mpp_ini_znl 20 20 !! 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.22 21 !! 3.5 ! 2013 (C. Ethe, G. Madec) message passing arrays as local variables 23 22 !! 3.5 ! 2013 (S.Mocavero, I.Epicoco - CMCC) north fold optimizations … … 87 86 PUBLIC mpp_ini_znl 88 87 PUBLIC mppsend, mpprecv ! needed by TAM and ICB routines 89 PUBLIC mpp_lnk_bdy_2d, mpp_lnk_bdy_3d, mpp_lnk_bdy_4d90 88 91 89 !! * Interfaces … … 179 177 INTEGER, DIMENSION(nbdelay), PUBLIC :: ndelayid = -1 !: mpi request id of the delayed operations 180 178 181 ! timing summary report182 REAL(wp), DIMENSION(2), PUBLIC :: waiting_time = 0._wp183 REAL(wp) , PUBLIC :: compute_time = 0._wp, elapsed_time = 0._wp184 185 179 REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tampon ! buffer in case of bsend 186 180 … … 435 429 436 430 !!---------------------------------------------------------------------- 437 !! *** routine mpp_lnk_bdy_(2,3,4)d ***438 !!439 !! * Argument : dummy argument use in mpp_lnk_... routines440 !! ptab : array or pointer of arrays on which the boundary condition is applied441 !! cd_nat : nature of array grid-points442 !! psgn : sign used across the north fold boundary443 !! kb_bdy : BDY boundary set444 !! kfld : optional, number of pt3d arrays445 !!----------------------------------------------------------------------446 !447 ! !== 2D array and array of 2D pointer ==!448 !449 # define DIM_2d450 # define ROUTINE_BDY mpp_lnk_bdy_2d451 # include "mpp_bdy_generic.h90"452 # undef ROUTINE_BDY453 # undef DIM_2d454 !455 ! !== 3D array and array of 3D pointer ==!456 !457 # define DIM_3d458 # define ROUTINE_BDY mpp_lnk_bdy_3d459 # include "mpp_bdy_generic.h90"460 # undef ROUTINE_BDY461 # undef DIM_3d462 !463 ! !== 4D array and array of 4D pointer ==!464 !465 # define DIM_4d466 # define ROUTINE_BDY mpp_lnk_bdy_4d467 # include "mpp_bdy_generic.h90"468 # undef ROUTINE_BDY469 # undef DIM_4d470 471 !!----------------------------------------------------------------------472 431 !! 473 432 !! load_array & mpp_lnk_2d_9 à generaliser a 3D et 4D … … 640 599 ! send y_in into todelay(idvar)%y1d with a non-blocking communication 641 600 #if defined key_mpi2 642 IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.)643 601 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.)645 602 #else 646 603 CALL mpi_iallreduce( y_in(:), todelay(idvar)%y1d(:), isz, MPI_DOUBLE_COMPLEX, mpi_sumdd, ilocalcomm, ndelayid(idvar), ierr ) … … 703 660 ! send p_in into todelay(idvar)%z1d with a non-blocking communication 704 661 #if defined key_mpi2 705 IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.)706 662 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.)708 663 #else 709 664 CALL mpi_iallreduce( p_in(:), todelay(idvar)%z1d(:), isz, MPI_DOUBLE_PRECISION, mpi_max, ilocalcomm, ndelayid(idvar), ierr ) … … 725 680 IF( ndelayid(kid) /= -2 ) THEN 726 681 #if ! defined key_mpi2 727 IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.)728 682 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.)730 683 #endif 731 684 IF( ASSOCIATED(todelay(kid)%y1d) ) todelay(kid)%z1d(:) = REAL(todelay(kid)%y1d(:), wp) ! define %z1d from %y1d … … 1236 1189 itaille = jpimax * ( ipj + 2*kextj ) 1237 1190 ! 1238 IF( ln_timing ) CALL tic_tac(.TRUE.)1239 1191 CALL MPI_ALLGATHER( znorthloc_e(1,1-kextj) , itaille, MPI_DOUBLE_PRECISION, & 1240 1192 & znorthgloio_e(1,1-kextj,1), itaille, MPI_DOUBLE_PRECISION, & 1241 1193 & ncomm_north, ierr ) 1242 1194 ! 1243 IF( ln_timing ) CALL tic_tac(.FALSE.)1244 1195 ! 1245 1196 DO jr = 1, ndim_rank_north ! recover the global north array … … 1367 1318 ! ! Migrations 1368 1319 imigr = ipreci * ( jpj + 2*kextj ) 1369 !1370 IF( ln_timing ) CALL tic_tac(.TRUE.)1371 1320 ! 1372 1321 SELECT CASE ( nbondi ) … … 1388 1337 END SELECT 1389 1338 ! 1390 IF( ln_timing ) CALL tic_tac(.FALSE.)1391 !1392 1339 ! ! Write Dirichlet lateral conditions 1393 1340 iihom = jpi - nn_hls … … 1424 1371 ! ! Migrations 1425 1372 imigr = iprecj * ( jpi + 2*kexti ) 1426 !1427 IF( ln_timing ) CALL tic_tac(.TRUE.)1428 1373 ! 1429 1374 SELECT CASE ( nbondj ) … … 1444 1389 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1445 1390 END SELECT 1446 !1447 IF( ln_timing ) CALL tic_tac(.FALSE.)1448 1391 ! 1449 1392 ! ! Write Dirichlet lateral conditions -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_allreduce_generic.h90
r12414 r13056 61 61 ! 62 62 ALLOCATE(work(ipi)) 63 IF( ln_timing ) CALL tic_tac(.TRUE., ld_global = .TRUE.)64 63 CALL mpi_allreduce( ARRAY_IN(:), work, ipi, MPI_TYPE, MPI_OPERATION, ilocalcomm, ierror ) 65 IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.)66 64 DO ii = 1, ipi 67 65 ARRAY_IN(ii) = work(ii) -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_lnk_generic.h90
r12414 r13056 154 154 imigr = nn_hls * jpj * ipk * ipl * ipf 155 155 ! 156 IF( ln_timing ) CALL tic_tac(.TRUE.)157 !158 156 SELECT CASE ( nbondi ) 159 157 CASE ( -1 ) … … 173 171 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err ) 174 172 END SELECT 175 !176 IF( ln_timing ) CALL tic_tac(.FALSE.)177 173 ! 178 174 ! ! Write Dirichlet lateral conditions … … 276 272 imigr = nn_hls * jpi * ipk * ipl * ipf 277 273 ! 278 IF( ln_timing ) CALL tic_tac(.TRUE.)279 !280 274 SELECT CASE ( nbondj ) 281 275 CASE ( -1 ) … … 296 290 END SELECT 297 291 ! 298 IF( ln_timing ) CALL tic_tac(.FALSE.)299 ! ! Write Dirichlet lateral conditions300 292 ijhom = nlcj-nn_hls 301 293 ! -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_loc_generic.h90
r13024 r13056 67 67 zain(2,:) = REAL(index0, wp) 68 68 ! 69 IF( ln_timing ) CALL tic_tac(.TRUE., ld_global = .TRUE.)70 69 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.)72 70 ! 73 71 pmin = zaout(1,1) -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mpp_nfd_generic.h90
r12414 r13056 154 154 ! a better test should be: a testing if "suppressed land-processors" belongs to the north-pole folding 155 155 IF ( jpni*jpnj /= jpnij ) ztabr(:,:,:,:,:) = 0._wp 156 !157 ! start waiting time measurement158 IF( ln_timing ) CALL tic_tac(.TRUE.)159 156 ! 160 157 DO jr = 1, nsndto … … 208 205 ENDIF 209 206 ! 210 IF( ln_timing ) CALL tic_tac(.FALSE.)211 !212 207 ! North fold boundary condition 213 208 ! … … 248 243 IF ( jpni*jpnj /= jpnij ) ztab(:,:,:,:,:) = 0._wp 249 244 ! 250 ! start waiting time measurement251 IF( ln_timing ) CALL tic_tac(.TRUE.)252 245 CALL MPI_ALLGATHER( znorthloc , ibuffsize, MPI_DOUBLE_PRECISION, & 253 246 & znorthgloio, ibuffsize, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 254 247 ! 255 ! stop waiting time measurement256 IF( ln_timing ) CALL tic_tac(.FALSE.)257 248 ! 258 249 DO jr = 1, ndim_rank_north ! recover the global north array -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/mppini.F90
r13024 r13056 17 17 !! mpp_init : Lay out the global domain over processors with/without land processor elimination 18 18 !! mpp_init_mask : Read global bathymetric information to facilitate land suppression 19 !! mpp_init_ioipsl : IOIPSL initialization in mpp20 19 !! mpp_init_partition: Calculate MPP domain decomposition 21 20 !! factorise : Calculate the factors of the no. of MPI processes … … 23 22 !!---------------------------------------------------------------------- 24 23 USE dom_oce ! ocean space and time domain 25 USE bdy_oce ! open BounDarY26 24 ! 27 25 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges … … 37 35 38 36 INTEGER :: numbot = -1 ! 'bottom_level' local logical unit 39 INTEGER :: numbdy = -1 ! 'bdy_msk' local logical unit40 37 41 38 !!---------------------------------------------------------------------- … … 83 80 nbondi = 2 84 81 nbondj = 2 85 nidom = FLIO_DOM_NONE86 82 npolj = jperio 87 83 l_Iperio = jpni == 1 .AND. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7) … … 186 182 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ilej, ildj, ioso, iowe ! - - 187 183 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 205 187 ! 206 188 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 )208 189 ! 209 190 ! 1. Dimension arrays for subdomains … … 280 261 281 262 IF( numbot /= -1 ) CALL iom_close( numbot ) 282 IF( numbdy /= -1 ) CALL iom_close( numbdy )283 263 284 264 ALLOCATE( nfiimpp(jpni,jpnj), nfipproc(jpni,jpnj), nfilcit(jpni,jpnj) , & … … 666 646 ENDIF 667 647 ! 668 CALL mpp_init_ioipsl ! Prepare NetCDF output file (if necessary)669 !670 648 IF( ln_nnogather ) THEN 671 649 CALL mpp_init_nfdcom ! northfold neighbour lists … … 902 880 903 881 ! if therr is no land and no print 904 IF( .NOT. llist .AND. numbot == -1 .AND. numbdy == -1) THEN882 IF( .NOT. llist .AND. numbot == -1 ) THEN 905 883 ! get the smaller partition which gives the smallest subdomain size 906 884 ii = MINLOC(inbij1, mask = iszij1 == MINVAL(iszij1), dim = 1) … … 997 975 !!---------------------------------------------------------------------- 998 976 ! do nothing if there is no land-sea mask 999 IF( numbot == -1 .and. numbdy == -1) THEN977 IF( numbot == -1 ) THEN 1000 978 propland = 0. 1001 979 RETURN … … 1053 1031 !!---------------------------------------------------------------------- 1054 1032 ! do nothing if there is no land-sea mask 1055 IF( numbot == -1 .AND. numbdy == -1) THEN1033 IF( numbot == -1 ) THEN 1056 1034 ldisoce(:,:) = .TRUE. 1057 1035 RETURN … … 1108 1086 ! 1109 1087 INTEGER :: inumsave ! local logical unit 1110 REAL(wp), DIMENSION(jpiglo,kjcnt) :: zbot , zbdy1088 REAL(wp), DIMENSION(jpiglo,kjcnt) :: zbot 1111 1089 !!---------------------------------------------------------------------- 1112 1090 ! … … 1119 1097 ENDIF 1120 1098 1121 IF( numbdy /= -1 ) THEN ! Adjust with bdy_msk if it exists1122 CALL iom_get ( numbdy, jpdom_unknown, 'bdy_msk', zbdy, kstart = (/1,kjstr/), kcount = (/jpiglo, kjcnt/) )1123 zbot(:,:) = zbot(:,:) * zbdy(:,:)1124 ENDIF1125 1099 ! 1126 1100 ldoce(:,:) = zbot(:,:) > 0. … … 1128 1102 ! 1129 1103 END SUBROUTINE mpp_init_readbot_strip 1130 1131 1132 SUBROUTINE mpp_init_ioipsl1133 !!----------------------------------------------------------------------1134 !! *** ROUTINE mpp_init_ioipsl ***1135 !!1136 !! ** Purpose :1137 !!1138 !! ** Method :1139 !!1140 !! History :1141 !! 9.0 ! 04-03 (G. Madec ) MPP-IOIPSL1142 !! " " ! 08-12 (A. Coward) addition in case of jpni*jpnj < jpnij1143 !!----------------------------------------------------------------------1144 INTEGER, DIMENSION(2) :: iglo, iloc, iabsf, iabsl, ihals, ihale, idid1145 !!----------------------------------------------------------------------1146 1147 ! The domain is split only horizontally along i- or/and j- direction1148 ! So we need at the most only 1D arrays with 2 elements.1149 ! Set idompar values equivalent to the jpdom_local_noextra definition1150 ! used in IOM. This works even if jpnij .ne. jpni*jpnj.1151 iglo(1) = jpiglo1152 iglo(2) = jpjglo1153 iloc(1) = nlci1154 iloc(2) = nlcj1155 iabsf(1) = nimppt(narea)1156 iabsf(2) = njmppt(narea)1157 iabsl(:) = iabsf(:) + iloc(:) - 11158 ihals(1) = nldi - 11159 ihals(2) = nldj - 11160 ihale(1) = nlci - nlei1161 ihale(2) = nlcj - nlej1162 idid(1) = 11163 idid(2) = 21164 1165 IF(lwp) THEN1166 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 ENDIF1172 !1173 CALL flio_dom_set ( jpnij, nproc, idid, iglo, iloc, iabsf, iabsl, ihals, ihale, 'BOX', nidom)1174 !1175 END SUBROUTINE mpp_init_ioipsl1176 1177 1104 1178 1105 SUBROUTINE mpp_init_nfdcom -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/nemogcm.F90
r13024 r13056 56 56 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 57 57 58 USE agrif_connect 59 USE agrif_dom_update 60 USE agrif_recompute_scales 61 58 62 IMPLICIT NONE 59 63 PRIVATE … … 64 68 65 69 CHARACTER(lc) :: cform_aaa="( /, 'AAAAAAAA', / ) " ! flag for output listing 66 67 #if defined key_agrif68 external agrif_boundary_connections, agrif_update_all, agrif_recompute_scalefactors69 #endif70 70 71 71 !!---------------------------------------------------------------------- … … 144 144 CHARACTER(len=120), DIMENSION(60) :: cltxt, cltxt2, clnam 145 145 !! 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_diacfl149 146 NAMELIST/namcfg/ ln_e3_dep, & 150 147 & cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & … … 157 154 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 158 155 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 159 !160 REWIND( numnam_ref ) ! Namelist namctl in reference namelist161 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 namelist164 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )165 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. )166 156 ! 167 157 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist … … 184 174 185 175 lwm = (narea == 1) ! control of output namelists 186 lwp = (narea == 1) .OR. ln_ctl! control of all listing output print176 lwp = (narea == 1) ! control of all listing output print 187 177 188 178 IF(lwm) THEN … … 190 180 ! file has been opened in call to mynode. nammpp has already been 191 181 ! written in mynode (if lk_mpp_mpi) 192 WRITE( numond, namctl )193 182 WRITE( numond, namcfg ) 194 183 ENDIF … … 258 247 ! !-------------------------------! 259 248 260 CALL nemo_ctl ! Control prints & Benchmark261 262 249 ! ! Domain decomposition 263 250 ! … … 269 256 END SUBROUTINE nemo_init 270 257 271 272 SUBROUTINE nemo_ctl273 !!----------------------------------------------------------------------274 !! *** ROUTINE nemo_ctl ***275 !!276 !! ** Purpose : control print setting277 !!278 !! ** Method : - print namctl information and check some consistencies279 !!----------------------------------------------------------------------280 !281 IF(lwp) THEN ! control print282 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_ctl287 WRITE(numout,*) ' finer control over o/p sn_cfctl%l_config = ', sn_cfctl%l_config288 WRITE(numout,*) ' sn_cfctl%l_runstat = ', sn_cfctl%l_runstat289 WRITE(numout,*) ' sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat290 WRITE(numout,*) ' sn_cfctl%l_oceout = ', sn_cfctl%l_oceout291 WRITE(numout,*) ' sn_cfctl%l_layout = ', sn_cfctl%l_layout292 WRITE(numout,*) ' sn_cfctl%l_mppout = ', sn_cfctl%l_mppout293 WRITE(numout,*) ' sn_cfctl%l_mpptop = ', sn_cfctl%l_mpptop294 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin295 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax296 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr297 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr298 WRITE(numout,*) ' level of print nn_print = ', nn_print299 WRITE(numout,*) ' Start i indice for SUM control nn_ictls = ', nn_ictls300 WRITE(numout,*) ' End i indice for SUM control nn_ictle = ', nn_ictle301 WRITE(numout,*) ' Start j indice for SUM control nn_jctls = ', nn_jctls302 WRITE(numout,*) ' End j indice for SUM control nn_jctle = ', nn_jctle303 WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt304 WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt305 WRITE(numout,*) ' timing by routine ln_timing = ', ln_timing306 WRITE(numout,*) ' CFL diagnostics ln_diacfl = ', ln_diacfl307 ENDIF308 !309 nprint = nn_print ! convert DOCTOR namelist names into OLD names310 nictls = nn_ictls311 nictle = nn_ictle312 njctls = nn_jctls313 njctle = nn_jctle314 isplt = nn_isplt315 jsplt = nn_jsplt316 317 !318 ! ! Parameter control319 !320 IF( ln_ctl ) THEN ! sub-domain area indices for the control prints321 IF( lk_mpp .AND. jpnij > 1 ) THEN322 isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split domain323 ELSE324 IF( isplt == 1 .AND. jsplt == 1 ) THEN325 CALL ctl_warn( ' - isplt & jsplt are equal to 1', &326 & ' - the print control will be done over the whole domain' )327 ENDIF328 ijsplt = isplt * jsplt ! total number of processors ijsplt329 ENDIF330 IF(lwp) WRITE(numout,*)' - The total number of processors over which the'331 IF(lwp) WRITE(numout,*)' print control will be done is ijsplt : ', ijsplt332 !333 ! ! indices used for the SUM control334 IF( nictls+nictle+njctls+njctle == 0 ) THEN ! print control done over the default area335 lsp_area = .FALSE.336 ELSE ! print control done over a specific area337 lsp_area = .TRUE.338 IF( nictls < 1 .OR. nictls > jpiglo ) THEN339 CALL ctl_warn( ' - nictls must be 1<=nictls>=jpiglo, it is forced to 1' )340 nictls = 1341 ENDIF342 IF( nictle < 1 .OR. nictle > jpiglo ) THEN343 CALL ctl_warn( ' - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' )344 nictle = jpiglo345 ENDIF346 IF( njctls < 1 .OR. njctls > jpjglo ) THEN347 CALL ctl_warn( ' - njctls must be 1<=njctls>=jpjglo, it is forced to 1' )348 njctls = 1349 ENDIF350 IF( njctle < 1 .OR. njctle > jpjglo ) THEN351 CALL ctl_warn( ' - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' )352 njctle = jpjglo353 ENDIF354 ENDIF355 ENDIF356 !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_agrif362 IF( ln_timing ) CALL ctl_stop( 'AGRIF not implemented with ln_timing = true')363 #endif364 !365 END SUBROUTINE nemo_ctl366 367 368 258 SUBROUTINE nemo_closefile 369 259 !!---------------------------------------------------------------------- … … 381 271 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist 382 272 IF( lwm.AND.numond /= -1 ) CLOSE( numond ) ! oce output namelist 383 IF( numnam_ice_ref /= -1 ) CLOSE( numnam_ice_ref ) ! ice reference namelist384 IF( numnam_ice_cfg /= -1 ) CLOSE( numnam_ice_cfg ) ! ice configuration namelist385 IF( lwm.AND.numoni /= -1 ) CLOSE( numoni ) ! ice output namelist386 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution)387 273 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 388 IF( numdct_vol /= -1 ) CLOSE( numdct_vol ) ! volume transports389 IF( numdct_heat /= -1 ) CLOSE( numdct_heat ) ! heat transports390 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports391 274 ! 392 275 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 13 13 PUBLIC 14 14 15 INTEGER , PUBLIC :: nn_dttrc !: frequency of step on passive tracers 15 16 CHARACTER(lc) :: cp_cfg !: name of the configuration 16 17 CHARACTER(lc) :: cp_cfz !: name of the zoom of configuration -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/phycst.F90
r12414 r13056 37 37 REAL(wp), PUBLIC :: ra = 6371229._wp !: earth radius [m] 38 38 REAL(wp), PUBLIC :: grav = 9.80665_wp !: gravity [m/s2] 39 REAL(wp), PUBLIC :: rt0 = 273.15_wp !: freezing point of fresh water [Kelvin]40 39 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 * rcp46 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 constant54 REAL(wp), PUBLIC :: stefan = 5.67e-8_wp !: Stefan-Boltzmann constant55 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 salinity64 65 REAL(wp), PUBLIC :: r1_rhoi !: 1 / rhoi66 REAL(wp), PUBLIC :: r1_rhos !: 1 / rhos67 REAL(wp), PUBLIC :: r1_rcpi !: 1 / rcpi68 40 !!---------------------------------------------------------------------- 69 41 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 89 61 #endif 90 62 91 r1_rhoi = 1._wp / rhoi92 r1_rhos = 1._wp / rhos93 r1_rcpi = 1._wp / rcpi94 95 IF(lwp) THEN96 WRITE(numout,*)97 WRITE(numout,*) 'phy_cst : initialization of ocean parameters and constants'98 WRITE(numout,*) '~~~~~~~'99 WRITE(numout,*) ' mathematical constant rpi = ', rpi100 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 = ', vkarmn129 WRITE(numout,*) ' Stefan-Boltzmann constant = ', stefan , ' J/s/m^2/K^4'130 WRITE(numout,*)131 WRITE(numout,*) ' conversion: degre ==> radian rad = ', rad132 WRITE(numout,*)133 WRITE(numout,*) ' smallest real computer value rsmall = ', rsmall134 ENDIF135 136 63 END SUBROUTINE phy_cst 137 64 -
utils/tools_dev_r12970_AGRIF_CMEMS/DOMAINcfg/src/step_oce.f90
r13024 r13056 11 11 USE daymod ! calendar (day routine) 12 12 13 14 USE prtctl ! Print control (prt_ctl routine)15 16 13 USE in_out_manager ! I/O manager 17 14 USE iom ! 18 15 USE lbclnk 19 USE timing ! Timing20 21 22 16 23 17 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.