58
59
65
66
67
68 integer, intent(in) :: ng, tile
69 integer, intent(in) :: LBi, UBi, LBj, UBj
70 integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
71 integer, intent(in) :: krhs, kstp, kout
72
73# ifdef ASSUMED_SHAPE
74 real(r8), intent(in) :: zeta(LBi:,LBj:,:)
75
76 real(r8), intent(inout) :: tl_zeta(LBi:,LBj:,:)
77# else
78 real(r8), intent(in) :: zeta(LBi:UBi,LBj:UBj,3)
79
80 real(r8), intent(inout) :: tl_zeta(LBi:UBi,LBj:UBj,3)
81# endif
82
83
84
85 integer :: i, j, know
86
87 real(r8) :: Ce, Cx
88 real(r8) :: cff, cff1, cff2, dt2d, tau
89
90 real(r8) :: tl_Ce, tl_Cx
91 real(r8) :: tl_cff1, tl_cff2
92
93 real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: tl_grad
94
95# include "set_bounds.h"
96
97
98
99
100
101 IF (first_2d_step) THEN
102 know=krhs
105 know=krhs
107 ELSE
108 know=kstp
110 END IF
111
112
113
114
115
116 IF (
domain(ng)%Western_Edge(tile))
THEN
117
118
119
121 IF (
iic(ng).ne.0)
THEN
122 DO j=jstr,jend+1
123
124
125
126 tl_grad(istr-1,j)=0.0_r8
127 END DO
128 DO j=jstr,jend
130# if defined CELERITY_READ && defined FORWARD_READ
132 IF (
boundary(ng)%zeta_west_Cx(j).eq.0.0_r8)
THEN
134 ELSE
136 END IF
137 tau=tau*dt2d
138 END IF
140# ifdef RADIATION_2D
142# else
143 ce=0.0_r8
144# endif
146# endif
147
148
149
150
151
152
153 tl_zeta(istr-1,j,kout)=(cff*tl_zeta(istr-1,j,know)+ &
154 & cx *tl_zeta(istr ,j,kout)- &
155 & max(ce,0.0_r8)* &
156 & tl_grad(istr-1,j )- &
157 & min(ce,0.0_r8)* &
158 & tl_grad(istr-1,j+1))/ &
159 & (cff+cx)
160
162
163
164
165
166 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)- &
167 & tau*tl_zeta(istr-1,j,know)
168 END IF
169# ifdef MASKING
170
171
172
173 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)* &
174 &
grid(ng)%rmask(istr-1,j)
175# endif
176 END IF
177 END DO
178 END IF
179
180
181
183 DO j=jstr,jend
185 cff=dt2d*
grid(ng)%pm(istr,j)
186 cff1=sqrt(
g*(
grid(ng)%h(istr,j)+ &
187 & zeta(istr,j,know)))
188 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(istr,j)+ &
189 & tl_zeta(istr,j,know))/cff1
190 cx=cff*cff1
191 tl_cx=cff*tl_cff1
192
193
194
195 tl_zeta(istr-1,j,kout)=(1.0_r8-cx)*tl_zeta(istr-1,j,know)+&
196 & tl_cx*(zeta(istr-1,j,know)+ &
197 & zeta(istr ,j,know))+ &
198 & cx*tl_zeta(istr,j,know)
199# ifdef MASKING
200
201
202
203 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)* &
204 &
grid(ng)%rmask(istr-1,j)
205# endif
206 END IF
207 END DO
208
209
210
212 DO j=jstr,jend
214 cff=dt2d*
grid(ng)%pm(istr,j)
215 cff1=sqrt(
g*(
grid(ng)%h(istr,j)+ &
216 & zeta(istr,j,know)))
217 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(istr,j)+ &
218 & tl_zeta(istr,j,know))/cff1
219 cx=cff*cff1
220 tl_cx=cff*tl_cff1
221 cff2=1.0_r8/(1.0_r8+cx)
222 tl_cff2=-cff2*cff2*tl_cx
223
224
225
226 tl_zeta(istr-1,j,kout)=tl_cff2*(zeta(istr-1,j,know)+ &
227 & cx*zeta(istr,j,kout))+ &
228 & cff2*(tl_zeta(istr-1,j,know)+ &
229 & tl_cx*zeta(istr,j,kout)+ &
230 & cx*tl_zeta(istr,j,kout))
231# ifdef MASKING
232
233
234
235 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)* &
236 &
grid(ng)%rmask(istr-1,j)
237# endif
238 END IF
239 END DO
240
241
242
244 DO j=jstr,jend
246
247
248# ifdef ADJUST_BOUNDARY
250 tl_zeta(istr-1,j,kout)=
boundary(ng)%tl_zeta_west(j)
251 ELSE
252 tl_zeta(istr-1,j,kout)=0.0_r8
253 END IF
254# else
255 tl_zeta(istr-1,j,kout)=0.0_r8
256# endif
257# ifdef MASKING
258
259
260
261 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)* &
262 &
grid(ng)%rmask(istr-1,j)
263# endif
264 END IF
265 END DO
266
267
268
270 DO j=jstr,jend
272
273
274 tl_zeta(istr-1,j,kout)=tl_zeta(istr,j,kout)
275# ifdef MASKING
276
277
278
279 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)* &
280 &
grid(ng)%rmask(istr-1,j)
281# endif
282 END IF
283 END DO
284
285
286
288 DO j=jstr,jend
290
291
292 tl_zeta(istr-1,j,kout)=tl_zeta(istr,j,kout)
293# ifdef MASKING
294
295
296
297 tl_zeta(istr-1,j,kout)=tl_zeta(istr-1,j,kout)* &
298 &
grid(ng)%rmask(istr-1,j)
299# endif
300 END IF
301 END DO
302 END IF
303 END IF
304
305
306
307
308
309 IF (
domain(ng)%Eastern_Edge(tile))
THEN
310
311
312
314 IF (
iic(ng).ne.0)
THEN
315 DO j=jstr,jend+1
316
317
318
319 tl_grad(iend+1,j)=0.0_r8
320 END DO
321 DO j=jstr,jend
323# if defined CELERITY_READ && defined FORWARD_READ
325 IF (
boundary(ng)%zeta_east_Cx(j).eq.0.0_r8)
THEN
327 ELSE
329 END IF
330 tau=tau*dt2d
331 END IF
333# ifdef RADIATION_2D
335# else
336 ce=0.0_r8
337# endif
339# endif
340
341
342
343
344
345
346 tl_zeta(iend+1,j,kout)=(cff*tl_zeta(iend+1,j,know)+ &
347 & cx *tl_zeta(iend ,j,kout)- &
348 & max(ce,0.0_r8)* &
349 & tl_grad(iend+1,j )- &
350 & min(ce,0.0_r8)* &
351 & tl_grad(iend+1,j+1))/ &
352 & (cff+cx)
353
355
356
357
358
359 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)- &
360 & tau*tl_zeta(iend+1,j,know)
361 END IF
362# ifdef MASKING
363
364
365
366 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)* &
367 &
grid(ng)%rmask(iend+1,j)
368# endif
369 END IF
370 END DO
371 END IF
372
373
374
376 DO j=jstr,jend
378 cff=dt2d*
grid(ng)%pm(iend,j)
379 cff1=sqrt(
g*(
grid(ng)%h(iend,j)+ &
380 & zeta(iend,j,know)))
381 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(iend,j)+ &
382 & tl_zeta(iend,j,know))/cff1
383 cx=cff*cff1
384 tl_cx=cff*tl_cff1
385
386
387
388 tl_zeta(iend+1,j,kout)=(1.0_r8-cx)*tl_zeta(iend+1,j,know)+&
389 & tl_cx*(zeta(iend+1,j,know)+ &
390 & zeta(iend ,j,know))+ &
391 & cx*tl_zeta(iend,j,know)
392# ifdef MASKING
393
394
395
396 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)* &
397 &
grid(ng)%rmask(iend+1,j)
398# endif
399 END IF
400 END DO
401
402
403
405 DO j=jstr,jend
407 cff=dt2d*
grid(ng)%pm(iend,j)
408 cff1=sqrt(
g*(
grid(ng)%h(iend,j)+ &
409 & zeta(iend,j,know)))
410 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(iend,j)+ &
411 & tl_zeta(iend,j,know))/cff1
412 cx=cff*cff1
413 tl_cx=cff*tl_cff1
414 cff2=1.0_r8/(1.0_r8+cx)
415 tl_cff2=-cff2*cff2*tl_cx
416
417
418
419 tl_zeta(iend+1,j,kout)=tl_cff2*(zeta(iend+1,j,know)+ &
420 & cx*zeta(iend,j,kout))+ &
421 & cff2*(tl_zeta(iend+1,j,know)+ &
422 & tl_cx*zeta(iend,j,kout)+ &
423 & cx*tl_zeta(iend,j,kout))
424# ifdef MASKING
425
426
427
428 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)* &
429 &
grid(ng)%rmask(iend+1,j)
430# endif
431 END IF
432 END DO
433
434
435
437 DO j=jstr,jend
439
440
441# ifdef ADJUST_BOUNDARY
443 tl_zeta(iend+1,j,kout)=
boundary(ng)%tl_zeta_east(j)
444 ELSE
445 tl_zeta(iend+1,j,kout)=0.0_r8
446 END IF
447# else
448 tl_zeta(iend+1,j,kout)=0.0_r8
449# endif
450# ifdef MASKING
451
452
453
454 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)* &
455 &
grid(ng)%rmask(iend+1,j)
456# endif
457 END IF
458 END DO
459
460
461
463 DO j=jstr,jend
465
466
467 tl_zeta(iend+1,j,kout)=tl_zeta(iend,j,kout)
468# ifdef MASKING
469
470
471
472 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)* &
473 &
grid(ng)%rmask(iend+1,j)
474# endif
475 END IF
476 END DO
477
478
479
481 DO j=jstr,jend
483
484
485 tl_zeta(iend+1,j,kout)=tl_zeta(iend,j,kout)
486# ifdef MASKING
487
488
489
490 tl_zeta(iend+1,j,kout)=tl_zeta(iend+1,j,kout)* &
491 &
grid(ng)%rmask(iend+1,j)
492# endif
493 END IF
494 END DO
495 END IF
496 END IF
497
498
499
500
501
502 IF (
domain(ng)%Southern_Edge(tile))
THEN
503
504
505
507 IF (
iic(ng).ne.0)
THEN
508 DO i=istr,iend+1
509
510
511
512 tl_grad(i,jstr)=0.0_r8
513 END DO
514 DO i=istr,iend
516# if defined CELERITY_READ && defined FORWARD_READ
518 IF (
boundary(ng)%zeta_south_Ce(i).eq.0.0_r8)
THEN
520 ELSE
522 END IF
523 tau=tau*dt2d
524 END IF
525# ifdef RADIATION_2D
527# else
528 cx=0.0_r8
529# endif
532# endif
533
534
535
536
537
538
539 tl_zeta(i,jstr-1,kout)=(cff*tl_zeta(i,jstr-1,know)+ &
540 & ce *tl_zeta(i,jstr ,kout)- &
541 & max(cx,0.0_r8)* &
542 & tl_grad(i ,jstr-1)- &
543 & min(cx,0.0_r8)* &
544 & tl_grad(i+1,jstr-1))/ &
545 & (cff+ce)
546
548
549
550
551
552 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)- &
553 & tau*tl_zeta(i,jstr-1,know)
554 END IF
555# ifdef MASKING
556
557
558
559 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)* &
560 &
grid(ng)%rmask(i,jstr-1)
561# endif
562 END IF
563 END DO
564 END IF
565
566
567
569 DO i=istr,iend
571 cff=dt2d*
grid(ng)%pn(i,jstr)
572 cff1=sqrt(
g*(
grid(ng)%h(i,jstr)+ &
573 & zeta(i,jstr,know)))
574 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(i,jstr)+ &
575 & tl_zeta(i,jstr,know))/cff1
576 ce=cff*cff1
577 tl_ce=cff*tl_cff1
578
579
580
581 tl_zeta(i,jstr-1,kout)=(1.0_r8-ce)*tl_zeta(i,jstr-1,know)+&
582 & tl_ce*(zeta(i,jstr-1,know)+ &
583 & zeta(i,jstr ,know))+ &
584 & ce*tl_zeta(i,jstr,know)
585# ifdef MASKING
586
587
588
589 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)* &
590 &
grid(ng)%rmask(i,jstr-1)
591# endif
592 END IF
593 END DO
594
595
596
598 DO i=istr,iend
600 cff=dt2d*
grid(ng)%pn(i,jstr)
601 cff1=sqrt(
g*(
grid(ng)%h(i,jstr)+ &
602 & zeta(i,jstr,know)))
603 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(i,jstr)+ &
604 & tl_zeta(i,jstr,know))/cff1
605 ce=cff*cff1
606 tl_ce=cff*tl_cff1
607 cff2=1.0_r8/(1.0_r8+ce)
608 tl_cff2=-cff2*cff2*tl_ce
609
610
611
612 tl_zeta(i,jstr-1,kout)=tl_cff2*(zeta(i,jstr-1,know)+ &
613 & ce*zeta(i,jstr,kout))+ &
614 & cff2*(tl_zeta(i,jstr-1,know)+ &
615 & tl_ce*zeta(i,jstr,kout)+ &
616 & ce*tl_zeta(i,jstr,kout))
617# ifdef MASKING
618
619
620
621 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)* &
622 &
grid(ng)%rmask(i,jstr-1)
623# endif
624 END IF
625 END DO
626
627
628
630 DO i=istr,iend
632
633
634# ifdef ADJUST_BOUNDARY
636 tl_zeta(i,jstr-1,kout)=
boundary(ng)%tl_zeta_south(i)
637 ELSE
638 tl_zeta(i,jstr-1,kout)=0.0_r8
639 END IF
640# else
641 tl_zeta(i,jstr-1,kout)=0.0_r8
642# endif
643# ifdef MASKING
644
645
646
647 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)* &
648 &
grid(ng)%rmask(i,jstr-1)
649# endif
650 END IF
651 END DO
652
653
654
656 DO i=istr,iend
658
659
660 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr,kout)
661# ifdef MASKING
662
663
664
665 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)* &
666 &
grid(ng)%rmask(i,jstr-1)
667# endif
668 END IF
669 END DO
670
671
672
674 DO i=istr,iend
676
677
678 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr,kout)
679# ifdef MASKING
680
681
682
683 tl_zeta(i,jstr-1,kout)=tl_zeta(i,jstr-1,kout)* &
684 &
grid(ng)%rmask(i,jstr-1)
685# endif
686 END IF
687 END DO
688 END IF
689 END IF
690
691
692
693
694
695 IF (
domain(ng)%Northern_Edge(tile))
THEN
696
697
698
700 IF (
iic(ng).ne.0)
THEN
701 DO i=istr,iend+1
702
703
704
705 tl_grad(i,jend+1)=0.0_r8
706 END DO
707 DO i=istr,iend
709# if defined CELERITY_READ && defined FORWARD_READ
711 IF (
boundary(ng)%zeta_north_Ce(i).eq.0.0_r8)
THEN
713 ELSE
715 END IF
716 tau=tau*dt2d
717 END IF
718# ifdef RADIATION_2D
720# else
721 cx=0.0_r8
722# endif
725# endif
726
727
728
729
730
731
732 tl_zeta(i,jend+1,kout)=(cff*tl_zeta(i,jend+1,know)+ &
733 & ce *tl_zeta(i,jend ,kout)- &
734 & max(cx,0.0_r8)* &
735 & tl_grad(i ,jend+1)- &
736 & min(cx,0.0_r8)* &
737 & tl_grad(i+1,jend+1))/ &
738 & (cff+ce)
739
741
742
743
744
745 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)- &
746 & tau*tl_zeta(i,jend+1,know)
747 END IF
748# ifdef MASKING
749
750
751
752 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)* &
753 &
grid(ng)%rmask(i,jend+1)
754# endif
755 END IF
756 END DO
757 END IF
758
759
760
762 DO i=istr,iend
764 cff=dt2d*
grid(ng)%pn(i,jend)
765 cff1=sqrt(
g*(
grid(ng)%h(i,jend)+ &
766 & zeta(i,jend,know)))
767 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(i,jend)+ &
768 & tl_zeta(i,jend,know))/cff1
769 ce=cff*cff1
770 tl_ce=cff*tl_cff1
771
772
773
774 tl_zeta(i,jend+1,kout)=(1.0_r8-ce)*tl_zeta(i,jend+1,know)+&
775 & tl_ce*(zeta(i,jend+1,know)+ &
776 & zeta(i,jend ,know))+ &
777 & ce*tl_zeta(i,jend,know)
778# ifdef MASKING
779
780
781
782 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)* &
783 &
grid(ng)%rmask(i,jend+1)
784# endif
785 END IF
786 END DO
787
788
789
791 DO i=istr,iend
793 cff=dt2d*
grid(ng)%pn(i,jend)
794 cff1=sqrt(
g*(
grid(ng)%h(i,jend)+ &
795 & zeta(i,jend,know)))
796 tl_cff1=0.5_r8*
g*(
grid(ng)%tl_h(i,jend)+ &
797 & tl_zeta(i,jend,know))/cff1
798 ce=cff*cff1
799 tl_ce=cff*tl_cff1
800 cff2=1.0_r8/(1.0_r8+ce)
801 tl_cff2=-cff2*cff2*tl_ce
802
803
804
805 tl_zeta(i,jend+1,kout)=tl_cff2*(zeta(i,jend+1,know)+ &
806 & ce*zeta(i,jend,kout))+ &
807 & cff2*(tl_zeta(i,jend+1,know)+ &
808 & tl_ce*zeta(i,jend,kout)+ &
809 & ce*tl_zeta(i,jend,kout))
810# ifdef MASKING
811
812
813
814 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)* &
815 &
grid(ng)%rmask(i,jend+1)
816# endif
817 END IF
818 END DO
819
820
821
823 DO i=istr,iend
825
826
827# ifdef ADJUST_BOUNDARY
829 tl_zeta(i,jend+1,kout)=
boundary(ng)%tl_zeta_north(i)
830 ELSE
831 tl_zeta(i,jend+1,kout)=0.0_r8
832 END IF
833# else
834 tl_zeta(i,jend+1,kout)=0.0_r8
835# endif
836# ifdef MASKING
837
838
839
840 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)* &
841 &
grid(ng)%rmask(i,jend+1)
842# endif
843 END IF
844 END DO
845
846
847
849 DO i=istr,iend
851
852
853 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend,kout)
854# ifdef MASKING
855
856
857
858 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)* &
859 &
grid(ng)%rmask(i,jend+1)
860# endif
861 END IF
862 END DO
863
864
865
867 DO i=istr,iend
869
870
871 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend,kout)
872# ifdef MASKING
873
874
875
876 tl_zeta(i,jend+1,kout)=tl_zeta(i,jend+1,kout)* &
877 &
grid(ng)%rmask(i,jend+1)
878# endif
879 END IF
880 END DO
881 END IF
882 END IF
883
884
885
886
887
889 IF (
domain(ng)%SouthWest_Corner(tile))
THEN
892
893
894
895 tl_zeta(istr-1,jstr-1,kout)=0.5_r8* &
896 & (tl_zeta(istr ,jstr-1,kout)+ &
897 & tl_zeta(istr-1,jstr ,kout))
898 END IF
899 END IF
900 IF (
domain(ng)%SouthEast_Corner(tile))
THEN
903
904
905
906 tl_zeta(iend+1,jstr-1,kout)=0.5_r8* &
907 & (tl_zeta(iend ,jstr-1,kout)+ &
908 & tl_zeta(iend+1,jstr ,kout))
909 END IF
910 END IF
911 IF (
domain(ng)%NorthWest_Corner(tile))
THEN
914
915
916
917 tl_zeta(istr-1,jend+1,kout)=0.5_r8* &
918 & (tl_zeta(istr-1,jend ,kout)+ &
919 & tl_zeta(istr ,jend+1,kout))
920 END IF
921 END IF
922 IF (
domain(ng)%NorthEast_Corner(tile))
THEN
925
926
927
928 tl_zeta(iend+1,jend+1,kout)=0.5_r8* &
929 & (tl_zeta(iend+1,jend ,kout)+ &
930 & tl_zeta(iend ,jend+1,kout))
931 END IF
932 END IF
933 END IF
934
935# if defined WET_DRY
936
937
938
939
940
943 IF (
domain(ng)%Western_Edge(tile))
THEN
944 DO j=jstr,jend
946 IF (zeta(istr-1,j,kout).le. &
948
949
950 tl_zeta(istr-1,j,kout)=-
grid(ng)%tl_h(istr-1,j)
951 END IF
952 END IF
953 END DO
954 END IF
955 IF (
domain(ng)%Eastern_Edge(tile))
THEN
956 DO j=jstr,jend
958 IF (zeta(iend+1,j,kout).le. &
960
961
962 tl_zeta(iend+1,j,kout)=-
grid(ng)%tl_h(iend+1,j)
963 END IF
964 END IF
965 END DO
966 END IF
967 END IF
968
970 IF (
domain(ng)%Southern_Edge(tile))
THEN
971 DO i=istr,iend
973 IF (zeta(i,jstr-1,kout).le. &
975
976
977 tl_zeta(i,jstr-1,kout)=-
grid(ng)%tl_h(i,jstr-1)
978 END IF
979 END IF
980 END DO
981 END IF
982 IF (
domain(ng)%Northern_Edge(tile))
THEN
983 DO i=istr,iend
985 IF (zeta(i,jend+1,kout).le. &
987
988
989 tl_zeta(i,jend+1,kout)=-
grid(ng)%tl_h(i,jend+1)
990 END IF
991 END IF
992 END DO
993 END IF
994 END IF
995
997 IF (
domain(ng)%SouthWest_Corner(tile))
THEN
1000 IF (zeta(istr-1,jstr-1,kout).le. &
1001 & (
dcrit(ng)-
grid(ng)%h(istr-1,jstr-1)))
THEN
1002
1003
1004 tl_zeta(istr-1,jstr-1,kout)=-
grid(ng)%tl_h(istr-1,jstr-1)
1005 END IF
1006 END IF
1007 END IF
1008 IF (
domain(ng)%SouthEast_Corner(tile))
THEN
1011 IF (zeta(iend+1,jstr-1,kout).le. &
1012 & (
dcrit(ng)-
grid(ng)%h(iend+1,jstr-1)))
THEN
1013
1014
1015 tl_zeta(iend+1,jstr-1,kout)=-
grid(ng)%tl_h(iend+1,jstr-1)
1016 END IF
1017 END IF
1018 END IF
1019 IF (
domain(ng)%NorthWest_Corner(tile))
THEN
1022 IF (zeta(istr-1,jend+1,kout).le. &
1023 & (
dcrit(ng)-
grid(ng)%h(istr-1,jend+1)))
THEN
1024
1025
1026 tl_zeta(istr-1,jend+1,kout)=-
grid(ng)%tl_h(istr-1,jend+1)
1027 END IF
1028 END IF
1029 END IF
1030 IF (
domain(ng)%NorthEast_Corner(tile))
THEN
1033 IF (zeta(iend+1,jend+1,kout).le. &
1034 & (
dcrit(ng)-
grid(ng)%h(iend+1,jend+1)))
THEN
1035
1036
1037 tl_zeta(iend+1,jend+1,kout)=-
grid(ng)%tl_h(iend+1,jend+1)
1038 END IF
1039 END IF
1040 END IF
1041 END IF
1042# endif
1043
1044 RETURN
type(t_boundary), dimension(:), allocatable boundary
type(t_apply), dimension(:), allocatable lbc_apply
type(t_grid), dimension(:), allocatable grid
type(t_lbc), dimension(:,:,:), allocatable tl_lbc
type(t_domain), dimension(:), allocatable domain
integer, dimension(:), allocatable iic
real(r8), dimension(:), allocatable dcrit
logical, dimension(:,:,:), allocatable lobc
logical, dimension(:), allocatable ewperiodic
logical, dimension(:), allocatable nsperiodic
logical, dimension(:), allocatable predictor_2d_step
real(dp), dimension(:,:), allocatable fsobc_out
integer, parameter isouth
real(dp), dimension(:), allocatable dtfast
integer, parameter inorth
real(dp), dimension(:,:), allocatable fsobc_in