119 integer,
intent(in) :: ng, lbi, ubi, lbj, ubj
133 size2d=real((ubi-lbi+1)*(ubj-lbj+1),
r8)
137 allocate (
coupling(ng) % DU_avg1(lbi:ubi,lbj:ubj) )
140 allocate (
coupling(ng) % DU_avg2(lbi:ubi,lbj:ubj) )
143 allocate (
coupling(ng) % DV_avg1(lbi:ubi,lbj:ubj) )
146 allocate (
coupling(ng) % DV_avg2(lbi:ubi,lbj:ubj) )
149 allocate (
coupling(ng) % Zt_avg1(lbi:ubi,lbj:ubj) )
152 allocate (
coupling(ng) % rufrc(lbi:ubi,lbj:ubj) )
155 allocate (
coupling(ng) % rvfrc(lbi:ubi,lbj:ubj) )
159 allocate (
coupling(ng) % rhoA(lbi:ubi,lbj:ubj) )
162 allocate (
coupling(ng) % rhoS(lbi:ubi,lbj:ubj) )
166# if defined TANGENT || defined TL_IOMS
170 allocate (
coupling(ng) % tl_DU_avg1(lbi:ubi,lbj:ubj) )
173 allocate (
coupling(ng) % tl_DU_avg2(lbi:ubi,lbj:ubj) )
176 allocate (
coupling(ng) % tl_DV_avg1(lbi:ubi,lbj:ubj) )
179 allocate (
coupling(ng) % tl_DV_avg2(lbi:ubi,lbj:ubj) )
182 allocate (
coupling(ng) % tl_Zt_avg1(lbi:ubi,lbj:ubj) )
185 allocate (
coupling(ng) % tl_rufrc(lbi:ubi,lbj:ubj) )
188 allocate (
coupling(ng) % tl_rvfrc(lbi:ubi,lbj:ubj) )
191# ifdef VAR_RHO_2D_NOT_YET
192 allocate (
coupling(ng) % tl_rhoA(lbi:ubi,lbj:ubj) )
195 allocate (
coupling(ng) % tl_rhoS(lbi:ubi,lbj:ubj) )
204 allocate (
coupling(ng) % ad_DU_avg1(lbi:ubi,lbj:ubj) )
207 allocate (
coupling(ng) % ad_DU_avg2(lbi:ubi,lbj:ubj) )
210 allocate (
coupling(ng) % ad_DV_avg1(lbi:ubi,lbj:ubj) )
213 allocate (
coupling(ng) % ad_DV_avg2(lbi:ubi,lbj:ubj) )
216 allocate (
coupling(ng) % ad_Zt_avg1(lbi:ubi,lbj:ubj) )
219 allocate (
coupling(ng) % ad_rufrc(lbi:ubi,lbj:ubj) )
222 allocate (
coupling(ng) % ad_rvfrc(lbi:ubi,lbj:ubj) )
225# ifdef VAR_RHO_2D_NOT_YET
226 allocate (
coupling(ng) % ad_rhoA(lbi:ubi,lbj:ubj) )
229 allocate (
coupling(ng) % ad_rhoS(lbi:ubi,lbj:ubj) )
234# if defined FORWARD_READ && \
235 (defined tangent || defined tl_ioms || defined adjoint)
240 allocate (
coupling(ng) % DU_avg1G(lbi:ubi,lbj:ubj,2) )
243 allocate (
coupling(ng) % DU_avg2G(lbi:ubi,lbj:ubj,2) )
246 allocate (
coupling(ng) % DV_avg1G(lbi:ubi,lbj:ubj,2) )
249 allocate (
coupling(ng) % DV_avg2G(lbi:ubi,lbj:ubj,2) )
252 allocate (
coupling(ng) % rufrcG(lbi:ubi,lbj:ubj,2) )
255 allocate (
coupling(ng) % rvfrcG(lbi:ubi,lbj:ubj,2) )
272# ifdef SUBOBJECT_DEALLOCATION
278 integer,
intent(in) :: ng
282 character (len=*),
parameter :: myfile = &
283 & __FILE__//
", deallocate_coupling"
285# ifdef SUBOBJECT_DEALLOCATION
294 & __line__,
'COUPLING(ng)%DU_avg1'))
RETURN
297 & __line__,
'COUPLING(ng)%DU_avg2'))
RETURN
300 & __line__,
'COUPLING(ng)%DV_avg1'))
RETURN
303 & __line__,
'COUPLING(ng)%DV_avg2'))
RETURN
306 & __line__,
'COUPLING(ng)%Zt_avg1'))
RETURN
309 & __line__,
'COUPLING(ng)%rufrc'))
RETURN
312 & __line__,
'COUPLING(ng)%rvfrc'))
RETURN
316 & __line__,
'COUPLING(ng)%rhoA'))
RETURN
319 & __line__,
'COUPLING(ng)%rhoS'))
RETURN
322# if defined TANGENT || defined TL_IOMS
327 & __line__,
'COUPLING(ng)%tl_DU_avg1'))
RETURN
330 & __line__,
'COUPLING(ng)%tl_DU_avg2'))
RETURN
333 & __line__,
'COUPLING(ng)%tl_DV_avg1'))
RETURN
336 & __line__,
'COUPLING(ng)%tl_DV_avg2'))
RETURN
339 & __line__,
'COUPLING(ng)%tl_Zt_avg1'))
RETURN
342 & __line__,
'COUPLING(ng)%tl_rufrc'))
RETURN
345 & __line__,
'COUPLING(ng)%tl_rvfrc'))
RETURN
347# ifdef VAR_RHO_2D_NOT_YET
349 & __line__,
'COUPLING(ng)%tl_rhoA'))
RETURN
352 & __line__,
'COUPLING(ng)%tl_rhoS'))
RETURN
361 & __line__,
'COUPLING(ng)%ad_DU_avg1'))
RETURN
364 & __line__,
'COUPLING(ng)%ad_DU_avg2'))
RETURN
367 & __line__,
'COUPLING(ng)%ad_DV_avg1'))
RETURN
370 & __line__,
'COUPLING(ng)%ad_DV_avg2'))
RETURN
373 & __line__,
'COUPLING(ng)%ad_Zt_avg1'))
RETURN
376 & __line__,
'COUPLING(ng)%ad_rufrc'))
RETURN
379 & __line__,
'COUPLING(ng)%ad_rvfrc'))
RETURN
381# ifdef VAR_RHO_2D_NOT_YET
383 & __line__,
'COUPLING(ng)%ad_rhoA'))
RETURN
386 & __line__,
'COUPLING(ng)%ad_rhoS'))
RETURN
390# if defined FORWARD_READ && \
391 (defined tangent || defined tl_ioms || defined adjoint)
397 & __line__,
'COUPLING(ng)%DU_avg1G'))
RETURN
400 & __line__,
'COUPLING(ng)%DU_avg2G'))
RETURN
403 & __line__,
'COUPLING(ng)%DV_avg1G'))
RETURN
406 & __line__,
'COUPLING(ng)%DV_avg2G'))
RETURN
409 & __line__,
'COUPLING(ng)%rufrcG'))
RETURN
412 & __line__,
'COUPLING(ng)%rvfrcG'))
RETURN
443 integer,
intent(in) :: ng, tile, model
447 integer :: imin, imax, jmin, jmax
450 real(
r8),
parameter :: inival = 0.0_r8
452# include "set_bounds.h"
462 IF (
domain(ng)%Western_Edge(tile))
THEN
467 IF (
domain(ng)%Eastern_Edge(tile))
THEN
472 IF (
domain(ng)%Southern_Edge(tile))
THEN
477 IF (
domain(ng)%Northern_Edge(tile))
THEN
490 IF ((model.eq.0).or.(model.eq.
inlm))
THEN
493 coupling(ng) % DU_avg1(i,j) = inival
494 coupling(ng) % DU_avg2(i,j) = inival
496 coupling(ng) % DV_avg1(i,j) = inival
497 coupling(ng) % DV_avg2(i,j) = inival
499 coupling(ng) % Zt_avg1(i,j) = inival
512# if defined TANGENT || defined TL_IOMS
516 IF ((model.eq.0).or.(model.eq.
itlm).or.(model.eq.
irpm))
THEN
519 coupling(ng) % tl_DU_avg1(i,j) = inival
520 coupling(ng) % tl_DU_avg2(i,j) = inival
522 coupling(ng) % tl_DV_avg1(i,j) = inival
523 coupling(ng) % tl_DV_avg2(i,j) = inival
525 coupling(ng) % tl_Zt_avg1(i,j) = inival
527 coupling(ng) % tl_rufrc(i,j) = inival
528 coupling(ng) % tl_rvfrc(i,j) = inival
530# ifdef VAR_RHO_2D_NOT_YET
531 coupling(ng) % tl_rhoA(i,j) = inival
532 coupling(ng) % tl_rhoS(i,j) = inival
543 IF ((model.eq.0).or.(model.eq.
iadm))
THEN
546 coupling(ng) % ad_DU_avg1(i,j) = inival
547 coupling(ng) % ad_DU_avg2(i,j) = inival
549 coupling(ng) % ad_DV_avg1(i,j) = inival
550 coupling(ng) % ad_DV_avg2(i,j) = inival
552 coupling(ng) % ad_Zt_avg1(i,j) = inival
554 coupling(ng) % ad_rufrc(i,j) = inival
555 coupling(ng) % ad_rvfrc(i,j) = inival
557# ifdef VAR_RHO_2D_NOT_YET
558 coupling(ng) % ad_rhoA(i,j) = inival
559 coupling(ng) % ad_rhoS(i,j) = inival
566# if defined FORWARD_READ && \
567 (defined tangent || defined tl_ioms || defined adjoint)
575 coupling(ng) % DU_avg1G(i,j,1) = inival
576 coupling(ng) % DU_avg1G(i,j,2) = inival
577 coupling(ng) % DU_avg2G(i,j,1) = inival
578 coupling(ng) % DU_avg2G(i,j,2) = inival
580 coupling(ng) % DV_avg1G(i,j,1) = inival
581 coupling(ng) % DV_avg1G(i,j,2) = inival
582 coupling(ng) % DV_avg2G(i,j,1) = inival
583 coupling(ng) % DV_avg2G(i,j,2) = inival
585 coupling(ng) % rufrcG(i,j,1) = inival
586 coupling(ng) % rufrcG(i,j,2) = inival
587 coupling(ng) % rvfrcG(i,j,1) = inival
588 coupling(ng) % rvfrcG(i,j,2) = inival