- Timestamp:
- 2020-05-15T19:41:01+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette@ HEADsette10 ^/utils/CI/sette@12931 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/BDY/bdydta.F90
r12547 r12939 91 91 INTEGER :: jbdy, jfld, jstart, jend, ib, jl ! dummy loop indices 92 92 INTEGER :: ii, ij, ik, igrd, ipl ! local integers 93 INTEGER, DIMENSION(jpbgrd) :: ilen194 93 TYPE(OBC_DATA) , POINTER :: dta_alias ! short cut 95 94 TYPE(FLD), DIMENSION(:), POINTER :: bf_alias … … 116 115 END DO 117 116 ENDIF 118 IF( dta_bdy(jbdy)%lneed_dyn2d) THEN117 IF( ASSOCIATED(dta_bdy(jbdy)%u2d) ) THEN ! no SIZE with a unassociated pointer. v2d and u2d can differ on subdomain 119 118 igrd = 2 120 DO ib = 1, SIZE(dta_bdy(jbdy)%u2d) ! u2d is used only on the rim except if ln_full_vel = T, see bdy_dta_init119 DO ib = 1, SIZE(dta_bdy(jbdy)%u2d) ! u2d is used either over the whole bdy or only on the rim 121 120 ii = idx_bdy(jbdy)%nbi(ib,igrd) 122 121 ij = idx_bdy(jbdy)%nbj(ib,igrd) 123 122 dta_bdy(jbdy)%u2d(ib) = uu_b(ii,ij,Kmm) * umask(ii,ij,1) 124 123 END DO 124 ENDIF 125 IF( ASSOCIATED(dta_bdy(jbdy)%v2d) ) THEN ! no SIZE with a unassociated pointer. v2d and u2d can differ on subdomain 125 126 igrd = 3 126 DO ib = 1, SIZE(dta_bdy(jbdy)%v2d) ! v2d is used only on the rim except if ln_full_vel = T, see bdy_dta_init127 DO ib = 1, SIZE(dta_bdy(jbdy)%v2d) ! v2d is used either over the whole bdy or only on the rim 127 128 ii = idx_bdy(jbdy)%nbi(ib,igrd) 128 129 ij = idx_bdy(jbdy)%nbj(ib,igrd) … … 210 211 ! 211 212 ! if runoff condition: change river flow we read (in m3/s) into barotropic velocity (m/s) 212 IF( cn_tra(jbdy) == 'runoff' .AND. TRIM(bf_alias(jp_bdyu2d)%clrootname) /= 'NOT USED' ) THEN ! runoff and we read u/v2d213 IF( cn_tra(jbdy) == 'runoff' ) THEN ! runoff 213 214 ! 214 igrd = 2 ! zonal flow (m3/s) to barotropic zonal velocity (m/s) 215 DO ib = 1, idx_bdy(jbdy)%nblen(igrd) 216 ii = idx_bdy(jbdy)%nbi(ib,igrd) 217 ij = idx_bdy(jbdy)%nbj(ib,igrd) 218 dta_alias%u2d(ib) = dta_alias%u2d(ib) / ( e2u(ii,ij) * hu_0(ii,ij) ) 219 END DO 220 igrd = 3 ! meridional flow (m3/s) to barotropic meridional velocity (m/s) 221 DO ib = 1, idx_bdy(jbdy)%nblen(igrd) 222 ii = idx_bdy(jbdy)%nbi(ib,igrd) 223 ij = idx_bdy(jbdy)%nbj(ib,igrd) 224 dta_alias%v2d(ib) = dta_alias%v2d(ib) / ( e1v(ii,ij) * hv_0(ii,ij) ) 225 END DO 215 IF( ASSOCIATED(dta_bdy(jbdy)%u2d) ) THEN ! no SIZE with a unassociated pointer. v2d and u2d can differ on subdomain 216 igrd = 2 ! zonal flow (m3/s) to barotropic zonal velocity (m/s) 217 DO ib = 1, SIZE(dta_alias%u2d) ! u2d is used either over the whole bdy or only on the rim 218 ii = idx_bdy(jbdy)%nbi(ib,igrd) 219 ij = idx_bdy(jbdy)%nbj(ib,igrd) 220 dta_alias%u2d(ib) = dta_alias%u2d(ib) / ( e2u(ii,ij) * hu_0(ii,ij) ) 221 END DO 222 ENDIF 223 IF( ASSOCIATED(dta_bdy(jbdy)%v2d) ) THEN ! no SIZE with a unassociated pointer. v2d and u2d can differ on subdomain 224 igrd = 3 ! meridional flow (m3/s) to barotropic meridional velocity (m/s) 225 DO ib = 1, SIZE(dta_alias%v2d) ! v2d is used either over the whole bdy or only on the rim 226 ii = idx_bdy(jbdy)%nbi(ib,igrd) 227 ij = idx_bdy(jbdy)%nbj(ib,igrd) 228 dta_alias%v2d(ib) = dta_alias%v2d(ib) / ( e1v(ii,ij) * hv_0(ii,ij) ) 229 END DO 230 ENDIF 226 231 ENDIF 227 232 228 233 ! tidal harmonic forcing ONLY: initialise arrays 229 234 IF( nn_dyn2d_dta(jbdy) == 2 ) THEN ! we did not read ssh, u/v2d 230 IF( dta_alias%lneed_ssh) dta_alias%ssh(:) = 0._wp231 IF( dta_alias%lneed_dyn2d) dta_alias%u2d(:) = 0._wp232 IF( dta_alias%lneed_dyn2d) dta_alias%v2d(:) = 0._wp235 IF( ASSOCIATED(dta_alias%ssh) ) dta_alias%ssh(:) = 0._wp 236 IF( ASSOCIATED(dta_alias%u2d) ) dta_alias%u2d(:) = 0._wp 237 IF( ASSOCIATED(dta_alias%v2d) ) dta_alias%v2d(:) = 0._wp 233 238 ENDIF 234 239 … … 237 242 ! 238 243 igrd = 2 ! zonal velocity 239 dta_alias%u2d(:) = 0._wp ! compute barotrope zonal velocity and put it in u2d240 244 DO ib = 1, idx_bdy(jbdy)%nblen(igrd) 241 245 ii = idx_bdy(jbdy)%nbi(ib,igrd) 242 246 ij = idx_bdy(jbdy)%nbj(ib,igrd) 247 dta_alias%u2d(ib) = 0._wp ! compute barotrope zonal velocity and put it in u2d 243 248 DO ik = 1, jpkm1 244 249 dta_alias%u2d(ib) = dta_alias%u2d(ib) + e3u(ii,ij,ik,Kmm) * umask(ii,ij,ik) * dta_alias%u3d(ib,ik) … … 250 255 END DO 251 256 igrd = 3 ! meridional velocity 252 dta_alias%v2d(:) = 0._wp ! compute barotrope meridional velocity and put it in v2d253 257 DO ib = 1, idx_bdy(jbdy)%nblen(igrd) 254 258 ii = idx_bdy(jbdy)%nbi(ib,igrd) 255 259 ij = idx_bdy(jbdy)%nbj(ib,igrd) 260 dta_alias%v2d(ib) = 0._wp ! compute barotrope meridional velocity and put it in v2d 256 261 DO ik = 1, jpkm1 257 262 dta_alias%v2d(ib) = dta_alias%v2d(ib) + e3v(ii,ij,ik,Kmm) * vmask(ii,ij,ik) * dta_alias%v3d(ib,ik) … … 275 280 276 281 #if defined key_si3 277 IF( dta_alias%lneed_ice ) THEN282 IF( dta_alias%lneed_ice .AND. idx_bdy(jbdy)%nblen(1) > 0 ) THEN 278 283 ! fill temperature and salinity arrays 279 284 IF( TRIM(bf_alias(jp_bdyt_i)%clrootname) == 'NOT USED' ) bf_alias(jp_bdyt_i)%fnow(:,1,:) = rice_tem (jbdy) … … 330 335 DO jbdy = 1, nb_bdy ! Tidal component added in ts loop 331 336 IF ( nn_dyn2d_dta(jbdy) .GE. 2 ) THEN 332 IF( cn_dyn2d(jbdy) == 'frs' ) THEN ; ilen1(:)=idx_bdy(jbdy)%nblen(:) 333 ELSE ; ilen1(:)=idx_bdy(jbdy)%nblenrim(:) 334 ENDIF 335 IF ( dta_bdy(jbdy)%lneed_ssh ) dta_bdy_s(jbdy)%ssh(1:ilen1(1)) = dta_bdy(jbdy)%ssh(1:ilen1(1)) 336 IF ( dta_bdy(jbdy)%lneed_dyn2d ) dta_bdy_s(jbdy)%u2d(1:ilen1(2)) = dta_bdy(jbdy)%u2d(1:ilen1(2)) 337 IF ( dta_bdy(jbdy)%lneed_dyn2d ) dta_bdy_s(jbdy)%v2d(1:ilen1(3)) = dta_bdy(jbdy)%v2d(1:ilen1(3)) 337 IF( ASSOCIATED(dta_bdy(jbdy)%ssh) ) dta_bdy_s(jbdy)%ssh(:) = dta_bdy(jbdy)%ssh(:) 338 IF( ASSOCIATED(dta_bdy(jbdy)%u2d) ) dta_bdy_s(jbdy)%u2d(:) = dta_bdy(jbdy)%u2d(:) 339 IF( ASSOCIATED(dta_bdy(jbdy)%v2d) ) dta_bdy_s(jbdy)%v2d(:) = dta_bdy(jbdy)%v2d(:) 338 340 ENDIF 339 341 END DO 340 342 ELSE ! Add tides if not split-explicit free surface else this is done in ts loop 341 343 ! 342 ! BDY: use pt_offset=1.0 as applied at the end of the step and bdy_dta_tides is referenced at the middle of the step343 344 CALL bdy_dta_tides( kt=kt, pt_offset = 1._wp ) 344 345 ENDIF … … 348 349 ! 349 350 END SUBROUTINE bdy_dta 350 351 351 352 352 353 SUBROUTINE bdy_dta_init … … 380 381 LOGICAL :: llneed ! 381 382 LOGICAL :: llread ! 383 LOGICAL :: llfullbdy ! 382 384 TYPE(FLD_N), DIMENSION(1), TARGET :: bn_tem, bn_sal, bn_u3d, bn_v3d ! must be an array to be used with fld_fill 383 385 TYPE(FLD_N), DIMENSION(1), TARGET :: bn_ssh, bn_u2d, bn_v2d ! informations about the fields to be read … … 494 496 igrd = 2 ! U point 495 497 ipk = 1 ! surface data 496 llneed = dta_bdy(jbdy)%lneed_dyn2d ! dta_bdy(jbdy)% sshwill be needed498 llneed = dta_bdy(jbdy)%lneed_dyn2d ! dta_bdy(jbdy)%u2d will be needed 497 499 llread = .NOT. ln_full_vel .AND. MOD(nn_dyn2d_dta(jbdy),2) == 1 ! don't get u2d from u3d and read NetCDF file 498 500 bf_alias => bf(jp_bdyu2d,jbdy:jbdy) ! alias for u2d structure of bdy number jbdy 499 501 bn_alias => bn_u2d ! alias for u2d structure of nambdy_dta 500 IF( ln_full_vel ) THEN ; iszdim = idx_bdy(jbdy)%nblen(igrd) ! will be computed from u3d -> need on the full bdy 501 ELSE ; iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! used only on the rim 502 llfullbdy = ln_full_vel .OR. cn_dyn2d(jbdy) == 'frs' ! need u2d over the whole bdy or only over the rim? 503 IF( llfullbdy ) THEN ; iszdim = idx_bdy(jbdy)%nblen(igrd) 504 ELSE ; iszdim = idx_bdy(jbdy)%nblenrim(igrd) 502 505 ENDIF 503 506 ENDIF … … 506 509 igrd = 3 ! V point 507 510 ipk = 1 ! surface data 508 llneed = dta_bdy(jbdy)%lneed_dyn2d ! dta_bdy(jbdy)% sshwill be needed511 llneed = dta_bdy(jbdy)%lneed_dyn2d ! dta_bdy(jbdy)%v2d will be needed 509 512 llread = .NOT. ln_full_vel .AND. MOD(nn_dyn2d_dta(jbdy),2) == 1 ! don't get v2d from v3d and read NetCDF file 510 513 bf_alias => bf(jp_bdyv2d,jbdy:jbdy) ! alias for v2d structure of bdy number jbdy 511 514 bn_alias => bn_v2d ! alias for v2d structure of nambdy_dta 512 IF( ln_full_vel ) THEN ; iszdim = idx_bdy(jbdy)%nblen(igrd) ! will be computed from v3d -> need on the full bdy 513 ELSE ; iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! used only on the rim 515 llfullbdy = ln_full_vel .OR. cn_dyn2d(jbdy) == 'frs' ! need v2d over the whole bdy or only over the rim? 516 IF( llfullbdy ) THEN ; iszdim = idx_bdy(jbdy)%nblen(igrd) 517 ELSE ; iszdim = idx_bdy(jbdy)%nblenrim(igrd) 514 518 ENDIF 515 519 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.