Changeset ff050cd in flexpart.git for src_parallel/readageclasses.f90
- Timestamp:
- Aug 15, 2013, 3:23:48 PM (11 years ago)
- Branches:
- flexpart91_hasod
- Children:
- 31113de
- Parents:
- 7c1fd44
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src_parallel/readageclasses.f90
r3eed2e6 rff050cd 28 28 ! * 29 29 ! Author: A. Stohl * 30 ! *31 30 ! 20 March 2000 * 31 ! HSO, 14 August 2013 32 ! Added optional namelist input 32 33 ! * 33 34 !***************************************************************************** … … 46 47 integer :: i 47 48 49 ! namelist help variables 50 integer :: readerror 51 52 ! namelist declaration 53 namelist /ageclass/ & 54 nageclass, & 55 lage 56 57 nageclass=-1 ! preset to negative value to identify failed namelist input 48 58 49 59 ! If age spectra calculation is switched off, set number of age classes 50 60 ! to 1 and maximum age to a large number 51 61 !********************************************************************** 52 53 62 54 63 if (lagespectra.ne.1) then … … 57 66 return 58 67 endif 59 60 68 61 69 ! If age spectra claculation is switched on, … … 66 74 status='old',err=999) 67 75 68 do i=1,13 69 read(unitageclasses,*) 70 end do 71 read(unitageclasses,*) nageclass 76 ! try to read in as a namelist 77 read(unitageclasses,ageclass,iostat=readerror) 72 78 79 if ((nageclass.lt.0).or.(readerror.ne.0)) then 80 rewind(unitageclasses) 81 do i=1,13 82 read(unitageclasses,*) 83 end do 84 read(unitageclasses,*) nageclass 85 read(unitageclasses,*) lage(1) 86 do i=2,nageclass 87 read(unitageclasses,*) lage(i) 88 end do 89 endif 90 91 close(unitageclasses) 73 92 74 93 if (nageclass.gt.maxageclass) then … … 81 100 endif 82 101 83 read(unitageclasses,*) lage(1)84 102 if (lage(1).le.0) then 85 103 write(*,*) ' #### FLEXPART MODEL ERROR! AGE OF FIRST #### ' … … 90 108 91 109 do i=2,nageclass 92 read(unitageclasses,*) lage(i)93 110 if (lage(i).le.lage(i-1)) then 94 111 write(*,*) ' #### FLEXPART MODEL ERROR! AGE CLASSES #### '
Note: See TracChangeset
for help on using the changeset viewer.