Changeset 2436 for trunk/LMDZ.GENERIC/libf/phystd/dyn1d
- Timestamp:
- Nov 25, 2020, 7:24:05 PM (4 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd/dyn1d
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90
r1714 r2436 90 90 real :: latitude(1), longitude(1), cell_area(1), phisfi(1) 91 91 92 ! added by JVO and YJ to read modern traceur.def 93 character(len=500) :: line ! to store a line of text 94 LOGICAL :: moderntracdef=.false. ! JVO, YJ : modern traceur.def 95 92 96 ! -------------- 93 97 ! Initialisation … … 162 166 write(*,*) "kcm1d: Reading file traceur.def" 163 167 ! read number of tracers: 164 read(90,*,iostat=ierr) nq 168 !! - Modif. by JVO and YJ for modern planetary traceur.def --------------- 169 READ(90,'(A)') line 170 IF (trim(line).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def 171 READ(line,*,iostat=ierr) nq ! Try standard traceur.def 172 ELSE 173 moderntracdef = .true. 174 DO 175 READ(90,'(A)',iostat=ierr) line 176 IF (ierr.eq.0) THEN 177 IF (index(line,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header 178 READ(line,*,iostat=ierr) nq 179 EXIT 180 ENDIF 181 ELSE ! If pb, or if reached EOF without having found nbtr 182 write(*,*) "rcm1d: error reading number of tracers" 183 write(*,*) " (first line of traceur.def) " 184 stop 185 ENDIF 186 ENDDO 187 ENDIF ! if modern or standard traceur.def 165 188 if (ierr.ne.0) then 166 189 write(*,*) "kcm1d: error reading number of tracers" … … 184 207 endif 185 208 enddo !of do iq=1,nq 209 close(90) 186 210 endif 187 211 -
trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F
r2354 r2436 144 144 real :: latitude(1), longitude(1), cell_area(1) 145 145 146 ! added by JVO and YJ to read modern traceur.def 147 character(len=500) :: line ! to store a line of text 148 LOGICAL :: moderntracdef=.false. ! JVO, YJ : modern traceur.def 149 146 150 c======================================================================= 147 151 c INITIALISATION … … 152 156 & iostat=ierr) 153 157 if (ierr.eq.0) then 154 read(90,*,iostat=ierr) nq 158 ! read number of tracers: 159 !! - Modif. by JVO and YJ for modern planetary traceur.def --------------- 160 READ(90,'(A)') line 161 IF (trim(line).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def 162 READ(line,*,iostat=ierr) nq ! Try standard traceur.def 163 ELSE 164 moderntracdef = .true. 165 DO 166 READ(90,'(A)',iostat=ierr) line 167 IF (ierr.eq.0) THEN 168 IF (index(line,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header 169 READ(line,*,iostat=ierr) nq 170 EXIT 171 ENDIF 172 ELSE ! If pb, or if reached EOF without having found nbtr 173 write(*,*) "rcm1d: error reading number of tracers" 174 write(*,*) " (first line of traceur.def) " 175 stop 176 ENDIF 177 ENDDO 178 ENDIF ! if modern or standard traceur.def 155 179 else 156 180 nq=0 … … 243 267 write(*,*) "rcm1d: Reading file traceur.def" 244 268 ! read number of tracers: 245 read(90,*,iostat=ierr) nq 269 !! - Modif. by JVO and YJ for modern planetary traceur.def --------------- 270 READ(90,'(A)') line 271 IF (trim(line).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def 272 READ(line,*,iostat=ierr) nq ! Try standard traceur.def 273 ELSE 274 moderntracdef = .true. 275 DO 276 READ(90,'(A)',iostat=ierr) line 277 IF (ierr.eq.0) THEN 278 IF (index(line,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header 279 READ(line,*,iostat=ierr) nq 280 EXIT 281 ENDIF 282 ELSE ! If pb, or if reached EOF without having found nbtr 283 write(*,*) "rcm1d: error reading number of tracers" 284 write(*,*) " (first line of traceur.def) " 285 stop 286 ENDIF 287 ENDDO 288 ENDIF ! if modern or standard traceur.def 246 289 nqtot=nq ! set value of nqtot (in infotrac module) as nq 247 290 if (ierr.ne.0) then
Note: See TracChangeset
for help on using the changeset viewer.