- Timestamp:
- 2020-10-19T10:53:30+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL
- Files:
-
- 1 deleted
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/EXPREF/context_nemo.xml
r12276 r13632 11 11 <variable id="ref_month" type="int"> 01 </variable> 12 12 <variable id="ref_day" type="int"> 01 </variable> 13 <variable id="r au0" type="float" > 1026.0 </variable>13 <variable id="rho0" type="float" > 1026.0 </variable> 14 14 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 15 15 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/EXPREF/file_def_nemo-oce.xml
r9572 r13632 15 15 <field field_ref="soce" /> 16 16 <field field_ref="ssh" /> 17 <field field_ref="s algrad" />18 <field field_ref=" ke_zint" />17 <field field_ref="socegrad" /> 18 <field field_ref="eken_int" /> 19 19 <field field_ref="relvor" /> 20 20 <field field_ref="potvor" /> -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/EXPREF/namelist_cfg
r12489 r13632 20 20 &namusr_def ! User defined : CANAL configuration: Flat bottom, beta-plane 21 21 !----------------------------------------------------------------------- 22 rn_domszx = 3600. ! x horizontal size [km]23 rn_domszy = 1 800. ! y horizontal size [km]24 rn_domszz = 5000. ! z vertical size [m]25 rn_dx = 30. ! x horizontal resolution [km]26 rn_dy = 30. ! y horizontal resolution [km]27 rn_dz = 500. ! z vertical resolution [m]22 rn_domszx = 2000. ! x horizontal size [km] 23 rn_domszy = 1000. ! y horizontal size [km] 24 rn_domszz = 1000. ! z vertical size [m] 25 rn_dx = 10. ! x horizontal resolution [km] 26 rn_dy = 10. ! y horizontal resolution [km] 27 rn_dz = 1000. ! z vertical resolution [m] 28 28 rn_0xratio = 0.5 ! x-domain ratio of the 0 29 29 rn_0yratio = 0.5 ! y-domain ratio of the 0 … … 31 31 rn_ppgphi0 = 38.5 ! Reference latitude [degrees] 32 32 rn_u10 = 0. ! 10m wind speed [m/s] 33 rn_windszx = 4000.! longitudinal wind extension [km]34 rn_windszy = 4000.! latitudinal wind extension [km]35 rn_uofac = 0.! Uoce multiplicative factor (0.:absolute or 1.:relative winds)33 rn_windszx = 90. ! longitudinal wind extension [km] 34 rn_windszy = 90. ! latitudinal wind extension [km] 35 !!clem rn_uofac = 0. ! Uoce multiplicative factor (0.:absolute or 1.:relative winds) 36 36 rn_vtxmax = 1. ! initial vortex max current [m/s] 37 37 rn_uzonal = 1. ! initial zonal current [m/s] 38 rn_ujetszx = 4000. 39 rn_ujetszy = 400 0. ! latitudinal jet extension [km]38 rn_ujetszx = 4000. ! longitudinal jet extension [km] 39 rn_ujetszy = 400. ! latitudinal jet extension [km] 40 40 nn_botcase = 0 ! bottom definition (0:flat, 1:bump) 41 nn_initcase = 1 ! initial condition case (0:rest, 1:zonal current, 2:current shear, 3: gaussian zonal current, 42 ! ! 4: geostrophic zonal pulse, 5: vortex) 43 ln_sshnoise = .false. ! add random noise on initial ssh 44 rn_lambda = 50. ! gaussian lambda 41 nn_initcase = 1 ! initial condition case 42 ! ! -1 : stratif at rest 43 ! ! 0 : rest 44 ! ! 1 : zonal current 45 ! ! 2 : current shear 46 ! ! 3 : gaussian zonal current 47 ! ! 4 : geostrophic zonal pulse 48 ! ! 5 : baroclinic vortex 49 ln_sshnoise = .FALSE. ! add random noise on initial ssh 50 rn_lambda = 50. ! gaussian lambda 51 nn_perio = 1 45 52 / 46 53 !----------------------------------------------------------------------- … … 59 66 !----------------------------------------------------------------------- 60 67 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 61 rn_Dt = 1440. ! time step for the dynamics (and tracer if nn_acc=0) 62 rn_atfp = 0.05 ! asselin time filter parameter 68 rn_Dt = 1200. ! time step for the dynamics (and tracer if nn_acc=0) 69 rn_atfp = 0.0 ! asselin time filter parameter 70 / 71 !----------------------------------------------------------------------- 72 &namcfg ! parameters of the configuration (default: use namusr_def in namelist_cfg) 73 !----------------------------------------------------------------------- 74 ln_write_cfg = .false. ! (=T) create the domain configuration file 75 cn_domcfg_out = "domain_cfg" ! newly created domain configuration filename 63 76 / 64 77 !!====================================================================== … … 108 121 !! !! 109 122 !! namdrg top/bottom drag coefficient (default: NO selection) 110 !! namdrg_top top friction (ln_ OFF =F & ln_isfcav=T)111 !! namdrg_bot bottom friction (ln_ OFF =F)123 !! namdrg_top top friction (ln_drg_OFF =F & ln_isfcav=T) 124 !! namdrg_bot bottom friction (ln_drg_OFF =F) 112 125 !! nambbc bottom temperature boundary condition (default: OFF) 113 126 !! nambbl bottom boundary layer scheme (default: OFF) … … 117 130 &namdrg ! top/bottom drag coefficient (default: NO selection) 118 131 !----------------------------------------------------------------------- 119 ln_ OFF = .true. ! free-slip : Cd = 0132 ln_drg_OFF = .true. ! free-slip : Cd = 0 (F => fill namdrg_bot 120 133 / 121 134 !!====================================================================== … … 134 147 !----------------------------------------------------------------------- 135 148 ln_seos = .true. ! = Use simplified equation of state (S-EOS) 136 ! ! rd(T,S,Z)*r au0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS149 ! ! rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 137 150 rn_a0 = 0.28 ! thermal expension coefficient (for simplified equation of state) 138 151 rn_b0 = 0. ! saline expension coefficient (for simplified equation of state) … … 148 161 ln_traadv_OFF = .false. ! No tracer advection 149 162 ln_traadv_cen = .false. ! 2nd order centered scheme 150 nn_cen_h = 4! =2/4, horizontal 2nd order CEN / 4th order CEN151 nn_cen_v = 4! =2/4, vertical 2nd order CEN / 4th order COMPACT163 nn_cen_h = 2 ! =2/4, horizontal 2nd order CEN / 4th order CEN 164 nn_cen_v = 2 ! =2/4, vertical 2nd order CEN / 4th order COMPACT 152 165 ln_traadv_fct = .false. ! FCT scheme 153 nn_fct_h = 2! =2/4, horizontal 2nd / 4th order166 nn_fct_h = 4 ! =2/4, horizontal 2nd / 4th order 154 167 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order 155 168 ln_traadv_mus = .false. ! MUSCL scheme … … 162 175 &namtra_ldf ! lateral diffusion scheme for tracers (default: NO selection) 163 176 !----------------------------------------------------------------------- 164 ln_traldf_OFF = .true. ! No explicit diffusion 177 ! ! Operator type: 178 ln_traldf_OFF = .true. ! No explicit diffusion 179 ln_traldf_lap = .false. ! laplacian operator 180 ln_traldf_blp = .false. ! bilaplacian operator 181 ! 182 ! ! Direction of action: 183 ln_traldf_lev = .false. ! iso-level 184 ln_traldf_hor = .true. ! horizontal (geopotential) 185 ln_traldf_iso = .false. ! iso-neutral (standard operator) 186 ln_traldf_triad = .false. ! iso-neutral (triad operator) 187 ! 188 ! ! iso-neutral options: 189 ln_traldf_msc = .false. ! Method of Stabilizing Correction (both operators) 190 rn_slpmax = 0.01 ! slope limit (both operators) 191 ln_triad_iso = .false. ! pure horizontal mixing in ML (triad only) 192 rn_sw_triad = 1 ! =1 switching triad ; =0 all 4 triads used (triad only) 193 ln_botmix_triad = .false. ! lateral mixing on bottom (triad only) 194 ! 195 ! ! Coefficients: 196 nn_aht_ijk_t = 31 ! space/time variation of eddy coefficient: 197 ! ! =-20 (=-30) read in eddy_diffusivity_2D.nc (..._3D.nc) file 198 ! ! = 0 constant 199 ! ! = 10 F(k) =ldf_c1d 200 ! ! = 20 F(i,j) =ldf_c2d 201 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation 202 ! ! = 30 F(i,j,k) =ldf_c2d * ldf_c1d 203 ! ! = 31 F(i,j,k,t)=F(local velocity and grid-spacing) 204 ! ! time invariant coefficients: aht0 = 1/2 Ud*Ld (lap case) 205 ! ! or = 1/12 Ud*Ld^3 (blp case) 206 rn_Ud = 0.01 ! lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30) 207 rn_Ld = 200.e+3 ! lateral diffusive length [m] (nn_aht_ijk_t= 0, 10) 165 208 / 166 209 !!====================================================================== … … 183 226 nn_dynkeg = 0 ! scheme for grad(KE): =0 C2 ; =1 Hollingsworth correction 184 227 ln_dynadv_cen2 = .false. ! flux form - 2nd order centered scheme 185 ln_dynadv_ubs = .true. ! flux form - 3rd order UBS scheme228 ln_dynadv_ubs = .true. ! flux form - 3rd order UBS scheme 186 229 / 187 230 !----------------------------------------------------------------------- 188 231 &namdyn_vor ! Vorticity / Coriolis scheme (default: NO selection) 189 232 !----------------------------------------------------------------------- 190 ln_dynvor_ene = . true. ! energy conserving scheme191 ln_dynvor_ens = .false. ! enstrophy conserving scheme192 ln_dynvor_mix = .false. ! mixed scheme233 ln_dynvor_ene = .false. ! energy conserving scheme 234 ln_dynvor_ens = .false. ! enstrophy conserving scheme 235 ln_dynvor_mix = .false. ! mixed scheme 193 236 ln_dynvor_een = .false. ! energy & enstrophy scheme 237 ln_dynvor_enT = .false. ! energy conserving scheme (T-point) 238 ln_dynvor_eeT = .true. ! energy conserving scheme (een using e3t) 194 239 nn_een_e3f = 0 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 195 240 / … … 210 255 ! ! = 1 Boxcar over nn_e sub-steps 211 256 ! ! = 2 Boxcar over 2*nn_e " " 212 ln_bt_auto = . false. ! Number of sub-step defined from:257 ln_bt_auto = .true. ! Number of sub-step defined from: 213 258 nn_e = 24 ! =F : the number of sub-step in rn_Dt seconds 214 259 / … … 222 267 ! ! Direction of action : 223 268 ln_dynldf_lev = .false. ! iso-level 224 ln_dynldf_hor = . true. ! horizontal (geopotential)269 ln_dynldf_hor = .false. ! horizontal (geopotential) 225 270 ln_dynldf_iso = .false. ! iso-neutral 226 271 ! ! Coefficient 227 nn_ahm_ijk_t = 20! space/time variation of eddy coef272 nn_ahm_ijk_t = 31 ! space/time variation of eddy coef 228 273 ! ! =-30 read in eddy_viscosity_3D.nc file 229 274 ! ! =-20 read in eddy_viscosity_2D.nc file … … 271 316 !! !! 272 317 !! namtrd dynamics and/or tracer trends (default: OFF) 273 !! namptr Poleward Transport Diagnostics (default: OFF)274 318 !! namhsb Heat and salt budgets (default: OFF) 275 319 !! namdiu Cool skin and warm layer models (default: OFF) 276 320 !! namdiu Cool skin and warm layer models (default: OFF) 321 <<<<<<< .working 277 322 !! namflo float parameters (default: OFF) 278 323 !! nam_diadct transports through some sections (default: OFF) 324 ||||||| .merge-left.r13465 325 !! namflo float parameters (default: OFF) 326 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 327 !! nam_diadct transports through some sections (default: OFF) 328 ======= 329 !! namflo float parameters ("key_float") 330 !! nam_diaharm Harmonic analysis of tidal constituents ("key_diaharm") 331 !! namdct transports through some sections ("key_diadct") 332 !! nam_diatmb Top Middle Bottom Output (default: OFF) 333 >>>>>>> .merge-right.r13470 279 334 !! nam_dia25h 25h Mean Output (default: OFF) 280 335 !! namnc4 netcdf4 chunking and compression settings ("key_netcdf4") … … 285 340 !----------------------------------------------------------------------- 286 341 ln_glo_trd = .false. ! (T) global domain averaged diag for T, T^2, KE, and PE 287 ln_dyn_trd = .true. ! (T) 3D momentum trend output342 ln_dyn_trd = .true. ! (T) 3D momentum trend output 288 343 ln_dyn_mxl = .false. ! (T) 2D momentum trends averaged over the mixed layer (not coded yet) 289 344 ln_vor_trd = .false. ! (T) 2D barotropic vorticity trends (not coded yet) … … 312 367 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 313 368 !----------------------------------------------------------------------- 369 !! jpni = 8 ! jpni number of processors following i (set automatically if < 1) 370 !! jpnj = 1 ! jpnj number of processors following j (set automatically if < 1) 314 371 / 315 372 !----------------------------------------------------------------------- 316 373 &namctl ! Control prints (default: OFF) 317 374 !----------------------------------------------------------------------- 375 ln_timing = .true. ! timing by routine write out in timing.output file 376 !! ln_diacfl = .true. ! CFL diagnostics write out in cfl_diagnostics.ascii 318 377 / 319 378 !----------------------------------------------------------------------- -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/domvvl.F90
r13295 r13632 9 9 !! 3.6 ! 2014-11 (P. Mathiot) add ice shelf capability 10 10 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rename dom_vvl_sf_swp -> dom_vvl_sf_update for new timestepping 11 !! 4.x ! 2020-02 (G. Madec, S. Techene) introduce ssh to h0 ratio 11 12 !!---------------------------------------------------------------------- 12 13 13 !!----------------------------------------------------------------------14 !! dom_vvl_init : define initial vertical scale factors, depths and column thickness15 !! dom_vvl_sf_nxt : Compute next vertical scale factors16 !! dom_vvl_sf_update : Swap vertical scale factors and update the vertical grid17 !! dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another18 !! dom_vvl_rst : read/write restart file19 !! dom_vvl_ctl : Check the vvl options20 !!----------------------------------------------------------------------21 14 USE oce ! ocean dynamics and tracers 22 15 USE phycst ! physical constant … … 36 29 PRIVATE 37 30 38 PUBLIC dom_vvl_init ! called by domain.F9039 PUBLIC dom_vvl_zgr ! called by isfcpl.F9040 PUBLIC dom_vvl_sf_nxt ! called by step.F9041 PUBLIC dom_vvl_sf_update ! called by step.F9042 PUBLIC dom_vvl_interpol ! called by dynnxt.F9043 44 31 ! !!* Namelist nam_vvl 45 32 LOGICAL , PUBLIC :: ln_vvl_zstar = .FALSE. ! zstar vertical coordinate … … 63 50 REAL(wp) , ALLOCATABLE, SAVE, DIMENSION(:,:) :: frq_rst_hdv ! retoring period for low freq. divergence 64 51 52 #if defined key_qco 53 !!---------------------------------------------------------------------- 54 !! 'key_qco' EMPTY MODULE Quasi-Eulerian vertical coordonate 55 !!---------------------------------------------------------------------- 56 #else 57 !!---------------------------------------------------------------------- 58 !! Default key Old management of time varying vertical coordinate 59 !!---------------------------------------------------------------------- 60 61 !!---------------------------------------------------------------------- 62 !! dom_vvl_init : define initial vertical scale factors, depths and column thickness 63 !! dom_vvl_sf_nxt : Compute next vertical scale factors 64 !! dom_vvl_sf_update : Swap vertical scale factors and update the vertical grid 65 !! dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 66 !! dom_vvl_rst : read/write restart file 67 !! dom_vvl_ctl : Check the vvl options 68 !!---------------------------------------------------------------------- 69 70 PUBLIC dom_vvl_init ! called by domain.F90 71 PUBLIC dom_vvl_zgr ! called by isfcpl.F90 72 PUBLIC dom_vvl_sf_nxt ! called by step.F90 73 PUBLIC dom_vvl_sf_update ! called by step.F90 74 PUBLIC dom_vvl_interpol ! called by dynnxt.F90 75 65 76 !! * Substitutions 66 77 # include "do_loop_substitute.h90" … … 135 146 ! 136 147 END SUBROUTINE dom_vvl_init 137 ! 148 149 138 150 SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 139 151 !!---------------------------------------------------------------------- … … 261 273 IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN 262 274 IF( nn_cfg == 3 ) THEN ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 263 ii0 = 103 ; ii1 = 111264 ij0 = 128 ; ij1 = 135 ;275 ii0 = 103 + nn_hls - 1 ; ii1 = 111 + nn_hls - 1 276 ij0 = 128 + nn_hls ; ij1 = 135 + nn_hls 265 277 frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.0_wp 266 278 frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 1.e0_wp / rn_Dt … … 322 334 LOGICAL :: ll_do_bclinic ! local logical 323 335 REAL(wp), DIMENSION(jpi,jpj) :: zht, z_scale, zwu, zwv, zhdiv 324 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t 336 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ze3t 337 LOGICAL , DIMENSION(:,:,:), ALLOCATABLE :: llmsk 325 338 !!---------------------------------------------------------------------- 326 339 ! … … 426 439 ! ! d - thickness diffusion transport: boundary conditions 427 440 ! (stored for tracer advction and continuity equation) 441 #if defined key_mpi3 442 CALL lbc_lnk_nc_multi( 'domvvl', un_td , 'U' , -1._wp, vn_td , 'V' , -1._wp) 443 #else 428 444 CALL lbc_lnk_multi( 'domvvl', un_td , 'U' , -1._wp, vn_td , 'V' , -1._wp) 445 #endif 429 446 430 447 ! 4 - Time stepping of baroclinic scale factors 431 448 ! --------------------------------------------- 449 #if defined key_mpi3 450 CALL lbc_lnk_nc_multi( 'domvvl', tilde_e3t_a(:,:,:), 'T', 1._wp ) 451 #else 432 452 CALL lbc_lnk( 'domvvl', tilde_e3t_a(:,:,:), 'T', 1._wp ) 453 #endif 433 454 tilde_e3t_a(:,:,:) = tilde_e3t_b(:,:,:) + rDt * tmask(:,:,:) * tilde_e3t_a(:,:,:) 434 455 435 456 ! Maximum deformation control 436 457 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 437 ze3t(:,:,jpk) = 0._wp 438 DO jk = 1, jpkm1 439 ze3t(:,:,jk) = tilde_e3t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 440 END DO 441 z_tmax = MAXVAL( ze3t(:,:,:) ) 442 CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 443 z_tmin = MINVAL( ze3t(:,:,:) ) 444 CALL mpp_min( 'domvvl', z_tmin ) ! min over the global domain 458 ALLOCATE( ze3t(jpi,jpj,jpk), llmsk(jpi,jpj,jpk) ) 459 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 460 ze3t(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) / e3t_0(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj) 461 END_3D 462 ! 463 llmsk( 1:Nis1,:,:) = .FALSE. ! exclude halos from the checked region 464 llmsk(Nie1: jpi,:,:) = .FALSE. 465 llmsk(:, 1:Njs1,:) = .FALSE. 466 llmsk(:,Nje1: jpj,:) = .FALSE. 467 ! 468 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 469 z_tmax = MAXVAL( ze3t(:,:,:), mask = llmsk ) ; CALL mpp_max( 'domvvl', z_tmax ) ! max over the global domain 470 z_tmin = MINVAL( ze3t(:,:,:), mask = llmsk ) ; CALL mpp_min( 'domvvl', z_tmin ) ! min over the global domain 445 471 ! - ML - test: for the moment, stop simulation for too large e3_t variations 446 472 IF( ( z_tmax > rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN 447 IF( lk_mpp ) THEN 448 CALL mpp_maxloc( 'domvvl', ze3t, tmask, z_tmax, ijk_max ) 449 CALL mpp_minloc( 'domvvl', ze3t, tmask, z_tmin, ijk_min ) 450 ELSE 451 ijk_max = MAXLOC( ze3t(:,:,:) ) 452 ijk_max(1) = mig0_oldcmp(ijk_max(1)) 453 ijk_max(2) = mjg0_oldcmp(ijk_max(2)) 454 ijk_min = MINLOC( ze3t(:,:,:) ) 455 ijk_min(1) = mig0_oldcmp(ijk_min(1)) 456 ijk_min(2) = mjg0_oldcmp(ijk_min(2)) 457 ENDIF 473 CALL mpp_maxloc( 'domvvl', ze3t, llmsk, z_tmax, ijk_max ) 474 CALL mpp_minloc( 'domvvl', ze3t, llmsk, z_tmin, ijk_min ) 458 475 IF (lwp) THEN 459 476 WRITE(numout, *) 'MAX( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmax … … 464 481 ENDIF 465 482 ENDIF 483 DEALLOCATE( ze3t, llmsk ) 466 484 ! - ML - end test 467 485 ! - ML - Imposing these limits will cause a baroclinicity error which is corrected for below … … 1030 1048 END SUBROUTINE dom_vvl_ctl 1031 1049 1050 #endif 1051 1032 1052 !!====================================================================== 1033 1053 END MODULE domvvl -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/stpctl.F90
r13216 r13632 49 49 !! 50 50 !! ** Method : - Save the time step in numstp 51 !! - Print it each 50 time steps52 51 !! - Stop the run IF problem encountered by setting nstop > 0 53 52 !! Problems checked: |ssh| maximum larger than 10 m … … 119 118 ! !== test of local extrema ==! 120 119 ! !== done by all processes at every time step ==! 121 llmsk(:,:,1) = ssmask(:,:) == 1._wp 120 ! 121 llmsk( 1:Nis1,:,:) = .FALSE. ! exclude halos from the checked region 122 llmsk(Nie1: jpi,:,:) = .FALSE. 123 llmsk(:, 1:Njs1,:) = .FALSE. 124 llmsk(:,Nje1: jpj,:) = .FALSE. 125 ! 126 llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0) == 1._wp ! define only the inner domain 122 127 IF( ll_wd ) THEN 123 128 zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) ) ! ssh max … … 125 130 zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) ), mask = llmsk(:,:,1) ) ! ssh max 126 131 ENDIF 127 llmsk( :,:,:) = umask(:,:,:) == 1._wp132 llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 128 133 zmax(2) = MAXVAL( ABS( uu(:,:,:,Kmm) ), mask = llmsk ) ! velocity max (zonal only) 129 llmsk( :,:,:) = tmask(:,:,:) == 1._wp134 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 130 135 zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk ) ! minus salinity max 131 136 zmax(4) = MAXVAL( ts(:,:,:,jp_sal,Kmm), mask = llmsk ) ! salinity max … … 143 148 zmax(5:8) = 0._wp 144 149 ENDIF 145 zmax(9) = REAL( nstop, wp ) ! stop indicator150 zmax(9) = REAL( nstop, wp ) ! stop indicator 146 151 ! !== get global extrema ==! 147 152 ! !== done by all processes if writting run.stat ==! … … 183 188 IF( lwm .AND. kt /= nitend ) istatus = NF90_CLOSE(nrunid) 184 189 ! get global loc on the min/max 185 CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:, Kmm)), ssmask(:,: ), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F 186 CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:, Kmm)), umask(:,:,:), zzz, iloc(1:3,2) ) 187 CALL mpp_minloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , tmask(:,:,:), zzz, iloc(1:3,3) ) 188 CALL mpp_maxloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , tmask(:,:,:), zzz, iloc(1:3,4) ) 190 llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp ! define only the inner domain 191 CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:, Kmm)), llmsk(:,:,1), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F 192 llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 193 CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:, Kmm)), llmsk(:,:,:), zzz, iloc(1:3,2) ) 194 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 195 CALL mpp_minloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , llmsk(:,:,:), zzz, iloc(1:3,3) ) 196 CALL mpp_maxloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , llmsk(:,:,:), zzz, iloc(1:3,4) ) 189 197 ! find which subdomain has the max. 190 198 iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0 … … 199 207 ELSE ! find local min and max locations: 200 208 ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc 201 iloc(1:2,1) = MAXLOC( ABS( ssh(:,:, Kmm)), mask = ssmask(:,: ) == 1._wp ) + (/ nimpp - 1, njmpp - 1 /) 202 iloc(1:3,2) = MAXLOC( ABS( uu(:,:,:, Kmm)), mask = umask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 203 iloc(1:3,3) = MINLOC( ts(:,:,:,jp_sal,Kmm) , mask = tmask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 204 iloc(1:3,4) = MAXLOC( ts(:,:,:,jp_sal,Kmm) , mask = tmask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 209 llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp ! define only the inner domain 210 iloc(1:2,1) = MAXLOC( ABS( ssh(:,:, Kmm)), mask = llmsk(:,:,1) ) 211 llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 212 iloc(1:3,2) = MAXLOC( ABS( uu(:,:,:, Kmm)), mask = llmsk(:,:,:) ) 213 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 214 iloc(1:3,3) = MINLOC( ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 215 iloc(1:3,4) = MAXLOC( ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 216 DO ji = 1, 4 ! local domain indices ==> global domain indices, excluding halos 217 iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 218 END DO 205 219 iareamin(:) = narea ; iareamax(:) = narea ; iareasum(:) = 1 ! this is local information 206 220 ENDIF -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/trazdf.F90
r13295 r13632 90 90 END DO 91 91 !!gm this should be moved in trdtra.F90 and done on all trends 92 #if defined key_mpi3 93 CALL lbc_lnk_nc_multi( 'trazdf', ztrdt, 'T', 1. , ztrds, 'T', 1. ) 94 #else 92 95 CALL lbc_lnk_multi( 'trazdf', ztrdt, 'T', 1. , ztrds, 'T', 1. ) 96 #endif 93 97 !!gm 94 98 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt ) -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/usrdef_istate.F90
r13295 r13632 66 66 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ ' 67 67 ! 68 IF (ln_sshnoise) CALL RANDOM_NUMBER(zrandom)69 68 zjetx = ABS(rn_ujetszx)/2. 70 69 zjety = ABS(rn_ujetszy)/2. 71 70 ! 71 zf0 = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 72 ! 72 73 SELECT CASE(nn_initcase) 74 75 CASE(-1) ! stratif at rest 76 77 ! sea level: 78 pssh(:,:) = 0. 79 ! temperature: 80 pts(:,:,1,jp_tem) = 25. !!30._wp 81 pts(:,:,2:jpk,jp_tem) = 22. !!24._wp 82 ! salinity: 83 pts(:,:,:,jp_sal) = 35._wp 84 ! velocities: 85 pu(:,:,:) = 0. 86 pv(:,:,:) = 0. 87 73 88 CASE(0) ! rest 74 89 … … 98 113 zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 99 114 WHERE( ABS(gphit) <= zjety ) 100 pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:)* gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 )101 ELSEWHERE 102 pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:)* SIGN(zjety, gphit(:,:)) * 1.e3 &115 pssh(:,:) = - rn_uzonal / grav * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 116 ELSEWHERE 117 pssh(:,:) = - rn_uzonal / grav * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3 & 103 118 & + 0.5 * zbeta * zjety * zjety * 1.e6 ) 104 119 END WHERE … … 109 124 pts(:,:,jpk,jp_sal) = 0. 110 125 DO jk=1, jpkm1 111 pts(:,:,jk,jp_sal) = gphit(:,:) 126 WHERE( ABS(gphit) <= zjety ) 127 !!$ WHERE( ABS(gphit) <= zjety*0.5 .AND. ABS(glamt) <= zjety*0.5 ) ! for a square of salt 128 pts(:,:,jk,jp_sal) = 35. 129 ELSEWHERE 130 pts(:,:,jk,jp_sal) = 30. 131 END WHERE 112 132 END DO 113 133 ! velocities: … … 134 154 WHERE( ABS(gphit) <= zjety ) 135 155 pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav & 136 & * ( ff_t(:,:)* gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 )156 & * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 137 157 ELSEWHERE 138 158 pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav & 139 & * ( ff_t(:,:)* SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 )159 & * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 140 160 END WHERE 141 161 END SELECT … … 143 163 pts(:,:,:,jp_tem) = 10._wp 144 164 ! salinity: 145 pts(:,:,:,jp_sal) = 2.146 DO jk=1, jpkm1 147 WHERE( ABS(gphiv) <= zjety ) pts(:,:,jk,jp_sal) = 2. + SIGN(1.,gphiv(:,:))165 pts(:,:,:,jp_sal) = 30. 166 DO jk=1, jpkm1 167 WHERE( ABS(gphiv) <= zjety ) pts(:,:,jk,jp_sal) = 30. + SIGN(1.,gphiv(:,:)) 148 168 END DO 149 169 ! velocities: … … 169 189 pssh(ji,jj) = pssh(ji,jj-1) - ff_t(ji,jj) / grav * pu(ji,jj,1) * e2t(ji,jj) 170 190 END_2D 191 #if defined key_mpi3 192 CALL lbc_lnk_nc_multi( 'usrdef_istate', pssh, 'T', 1. ) 193 #else 171 194 CALL lbc_lnk( 'usrdef_istate', pssh, 'T', 1. ) 195 #endif 172 196 END DO 173 197 … … 176 200 ! salinity: 177 201 DO jk=1, jpkm1 178 pts(:,:,jk,jp_sal) = gphit(:,:)202 pts(:,:,jk,jp_sal) = pssh(:,:) 179 203 END DO 180 204 ! velocities: … … 210 234 zf0 = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 211 235 zumax = rn_vtxmax * SIGN(1._wp, zf0) ! Here Anticyclonic: set zumax=-1 for cyclonic 212 zlambda = SQRT(2._wp)*rn_lambda ! Horizontal scale in meters236 zlambda = SQRT(2._wp)*rn_lambda*1.e3 ! Horizontal scale in meters 213 237 zn2 = 3.e-3**2 214 238 zH = 0.5_wp * 5000._wp … … 281 305 282 306 IF (ln_sshnoise) THEN 307 CALL RANDOM_SEED() 283 308 CALL RANDOM_NUMBER(zrandom) 284 309 pssh(:,:) = pssh(:,:) + ( 0.1 * zrandom(:,:) - 0.05 ) 285 310 END IF 311 #if defined key_mpi3 312 CALL lbc_lnk_nc_multi( 'usrdef_istate', pssh, 'T', 1. ) 313 CALL lbc_lnk_nc_multi( 'usrdef_istate', pts , 'T', 1. ) 314 CALL lbc_lnk_nc_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 315 #else 286 316 CALL lbc_lnk( 'usrdef_istate', pssh, 'T', 1. ) 287 317 CALL lbc_lnk( 'usrdef_istate', pts , 'T', 1. ) 288 318 CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 319 #endif 289 320 290 321 END SUBROUTINE usr_def_istate -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/usrdef_nam.F90
r13286 r13632 50 50 LOGICAL , PUBLIC :: ln_sshnoise=.false. ! add random noise on initial ssh 51 51 REAL(wp), PUBLIC :: rn_lambda = 50. ! gaussian lambda 52 INTEGER , PUBLIC :: nn_perio = 0 ! periodicity of the channel (0=closed, 1=E-W) 52 53 53 54 !!---------------------------------------------------------------------- … … 79 80 !! 80 81 NAMELIST/namusr_def/ rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio & 81 & , nn_fcase, rn_ppgphi0, rn_ vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy&82 & , rn_ u10, rn_windszx, rn_windszy, rn_uofac&83 & , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda 82 & , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac & 83 & , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy & 84 & , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio 84 85 !!---------------------------------------------------------------------- 85 86 ! … … 148 149 WRITE(numout,*) ' add random noise on initial ssh ln_sshnoise= ', ln_sshnoise 149 150 WRITE(numout,*) ' Gaussian lambda parameter rn_lambda = ', rn_lambda 150 WRITE(numout,*) ' ' 151 WRITE(numout,*) ' Lateral boundary condition of the global domain' 152 WRITE(numout,*) ' EW_CANAL : closed basin jperio = ', kperio 151 WRITE(numout,*) ' Periodicity of the basin nn_perio = ', nn_perio 153 152 ENDIF 153 ! ! Set the lateral boundary condition of the global domain 154 kperio = nn_perio ! EW_CANAL configuration : closed basin 154 155 ! 155 156 END SUBROUTINE usr_def_nam -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/usrdef_sbc.F90
r12740 r13632 17 17 USE sbc_oce ! Surface boundary condition: ocean fields 18 18 USE phycst ! physical constants 19 USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy 19 USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy, rn_windszx 20 20 ! 21 21 USE in_out_manager ! I/O manager … … 69 69 ! 70 70 utau(:,:) = 0._wp 71 IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN72 WHERE( ABS(gphit) <= rn_windszy/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u1073 ENDIF74 71 vtau(:,:) = 0._wp 75 72 taum(:,:) = 0._wp … … 81 78 qsr (:,:) = 0._wp 82 79 ! 80 ENDIF 81 82 IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN 83 IF( nyear == 1 .AND. nmonth == 1 .AND. nday <= 10 ) THEN 84 WHERE( ABS(gphit) <= rn_windszy/2. .AND. ABS(glamt) <= rn_windszx/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u10 85 ELSE 86 utau(:,:) = 0. 87 ENDIF 83 88 ENDIF 84 89 -
NEMO/branches/2020/dev_r13296_HPC-07_mocavero_mpi3/tests/CANAL/MY_SRC/usrdef_zgr.F90
r12740 r13632 197 197 zmaxlam = MAXVAL(glamt) 198 198 CALL mpp_max( 'usrdef_zgr', zmaxlam ) ! max over the global domain 199 zscl = rpi / zmaxlam200 z2d(:,:) = 0.5 * ( 1. - COS( glamt(:,:) * zscl ))201 z2d(:,:) = REAL(jpkm1 - NINT( 0. 75 * REAL(jpkm1,wp) * z2d(:,:) ), wp)199 zscl = 0.5 * rpi / zmaxlam 200 z2d(:,:) = COS( glamt(:,:) * zscl ) 201 z2d(:,:) = REAL(jpkm1 - NINT( 0.5 * REAL(jpkm1,wp) * z2d(:,:) ), wp) 202 202 END SELECT 203 203 ! 204 #if defined key_mpi3 205 CALL lbc_lnk_nc_multi( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (here jperio=0 ==>> closed) 206 #else 204 207 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (here jperio=0 ==>> closed) 208 #endif 205 209 ! 206 210 k_bot(:,:) = NINT( z2d(:,:) ) ! =jpkm1 over the ocean point, =0 elsewhere
Note: See TracChangeset
for help on using the changeset viewer.