383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
403
404 implicit none
405
406
407
408 logical, intent(in) :: Lwrite
409
410 integer, intent(in) :: iunit, model
411
412 TYPE(T_ADV), intent(in) :: Hadv(MAXVAL(NT),Ngrids)
413 TYPE(T_ADV), intent(in) :: Vadv(MAXVAL(NT),Ngrids)
414
415
416
417 integer :: i, itrc, ng
418
419 character (len=11) :: Hstring(MAXVAL(NT),Ngrids)
420 character (len=11) :: Vstring(MAXVAL(NT),Ngrids)
421
422
423
424
425
428 IF (hadv(itrc,ng)%AKIMA4) THEN
429 hstring(itrc,ng)='Akima4'
430 ELSE IF (hadv(itrc,ng)%CENTERED2) THEN
431 hstring(itrc,ng)='Centered2'
432 ELSE IF (hadv(itrc,ng)%CENTERED4) THEN
433 hstring(itrc,ng)='Centered4'
434 ELSE IF (hadv(itrc,ng)%HSIMT) THEN
435 hstring(itrc,ng)='HSIMT'
436 ELSE IF (hadv(itrc,ng)%MPDATA) THEN
437 hstring(itrc,ng)='MPDATA'
438 ELSE IF (hadv(itrc,ng)%SPLINES) THEN
439 hstring(itrc,ng)='Splines'
440 ELSE IF (hadv(itrc,ng)%SPLIT_U3) THEN
441 hstring(itrc,ng)='Split_U3'
442 ELSE IF (hadv(itrc,ng)%UPSTREAM3) THEN
443 hstring(itrc,ng)='Upstream3'
444 END IF
445
446 IF (vadv(itrc,ng)%AKIMA4) THEN
447 vstring(itrc,ng)='Akima4'
448 ELSE IF (vadv(itrc,ng)%CENTERED2) THEN
449 vstring(itrc,ng)='Centered2'
450 ELSE IF (vadv(itrc,ng)%CENTERED4) THEN
451 vstring(itrc,ng)='Centered4'
452 ELSE IF (vadv(itrc,ng)%HSIMT) THEN
453 vstring(itrc,ng)='HSIMT'
454 ELSE IF (vadv(itrc,ng)%MPDATA) THEN
455 vstring(itrc,ng)='MPDATA'
456 ELSE IF (vadv(itrc,ng)%SPLINES) THEN
457 vstring(itrc,ng)='Splines'
458 ELSE IF (vadv(itrc,ng)%SPLIT_U3) THEN
459 vstring(itrc,ng)='Split_U3'
460 ELSE IF (vadv(itrc,ng)%UPSTREAM3) THEN
461 vstring(itrc,ng)='Upstream3'
462 END IF
463 END DO
464 END DO
465
466
467
468 IF (
master.and.lwrite)
THEN
471 IF (ng.eq.1) THEN
472 WRITE (iunit,10) trim(
vname(1,
idtvar(itrc))), ng, &
473 & trim(hstring(itrc,ng)), &
474 & trim(vstring(itrc,ng))
475 ELSE
476 WRITE (iunit,20) ng, &
477 & trim(hstring(itrc,ng)), &
478 & trim(vstring(itrc,ng))
479 END IF
480 END DO
481 END DO
482
483 IF (model.eq.
inlm)
THEN
484 WRITE (iunit,'(1x)')
485 WRITE (iunit,30) 'Akima4', &
486 & 'Fourth-order Akima advection'
487 WRITE (iunit,30) 'Centered2', &
488 & 'Second-order centered differences advection'
489 WRITE (iunit,30) 'Centered4', &
490 & 'Fourth-order centered differences advection'
491 WRITE (iunit,30) 'HSIMT', &
492 & 'Third High-order Spatial Inteporlation at Middle '// &
493 & 'Time Advection with TVD limiter'
494 WRITE (iunit,30) 'MPDATA', &
495 & 'Multidimensional Positive Definite Advection '// &
496 & 'Algorithm, recursive method'
497 WRITE (iunit,30) 'Splines', &
498 & 'Conservative Parabolic Splines Reconstruction '// &
499 & 'Advection (only vertical; not recommended)'
500 WRITE (iunit,30) 'Split_U3', &
501 & 'Split third-order Upstream Advection'
502 WRITE (iunit,30) 'Upstream3', &
503 & 'Third-order Upstream-biased Advection '// &
504 & '(only horizontal)'
505 WRITE (iunit,'(1x)')
506 END IF
507 END IF
508
509
510
511 IF (model.eq.
inlm)
THEN
514 IF (.not.vadv(i,ng)%MPDATA.and.hadv(i,ng)%MPDATA) THEN
517 & trim(hstring(i,ng)), &
518 & 'must be specified for both advective terms'
519 END IF
521 RETURN
522 ELSE IF (.not.hadv(i,ng)%MPDATA.and.vadv(i,ng)%MPDATA) THEN
525 & trim(vstring(i,ng)), &
526 & 'must be specified for both advective terms'
527 END IF
529 RETURN
530 ELSE IF (.not.vadv(i,ng)%HSIMT.and.hadv(i,ng)%HSIMT) THEN
533 & trim(hstring(i,ng)), &
534 & 'must be specified for both advective terms'
535 END IF
537 RETURN
538 ELSE IF (.not.hadv(i,ng)%HSIMT.and.vadv(i,ng)%HSIMT) THEN
541 & trim(vstring(i,ng)), &
542 & 'must be specified for both advective terms'
543 END IF
545 RETURN
546 ELSE IF (hadv(i,ng)%SPLINES) THEN
549 & trim(hstring(i,ng)), &
550 & 'is only available for the vertical term'
551
552 END IF
554 RETURN
555 ELSE IF (vadv(i,ng)%UPSTREAM3) THEN
558 & trim(vstring(i,ng)), &
559 & 'is only available for the horizontal term'
560
561 END IF
563 RETURN
564 END IF
565 END DO
566 END DO
567 ELSE IF (model.eq.
iadm)
THEN
570 IF (hadv(i,ng)%MPDATA.or.hadv(i,ng)%HSIMT) THEN
573 & trim(hstring(i,ng)), &
574 & 'is not supported in adjoint-based algorithms'
575 END IF
577 RETURN
578 ELSE IF (vadv(i,ng)%MPDATA.or.vadv(i,ng)%HSIMT) THEN
581 & trim(vstring(i,ng)), &
582 & 'is not supported in adjoint-based algorithms'
583 END IF
585 RETURN
586 ELSE IF (hadv(i,ng)%SPLINES) THEN
589 & trim(hstring(i,ng)), &
590 & 'is only available for the vertical term'
591
592 END IF
594 RETURN
595 ELSE IF (vadv(i,ng)%UPSTREAM3) THEN
598 & trim(vstring(i,ng)), &
599 & 'is only available for the horizontal term'
600
601 END IF
603 RETURN
604 END IF
605 END DO
606 END DO
607 END IF
608
609 10 FORMAT (/,1x,a,t26,i2,t31,a,t50,a)
610 20 FORMAT (t26,i2,t31,a,t50,a)
611 30 FORMAT (1x,a,t13,a)
612 40 FORMAT (/,'TADV_REPORT - Illegal tracer advection scheme for ''', &
613 & a,''' in grid: ',i0,/,14x,'''',a,'''',1x,a,'.',/)
614
615 RETURN