Changes in trunk/src/FLEXPART.f90 [30:20]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/FLEXPART.f90
r30 r20 45 45 use conv_mod 46 46 47 #ifdef NETCDF_OUTPUT48 use netcdf_output_mod, only: writeheader_netcdf49 #endif50 51 52 47 implicit none 53 48 … … 65 60 call gasdev1(idummy,rannumb(maxrand),rannumb(maxrand-1)) 66 61 67 ! FLEXPART version string 68 flexversion='Version 9.2 beta (2014-07-01)' 69 verbosity=0 70 62 ! 63 flexversion='Version 9.1.8 (2013-12-08)' 64 !verbosity=0 71 65 ! Read the pathnames where input/output files are stored 72 66 !******************************************************* … … 82 76 call getarg(1,arg1) 83 77 pathfile=arg1 78 verbosity=0 84 79 if (arg1(1:1).eq.'-') then 85 write(pathfile,'(a11)') './pathnames'86 inline_options=arg180 write(pathfile,'(a11)') './pathnames' 81 inline_options=arg1 87 82 endif 88 83 case (0) 89 84 write(pathfile,'(a11)') './pathnames' 85 verbosity=0 90 86 end select 91 87 88 if (inline_options(1:1).eq.'-') then 89 print*, 'inline options=', inline_options 90 if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then 91 print*, 'verbose mode 1: additional information will be displayed' 92 verbosity=1 93 endif 94 if (trim(inline_options).eq.'-v2') then 95 print*, 'verbose mode 2: additional information will be displayed' 96 verbosity=2 97 endif 98 if (trim(inline_options).eq.'-i') then 99 print*, 'info mode: will provide run specific information and stop' 100 verbosity=1 101 info_flag=1 102 endif 103 if (trim(inline_options).eq.'-i2') then 104 print*, 'info mode: will provide run specific information and stop' 105 verbosity=2 106 info_flag=1 107 endif 108 endif 109 110 92 111 ! Print the GPL License statement 93 112 !******************************************************* 94 print*,'Welcome to FLEXPART ', trim(flexversion) 95 print*,'FLEXPART is free software released under the GNU General Public License.' 96 97 if (inline_options(1:1).eq.'-') then 98 if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then 99 print*, 'Verbose mode 1: display detailed information during run' 100 verbosity=1 101 endif 102 if (trim(inline_options).eq.'-v2') then 103 print*, 'Verbose mode 2: display more detailed information during run' 104 verbosity=2 105 endif 106 if (trim(inline_options).eq.'-i') then 107 print*, 'Info mode: provide detailed run specific information and stop' 108 verbosity=1 109 info_flag=1 110 endif 111 if (trim(inline_options).eq.'-i2') then 112 print*, 'Info mode: provide more detailed run specific information and stop' 113 verbosity=2 114 info_flag=1 115 endif 116 endif 117 118 if (verbosity.gt.0) then 119 write(*,*) 'call readpaths' 113 print*,'Welcome to FLEXPART', trim(flexversion) 114 print*,'FLEXPART is free software released under the GNU Genera'// & 115 'l Public License.' 116 117 if (verbosity.gt.0) then 118 WRITE(*,*) 'call readpaths' 120 119 endif 121 120 call readpaths(pathfile) 121 122 122 123 123 if (verbosity.gt.1) then !show clock info … … 131 131 endif 132 132 133 133 134 ! Read the user specifications for the current model run 134 135 !******************************************************* 135 136 136 137 if (verbosity.gt.0) then 137 write(*,*) 'call readcommand'138 WRITE(*,*) 'call readcommand' 138 139 endif 139 140 call readcommand 140 141 if (verbosity.gt.0) then 141 write(*,*) ' ldirect=', ldirect 142 write(*,*) ' ibdate,ibtime=',ibdate,ibtime 143 write(*,*) ' iedate,ietime=', iedate,ietime 144 if (verbosity.gt.1) then 145 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) 146 write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max 147 endif 148 endif 142 WRITE(*,*) ' ldirect=', ldirect 143 WRITE(*,*) ' ibdate,ibtime=',ibdate,ibtime 144 WRITE(*,*) ' iedate,ietime=', iedate,ietime 145 if (verbosity.gt.1) then 146 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) 147 WRITE(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max 148 endif 149 endif 150 149 151 150 152 ! Read the age classes to be used 151 153 !******************************** 152 154 if (verbosity.gt.0) then 153 write(*,*) 'call readageclasses'155 WRITE(*,*) 'call readageclasses' 154 156 endif 155 157 call readageclasses 156 158 157 159 if (verbosity.gt.1) then 158 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)159 write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max160 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) 161 WRITE(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max 160 162 endif 163 164 161 165 162 166 ! Read, which wind fields are available within the modelling period … … 164 168 165 169 if (verbosity.gt.0) then 166 write(*,*) 'call readavailable'170 WRITE(*,*) 'call readavailable' 167 171 endif 168 172 call readavailable … … 173 177 174 178 if (verbosity.gt.0) then 175 write(*,*) 'call gridcheck'179 WRITE(*,*) 'call gridcheck' 176 180 endif 177 181 … … 179 183 180 184 if (verbosity.gt.1) then 181 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)182 write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max185 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) 186 WRITE(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max 183 187 endif 184 185 if (verbosity.gt.0) then 186 write(*,*) 'call gridcheck_nests' 188 189 190 if (verbosity.gt.0) then 191 WRITE(*,*) 'call gridcheck_nests' 187 192 endif 188 193 call gridcheck_nests 189 194 195 190 196 ! Read the output grid specifications 191 197 !************************************ 192 198 193 199 if (verbosity.gt.0) then 194 write(*,*) 'call readoutgrid'200 WRITE(*,*) 'call readoutgrid' 195 201 endif 196 202 … … 198 204 199 205 if (nested_output.eq.1) then 200 call readoutgrid_nest206 call readoutgrid_nest 201 207 if (verbosity.gt.0) then 202 write(*,*) '# readoutgrid_nest'208 WRITE(*,*) '# readoutgrid_nest' 203 209 endif 204 210 endif … … 226 232 call readlanduse 227 233 234 228 235 ! Assign fractional cover of landuse classes to each ECMWF grid point 229 236 !******************************************************************** … … 234 241 call assignland 235 242 243 244 236 245 ! Read the coordinates of the release locations 237 246 !********************************************** … … 242 251 call readreleases 243 252 253 244 254 ! Read and compute surface resistances to dry deposition of gases 245 255 !**************************************************************** … … 257 267 print*,'call coordtrafo' 258 268 endif 269 259 270 260 271 ! Initialize all particles to non-existent … … 284 295 endif 285 296 297 286 298 ! Calculate volume, surface area, etc., of all output grid cells 287 299 ! Allocate fluxes and OHfield if necessary 288 300 !*************************************************************** 289 301 302 290 303 if (verbosity.gt.0) then 291 304 print*,'call outgrid_init' … … 294 307 if (nested_output.eq.1) call outgrid_init_nest 295 308 309 296 310 ! Read the OH field 297 311 !****************** … … 299 313 if (OHREA.eqv..TRUE.) then 300 314 if (verbosity.gt.0) then 301 print*,'call readOHfield'315 print*,'call readOHfield' 302 316 endif 303 call readOHfield317 call readOHfield 304 318 endif 305 319 … … 308 322 !****************************************************************** 309 323 310 if (lnetcdfout.eq.1) then311 #ifdef NETCDF_OUTPUT312 call writeheader_netcdf(lnest = .false.)313 #endif314 else315 call writeheader316 end if317 318 if (nested_output.eq.1) then319 if (lnetcdfout.eq.1) then320 #ifdef NETCDF_OUTPUT321 call writeheader_netcdf(lnest = .true.)322 #endif323 else324 call writeheader_nest325 endif326 endif327 324 328 325 if (verbosity.gt.0) then … … 335 332 !if (nested_output.eq.1) call writeheader_nest 336 333 if (nested_output.eq.1.and.surf_only.ne.1) call writeheader_nest 334 337 335 if (nested_output.eq.1.and.surf_only.eq.1) call writeheader_nest_surf 338 336 if (nested_output.ne.1.and.surf_only.eq.1) call writeheader_surf 339 337 340 if (lnetcdfout.ne.1) then 341 open(unitdates,file=path(2)(1:length(2))//'dates') 342 end if338 339 340 !open(unitdates,file=path(2)(1:length(2))//'dates') 343 341 344 342 if (verbosity.gt.0) then … … 348 346 if ((iout.eq.4).or.(iout.eq.5)) call openouttraj 349 347 348 350 349 ! Releases can only start and end at discrete times (multiples of lsynctime) 351 350 !*************************************************************************** … … 355 354 endif 356 355 do i=1,numpoint 357 ireleasestart(i)=nint(real(ireleasestart(i))/real(lsynctime))*lsynctime 358 ireleaseend(i)=nint(real(ireleaseend(i))/real(lsynctime))*lsynctime 356 ireleasestart(i)=nint(real(ireleasestart(i))/ & 357 real(lsynctime))*lsynctime 358 ireleaseend(i)=nint(real(ireleaseend(i))/ & 359 real(lsynctime))*lsynctime 359 360 end do 361 360 362 361 363 ! Initialize cloud-base mass fluxes for the convection scheme … … 379 381 end do 380 382 383 381 384 ! Calculate particle trajectories 382 385 !******************************** … … 384 387 if (verbosity.gt.0) then 385 388 if (verbosity.gt.1) then 386 call system_clock(count_clock, count_rate, count_max)387 write(*,*) 'System clock',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max389 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) 390 WRITE(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max 388 391 endif 389 392 if (info_flag.eq.1) then 390 print*, 'Info only mode (stop)'391 stop393 print*, 'info only mode (stop)' 394 stop 392 395 endif 393 396 print*,'call timemanager' … … 396 399 call timemanager 397 400 398 write(*,*) 'CONGRATULATIONS: YOU HAVE SUCCESSFULLY COMPLETED A FLEXPART MODEL RUN!' 399 400 ! output wall time 401 if (verbosity .gt. 0) then 402 call system_clock(count_clock,count_rate) 403 tins=(count_clock - count_clock0)/real(count_rate) 404 print*,'Wall time ',tins,'s, ',tins/60,'min, ',tins/3600,'h.' 405 endif 401 402 write(*,*) 'CONGRATULATIONS: YOU HAVE SUCCESSFULLY COMPLETED A FLE& 403 &XPART MODEL RUN!' 406 404 407 405 end program flexpart
Note: See TracChangeset
for help on using the changeset viewer.