[1621] | 1 | |
---|
| 2 | ! $Id: $ |
---|
| 3 | |
---|
| 4 | MODULE infotrac_phy |
---|
| 5 | |
---|
| 6 | ! Infotrac for physics; contains the same information as infotrac for |
---|
| 7 | ! the dynamics |
---|
| 8 | IMPLICIT NONE |
---|
| 9 | |
---|
| 10 | ! iflag_trac: ==1 if running with tracers |
---|
| 11 | INTEGER,SAVE :: iflag_trac |
---|
| 12 | !$OMP THREADPRIVATE(iflag_trac) |
---|
| 13 | |
---|
| 14 | ! nqtot : total number of tracers |
---|
| 15 | INTEGER,SAVE :: nqtot |
---|
| 16 | !$OMP THREADPRIVATE(nqtot) |
---|
| 17 | |
---|
| 18 | ! tracer names |
---|
[1981] | 19 | CHARACTER(len=30),ALLOCATABLE,DIMENSION(:),SAVE :: tname |
---|
| 20 | CHARACTER(len=33),ALLOCATABLE,DIMENSION(:),SAVE :: ttext ! tracer long name for diagnostics |
---|
[1621] | 21 | !$OMP THREADPRIVATE(tname,ttext) |
---|
| 22 | |
---|
| 23 | CONTAINS |
---|
| 24 | |
---|
| 25 | SUBROUTINE init_infotrac_phy(iflag_trac_,nqtot_,tname_,ttext_) |
---|
| 26 | ! Initialize module variables |
---|
[1981] | 27 | |
---|
| 28 | USE print_control_mod, ONLY: lunout |
---|
[1621] | 29 | IMPLICIT NONE |
---|
| 30 | |
---|
| 31 | INTEGER,INTENT(IN) :: iflag_trac_ ! ==1 if running with tracers |
---|
| 32 | INTEGER,INTENT(IN) :: nqtot_ ! total number of tracers |
---|
| 33 | CHARACTER(LEN=*),INTENT(IN) :: tname_(nqtot_) |
---|
| 34 | CHARACTER(LEN=*),INTENT(IN) :: ttext_(nqtot_) |
---|
| 35 | |
---|
| 36 | INTEGER :: iq |
---|
[1981] | 37 | CHARACTER(LEN=30) :: modname="init_infotrac_phy" |
---|
| 38 | CHARACTER(LEN=50) :: abort_message |
---|
[1621] | 39 | |
---|
| 40 | iflag_trac=iflag_trac_ |
---|
| 41 | nqtot=nqtot_ |
---|
| 42 | |
---|
| 43 | ALLOCATE(tname(nqtot)) |
---|
| 44 | ALLOCATE(ttext(nqtot)) |
---|
| 45 | DO iq=1,nqtot |
---|
[1981] | 46 | if (len_trim(tname_(iq)).gt.len(tname(iq))) then |
---|
| 47 | abort_message="init_infotrac_phy error; tname_() too long!" |
---|
| 48 | call abort_physic(modname,abort_message,1) |
---|
| 49 | endif |
---|
[1621] | 50 | tname(iq)=tname_(iq) |
---|
| 51 | ttext(iq)=ttext_(iq) |
---|
| 52 | ENDDO |
---|
| 53 | |
---|
| 54 | END SUBROUTINE init_infotrac_phy |
---|
| 55 | |
---|
| 56 | END MODULE infotrac_phy |
---|