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