Changeset 14818
- Timestamp:
- 2021-05-09T17:55:54+02:00 (4 years ago)
- Location:
- NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DOM/domtile.F90
r14805 r14818 52 52 !!---------------------------------------------------------------------- 53 53 IF( ln_tile .AND. nn_hls /= 2 ) CALL ctl_stop('dom_tile_init: Tiling is only supported for nn_hls = 2') 54 #if defined key_loop_fusion55 IF( ln_tile ) THEN56 CALL ctl_warn('Tiling is not yet implemented for key_loop_fusion; ln_tile is forced to FALSE')57 ln_tile = .FALSE.58 CALL dom_tile_init59 ENDIF60 #endif61 54 62 55 ntile = 0 ! Initialise to full domain -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DYN/dynhpg.F90
r14787 r14818 118 118 CASE ( np_zps ) ; CALL hpg_zps ( kt, Kmm, puu, pvv, Krhs ) ! z-coordinate plus partial steps (interpolation) 119 119 CASE ( np_sco ) ; CALL hpg_sco ( kt, Kmm, puu, pvv, Krhs ) ! s-coordinate (standard jacobian formulation) 120 CASE ( np_djc ) 121 ! [ comm_cleanup ] : it should not be needed but the removal/shift of this lbc_lnk results in a seg_fault error 122 ! TODO: [tiling] to check if still needed 123 !#if defined key_qco 124 ! IF (nn_hls==2) CALL lbc_lnk( 'dynhpg', r3t(:,:,Kmm), 'T', 1.) 125 !#endif 126 CALL hpg_djc ( kt, Kmm, puu, pvv, Krhs ) ! s-coordinate (Density Jacobian with Cubic polynomial) 120 CASE ( np_djc ) ; CALL hpg_djc ( kt, Kmm, puu, pvv, Krhs ) ! s-coordinate (Density Jacobian with Cubic polynomial) 127 121 CASE ( np_prj ) ; CALL hpg_prj ( kt, Kmm, puu, pvv, Krhs ) ! s-coordinate (Pressure Jacobian scheme) 128 122 CASE ( np_isf ) ; CALL hpg_isf ( kt, Kmm, puu, pvv, Krhs ) ! s-coordinate similar to sco modify for ice shelf -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DYN/dynldf_iso_lf.F90
r14805 r14818 51 51 !! *** ROUTINE dyn_ldf_iso_alloc *** 52 52 !!---------------------------------------------------------------------- 53 ALLOCATE( akzu(jpi,jpj,jpk) , akzv(jpi,jpj,jpk) , STAT=dyn_ldf_iso_alloc_lf ) 54 ! 55 IF( dyn_ldf_iso_alloc_lf /= 0 ) CALL ctl_warn('dyn_ldf_iso_alloc_lf: array allocate failed.') 53 dyn_ldf_iso_alloc_lf = 0 54 IF( .NOT. ALLOCATED( akzu ) ) THEN 55 ALLOCATE( akzu(jpi,jpj,jpk), akzv(jpi,jpj,jpk), STAT=dyn_ldf_iso_alloc_lf ) 56 ! 57 IF( dyn_ldf_iso_alloc_lf /= 0 ) CALL ctl_warn('dyn_ldf_iso_alloc: array allocate failed.') 58 ENDIF 56 59 END FUNCTION dyn_ldf_iso_alloc_lf 57 60 … … 112 115 REAL(wp) :: zdjv, zdjv_km1, zdj1v, zdj1v_km1 113 116 REAL(wp) :: zdiv_im1_km1, zdiv, zdiv_im1, zdiv_km1 ! - - 114 REAL(wp), DIMENSION( jpi,jpj) :: ziut, zivf, zdku, zdk1u ! 2D workspace115 REAL(wp), DIMENSION( jpi,jpj) :: zjuf, zjvt, zdkv, zdk1v ! - -116 REAL(wp), DIMENSION( jpi,jpk) :: zfuw, zfvw117 REAL(wp), DIMENSION(A2D(nn_hls)) :: ziut, zivf, zdku, zdk1u ! 2D workspace 118 REAL(wp), DIMENSION(A2D(nn_hls)) :: zjuf, zjvt, zdkv, zdk1v ! - - 119 REAL(wp), DIMENSION(A1Di(nn_hls),jpk) :: zfuw, zfvw 117 120 !!---------------------------------------------------------------------- 118 121 ! 119 IF( kt == nit000 ) THEN 120 IF(lwp) WRITE(numout,*) 121 IF(lwp) WRITE(numout,*) 'dyn_ldf_iso_lf : iso-neutral laplacian diffusive operator or ' 122 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ s-coordinate horizontal diffusive operator' 123 ! ! allocate dyn_ldf_bilap arrays 124 IF( dyn_ldf_iso_alloc_lf() /= 0 ) CALL ctl_stop('STOP', 'dyn_ldf_iso: failed to allocate arrays') 122 IF( .NOT. l_istiled .OR. ntile == 1 ) THEN ! Do only on the first tile 123 IF( kt == nit000 ) THEN 124 IF(lwp) WRITE(numout,*) 125 IF(lwp) WRITE(numout,*) 'dyn_ldf_iso_lf : iso-neutral laplacian diffusive operator or ' 126 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ s-coordinate horizontal diffusive operator' 127 ! ! allocate dyn_ldf_bilap arrays 128 IF( dyn_ldf_iso_alloc_lf() /= 0 ) CALL ctl_stop('STOP', 'dyn_ldf_iso: failed to allocate arrays') 129 ENDIF 125 130 ENDIF 126 131 … … 129 134 IF( ln_dynldf_hor .AND. ln_traldf_iso ) THEN 130 135 ! 131 DO_3D ( 1, 1, 1, 1, 1, jpk ) ! set the slopes of iso-level136 DO_3D_OVR( 1, 1, 1, 1, 1, jpk ) ! set the slopes of iso-level 132 137 uslp (ji,jj,jk) = - ( gdept(ji+1,jj,jk,Kbb) - gdept(ji ,jj ,jk,Kbb) ) * r1_e1u(ji,jj) * umask(ji,jj,jk) 133 138 vslp (ji,jj,jk) = - ( gdept(ji,jj+1,jk,Kbb) - gdept(ji ,jj ,jk,Kbb) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk) … … 149 154 ! zdkv(jk=1)=zdkv(jk=2) 150 155 151 zdk1u(:,:) = ( puu(:,:,jk,Kbb) -puu(:,:,jk+1,Kbb) ) * umask(:,:,jk+1) 152 zdk1v(:,:) = ( pvv(:,:,jk,Kbb) -pvv(:,:,jk+1,Kbb) ) * vmask(:,:,jk+1) 156 DO_2D( 1, 1, 1, 1 ) 157 zdk1u(ji,jj) = ( puu(ji,jj,jk,Kbb) -puu(ji,jj,jk+1,Kbb) ) * umask(ji,jj,jk+1) 158 zdk1v(ji,jj) = ( pvv(ji,jj,jk,Kbb) -pvv(ji,jj,jk+1,Kbb) ) * vmask(ji,jj,jk+1) 159 END_2D 153 160 154 161 IF( jk == 1 ) THEN … … 156 163 zdkv(:,:) = zdk1v(:,:) 157 164 ELSE 158 zdku(:,:) = ( puu(:,:,jk-1,Kbb) - puu(:,:,jk,Kbb) ) * umask(:,:,jk) 159 zdkv(:,:) = ( pvv(:,:,jk-1,Kbb) - pvv(:,:,jk,Kbb) ) * vmask(:,:,jk) 165 DO_2D( 1, 1, 1, 1 ) 166 zdku(ji,jj) = ( puu(ji,jj,jk-1,Kbb) - puu(ji,jj,jk,Kbb) ) * umask(ji,jj,jk) 167 zdkv(ji,jj) = ( pvv(ji,jj,jk-1,Kbb) - pvv(ji,jj,jk,Kbb) ) * vmask(ji,jj,jk) 168 END_2D 160 169 ENDIF 161 170 … … 283 292 284 293 ! ! =============== 285 DO jj = 3, jpj-2! Vertical slab294 DO jj = ntsj, ntej ! Vertical slab 286 295 ! ! =============== 287 296 … … 295 304 296 305 ! Surface and bottom vertical fluxes set to zero 297 DO ji = 1, jpi306 DO ji = ntsi - nn_hls, ntei + nn_hls 298 307 zfuw(ji, 1 ) = 0.e0 299 308 zfvw(ji, 1 ) = 0.e0 … … 304 313 ! interior (2=<jk=<jpk-1) on U and V fields 305 314 DO jk = 2, jpkm1 306 DO ji = 3, jpi-2315 DO ji = ntsi, ntei 307 316 ! I.1 horizontal momentum gradient 308 317 ! -------------------------------- … … 377 386 ! ------------------------------------------------------------------- 378 387 DO jk = 1, jpkm1 379 DO ji = 3, jpi-2388 DO ji = ntsi, ntei 380 389 puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + ( zfuw(ji,jk) - zfuw(ji,jk+1) ) * r1_e1e2u(ji,jj) & 381 390 & / e3u(ji,jj,jk,Kmm) -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DYN/dynldf_lap_blp.F90
r14805 r14818 50 50 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pu_rhs, pv_rhs ! velocity trend [m/s2] 51 51 !! 52 #if defined key_loop_fusion 53 CALL dyn_ldf_lap_lf( kt, Kbb, Kmm, pu, pv, pu_rhs, pv_rhs, kpass ) 54 #else 52 55 CALL dyn_ldf_lap_t( kt, Kbb, Kmm, pu, pv, is_tile(pu), pu_rhs, pv_rhs, is_tile(pu_rhs), kpass ) 56 #endif 57 53 58 END SUBROUTINE dyn_ldf_lap 54 59 … … 83 88 !!---------------------------------------------------------------------- 84 89 ! 85 #if defined key_loop_fusion86 CALL dyn_ldf_lap_lf( kt, Kbb, Kmm, pu, pv, pu_rhs, pv_rhs, kpass )87 #else88 90 IF( .NOT. l_istiled .OR. ntile == 1 ) THEN ! Do only on the first tile 89 91 IF( kt == nit000 .AND. lwp ) THEN … … 178 180 END SELECT 179 181 ! 180 #endif181 182 END SUBROUTINE dyn_ldf_lap_t 182 183 -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DYN/dynldf_lap_blp_lf.F90
r14805 r14818 14 14 USE oce ! ocean dynamics and tracers 15 15 USE dom_oce ! ocean space and time domain 16 USE domutl, ONLY : is_tile 16 17 USE ldfdyn ! lateral diffusion: eddy viscosity coef. 17 18 USE ldfslp ! iso-neutral slopes … … 38 39 39 40 SUBROUTINE dyn_ldf_lap_lf( kt, Kbb, Kmm, pu, pv, pu_rhs, pv_rhs, kpass ) 41 !! 42 INTEGER , INTENT(in ) :: kt ! ocean time-step index 43 INTEGER , INTENT(in ) :: Kbb, Kmm ! ocean time level indices 44 INTEGER , INTENT(in ) :: kpass ! =1/2 first or second passage 45 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pu, pv ! before velocity [m/s] 46 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pu_rhs, pv_rhs ! velocity trend [m/s2] 47 !! 48 CALL dyn_ldf_lap_lf_t( kt, Kbb, Kmm, pu, pv, is_tile(pu), pu_rhs, pv_rhs, is_tile(pu_rhs), kpass ) 49 50 END SUBROUTINE dyn_ldf_lap_lf 51 52 SUBROUTINE dyn_ldf_lap_lf_t( kt, Kbb, Kmm, pu, pv, ktuv, pu_rhs, pv_rhs, ktuv_rhs, kpass ) 40 53 !!---------------------------------------------------------------------- 41 54 !! *** ROUTINE dyn_ldf_lap *** … … 51 64 !! Reference : S.Griffies, R.Hallberg 2000 Mon.Wea.Rev., DOI:/ 52 65 !!---------------------------------------------------------------------- 53 INTEGER , INTENT(in ) :: kt ! ocean time-step index 54 INTEGER , INTENT(in ) :: Kbb, Kmm ! ocean time level indices 55 INTEGER , INTENT(in ) :: kpass ! =1/2 first or second passage 56 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: pu, pv ! before velocity [m/s] 57 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pu_rhs, pv_rhs ! velocity trend [m/s2] 66 INTEGER , INTENT(in ) :: kt ! ocean time-step index 67 INTEGER , INTENT(in ) :: Kbb, Kmm ! ocean time level indices 68 INTEGER , INTENT(in ) :: kpass ! =1/2 first or second passage 69 INTEGER , INTENT(in ) :: ktuv, ktuv_rhs 70 REAL(wp), DIMENSION(A2D_T(ktuv) ,JPK), INTENT(in ) :: pu, pv ! before velocity [m/s] 71 REAL(wp), DIMENSION(A2D_T(ktuv_rhs),JPK), INTENT(inout) :: pu_rhs, pv_rhs ! velocity trend [m/s2] 58 72 ! 59 73 INTEGER :: ji, jj, jk ! dummy loop indices 74 INTEGER :: iij 60 75 REAL(wp) :: zsign ! local scalars 61 76 REAL(wp) :: zcur, zcur_im1, zcur_jm1 ! local scalars … … 64 79 !!---------------------------------------------------------------------- 65 80 ! 66 IF( kt == nit000 .AND. lwp ) THEN 67 WRITE(numout,*) 68 WRITE(numout,*) 'dyn_ldf_lf : iso-level harmonic (laplacian) operator, pass=', kpass 69 WRITE(numout,*) '~~~~~~~ ' 81 IF( .NOT. l_istiled .OR. ntile == 1 ) THEN ! Do only on the first tile 82 IF( kt == nit000 .AND. lwp ) THEN 83 WRITE(numout,*) 84 WRITE(numout,*) 'dyn_ldf_lf : iso-level harmonic (laplacian) operator, pass=', kpass 85 WRITE(numout,*) '~~~~~~~ ' 86 ENDIF 87 ENDIF 88 ! 89 ! Define pu_rhs/pv_rhs halo points for multi-point haloes in bilaplacian case 90 IF( nldf_dyn == np_blp .AND. kpass == 1 ) THEN ; iij = nn_hls 91 ELSE ; iij = 1 70 92 ENDIF 71 93 ! … … 78 100 CASE ( np_typ_rot ) !== Vorticity-Divergence operator ==! 79 101 ! 80 DO_3D( 1, 1, 1,1, 1, jpkm1 ) ! Horizontal slab102 DO_3D( iij-1, iij-1, iij-1, iij-1, 1, jpkm1 ) ! Horizontal slab 81 103 ! ! ahm * e3 * curl (computed from 1 to jpim1/jpjm1) 82 104 zcur = ahmf(ji,jj,jk) * e3f(ji,jj,jk) * r1_e1e2f(ji,jj) & ! ahmf already * by fmask … … 111 133 CASE ( np_typ_sym ) !== Symmetric operator ==! 112 134 ! 113 DO_3D( 1, 1, 1, 1, 1, jpkm1 )! Horizontal slab135 DO_3D( iij-1, iij-1, iij-1, iij-1, 1, jpkm1 ) ! Horizontal slab 114 136 ! ! shearing stress component (F-point) NB : ahmf has already been multiplied by fmask 115 137 zshe = ahmf(ji,jj,jk) & … … 161 183 END SELECT 162 184 ! 163 END SUBROUTINE dyn_ldf_lap_lf 185 END SUBROUTINE dyn_ldf_lap_lf_t 164 186 165 187 … … 182 204 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pu_rhs, pv_rhs ! momentum trend 183 205 ! 184 REAL(wp), DIMENSION( jpi,jpj,jpk) :: zulap, zvlap ! laplacian at u- and v-point206 REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zulap, zvlap ! laplacian at u- and v-point 185 207 !!---------------------------------------------------------------------- 186 208 ! -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OFF/nemogcm.F90
r14574 r14818 323 323 CALL mpp_init 324 324 325 #if defined key_loop_fusion 326 IF( nn_hls == 1 ) THEN 327 CALL ctl_stop( 'STOP', 'nemogcm : Loop fusion can be used only with extra-halo' ) 328 ENDIF 329 #endif 330 325 331 CALL halo_mng_init() 326 332 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/SAS/nemogcm.F90
r14574 r14818 352 352 CALL mpp_init 353 353 354 #if defined key_loop_fusion 355 IF( nn_hls == 1 ) THEN 356 CALL ctl_stop( 'STOP', 'nemogcm : Loop fusion can be used only with extra-halo' ) 357 ENDIF 358 #endif 359 354 360 CALL halo_mng_init() 355 361 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays -
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/SWE/nemogcm.F90
r14574 r14818 273 273 CALL mpp_init 274 274 275 #if defined key_loop_fusion 276 IF( nn_hls == 1 ) THEN 277 CALL ctl_stop( 'STOP', 'nemogcm : Loop fusion can be used only with extra-halo' ) 278 ENDIF 279 #endif 280 275 281 CALL halo_mng_init() 276 282 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays
Note: See TracChangeset
for help on using the changeset viewer.