Changeset 10727
- Timestamp:
- 2019-02-27T17:02:02+01:00 (6 years ago)
- Location:
- utils/tools_AGRIF_CMEMS_2020/DOMAINcfg
- Files:
-
- 29 added
- 18 deleted
- 7 edited
- 21 moved
Legend:
- Unmodified
- Added
- Removed
-
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/namelist_cfg
r9051 r10727 37 37 ln_linssh = .true. ! linear free surface 38 38 / 39 &namzgr_sco 40 / 41 &namlbc 42 / 43 &namagrif 44 / 45 &nambdy 46 / 47 &nam_vvl 48 / 49 39 50 !----------------------------------------------------------------------- 40 51 &namdom ! space and time domain (bathymetry, mesh, timestep) … … 60 71 / 61 72 !----------------------------------------------------------------------- 62 &namcrs ! Grid coarsening for dynamics output and/or63 ! passive tracer coarsened online simulations64 !-----------------------------------------------------------------------65 /66 !-----------------------------------------------------------------------67 &namtsd ! data : Temperature & Salinity68 !-----------------------------------------------------------------------69 /70 !-----------------------------------------------------------------------71 &namsbc ! Surface Boundary Condition (surface module)72 !-----------------------------------------------------------------------73 /74 !-----------------------------------------------------------------------75 &namsbc_core ! namsbc_core CORE bulk formulae76 !-----------------------------------------------------------------------77 /78 !-----------------------------------------------------------------------79 &namtra_qsr ! penetrative solar radiation80 !-----------------------------------------------------------------------81 /82 !-----------------------------------------------------------------------83 &namsbc_rnf ! runoffs namelist surface boundary condition84 !-----------------------------------------------------------------------85 /86 !-----------------------------------------------------------------------87 &namsbc_ssr ! surface boundary condition : sea surface restoring88 !-----------------------------------------------------------------------89 /90 !-----------------------------------------------------------------------91 &namsbc_alb ! albedo parameters92 !-----------------------------------------------------------------------93 /94 !-----------------------------------------------------------------------95 &namberg ! iceberg parameters96 !-----------------------------------------------------------------------97 /98 !-----------------------------------------------------------------------99 &namlbc ! lateral momentum boundary condition100 !-----------------------------------------------------------------------101 /102 !-----------------------------------------------------------------------103 &nambfr ! bottom friction104 !-----------------------------------------------------------------------105 /106 !-----------------------------------------------------------------------107 &nambbc ! bottom temperature boundary condition (default: NO)108 !-----------------------------------------------------------------------109 ln_trabbc = .true. ! Apply a geothermal heating at the ocean bottom110 /111 !-----------------------------------------------------------------------112 &nambbl ! bottom boundary layer scheme113 !-----------------------------------------------------------------------114 /115 !-----------------------------------------------------------------------116 &nameos ! ocean physical parameters117 !-----------------------------------------------------------------------118 ln_teos10 = .true. ! = Use TEOS-10 equation of state119 /120 !-----------------------------------------------------------------------121 &namtra_adv ! advection scheme for tracer122 !-----------------------------------------------------------------------123 ln_traadv_fct = .true. ! FCT scheme124 nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order125 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order126 nn_fct_zts = 0 ! > 1 , 2nd order FCT scheme with vertical sub-timestepping127 ! ! (number of sub-timestep = nn_fct_zts)128 /129 !-----------------------------------------------------------------------130 &namtra_adv_mle ! mixed layer eddy parametrisation (Fox-Kemper param)131 !-----------------------------------------------------------------------132 /133 !----------------------------------------------------------------------------------134 &namtra_ldf ! lateral diffusion scheme for tracers135 !----------------------------------------------------------------------------------136 ! ! Operator type:137 ln_traldf_lap = .true. ! laplacian operator138 ln_traldf_blp = .false. ! bilaplacian operator139 ! ! Direction of action:140 ln_traldf_lev = .false. ! iso-level141 ln_traldf_hor = .false. ! horizontal (geopotential)142 ln_traldf_iso = .true. ! iso-neutral (standard operator)143 ln_traldf_triad = .false. ! iso-neutral (triad operator)144 !145 ! ! iso-neutral options:146 ln_traldf_msc = .true. ! Method of Stabilizing Correction (both operators)147 rn_slpmax = 0.01 ! slope limit (both operators)148 ln_triad_iso = .false. ! pure horizontal mixing in ML (triad only)149 rn_sw_triad = 1 ! =1 switching triad ; =0 all 4 triads used (triad only)150 ln_botmix_triad = .false. ! lateral mixing on bottom (triad only)151 !152 ! ! Coefficients:153 nn_aht_ijk_t = 20 ! space/time variation of eddy coef154 ! ! =-20 (=-30) read in eddy_diffusivity_2D.nc (..._3D.nc) file155 ! ! = 0 constant156 ! ! = 10 F(k) =ldf_c1d157 ! ! = 20 F(i,j) =ldf_c2d158 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation159 ! ! = 30 F(i,j,k) =ldf_c2d + ldf_c1d160 ! ! = 31 F(i,j,k,t)=F(local velocity)161 rn_aht_0 = 2000. ! lateral eddy diffusivity (lap. operator) [m2/s]162 rn_bht_0 = 1.e+12 ! lateral eddy diffusivity (bilap. operator) [m4/s]163 /164 !----------------------------------------------------------------------------------165 &namtra_ldfeiv ! eddy induced velocity param.166 !----------------------------------------------------------------------------------167 ln_ldfeiv =.true. ! use eddy induced velocity parameterization168 ln_ldfeiv_dia =.true. ! diagnose eiv stream function and velocities169 rn_aeiv_0 = 2000. ! eddy induced velocity coefficient [m2/s]170 nn_aei_ijk_t = 21 ! space/time variation of the eiv coeficient171 ! ! =-20 (=-30) read in eddy_induced_velocity_2D.nc (..._3D.nc) file172 ! ! = 0 constant173 ! ! = 10 F(k) =ldf_c1d174 ! ! = 20 F(i,j) =ldf_c2d175 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation176 ! ! = 30 F(i,j,k) =ldf_c2d + ldf_c1d177 /178 !-----------------------------------------------------------------------179 &namtra_dmp ! tracer: T & S newtonian damping180 !-----------------------------------------------------------------------181 /182 !-----------------------------------------------------------------------183 &namdyn_adv ! formulation of the momentum advection184 !-----------------------------------------------------------------------185 /186 !-----------------------------------------------------------------------187 &namdyn_vor ! option of physics/algorithm (not control by CPP keys)188 !-----------------------------------------------------------------------189 ln_dynvor_ene = .false. ! enstrophy conserving scheme190 ln_dynvor_ens = .false. ! energy conserving scheme191 ln_dynvor_mix = .false. ! mixed scheme192 ln_dynvor_een = .true. ! energy & enstrophy scheme193 nn_een_e3f = 0 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)194 /195 !-----------------------------------------------------------------------196 &namdyn_hpg ! Hydrostatic pressure gradient option197 !-----------------------------------------------------------------------198 /199 !-----------------------------------------------------------------------200 &namdyn_spg ! Surface pressure gradient201 !-----------------------------------------------------------------------202 ln_dynspg_ts = .true. ! Split-explicit free surface203 /204 !-----------------------------------------------------------------------205 &namdyn_ldf ! lateral diffusion on momentum206 !-----------------------------------------------------------------------207 ! ! Type of the operator :208 ! ! no diffusion: set ln_dynldf_lap=..._blp=F209 ln_dynldf_lap = .true. ! laplacian operator210 ln_dynldf_blp = .false. ! bilaplacian operator211 ! ! Direction of action :212 ln_dynldf_lev = .true. ! iso-level213 ln_dynldf_hor = .false. ! horizontal (geopotential)214 ln_dynldf_iso = .false. ! iso-neutral215 ! ! Coefficient216 nn_ahm_ijk_t = -30 ! space/time variation of eddy coef217 ! ! =-30 read in eddy_viscosity_3D.nc file218 ! ! =-20 read in eddy_viscosity_2D.nc file219 ! ! = 0 constant220 ! ! = 10 F(k)=c1d221 ! ! = 20 F(i,j)=F(grid spacing)=c2d222 ! ! = 30 F(i,j,k)=c2d*c1d223 ! ! = 31 F(i,j,k)=F(grid spacing and local velocity)224 rn_ahm_0 = 40000. ! horizontal laplacian eddy viscosity [m2/s]225 rn_ahm_b = 0. ! background eddy viscosity for ldf_iso [m2/s]226 rn_bhm_0 = 1.e+12 ! horizontal bilaplacian eddy viscosity [m4/s]227 /228 !-----------------------------------------------------------------------229 &namzdf ! vertical physics230 !-----------------------------------------------------------------------231 /232 !-----------------------------------------------------------------------233 &namzdf_tke ! turbulent eddy kinetic dependent vertical diffusion ("key_zdftke")234 !-----------------------------------------------------------------------235 /236 !-----------------------------------------------------------------------237 &namzdf_ddm ! double diffusive mixing parameterization ("key_zdfddm")238 !-----------------------------------------------------------------------239 /240 !-----------------------------------------------------------------------241 &namzdf_tmx ! tidal mixing parameterization ("key_zdftmx")242 !-----------------------------------------------------------------------243 /244 !-----------------------------------------------------------------------245 73 &nammpp ! Massively Parallel Processing ("key_mpp_mpi) 246 74 !----------------------------------------------------------------------- … … 250 78 !----------------------------------------------------------------------- 251 79 / 252 !-----------------------------------------------------------------------253 &namptr ! Poleward Transport Diagnostic254 !-----------------------------------------------------------------------255 /256 !-----------------------------------------------------------------------257 &namhsb ! Heat and salt budgets258 !-----------------------------------------------------------------------259 /260 !-----------------------------------------------------------------------261 &namobs ! observation usage262 !-----------------------------------------------------------------------263 /264 !-----------------------------------------------------------------------265 &nam_asminc ! assimilation increments ('key_asminc')266 !-----------------------------------------------------------------------267 / -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/namelist_ref
r9051 r10727 171 171 ppacr2 = 13.000000000000 ! 172 172 / 173 !-----------------------------------------------------------------------174 &namwad ! Wetting and drying (default F)175 !-----------------------------------------------------------------------176 ln_wd = .false. ! T/F activation of wetting and drying177 rn_wdmin1 = 0.1 ! Minimum wet depth on dried cells178 rn_wdmin2 = 0.01 ! Tolerance of min wet depth on dried cells179 rn_wdld = 20.0 ! Land elevation below which wetting/drying is allowed180 nn_wdit = 10 ! Max iterations for W/D limiter181 /182 !-----------------------------------------------------------------------183 &namtsd ! data : Temperature & Salinity184 !-----------------------------------------------------------------------185 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !186 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !187 sn_tem = 'data_1m_potential_temperature_nomask', -1 ,'votemper', .true. , .true. , 'yearly' , '' , '' , ''188 sn_sal = 'data_1m_salinity_nomask' , -1 ,'vosaline', .true. , .true. , 'yearly' , '' , '' , ''189 !190 cn_dir = './' ! root directory for the location of the runoff files191 ln_tsd_init = .true. ! Initialisation of ocean T & S with T & S input data (T) or not (F)192 ln_tsd_tradmp = .true. ! damping of ocean T & S toward T & S input data (T) or not (F)193 /194 !-----------------------------------------------------------------------195 &namcrs ! coarsened grid (for outputs and/or TOP) ("key_crs")196 !-----------------------------------------------------------------------197 nn_factx = 3 ! Reduction factor of x-direction198 nn_facty = 3 ! Reduction factor of y-direction199 nn_binref = 0 ! Bin centering preference: NORTH or EQUAT200 ! 0, coarse grid is binned with preferential treatment of the north fold201 ! 1, coarse grid is binned with centering at the equator202 ! Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty.203 nn_msh_crs = 1 ! create (=1) a mesh file or not (=0)204 nn_crs_kz = 0 ! 0, MEAN of volume boxes205 ! 1, MAX of boxes206 ! 2, MIN of boxes207 ln_crs_wn = .true. ! wn coarsened (T) or computed using horizontal divergence ( F )208 /209 !-----------------------------------------------------------------------210 &namc1d ! 1D configuration options ("key_c1d")211 !-----------------------------------------------------------------------212 rn_lat1d = 50 ! Column latitude (default at PAPA station)213 rn_lon1d = -145 ! Column longitude (default at PAPA station)214 ln_c1d_locpt= .true. ! Localization of 1D config in a grid (T) or independant point (F)215 /216 !-----------------------------------------------------------------------217 &namc1d_dyndmp ! U & V newtonian damping ("key_c1d")218 !-----------------------------------------------------------------------219 ln_dyndmp = .false. ! add a damping term (T) or not (F)220 /221 !-----------------------------------------------------------------------222 &namc1d_uvd ! data: U & V currents ("key_c1d")223 !-----------------------------------------------------------------------224 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !225 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !226 sn_ucur = 'ucurrent' , -1 ,'u_current', .false. , .true. , 'monthly' , '' , 'Ume' , ''227 sn_vcur = 'vcurrent' , -1 ,'v_current', .false. , .true. , 'monthly' , '' , 'Vme' , ''228 !229 cn_dir = './' ! root directory for the location of the files230 ln_uvd_init = .false. ! Initialisation of ocean U & V with U & V input data (T) or not (F)231 ln_uvd_dyndmp = .false. ! damping of ocean U & V toward U & V input data (T) or not (F)232 /233 234 !!======================================================================235 !! *** Surface Boundary Condition namelists ***236 !!======================================================================237 !! namsbc surface boundary condition238 !! namsbc_ana analytical formulation (ln_ana =T)239 !! namsbc_flx flux formulation (ln_flx =T)240 !! namsbc_clio CLIO bulk formulae formulation (ln_blk_clio=T)241 !! namsbc_core CORE bulk formulae formulation (ln_blk_core=T)242 !! namsbc_mfs MFS bulk formulae formulation (ln_blk_mfs =T)243 !! namsbc_cpl CouPLed formulation ("key_oasis3" )244 !! namsbc_sas StAndalone Surface module245 !! namtra_qsr penetrative solar radiation (ln_traqsr =T)246 !! namsbc_rnf river runoffs (ln_rnf =T)247 !! namsbc_isf ice shelf melting/freezing (nn_isf >0)248 !! namsbc_iscpl coupling option between land ice model and ocean249 !! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T)250 !! namsbc_ssr sea surface restoring term (for T and/or S) (ln_ssr =T)251 !! namsbc_alb albedo parameters252 !! namsbc_wave external fields from wave model (ln_wave =T)253 !! namberg iceberg floats (ln_icebergs=T)254 !!======================================================================255 !256 !-----------------------------------------------------------------------257 &namsbc ! Surface Boundary Condition (surface module)258 !-----------------------------------------------------------------------259 nn_fsbc = 5 ! frequency of surface boundary condition computation260 ! (also = the frequency of sea-ice & iceberg model call)261 ! Type of air-sea fluxes262 ln_ana = .false. ! analytical formulation (T => fill namsbc_ana )263 ln_flx = .false. ! flux formulation (T => fill namsbc_flx )264 ln_blk_clio = .false. ! CLIO bulk formulation (T => fill namsbc_clio)265 ln_blk_core = .true. ! CORE bulk formulation (T => fill namsbc_core)266 ln_blk_mfs = .false. ! MFS bulk formulation (T => fill namsbc_mfs )267 ! Type of coupling (Ocean/Ice/Atmosphere) :268 ln_cpl = .false. ! atmosphere coupled formulation ( requires key_oasis3 )269 ln_mixcpl = .false. ! forced-coupled mixed formulation ( requires key_oasis3 )270 nn_components = 0 ! configuration of the opa-sas OASIS coupling271 ! =0 no opa-sas OASIS coupling: default single executable configuration272 ! =1 opa-sas OASIS coupling: multi executable configuration, OPA component273 ! =2 opa-sas OASIS coupling: multi executable configuration, SAS component274 nn_limflx = -1 ! LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)275 ! =-1 Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled276 ! = 0 Average per-category fluxes (forced and coupled mode)277 ! = 1 Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled278 ! = 2 Redistribute a single flux over categories (coupled mode only)279 ! Sea-ice :280 nn_ice = 2 ! =0 no ice boundary condition ,281 ! =1 use observed ice-cover ,282 ! =2 ice-model used ("key_lim3", "key_lim2", "key_cice")283 nn_ice_embd = 1 ! =0 levitating ice (no mass exchange, concentration/dilution effect)284 ! =1 levitating ice with mass and salt exchange but no presure effect285 ! =2 embedded sea-ice (full salt and mass exchanges and pressure)286 ! Misc. options of sbc :287 ln_traqsr = .true. ! Light penetration in the ocean (T => fill namtra_qsr )288 ln_dm2dc = .false. ! daily mean to diurnal cycle on short wave289 ln_rnf = .true. ! runoffs (T => fill namsbc_rnf)290 ln_ssr = .true. ! Sea Surface Restoring on T and/or S (T => fill namsbc_ssr)291 nn_fwb = 2 ! FreshWater Budget: =0 unchecked292 ! =1 global mean of e-p-r set to zero at each time step293 ! =2 annual global mean of e-p-r set to zero294 ln_apr_dyn = .false. ! Patm gradient added in ocean & ice Eqs. (T => fill namsbc_apr )295 ln_isf = .false. ! ice shelf (T => fill namsbc_isf)296 ln_wave = .false. ! coupling with surface wave (T => fill namsbc_wave)297 nn_lsm = 0 ! =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,298 ! =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)299 /300 !-----------------------------------------------------------------------301 &namsbc_ana ! analytical surface boundary condition302 !-----------------------------------------------------------------------303 nn_tau000 = 0 ! gently increase the stress over the first ntau_rst time-steps304 rn_utau0 = 0.5 ! uniform value for the i-stress305 rn_vtau0 = 0.e0 ! uniform value for the j-stress306 rn_qns0 = 0.e0 ! uniform value for the total heat flux307 rn_qsr0 = 0.e0 ! uniform value for the solar radiation308 rn_emp0 = 0.e0 ! uniform value for the freswater budget (E-P)309 /310 !-----------------------------------------------------------------------311 &namsbc_flx ! surface boundary condition : flux formulation312 !-----------------------------------------------------------------------313 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !314 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !315 sn_utau = 'utau' , 24 , 'utau' , .false. , .false., 'yearly' , '' , '' , ''316 sn_vtau = 'vtau' , 24 , 'vtau' , .false. , .false., 'yearly' , '' , '' , ''317 sn_qtot = 'qtot' , 24 , 'qtot' , .false. , .false., 'yearly' , '' , '' , ''318 sn_qsr = 'qsr' , 24 , 'qsr' , .false. , .false., 'yearly' , '' , '' , ''319 sn_emp = 'emp' , 24 , 'emp' , .false. , .false., 'yearly' , '' , '' , ''320 321 cn_dir = './' ! root directory for the location of the flux files322 /323 !-----------------------------------------------------------------------324 &namsbc_clio ! namsbc_clio CLIO bulk formulae325 !-----------------------------------------------------------------------326 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !327 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !328 sn_utau = 'taux_1m' , -1 , 'sozotaux', .true. , .true. , 'yearly' , '' , '' , ''329 sn_vtau = 'tauy_1m' , -1 , 'sometauy', .true. , .true. , 'yearly' , '' , '' , ''330 sn_wndm = 'flx' , -1 , 'socliowi', .true. , .true. , 'yearly' , '' , '' , ''331 sn_tair = 'flx' , -1 , 'socliot2', .true. , .true. , 'yearly' , '' , '' , ''332 sn_humi = 'flx' , -1 , 'socliohu', .true. , .true. , 'yearly' , '' , '' , ''333 sn_ccov = 'flx' , -1 , 'socliocl', .false. , .true. , 'yearly' , '' , '' , ''334 sn_prec = 'flx' , -1 , 'socliopl', .false. , .true. , 'yearly' , '' , '' , ''335 336 cn_dir = './' ! root directory for the location of the bulk files are337 /338 !-----------------------------------------------------------------------339 &namsbc_core ! namsbc_core CORE bulk formulae340 !-----------------------------------------------------------------------341 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !342 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !343 sn_wndi = 'u_10.15JUNE2009_fill' , 6 , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bicubic_noc.nc' , 'Uwnd' , ''344 sn_wndj = 'v_10.15JUNE2009_fill' , 6 , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bicubic_noc.nc' , 'Vwnd' , ''345 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24 , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''346 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24 , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''347 sn_tair = 't_10.15JUNE2009_fill' , 6 , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''348 sn_humi = 'q_10.15JUNE2009_fill' , 6 , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''349 sn_prec = 'ncar_precip.15JUNE2009_fill', -1 , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''350 sn_snow = 'ncar_precip.15JUNE2009_fill', -1 , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''351 sn_tdif = 'taudif_core' , 24 , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''352 353 cn_dir = './' ! root directory for the location of the bulk files354 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data355 rn_zqt = 10. ! Air temperature and humidity reference height (m)356 rn_zu = 10. ! Wind vector reference height (m)357 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow)358 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.)359 rn_vfac = 0. ! multiplicative factor for ocean/ice velocity360 ! in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)361 /362 !-----------------------------------------------------------------------363 &namsbc_mfs ! namsbc_mfs MFS bulk formulae364 !-----------------------------------------------------------------------365 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !366 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !367 sn_wndi = 'ecmwf' , 6 , 'u10' , .true. , .false., 'daily' ,'bicubic.nc' , '' , ''368 sn_wndj = 'ecmwf' , 6 , 'v10' , .true. , .false., 'daily' ,'bicubic.nc' , '' , ''369 sn_clc = 'ecmwf' , 6 , 'clc' , .true. , .false., 'daily' ,'bilinear.nc', '' , ''370 sn_msl = 'ecmwf' , 6 , 'msl' , .true. , .false., 'daily' ,'bicubic.nc' , '' , ''371 sn_tair = 'ecmwf' , 6 , 't2' , .true. , .false., 'daily' ,'bicubic.nc' , '' , ''372 sn_rhm = 'ecmwf' , 6 , 'rh' , .true. , .false., 'daily' ,'bilinear.nc', '' , ''373 sn_prec = 'ecmwf' , 6 , 'precip' , .true. , .true. , 'daily' ,'bicubic.nc' , '' , ''374 375 cn_dir = './ECMWF/' ! root directory for the location of the bulk files376 /377 !-----------------------------------------------------------------------378 &namsbc_cpl ! coupled ocean/atmosphere model ("key_oasis3")379 !-----------------------------------------------------------------------380 ! ! description ! multiple ! vector ! vector ! vector !381 ! ! ! categories ! reference ! orientation ! grids !382 ! send383 sn_snd_temp = 'weighted oce and ice' , 'no' , '' , '' , ''384 sn_snd_alb = 'weighted ice' , 'no' , '' , '' , ''385 sn_snd_thick = 'none' , 'no' , '' , '' , ''386 sn_snd_crt = 'none' , 'no' , 'spherical' , 'eastward-northward' , 'T'387 sn_snd_co2 = 'coupled' , 'no' , '' , '' , ''388 ! receive389 sn_rcv_w10m = 'none' , 'no' , '' , '' , ''390 sn_rcv_taumod = 'coupled' , 'no' , '' , '' , ''391 sn_rcv_tau = 'oce only' , 'no' , 'cartesian' , 'eastward-northward', 'U,V'392 sn_rcv_dqnsdt = 'coupled' , 'no' , '' , '' , ''393 sn_rcv_qsr = 'oce and ice' , 'no' , '' , '' , ''394 sn_rcv_qns = 'oce and ice' , 'no' , '' , '' , ''395 sn_rcv_emp = 'conservative' , 'no' , '' , '' , ''396 sn_rcv_rnf = 'coupled' , 'no' , '' , '' , ''397 sn_rcv_cal = 'coupled' , 'no' , '' , '' , ''398 sn_rcv_co2 = 'coupled' , 'no' , '' , '' , ''399 !400 nn_cplmodel = 1 ! Maximum number of models to/from which NEMO is potentialy sending/receiving data401 ln_usecplmask = .false. ! use a coupling mask file to merge data received from several models402 ! ! -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)403 /404 !-----------------------------------------------------------------------405 &namsbc_sas ! analytical surface boundary condition406 !-----------------------------------------------------------------------407 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !408 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !409 sn_usp = 'sas_grid_U', 120 , 'vozocrtx', .true. , .true. , 'yearly' , '' , '' , ''410 sn_vsp = 'sas_grid_V', 120 , 'vomecrty', .true. , .true. , 'yearly' , '' , '' , ''411 sn_tem = 'sas_grid_T', 120 , 'sosstsst', .true. , .true. , 'yearly' , '' , '' , ''412 sn_sal = 'sas_grid_T', 120 , 'sosaline', .true. , .true. , 'yearly' , '' , '' , ''413 sn_ssh = 'sas_grid_T', 120 , 'sossheig', .true. , .true. , 'yearly' , '' , '' , ''414 sn_e3t = 'sas_grid_T', 120 , 'e3t_m' , .true. , .true. , 'yearly' , '' , '' , ''415 sn_frq = 'sas_grid_T', 120 , 'frq_m' , .true. , .true. , 'yearly' , '' , '' , ''416 417 ln_3d_uve = .true. ! specify whether we are supplying a 3D u,v and e3 field418 ln_read_frq = .false. ! specify whether we must read frq or not419 cn_dir = './' ! root directory for the location of the bulk files are420 /421 !-----------------------------------------------------------------------422 &namtra_qsr ! penetrative solar radiation (ln_traqsr=T)423 !-----------------------------------------------------------------------424 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !425 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !426 sn_chl ='chlorophyll', -1 , 'CHLA' , .true. , .true. , 'yearly' , '' , '' , ''427 428 cn_dir = './' ! root directory for the location of the runoff files429 ln_qsr_rgb = .true. ! RGB (Red-Green-Blue) light penetration430 ln_qsr_2bd = .false. ! 2 bands light penetration431 ln_qsr_bio = .false. ! bio-model light penetration432 nn_chldta = 1 ! RGB : Chl data (=1) or cst value (=0)433 rn_abs = 0.58 ! RGB & 2 bands: fraction of light (rn_si1)434 rn_si0 = 0.35 ! RGB & 2 bands: shortess depth of extinction435 rn_si1 = 23.0 ! 2 bands: longest depth of extinction436 ln_qsr_ice = .true. ! light penetration for ice-model LIM3437 /438 !-----------------------------------------------------------------------439 &namsbc_rnf ! runoffs namelist surface boundary condition (ln_rnf=T)440 !-----------------------------------------------------------------------441 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !442 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !443 sn_rnf = 'runoff_core_monthly', -1 , 'sorunoff', .true. , .true. , 'yearly' , '' , '' , ''444 sn_cnf = 'runoff_core_monthly', 0 , 'socoefr0', .false. , .true. , 'yearly' , '' , '' , ''445 sn_s_rnf = 'runoffs' , 24 , 'rosaline', .true. , .true. , 'yearly' , '' , '' , ''446 sn_t_rnf = 'runoffs' , 24 , 'rotemper', .true. , .true. , 'yearly' , '' , '' , ''447 sn_dep_rnf = 'runoffs' , 0 , 'rodepth' , .false. , .true. , 'yearly' , '' , '' , ''448 449 cn_dir = './' ! root directory for the location of the runoff files450 ln_rnf_mouth= .true. ! specific treatment at rivers mouths451 rn_hrnf = 15.e0 ! depth over which enhanced vertical mixing is used (ln_rnf_mouth=T)452 rn_avt_rnf = 1.e-3 ! value of the additional vertical mixing coef. [m2/s] (ln_rnf_mouth=T)453 rn_rfact = 1.e0 ! multiplicative factor for runoff454 ln_rnf_depth= .false. ! read in depth information for runoff455 ln_rnf_tem = .false. ! read in temperature information for runoff456 ln_rnf_sal = .false. ! read in salinity information for runoff457 ln_rnf_depth_ini = .false. ! compute depth at initialisation from runoff file458 rn_rnf_max = 5.735e-4 ! max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )459 rn_dep_max = 150. ! depth over which runoffs is spread ( ln_rnf_depth_ini = .true )460 nn_rnf_depth_file = 0 ! create (=1) a runoff depth file or not (=0)461 /462 !-----------------------------------------------------------------------463 &namsbc_isf ! Top boundary layer (ISF) (nn_isf >0)464 !-----------------------------------------------------------------------465 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !466 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !467 ! nn_isf == 4468 sn_fwfisf = 'rnfisf' , -12 ,'sowflisf', .false. , .true. , 'yearly' , '' , '' , ''469 ! nn_isf == 3470 sn_rnfisf = 'rnfisf' , -12 ,'sofwfisf', .false. , .true. , 'yearly' , '' , '' , ''471 ! nn_isf == 2 and 3472 sn_depmax_isf='rnfisf' , -12 ,'sozisfmax', .false. , .true. , 'yearly' , '' , '' , ''473 sn_depmin_isf='rnfisf' , -12 ,'sozisfmin', .false. , .true. , 'yearly' , '' , '' , ''474 ! nn_isf == 2475 sn_Leff_isf = 'rnfisf' , -12 ,'Leff' , .false. , .true. , 'yearly' , '' , '' , ''476 !477 ! for all case478 nn_isf = 1 ! ice shelf melting/freezing479 ! 1 = presence of ISF 2 = bg03 parametrisation480 ! 3 = rnf file for isf 4 = ISF fwf specified481 ! option 1 and 4 need ln_isfcav = .true. (domzgr)482 ! only for nn_isf = 1 or 2483 rn_gammat0 = 1.e-4 ! gammat coefficient used in blk formula484 rn_gammas0 = 1.e-4 ! gammas coefficient used in blk formula485 ! only for nn_isf = 1 or 4486 rn_hisf_tbl = 30. ! thickness of the top boundary layer (Losh et al. 2008)487 ! ! 0 => thickness of the tbl = thickness of the first wet cell488 ! only for nn_isf = 1489 nn_isfblk = 1 ! 1 ISOMIP like: 2 equations formulation (Hunter et al., 2006)490 ! ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015)491 nn_gammablk = 1 ! 0 = cst Gammat (= gammat/s)492 ! ! 1 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010)493 ! ! 2 = velocity and stability dependent Gamma (Holland et al. 1999)494 /495 !-----------------------------------------------------------------------496 &namsbc_iscpl ! land ice / ocean coupling option497 !-----------------------------------------------------------------------498 nn_drown = 10 ! number of iteration of the extrapolation loop (fill the new wet cells)499 ln_hsb = .false. ! activate conservation module (conservation exact after a time of rn_fiscpl)500 nn_fiscpl = 43800 ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency)501 /502 !-----------------------------------------------------------------------503 &namsbc_apr ! Atmospheric pressure used as ocean forcing or in bulk504 !-----------------------------------------------------------------------505 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !506 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !507 sn_apr = 'patm' , -1 ,'somslpre', .true. , .true. , 'yearly' , '' , '' , ''508 509 cn_dir = './' ! root directory for the location of the bulk files510 rn_pref = 101000. ! reference atmospheric pressure [N/m2]/511 ln_ref_apr = .false. ! ref. pressure: global mean Patm (T) or a constant (F)512 ln_apr_obc = .false. ! inverse barometer added to OBC ssh data513 /514 !-----------------------------------------------------------------------515 &namsbc_ssr ! surface boundary condition : sea surface restoring (ln_ssr=T)516 !-----------------------------------------------------------------------517 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !518 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !519 sn_sst = 'sst_data', 24 , 'sst' , .false. , .false., 'yearly' , '' , '' , ''520 sn_sss = 'sss_data', -1 , 'sss' , .true. , .true. , 'yearly' , '' , '' , ''521 522 cn_dir = './' ! root directory for the location of the runoff files523 nn_sstr = 0 ! add a retroaction term in the surface heat flux (=1) or not (=0)524 nn_sssr = 2 ! add a damping term in the surface freshwater flux (=2)525 ! or to SSS only (=1) or no damping term (=0)526 rn_dqdt = -40. ! magnitude of the retroaction on temperature [W/m2/K]527 rn_deds = -166.67 ! magnitude of the damping on salinity [mm/day]528 ln_sssr_bnd = .true. ! flag to bound erp term (associated with nn_sssr=2)529 rn_sssr_bnd = 4.e0 ! ABS(Max/Min) value of the damping erp term [mm/day]530 /531 !-----------------------------------------------------------------------532 &namsbc_alb ! albedo parameters533 !-----------------------------------------------------------------------534 nn_ice_alb = 0 ! parameterization of ice/snow albedo535 ! 0: Shine & Henderson-Sellers (JGR 1985)536 ! 1: "home made" based on Brandt et al. (J. Climate 2005)537 ! and Grenfell & Perovich (JGR 2004)538 rn_albice = 0.53 ! albedo of bare puddled ice (values from 0.49 to 0.58)539 ! 0.53 (default) => if nn_ice_alb=0540 ! 0.50 (default) => if nn_ice_alb=1541 /542 !-----------------------------------------------------------------------543 &namsbc_wave ! External fields from wave model (ln_wave=T)544 !-----------------------------------------------------------------------545 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !546 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !547 sn_cdg = 'cdg_wave', 1 , 'drag_coeff', .true. , .false., 'daily' , '' , '' , ''548 sn_usd = 'sdw_wave', 1 , 'u_sd2d' , .true. , .false., 'daily' , '' , '' , ''549 sn_vsd = 'sdw_wave', 1 , 'v_sd2d' , .true. , .false., 'daily' , '' , '' , ''550 sn_wn = 'sdw_wave', 1 , 'wave_num' , .true. , .false., 'daily' , '' , '' , ''551 !552 cn_dir_cdg = './' ! root directory for the location of drag coefficient files553 ln_cdgw = .false. ! Neutral drag coefficient read from wave model554 ln_sdw = .false. ! Computation of 3D stokes drift555 /556 !-----------------------------------------------------------------------557 &namberg ! iceberg parameters (default: No iceberg)558 !-----------------------------------------------------------------------559 ln_icebergs = .false. ! iceberg floats or not560 ln_bergdia = .true. ! Calculate budgets561 nn_verbose_level = 1 ! Turn on more verbose output if level > 0562 nn_verbose_write = 15 ! Timesteps between verbose messages563 nn_sample_rate = 1 ! Timesteps between sampling for trajectory storage564 ! Initial mass required for an iceberg of each class565 rn_initial_mass = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11566 ! Proportion of calving mass to apportion to each class567 rn_distribution = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02568 ! Ratio between effective and real iceberg mass (non-dim)569 ! i.e. number of icebergs represented at a point570 rn_mass_scaling = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1571 ! thickness of newly calved bergs (m)572 rn_initial_thickness = 40., 67., 133., 175., 250., 250., 250., 250., 250., 250.573 rn_rho_bergs = 850. ! Density of icebergs574 rn_LoW_ratio = 1.5 ! Initial ratio L/W for newly calved icebergs575 ln_operator_splitting = .true. ! Use first order operator splitting for thermodynamics576 rn_bits_erosion_fraction = 0. ! Fraction of erosion melt flux to divert to bergy bits577 rn_sicn_shift = 0. ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1)578 ln_passive_mode = .false. ! iceberg - ocean decoupling579 nn_test_icebergs = 10 ! Create test icebergs of this class (-1 = no)580 ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2)581 rn_test_box = 108.0, 116.0, -66.0, -58.0582 rn_speed_limit = 0. ! CFL speed limit for a berg583 584 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !585 ! ! ! (if <0 months) ! name ! (logical) ! (T/F ) ! 'monthly' ! filename ! pairing ! filename !586 sn_icb = 'calving', -1 , 'calvingmask', .true. , .true. , 'yearly' , '' , '' , ''587 588 cn_dir = './'589 /590 591 173 !!====================================================================== 592 174 !! *** Lateral boundary condition *** … … 615 197 rn_sponge_dyn = 2880. ! coefficient for dynamics sponge layer [m2/s] 616 198 ln_chk_bathy = .FALSE. ! 617 /618 !-----------------------------------------------------------------------619 &nam_tide ! tide parameters ("key_tide")620 !-----------------------------------------------------------------------621 ln_tide_pot = .true. ! use tidal potential forcing622 ln_tide_ramp= .false. !623 rdttideramp = 0. !624 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg625 199 / 626 200 !----------------------------------------------------------------------- … … 659 233 / 660 234 !----------------------------------------------------------------------- 661 &nambdy_dta ! open boundaries - external data ("key_bdy")662 !-----------------------------------------------------------------------663 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !664 ! ! ! (if <0 months) ! name ! (logical) ! (T/F ) ! 'monthly' ! filename ! pairing ! filename !665 bn_ssh = 'amm12_bdyT_u2d', 24 , 'sossheig', .true. , .false. , 'daily' , '' , '' , ''666 bn_u2d = 'amm12_bdyU_u2d', 24 , 'vobtcrtx', .true. , .false. , 'daily' , '' , '' , ''667 bn_v2d = 'amm12_bdyV_u2d', 24 , 'vobtcrty', .true. , .false. , 'daily' , '' , '' , ''668 bn_u3d = 'amm12_bdyU_u3d', 24 , 'vozocrtx', .true. , .false. , 'daily' , '' , '' , ''669 bn_v3d = 'amm12_bdyV_u3d', 24 , 'vomecrty', .true. , .false. , 'daily' , '' , '' , ''670 bn_tem = 'amm12_bdyT_tra', 24 , 'votemper', .true. , .false. , 'daily' , '' , '' , ''671 bn_sal = 'amm12_bdyT_tra', 24 , 'vosaline', .true. , .false. , 'daily' , '' , '' , ''672 ! for lim2673 ! bn_frld = 'amm12_bdyT_ice', 24 , 'ileadfra', .true. , .false. , 'daily' , '' , '' , ''674 ! bn_hicif = 'amm12_bdyT_ice', 24 , 'iicethic', .true. , .false. , 'daily' , '' , '' , ''675 ! bn_hsnif = 'amm12_bdyT_ice', 24 , 'isnowthi', .true. , .false. , 'daily' , '' , '' , ''676 ! for lim3677 ! bn_a_i = 'amm12_bdyT_ice', 24 , 'ileadfra', .true. , .false. , 'daily' , '' , '' , ''678 ! bn_ht_i = 'amm12_bdyT_ice', 24 , 'iicethic', .true. , .false. , 'daily' , '' , '' , ''679 ! bn_ht_s = 'amm12_bdyT_ice', 24 , 'isnowthi', .true. , .false. , 'daily' , '' , '' , ''680 681 cn_dir = 'bdydta/' ! root directory for the location of the bulk files682 ln_full_vel = .false. !683 /684 !-----------------------------------------------------------------------685 &nambdy_tide ! tidal forcing at open boundaries686 !-----------------------------------------------------------------------687 filtide = 'bdydta/amm12_bdytide_' ! file name root of tidal forcing files688 ln_bdytide_2ddta = .false. !689 ln_bdytide_conj = .false. !690 /691 692 !!======================================================================693 !! *** Bottom boundary condition ***694 !!======================================================================695 !! nambfr bottom friction696 !! nambbc bottom temperature boundary condition697 !! nambbl bottom boundary layer scheme ("key_trabbl")698 !!======================================================================699 !700 !-----------------------------------------------------------------------701 &nambfr ! bottom friction (default: linear)702 !-----------------------------------------------------------------------703 nn_bfr = 1 ! type of bottom friction : = 0 : free slip, = 1 : linear friction704 ! = 2 : nonlinear friction705 rn_bfri1 = 4.e-4 ! bottom drag coefficient (linear case)706 rn_bfri2 = 1.e-3 ! bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T707 rn_bfri2_max= 1.e-1 ! max. bottom drag coefficient (non linear case and ln_loglayer=T)708 rn_bfeb2 = 2.5e-3 ! bottom turbulent kinetic energy background (m2/s2)709 rn_bfrz0 = 3.e-3 ! bottom roughness [m] if ln_loglayer=T710 ln_bfr2d = .false. ! horizontal variation of the bottom friction coef (read a 2D mask file )711 rn_bfrien = 50. ! local multiplying factor of bfr (ln_bfr2d=T)712 rn_tfri1 = 4.e-4 ! top drag coefficient (linear case)713 rn_tfri2 = 2.5e-3 ! top drag coefficient (non linear case). Minimum coeft if ln_loglayer=T714 rn_tfri2_max= 1.e-1 ! max. top drag coefficient (non linear case and ln_loglayer=T)715 rn_tfeb2 = 0.0 ! top turbulent kinetic energy background (m2/s2)716 rn_tfrz0 = 3.e-3 ! top roughness [m] if ln_loglayer=T717 ln_tfr2d = .false. ! horizontal variation of the top friction coef (read a 2D mask file )718 rn_tfrien = 50. ! local multiplying factor of tfr (ln_tfr2d=T)719 720 ln_bfrimp = .true. ! implicit bottom friction (requires ln_zdfexp = .false. if true)721 ln_loglayer = .false. ! logarithmic formulation (non linear case)722 /723 !-----------------------------------------------------------------------724 &nambbc ! bottom temperature boundary condition (default: NO)725 !-----------------------------------------------------------------------726 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask !727 ! ! ! (if <0 months) ! name ! (logical) ! (T/F ) ! 'monthly' ! filename ! pairing ! filename !728 sn_qgh ='geothermal_heating.nc', -12. , 'heatflow', .false. , .true. , 'yearly' , '' , '' , ''729 !730 ln_trabbc = .false. ! Apply a geothermal heating at the ocean bottom731 nn_geoflx = 2 ! geothermal heat flux: = 0 no flux732 ! = 1 constant flux733 ! = 2 variable flux (read in geothermal_heating.nc in mW/m2)734 rn_geoflx_cst = 86.4e-3 ! Constant value of geothermal heat flux [W/m2]735 cn_dir = './' ! root directory for the location of the runoff files736 /737 !-----------------------------------------------------------------------738 &nambbl ! bottom boundary layer scheme ("key_trabbl")739 !-----------------------------------------------------------------------740 nn_bbl_ldf = 1 ! diffusive bbl (=1) or not (=0)741 nn_bbl_adv = 0 ! advective bbl (=1/2) or not (=0)742 rn_ahtbbl = 1000. ! lateral mixing coefficient in the bbl [m2/s]743 rn_gambbl = 10. ! advective bbl coefficient [s]744 /745 746 !!======================================================================747 !! Tracer (T & S ) namelists748 !!======================================================================749 !! nameos equation of state750 !! namtra_adv advection scheme751 !! namtra_adv_mle mixed layer eddy param. (Fox-Kemper param.)752 !! namtra_ldf lateral diffusion scheme753 !! namtra_ldfeiv eddy induced velocity param.754 !! namtra_dmp T & S newtonian damping755 !!======================================================================756 !757 !-----------------------------------------------------------------------758 &nameos ! ocean physical parameters759 !-----------------------------------------------------------------------760 ln_teos10 = .false. ! = Use TEOS-10 equation of state761 ln_eos80 = .false. ! = Use EOS80 equation of state762 ln_seos = .false. ! = Use simplified equation of state (S-EOS)763 !764 ! ! S-EOS coefficients (ln_seos=T):765 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS766 rn_a0 = 1.6550e-1 ! thermal expension coefficient (nn_eos= 1)767 rn_b0 = 7.6554e-1 ! saline expension coefficient (nn_eos= 1)768 rn_lambda1 = 5.9520e-2 ! cabbeling coeff in T^2 (=0 for linear eos)769 rn_lambda2 = 7.4914e-4 ! cabbeling coeff in S^2 (=0 for linear eos)770 rn_mu1 = 1.4970e-4 ! thermobaric coeff. in T (=0 for linear eos)771 rn_mu2 = 1.1090e-5 ! thermobaric coeff. in S (=0 for linear eos)772 rn_nu = 2.4341e-3 ! cabbeling coeff in T*S (=0 for linear eos)773 /774 !-----------------------------------------------------------------------775 &namtra_adv ! advection scheme for tracer (default: NO advection)776 !-----------------------------------------------------------------------777 ln_traadv_cen = .false. ! 2nd order centered scheme778 nn_cen_h = 4 ! =2/4, horizontal 2nd order CEN / 4th order CEN779 nn_cen_v = 4 ! =2/4, vertical 2nd order CEN / 4th order COMPACT780 ln_traadv_fct = .false. ! FCT scheme781 nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order782 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order783 nn_fct_zts = 0 ! >=1, 2nd order FCT scheme with vertical sub-timestepping784 ! ! (number of sub-timestep = nn_fct_zts)785 ln_traadv_mus = .false. ! MUSCL scheme786 ln_mus_ups = .false. ! use upstream scheme near river mouths787 ln_traadv_ubs = .false. ! UBS scheme788 nn_ubs_v = 2 ! =2 , vertical 2nd order FCT / COMPACT 4th order789 ln_traadv_qck = .false. ! QUICKEST scheme790 /791 !-----------------------------------------------------------------------792 &namtra_adv_mle ! mixed layer eddy parametrisation (Fox-Kemper param) (default: NO)793 !-----------------------------------------------------------------------794 ln_mle = .false. ! (T) use the Mixed Layer Eddy (MLE) parameterisation795 rn_ce = 0.06 ! magnitude of the MLE (typical value: 0.06 to 0.08)796 nn_mle = 1 ! MLE type: =0 standard Fox-Kemper ; =1 new formulation797 rn_lf = 5.e+3 ! typical scale of mixed layer front (meters) (case rn_mle=0)798 rn_time = 172800. ! time scale for mixing momentum across the mixed layer (seconds) (case rn_mle=0)799 rn_lat = 20. ! reference latitude (degrees) of MLE coef. (case rn_mle=1)800 nn_mld_uv = 0 ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)801 nn_conv = 0 ! =1 no MLE in case of convection ; =0 always MLE802 rn_rho_c_mle= 0.01 ! delta rho criterion used to calculate MLD for FK803 /804 !-----------------------------------------------------------------------805 &namtra_ldf ! lateral diffusion scheme for tracers (default: NO diffusion)806 !-----------------------------------------------------------------------807 ! ! Operator type:808 ! ! no diffusion: set ln_traldf_lap=..._blp=F809 ln_traldf_lap = .false. ! laplacian operator810 ln_traldf_blp = .false. ! bilaplacian operator811 !812 ! ! Direction of action:813 ln_traldf_lev = .false. ! iso-level814 ln_traldf_hor = .false. ! horizontal (geopotential)815 ln_traldf_iso = .false. ! iso-neutral (standard operator)816 ln_traldf_triad = .false. ! iso-neutral (triad operator)817 !818 ! ! iso-neutral options:819 ln_traldf_msc = .false. ! Method of Stabilizing Correction (both operators)820 rn_slpmax = 0.01 ! slope limit (both operators)821 ln_triad_iso = .false. ! pure horizontal mixing in ML (triad only)822 rn_sw_triad = 1 ! =1 switching triad ; =0 all 4 triads used (triad only)823 ln_botmix_triad = .false. ! lateral mixing on bottom (triad only)824 !825 ! ! Coefficients:826 nn_aht_ijk_t = 0 ! space/time variation of eddy coef827 ! ! =-20 (=-30) read in eddy_diffusivity_2D.nc (..._3D.nc) file828 ! ! = 0 constant829 ! ! = 10 F(k) =ldf_c1d830 ! ! = 20 F(i,j) =ldf_c2d831 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation832 ! ! = 30 F(i,j,k) =ldf_c2d * ldf_c1d833 ! ! = 31 F(i,j,k,t)=F(local velocity and grid-spacing)834 rn_aht_0 = 2000. ! lateral eddy diffusivity (lap. operator) [m2/s]835 rn_bht_0 = 1.e+12 ! lateral eddy diffusivity (bilap. operator) [m4/s]836 /837 !-----------------------------------------------------------------------838 &namtra_ldfeiv ! eddy induced velocity param. (default: NO)839 !-----------------------------------------------------------------------840 ln_ldfeiv =.false. ! use eddy induced velocity parameterization841 ln_ldfeiv_dia =.false. ! diagnose eiv stream function and velocities842 rn_aeiv_0 = 2000. ! eddy induced velocity coefficient [m2/s]843 nn_aei_ijk_t = 21 ! space/time variation of the eiv coeficient844 ! ! =-20 (=-30) read in eddy_induced_velocity_2D.nc (..._3D.nc) file845 ! ! = 0 constant846 ! ! = 10 F(k) =ldf_c1d847 ! ! = 20 F(i,j) =ldf_c2d848 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation849 ! ! = 30 F(i,j,k) =ldf_c2d + ldf_c1d850 /851 !-----------------------------------------------------------------------852 &namtra_dmp ! tracer: T & S newtonian damping (default: NO)853 !-----------------------------------------------------------------------854 ln_tradmp = .true. ! add a damping termn (T) or not (F)855 nn_zdmp = 0 ! vertical shape =0 damping throughout the water column856 ! =1 no damping in the mixing layer (kz criteria)857 ! =2 no damping in the mixed layer (rho crieria)858 cn_resto ='resto.nc' ! Name of file containing restoration coeff. field (use dmp_tools to create this)859 /860 861 !!======================================================================862 !! *** Dynamics namelists ***863 !!======================================================================864 !! namdyn_adv formulation of the momentum advection865 !! namdyn_vor advection scheme866 !! namdyn_hpg hydrostatic pressure gradient867 !! namdyn_spg surface pressure gradient868 !! namdyn_ldf lateral diffusion scheme869 !!======================================================================870 !871 !-----------------------------------------------------------------------872 &namdyn_adv ! formulation of the momentum advection (default: vector form)873 !-----------------------------------------------------------------------874 ln_dynadv_vec = .true. ! vector form (T) or flux form (F)875 nn_dynkeg = 0 ! scheme for grad(KE): =0 C2 ; =1 Hollingsworth correction876 ln_dynadv_cen2= .false. ! flux form - 2nd order centered scheme877 ln_dynadv_ubs = .false. ! flux form - 3rd order UBS scheme878 ln_dynzad_zts = .false. ! Use (T) sub timestepping for vertical momentum advection879 /880 !-----------------------------------------------------------------------881 235 &nam_vvl ! vertical coordinate options (default: zstar) 882 236 !----------------------------------------------------------------------- … … 892 246 ln_vvl_dbg = .true. ! debug prints (T/F) 893 247 / 894 !-----------------------------------------------------------------------895 &namdyn_vor ! Vorticity / Coriolis scheme (default: NO)896 !-----------------------------------------------------------------------897 ln_dynvor_ene = .false. ! enstrophy conserving scheme898 ln_dynvor_ens = .false. ! energy conserving scheme899 ln_dynvor_mix = .false. ! mixed scheme900 ln_dynvor_een = .false. ! energy & enstrophy scheme901 nn_een_e3f = 1 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)902 ln_dynvor_msk = .false. ! vorticity multiplied by fmask (=T) or not (=F) (all vorticity schemes) ! PLEASE DO NOT ACTIVATE903 /904 !-----------------------------------------------------------------------905 &namdyn_hpg ! Hydrostatic pressure gradient option (default: zps)906 !-----------------------------------------------------------------------907 ln_hpg_zco = .false. ! z-coordinate - full steps908 ln_hpg_zps = .true. ! z-coordinate - partial steps (interpolation)909 ln_hpg_sco = .false. ! s-coordinate (standard jacobian formulation)910 ln_hpg_isf = .false. ! s-coordinate (sco ) adapted to isf911 ln_hpg_djc = .false. ! s-coordinate (Density Jacobian with Cubic polynomial)912 ln_hpg_prj = .false. ! s-coordinate (Pressure Jacobian scheme)913 /914 !-----------------------------------------------------------------------915 &namdyn_spg ! surface pressure gradient (default: NO)916 !-----------------------------------------------------------------------917 ln_dynspg_exp = .false. ! explicit free surface918 ln_dynspg_ts = .false. ! split-explicit free surface919 ln_bt_fw = .true. ! Forward integration of barotropic Eqs.920 ln_bt_av = .true. ! Time filtering of barotropic variables921 nn_bt_flt = 1 ! Time filter choice = 0 None922 ! ! = 1 Boxcar over nn_baro sub-steps923 ! ! = 2 Boxcar over 2*nn_baro " "924 ln_bt_auto = .true. ! Number of sub-step defined from:925 rn_bt_cmax = 0.8 ! =T : the Maximum Courant Number allowed926 nn_baro = 30 ! =F : the number of sub-step in rn_rdt seconds927 /928 !-----------------------------------------------------------------------929 &namdyn_ldf ! lateral diffusion on momentum (default: NO)930 !-----------------------------------------------------------------------931 ! ! Type of the operator :932 ! ! no diffusion: set ln_dynldf_lap=..._blp=F933 ln_dynldf_lap = .false. ! laplacian operator934 ln_dynldf_blp = .false. ! bilaplacian operator935 ! ! Direction of action :936 ln_dynldf_lev = .false. ! iso-level937 ln_dynldf_hor = .false. ! horizontal (geopotential)938 ln_dynldf_iso = .false. ! iso-neutral939 ! ! Coefficient940 nn_ahm_ijk_t = 0 ! space/time variation of eddy coef941 ! ! =-30 read in eddy_viscosity_3D.nc file942 ! ! =-20 read in eddy_viscosity_2D.nc file943 ! ! = 0 constant944 ! ! = 10 F(k)=c1d945 ! ! = 20 F(i,j)=F(grid spacing)=c2d946 ! ! = 30 F(i,j,k)=c2d*c1d947 ! ! = 31 F(i,j,k)=F(grid spacing and local velocity)948 rn_ahm_0 = 40000. ! horizontal laplacian eddy viscosity [m2/s]949 rn_ahm_b = 0. ! background eddy viscosity for ldf_iso [m2/s]950 rn_bhm_0 = 1.e+12 ! horizontal bilaplacian eddy viscosity [m4/s]951 !952 ! Caution in 20 and 30 cases the coefficient have to be given for a 1 degree grid (~111km)953 /954 955 !!======================================================================956 !! Tracers & Dynamics vertical physics namelists957 !!======================================================================958 !! namzdf vertical physics959 !! namzdf_ric richardson number dependent vertical mixing ("key_zdfric")960 !! namzdf_tke TKE dependent vertical mixing ("key_zdftke")961 !! namzdf_gls GLS vertical mixing ("key_zdfgls")962 !! namzdf_ddm double diffusive mixing parameterization ("key_zdfddm")963 !! namzdf_tmx tidal mixing parameterization ("key_zdftmx")964 !!======================================================================965 !966 !-----------------------------------------------------------------------967 &namzdf ! vertical physics968 !-----------------------------------------------------------------------969 rn_avm0 = 1.2e-4 ! vertical eddy viscosity [m2/s] (background Kz if not "key_zdfcst")970 rn_avt0 = 1.2e-5 ! vertical eddy diffusivity [m2/s] (background Kz if not "key_zdfcst")971 nn_avb = 0 ! profile for background avt & avm (=1) or not (=0)972 nn_havtb = 0 ! horizontal shape for avtb (=1) or not (=0)973 ln_zdfevd = .true. ! enhanced vertical diffusion (evd) (T) or not (F)974 nn_evdm = 0 ! evd apply on tracer (=0) or on tracer and momentum (=1)975 rn_avevd = 100. ! evd mixing coefficient [m2/s]976 ln_zdfnpc = .false. ! Non-Penetrative Convective algorithm (T) or not (F)977 nn_npc = 1 ! frequency of application of npc978 nn_npcp = 365 ! npc control print frequency979 ln_zdfexp = .false. ! time-stepping: split-explicit (T) or implicit (F) time stepping980 nn_zdfexp = 3 ! number of sub-timestep for ln_zdfexp=T981 /982 !-----------------------------------------------------------------------983 &namzdf_ric ! richardson number dependent vertical diffusion ("key_zdfric" )984 !-----------------------------------------------------------------------985 rn_avmri = 100.e-4 ! maximum value of the vertical viscosity986 rn_alp = 5. ! coefficient of the parameterization987 nn_ric = 2 ! coefficient of the parameterization988 rn_ekmfc = 0.7 ! Factor in the Ekman depth Equation989 rn_mldmin = 1.0 ! minimum allowable mixed-layer depth estimate (m)990 rn_mldmax = 1000.0 ! maximum allowable mixed-layer depth estimate (m)991 rn_wtmix = 10.0 ! vertical eddy viscosity coeff [m2/s] in the mixed-layer992 rn_wvmix = 10.0 ! vertical eddy diffusion coeff [m2/s] in the mixed-layer993 ln_mldw = .true. ! Flag to use or not the mixed layer depth param.994 /995 !-----------------------------------------------------------------------996 &namzdf_tke ! turbulent eddy kinetic dependent vertical diffusion ("key_zdftke")997 !-----------------------------------------------------------------------998 rn_ediff = 0.1 ! coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )999 rn_ediss = 0.7 ! coef. of the Kolmogoroff dissipation1000 rn_ebb = 67.83 ! coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)1001 rn_emin = 1.e-6 ! minimum value of tke [m2/s2]1002 rn_emin0 = 1.e-4 ! surface minimum value of tke [m2/s2]1003 rn_bshear = 1.e-20 ! background shear (>0) currently a numerical threshold (do not change it)1004 nn_mxl = 2 ! mixing length: = 0 bounded by the distance to surface and bottom1005 ! = 1 bounded by the local vertical scale factor1006 ! = 2 first vertical derivative of mixing length bounded by 11007 ! = 3 as =2 with distinct disspipative an mixing length scale1008 nn_pdl = 1 ! Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)1009 ln_mxl0 = .true. ! surface mixing length scale = F(wind stress) (T) or not (F)1010 rn_mxl0 = 0.04 ! surface buoyancy lenght scale minimum value1011 ln_lc = .true. ! Langmuir cell parameterisation (Axell 2002)1012 rn_lc = 0.15 ! coef. associated to Langmuir cells1013 nn_etau = 1 ! penetration of tke below the mixed layer (ML) due to near intertial waves1014 ! = 0 no penetration1015 ! = 1 add a tke source below the ML1016 ! = 2 add a tke source just at the base of the ML1017 ! = 3 as = 1 applied on HF part of the stress (ln_cpl=T)1018 rn_efr = 0.05 ! fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)1019 nn_htau = 1 ! type of exponential decrease of tke penetration below the ML1020 ! = 0 constant 10 m length scale1021 ! = 1 0.5m at the equator to 30m poleward of 40 degrees1022 /1023 !-----------------------------------------------------------------------1024 &namzdf_gls ! GLS vertical diffusion ("key_zdfgls")1025 !-----------------------------------------------------------------------1026 rn_emin = 1.e-7 ! minimum value of e [m2/s2]1027 rn_epsmin = 1.e-12 ! minimum value of eps [m2/s3]1028 ln_length_lim = .true. ! limit on the dissipation rate under stable stratification (Galperin et al., 1988)1029 rn_clim_galp = 0.267 ! galperin limit1030 ln_sigpsi = .true. ! Activate or not Burchard 2001 mods on psi schmidt number in the wb case1031 rn_crban = 100. ! Craig and Banner 1994 constant for wb tke flux1032 rn_charn = 70000. ! Charnock constant for wb induced roughness length1033 rn_hsro = 0.02 ! Minimum surface roughness1034 rn_frac_hs = 1.3 ! Fraction of wave height as roughness (if nn_z0_met=2)1035 nn_z0_met = 2 ! Method for surface roughness computation (0/1/2)1036 nn_bc_surf = 1 ! surface condition (0/1=Dir/Neum)1037 nn_bc_bot = 1 ! bottom condition (0/1=Dir/Neum)1038 nn_stab_func = 2 ! stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB)1039 nn_clos = 1 ! predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen)1040 /1041 !-----------------------------------------------------------------------1042 &namzdf_ddm ! double diffusive mixing parameterization ("key_zdfddm")1043 !-----------------------------------------------------------------------1044 rn_avts = 1.e-4 ! maximum avs (vertical mixing on salinity)1045 rn_hsbfr = 1.6 ! heat/salt buoyancy flux ratio1046 /1047 !-----------------------------------------------------------------------1048 &namzdf_tmx ! tidal mixing parameterization ("key_zdftmx")1049 !-----------------------------------------------------------------------1050 rn_htmx = 500. ! vertical decay scale for turbulence (meters)1051 rn_n2min = 1.e-8 ! threshold of the Brunt-Vaisala frequency (s-1)1052 rn_tfe = 0.333 ! tidal dissipation efficiency1053 rn_me = 0.2 ! mixing efficiency1054 ln_tmx_itf = .true. ! ITF specific parameterisation1055 rn_tfe_itf = 1. ! ITF tidal dissipation efficiency1056 /1057 !-----------------------------------------------------------------------1058 &namzdf_tmx_new ! internal wave-driven mixing parameterization ("key_zdftmx_new" & "key_zdfddm")1059 !-----------------------------------------------------------------------1060 nn_zpyc = 1 ! pycnocline-intensified dissipation scales as N (=1) or N^2 (=2)1061 ln_mevar = .true. ! variable (T) or constant (F) mixing efficiency1062 ln_tsdiff = .true. ! account for differential T/S mixing (T) or not (F)1063 /1064 1065 1066 248 !!====================================================================== 1067 249 !! *** Miscellaneous namelists *** … … 1086 268 &namctl ! Control prints & Benchmark 1087 269 !----------------------------------------------------------------------- 1088 ln_ctl = .false. ! trends control print (expensive!) 270 ln_ctl = .FALSE. ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 271 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following 272 sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 273 sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 274 sn_cfctl%l_oceout = .FALSE. ! that all areas report. 275 sn_cfctl%l_layout = .FALSE. ! 276 sn_cfctl%l_mppout = .FALSE. ! 277 sn_cfctl%l_mpptop = .FALSE. ! 278 sn_cfctl%procmin = 0 ! Minimum area number for reporting [default:0] 279 sn_cfctl%procmax = 1000000 ! Maximum area number for reporting [default:1000000] 280 sn_cfctl%procincr = 1 ! Increment for optional subsetting of areas [default:1] 281 sn_cfctl%ptimincr = 1 ! Timestep increment for writing time step progress info 1089 282 nn_print = 0 ! level of print (0 no extra print) 1090 283 nn_ictls = 0 ! start i indice of control sum (use to compare mono versus … … 1094 287 nn_isplt = 1 ! number of processors in i-direction 1095 288 nn_jsplt = 1 ! number of processors in j-direction 1096 nn_bench = 0 ! Bench mode (1/0): CAUTION use zero except for bench 1097 ! (no physical validity of the results) 1098 nn_timing = 0 ! timing by routine activated (=1) creates timing.output file, or not (=0) 1099 nn_diacfl = 0 ! Write out CFL diagnostics (=1) in cfl_diagnostics.ascii, or not (=0) 1100 / 1101 !----------------------------------------------------------------------- 1102 &namsto ! Stochastic parametrization of EOS (default: NO) 1103 !----------------------------------------------------------------------- 1104 ln_sto_eos = .false. ! stochastic equation of state 1105 nn_sto_eos = 1 ! number of independent random walks 1106 rn_eos_stdxy= 1.4 ! random walk horz. standard deviation (in grid points) 1107 rn_eos_stdz = 0.7 ! random walk vert. standard deviation (in grid points) 1108 rn_eos_tcor = 1440. ! random walk time correlation (in timesteps) 1109 nn_eos_ord = 1 ! order of autoregressive processes 1110 nn_eos_flt = 0 ! passes of Laplacian filter 1111 rn_eos_lim = 2.0 ! limitation factor (default = 3.0) 1112 ln_rststo = .false. ! start from mean parameter (F) or from restart file (T) 1113 ln_rstseed = .true. ! read seed of RNG from restart file 1114 cn_storst_in = "restart_sto" ! suffix of stochastic parameter restart file (input) 1115 cn_storst_out = "restart_sto" ! suffix of stochastic parameter restart file (output) 1116 / 1117 1118 !!====================================================================== 1119 !! *** Diagnostics namelists *** 1120 !!====================================================================== 1121 !! namtrd dynamics and/or tracer trends (default F) 1122 !! namptr Poleward Transport Diagnostics (default F) 1123 !! namhsb Heat and salt budgets (default F) 1124 !! namdiu Cool skin and warm layer models (default F) 1125 !! namflo float parameters ("key_float") 1126 !! nam_diaharm Harmonic analysis of tidal constituents ("key_diaharm") 1127 !! namdct transports through some sections ("key_diadct") 1128 !! nam_diatmb Top Middle Bottom Output (default F) 1129 !! nam_dia25h 25h Mean Output (default F) 1130 !! namnc4 netcdf4 chunking and compression settings ("key_netcdf4") 1131 !!====================================================================== 1132 ! 1133 !----------------------------------------------------------------------- 1134 &namtrd ! trend diagnostics (default F) 1135 !----------------------------------------------------------------------- 1136 ln_glo_trd = .false. ! (T) global domain averaged diag for T, T^2, KE, and PE 1137 ln_dyn_trd = .false. ! (T) 3D momentum trend output 1138 ln_dyn_mxl = .false. ! (T) 2D momentum trends averaged over the mixed layer (not coded yet) 1139 ln_vor_trd = .false. ! (T) 2D barotropic vorticity trends (not coded yet) 1140 ln_KE_trd = .false. ! (T) 3D Kinetic Energy trends 1141 ln_PE_trd = .false. ! (T) 3D Potential Energy trends 1142 ln_tra_trd = .false. ! (T) 3D tracer trend output 1143 ln_tra_mxl = .false. ! (T) 2D tracer trends averaged over the mixed layer (not coded yet) 1144 nn_trd = 365 ! print frequency (ln_glo_trd=T) (unit=time step) 1145 / 1146 !!gm nn_ctls = 0 ! control surface type in mixed-layer trends (0,1 or n<jpk) 1147 !!gm rn_ucf = 1. ! unit conversion factor (=1 -> /seconds ; =86400. -> /day) 1148 !!gm cn_trdrst_in = "restart_mld" ! suffix of ocean restart name (input) 1149 !!gm cn_trdrst_out = "restart_mld" ! suffix of ocean restart name (output) 1150 !!gm ln_trdmld_restart = .false. ! restart for ML diagnostics 1151 !!gm ln_trdmld_instant = .false. ! flag to diagnose trends of instantantaneous or mean ML T/S 1152 !!gm 1153 !----------------------------------------------------------------------- 1154 &namptr ! Poleward Transport Diagnostic (default F) 1155 !----------------------------------------------------------------------- 1156 ln_diaptr = .false. ! Poleward heat and salt transport (T) or not (F) 1157 ln_subbas = .false. ! Atlantic/Pacific/Indian basins computation (T) or not 1158 / 1159 !----------------------------------------------------------------------- 1160 &namhsb ! Heat and salt budgets (default F) 1161 !----------------------------------------------------------------------- 1162 ln_diahsb = .false. ! check the heat and salt budgets (T) or not (F) 1163 / 1164 !----------------------------------------------------------------------- 1165 &namdiu ! Cool skin and warm layer models (default F) 1166 !----------------------------------------------------------------------- 1167 ln_diurnal = .false. ! 1168 ln_diurnal_only = .false. ! 1169 / 1170 !----------------------------------------------------------------------- 1171 &namflo ! float parameters ("key_float") 1172 !----------------------------------------------------------------------- 1173 jpnfl = 1 ! total number of floats during the run 1174 jpnnewflo = 0 ! number of floats for the restart 1175 ln_rstflo = .false. ! float restart (T) or not (F) 1176 nn_writefl = 75 ! frequency of writing in float output file 1177 nn_stockfl = 5475 ! frequency of creation of the float restart file 1178 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 1179 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 1180 ! ! or computed with Blanke' scheme (F) 1181 ln_ariane = .true. ! Input with Ariane tool convention(T) 1182 ln_flo_ascii= .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 1183 / 1184 !----------------------------------------------------------------------- 1185 &nam_diaharm ! Harmonic analysis of tidal constituents ("key_diaharm") 1186 !----------------------------------------------------------------------- 1187 nit000_han = 1 ! First time step used for harmonic analysis 1188 nitend_han = 75 ! Last time step used for harmonic analysis 1189 nstep_han = 15 ! Time step frequency for harmonic analysis 1190 tname(1) = 'M2' ! Name of tidal constituents 1191 tname(2) = 'K1' 1192 / 1193 !----------------------------------------------------------------------- 1194 &namdct ! transports through some sections ("key_diadct") 1195 !----------------------------------------------------------------------- 1196 nn_dct = 15 ! time step frequency for transports computing 1197 nn_dctwri = 15 ! time step frequency for transports writing 1198 nn_secdebug= 112 ! 0 : no section to debug 1199 ! ! -1 : debug all section 1200 ! ! 0 < n : debug section number n 1201 / 1202 !----------------------------------------------------------------------- 1203 &nam_diatmb ! Top Middle Bottom Output (default F) 1204 !----------------------------------------------------------------------- 1205 ln_diatmb = .false. ! Choose Top Middle and Bottom output or not 1206 / 1207 !----------------------------------------------------------------------- 1208 &nam_dia25h ! 25h Mean Output (default F) 1209 !----------------------------------------------------------------------- 1210 ln_dia25h = .false. ! Choose 25h mean output or not 1211 / 1212 !----------------------------------------------------------------------- 1213 &namnc4 ! netcdf4 chunking and compression settings ("key_netcdf4") 1214 !----------------------------------------------------------------------- 1215 nn_nchunks_i= 4 ! number of chunks in i-dimension 1216 nn_nchunks_j= 4 ! number of chunks in j-dimension 1217 nn_nchunks_k= 31 ! number of chunks in k-dimension 1218 ! ! setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which 1219 ! ! is optimal for postprocessing which works exclusively with horizontal slabs 1220 ln_nc4zip = .true. ! (T) use netcdf4 chunking and compression 1221 ! ! (F) ignore chunking information and produce netcdf3-compatible files 1222 / 1223 1224 !!====================================================================== 1225 !! *** Observation & Assimilation *** 1226 !!====================================================================== 1227 !! namobs observation and model comparison 1228 !! nam_asminc assimilation increments ('key_asminc') 1229 !!====================================================================== 1230 ! 1231 !----------------------------------------------------------------------- 1232 &namobs ! observation usage switch 1233 !----------------------------------------------------------------------- 1234 ln_diaobs = .false. ! Logical switch for the observation operator 1235 ln_t3d = .false. ! Logical switch for T profile observations 1236 ln_s3d = .false. ! Logical switch for S profile observations 1237 ln_sla = .false. ! Logical switch for SLA observations 1238 ln_sst = .false. ! Logical switch for SST observations 1239 ln_sic = .false. ! Logical switch for Sea Ice observations 1240 ln_vel3d = .false. ! Logical switch for velocity observations 1241 ln_altbias = .false. ! Logical switch for altimeter bias correction 1242 ln_nea = .false. ! Logical switch for rejection of observations near land 1243 ln_grid_global = .true. ! Logical switch for global distribution of observations 1244 ln_grid_search_lookup = .false. ! Logical switch for obs grid search w/lookup table 1245 ln_ignmis = .true. ! Logical switch for ignoring missing files 1246 ln_s_at_t = .false. ! Logical switch for computing model S at T obs if not there 1247 ln_sstnight = .false. ! Logical switch for calculating night-time average for SST obs 1248 ! All of the *files* variables below are arrays. Use namelist_cfg to add more files 1249 cn_profbfiles = 'profiles_01.nc' ! Profile feedback input observation file names 1250 cn_slafbfiles = 'sla_01.nc' ! SLA feedback input observation file names 1251 cn_sstfbfiles = 'sst_01.nc' ! SST feedback input observation file names 1252 cn_sicfbfiles = 'sic_01.nc' ! SIC feedback input observation file names 1253 cn_velfbfiles = 'vel_01.nc' ! Velocity feedback input observation file names 1254 cn_altbiasfile = 'altbias.nc' ! Altimeter bias input file name 1255 cn_gridsearchfile='gridsearch.nc' ! Grid search file name 1256 rn_gridsearchres = 0.5 ! Grid search resolution 1257 rn_dobsini = 00010101.000000 ! Initial date in window YYYYMMDD.HHMMSS 1258 rn_dobsend = 00010102.000000 ! Final date in window YYYYMMDD.HHMMSS 1259 nn_1dint = 0 ! Type of vertical interpolation method 1260 nn_2dint = 0 ! Type of horizontal interpolation method 1261 nn_msshc = 0 ! MSSH correction scheme 1262 rn_mdtcorr = 1.61 ! MDT correction 1263 rn_mdtcutoff = 65.0 ! MDT cutoff for computed correction 1264 nn_profdavtypes = -1 ! Profile daily average types - array 1265 ln_sstbias = .false. ! 1266 cn_sstbias_files = 'sstbias.nc' ! 1267 / 1268 !----------------------------------------------------------------------- 1269 &nam_asminc ! assimilation increments ('key_asminc') 1270 !----------------------------------------------------------------------- 1271 ln_bkgwri = .false. ! Logical switch for writing out background state 1272 ln_trainc = .false. ! Logical switch for applying tracer increments 1273 ln_dyninc = .false. ! Logical switch for applying velocity increments 1274 ln_sshinc = .false. ! Logical switch for applying SSH increments 1275 ln_asmdin = .false. ! Logical switch for Direct Initialization (DI) 1276 ln_asmiau = .false. ! Logical switch for Incremental Analysis Updating (IAU) 1277 nitbkg = 0 ! Timestep of background in [0,nitend-nit000-1] 1278 nitdin = 0 ! Timestep of background for DI in [0,nitend-nit000-1] 1279 nitiaustr = 1 ! Timestep of start of IAU interval in [0,nitend-nit000-1] 1280 nitiaufin = 15 ! Timestep of end of IAU interval in [0,nitend-nit000-1] 1281 niaufn = 0 ! Type of IAU weighting function 1282 ln_salfix = .false. ! Logical switch for ensuring that the sa > salfixmin 1283 salfixmin = -9999 ! Minimum salinity after applying the increments 1284 nn_divdmp = 0 ! Number of iterations of divergence damping operator 1285 / 289 ln_timing = .false. ! timing by routine write out in timing.output file 290 ln_diacfl = .false. ! CFL diagnostics write out in cfl_diagnostics.ascii 291 / -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/daymod.f90
r9598 r10727 2 2 !!====================================================================== 3 3 !! *** MODULE daymod *** 4 !! Ocean :calendar4 !! Ocean : management of the model calendar 5 5 !!===================================================================== 6 6 !! History : OPA ! 1994-09 (M. Pontaud M. Imbard) Original code … … 16 16 !!---------------------------------------------------------------------- 17 17 !! day : calendar 18 !! 19 !! ------------------------------- 20 !! ----------- WARNING ----------- 21 !! 22 !! we suppose that the time step is deviding the number of second of in a day 23 !! ---> MOD( rday, rdt ) == 0 24 !! 25 !! ----------- WARNING ----------- 26 !! ------------------------------- 27 !! 18 !!---------------------------------------------------------------------- 19 !! ----------- WARNING ----------- 20 !! ------------------------------- 21 !! sbcmod assume that the time step is dividing the number of second of 22 !! in a day, i.e. ===> MOD( rday, rdt ) == 0 23 !! except when user defined forcing is used (see sbcmod.F90) 28 24 !!---------------------------------------------------------------------- 29 25 USE dom_oce ! ocean space and time domain 30 26 USE phycst ! physical constants 27 USE ioipsl , ONLY : ymds2ju ! for calendar 28 ! 31 29 USE in_out_manager ! I/O manager 30 USE prtctl ! Print control 32 31 USE iom ! 33 USE ioipsl , ONLY : ymds2ju ! for calendar34 USE prtctl ! Print control35 32 USE timing ! Timing 36 33 … … 46 43 !!---------------------------------------------------------------------- 47 44 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 48 !! $Id: daymod.F90 6140 2015-12-21 11:35:23Z timgraham$49 !! Software governed by the CeCILL licen ce (./LICENSE)45 !! $Id: daymod.F90 10068 2018-08-28 14:09:04Z nicolasmartin $ 46 !! Software governed by the CeCILL license (see ./LICENSE) 50 47 !!---------------------------------------------------------------------- 51 48 CONTAINS … … 68 65 !! - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth 69 66 !!---------------------------------------------------------------------- 70 INTEGER :: inbday, idweek 71 REAL(wp) :: zjul 67 INTEGER :: inbday, idweek ! local integers 68 REAL(wp) :: zjul ! local scalar 72 69 !!---------------------------------------------------------------------- 73 70 ! … … 77 74 & 'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 78 75 ENDIF 79 ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 80 IF( MOD( rday , rdt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 81 IF( MOD( rday , 2. ) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' ) 82 IF( MOD( rdt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' ) 83 nsecd = NINT(rday ) 84 nsecd05 = NINT(0.5 * rday ) 85 ndt = NINT( rdt ) 86 ndt05 = NINT(0.5 * rdt ) 76 nsecd = NINT( rday ) 77 nsecd05 = NINT( 0.5 * rday ) 78 ndt = NINT( rdt ) 79 ndt05 = NINT( 0.5 * rdt ) 87 80 88 81 89 82 ! set the calandar from ndastp (read in restart file and namelist) 90 91 83 nyear = ndastp / 10000 92 84 nmonth = ( ndastp - (nyear * 10000) ) / 100 … … 139 131 140 132 ! control print 141 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8,a,i8,a,i8)')' =======>> 1/2 time step before the start of the run DATE Y/M/D = ', & 133 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8,a,i8,a,i8)') & 134 & ' =======>> 1/2 time step before the start of the run DATE Y/M/D = ', & 142 135 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day, ' nsec_week:', nsec_week, ' & 143 136 & nsec_month:', nsec_month , ' nsec_year:' , nsec_year … … 147 140 CALL day( nit000 ) 148 141 ! 142 IF( lwxios ) THEN 143 ! define variables in restart file when writing with XIOS 144 CALL iom_set_rstw_var_active('kt') 145 CALL iom_set_rstw_var_active('ndastp') 146 CALL iom_set_rstw_var_active('adatrj') 147 CALL iom_set_rstw_var_active('ntime') 148 ENDIF 149 149 150 END SUBROUTINE day_init 150 151 … … 227 228 !!---------------------------------------------------------------------- 228 229 ! 229 IF( nn_timing == 1 )CALL timing_start('day')230 IF( ln_timing ) CALL timing_start('day') 230 231 ! 231 232 zprec = 0.1 / rday … … 278 279 ENDIF 279 280 280 ! 281 IF( nn_timing == 1 ) CALL timing_stop('day') 281 IF( lrst_oce ) CALL day_rst( kt, 'WRITE' ) ! write day restart information 282 ! 283 IF( ln_timing ) CALL timing_stop('day') 282 284 ! 283 285 END SUBROUTINE day 284 286 287 288 SUBROUTINE day_rst( kt, cdrw ) 289 !!--------------------------------------------------------------------- 290 !! *** ROUTINE day_rst *** 291 !! 292 !! ** Purpose : Read or write calendar in restart file: 293 !! 294 !! WRITE(READ) mode: 295 !! kt : number of time step since the begining of the experiment at the 296 !! end of the current(previous) run 297 !! adatrj(0) : number of elapsed days since the begining of the experiment at the 298 !! end of the current(previous) run (REAL -> keep fractions of day) 299 !! ndastp : date at the end of the current(previous) run (coded as yyyymmdd integer) 300 !! 301 !! According to namelist parameter nrstdt, 302 !! nrstdt = 0 no control on the date (nit000 is arbitrary). 303 !! nrstdt = 1 we verify that nit000 is equal to the last 304 !! time step of previous run + 1. 305 !! In both those options, the exact duration of the experiment 306 !! since the beginning (cumulated duration of all previous restart runs) 307 !! is not stored in the restart and is assumed to be (nit000-1)*rdt. 308 !! This is valid is the time step has remained constant. 309 !! 310 !! nrstdt = 2 the duration of the experiment in days (adatrj) 311 !! has been stored in the restart file. 312 !!---------------------------------------------------------------------- 313 INTEGER , INTENT(in) :: kt ! ocean time-step 314 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 315 ! 316 REAL(wp) :: zkt, zndastp, zdayfrac, ksecs, ktime 317 INTEGER :: ihour, iminute 318 !!---------------------------------------------------------------------- 319 320 IF( TRIM(cdrw) == 'READ' ) THEN 321 322 IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 323 ! Get Calendar informations 324 CALL iom_get( numror, 'kt', zkt, ldxios = lrxios ) ! last time-step of previous run 325 IF(lwp) THEN 326 WRITE(numout,*) ' *** Info read in restart : ' 327 WRITE(numout,*) ' previous time-step : ', NINT( zkt ) 328 WRITE(numout,*) ' *** restart option' 329 SELECT CASE ( nrstdt ) 330 CASE ( 0 ) ; WRITE(numout,*) ' nrstdt = 0 : no control of nit000' 331 CASE ( 1 ) ; WRITE(numout,*) ' nrstdt = 1 : no control the date at nit000 (use ndate0 read in the namelist)' 332 CASE ( 2 ) ; WRITE(numout,*) ' nrstdt = 2 : calendar parameters read in restart' 333 END SELECT 334 WRITE(numout,*) 335 ENDIF 336 ! Control of date 337 IF( nit000 - NINT( zkt ) /= 1 .AND. nrstdt /= 0 ) & 338 & CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart', & 339 & ' verify the restart file or rerun with nrstdt = 0 (namelist)' ) 340 ! define ndastp and adatrj 341 IF ( nrstdt == 2 ) THEN 342 ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 343 CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 344 ndastp = NINT( zndastp ) 345 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios ) 346 CALL iom_get( numror, 'ntime' , ktime , ldxios = lrxios ) 347 nn_time0=INT(ktime) 348 ! calculate start time in hours and minutes 349 zdayfrac=adatrj-INT(adatrj) 350 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj 351 ihour = INT(ksecs/3600) 352 iminute = ksecs/60-ihour*60 353 354 ! Add to nn_time0 355 nhour = nn_time0 / 100 356 nminute = ( nn_time0 - nhour * 100 ) 357 nminute=nminute+iminute 358 359 IF( nminute >= 60 ) THEN 360 nminute=nminute-60 361 nhour=nhour+1 362 ENDIF 363 nhour=nhour+ihour 364 IF( nhour >= 24 ) THEN 365 nhour=nhour-24 366 adatrj=adatrj+1 367 ENDIF 368 nn_time0 = nhour * 100 + nminute 369 adatrj = INT(adatrj) ! adatrj set to integer as nn_time0 updated 370 ELSE 371 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 372 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 373 nhour = nn_time0 / 100 374 nminute = ( nn_time0 - nhour * 100 ) 375 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 376 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 377 ! note this is wrong if time step has changed during run 378 ENDIF 379 ELSE 380 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 381 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 382 nhour = nn_time0 / 100 383 nminute = ( nn_time0 - nhour * 100 ) 384 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 385 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 386 ENDIF 387 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error 388 ! 389 IF(lwp) THEN 390 WRITE(numout,*) ' *** Info used values : ' 391 WRITE(numout,*) ' date ndastp : ', ndastp 392 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj 393 WRITE(numout,*) ' nn_time0 : ',nn_time0 394 WRITE(numout,*) 395 ENDIF 396 ! 397 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 398 ! 399 IF( kt == nitrst ) THEN 400 IF(lwp) WRITE(numout,*) 401 IF(lwp) WRITE(numout,*) 'rst_write : write oce restart file kt =', kt 402 IF(lwp) WRITE(numout,*) '~~~~~~~' 403 ENDIF 404 ! calendar control 405 IF( lwxios ) CALL iom_swap( cwxios_context ) 406 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step 407 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date 408 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj , ldxios = lwxios ) ! number of elapsed days since 409 ! ! the begining of the run [s] 410 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), ldxios = lwxios ) ! time 411 IF( lwxios ) CALL iom_swap( cxios_context ) 412 ENDIF 413 ! 414 END SUBROUTINE day_rst 285 415 286 416 !!====================================================================== -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/dom_oce.F90
r10725 r10727 26 26 PUBLIC dom_oce_alloc ! Called from nemogcm.F90 27 27 28 !!---------------------------------------------------------------------- 29 !! time & space domain namelist 28 !! time & space domain namelist 30 29 !! ---------------------------- 30 INTEGER , PUBLIC :: nmsh !: = 1 create a mesh-mask file 31 31 ! !!* Namelist namdom : time & space domain * 32 INTEGER , PUBLIC :: nn_bathy !: = 0/1 ,compute/read the bathymetry file32 INTEGER , PUBLIC :: nn_bathy !: = 0/1/2 ,compute/read the bathymetry file 33 33 REAL(wp), PUBLIC :: rn_bathy !: depth of flat bottom (active if nn_bathy=0; if =0 depth=jpkm1) 34 34 REAL(wp), PUBLIC :: rn_hmin !: minimum ocean depth (>0) or minimum number of ocean levels (<0) 35 REAL(wp), PUBLIC :: rn_isfhmin !: threshold to discriminate grounded ice to floating ice36 35 REAL(wp), PUBLIC :: rn_e3zps_min !: miminum thickness for partial steps (meters) 37 36 REAL(wp), PUBLIC :: rn_e3zps_rat !: minimum thickness ration for partial steps 38 37 INTEGER , PUBLIC :: nn_msh !: = 1 create a mesh-mask file 39 REAL(wp), PUBLIC :: rn_atfp !: asselin time filter parameter40 REAL(wp), PUBLIC :: rn_rdt !: time step for the dynamics and tracer41 38 INTEGER , PUBLIC :: nn_closea !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 42 INTEGER , PUBLIC :: nn_euler !: =0 start with forward time step or not (=1) 43 LOGICAL , PUBLIC :: ln_iscpl !: coupling with ice sheet 44 LOGICAL , PUBLIC :: ln_crs !: Apply grid coarsening to dynamical model output or online passive tracers 45 46 !! Free surface parameters 47 !! ======================= 48 LOGICAL , PUBLIC :: ln_dynspg_exp !: Explicit free surface flag 49 LOGICAL , PUBLIC :: ln_dynspg_ts !: Split-Explicit free surface flag 50 51 !! Time splitting parameters 52 !! ========================= 53 LOGICAL, PUBLIC :: ln_bt_fw !: Forward integration of barotropic sub-stepping 54 LOGICAL, PUBLIC :: ln_bt_av !: Time averaging of barotropic variables 55 LOGICAL, PUBLIC :: ln_bt_auto !: Set number of barotropic iterations automatically 56 INTEGER, PUBLIC :: nn_bt_flt !: Filter choice 57 INTEGER, PUBLIC :: nn_baro !: Number of barotropic iterations during one baroclinic step (rdt) 58 REAL(wp), PUBLIC :: rn_bt_cmax !: Maximum allowed courant number (used if ln_bt_auto=T) 59 60 !! Horizontal grid parameters for domhgr 61 !! ===================================== 39 40 INTEGER, PUBLIC :: nn_interp 41 CHARACTER(LEN=132), PUBLIC :: cn_topo 42 CHARACTER(LEN=132), PUBLIC :: cn_bath 43 CHARACTER(LEN=132), PUBLIC :: cn_lon 44 CHARACTER(LEN=132), PUBLIC :: cn_lat 45 46 LOGICAL, PUBLIC :: lzoom = .FALSE. !: zoom flag 47 LOGICAL, PUBLIC :: lzoom_e = .FALSE. !: East zoom type flag 48 LOGICAL, PUBLIC :: lzoom_w = .FALSE. !: West zoom type flag 49 LOGICAL, PUBLIC :: lzoom_s = .FALSE. !: South zoom type flag 50 LOGICAL, PUBLIC :: lzoom_n = .FALSE. !: North zoom type flag 51 52 62 53 INTEGER :: jphgr_msh !: type of horizontal mesh 63 54 ! ! = 0 curvilinear coordinate on the sphere read in coordinate.nc … … 93 84 REAL(wp) :: ppacr2 !: 94 85 95 ! !! old non-DOCTOR names still used in the model 96 INTEGER , PUBLIC :: ntopo !: = 0/1 ,compute/read the bathymetry file 97 REAL(wp), PUBLIC :: e3zps_min !: miminum thickness for partial steps (meters) 98 REAL(wp), PUBLIC :: e3zps_rat !: minimum thickness ration for partial steps 99 INTEGER , PUBLIC :: nmsh !: = 1 create a mesh-mask file 100 REAL(wp), PUBLIC :: atfp !: asselin time filter parameter 101 REAL(wp), PUBLIC :: rdt !: time step for the dynamics and tracer 102 103 ! !!! associated variables 104 INTEGER , PUBLIC :: neuler !: restart euler forward option (0=Euler) 105 REAL(wp), PUBLIC :: atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) 106 REAL(wp), PUBLIC :: r2dt !: = 2*rdt except at nit000 (=rdt) if neuler=0 86 !!---------------------------------------------------------------------- 87 !! time & space domain namelist 88 !! ---------------------------- 89 ! !!* Namelist namdom : time & space domain * 90 LOGICAL , PUBLIC :: ln_linssh !: =T linear free surface ==>> model level are fixed in time 91 LOGICAL , PUBLIC :: ln_meshmask !: =T create a mesh-mask file (mesh_mask.nc) 92 REAL(wp), PUBLIC :: rn_isfhmin !: threshold to discriminate grounded ice to floating ice 93 REAL(wp), PUBLIC :: rn_rdt !: time step for the dynamics and tracer 94 REAL(wp), PUBLIC :: rn_atfp !: asselin time filter parameter 95 INTEGER , PUBLIC :: nn_euler !: =0 start with forward time step or not (=1) 96 LOGICAL , PUBLIC :: ln_iscpl !: coupling with ice sheet 97 LOGICAL , PUBLIC :: ln_crs !: Apply grid coarsening to dynamical model output or online passive tracers 98 99 !! Free surface parameters 100 !! ======================= 101 LOGICAL , PUBLIC :: ln_dynspg_exp !: Explicit free surface flag 102 LOGICAL , PUBLIC :: ln_dynspg_ts !: Split-Explicit free surface flag 103 104 !! Time splitting parameters 105 !! ========================= 106 LOGICAL, PUBLIC :: ln_bt_fw !: Forward integration of barotropic sub-stepping 107 LOGICAL, PUBLIC :: ln_bt_av !: Time averaging of barotropic variables 108 LOGICAL, PUBLIC :: ln_bt_auto !: Set number of barotropic iterations automatically 109 INTEGER, PUBLIC :: nn_bt_flt !: Filter choice 110 INTEGER, PUBLIC :: nn_baro !: Number of barotropic iterations during one baroclinic step (rdt) 111 REAL(wp), PUBLIC :: rn_bt_cmax !: Maximum allowed courant number (used if ln_bt_auto=T) 112 REAL(wp), PUBLIC :: rn_bt_alpha !: Time stepping diffusion parameter 113 114 115 ! !! old non-DOCTOR names still used in the model 116 REAL(wp), PUBLIC :: atfp !: asselin time filter parameter 117 REAL(wp), PUBLIC :: rdt !: time step for the dynamics and tracer 118 119 ! !!! associated variables 120 INTEGER , PUBLIC :: neuler !: restart euler forward option (0=Euler) 121 REAL(wp), PUBLIC :: r2dt !: = 2*rdt except at nit000 (=rdt) if neuler=0 107 122 108 123 !!---------------------------------------------------------------------- 109 124 !! space domain parameters 110 125 !!---------------------------------------------------------------------- 111 LOGICAL, PUBLIC :: lzoom = .FALSE. !: zoom flag 112 LOGICAL, PUBLIC :: lzoom_e = .FALSE. !: East zoom type flag 113 LOGICAL, PUBLIC :: lzoom_w = .FALSE. !: West zoom type flag 114 LOGICAL, PUBLIC :: lzoom_s = .FALSE. !: South zoom type flag 115 LOGICAL, PUBLIC :: lzoom_n = .FALSE. !: North zoom type flag 116 117 ! !!! domain parameters linked to mpp 118 INTEGER, PUBLIC :: nperio !: type of lateral boundary condition 119 INTEGER, PUBLIC :: nimpp, njmpp !: i- & j-indexes for mpp-subdomain left bottom 120 INTEGER, PUBLIC :: nreci, nrecj !: overlap region in i and j 121 INTEGER, PUBLIC :: nproc !: number for local processor 122 INTEGER, PUBLIC :: narea !: number for local area 123 INTEGER, PUBLIC :: nbondi, nbondj !: mark of i- and j-direction local boundaries 126 INTEGER, PUBLIC :: jperio !: Global domain lateral boundary type (between 0 and 7) 127 ! ! = 0 closed ; = 1 cyclic East-West 128 ! ! = 2 cyclic North-South ; = 3 North fold T-point pivot 129 ! ! = 4 cyclic East-West AND North fold T-point pivot 130 ! ! = 5 North fold F-point pivot 131 ! ! = 6 cyclic East-West AND North fold F-point pivot 132 ! ! = 7 bi-cyclic East-West AND North-South 133 LOGICAL, PUBLIC :: l_Iperio, l_Jperio ! should we explicitely take care I/J periodicity 134 135 ! ! domain MPP decomposition parameters 136 INTEGER , PUBLIC :: nimpp, njmpp !: i- & j-indexes for mpp-subdomain left bottom 137 INTEGER , PUBLIC :: nreci, nrecj !: overlap region in i and j 138 INTEGER , PUBLIC :: nproc !: number for local processor 139 INTEGER , PUBLIC :: narea !: number for local area 140 INTEGER , PUBLIC :: nbondi, nbondj !: mark of i- and j-direction local boundaries 124 141 INTEGER, ALLOCATABLE, PUBLIC :: nbondi_bdy(:) !: mark i-direction local boundaries for BDY open boundaries 125 142 INTEGER, ALLOCATABLE, PUBLIC :: nbondj_bdy(:) !: mark j-direction local boundaries for BDY open boundaries … … 132 149 INTEGER, PUBLIC :: noea, nowe !: index of the local neighboring processors in 133 150 INTEGER, PUBLIC :: noso, nono !: east, west, south and north directions 134 INTEGER, PUBLIC :: npne, npnw !: index of north east and north west processor135 INTEGER, PUBLIC :: npse, npsw !: index of south east and south west processor136 INTEGER, PUBLIC :: nbne, nbnw !: logical of north east & north west processor137 INTEGER, PUBLIC :: nbse, nbsw !: logical of south east & south west processor138 151 INTEGER, PUBLIC :: nidom !: ??? 139 152 140 153 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mig !: local ==> global domain i-index 141 154 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mjg !: local ==> global domain j-index 142 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mi0, mi1 !: global ==> local domain i-index !!bug ==> other solution?143 ! ! (mi0=1 and mi1=0 if the global indexis not in the local domain)144 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mj0, mj1 !: global ==> local domain j-index !!bug ==> other solution?145 ! ! (mi0=1 and mi1=0 if the global indexis not in the local domain)155 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mi0, mi1 !: global ==> local domain i-index (mi0=1 and mi1=0 if the global index 156 ! ! is not in the local domain) 157 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mj0, mj1 !: global ==> local domain j-index (mj0=1 and mj1=0 if the global index 158 ! ! is not in the local domain) 146 159 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nimppt, njmppt !: i-, j-indexes for each processor 147 160 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ibonit, ibonjt !: i-, j- processor neighbour existence … … 154 167 !! horizontal curvilinear coordinate and scale factors 155 168 !! --------------------------------------------------------------------- 156 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: glamt , glamu, glamv , glamf !: longitude at t, u, v, f-points [degree]157 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: gphit , gphiu, gphiv , gphif !: latitude at t, u, v, f-points [degree]169 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: glamt , glamu, glamv , glamf !: longitude at t, u, v, f-points [degree] 170 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: gphit , gphiu, gphiv , gphif !: latitude at t, u, v, f-points [degree] 158 171 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) :: e1t , e2t , r1_e1t, r1_e2t !: t-point horizontal scale factors [m] 159 172 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) :: e1u , e2u , r1_e1u, r1_e2u !: horizontal scale factors at u-point [m] … … 161 174 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) :: e1f , e2f , r1_e1f, r1_e2f !: horizontal scale factors at f-point [m] 162 175 ! 163 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2t , r1_e1e2t !: associated metrics at t-point164 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2u , r1_e1e2u , e2_e1u !: associated metrics at u-point165 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2v , r1_e1e2v , e1_e2v !: associated metrics at v-point166 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2f , r1_e1e2f !: associated metrics at f-point176 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2t , r1_e1e2t !: associated metrics at t-point 177 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2u , r1_e1e2u , e2_e1u !: associated metrics at u-point 178 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2v , r1_e1e2v , e1_e2v !: associated metrics at v-point 179 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2f , r1_e1e2f !: associated metrics at f-point 167 180 ! 168 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ff_f, ff_t !: coriolis factor [1/s] 181 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: ff_f , ff_t !: Coriolis factor at f- & t-points [1/s] 182 183 !! s-coordinate and hybrid z-s-coordinate 184 !! =----------------======--------------- 185 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: gsigt, gsigw !: model level depth coefficient at t-, w-levels (analytic) 186 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: gsi3w !: model level depth coefficient at w-level (sum of gsigw) 187 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: esigt, esigw !: vertical scale factor coef. at t-, w-levels 188 189 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hbatv , hbatf !: ocean depth at the vertical of v--f 190 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hbatt , hbatu !: t--u points (m) 191 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: scosrf, scobot !: ocean surface and bottom topographies 192 ! ! (if deviating from coordinate surfaces in HYBRID) 193 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hifv , hiff !: interface depth between stretching at v--f 194 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hift , hifu !: and quasi-uniform spacing t--u points (m) 195 !!gm end 169 196 170 197 !!---------------------------------------------------------------------- 171 198 !! vertical coordinate and scale factors 172 199 !! --------------------------------------------------------------------- 173 ! !!* Namelist namzgr : vertical coordinate *174 200 LOGICAL, PUBLIC :: ln_zco !: z-coordinate - full step 175 201 LOGICAL, PUBLIC :: ln_zps !: z-coordinate - partial step 176 202 LOGICAL, PUBLIC :: ln_sco !: s-coordinate or hybrid z-s coordinate 177 203 LOGICAL, PUBLIC :: ln_isfcav !: presence of ISF 178 LOGICAL, PUBLIC :: ln_linssh !: variable grid flag179 180 204 ! ! ref. ! before ! now ! after ! 181 205 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: e3t_0 , e3t_b , e3t_n , e3t_a !: t- vert. scale factor [m] … … 195 219 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ht_0 , ht_n !: t-depth [m] 196 220 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hu_0 , hu_b , hu_n , hu_a !: u-depth [m] 197 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hv_0 , hv_b , hv_n , hv_a !: u-depth [m]221 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hv_0 , hv_b , hv_n , hv_a !: v-depth [m] 198 222 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: r1_hu_b , r1_hu_n , r1_hu_a !: inverse of u-depth [1/m] 199 223 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: r1_hv_b , r1_hv_n , r1_hv_a !: inverse of v-depth [1/m] 200 201 224 202 225 INTEGER, PUBLIC :: nla10 !: deepest W level Above ~10m (nlb10 - 1) … … 209 232 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: e3tp , e3wp !: ocean bottom level thickness at T and W points 210 233 211 !!gm This should be removed from here.... ==>>> only used in domzgr at initialization phase 212 !! s-coordinate and hybrid z-s-coordinate 213 !! =----------------======--------------- 214 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: gsigt, gsigw !: model level depth coefficient at t-, w-levels (analytic) 215 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: gsi3w !: model level depth coefficient at w-level (sum of gsigw) 216 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: esigt, esigw !: vertical scale factor coef. at t-, w-levels 217 218 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hbatv , hbatf !: ocean depth at the vertical of v--f 219 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hbatt , hbatu !: t--u points (m) 220 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: scosrf, scobot !: ocean surface and bottom topographies 221 ! ! (if deviating from coordinate surfaces in HYBRID) 222 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hifv , hiff !: interface depth between stretching at v--f 223 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hift , hifu !: and quasi-uniform spacing t--u points (m) 224 !!gm end 225 226 !!---------------------------------------------------------------------- 227 !! masks, bathymetry 234 !!---------------------------------------------------------------------- 235 !! masks, top and bottom ocean point position 228 236 !! --------------------------------------------------------------------- 237 !!gm Proposition of new name for top/bottom vertical indices 238 ! INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mtk_t, mtk_u, mtk_v !: top first wet T-, U-, V-, F-level (ISF) 239 ! INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbk_t, mbk_u, mbk_v !: bottom last wet T-, U- and V-level 240 !!gm 229 241 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbathy !: number of ocean level (=0, 1, ... , jpk-1) 230 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbkt !: vertical index of the bottom last T- ocean level 231 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbku, mbkv !: vertical index of the bottom last U- and W- ocean level 232 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: bathy !: ocean depth (meters) 242 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: bathy !: number of ocean level (=0, 1, ... , jpk-1) 243 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbkt, mbku, mbkv !: bottom last wet T-, U- and V-level 233 244 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmask_i !: interior domain T-point mask 234 245 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmask_h !: internal domain T-point mask (Figure 8.5 NEMO book) 235 246 236 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: misfdep !: top first ocean level 237 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: first wet T-, U-, V-, F- oceanlevel (ISF)238 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfdep !: Iceshelf draft 239 240 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask , ssfmask!: surface mask at T-,U-, V- and F-pts247 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: misfdep !: top first ocean level (ISF) 248 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: top first wet T-, U-, V-, F-level (ISF) 249 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfdep !: Iceshelf draft (ISF) 250 251 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask !: surface mask at T-,U-, V- and F-pts 241 252 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: tmask, umask, vmask, fmask !: land/ocean mask at T-, U-, V- and F-pts 242 253 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: wmask, wumask, wvmask !: land/ocean mask at WT-, WU- and WV-pts … … 269 280 270 281 !!---------------------------------------------------------------------- 271 !! mpp reproducibility272 !!----------------------------------------------------------------------273 274 275 276 LOGICAL, PUBLIC, PARAMETER :: lk_mpp_rep = .FALSE. !: agrif flag277 278 279 !!----------------------------------------------------------------------280 282 !! agrif domain 281 283 !!---------------------------------------------------------------------- 282 283 284 284 #if defined key_agrif 285 LOGICAL, PUBLIC, PARAMETER :: lk_agrif = .TRUE. !: agrif flag 286 #else 285 287 LOGICAL, PUBLIC, PARAMETER :: lk_agrif = .FALSE. !: agrif flag 286 287 288 !!---------------------------------------------------------------------- 289 !! NEMO/O PA 4.0 , NEMO Consortium (2011)290 !! $Id: dom_oce.F90 6140 2015-12-21 11:35:23Z timgraham $291 !! Software governed by the CeCILL licen ce (./LICENSE)288 #endif 289 290 !!---------------------------------------------------------------------- 291 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 292 !! $Id: dom_oce.F90 10068 2018-08-28 14:09:04Z nicolasmartin $ 293 !! Software governed by the CeCILL license (see ./LICENSE) 292 294 !!---------------------------------------------------------------------- 293 295 CONTAINS 294 296 295 297 #if ! defined key_agrif 296 298 !!---------------------------------------------------------------------- 297 299 !! NOT 'key_agrif' dummy function No AGRIF zoom … … 304 306 Agrif_CFixed = '0' 305 307 END FUNCTION Agrif_CFixed 306 308 #endif 307 309 308 310 INTEGER FUNCTION dom_oce_alloc() 309 311 !!---------------------------------------------------------------------- 310 INTEGER, DIMENSION(1 3) :: ierr312 INTEGER, DIMENSION(12) :: ierr 311 313 !!---------------------------------------------------------------------- 312 314 ierr(:) = 0 313 315 ! 314 ALLOCATE( mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj), & 315 & nfipproc(jpni,jpnj), nfilcit(jpni,jpnj), STAT=ierr(1) ) 316 ! 317 ALLOCATE( nimppt(jpnij) , ibonit(jpnij) , nlcit(jpnij) , nlcjt(jpnij) , & 318 & njmppt(jpnij) , ibonjt(jpnij) , nldit(jpnij) , nldjt(jpnij) , & 319 & nleit(jpnij) , nlejt(jpnij) , & 320 & mi0(jpidta) , mi1 (jpidta), mj0(jpjdta) , mj1 (jpjdta), & 321 & tpol(jpiglo) , fpol(jpiglo) , STAT=ierr(2) ) 316 ALLOCATE( mig(jpi), mjg(jpj), STAT=ierr(1) ) 317 ! 318 ALLOCATE( mi0(jpiglo) , mi1 (jpiglo), mj0(jpjglo) , mj1 (jpjglo) , & 319 & tpol(jpiglo) , fpol(jpiglo) , STAT=ierr(2) ) 322 320 ! 323 321 ALLOCATE( glamt(jpi,jpj) , glamu(jpi,jpj) , glamv(jpi,jpj) , glamf(jpi,jpj) , & … … 331 329 & e1e2v(jpi,jpj) , r1_e1e2v(jpi,jpj) , e1_e2v(jpi,jpj) , & 332 330 & e1e2f(jpi,jpj) , r1_e1e2f(jpi,jpj) , & 333 & ff_f(jpi,jpj) , ff_t(jpi,jpj) , STAT=ierr(3) )334 ! 335 ALLOCATE( gdept_0(jpi,jpj,jpk) , gdepw_0(jpi,jpj,jpk) , gde3w_0(jpi,jpj,jpk) , &331 & ff_f (jpi,jpj) , ff_t (jpi,jpj) , STAT=ierr(3) ) 332 ! 333 ALLOCATE( gdept_0(jpi,jpj,jpk) , gdepw_0(jpi,jpj,jpk) , gde3w_0(jpi,jpj,jpk) , & 336 334 & gdept_b(jpi,jpj,jpk) , gdepw_b(jpi,jpj,jpk) , & 337 335 & gdept_n(jpi,jpj,jpk) , gdepw_n(jpi,jpj,jpk) , gde3w_n(jpi,jpj,jpk) , STAT=ierr(4) ) … … 352 350 ! 353 351 ! 354 ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , & 355 & e3t_1d (jpk) , e3w_1d (jpk) , e3tp (jpi,jpj), e3wp(jpi,jpj) , & 356 & gsigt (jpk) , gsigw (jpk) , gsi3w(jpk) , & 357 & esigt (jpk) , esigw (jpk) , STAT=ierr(7) ) 358 ! 352 ALLOCATE( gdept_1d(jpk) , e3tp (jpi,jpj), e3wp(jpi,jpj) ,gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(7) ) 353 ! 354 ALLOCATE( bathy(jpi,jpj),mbathy(jpi,jpj), tmask_i(jpi,jpj) , tmask_h(jpi,jpj) , & 355 & ssmask (jpi,jpj) , ssumask(jpi,jpj) , ssvmask(jpi,jpj) , & 356 & mbkt (jpi,jpj) , mbku (jpi,jpj) , mbkv (jpi,jpj) , STAT=ierr(9) ) 357 ! 358 ALLOCATE( misfdep(jpi,jpj) , mikt(jpi,jpj) , miku(jpi,jpj) , & 359 & risfdep(jpi,jpj) , mikv(jpi,jpj) , mikf(jpi,jpj) , STAT=ierr(10) ) 360 ! 361 ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) , & 362 & vmask(jpi,jpj,jpk) , fmask(jpi,jpj,jpk) , STAT=ierr(11) ) 363 ! 364 ALLOCATE( wmask(jpi,jpj,jpk) , wumask(jpi,jpj,jpk), wvmask(jpi,jpj,jpk) , STAT=ierr(12) ) 365 359 366 ALLOCATE( hbatv (jpi,jpj) , hbatf (jpi,jpj) , & 360 367 & hbatt (jpi,jpj) , hbatu (jpi,jpj) , & … … 362 369 & hifv (jpi,jpj) , hiff (jpi,jpj) , & 363 370 & hift (jpi,jpj) , hifu (jpi,jpj) , STAT=ierr(8) ) 364 365 ALLOCATE( mbathy(jpi,jpj) , bathy (jpi,jpj) , &366 & tmask_i(jpi,jpj) , tmask_h(jpi,jpj) , &367 & ssmask (jpi,jpj) , ssumask(jpi,jpj) , ssvmask(jpi,jpj) , ssfmask(jpi,jpj) , &368 & mbkt (jpi,jpj) , mbku (jpi,jpj) , mbkv (jpi,jpj) , STAT=ierr(9) )369 370 ! (ISF) Allocation of basic array371 ALLOCATE( misfdep(jpi,jpj) , risfdep(jpi,jpj), &372 & mikt(jpi,jpj), miku(jpi,jpj), mikv(jpi,jpj) , &373 & mikf(jpi,jpj), STAT=ierr(10) )374 375 ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk), &376 & vmask(jpi,jpj,jpk) , fmask(jpi,jpj,jpk), STAT=ierr(11) )377 378 ALLOCATE( wmask(jpi,jpj,jpk) , wumask(jpi,jpj,jpk), wvmask(jpi,jpj,jpk) , STAT=ierr(12) )379 371 ! 380 372 dom_oce_alloc = MAXVAL(ierr) -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domain.F90
r10725 r10727 24 24 USE dom_oce ! domain: ocean 25 25 USE phycst ! physical constants 26 USE closea ! closed seas26 ! USE closea ! closed seas 27 27 USE domhgr ! domain: set the horizontal mesh 28 28 USE domzgr ! domain: set the vertical mesh 29 USE domstp ! domain: set the time-step29 ! USE domstp ! domain: set the time-step 30 30 USE dommsk ! domain: set the mask system 31 31 USE domwri ! domain: write the meshmask file … … 43 43 44 44 PUBLIC dom_init ! called by opa.F90 45 PUBLIC dom_nam ! called by opa.F90 46 PUBLIC cfg_write ! called by opa.F90 45 47 46 48 !!------------------------------------------------------------------------- … … 72 74 !!---------------------------------------------------------------------- 73 75 ! 74 IF( nn_timing == 1 ) CALL timing_start('dom_init')76 ! IF( nn_timing == 1 ) CALL timing_start('dom_init') 75 77 ! 76 78 IF(lwp) THEN … … 83 85 ! 84 86 CALL dom_nam ! read namelist ( namrun, namdom ) 85 CALL dom_clo ! Closed seas and lake 87 ! CALL dom_clo ! Closed seas and lake 88 86 89 CALL dom_hgr ! Horizontal mesh 87 90 CALL dom_zgr ! Vertical mesh and bathymetry … … 135 138 CALL cfg_write ! create the configuration file 136 139 ! 137 IF( nn_timing == 1 ) CALL timing_stop('dom_init')140 ! IF( nn_timing == 1 ) CALL timing_stop('dom_init') 138 141 ! 139 142 END SUBROUTINE dom_init … … 156 159 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 157 160 & ln_cfmeta, ln_iscpl 158 NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, rn_isfhmin, & 161 NAMELIST/namdom/ nn_bathy, cn_topo, cn_bath, cn_lon, cn_lat, nn_interp, & 162 & rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, rn_isfhmin, & 159 163 & rn_atfp , rn_rdt , nn_closea , ln_crs , jphgr_msh , & 160 164 & ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & … … 209 213 ENDIF 210 214 211 no = nn_no ! conversion DOCTOR names into model names (this should disappear soon)212 215 cexper = cn_exp 213 216 nrstdt = nn_rstctl … … 271 274 WRITE(numout,*) ' Namelist namdom : space & time domain' 272 275 WRITE(numout,*) ' flag read/compute bathymetry nn_bathy = ', nn_bathy 276 IF( nn_bathy == 2 ) THEN 277 WRITE(numout,*) ' compute bathymetry from file cn_topo = ', cn_topo 278 ENDIF 273 279 WRITE(numout,*) ' Depth (if =0 bathy=jpkm1) rn_bathy = ', rn_bathy 274 280 WRITE(numout,*) ' min depth of the ocean (>0) or rn_hmin = ', rn_hmin … … 331 337 !!---------------------------------------------------------------------- 332 338 ! 339 #undef CHECK_DOM 340 #ifdef CHECK_DOM 333 341 IF(lk_mpp) THEN 334 342 CALL mpp_minloc( e1t(:,:), tmask_i(:,:), ze1min, iimi1,ijmi1 ) … … 364 372 WRITE(numout,"(14x,'e2t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2min, iimi2, ijmi2 365 373 ENDIF 374 #endif 366 375 ! 367 376 END SUBROUTINE dom_ctl … … 400 409 ! 401 410 clnam = 'domain_cfg' ! filename (configuration information) 402 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. , kiolib = jprstlib )411 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE.)!, kiolib = jprstlib ) 403 412 404 413 ! -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domcfg.f90
r9598 r10727 37 37 !!---------------------------------------------------------------------- 38 38 ! 39 IF( nn_timing == 1 ) CALL timing_start('dom_cfg')39 ! IF( nn_timing == 1 ) CALL timing_start('dom_cfg') 40 40 ! 41 41 IF(lwp) THEN ! Control print … … 60 60 CALL dom_glo ! global domain versus zoom and/or local domain 61 61 ! 62 IF( nn_timing == 1 ) CALL timing_stop('dom_cfg')62 ! IF( nn_timing == 1 ) CALL timing_stop('dom_cfg') 63 63 ! 64 64 END SUBROUTINE dom_cfg -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domhgr.F90
r10725 r10727 112 112 !!---------------------------------------------------------------------- 113 113 ! 114 IF( nn_timing == 1 ) CALL timing_start('dom_hgr')114 ! IF( nn_timing == 1 ) CALL timing_start('dom_hgr') 115 115 ! 116 116 IF(lwp) THEN … … 131 131 CASE ( 0 ) !== read in coordinate.nc file ==! 132 132 ! 133 #if defined key_agrif 134 IF (agrif_root()) THEN 135 #endif 133 136 IF(lwp) WRITE(numout,*) 134 137 IF(lwp) WRITE(numout,*) ' curvilinear coordinate on the sphere read in "coordinate" file' … … 143 146 e1e2v (:,:) = e1v(:,:) * e2v(:,:) 144 147 ENDIF 148 #if defined key_agrif 149 ELSE 150 CALL Agrif_InitValues_cont() 151 ENDIF 152 #endif 145 153 ! 146 154 CASE ( 1 ) !== geographical mesh on the sphere with regular (in degree) grid-spacing ==! … … 272 280 ze1 = 106000. / REAL( jp_cfg , wp ) 273 281 ! benchmark: forced the resolution to be about 100 km 274 IF( nbench /= 0 ) ze1 = 106000._wp282 ! IF( nbench /= 0 ) ze1 = 106000._wp 275 283 zsin_alpha = - SQRT( 2._wp ) * 0.5_wp 276 284 zcos_alpha = SQRT( 2._wp ) * 0.5_wp 277 285 ze1deg = ze1 / (ra * rad) 278 IF( nbench /= 0 ) ze1deg = ze1deg / REAL( jp_cfg , wp ) ! benchmark: keep the lat/+lon286 ! IF( nbench /= 0 ) ze1deg = ze1deg / REAL( jp_cfg , wp ) ! benchmark: keep the lat/+lon 279 287 ! ! at the right jp_cfg resolution 280 288 glam0 = zlam1 + zcos_alpha * ze1deg * REAL( jpjglo-2 , wp ) … … 395 403 zminff=ff_f(nldi,nldj) 396 404 zmaxff=ff_f(nldi,nlej) 397 CALL mpp_min( zminff ) ! min over the global domain398 CALL mpp_max( zmaxff ) ! max over the global domain405 CALL mpp_min( 'toto',zminff ) ! min over the global domain 406 CALL mpp_max( 'toto',zmaxff ) ! max over the global domain 399 407 IF(lwp) WRITE(numout,*) ' Coriolis parameter varies globally from ', zminff,' to ', zmaxff 400 408 END IF … … 418 426 zminff=ff_f(nldi,nldj) 419 427 zmaxff=ff_f(nldi,nlej) 420 CALL mpp_min( zminff ) ! min over the global domain421 CALL mpp_max( zmaxff ) ! max over the global domain428 CALL mpp_min('toto', zminff ) ! min over the global domain 429 CALL mpp_max( 'toto',zmaxff ) ! max over the global domain 422 430 IF(lwp) WRITE(numout,*) ' Coriolis parameter varies globally from ', zminff,' to ', zmaxff 423 431 END IF … … 430 438 ! The equator line must be the latitude coordinate axe 431 439 432 IF( nperio == 2 ) THEN433 znorme = SQRT( SUM( gphiu(:,2) * gphiu(:,2) ) ) / REAL( jpi )434 IF( znorme > 1.e-13 ) CALL ctl_stop( ' ===>>>> : symmetrical condition: rerun with good equator line' )435 ENDIF436 ! 437 IF( nn_timing == 1 ) CALL timing_stop('dom_hgr')440 ! IF( nperio == 2 ) THEN 441 ! znorme = SQRT( SUM( gphiu(:,2) * gphiu(:,2) ) ) / REAL( jpi ) 442 ! IF( znorme > 1.e-13 ) CALL ctl_stop( ' ===>>>> : symmetrical condition: rerun with good equator line' ) 443 ! ENDIF 444 ! 445 ! IF( nn_timing == 1 ) CALL timing_stop('dom_hgr') 438 446 ! 439 447 END SUBROUTINE dom_hgr -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/dommsk.F90
r10725 r10727 120 120 !!--------------------------------------------------------------------- 121 121 ! 122 IF( nn_timing == 1 ) CALL timing_start('dom_msk')122 ! IF( nn_timing == 1 ) CALL timing_start('dom_msk') 123 123 ! 124 124 CALL wrk_alloc( jpi, jpj, imsk ) … … 180 180 ! Interior domain mask (used for global sum) 181 181 ! -------------------- 182 tmask_i(:,:) = ssmask(:,:) ! (ISH) tmask_i = 1 even on the ice shelf183 184 tmask_h(:,:) = 1._wp ! 0 on the halo and 1 elsewhere185 iif = jpreci ! ???186 iil = nlci - jpreci + 1187 ijf = jprecj ! ???188 ijl = nlcj - jprecj + 1189 190 tmask_h( 1 :iif, : ) = 0._wp ! first columns191 tmask_h(iil:jpi, : ) = 0._wp ! last columns (including mpp extra columns)192 tmask_h( : , 1 :ijf) = 0._wp ! first rows193 tmask_h( : ,ijl:jpj) = 0._wp ! last rows (including mpp extra rows)182 ! tmask_i(:,:) = ssmask(:,:) ! (ISH) tmask_i = 1 even on the ice shelf 183 184 ! tmask_h(:,:) = 1._wp ! 0 on the halo and 1 elsewhere 185 ! iif = jpreci ! ??? 186 ! iil = nlci - jpreci + 1 187 ! ijf = jprecj ! ??? 188 ! ijl = nlcj - jprecj + 1 189 190 ! tmask_h( 1 :iif, : ) = 0._wp ! first columns 191 ! tmask_h(iil:jpi, : ) = 0._wp ! last columns (including mpp extra columns) 192 ! tmask_h( : , 1 :ijf) = 0._wp ! first rows 193 ! tmask_h( : ,ijl:jpj) = 0._wp ! last rows (including mpp extra rows) 194 194 195 195 ! north fold mask 196 196 ! --------------- 197 tpol(1:jpiglo) = 1._wp198 fpol(1:jpiglo) = 1._wp199 IF( jperio == 3 .OR. jperio == 4 ) THEN ! T-point pivot200 tpol(jpiglo/2+1:jpiglo) = 0._wp201 fpol( 1 :jpiglo) = 0._wp202 IF( mjg(nlej) == jpjglo ) THEN ! only half of the nlcj-1 row203 DO ji = iif+1, iil-1204 tmask_h(ji,nlej-1) = tmask_h(ji,nlej-1) * tpol(mig(ji))205 END DO206 ENDIF207 ENDIF197 ! tpol(1:jpiglo) = 1._wp 198 ! fpol(1:jpiglo) = 1._wp 199 ! IF( jperio == 3 .OR. jperio == 4 ) THEN ! T-point pivot 200 ! tpol(jpiglo/2+1:jpiglo) = 0._wp 201 ! fpol( 1 :jpiglo) = 0._wp 202 ! IF( mjg(nlej) == jpjglo ) THEN ! only half of the nlcj-1 row 203 ! DO ji = iif+1, iil-1 204 ! tmask_h(ji,nlej-1) = tmask_h(ji,nlej-1) * tpol(mig(ji)) 205 ! END DO 206 ! ENDIF 207 ! ENDIF 208 208 209 tmask_i(:,:) = tmask_i(:,:) * tmask_h(:,:)210 211 IF( jperio == 5 .OR. jperio == 6 ) THEN ! F-point pivot212 tpol( 1 :jpiglo) = 0._wp213 fpol(jpiglo/2+1:jpiglo) = 0._wp214 ENDIF209 ! tmask_i(:,:) = tmask_i(:,:) * tmask_h(:,:) 210 211 ! IF( jperio == 5 .OR. jperio == 6 ) THEN ! F-point pivot 212 ! tpol( 1 :jpiglo) = 0._wp 213 ! fpol(jpiglo/2+1:jpiglo) = 0._wp 214 ! ENDIF 215 215 216 216 ! 2. Ocean/land mask at u-, v-, and z-points (computed from tmask) … … 229 229 END DO 230 230 ! (ISF) MIN(1,SUM(umask)) is here to check if you have effectively at least 1 wet cell at u point 231 232 DO ji = 1, jpim1 ! vector loop233 ssumask(ji,jj) = ssmask(ji,jj) * ssmask(ji+1,jj ) * MIN(1._wp,SUM(umask(ji,jj,:)))234 ssvmask(ji,jj) = ssmask(ji,jj) * ssmask(ji ,jj+1) * MIN(1._wp,SUM(vmask(ji,jj,:)))235 END DO236 DO ji = 1, jpim1 ! NO vector opt.237 ssfmask(ji,jj) = ssmask(ji,jj ) * ssmask(ji+1,jj ) &238 & * ssmask(ji,jj+1) * ssmask(ji+1,jj+1) * MIN(1._wp,SUM(fmask(ji,jj,:)))239 END DO240 END DO241 CALL lbc_lnk( umask , 'U', 1._wp ) ! Lateral boundary conditions242 CALL lbc_lnk( vmask , 'V', 1._wp )243 CALL lbc_lnk( fmask , 'F', 1._wp )244 CALL lbc_lnk(ssumask, 'U', 1._wp ) ! Lateral boundary conditions245 CALL lbc_lnk(ssvmask, 'V', 1._wp )246 CALL lbc_lnk(ssfmask, 'F', 1._wp )231 ! DO jj = 1, jpjm1 232 ! DO ji = 1, jpim1 ! vector loop 233 ! ssumask(ji,jj) = ssmask(ji,jj) * ssmask(ji+1,jj ) * MIN(1._wp,SUM(umask(ji,jj,:))) 234 ! ssvmask(ji,jj) = ssmask(ji,jj) * ssmask(ji ,jj+1) * MIN(1._wp,SUM(vmask(ji,jj,:))) 235 !! END DO 236 ! DO ji = 1, jpim1 ! NO vector opt. 237 ! ssfmask(ji,jj) = ssmask(ji,jj ) * ssmask(ji+1,jj ) & 238 ! & * ssmask(ji,jj+1) * ssmask(ji+1,jj+1) * MIN(1._wp,SUM(fmask(ji,jj,:))) 239 ! END DO 240 ! END DO 241 CALL lbc_lnk( 'toto',umask , 'U', 1._wp ) ! Lateral boundary conditions 242 CALL lbc_lnk( 'toto',vmask , 'V', 1._wp ) 243 CALL lbc_lnk( 'toto',fmask , 'F', 1._wp ) 244 ! CALL lbc_lnk( 'toto',ssumask, 'U', 1._wp ) ! Lateral boundary conditions 245 ! CALL lbc_lnk( 'toto',ssvmask, 'V', 1._wp ) 246 ! CALL lbc_lnk( 'toto',ssfmask, 'F', 1._wp ) 247 247 248 248 ! 3. Ocean/land mask at wu-, wv- and w points … … 355 355 ENDIF 356 356 ! 357 CALL lbc_lnk( fmask, 'F', 1._wp ) ! Lateral boundary conditions on fmask357 CALL lbc_lnk( 'toto',fmask, 'F', 1._wp ) ! Lateral boundary conditions on fmask 358 358 ! 359 359 ! CAUTION : The fmask may be further modified in dyn_vor_init ( dynvor.F90 ) … … 362 362 CALL wrk_dealloc( jpi, jpj, zwf ) 363 363 ! 364 IF( nn_timing == 1 ) CALL timing_stop('dom_msk')364 ! IF( nn_timing == 1 ) CALL timing_stop('dom_msk') 365 365 ! 366 366 END SUBROUTINE dom_msk -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domngb.F90
r10725 r10727 11 11 !!---------------------------------------------------------------------- 12 12 USE dom_oce ! ocean space and time domain 13 ! 13 14 USE in_out_manager ! I/O manager 14 15 USE lib_mpp ! for mppsum 15 USE wrk_nemo ! Memory allocation16 USE timing ! Timing17 16 18 17 IMPLICIT NONE … … 23 22 !!---------------------------------------------------------------------- 24 23 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 25 !! $Id: domngb.F90 6140 2015-12-21 11:35:23Z timgraham$26 !! Software governed by the CeCILL licen ce (./LICENSE)24 !! $Id: domngb.F90 10425 2018-12-19 21:54:16Z smasson $ 25 !! Software governed by the CeCILL license (see ./LICENSE) 27 26 !!---------------------------------------------------------------------- 28 27 CONTAINS … … 45 44 INTEGER , DIMENSION(2) :: iloc 46 45 REAL(wp) :: zlon, zmini 47 REAL(wp), POINTER, DIMENSION(:,:) ::zglam, zgphi, zmask, zdist46 REAL(wp), DIMENSION(jpi,jpj) :: zglam, zgphi, zmask, zdist 48 47 !!-------------------------------------------------------------------- 49 !50 IF( nn_timing == 1 ) CALL timing_start('dom_ngb')51 !52 CALL wrk_alloc( jpi,jpj, zglam, zgphi, zmask, zdist )53 48 ! 54 49 zmask(:,:) = 0._wp … … 62 57 END SELECT 63 58 64 IF (jphgr_msh /= 2 .AND. jphgr_msh /= 3) THEN 65 zlon = MOD( plon + 720., 360. ) ! plon between 0 and 360 66 zglam(:,:) = MOD( zglam(:,:) + 720., 360. ) ! glam between 0 and 360 67 IF( zlon > 270. ) zlon = zlon - 360. ! zlon between -90 and 270 68 IF( zlon < 90. ) WHERE( zglam(:,:) > 180. ) zglam(:,:) = zglam(:,:) - 360. ! glam between -180 and 180 69 zglam(:,:) = zglam(:,:) - zlon 70 ELSE 71 zglam(:,:) = zglam(:,:) - plon 72 END IF 59 zlon = MOD( plon + 720., 360. ) ! plon between 0 and 360 60 zglam(:,:) = MOD( zglam(:,:) + 720., 360. ) ! glam between 0 and 360 61 IF( zlon > 270. ) zlon = zlon - 360. ! zlon between -90 and 270 62 IF( zlon < 90. ) WHERE( zglam(:,:) > 180. ) zglam(:,:) = zglam(:,:) - 360. ! glam between -180 and 180 63 zglam(:,:) = zglam(:,:) - zlon 73 64 74 65 zgphi(:,:) = zgphi(:,:) - plat … … 76 67 77 68 IF( lk_mpp ) THEN 78 CALL mpp_minloc( zdist(:,:), zmask, zmini, kii, kjj) 69 CALL mpp_minloc( 'domngb', zdist(:,:), zmask, zmini, iloc) 70 kii = iloc(1) ; kjj = iloc(2) 79 71 ELSE 80 72 iloc(:) = MINLOC( zdist(:,:), mask = zmask(:,:) == 1.e0 ) … … 83 75 ENDIF 84 76 ! 85 CALL wrk_dealloc( jpi,jpj, zglam, zgphi, zmask, zdist )86 !87 IF( nn_timing == 1 ) CALL timing_stop('dom_ngb')88 !89 77 END SUBROUTINE dom_ngb 90 78 -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domvvl.F90
r10725 r10727 6 6 !! History : 2.0 ! 2006-06 (B. Levier, L. Marie) original code 7 7 !! 3.1 ! 2009-02 (G. Madec, M. Leclair, R. Benshila) pure z* coordinate 8 !! 3.3 ! 2011-10 (M. Leclair) totally rewrote domvvl: 9 !! vvl option includes z_star and z_tilde coordinates 8 !! 3.3 ! 2011-10 (M. Leclair) totally rewrote domvvl: vvl option includes z_star and z_tilde coordinates 10 9 !! 3.6 ! 2014-11 (P. Mathiot) add ice shelf capability 11 10 !!---------------------------------------------------------------------- … … 22 21 USE phycst ! physical constant 23 22 USE dom_oce ! ocean space and time domain 23 ! USE wet_dry ! wetting and drying 24 ! USE usrdef_istate ! user defined initial state (wad only) 25 ! USE restart ! ocean restart 24 26 ! 25 27 USE in_out_manager ! I/O manager … … 27 29 USE lib_mpp ! distributed memory computing library 28 30 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 29 USE wrk_nemo ! Memory allocation30 31 USE timing ! Timing 31 32 … … 34 35 35 36 PUBLIC dom_vvl_init ! called by domain.F90 37 PUBLIC dom_vvl_sf_nxt ! called by step.F90 38 PUBLIC dom_vvl_sf_swp ! called by step.F90 39 PUBLIC dom_vvl_interpol ! called by dynnxt.F90 36 40 37 41 ! !!* Namelist nam_vvl … … 57 61 58 62 !! * Substitutions 63 # include "vectopt_loop_substitute.h90" 59 64 !!---------------------------------------------------------------------- 60 !! *** vectopt_loop_substitute *** 61 !!---------------------------------------------------------------------- 62 !! ** purpose : substitute the inner loop start/end indices with CPP macro 63 !! allow unrolling of do-loop (useful with vector processors) 64 !!---------------------------------------------------------------------- 65 !!---------------------------------------------------------------------- 66 !! NEMO/OPA 3.7 , NEMO Consortium (2014) 67 !! $Id: vectopt_loop_substitute.h90 4990 2014-12-15 16:42:49Z timgraham $ 68 !! Software governed by the CeCILL licence (./LICENSE) 69 !!---------------------------------------------------------------------- 70 !!---------------------------------------------------------------------- 71 !! NEMO/OPA 3.7 , NEMO-Consortium (2015) 72 !! $Id: domvvl.F90 6351 2016-02-24 18:50:11Z cetlod $ 73 !! Software governed by the CeCILL licence (./LICENSE) 65 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 66 !! $Id: domvvl.F90 10425 2018-12-19 21:54:16Z smasson $ 67 !! Software governed by the CeCILL license (see ./LICENSE) 74 68 !!---------------------------------------------------------------------- 75 69 CONTAINS … … 84 78 & dtilde_e3t_a(jpi,jpj,jpk) , un_td (jpi,jpj,jpk) , vn_td (jpi,jpj,jpk) , & 85 79 & STAT = dom_vvl_alloc ) 86 IF( lk_mpp ) CALL mpp_sum (dom_vvl_alloc )87 IF( dom_vvl_alloc /= 0 ) CALL ctl_ warn('dom_vvl_alloc: failed to allocate arrays')80 CALL mpp_sum ( 'domvvl', dom_vvl_alloc ) 81 IF( dom_vvl_alloc /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_alloc: failed to allocate arrays' ) 88 82 un_td = 0._wp 89 83 vn_td = 0._wp … … 91 85 IF( ln_vvl_ztilde ) THEN 92 86 ALLOCATE( frq_rst_e3t(jpi,jpj) , frq_rst_hdv(jpi,jpj) , hdiv_lf(jpi,jpj,jpk) , STAT= dom_vvl_alloc ) 93 IF( lk_mpp ) CALL mpp_sum (dom_vvl_alloc )94 IF( dom_vvl_alloc /= 0 ) CALL ctl_ warn('dom_vvl_alloc: failed to allocate arrays')87 CALL mpp_sum ( 'domvvl', dom_vvl_alloc ) 88 IF( dom_vvl_alloc /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_alloc: failed to allocate arrays' ) 95 89 ENDIF 96 90 ! … … 125 119 !!---------------------------------------------------------------------- 126 120 ! 127 IF( nn_timing == 1 ) CALL timing_start('dom_vvl_init')128 !129 121 IF(lwp) WRITE(numout,*) 130 122 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' … … 137 129 ! 138 130 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 131 CALL dom_vvl_rst( nit000, 'READ' ) 139 132 e3t_a(:,:,jpk) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all 140 133 ! … … 153 146 CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) ! from V to UW 154 147 CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 148 149 ! We need to define e3[tuv]_a for AGRIF initialisation (should not be a problem for the restartability...) 150 e3t_a(:,:,:) = e3t_n(:,:,:) 151 e3u_a(:,:,:) = e3u_n(:,:,:) 152 e3v_a(:,:,:) = e3v_n(:,:,:) 155 153 ! 156 154 ! !== depth of t and w-point ==! (set the isf depth as it is in the initial timestep) … … 235 233 END DO 236 234 END DO 237 IF( cp_cfg == "orca" .AND. jp_cfg == 3 ) THEN ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 238 ii0 = 103 ; ii1 = 111 239 ij0 = 128 ; ij1 = 135 ; 240 frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.0_wp 241 frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 1.e0_wp / rdt 235 IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN 236 IF( nn_cfg == 3 ) THEN ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 237 ii0 = 103 ; ii1 = 111 238 ij0 = 128 ; ij1 = 135 ; 239 frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.0_wp 240 frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 1.e0_wp / rdt 241 ENDIF 242 242 ENDIF 243 243 ENDIF 244 244 ENDIF 245 245 ! 246 IF( nn_timing == 1 ) CALL timing_stop('dom_vvl_init') 246 IF(lwxios) THEN 247 ! define variables in restart file when writing with XIOS 248 CALL iom_set_rstw_var_active('e3t_b') 249 CALL iom_set_rstw_var_active('e3t_n') 250 ! ! ----------------------- ! 251 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 252 ! ! ----------------------- ! 253 CALL iom_set_rstw_var_active('tilde_e3t_b') 254 CALL iom_set_rstw_var_active('tilde_e3t_n') 255 END IF 256 ! ! -------------! 257 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 258 ! ! ------------ ! 259 CALL iom_set_rstw_var_active('hdiv_lf') 260 ENDIF 261 ! 262 ENDIF 247 263 ! 248 264 END SUBROUTINE dom_vvl_init 265 266 267 SUBROUTINE dom_vvl_sf_nxt( kt, kcall ) 268 !!---------------------------------------------------------------------- 269 !! *** ROUTINE dom_vvl_sf_nxt *** 270 !! 271 !! ** Purpose : - compute the after scale factors used in tra_zdf, dynnxt, 272 !! tranxt and dynspg routines 273 !! 274 !! ** Method : - z_star case: Repartition of ssh INCREMENT proportionnaly to the level thickness. 275 !! - z_tilde_case: after scale factor increment = 276 !! high frequency part of horizontal divergence 277 !! + retsoring towards the background grid 278 !! + thickness difusion 279 !! Then repartition of ssh INCREMENT proportionnaly 280 !! to the "baroclinic" level thickness. 281 !! 282 !! ** Action : - hdiv_lf : restoring towards full baroclinic divergence in z_tilde case 283 !! - tilde_e3t_a: after increment of vertical scale factor 284 !! in z_tilde case 285 !! - e3(t/u/v)_a 286 !! 287 !! Reference : Leclair, M., and Madec, G. 2011, Ocean Modelling. 288 !!---------------------------------------------------------------------- 289 INTEGER, INTENT( in ) :: kt ! time step 290 INTEGER, INTENT( in ), OPTIONAL :: kcall ! optional argument indicating call sequence 291 ! 292 INTEGER :: ji, jj, jk ! dummy loop indices 293 INTEGER , DIMENSION(3) :: ijk_max, ijk_min ! temporary integers 294 REAL(wp) :: z2dt, z_tmin, z_tmax ! local scalars 295 LOGICAL :: ll_do_bclinic ! local logical 296 REAL(wp), DIMENSION(jpi,jpj) :: zht, z_scale, zwu, zwv, zhdiv 297 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t 298 !!---------------------------------------------------------------------- 299 ! 300 IF( ln_linssh ) RETURN ! No calculation in linear free surface 301 ! 302 IF( ln_timing ) CALL timing_start('dom_vvl_sf_nxt') 303 ! 304 IF( kt == nit000 ) THEN 305 IF(lwp) WRITE(numout,*) 306 IF(lwp) WRITE(numout,*) 'dom_vvl_sf_nxt : compute after scale factors' 307 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~' 308 ENDIF 309 310 ll_do_bclinic = .TRUE. 311 IF( PRESENT(kcall) ) THEN 312 IF( kcall == 2 .AND. ln_vvl_ztilde ) ll_do_bclinic = .FALSE. 313 ENDIF 314 315 ! ******************************* ! 316 ! After acale factors at t-points ! 317 ! ******************************* ! 318 ! ! --------------------------------------------- ! 319 ! ! z_star coordinate and barotropic z-tilde part ! 320 ! ! --------------------------------------------- ! 321 ! 322 z_scale(:,:) = ( ssha(:,:) - sshb(:,:) ) * ssmask(:,:) / ( ht_0(:,:) + sshn(:,:) + 1. - ssmask(:,:) ) 323 DO jk = 1, jpkm1 324 ! formally this is the same as e3t_a = e3t_0*(1+ssha/ht_0) 325 e3t_a(:,:,jk) = e3t_b(:,:,jk) + e3t_n(:,:,jk) * z_scale(:,:) * tmask(:,:,jk) 326 END DO 327 ! 328 IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN ! z_tilde or layer coordinate ! 329 ! ! ------baroclinic part------ ! 330 ! I - initialization 331 ! ================== 332 333 ! 1 - barotropic divergence 334 ! ------------------------- 335 zhdiv(:,:) = 0._wp 336 zht(:,:) = 0._wp 337 DO jk = 1, jpkm1 338 zhdiv(:,:) = zhdiv(:,:) + e3t_n(:,:,jk) * hdivn(:,:,jk) 339 zht (:,:) = zht (:,:) + e3t_n(:,:,jk) * tmask(:,:,jk) 340 END DO 341 zhdiv(:,:) = zhdiv(:,:) / ( zht(:,:) + 1. - tmask_i(:,:) ) 342 343 ! 2 - Low frequency baroclinic horizontal divergence (z-tilde case only) 344 ! -------------------------------------------------- 345 IF( ln_vvl_ztilde ) THEN 346 IF( kt > nit000 ) THEN 347 DO jk = 1, jpkm1 348 hdiv_lf(:,:,jk) = hdiv_lf(:,:,jk) - rdt * frq_rst_hdv(:,:) & 349 & * ( hdiv_lf(:,:,jk) - e3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) ) 350 END DO 351 ENDIF 352 ENDIF 353 354 ! II - after z_tilde increments of vertical scale factors 355 ! ======================================================= 356 tilde_e3t_a(:,:,:) = 0._wp ! tilde_e3t_a used to store tendency terms 357 358 ! 1 - High frequency divergence term 359 ! ---------------------------------- 360 IF( ln_vvl_ztilde ) THEN ! z_tilde case 361 DO jk = 1, jpkm1 362 tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - ( e3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) - hdiv_lf(:,:,jk) ) 363 END DO 364 ELSE ! layer case 365 DO jk = 1, jpkm1 366 tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - e3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) * tmask(:,:,jk) 367 END DO 368 ENDIF 369 370 ! 2 - Restoring term (z-tilde case only) 371 ! ------------------ 372 IF( ln_vvl_ztilde ) THEN 373 DO jk = 1, jpk 374 tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - frq_rst_e3t(:,:) * tilde_e3t_b(:,:,jk) 375 END DO 376 ENDIF 377 378 ! 3 - Thickness diffusion term 379 ! ---------------------------- 380 zwu(:,:) = 0._wp 381 zwv(:,:) = 0._wp 382 DO jk = 1, jpkm1 ! a - first derivative: diffusive fluxes 383 DO jj = 1, jpjm1 384 DO ji = 1, fs_jpim1 ! vector opt. 385 un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj) & 386 & * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj ,jk) ) 387 vn_td(ji,jj,jk) = rn_ahe3 * vmask(ji,jj,jk) * e1_e2v(ji,jj) & 388 & * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji ,jj+1,jk) ) 389 zwu(ji,jj) = zwu(ji,jj) + un_td(ji,jj,jk) 390 zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk) 391 END DO 392 END DO 393 END DO 394 DO jj = 1, jpj ! b - correction for last oceanic u-v points 395 DO ji = 1, jpi 396 un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj) 397 vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj) 398 END DO 399 END DO 400 DO jk = 1, jpkm1 ! c - second derivative: divergence of diffusive fluxes 401 DO jj = 2, jpjm1 402 DO ji = fs_2, fs_jpim1 ! vector opt. 403 tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + ( un_td(ji-1,jj ,jk) - un_td(ji,jj,jk) & 404 & + vn_td(ji ,jj-1,jk) - vn_td(ji,jj,jk) & 405 & ) * r1_e1e2t(ji,jj) 406 END DO 407 END DO 408 END DO 409 ! ! d - thickness diffusion transport: boundary conditions 410 ! (stored for tracer advction and continuity equation) 411 CALL lbc_lnk_multi( 'domvvl', un_td , 'U' , -1._wp, vn_td , 'V' , -1._wp) 412 413 ! 4 - Time stepping of baroclinic scale factors 414 ! --------------------------------------------- 415 ! Leapfrog time stepping 416 ! ~~~~~~~~~~~~~~~~~~~~~~ 417 IF( neuler == 0 .AND. kt == nit000 ) THEN 418 z2dt = rdt 419 ELSE 420 z2dt = 2.0_wp * rdt 421 ENDIF 422 CALL lbc_lnk( 'domvvl', tilde_e3t_a(:,:,:), 'T', 1._wp ) 423 tilde_e3t_a(:,:,:) = tilde_e3t_b(:,:,:) + z2dt * tmask(:,:,:) * tilde_e3t_a(:,:,:) 424 425 ! Maximum deformation control 426 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 427 ze3t(:,:,jpk) = 0._wp 428 DO jk = 1, jpkm1 429 ze3t(:,:,jk) = tilde_e3t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 430 END DO 431 z_tmax = MAXVAL( ze3t(:,:,:) ) 432 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 433 z_tmin = MINVAL( ze3t(:,:,:) ) 434 CALL mpp_min( 'domvvl', z_tmin ) ! min over the global domain 435 ! - ML - test: for the moment, stop simulation for too large e3_t variations 436 IF( ( z_tmax > rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN 437 IF( lk_mpp ) THEN 438 CALL mpp_maxloc( 'domvvl', ze3t, tmask, z_tmax, ijk_max ) 439 CALL mpp_minloc( 'domvvl', ze3t, tmask, z_tmin, ijk_min ) 440 ELSE 441 ijk_max = MAXLOC( ze3t(:,:,:) ) 442 ijk_max(1) = ijk_max(1) + nimpp - 1 443 ijk_max(2) = ijk_max(2) + njmpp - 1 444 ijk_min = MINLOC( ze3t(:,:,:) ) 445 ijk_min(1) = ijk_min(1) + nimpp - 1 446 ijk_min(2) = ijk_min(2) + njmpp - 1 447 ENDIF 448 IF (lwp) THEN 449 WRITE(numout, *) 'MAX( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmax 450 WRITE(numout, *) 'at i, j, k=', ijk_max 451 WRITE(numout, *) 'MIN( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmin 452 WRITE(numout, *) 'at i, j, k=', ijk_min 453 CALL ctl_stop( 'STOP', 'MAX( ABS( tilde_e3t_a(:,:,: ) ) / e3t_0(:,:,:) ) too high') 454 ENDIF 455 ENDIF 456 ! - ML - end test 457 ! - ML - Imposing these limits will cause a baroclinicity error which is corrected for below 458 tilde_e3t_a(:,:,:) = MIN( tilde_e3t_a(:,:,:), rn_zdef_max * e3t_0(:,:,:) ) 459 tilde_e3t_a(:,:,:) = MAX( tilde_e3t_a(:,:,:), - rn_zdef_max * e3t_0(:,:,:) ) 460 461 ! 462 ! "tilda" change in the after scale factor 463 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 464 DO jk = 1, jpkm1 465 dtilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - tilde_e3t_b(:,:,jk) 466 END DO 467 ! III - Barotropic repartition of the sea surface height over the baroclinic profile 468 ! ================================================================================== 469 ! add ( ssh increment + "baroclinicity error" ) proportionly to e3t(n) 470 ! - ML - baroclinicity error should be better treated in the future 471 ! i.e. locally and not spread over the water column. 472 ! (keep in mind that the idea is to reduce Eulerian velocity as much as possible) 473 zht(:,:) = 0. 474 DO jk = 1, jpkm1 475 zht(:,:) = zht(:,:) + tilde_e3t_a(:,:,jk) * tmask(:,:,jk) 476 END DO 477 z_scale(:,:) = - zht(:,:) / ( ht_0(:,:) + sshn(:,:) + 1. - ssmask(:,:) ) 478 DO jk = 1, jpkm1 479 dtilde_e3t_a(:,:,jk) = dtilde_e3t_a(:,:,jk) + e3t_n(:,:,jk) * z_scale(:,:) * tmask(:,:,jk) 480 END DO 481 482 ENDIF 483 484 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde or layer coordinate ! 485 ! ! ---baroclinic part--------- ! 486 DO jk = 1, jpkm1 487 e3t_a(:,:,jk) = e3t_a(:,:,jk) + dtilde_e3t_a(:,:,jk) * tmask(:,:,jk) 488 END DO 489 ENDIF 490 491 IF( ln_vvl_dbg .AND. .NOT. ll_do_bclinic ) THEN ! - ML - test: control prints for debuging 492 ! 493 IF( lwp ) WRITE(numout, *) 'kt =', kt 494 IF ( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN 495 z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( zht(:,:) ) ) 496 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 497 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(SUM(tilde_e3t_a))) =', z_tmax 498 END IF 499 ! 500 zht(:,:) = 0.0_wp 501 DO jk = 1, jpkm1 502 zht(:,:) = zht(:,:) + e3t_n(:,:,jk) * tmask(:,:,jk) 503 END DO 504 z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) ) 505 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 506 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshn-SUM(e3t_n))) =', z_tmax 507 ! 508 zht(:,:) = 0.0_wp 509 DO jk = 1, jpkm1 510 zht(:,:) = zht(:,:) + e3t_a(:,:,jk) * tmask(:,:,jk) 511 END DO 512 z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) ) 513 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 514 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+ssha-SUM(e3t_a))) =', z_tmax 515 ! 516 zht(:,:) = 0.0_wp 517 DO jk = 1, jpkm1 518 zht(:,:) = zht(:,:) + e3t_b(:,:,jk) * tmask(:,:,jk) 519 END DO 520 z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshb(:,:) - zht(:,:) ) ) 521 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 522 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshb-SUM(e3t_b))) =', z_tmax 523 ! 524 z_tmax = MAXVAL( tmask(:,:,1) * ABS( sshb(:,:) ) ) 525 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 526 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(sshb))) =', z_tmax 527 ! 528 z_tmax = MAXVAL( tmask(:,:,1) * ABS( sshn(:,:) ) ) 529 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 530 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(sshn))) =', z_tmax 531 ! 532 z_tmax = MAXVAL( tmask(:,:,1) * ABS( ssha(:,:) ) ) 533 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 534 IF( lwp ) WRITE(numout, *) kt,' MAXVAL(abs(ssha))) =', z_tmax 535 END IF 536 537 ! *********************************** ! 538 ! After scale factors at u- v- points ! 539 ! *********************************** ! 540 541 CALL dom_vvl_interpol( e3t_a(:,:,:), e3u_a(:,:,:), 'U' ) 542 CALL dom_vvl_interpol( e3t_a(:,:,:), e3v_a(:,:,:), 'V' ) 543 544 ! *********************************** ! 545 ! After depths at u- v points ! 546 ! *********************************** ! 547 548 hu_a(:,:) = e3u_a(:,:,1) * umask(:,:,1) 549 hv_a(:,:) = e3v_a(:,:,1) * vmask(:,:,1) 550 DO jk = 2, jpkm1 551 hu_a(:,:) = hu_a(:,:) + e3u_a(:,:,jk) * umask(:,:,jk) 552 hv_a(:,:) = hv_a(:,:) + e3v_a(:,:,jk) * vmask(:,:,jk) 553 END DO 554 ! ! Inverse of the local depth 555 !!gm BUG ? don't understand the use of umask_i here ..... 556 r1_hu_a(:,:) = ssumask(:,:) / ( hu_a(:,:) + 1._wp - ssumask(:,:) ) 557 r1_hv_a(:,:) = ssvmask(:,:) / ( hv_a(:,:) + 1._wp - ssvmask(:,:) ) 558 ! 559 IF( ln_timing ) CALL timing_stop('dom_vvl_sf_nxt') 560 ! 561 END SUBROUTINE dom_vvl_sf_nxt 562 563 564 SUBROUTINE dom_vvl_sf_swp( kt ) 565 !!---------------------------------------------------------------------- 566 !! *** ROUTINE dom_vvl_sf_swp *** 567 !! 568 !! ** Purpose : compute time filter and swap of scale factors 569 !! compute all depths and related variables for next time step 570 !! write outputs and restart file 571 !! 572 !! ** Method : - swap of e3t with trick for volume/tracer conservation 573 !! - reconstruct scale factor at other grid points (interpolate) 574 !! - recompute depths and water height fields 575 !! 576 !! ** Action : - e3t_(b/n), tilde_e3t_(b/n) and e3(u/v)_n ready for next time step 577 !! - Recompute: 578 !! e3(u/v)_b 579 !! e3w_n 580 !! e3(u/v)w_b 581 !! e3(u/v)w_n 582 !! gdept_n, gdepw_n and gde3w_n 583 !! h(u/v) and h(u/v)r 584 !! 585 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 586 !! Leclair, M., and G. Madec, 2011, Ocean Modelling. 587 !!---------------------------------------------------------------------- 588 INTEGER, INTENT( in ) :: kt ! time step 589 ! 590 INTEGER :: ji, jj, jk ! dummy loop indices 591 REAL(wp) :: zcoef ! local scalar 592 !!---------------------------------------------------------------------- 593 ! 594 IF( ln_linssh ) RETURN ! No calculation in linear free surface 595 ! 596 IF( ln_timing ) CALL timing_start('dom_vvl_sf_swp') 597 ! 598 IF( kt == nit000 ) THEN 599 IF(lwp) WRITE(numout,*) 600 IF(lwp) WRITE(numout,*) 'dom_vvl_sf_swp : - time filter and swap of scale factors' 601 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ - interpolate scale factors and compute depths for next time step' 602 ENDIF 603 ! 604 ! Time filter and swap of scale factors 605 ! ===================================== 606 ! - ML - e3(t/u/v)_b are allready computed in dynnxt. 607 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN 608 IF( neuler == 0 .AND. kt == nit000 ) THEN 609 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) 610 ELSE 611 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) & 612 & + atfp * ( tilde_e3t_b(:,:,:) - 2.0_wp * tilde_e3t_n(:,:,:) + tilde_e3t_a(:,:,:) ) 613 ENDIF 614 tilde_e3t_n(:,:,:) = tilde_e3t_a(:,:,:) 615 ENDIF 616 gdept_b(:,:,:) = gdept_n(:,:,:) 617 gdepw_b(:,:,:) = gdepw_n(:,:,:) 618 619 e3t_n(:,:,:) = e3t_a(:,:,:) 620 e3u_n(:,:,:) = e3u_a(:,:,:) 621 e3v_n(:,:,:) = e3v_a(:,:,:) 622 623 ! Compute all missing vertical scale factor and depths 624 ! ==================================================== 625 ! Horizontal scale factor interpolations 626 ! -------------------------------------- 627 ! - ML - e3u_b and e3v_b are allready computed in dynnxt 628 ! - JC - hu_b, hv_b, hur_b, hvr_b also 629 630 CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 631 632 ! Vertical scale factor interpolations 633 CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n(:,:,:), 'W' ) 634 CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 635 CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 636 CALL dom_vvl_interpol( e3t_b(:,:,:), e3w_b(:,:,:), 'W' ) 637 CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 638 CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 639 640 ! t- and w- points depth (set the isf depth as it is in the initial step) 641 gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 642 gdepw_n(:,:,1) = 0.0_wp 643 gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 644 DO jk = 2, jpk 645 DO jj = 1,jpj 646 DO ji = 1,jpi 647 ! zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 648 ! 1 for jk = mikt 649 zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 650 gdepw_n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t_n(ji,jj,jk-1) 651 gdept_n(ji,jj,jk) = zcoef * ( gdepw_n(ji,jj,jk ) + 0.5 * e3w_n(ji,jj,jk) ) & 652 & + (1-zcoef) * ( gdept_n(ji,jj,jk-1) + e3w_n(ji,jj,jk) ) 653 gde3w_n(ji,jj,jk) = gdept_n(ji,jj,jk) - sshn(ji,jj) 654 END DO 655 END DO 656 END DO 657 658 ! Local depth and Inverse of the local depth of the water 659 ! ------------------------------------------------------- 660 hu_n(:,:) = hu_a(:,:) ; r1_hu_n(:,:) = r1_hu_a(:,:) 661 hv_n(:,:) = hv_a(:,:) ; r1_hv_n(:,:) = r1_hv_a(:,:) 662 ! 663 ht_n(:,:) = e3t_n(:,:,1) * tmask(:,:,1) 664 DO jk = 2, jpkm1 665 ht_n(:,:) = ht_n(:,:) + e3t_n(:,:,jk) * tmask(:,:,jk) 666 END DO 667 668 ! write restart file 669 ! ================== 670 IF( lrst_oce ) CALL dom_vvl_rst( kt, 'WRITE' ) 671 ! 672 IF( ln_timing ) CALL timing_stop('dom_vvl_sf_swp') 673 ! 674 END SUBROUTINE dom_vvl_sf_swp 249 675 250 676 … … 265 691 ! 266 692 INTEGER :: ji, jj, jk ! dummy loop indices 267 REAL(wp) :: zlnwd ! =1./0. when ln_wd = T/F 268 !!---------------------------------------------------------------------- 269 ! 270 IF( nn_timing == 1 ) CALL timing_start('dom_vvl_interpol') 271 ! 272 zlnwd = 0.0_wp 693 REAL(wp) :: zlnwd ! =1./0. when ln_wd_il = T/F 694 !!---------------------------------------------------------------------- 695 ! 696 ! IF(ln_wd_il) THEN 697 ! zlnwd = 1.0_wp 698 ! ELSE 699 zlnwd = 0.0_wp 700 ! END IF 273 701 ! 274 702 SELECT CASE ( pout ) !== type of interpolation ==! … … 277 705 DO jk = 1, jpk 278 706 DO jj = 1, jpjm1 279 DO ji = 1, jpim1 ! vector opt.707 DO ji = 1, fs_jpim1 ! vector opt. 280 708 pe3_out(ji,jj,jk) = 0.5_wp * ( umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj) & 281 709 & * ( e1e2t(ji ,jj) * ( pe3_in(ji ,jj,jk) - e3t_0(ji ,jj,jk) ) & … … 284 712 END DO 285 713 END DO 286 CALL lbc_lnk( pe3_out(:,:,:), 'U', 1._wp )714 CALL lbc_lnk( 'domvvl', pe3_out(:,:,:), 'U', 1._wp ) 287 715 pe3_out(:,:,:) = pe3_out(:,:,:) + e3u_0(:,:,:) 288 716 ! … … 290 718 DO jk = 1, jpk 291 719 DO jj = 1, jpjm1 292 DO ji = 1, jpim1 ! vector opt.720 DO ji = 1, fs_jpim1 ! vector opt. 293 721 pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj) & 294 722 & * ( e1e2t(ji,jj ) * ( pe3_in(ji,jj ,jk) - e3t_0(ji,jj ,jk) ) & … … 297 725 END DO 298 726 END DO 299 CALL lbc_lnk( pe3_out(:,:,:), 'V', 1._wp )727 CALL lbc_lnk( 'domvvl', pe3_out(:,:,:), 'V', 1._wp ) 300 728 pe3_out(:,:,:) = pe3_out(:,:,:) + e3v_0(:,:,:) 301 729 ! … … 303 731 DO jk = 1, jpk 304 732 DO jj = 1, jpjm1 305 DO ji = 1, jpim1 ! vector opt.733 DO ji = 1, fs_jpim1 ! vector opt. 306 734 pe3_out(ji,jj,jk) = 0.5_wp * ( umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) & 307 735 & * r1_e1e2f(ji,jj) & … … 311 739 END DO 312 740 END DO 313 CALL lbc_lnk( pe3_out(:,:,:), 'F', 1._wp )741 CALL lbc_lnk( 'domvvl', pe3_out(:,:,:), 'F', 1._wp ) 314 742 pe3_out(:,:,:) = pe3_out(:,:,:) + e3f_0(:,:,:) 315 743 ! … … 351 779 END SELECT 352 780 ! 353 IF( nn_timing == 1 ) CALL timing_stop('dom_vvl_interpol')354 !355 781 END SUBROUTINE dom_vvl_interpol 782 783 784 SUBROUTINE dom_vvl_rst( kt, cdrw ) 785 !!--------------------------------------------------------------------- 786 !! *** ROUTINE dom_vvl_rst *** 787 !! 788 !! ** Purpose : Read or write VVL file in restart file 789 !! 790 !! ** Method : use of IOM library 791 !! if the restart does not contain vertical scale factors, 792 !! they are set to the _0 values 793 !! if the restart does not contain vertical scale factors increments (z_tilde), 794 !! they are set to 0. 795 !!---------------------------------------------------------------------- 796 INTEGER , INTENT(in) :: kt ! ocean time-step 797 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 798 ! 799 INTEGER :: ji, jj, jk 800 INTEGER :: id1, id2, id3, id4, id5 ! local integers 801 !!---------------------------------------------------------------------- 802 ! 803 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialise 804 ! ! =============== 805 IF( .false. ) THEN !* Read the restart file 806 CALL rst_read_open ! open the restart file if necessary 807 CALL iom_get( numror, jpdom_autoglo, 'sshn' , sshn, ldxios = lrxios ) 808 ! 809 id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) 810 id2 = iom_varid( numror, 'e3t_n', ldstop = .FALSE. ) 811 id3 = iom_varid( numror, 'tilde_e3t_b', ldstop = .FALSE. ) 812 id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 813 id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 814 ! ! --------- ! 815 ! ! all cases ! 816 ! ! --------- ! 817 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 818 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) 819 CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lrxios ) 820 ! needed to restart if land processor not computed 821 IF(lwp) write(numout,*) 'dom_vvl_rst : e3t_b and e3t_n found in restart files' 822 WHERE ( tmask(:,:,:) == 0.0_wp ) 823 e3t_n(:,:,:) = e3t_0(:,:,:) 824 e3t_b(:,:,:) = e3t_0(:,:,:) 825 END WHERE 826 IF( neuler == 0 ) THEN 827 e3t_b(:,:,:) = e3t_n(:,:,:) 828 ENDIF 829 ELSE IF( id1 > 0 ) THEN 830 IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t_n not found in restart files' 831 IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 832 IF(lwp) write(numout,*) 'neuler is forced to 0' 833 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) 834 e3t_n(:,:,:) = e3t_b(:,:,:) 835 neuler = 0 836 ELSE IF( id2 > 0 ) THEN 837 IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t_b not found in restart files' 838 IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 839 IF(lwp) write(numout,*) 'neuler is forced to 0' 840 CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lrxios ) 841 e3t_b(:,:,:) = e3t_n(:,:,:) 842 neuler = 0 843 ELSE 844 IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t_n not found in restart file' 845 IF(lwp) write(numout,*) 'Compute scale factor from sshn' 846 IF(lwp) write(numout,*) 'neuler is forced to 0' 847 DO jk = 1, jpk 848 e3t_n(:,:,jk) = e3t_0(:,:,jk) * ( ht_0(:,:) + sshn(:,:) ) & 849 & / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk) & 850 & + e3t_0(:,:,jk) * (1._wp -tmask(:,:,jk)) 851 END DO 852 e3t_b(:,:,:) = e3t_n(:,:,:) 853 neuler = 0 854 ENDIF 855 ! ! ----------- ! 856 IF( ln_vvl_zstar ) THEN ! z_star case ! 857 ! ! ----------- ! 858 IF( MIN( id3, id4 ) > 0 ) THEN 859 CALL ctl_stop( 'dom_vvl_rst: z_star cannot restart from a z_tilde or layer run' ) 860 ENDIF 861 ! ! ----------------------- ! 862 ELSE ! z_tilde and layer cases ! 863 ! ! ----------------------- ! 864 IF( MIN( id3, id4 ) > 0 ) THEN ! all required arrays exist 865 CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 866 CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 867 ELSE ! one at least array is missing 868 tilde_e3t_b(:,:,:) = 0.0_wp 869 tilde_e3t_n(:,:,:) = 0.0_wp 870 ENDIF 871 ! ! ------------ ! 872 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 873 ! ! ------------ ! 874 IF( id5 > 0 ) THEN ! required array exists 875 CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 876 ELSE ! array is missing 877 hdiv_lf(:,:,:) = 0.0_wp 878 ENDIF 879 ENDIF 880 ENDIF 881 ! 882 ELSE !* Initialize at "rest" 883 ! 884 885 IF( .false. ) THEN ! MJB ll_wd edits start here - these are essential 886 ! 887 !wet dry here 888 ! 889 ELSE 890 ! 891 ! Just to read set ssh in fact, called latter once vertical grid 892 ! is set up: 893 ! CALL usr_def_istate( gdept_0, tmask, tsb, ub, vb, sshb ) 894 ! ! 895 ! DO jk=1,jpk 896 ! e3t_b(:,:,jk) = e3t_0(:,:,jk) * ( ht_0(:,:) + sshb(:,:) ) & 897 ! & / ( ht_0(:,:) + 1._wp -ssmask(:,:) ) * tmask(:,:,jk) 898 ! END DO 899 ! e3t_n(:,:,:) = e3t_b(:,:,:) 900 sshn(:,:)=0._wp 901 e3t_n(:,:,:)=e3t_0(:,:,:) 902 e3t_b(:,:,:)=e3t_0(:,:,:) 903 ! 904 END IF ! end of ll_wd edits 905 906 IF( ln_vvl_ztilde .OR. ln_vvl_layer) THEN 907 tilde_e3t_b(:,:,:) = 0._wp 908 tilde_e3t_n(:,:,:) = 0._wp 909 IF( ln_vvl_ztilde ) hdiv_lf(:,:,:) = 0._wp 910 END IF 911 ENDIF 912 ! 913 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN ! Create restart file 914 ! ! =================== 915 IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 916 IF( lwxios ) CALL iom_swap( cwxios_context ) 917 ! ! --------- ! 918 ! ! all cases ! 919 ! ! --------- ! 920 CALL iom_rstput( kt, nitrst, numrow, 'e3t_b', e3t_b(:,:,:), ldxios = lwxios ) 921 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:), ldxios = lwxios ) 922 ! ! ----------------------- ! 923 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 924 ! ! ----------------------- ! 925 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lwxios) 926 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lwxios) 927 END IF 928 ! ! -------------! 929 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 930 ! ! ------------ ! 931 CALL iom_rstput( kt, nitrst, numrow, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lwxios) 932 ENDIF 933 ! 934 IF( lwxios ) CALL iom_swap( cxios_context ) 935 ENDIF 936 ! 937 END SUBROUTINE dom_vvl_rst 356 938 357 939 … … 372 954 REWIND( numnam_ref ) ! Namelist nam_vvl in reference namelist : 373 955 READ ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 374 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in reference namelist', lwp ) 375 ! 956 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in reference namelist', lwp ) 376 957 REWIND( numnam_cfg ) ! Namelist nam_vvl in configuration namelist : Parameters of the run 377 958 READ ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 378 902 IF( ios /=0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp )959 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp ) 379 960 IF(lwm) WRITE ( numond, nam_vvl ) 380 961 ! … … 383 964 WRITE(numout,*) 'dom_vvl_ctl : choice/control of the variable vertical coordinate' 384 965 WRITE(numout,*) '~~~~~~~~~~~' 385 WRITE(numout,*) ' 386 WRITE(numout,*) ' 387 WRITE(numout,*) ' 388 WRITE(numout,*) ' 389 WRITE(numout,*) ' 966 WRITE(numout,*) ' Namelist nam_vvl : chose a vertical coordinate' 967 WRITE(numout,*) ' zstar ln_vvl_zstar = ', ln_vvl_zstar 968 WRITE(numout,*) ' ztilde ln_vvl_ztilde = ', ln_vvl_ztilde 969 WRITE(numout,*) ' layer ln_vvl_layer = ', ln_vvl_layer 970 WRITE(numout,*) ' ztilde as zstar ln_vvl_ztilde_as_zstar = ', ln_vvl_ztilde_as_zstar 390 971 WRITE(numout,*) ' ztilde near the equator ln_vvl_zstar_at_eqtor = ', ln_vvl_zstar_at_eqtor 391 ! WRITE(numout,*) ' Namelist nam_vvl : chose kinetic-to-potential energy conservation' 392 ! WRITE(numout,*) ' ln_vvl_kepe = ', ln_vvl_kepe 393 WRITE(numout,*) ' Namelist nam_vvl : thickness diffusion coefficient' 394 WRITE(numout,*) ' rn_ahe3 = ', rn_ahe3 395 WRITE(numout,*) ' Namelist nam_vvl : maximum e3t deformation fractional change' 396 WRITE(numout,*) ' rn_zdef_max = ', rn_zdef_max 972 WRITE(numout,*) ' !' 973 WRITE(numout,*) ' thickness diffusion coefficient rn_ahe3 = ', rn_ahe3 974 WRITE(numout,*) ' maximum e3t deformation fractional change rn_zdef_max = ', rn_zdef_max 397 975 IF( ln_vvl_ztilde_as_zstar ) THEN 398 WRITE(numout,*) ' ztilde running in zstar emulation mode;'399 WRITE(numout,*) ' 400 WRITE(numout,*) ' 401 WRITE(numout,*) ' rn_rst_e3t = 0.0'402 WRITE(numout,*) ' 403 WRITE(numout,*) ' rn_lf_cutoff =1.0/rdt'976 WRITE(numout,*) ' ztilde running in zstar emulation mode (ln_vvl_ztilde_as_zstar=T) ' 977 WRITE(numout,*) ' ignoring namelist timescale parameters and using:' 978 WRITE(numout,*) ' hard-wired : z-tilde to zstar restoration timescale (days)' 979 WRITE(numout,*) ' rn_rst_e3t = 0.e0' 980 WRITE(numout,*) ' hard-wired : z-tilde cutoff frequency of low-pass filter (days)' 981 WRITE(numout,*) ' rn_lf_cutoff = 1.0/rdt' 404 982 ELSE 405 WRITE(numout,*) ' Namelist nam_vvl : z-tilde to zstar restoration timescale (days)' 406 WRITE(numout,*) ' rn_rst_e3t = ', rn_rst_e3t 407 WRITE(numout,*) ' Namelist nam_vvl : z-tilde cutoff frequency of low-pass filter (days)' 408 WRITE(numout,*) ' rn_lf_cutoff = ', rn_lf_cutoff 409 ENDIF 410 WRITE(numout,*) ' Namelist nam_vvl : debug prints' 411 WRITE(numout,*) ' ln_vvl_dbg = ', ln_vvl_dbg 983 WRITE(numout,*) ' z-tilde to zstar restoration timescale (days) rn_rst_e3t = ', rn_rst_e3t 984 WRITE(numout,*) ' z-tilde cutoff frequency of low-pass filter (days) rn_lf_cutoff = ', rn_lf_cutoff 985 ENDIF 986 WRITE(numout,*) ' debug prints flag ln_vvl_dbg = ', ln_vvl_dbg 412 987 ENDIF 413 988 ! … … 422 997 IF(lwp) THEN ! Print the choice 423 998 WRITE(numout,*) 424 IF( ln_vvl_zstar ) WRITE(numout,*) ' 425 IF( ln_vvl_ztilde ) WRITE(numout,*) ' 426 IF( ln_vvl_layer ) WRITE(numout,*) ' 427 IF( ln_vvl_ztilde_as_zstar ) WRITE(numout,*) ' 428 ! - ML - Option not developed yet429 ! IF( ln_vvl_kepe ) WRITE(numout,*) ' kinetic to potential energy transfer : option used'430 ! IF( .NOT. ln_vvl_kepe ) WRITE(numout,*) ' kinetic to potential energy transfer : option not used' 431 ENDIF432 ! 999 IF( ln_vvl_zstar ) WRITE(numout,*) ' ==>>> zstar vertical coordinate is used' 1000 IF( ln_vvl_ztilde ) WRITE(numout,*) ' ==>>> ztilde vertical coordinate is used' 1001 IF( ln_vvl_layer ) WRITE(numout,*) ' ==>>> layer vertical coordinate is used' 1002 IF( ln_vvl_ztilde_as_zstar ) WRITE(numout,*) ' ==>>> to emulate a zstar coordinate' 1003 ENDIF 1004 ! 1005 #if defined key_agrif 1006 IF( (.NOT.Agrif_Root()).AND.(.NOT.ln_vvl_zstar) ) CALL ctl_stop( 'AGRIF is implemented with zstar coordinate only' ) 1007 #endif 433 1008 ! 434 1009 END SUBROUTINE dom_vvl_ctl -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domwri.F90
r10725 r10727 8 8 !! NEMO 1.0 ! 2002-08 (G. Madec) F90 and several file 9 9 !! 3.0 ! 2008-01 (S. Masson) add dom_uniq 10 !! 4.0 ! 2016-01 (G. Madec) simplified mesh_mask.nc file 10 11 !!---------------------------------------------------------------------- 11 12 … … 16 17 !!---------------------------------------------------------------------- 17 18 USE dom_oce ! ocean space and time domain 19 USE phycst , ONLY : rsmall 20 ! USE wet_dry, ONLY : ll_wd ! Wetting and drying 21 ! 18 22 USE in_out_manager ! I/O manager 19 23 USE iom ! I/O library 20 24 USE lbclnk ! lateral boundary conditions - mpp exchanges 21 25 USE lib_mpp ! MPP library 22 USE wrk_nemo ! Memory allocation23 USE timing ! Timing24 USE phycst25 26 26 27 IMPLICIT NONE … … 28 29 29 30 PUBLIC dom_wri ! routine called by inidom.F90 30 PUBLIC dom_wri_coordinate ! routine called by domhgr.F9031 31 PUBLIC dom_stiff ! routine called by inidom.F90 32 32 33 !!---------------------------------------------------------------------- 34 !! NEMO/OPA 3.7 , NEMO Consortium (2014) 35 !! $Id: vectopt_loop_substitute.h90 4990 2014-12-15 16:42:49Z timgraham $ 36 !! Software governed by the CeCILL licence (./LICENSE) 33 !! * Substitutions 34 # include "vectopt_loop_substitute.h90" 35 !!---------------------------------------------------------------------- 36 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 37 !! $Id: domwri.F90 10425 2018-12-19 21:54:16Z smasson $ 38 !! Software governed by the CeCILL license (see ./LICENSE) 37 39 !!---------------------------------------------------------------------- 38 40 CONTAINS 39 40 SUBROUTINE dom_wri_coordinate41 !!----------------------------------------------------------------------42 !! *** ROUTINE dom_wri_coordinate ***43 !!44 !! ** Purpose : Create the NetCDF file which contains all the45 !! standard coordinate information plus the surface,46 !! e1e2u and e1e2v. By doing so, those surface will47 !! not be changed by the reduction of e1u or e2v scale48 !! factors in some straits.49 !! NB: call just after the read of standard coordinate50 !! and the reduction of scale factors in some straits51 !!52 !! ** output file : coordinate_e1e2u_v.nc53 !!----------------------------------------------------------------------54 INTEGER :: inum0 ! temprary units for 'coordinate_e1e2u_v.nc' file55 CHARACTER(len=21) :: clnam0 ! filename (mesh and mask informations)56 ! ! workspaces57 REAL(wp), POINTER, DIMENSION(:,: ) :: zprt, zprw58 REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepu, zdepv59 !!----------------------------------------------------------------------60 !61 IF( nn_timing == 1 ) CALL timing_start('dom_wri_coordinate')62 !63 IF(lwp) WRITE(numout,*)64 IF(lwp) WRITE(numout,*) 'dom_wri_coordinate : create NetCDF coordinate file'65 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~~'66 67 clnam0 = 'coordinate_e1e2u_v' ! filename (mesh and mask informations)68 69 ! create 'coordinate_e1e2u_v.nc' file70 ! ============================71 !72 CALL iom_open( TRIM(clnam0), inum0, ldwrt = .TRUE., kiolib = jprstlib )73 !74 ! ! horizontal mesh (inum3)75 CALL iom_rstput( 0, 0, inum0, 'glamt', glamt, ktype = jp_r8 ) ! ! latitude76 CALL iom_rstput( 0, 0, inum0, 'glamu', glamu, ktype = jp_r8 )77 CALL iom_rstput( 0, 0, inum0, 'glamv', glamv, ktype = jp_r8 )78 CALL iom_rstput( 0, 0, inum0, 'glamf', glamf, ktype = jp_r8 )79 80 CALL iom_rstput( 0, 0, inum0, 'gphit', gphit, ktype = jp_r8 ) ! ! longitude81 CALL iom_rstput( 0, 0, inum0, 'gphiu', gphiu, ktype = jp_r8 )82 CALL iom_rstput( 0, 0, inum0, 'gphiv', gphiv, ktype = jp_r8 )83 CALL iom_rstput( 0, 0, inum0, 'gphif', gphif, ktype = jp_r8 )84 85 CALL iom_rstput( 0, 0, inum0, 'e1t', e1t, ktype = jp_r8 ) ! ! e1 scale factors86 CALL iom_rstput( 0, 0, inum0, 'e1u', e1u, ktype = jp_r8 )87 CALL iom_rstput( 0, 0, inum0, 'e1v', e1v, ktype = jp_r8 )88 CALL iom_rstput( 0, 0, inum0, 'e1f', e1f, ktype = jp_r8 )89 90 CALL iom_rstput( 0, 0, inum0, 'e2t', e2t, ktype = jp_r8 ) ! ! e2 scale factors91 CALL iom_rstput( 0, 0, inum0, 'e2u', e2u, ktype = jp_r8 )92 CALL iom_rstput( 0, 0, inum0, 'e2v', e2v, ktype = jp_r8 )93 CALL iom_rstput( 0, 0, inum0, 'e2f', e2f, ktype = jp_r8 )94 95 CALL iom_rstput( 0, 0, inum0, 'e1e2u', e1e2u, ktype = jp_r8 )96 CALL iom_rstput( 0, 0, inum0, 'e1e2v', e1e2v, ktype = jp_r8 )97 98 CALL iom_close( inum0 )99 !100 IF( nn_timing == 1 ) CALL timing_stop('dom_wri_coordinate')101 !102 END SUBROUTINE dom_wri_coordinate103 104 41 105 42 SUBROUTINE dom_wri … … 112 49 !! diagnostic computation. 113 50 !! 114 !! ** Method : Write in a file all the arrays generated in routines 115 !! domhgr, domzgr, and dommsk. Note: the file contain depends on 116 !! the vertical coord. used (z-coord, partial steps, s-coord) 117 !! MOD(nmsh, 3) = 1 : 'mesh_mask.nc' file 118 !! = 2 : 'mesh.nc' and mask.nc' files 119 !! = 0 : 'mesh_hgr.nc', 'mesh_zgr.nc' and 120 !! 'mask.nc' files 121 !! For huge size domain, use option 2 or 3 depending on your 122 !! vertical coordinate. 123 !! 124 !! if nmsh <= 3: write full 3D arrays for e3[tuvw] and gdep[tuvw] 125 !! if 3 < nmsh <= 6: write full 3D arrays for e3[tuvw] and 2D arrays 126 !! corresponding to the depth of the bottom t- and w-points 127 !! if 6 < nmsh <= 9: write 2D arrays corresponding to the depth and the 128 !! thickness (e3[tw]_ps) of the bottom points 51 !! ** Method : create a file with all domain related arrays 129 52 !! 130 53 !! ** output file : meshmask.nc : domain size, horizontal grid-point position, 131 54 !! masks, depth and vertical scale factors 132 55 !!---------------------------------------------------------------------- 133 !! 134 INTEGER :: inum0 ! temprary units for 'mesh_mask.nc' file 135 INTEGER :: inum1 ! temprary units for 'mesh.nc' file 136 INTEGER :: inum2 ! temprary units for 'mask.nc' file 137 INTEGER :: inum3 ! temprary units for 'mesh_hgr.nc' file 138 INTEGER :: inum4 ! temprary units for 'mesh_zgr.nc' file 139 CHARACTER(len=21) :: clnam0 ! filename (mesh and mask informations) 140 CHARACTER(len=21) :: clnam1 ! filename (mesh informations) 141 CHARACTER(len=21) :: clnam2 ! filename (mask informations) 142 CHARACTER(len=21) :: clnam3 ! filename (horizontal mesh informations) 143 CHARACTER(len=21) :: clnam4 ! filename (vertical mesh informations) 56 INTEGER :: inum ! temprary units for 'mesh_mask.nc' file 57 CHARACTER(len=21) :: clnam ! filename (mesh and mask informations) 144 58 INTEGER :: ji, jj, jk ! dummy loop indices 145 ! ! workspaces 146 REAL(wp), POINTER, DIMENSION(:,: ) :: zprt, zprw 147 REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepu, zdepv 148 !!---------------------------------------------------------------------- 149 ! 150 IF( nn_timing == 1 ) CALL timing_start('dom_wri') 151 ! 152 CALL wrk_alloc( jpi, jpj, zprt, zprw ) 153 CALL wrk_alloc( jpi, jpj, jpk, zdepu, zdepv ) 59 INTEGER :: izco, izps, isco, icav 60 ! 61 REAL(wp), DIMENSION(jpi,jpj) :: zprt, zprw ! 2D workspace 62 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zdepu, zdepv ! 3D workspace 63 !!---------------------------------------------------------------------- 154 64 ! 155 65 IF(lwp) WRITE(numout,*) … … 157 67 IF(lwp) WRITE(numout,*) '~~~~~~~' 158 68 159 clnam0 = 'mesh_mask' ! filename (mesh and mask informations) 160 clnam1 = 'mesh' ! filename (mesh informations) 161 clnam2 = 'mask' ! filename (mask informations) 162 clnam3 = 'mesh_hgr' ! filename (horizontal mesh informations) 163 clnam4 = 'mesh_zgr' ! filename (vertical mesh informations) 164 165 SELECT CASE ( MOD(nmsh, 3) ) 166 ! ! ============================ 167 CASE ( 1 ) ! create 'mesh_mask.nc' file 168 ! ! ============================ 169 CALL iom_open( TRIM(clnam0), inum0, ldwrt = .TRUE., kiolib = jprstlib ) 170 inum2 = inum0 ! put all the informations 171 inum3 = inum0 ! in unit inum0 172 inum4 = inum0 173 174 ! ! ============================ 175 CASE ( 2 ) ! create 'mesh.nc' and 176 ! ! 'mask.nc' files 177 ! ! ============================ 178 CALL iom_open( TRIM(clnam1), inum1, ldwrt = .TRUE., kiolib = jprstlib ) 179 CALL iom_open( TRIM(clnam2), inum2, ldwrt = .TRUE., kiolib = jprstlib ) 180 inum3 = inum1 ! put mesh informations 181 inum4 = inum1 ! in unit inum1 182 ! ! ============================ 183 CASE ( 0 ) ! create 'mesh_hgr.nc' 184 ! ! 'mesh_zgr.nc' and 185 ! ! 'mask.nc' files 186 ! ! ============================ 187 CALL iom_open( TRIM(clnam2), inum2, ldwrt = .TRUE., kiolib = jprstlib ) 188 CALL iom_open( TRIM(clnam3), inum3, ldwrt = .TRUE., kiolib = jprstlib ) 189 CALL iom_open( TRIM(clnam4), inum4, ldwrt = .TRUE., kiolib = jprstlib ) 190 ! 191 END SELECT 192 193 ! ! masks (inum2) 194 CALL iom_rstput( 0, 0, inum2, 'tmask', tmask, ktype = jp_i1 ) ! ! land-sea mask 195 CALL iom_rstput( 0, 0, inum2, 'umask', umask, ktype = jp_i1 ) 196 CALL iom_rstput( 0, 0, inum2, 'vmask', vmask, ktype = jp_i1 ) 197 CALL iom_rstput( 0, 0, inum2, 'fmask', fmask, ktype = jp_i1 ) 69 clnam = 'mesh_mask' ! filename (mesh and mask informations) 70 71 ! ! ============================ 72 ! ! create 'mesh_mask.nc' file 73 ! ! ============================ 74 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. ) 75 ! 76 ! ! global domain size 77 CALL iom_rstput( 0, 0, inum, 'jpiglo', REAL( jpiglo, wp), ktype = jp_i4 ) 78 CALL iom_rstput( 0, 0, inum, 'jpjglo', REAL( jpjglo, wp), ktype = jp_i4 ) 79 CALL iom_rstput( 0, 0, inum, 'jpkglo', REAL( jpkglo, wp), ktype = jp_i4 ) 80 81 ! ! domain characteristics 82 CALL iom_rstput( 0, 0, inum, 'jperio', REAL( jperio, wp), ktype = jp_i4 ) 83 ! ! type of vertical coordinate 84 IF( ln_zco ) THEN ; izco = 1 ; ELSE ; izco = 0 ; ENDIF 85 IF( ln_zps ) THEN ; izps = 1 ; ELSE ; izps = 0 ; ENDIF 86 IF( ln_sco ) THEN ; isco = 1 ; ELSE ; isco = 0 ; ENDIF 87 CALL iom_rstput( 0, 0, inum, 'ln_zco' , REAL( izco, wp), ktype = jp_i4 ) 88 CALL iom_rstput( 0, 0, inum, 'ln_zps' , REAL( izps, wp), ktype = jp_i4 ) 89 CALL iom_rstput( 0, 0, inum, 'ln_sco' , REAL( isco, wp), ktype = jp_i4 ) 90 ! ! ocean cavities under iceshelves 91 IF( ln_isfcav ) THEN ; icav = 1 ; ELSE ; icav = 0 ; ENDIF 92 CALL iom_rstput( 0, 0, inum, 'ln_isfcav', REAL( icav, wp), ktype = jp_i4 ) 93 94 ! ! masks 95 CALL iom_rstput( 0, 0, inum, 'tmask', tmask, ktype = jp_i1 ) ! ! land-sea mask 96 CALL iom_rstput( 0, 0, inum, 'umask', umask, ktype = jp_i1 ) 97 CALL iom_rstput( 0, 0, inum, 'vmask', vmask, ktype = jp_i1 ) 98 CALL iom_rstput( 0, 0, inum, 'fmask', fmask, ktype = jp_i1 ) 198 99 199 100 CALL dom_uniq( zprw, 'T' ) 200 101 DO jj = 1, jpj 201 102 DO ji = 1, jpi 202 jk=mikt(ji,jj) 203 zprt(ji,jj) = tmask(ji,jj,jk) * zprw(ji,jj) ! ! unique point mask 103 zprt(ji,jj) = ssmask(ji,jj) * zprw(ji,jj) ! ! unique point mask 204 104 END DO 205 105 END DO ! ! unique point mask 206 CALL iom_rstput( 0, 0, inum 2, 'tmaskutil', zprt, ktype = jp_i1 )106 CALL iom_rstput( 0, 0, inum, 'tmaskutil', zprt, ktype = jp_i1 ) 207 107 CALL dom_uniq( zprw, 'U' ) 208 108 DO jj = 1, jpj 209 109 DO ji = 1, jpi 210 jk=miku(ji,jj) 211 zprt(ji,jj) = umask(ji,jj,jk) * zprw(ji,jj) ! ! unique point mask 110 zprt(ji,jj) = ssumask(ji,jj) * zprw(ji,jj) ! ! unique point mask 212 111 END DO 213 112 END DO 214 CALL iom_rstput( 0, 0, inum 2, 'umaskutil', zprt, ktype = jp_i1 )113 CALL iom_rstput( 0, 0, inum, 'umaskutil', zprt, ktype = jp_i1 ) 215 114 CALL dom_uniq( zprw, 'V' ) 216 115 DO jj = 1, jpj 217 116 DO ji = 1, jpi 218 jk=mikv(ji,jj) 219 zprt(ji,jj) = vmask(ji,jj,jk) * zprw(ji,jj) ! ! unique point mask 117 zprt(ji,jj) = ssvmask(ji,jj) * zprw(ji,jj) ! ! unique point mask 220 118 END DO 221 119 END DO 222 CALL iom_rstput( 0, 0, inum2, 'vmaskutil', zprt, ktype = jp_i1 ) 223 CALL dom_uniq( zprw, 'F' ) 224 DO jj = 1, jpj 225 DO ji = 1, jpi 226 jk=mikf(ji,jj) 227 zprt(ji,jj) = fmask(ji,jj,jk) * zprw(ji,jj) ! ! unique point mask 228 END DO 229 END DO 230 CALL iom_rstput( 0, 0, inum2, 'fmaskutil', zprt, ktype = jp_i1 ) 120 CALL iom_rstput( 0, 0, inum, 'vmaskutil', zprt, ktype = jp_i1 ) 121 !!gm ssfmask has been removed ==>> find another solution to defined fmaskutil 122 !! Here we just remove the output of fmaskutil. 123 ! CALL dom_uniq( zprw, 'F' ) 124 ! DO jj = 1, jpj 125 ! DO ji = 1, jpi 126 ! zprt(ji,jj) = ssfmask(ji,jj) * zprw(ji,jj) ! ! unique point mask 127 ! END DO 128 ! END DO 129 ! CALL iom_rstput( 0, 0, inum, 'fmaskutil', zprt, ktype = jp_i1 ) 130 !!gm 231 131 232 132 ! ! horizontal mesh (inum3) 233 CALL iom_rstput( 0, 0, inum 3, 'glamt', glamt, ktype = jp_r8 ) ! ! latitude234 CALL iom_rstput( 0, 0, inum 3, 'glamu', glamu, ktype = jp_r8 )235 CALL iom_rstput( 0, 0, inum 3, 'glamv', glamv, ktype = jp_r8 )236 CALL iom_rstput( 0, 0, inum 3, 'glamf', glamf, ktype = jp_r8 )237 238 CALL iom_rstput( 0, 0, inum 3, 'gphit', gphit, ktype = jp_r8 ) ! ! longitude239 CALL iom_rstput( 0, 0, inum 3, 'gphiu', gphiu, ktype = jp_r8 )240 CALL iom_rstput( 0, 0, inum 3, 'gphiv', gphiv, ktype = jp_r8 )241 CALL iom_rstput( 0, 0, inum 3, 'gphif', gphif, ktype = jp_r8 )242 243 CALL iom_rstput( 0, 0, inum 3, 'e1t', e1t, ktype = jp_r8 ) ! ! e1 scale factors244 CALL iom_rstput( 0, 0, inum 3, 'e1u', e1u, ktype = jp_r8 )245 CALL iom_rstput( 0, 0, inum 3, 'e1v', e1v, ktype = jp_r8 )246 CALL iom_rstput( 0, 0, inum 3, 'e1f', e1f, ktype = jp_r8 )247 248 CALL iom_rstput( 0, 0, inum 3, 'e2t', e2t, ktype = jp_r8 ) ! ! e2 scale factors249 CALL iom_rstput( 0, 0, inum 3, 'e2u', e2u, ktype = jp_r8 )250 CALL iom_rstput( 0, 0, inum 3, 'e2v', e2v, ktype = jp_r8 )251 CALL iom_rstput( 0, 0, inum 3, 'e2f', e2f, ktype = jp_r8 )252 253 CALL iom_rstput( 0, 0, inum 3, 'ff_f', ff_f, ktype = jp_r8 )! ! coriolis factor254 CALL iom_rstput( 0, 0, inum 3, 'ff_t', ff_t, ktype = jp_r8 ) ! ! coriolis factor133 CALL iom_rstput( 0, 0, inum, 'glamt', glamt, ktype = jp_r8 ) ! ! latitude 134 CALL iom_rstput( 0, 0, inum, 'glamu', glamu, ktype = jp_r8 ) 135 CALL iom_rstput( 0, 0, inum, 'glamv', glamv, ktype = jp_r8 ) 136 CALL iom_rstput( 0, 0, inum, 'glamf', glamf, ktype = jp_r8 ) 137 138 CALL iom_rstput( 0, 0, inum, 'gphit', gphit, ktype = jp_r8 ) ! ! longitude 139 CALL iom_rstput( 0, 0, inum, 'gphiu', gphiu, ktype = jp_r8 ) 140 CALL iom_rstput( 0, 0, inum, 'gphiv', gphiv, ktype = jp_r8 ) 141 CALL iom_rstput( 0, 0, inum, 'gphif', gphif, ktype = jp_r8 ) 142 143 CALL iom_rstput( 0, 0, inum, 'e1t', e1t, ktype = jp_r8 ) ! ! e1 scale factors 144 CALL iom_rstput( 0, 0, inum, 'e1u', e1u, ktype = jp_r8 ) 145 CALL iom_rstput( 0, 0, inum, 'e1v', e1v, ktype = jp_r8 ) 146 CALL iom_rstput( 0, 0, inum, 'e1f', e1f, ktype = jp_r8 ) 147 148 CALL iom_rstput( 0, 0, inum, 'e2t', e2t, ktype = jp_r8 ) ! ! e2 scale factors 149 CALL iom_rstput( 0, 0, inum, 'e2u', e2u, ktype = jp_r8 ) 150 CALL iom_rstput( 0, 0, inum, 'e2v', e2v, ktype = jp_r8 ) 151 CALL iom_rstput( 0, 0, inum, 'e2f', e2f, ktype = jp_r8 ) 152 153 CALL iom_rstput( 0, 0, inum, 'ff_f', ff_f, ktype = jp_r8 ) ! ! coriolis factor 154 CALL iom_rstput( 0, 0, inum, 'ff_t', ff_t, ktype = jp_r8 ) 255 155 256 156 ! note that mbkt is set to 1 over land ==> use surface tmask 257 157 zprt(:,:) = ssmask(:,:) * REAL( mbkt(:,:) , wp ) 258 CALL iom_rstput( 0, 0, inum 4, 'mbathy', zprt, ktype = jp_i2) ! ! nb of ocean T-points158 CALL iom_rstput( 0, 0, inum, 'mbathy', zprt, ktype = jp_i4 ) ! ! nb of ocean T-points 259 159 zprt(:,:) = ssmask(:,:) * REAL( mikt(:,:) , wp ) 260 CALL iom_rstput( 0, 0, inum 4, 'misf', zprt, ktype = jp_i2) ! ! nb of ocean T-points160 CALL iom_rstput( 0, 0, inum, 'misf', zprt, ktype = jp_i4 ) ! ! nb of ocean T-points 261 161 zprt(:,:) = ssmask(:,:) * REAL( risfdep(:,:) , wp ) 262 CALL iom_rstput( 0, 0, inum4, 'isfdraft', zprt, ktype = jp_r8 ) ! ! nb of ocean T-points 263 264 IF( ln_sco ) THEN ! s-coordinate 265 CALL iom_rstput( 0, 0, inum4, 'hbatt', hbatt ) 266 CALL iom_rstput( 0, 0, inum4, 'hbatu', hbatu ) 267 CALL iom_rstput( 0, 0, inum4, 'hbatv', hbatv ) 268 CALL iom_rstput( 0, 0, inum4, 'hbatf', hbatf ) 269 ! 270 CALL iom_rstput( 0, 0, inum4, 'gsigt', gsigt ) ! ! scaling coef. 271 CALL iom_rstput( 0, 0, inum4, 'gsigw', gsigw ) 272 CALL iom_rstput( 0, 0, inum4, 'gsi3w', gsi3w ) 273 CALL iom_rstput( 0, 0, inum4, 'esigt', esigt ) 274 CALL iom_rstput( 0, 0, inum4, 'esigw', esigw ) 275 ! 276 CALL iom_rstput( 0, 0, inum4, 'e3t_0', e3t_0 ) ! ! scale factors 277 CALL iom_rstput( 0, 0, inum4, 'e3u_0', e3u_0 ) 278 CALL iom_rstput( 0, 0, inum4, 'e3v_0', e3v_0 ) 279 CALL iom_rstput( 0, 0, inum4, 'e3w_0', e3w_0 ) 280 ! 281 CALL iom_rstput( 0, 0, inum4, 'gdept_1d' , gdept_1d ) ! ! stretched system 282 CALL iom_rstput( 0, 0, inum4, 'gdepw_1d' , gdepw_1d ) 283 CALL iom_rstput( 0, 0, inum4, 'gdept_0', gdept_0, ktype = jp_r8 ) 284 CALL iom_rstput( 0, 0, inum4, 'gdepw_0', gdepw_0, ktype = jp_r8 ) 162 CALL iom_rstput( 0, 0, inum, 'isfdraft', zprt, ktype = jp_r8 ) ! ! nb of ocean T-points 163 ! ! vertical mesh 164 CALL iom_rstput( 0, 0, inum, 'e3t_0', e3t_0, ktype = jp_r8 ) ! ! scale factors 165 CALL iom_rstput( 0, 0, inum, 'e3u_0', e3u_0, ktype = jp_r8 ) 166 CALL iom_rstput( 0, 0, inum, 'e3v_0', e3v_0, ktype = jp_r8 ) 167 CALL iom_rstput( 0, 0, inum, 'e3w_0', e3w_0, ktype = jp_r8 ) 168 ! 169 CALL iom_rstput( 0, 0, inum, 'gdept_1d' , gdept_1d , ktype = jp_r8 ) ! stretched system 170 CALL iom_rstput( 0, 0, inum, 'gdepw_1d' , gdepw_1d , ktype = jp_r8 ) 171 CALL iom_rstput( 0, 0, inum, 'gdept_0' , gdept_0 , ktype = jp_r8 ) 172 CALL iom_rstput( 0, 0, inum, 'gdepw_0' , gdepw_0 , ktype = jp_r8 ) 173 ! 174 IF( ln_sco ) THEN ! s-coordinate stiffness 285 175 CALL dom_stiff( zprt ) 286 CALL iom_rstput( 0, 0, inum 4, 'stiffness', zprt ) !! Max. grid stiffness ratio176 CALL iom_rstput( 0, 0, inum, 'stiffness', zprt ) ! Max. grid stiffness ratio 287 177 ENDIF 288 289 IF( ln_zps ) THEN ! z-coordinate - partial steps 290 ! 291 IF( nmsh <= 6 ) THEN ! ! 3D vertical scale factors 292 CALL iom_rstput( 0, 0, inum4, 'e3t_0', e3t_0 ) 293 CALL iom_rstput( 0, 0, inum4, 'e3u_0', e3u_0 ) 294 CALL iom_rstput( 0, 0, inum4, 'e3v_0', e3v_0 ) 295 CALL iom_rstput( 0, 0, inum4, 'e3w_0', e3w_0 ) 296 ELSE ! ! 2D masked bottom ocean scale factors 297 DO jj = 1,jpj 298 DO ji = 1,jpi 299 e3tp(ji,jj) = e3t_0(ji,jj,mbkt(ji,jj)) * ssmask(ji,jj) 300 e3wp(ji,jj) = e3w_0(ji,jj,mbkt(ji,jj)) * ssmask(ji,jj) 301 END DO 302 END DO 303 CALL iom_rstput( 0, 0, inum4, 'e3t_ps', e3tp ) 304 CALL iom_rstput( 0, 0, inum4, 'e3w_ps', e3wp ) 305 END IF 306 ! 307 IF( nmsh <= 3 ) THEN ! ! 3D depth 308 CALL iom_rstput( 0, 0, inum4, 'gdept_0', gdept_0, ktype = jp_r8 ) 309 DO jk = 1,jpk 310 DO jj = 1, jpjm1 311 DO ji = 1, jpim1 ! vector opt. 312 zdepu(ji,jj,jk) = MIN( gdept_0(ji,jj,jk) , gdept_0(ji+1,jj ,jk) ) 313 zdepv(ji,jj,jk) = MIN( gdept_0(ji,jj,jk) , gdept_0(ji ,jj+1,jk) ) 314 END DO 315 END DO 316 END DO 317 CALL lbc_lnk( zdepu, 'U', 1. ) ; CALL lbc_lnk( zdepv, 'V', 1. ) 318 CALL iom_rstput( 0, 0, inum4, 'gdepu', zdepu, ktype = jp_r8 ) 319 CALL iom_rstput( 0, 0, inum4, 'gdepv', zdepv, ktype = jp_r8 ) 320 CALL iom_rstput( 0, 0, inum4, 'gdepw_0', gdepw_0, ktype = jp_r8 ) 321 ELSE ! ! 2D bottom depth 322 DO jj = 1,jpj 323 DO ji = 1,jpi 324 zprt(ji,jj) = gdept_0(ji,jj,mbkt(ji,jj) ) * ssmask(ji,jj) 325 zprw(ji,jj) = gdepw_0(ji,jj,mbkt(ji,jj)+1) * ssmask(ji,jj) 326 END DO 327 END DO 328 CALL iom_rstput( 0, 0, inum4, 'hdept', zprt, ktype = jp_r8 ) 329 CALL iom_rstput( 0, 0, inum4, 'hdepw', zprw, ktype = jp_r8 ) 330 ENDIF 331 ! 332 CALL iom_rstput( 0, 0, inum4, 'gdept_1d', gdept_1d ) ! ! reference z-coord. 333 CALL iom_rstput( 0, 0, inum4, 'gdepw_1d', gdepw_1d ) 334 CALL iom_rstput( 0, 0, inum4, 'e3t_1d' , e3t_1d ) 335 CALL iom_rstput( 0, 0, inum4, 'e3w_1d' , e3w_1d ) 336 ENDIF 337 338 IF( ln_zco ) THEN 339 ! ! z-coordinate - full steps 340 CALL iom_rstput( 0, 0, inum4, 'gdept_1d', gdept_1d ) ! ! depth 341 CALL iom_rstput( 0, 0, inum4, 'gdepw_1d', gdepw_1d ) 342 CALL iom_rstput( 0, 0, inum4, 'e3t_1d' , e3t_1d ) ! ! scale factors 343 CALL iom_rstput( 0, 0, inum4, 'e3w_1d' , e3w_1d ) 344 ENDIF 178 ! 179 ! IF( ll_wd ) CALL iom_rstput( 0, 0, inum, 'ht_0' , ht_0 , ktype = jp_r8 ) 180 345 181 ! ! ============================ 346 !! close the files182 CALL iom_close( inum ) ! close the files 347 183 ! ! ============================ 348 SELECT CASE ( MOD(nmsh, 3) )349 CASE ( 1 )350 CALL iom_close( inum0 )351 CASE ( 2 )352 CALL iom_close( inum1 )353 CALL iom_close( inum2 )354 CASE ( 0 )355 CALL iom_close( inum2 )356 CALL iom_close( inum3 )357 CALL iom_close( inum4 )358 END SELECT359 !360 CALL wrk_dealloc( jpi, jpj, zprt, zprw )361 CALL wrk_dealloc( jpi, jpj, jpk, zdepu, zdepv )362 !363 IF( nn_timing == 1 ) CALL timing_stop('dom_wri')364 !365 184 END SUBROUTINE dom_wri 366 185 … … 375 194 !! 2) check which elements have been changed 376 195 !!---------------------------------------------------------------------- 377 !378 196 CHARACTER(len=1) , INTENT(in ) :: cdgrd ! 379 197 REAL(wp), DIMENSION(:,:), INTENT(inout) :: puniq ! … … 382 200 INTEGER :: ji ! dummy loop indices 383 201 LOGICAL, DIMENSION(SIZE(puniq,1),SIZE(puniq,2),1) :: lldbl ! store whether each point is unique or not 384 REAL(wp), POINTER, DIMENSION(:,:) :: ztstref 385 !!---------------------------------------------------------------------- 386 ! 387 IF( nn_timing == 1 ) CALL timing_start('dom_uniq') 388 ! 389 CALL wrk_alloc( jpi, jpj, ztstref ) 202 REAL(wp), DIMENSION(jpi,jpj) :: ztstref 203 !!---------------------------------------------------------------------- 390 204 ! 391 205 ! build an array with different values for each element … … 396 210 ! 397 211 puniq(:,:) = ztstref(:,:) ! default definition 398 CALL lbc_lnk( puniq, cdgrd, 1. ) ! apply boundary conditions212 CALL lbc_lnk( 'domwri', puniq, cdgrd, 1. ) ! apply boundary conditions 399 213 lldbl(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed 400 214 ! … … 402 216 ! fill only the inner part of the cpu with llbl converted into real 403 217 puniq(nldi:nlei,nldj:nlej) = REAL( COUNT( lldbl(nldi:nlei,nldj:nlej,:), dim = 3 ) , wp ) 404 !405 CALL wrk_dealloc( jpi, jpj, ztstref )406 !407 IF( nn_timing == 1 ) CALL timing_stop('dom_uniq')408 218 ! 409 219 END SUBROUTINE dom_uniq … … 461 271 END DO 462 272 END DO 463 CALL lbc_lnk( zx1, 'T', 1. )273 CALL lbc_lnk( 'domwri', zx1, 'T', 1. ) 464 274 ! 465 275 IF( PRESENT( px1 ) ) px1 = zx1 … … 467 277 zrxmax = MAXVAL( zx1 ) 468 278 ! 469 IF( lk_mpp ) CALL mpp_max(zrxmax ) ! max over the global domain279 CALL mpp_max( 'domwri', zrxmax ) ! max over the global domain 470 280 ! 471 281 IF(lwp) THEN -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domzgr.F90
r10725 r10727 17 17 !! 3.4 ! 2012-08 (J. Siddorn) added Siddorn and Furner stretching function 18 18 !! 3.4 ! 2012-12 (R. Bourdalle-Badie and G. Reffray) modify C1D case 19 !! 3.6 ! 2014-11 (P. Mathiot and C. Harris) add ice shelf capabilitye 19 !! 3.6 ! 2014-11 (P. Mathiot and C. Harris) add ice shelf capabilitye 20 20 !! 3.? ! 2015-11 (H. Liu) Modifications for Wetting/Drying 21 21 !!---------------------------------------------------------------------- … … 37 37 USE oce ! ocean variables 38 38 USE dom_oce ! ocean domain 39 USE closea ! closed seas39 ! USE closea ! closed seas 40 40 ! 41 41 USE in_out_manager ! I/O manager … … 45 45 USE wrk_nemo ! Memory allocation 46 46 USE timing ! Timing 47 USE dombat 47 48 48 49 IMPLICIT NONE … … 59 60 REAL(wp) :: rn_rmax ! maximum cut-off r-value allowed (0<rn_rmax<1) 60 61 REAL(wp) :: rn_hc ! Critical depth for transition from sigma to stretched coordinates 62 INTEGER , PUBLIC :: ntopo !: = 0/1 ,compute/read the bathymetry file 63 REAL(wp), PUBLIC :: e3zps_min !: miminum thickness for partial steps (meters) 64 REAL(wp), PUBLIC :: e3zps_rat !: minimum thickness ration for partial steps 65 INTEGER, PUBLIC :: nperio !: type of lateral boundary condition 66 61 67 ! Song and Haidvogel 1994 stretching parameters 62 68 REAL(wp) :: rn_theta ! surface control parameter (0<=rn_theta<=20) … … 115 121 !!---------------------------------------------------------------------- 116 122 ! 117 IF( nn_timing == 1 ) CALL timing_start('dom_zgr')123 ! IF( nn_timing == 1 ) CALL timing_start('dom_zgr') 118 124 ! 119 125 REWIND( numnam_ref ) ! Namelist namzgr in reference namelist : Vertical coordinate … … 183 189 ENDIF 184 190 ! 185 IF( nn_timing == 1 ) CALL timing_stop('dom_zgr')191 ! IF( nn_timing == 1 ) CALL timing_stop('dom_zgr') 186 192 ! 187 193 END SUBROUTINE dom_zgr … … 217 223 !!---------------------------------------------------------------------- 218 224 ! 219 IF( nn_timing == 1 ) CALL timing_start('zgr_z')225 ! IF( nn_timing == 1 ) CALL timing_start('zgr_z') 220 226 ! 221 227 ! Set variables from parameters … … 349 355 END DO 350 356 ! 351 IF( nn_timing == 1 ) CALL timing_stop('zgr_z')357 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_z') 352 358 ! 353 359 END SUBROUTINE zgr_z … … 395 401 !!---------------------------------------------------------------------- 396 402 ! 397 IF( nn_timing == 1 ) CALL timing_start('zgr_bat')403 ! IF( nn_timing == 1 ) CALL timing_start('zgr_bat') 398 404 ! 399 405 IF(lwp) WRITE(numout,*) … … 516 522 ! 517 523 ! ! ================ ! 518 ELSEIF( ntopo == 1 ) THEN ! read in file ! (over the local domain)524 ELSEIF( ntopo == 1 .OR. ntopo ==2 ) THEN ! read in file ! (over the local domain) 519 525 ! ! ================ ! 520 526 ! … … 554 560 ENDIF 555 561 IF( ln_zps .OR. ln_sco ) THEN ! zps or sco : read meter bathymetry 556 CALL iom_open ( 'bathy_meter.nc', inum ) 557 IF ( ln_isfcav ) THEN 558 CALL iom_get ( inum, jpdom_data, 'Bathymetry_isf', bathy, lrowattr=.false. ) 562 #if defined key_agrif 563 IF (agrif_root()) THEN 564 #endif 565 IF( ntopo == 1) THEN 566 CALL iom_open ( 'bathy_meter.nc', inum ) 567 IF ( ln_isfcav ) THEN 568 CALL iom_get ( inum, jpdom_data, 'Bathymetry_isf', bathy, lrowattr=.false. ) 569 ELSE 570 CALL iom_get ( inum, jpdom_data, 'Bathymetry' , bathy, lrowattr=ln_use_jattr ) 571 END IF 572 CALL iom_close( inum ) 559 573 ELSE 560 CALL iom_get ( inum, jpdom_data, 'Bathymetry' , bathy, lrowattr=ln_use_jattr ) 561 END IF 562 CALL iom_close( inum ) 574 CALL dom_bat 575 ENDIF 576 #if defined key_agrif 577 ELSE 578 IF( ntopo == 1) THEN 579 CALL agrif_create_bathy_meter() 580 ELSE 581 CALL dom_bat 582 ENDIF 583 ENDIF 584 #endif 563 585 ! 564 586 ! initialisation isf variables … … 611 633 ENDIF 612 634 ! 613 IF( nn_closea == 0 ) CALL clo_bat( bathy, mbathy ) !== NO closed seas or lakes ==!635 ! IF( nn_closea == 0 ) CALL clo_bat( bathy, mbathy ) !== NO closed seas or lakes ==! 614 636 ! 615 637 IF ( .not. ln_sco ) THEN !== set a minimum depth ==! … … 624 646 ENDIF 625 647 ! 626 IF( nn_timing == 1 ) CALL timing_stop('zgr_bat')648 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_bat') 627 649 ! 628 650 END SUBROUTINE zgr_bat … … 708 730 !!---------------------------------------------------------------------- 709 731 ! 710 IF( nn_timing == 1 ) CALL timing_start('zgr_bat_ctl')732 ! IF( nn_timing == 1 ) CALL timing_start('zgr_bat_ctl') 711 733 ! 712 734 CALL wrk_alloc( jpi, jpj, zbathy ) … … 738 760 END DO 739 761 END DO 740 IF( lk_mpp ) CALL mpp_sum( icompt )762 ! IF( lk_mpp ) CALL mpp_sum( icompt ) 741 763 IF( icompt == 0 ) THEN 742 764 IF(lwp) WRITE(numout,*)' no isolated ocean grid points' … … 746 768 IF( lk_mpp ) THEN 747 769 zbathy(:,:) = FLOAT( mbathy(:,:) ) 748 CALL lbc_lnk( zbathy, 'T', 1._wp )770 CALL lbc_lnk( 'toto',zbathy, 'T', 1._wp ) 749 771 mbathy(:,:) = INT( zbathy(:,:) ) 750 772 ENDIF … … 784 806 ! ... mono- or macro-tasking: T-point, >0, 2D array, no slab 785 807 zbathy(:,:) = FLOAT( mbathy(:,:) ) 786 CALL lbc_lnk( zbathy, 'T', 1._wp )808 CALL lbc_lnk( 'toto',zbathy, 'T', 1._wp ) 787 809 mbathy(:,:) = INT( zbathy(:,:) ) 788 810 ENDIF … … 805 827 CALL wrk_dealloc( jpi, jpj, zbathy ) 806 828 ! 807 IF( nn_timing == 1 ) CALL timing_stop('zgr_bat_ctl')829 !! IF( nn_timing == 1 ) CALL timing_stop('zgr_bat_ctl') 808 830 ! 809 831 END SUBROUTINE zgr_bat_ctl … … 826 848 !!---------------------------------------------------------------------- 827 849 ! 828 IF( nn_timing == 1 ) CALL timing_start('zgr_bot_level')850 ! IF( nn_timing == 1 ) CALL timing_start('zgr_bot_level') 829 851 ! 830 852 CALL wrk_alloc( jpi, jpj, zmbk ) … … 844 866 END DO 845 867 ! converte into REAL to use lbc_lnk ; impose a min value of 1 as a zero can be set in lbclnk 846 zmbk(:,:) = REAL( mbku(:,:), wp ) ; CALL lbc_lnk( zmbk,'U',1.) ; mbku (:,:) = MAX( INT( zmbk(:,:) ), 1 )847 zmbk(:,:) = REAL( mbkv(:,:), wp ) ; CALL lbc_lnk( zmbk,'V',1.) ; mbkv (:,:) = MAX( INT( zmbk(:,:) ), 1 )868 zmbk(:,:) = REAL( mbku(:,:), wp ) ; CALL lbc_lnk('toto',zmbk,'U',1.) ; mbku (:,:) = MAX( INT( zmbk(:,:) ), 1 ) 869 zmbk(:,:) = REAL( mbkv(:,:), wp ) ; CALL lbc_lnk('toto',zmbk,'V',1.) ; mbkv (:,:) = MAX( INT( zmbk(:,:) ), 1 ) 848 870 ! 849 871 CALL wrk_dealloc( jpi, jpj, zmbk ) 850 872 ! 851 IF( nn_timing == 1 ) CALL timing_stop('zgr_bot_level')873 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_bot_level') 852 874 ! 853 875 END SUBROUTINE zgr_bot_level … … 870 892 !!---------------------------------------------------------------------- 871 893 ! 872 IF( nn_timing == 1 ) CALL timing_start('zgr_top_level')894 ! IF( nn_timing == 1 ) CALL timing_start('zgr_top_level') 873 895 ! 874 896 CALL wrk_alloc( jpi, jpj, zmik ) … … 889 911 890 912 ! converte into REAL to use lbc_lnk ; impose a min value of 1 as a zero can be set in lbclnk 891 zmik(:,:) = REAL( miku(:,:), wp ) ; CALL lbc_lnk( zmik,'U',1.) ; miku (:,:) = MAX( INT( zmik(:,:) ), 1 )892 zmik(:,:) = REAL( mikv(:,:), wp ) ; CALL lbc_lnk( zmik,'V',1.) ; mikv (:,:) = MAX( INT( zmik(:,:) ), 1 )893 zmik(:,:) = REAL( mikf(:,:), wp ) ; CALL lbc_lnk( zmik,'F',1.) ; mikf (:,:) = MAX( INT( zmik(:,:) ), 1 )913 zmik(:,:) = REAL( miku(:,:), wp ) ; CALL lbc_lnk('toto',zmik,'U',1.) ; miku (:,:) = MAX( INT( zmik(:,:) ), 1 ) 914 zmik(:,:) = REAL( mikv(:,:), wp ) ; CALL lbc_lnk('toto',zmik,'V',1.) ; mikv (:,:) = MAX( INT( zmik(:,:) ), 1 ) 915 zmik(:,:) = REAL( mikf(:,:), wp ) ; CALL lbc_lnk('toto',zmik,'F',1.) ; mikf (:,:) = MAX( INT( zmik(:,:) ), 1 ) 894 916 ! 895 917 CALL wrk_dealloc( jpi, jpj, zmik ) 896 918 ! 897 IF( nn_timing == 1 ) CALL timing_stop('zgr_top_level')919 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_top_level') 898 920 ! 899 921 END SUBROUTINE zgr_top_level … … 911 933 !!---------------------------------------------------------------------- 912 934 ! 913 IF( nn_timing == 1 ) CALL timing_start('zgr_zco')935 ! IF( nn_timing == 1 ) CALL timing_start('zgr_zco') 914 936 ! 915 937 DO jk = 1, jpk … … 926 948 END DO 927 949 ! 928 IF( nn_timing == 1 ) CALL timing_stop('zgr_zco')950 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_zco') 929 951 ! 930 952 END SUBROUTINE zgr_zco … … 985 1007 !!--------------------------------------------------------------------- 986 1008 ! 987 IF( nn_timing == 1 ) CALL timing_start('zgr_zps')1009 ! IF( nn_timing == 1 ) CALL timing_start('zgr_zps') 988 1010 ! 989 1011 CALL wrk_alloc( jpi,jpj,jpk, zprt ) … … 1118 1140 END IF 1119 1141 1120 CALL lbc_lnk( e3u_0 , 'U', 1._wp ) ; CALL lbc_lnk(e3uw_0, 'U', 1._wp ) ! lateral boundary conditions1121 CALL lbc_lnk( e3v_0 , 'V', 1._wp ) ; CALL lbc_lnk(e3vw_0, 'V', 1._wp )1142 CALL lbc_lnk('toto', e3u_0 , 'U', 1._wp ) ; CALL lbc_lnk('toto', e3uw_0, 'U', 1._wp ) ! lateral boundary conditions 1143 CALL lbc_lnk( 'toto',e3v_0 , 'V', 1._wp ) ; CALL lbc_lnk('toto', e3vw_0, 'V', 1._wp ) 1122 1144 ! 1123 1145 … … 1140 1162 END DO 1141 1163 END DO 1142 CALL lbc_lnk( e3f_0, 'F', 1._wp ) ! Lateral boundary conditions1164 CALL lbc_lnk('toto', e3f_0, 'F', 1._wp ) ! Lateral boundary conditions 1143 1165 ! 1144 1166 DO jk = 1, jpk ! set to z-scale factor if zero (i.e. along closed boundaries) … … 1183 1205 CALL wrk_dealloc( jpi,jpj,jpk, zprt ) 1184 1206 ! 1185 IF( nn_timing == 1 ) CALL timing_stop('zgr_zps')1207 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_zps') 1186 1208 ! 1187 1209 END SUBROUTINE zgr_zps … … 1217 1239 !!--------------------------------------------------------------------- 1218 1240 ! 1219 IF( nn_timing == 1 ) CALL timing_start('zgr_isf')1241 !! IF( nn_timing == 1 ) CALL timing_start('zgr_isf') 1220 1242 ! 1221 1243 CALL wrk_alloc( jpi,jpj, zbathy, zmask, zrisfdep) … … 1264 1286 IF( lk_mpp ) THEN 1265 1287 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1266 CALL lbc_lnk( zbathy, 'T', 1. )1288 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1267 1289 misfdep(:,:) = INT( zbathy(:,:) ) 1268 1290 1269 CALL lbc_lnk( risfdep,'T', 1. )1270 CALL lbc_lnk( bathy, 'T', 1. )1291 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1292 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1271 1293 1272 1294 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1273 CALL lbc_lnk( zbathy, 'T', 1. )1295 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1274 1296 mbathy(:,:) = INT( zbathy(:,:) ) 1275 1297 ENDIF … … 1385 1407 IF( lk_mpp ) THEN 1386 1408 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1387 CALL lbc_lnk( zbathy, 'T', 1. )1409 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1388 1410 misfdep(:,:) = INT( zbathy(:,:) ) 1389 1411 1390 CALL lbc_lnk( risfdep,'T', 1. )1391 CALL lbc_lnk( bathy, 'T', 1. )1412 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1413 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1392 1414 1393 1415 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1394 CALL lbc_lnk( zbathy, 'T', 1. )1416 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1395 1417 mbathy(:,:) = INT( zbathy(:,:) ) 1396 1418 ENDIF … … 1422 1444 IF( lk_mpp ) THEN 1423 1445 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1424 CALL lbc_lnk( zbathy, 'T', 1. )1446 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1425 1447 misfdep(:,:) = INT( zbathy(:,:) ) 1426 1448 1427 CALL lbc_lnk( risfdep,'T', 1. )1428 CALL lbc_lnk( bathy, 'T', 1. )1449 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1450 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1429 1451 1430 1452 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1431 CALL lbc_lnk( zbathy, 'T', 1. )1453 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1432 1454 mbathy(:,:) = INT( zbathy(:,:) ) 1433 1455 ENDIF … … 1459 1481 IF( lk_mpp ) THEN 1460 1482 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1461 CALL lbc_lnk( zbathy, 'T', 1. )1483 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1462 1484 misfdep(:,:) = INT( zbathy(:,:) ) 1463 1485 1464 CALL lbc_lnk( risfdep,'T', 1. )1465 CALL lbc_lnk( bathy, 'T', 1. )1486 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1487 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1466 1488 1467 1489 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1468 CALL lbc_lnk( zbathy, 'T', 1. )1490 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1469 1491 mbathy(:,:) = INT( zbathy(:,:) ) 1470 1492 ENDIF … … 1496 1518 IF( lk_mpp ) THEN 1497 1519 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1498 CALL lbc_lnk( zbathy, 'T', 1. )1520 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1499 1521 misfdep(:,:) = INT( zbathy(:,:) ) 1500 1522 1501 CALL lbc_lnk( risfdep,'T', 1. )1502 CALL lbc_lnk( bathy, 'T', 1. )1523 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1524 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1503 1525 1504 1526 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1505 CALL lbc_lnk( zbathy, 'T', 1. )1527 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1506 1528 mbathy(:,:) = INT( zbathy(:,:) ) 1507 1529 ENDIF … … 1533 1555 IF( lk_mpp ) THEN 1534 1556 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1535 CALL lbc_lnk( zbathy, 'T', 1. )1557 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1536 1558 misfdep(:,:) = INT( zbathy(:,:) ) 1537 1559 1538 CALL lbc_lnk( risfdep,'T', 1. )1539 CALL lbc_lnk( bathy, 'T', 1. )1560 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1561 CALL lbc_lnk('toto', bathy, 'T', 1. ) 1540 1562 1541 1563 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1542 CALL lbc_lnk( zbathy, 'T', 1. )1564 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1543 1565 mbathy(:,:) = INT( zbathy(:,:) ) 1544 1566 ENDIF … … 1565 1587 IF( lk_mpp ) THEN 1566 1588 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1567 CALL lbc_lnk( zbathy, 'T', 1. )1589 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1568 1590 misfdep(:,:) = INT( zbathy(:,:) ) 1569 1591 1570 CALL lbc_lnk( risfdep,'T', 1. )1571 CALL lbc_lnk( bathy, 'T', 1. )1592 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1593 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1572 1594 1573 1595 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1574 CALL lbc_lnk( zbathy, 'T', 1. )1596 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1575 1597 mbathy(:,:) = INT( zbathy(:,:) ) 1576 1598 ENDIF … … 1601 1623 IF( lk_mpp ) THEN 1602 1624 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1603 CALL lbc_lnk( zbathy, 'T', 1. )1625 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1604 1626 misfdep(:,:) = INT( zbathy(:,:) ) 1605 1627 1606 CALL lbc_lnk( risfdep, 'T', 1. )1607 CALL lbc_lnk( bathy, 'T', 1. )1628 CALL lbc_lnk( 'toto',risfdep, 'T', 1. ) 1629 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1608 1630 1609 1631 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1610 CALL lbc_lnk( zbathy, 'T', 1. )1632 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1611 1633 mbathy(:,:) = INT( zbathy(:,:) ) 1612 1634 ENDIF … … 1634 1656 IF( lk_mpp ) THEN 1635 1657 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1636 CALL lbc_lnk( zbathy, 'T', 1. )1658 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1637 1659 misfdep(:,:) = INT( zbathy(:,:) ) 1638 1660 1639 CALL lbc_lnk( risfdep, 'T', 1. )1640 CALL lbc_lnk( bathy, 'T', 1. )1661 CALL lbc_lnk( 'toto',risfdep, 'T', 1. ) 1662 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1641 1663 1642 1664 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1643 CALL lbc_lnk( zbathy, 'T', 1. )1665 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1644 1666 mbathy(:,:) = INT( zbathy(:,:) ) 1645 1667 ENDIF … … 1654 1676 IF( lk_mpp ) THEN 1655 1677 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1656 CALL lbc_lnk( zbathy, 'T', 1. )1678 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1657 1679 misfdep(:,:) = INT( zbathy(:,:) ) 1658 1680 1659 CALL lbc_lnk( risfdep, 'T', 1. )1660 CALL lbc_lnk( bathy, 'T', 1. )1681 CALL lbc_lnk('toto', risfdep, 'T', 1. ) 1682 CALL lbc_lnk('toto', bathy, 'T', 1. ) 1661 1683 1662 1684 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1663 CALL lbc_lnk( zbathy, 'T', 1. )1685 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1664 1686 mbathy(:,:) = INT( zbathy(:,:) ) 1665 1687 ENDIF … … 1674 1696 IF( lk_mpp ) THEN 1675 1697 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1676 CALL lbc_lnk( zbathy, 'T', 1. )1698 CALL lbc_lnk('toto', zbathy, 'T', 1. ) 1677 1699 misfdep(:,:) = INT( zbathy(:,:) ) 1678 1700 1679 CALL lbc_lnk( risfdep,'T', 1. )1680 CALL lbc_lnk( bathy, 'T', 1. )1701 CALL lbc_lnk('toto', risfdep,'T', 1. ) 1702 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1681 1703 1682 1704 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1683 CALL lbc_lnk( zbathy, 'T', 1. )1705 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1684 1706 mbathy(:,:) = INT( zbathy(:,:) ) 1685 1707 ENDIF … … 1694 1716 IF( lk_mpp ) THEN 1695 1717 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1696 CALL lbc_lnk( zbathy, 'T', 1. )1718 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1697 1719 misfdep(:,:) = INT( zbathy(:,:) ) 1698 1720 1699 CALL lbc_lnk( risfdep,'T', 1. )1700 CALL lbc_lnk( bathy, 'T', 1. )1721 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1722 CALL lbc_lnk('toto', bathy, 'T', 1. ) 1701 1723 1702 1724 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1703 CALL lbc_lnk( zbathy, 'T', 1. )1725 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1704 1726 mbathy(:,:) = INT( zbathy(:,:) ) 1705 1727 ENDIF … … 1714 1736 IF( lk_mpp ) THEN 1715 1737 zbathy(:,:) = FLOAT( misfdep(:,:) ) 1716 CALL lbc_lnk( zbathy, 'T', 1. )1738 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1717 1739 misfdep(:,:) = INT( zbathy(:,:) ) 1718 1740 1719 CALL lbc_lnk( risfdep,'T', 1. )1720 CALL lbc_lnk( bathy, 'T', 1. )1741 CALL lbc_lnk( 'toto',risfdep,'T', 1. ) 1742 CALL lbc_lnk( 'toto',bathy, 'T', 1. ) 1721 1743 1722 1744 zbathy(:,:) = FLOAT( mbathy(:,:) ) 1723 CALL lbc_lnk( zbathy, 'T', 1. )1745 CALL lbc_lnk( 'toto',zbathy, 'T', 1. ) 1724 1746 mbathy(:,:) = INT( zbathy(:,:) ) 1725 1747 ENDIF … … 1827 1849 ! ... on ik / ik-1 1828 1850 e3w_0 (ji,jj,ik ) = e3t_0 (ji,jj,ik) !2._wp * (gdept_0(ji,jj,ik) - gdepw_0(ji,jj,ik)) 1851 gdept_0(ji,jj,ik-1) = gdept_0(ji,jj,ik) - e3w_0(ji,jj,ik) 1829 1852 e3t_0 (ji,jj,ik-1) = gdepw_0(ji,jj,ik) - gdepw_1d(ik-1) 1830 ! The next line isn't required and doesn't affect results - included for consistency with bathymetry code 1831 gdep t_0(ji,jj,ik-1) = gdept_1d(ik-1)1853 e3w_0 (ji,jj,ik-1) = gdept_0(ji,jj,ik-1) - gdept_1d(ik-2) 1854 gdepw_0(ji,jj,ik-1) = gdepw_0(ji,jj,ik) - e3t_0(ji,jj,ik-1) 1832 1855 ENDIF 1833 1856 END DO … … 1857 1880 CALL wrk_dealloc( jpi, jpj, zmisfdep, zmbathy ) 1858 1881 ! 1859 IF( nn_timing == 1 ) CALL timing_stop('zgr_isf')1882 ! IF( nn_timing == 1 ) CALL timing_stop('zgr_isf') 1860 1883 ! 1861 1884 END SUBROUTINE zgr_isf … … 1919 1942 !!---------------------------------------------------------------------- 1920 1943 ! 1921 IF( nn_timing == 1 ) CALL timing_start('zgr_sco')1944 !! IF( nn_timing == 1 ) CALL timing_start('zgr_sco') 1922 1945 ! 1923 1946 CALL wrk_alloc( jpi,jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) … … 2001 2024 2002 2025 ! apply lateral boundary condition CAUTION: keep the value when the lbc field is zero 2003 CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' )2026 CALL lbc_lnk( 'toto',zenv, 'T', 1._wp, 'no0' ) 2004 2027 ! 2005 2028 ! smooth the bathymetry (if required) … … 2055 2078 END DO 2056 2079 END DO 2057 IF( lk_mpp ) CALL mpp_max( zrmax ) ! max over the global domain2080 ! IF( lk_mpp ) CALL mpp_max( zrmax ) ! max over the global domain 2058 2081 ! 2059 2082 IF(lwp)WRITE(numout,*) 'zgr_sco : iter= ',jl, ' rmax= ', zrmax … … 2065 2088 END DO 2066 2089 ! apply lateral boundary condition CAUTION: keep the value when the lbc field is zero 2067 CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' )2090 CALL lbc_lnk( 'toto',zenv, 'T', 1._wp, 'no0' ) 2068 2091 ! ! ================ ! 2069 2092 END DO ! End loop ! … … 2109 2132 ! Apply lateral boundary condition 2110 2133 !!gm ! CAUTION: retain non zero value in the initial file this should be OK for orca cfg, not for EEL 2111 zhbat(:,:) = hbatu(:,:) ; CALL lbc_lnk( hbatu, 'U', 1._wp )2134 zhbat(:,:) = hbatu(:,:) ; CALL lbc_lnk('toto', hbatu, 'U', 1._wp ) 2112 2135 DO jj = 1, jpj 2113 2136 DO ji = 1, jpi … … 2119 2142 END DO 2120 2143 END DO 2121 zhbat(:,:) = hbatv(:,:) ; CALL lbc_lnk( hbatv, 'V', 1._wp )2144 zhbat(:,:) = hbatv(:,:) ; CALL lbc_lnk('toto', hbatv, 'V', 1._wp ) 2122 2145 DO jj = 1, jpj 2123 2146 DO ji = 1, jpi … … 2128 2151 END DO 2129 2152 END DO 2130 zhbat(:,:) = hbatf(:,:) ; CALL lbc_lnk( hbatf, 'F', 1._wp )2153 zhbat(:,:) = hbatf(:,:) ; CALL lbc_lnk('toto', hbatf, 'F', 1._wp ) 2131 2154 DO jj = 1, jpj 2132 2155 DO ji = 1, jpi … … 2176 2199 ENDIF 2177 2200 2178 CALL lbc_lnk( e3t_0 , 'T', 1._wp )2179 CALL lbc_lnk( e3u_0 , 'U', 1._wp )2180 CALL lbc_lnk( e3v_0 , 'V', 1._wp )2181 CALL lbc_lnk( e3f_0 , 'F', 1._wp )2182 CALL lbc_lnk( e3w_0 , 'W', 1._wp )2183 CALL lbc_lnk( e3uw_0, 'U', 1._wp )2184 CALL lbc_lnk( e3vw_0, 'V', 1._wp )2201 CALL lbc_lnk( 'toto',e3t_0 , 'T', 1._wp ) 2202 CALL lbc_lnk( 'toto',e3u_0 , 'U', 1._wp ) 2203 CALL lbc_lnk( 'toto',e3v_0 , 'V', 1._wp ) 2204 CALL lbc_lnk( 'toto',e3f_0 , 'F', 1._wp ) 2205 CALL lbc_lnk( 'toto',e3w_0 , 'W', 1._wp ) 2206 CALL lbc_lnk( 'toto',e3uw_0, 'U', 1._wp ) 2207 CALL lbc_lnk('toto', e3vw_0, 'V', 1._wp ) 2185 2208 ! 2186 2209 WHERE( e3t_0 (:,:,:) == 0._wp ) e3t_0 (:,:,:) = 1._wp … … 2314 2337 CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) 2315 2338 ! 2316 IF( nn_timing == 1 ) CALL timing_stop('zgr_sco')2339 !!! IF( nn_timing == 1 ) CALL timing_stop('zgr_sco') 2317 2340 ! 2318 2341 END SUBROUTINE zgr_sco … … 2585 2608 ENDDO 2586 2609 ! 2587 CALL lbc_lnk( e3t_0 ,'T',1.) ; CALL lbc_lnk(e3u_0 ,'T',1.)2588 CALL lbc_lnk( e3v_0 ,'T',1.) ; CALL lbc_lnk(e3f_0 ,'T',1.)2589 CALL lbc_lnk( e3w_0 ,'T',1.)2590 CALL lbc_lnk( e3uw_0,'T',1.) ; CALL lbc_lnk(e3vw_0,'T',1.)2610 CALL lbc_lnk('toto',e3t_0 ,'T',1.) ; CALL lbc_lnk('toto',e3u_0 ,'T',1.) 2611 CALL lbc_lnk('toto',e3v_0 ,'T',1.) ; CALL lbc_lnk('toto',e3f_0 ,'T',1.) 2612 CALL lbc_lnk('toto',e3w_0 ,'T',1.) 2613 CALL lbc_lnk('toto',e3uw_0,'T',1.) ; CALL lbc_lnk('toto',e3vw_0,'T',1.) 2591 2614 ! 2592 2615 CALL wrk_dealloc( jpi,jpj,jpk, z_gsigw3, z_gsigt3, z_gsi3w3 ) -
utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/in_out_manager.F90
r10725 r10727 18 18 PUBLIC 19 19 20 21 !22 20 !!---------------------------------------------------------------------- 23 21 !! namrun namelist parameters … … 30 28 LOGICAL :: ln_rstart !: start from (F) rest or (T) a restart file 31 29 LOGICAL :: ln_rst_list !: output restarts at list of times (T) or by frequency (F) 32 INTEGER :: nn_no !: job number33 30 INTEGER :: nn_rstctl !: control of the time step (0, 1 or 2) 34 31 INTEGER :: nn_rstssh = 0 !: hand made initilization of ssh or not (1/0) … … 46 43 LOGICAL :: ln_clobber !: clobber (overwrite) an existing file 47 44 INTEGER :: nn_chunksz !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 45 LOGICAL :: ln_xios_read !: use xios to read single file restart 46 INTEGER :: nn_wxios !: write resart using xios 0 - no, 1 - single, 2 - multiple file output 47 INTEGER :: nn_no !: Assimilation cycle 48 49 #if defined key_netcdf4 50 !!---------------------------------------------------------------------- 51 !! namnc4 namelist parameters (key_netcdf4) 52 !!---------------------------------------------------------------------- 53 ! The following four values determine the partitioning of the output fields 54 ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is 55 ! for runtime optimisation. The individual netcdf4 chunks can be optionally 56 ! gzipped (recommended) leading to significant reductions in I/O volumes 57 ! !!!** variables only used with iom_nf90 routines and key_netcdf4 ** 58 INTEGER :: nn_nchunks_i !: number of chunks required in the i-dimension 59 INTEGER :: nn_nchunks_j !: number of chunks required in the j-dimension 60 INTEGER :: nn_nchunks_k !: number of chunks required in the k-dimension 61 INTEGER :: nn_nchunks_t !: number of chunks required in the t-dimension 62 LOGICAL :: ln_nc4zip !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4 63 ! ! (F) ignore chunking request and use the netcdf4 library 64 ! ! to produce netcdf3-compatible files 65 #endif 66 48 67 !$AGRIF_DO_NOT_TREAT 49 68 TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making) … … 55 74 56 75 CHARACTER(lc) :: cexper !: experiment name used for output filename 57 INTEGER :: no !: job number58 76 INTEGER :: nrstdt !: control of the time step (0, 1 or 2) 59 77 INTEGER :: nit000 !: index of the first time step … … 71 89 INTEGER :: nitrst !: time step at which restart file should be written 72 90 LOGICAL :: lrst_oce !: logical to control the oce restart write 91 LOGICAL :: lrst_ice !: logical to control the ice restart write 73 92 INTEGER :: numror = 0 !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90) 93 INTEGER :: numrir !: logical unit for ice restart (read) 74 94 INTEGER :: numrow !: logical unit for ocean restart (write) 95 INTEGER :: numriw !: logical unit for ice restart (write) 75 96 INTEGER :: nrst_lst !: number of restart to output next 76 97 … … 78 99 !! output monitoring 79 100 !!---------------------------------------------------------------------- 80 LOGICAL :: ln_ctl !: run control for debugging 81 INTEGER :: nn_timing !: run control for timing 82 INTEGER :: nn_diacfl !: flag whether to create CFL diagnostics 83 INTEGER :: nn_print !: level of print (0 no print) 84 INTEGER :: nn_ictls !: Start i indice for the SUM control 85 INTEGER :: nn_ictle !: End i indice for the SUM control 86 INTEGER :: nn_jctls !: Start j indice for the SUM control 87 INTEGER :: nn_jctle !: End j indice for the SUM control 88 INTEGER :: nn_isplt !: number of processors following i 89 INTEGER :: nn_jsplt !: number of processors following j 90 INTEGER :: nn_bench !: benchmark parameter (0/1) 91 INTEGER :: nn_bit_cmp = 0 !: bit reproducibility (0/1) 101 LOGICAL :: ln_ctl !: run control for debugging 102 TYPE :: sn_ctl !: optional use structure for finer control over output selection 103 LOGICAL :: l_config = .FALSE. !: activate/deactivate finer control 104 ! Note if l_config is True then ln_ctl is ignored. 105 ! Otherwise setting ln_ctl True is equivalent to setting 106 ! all the following logicals in this structure True 107 LOGICAL :: l_runstat = .FALSE. !: Produce/do not produce run.stat file (T/F) 108 LOGICAL :: l_trcstat = .FALSE. !: Produce/do not produce tracer.stat file (T/F) 109 LOGICAL :: l_oceout = .FALSE. !: Produce all ocean.outputs (T) or just one (F) 110 LOGICAL :: l_layout = .FALSE. !: Produce all layout.dat files (T) or just one (F) 111 LOGICAL :: l_mppout = .FALSE. !: Produce/do not produce mpp.output_XXXX files (T/F) 112 LOGICAL :: l_mpptop = .FALSE. !: Produce/do not produce mpp.top.output_XXXX files (T/F) 113 ! Optional subsetting of processor report files 114 ! Default settings of 0/1000000/1 should ensure all areas report. 115 ! Set to a more restrictive range to select specific areas 116 INTEGER :: procmin = 0 !: Minimum narea to output 117 INTEGER :: procmax = 1000000 !: Maximum narea to output 118 INTEGER :: procincr = 1 !: narea increment to output 119 INTEGER :: ptimincr = 1 !: timestep increment to output (time.step and run.stat) 120 END TYPE sn_ctl 92 121 122 TYPE (sn_ctl) :: sn_cfctl !: run control structure for selective output 123 LOGICAL :: ln_timing !: run control for timing 124 LOGICAL :: ln_diacfl !: flag whether to create CFL diagnostics 125 INTEGER :: nn_print !: level of print (0 no print) 126 INTEGER :: nn_ictls !: Start i indice for the SUM control 127 INTEGER :: nn_ictle !: End i indice for the SUM control 128 INTEGER :: nn_jctls !: Start j indice for the SUM control 129 INTEGER :: nn_jctle !: End j indice for the SUM control 130 INTEGER :: nn_isplt !: number of processors following i 131 INTEGER :: nn_jsplt !: number of processors following j 132 INTEGER :: nn_bench !: benchmark parameter (0/1) 133 INTEGER :: nn_bit_cmp = 0 !: bit reproducibility (0/1) 93 134 ! 94 INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt , nbench!: OLD namelist names135 INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt !: OLD namelist names 95 136 96 137 INTEGER :: ijsplt = 1 !: nb of local domain = nb of processors … … 101 142 INTEGER :: numstp = -1 !: logical unit for time step 102 143 INTEGER :: numtime = -1 !: logical unit for timing 103 INTEGER :: numout = 6 !: logical unit for output print; Set to stdout to ensure any early 104 ! output can be collected; do not change 144 INTEGER :: numout = 6 !: logical unit for output print; Set to stdout to ensure any 145 INTEGER :: numnul = -1 !: logical unit for /dev/null 146 ! ! early output can be collected; do not change 105 147 INTEGER :: numnam_ref = -1 !: logical unit for reference namelist 106 148 INTEGER :: numnam_cfg = -1 !: logical unit for configuration specific namelist … … 110 152 INTEGER :: numoni = -1 !: logical unit for Output Namelist Ice 111 153 INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution) 112 INTEGER :: num sol = -1 !: logical unit for solverstatistics154 INTEGER :: numrun = -1 !: logical unit for run statistics 113 155 INTEGER :: numdct_in = -1 !: logical unit for transports computing 114 156 INTEGER :: numdct_vol = -1 !: logical unit for voulume transports output … … 121 163 !! Run control 122 164 !!---------------------------------------------------------------------- 165 INTEGER :: no_print = 0 !: optional argument of fld_fill (if present, suppress some control print) 123 166 INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run) 124 167 INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run) … … 132 175 LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only .OR. ln_ctl 133 176 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 177 CHARACTER(lc) :: cxios_context !: context name used in xios 178 CHARACTER(lc) :: crxios_context !: context name used in xios to read restart 179 CHARACTER(lc) :: cwxios_context !: context name used in xios to write restart file 134 180 135 181 !!---------------------------------------------------------------------- 136 182 !! NEMO/OCE 4.0 , NEMO Consortium (2018)