- Timestamp:
- Nov 9, 2022, 4:50:39 PM (18 months ago)
- Branches:
- bugfixes+enhancements
- Children:
- 8ad70c7
- Parents:
- 49e63b9
- Location:
- src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FLEXPART.f90
r49e63b9 rdba4221 44 44 implicit none 45 45 46 integer :: i, j,ix,jy,inest, iopt46 integer :: i, j, ix, jy, inest, iopt 47 47 integer :: idummy = -320 48 48 character(len=256) :: inline_options !pathfile, flexversion, arg2 … … 62 62 ! FLEXPART version string 63 63 flexversion_major = '10' ! Major version number, also used for species file names 64 flexversion='Version '//trim(flexversion_major)//'.4.1 (202 0-08-05)'64 flexversion='Version '//trim(flexversion_major)//'.4.1 (2022-11-09)' 65 65 verbosity=0 66 66 … … 69 69 70 70 inline_options='none' 71 select case ( iargc())71 select case (command_argument_count()) ! Portable standard Fortran intrinsic procedure 72 72 case (2) 73 call get arg(1,arg1)73 call get_command_argument(1,arg1) ! Portable standard Fortran intrinsic procedure 74 74 pathfile=arg1 75 call get arg(2,arg2)75 call get_command_argument(2,arg2) ! Portable standard Fortran intrinsic procedure 76 76 inline_options=arg2 77 77 case (1) 78 call get arg(1,arg1)78 call get_command_argument(1,arg1) ! Portable standard Fortran intrinsic procedure 79 79 pathfile=arg1 80 80 if (arg1(1:1).eq.'-') then … … 90 90 print*,'Welcome to FLEXPART ', trim(flexversion) 91 91 print*,'FLEXPART is free software released under the GNU General Public License.' 92 92 93 93 94 94 ! Ingest inline options … … 112 112 endif 113 113 if (trim(inline_options).eq.'-i') then 114 115 116 114 print*, 'Info mode: provide detailed run specific information and stop' 115 verbosity=1 116 info_flag=1 117 117 endif 118 118 if (trim(inline_options).eq.'-i2') then 119 120 121 119 print*, 'Info mode: provide more detailed run specific information and stop' 120 verbosity=2 121 info_flag=1 122 122 endif 123 123 endif … … 138 138 !print*,'length(4)',length(4) 139 139 !count=0,count_rate=1000 140 CALL SYSTEM_CLOCK(count_clock0, count_rate, count_max)140 call system_clock(count_clock0, count_rate, count_max) 141 141 !WRITE(*,*) 'SYSTEM_CLOCK',count, count_rate, count_max 142 142 !WRITE(*,*) 'SYSTEM_CLOCK, count_clock0', count_clock0 … … 159 159 CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) 160 160 write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max 161 endif 161 endif 162 162 endif 163 163 … … 217 217 ! both for the mother domain and eventual nests 218 218 !********************************************** 219 220 if (verbosity.gt.0) then 221 219 220 if (verbosity.gt.0) then 221 write(*,*) 'call gridcheck' 222 222 endif 223 223 … … 258 258 259 259 if (verbosity.eq.1) then 260 260 print*,'call readreceptors' 261 261 endif 262 262 call readreceptors … … 267 267 !call readspecies 268 268 269 270 269 ! Read the landuse inventory 271 270 !*************************** … … 329 328 if (verbosity.gt.0) then 330 329 print*,'numpart=0, numparticlecount=0' 331 endif 330 endif 332 331 numpart=0 333 332 numparticlecount=0 -
src/FLEXPART_MPI.f90
r92fab65 rdba4221 44 44 implicit none 45 45 46 integer :: i, j,ix,jy,inest46 integer :: i, j, ix, jy, inest, iopt 47 47 integer :: idummy = -320 48 48 character(len=256) :: inline_options !pathfile, flexversion, arg2 … … 71 71 call gasdev1(idummy,rannumb(maxrand),rannumb(maxrand-1)) 72 72 73 73 74 ! FLEXPART version string 74 75 flexversion_major = '10' ! Major version number, also used for species file names 75 flexversion='Ver . '//trim(flexversion_major)//'.2beta MPI (2017-08-01)'76 flexversion='Version '//trim(flexversion_major)//'.4.1 MPI (2022-11-09)' 76 77 verbosity=0 77 78 … … 80 81 81 82 inline_options='none' 82 select case ( iargc())83 select case (command_argument_count()) ! Portable standard Fortran intrinsic procedure 83 84 case (2) 84 call get arg(1,arg1)85 call get_command_argument(1,arg1) ! Portable standard Fortran intrinsic procedure 85 86 pathfile=arg1 86 call get arg(2,arg2)87 call get_command_argument(2,arg2) ! Portable standard Fortran intrinsic procedure 87 88 inline_options=arg2 88 89 case (1) 89 call get arg(1,arg1)90 call get_command_argument(1,arg1) ! Portable standard Fortran intrinsic procedure 90 91 pathfile=arg1 91 92 if (arg1(1:1).eq.'-') then … … 97 98 end select 98 99 99 if (lroot) then100 100 ! Print the GPL License statement 101 101 !******************************************************* 102 if (lroot) then 102 103 print*,'Welcome to FLEXPART ', trim(flexversion) 103 104 print*,'FLEXPART is free software released under the GNU General Public License.' 104 105 endif 105 106 107 108 ! Ingest inline options 109 !******************************************************* 106 110 if (inline_options(1:1).eq.'-') then 107 if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then 108 print*, 'Verbose mode 1: display detailed information during run' 111 print*,'inline_options:',inline_options 112 !verbose mode 113 iopt=index(inline_options,'v') 114 if (iopt.gt.0) then 109 115 verbosity=1 110 endif 111 if (trim(inline_options).eq.'-v2') then 112 print*, 'Verbose mode 2: display more detailed information during run' 113 verbosity=2 116 !print*, iopt, inline_options(iopt+1:iopt+1) 117 if (trim(inline_options(iopt+1:iopt+1)).eq.'2') then 118 print*, 'Verbose mode 2: display more detailed information during run' 119 verbosity=2 120 endif 121 endif 122 !debug mode 123 iopt=index(inline_options,'d') 124 if (iopt.gt.0) then 125 debug_mode=.true. 114 126 endif 115 127 if (trim(inline_options).eq.'-i') then … … 125 137 endif 126 138 139 if (verbosity.gt.0) then 140 print*, 'nxmax=',nxmax 141 print*, 'nymax=',nymax 142 print*, 'nzmax=',nzmax 143 print*,'nxshift=',nxshift 144 endif 145 127 146 if (verbosity.gt.0) then 128 147 write(*,*) 'call readpaths' … … 133 152 !print*,'length(4)',length(4) 134 153 !count=0,count_rate=1000 135 call system_clock(count_clock0, count_rate, count_max)154 call system_clock(count_clock0, count_rate, count_max) 136 155 !WRITE(*,*) 'SYSTEM_CLOCK',count, count_rate, count_max 137 156 !WRITE(*,*) 'SYSTEM_CLOCK, count_clock0', count_clock0 … … 157 176 endif 158 177 159 ! Initialize arrays in com_mod 178 ! Initialize arrays in com_mod 160 179 !***************************** 161 162 180 if(.not.(lmpreader.and.lmp_use_reader)) call com_mod_allocate_part(maxpart_mpi) 163 181 164 182 165 ! Read the age classes to be used166 !********************************183 ! Read the age classes to be used 184 !******************************** 167 185 if (verbosity.gt.0 .and. lroot) then 168 186 write(*,*) 'call readageclasses' … … 185 203 ! Detect metdata format 186 204 !********************** 205 if (verbosity.gt.0 .and. lroot) then 206 write(*,*) 'call detectformat' 207 endif 187 208 188 209 metdata_format = detectformat() … … 207 228 call com_mod_allocate_nests 208 229 209 ! Read the model grid specifications,210 ! both for the mother domain and eventual nests211 !**********************************************230 ! Read the model grid specifications, 231 ! both for the mother domain and eventual nests 232 !********************************************** 212 233 213 234 if (verbosity.gt.0 .and. lroot) then … … 221 242 end if 222 243 223 224 244 if (verbosity.gt.1 .and. lroot) then 225 245 call system_clock(count_clock, count_rate, count_max) … … 227 247 endif 228 248 229 230 249 if (verbosity.gt.0 .and. lroot) then 231 250 write(*,*) 'call gridcheck_nests' … … 233 252 call gridcheck_nests 234 253 235 236 ! Read the output grid specifications 237 !************************************ 238 239 if (verbosity.gt.0 .and. lroot) then 240 WRITE(*,*) 'call readoutgrid' 254 ! Read the output grid specifications 255 !************************************ 256 257 if (verbosity.gt.0 .and. lroot) then 258 write(*,*) 'call readoutgrid' 241 259 endif 242 260 … … 246 264 call readoutgrid_nest 247 265 if (verbosity.gt.0.and.lroot) then 248 WRITE(*,*) '# readoutgrid_nest'266 write(*,*) '# readoutgrid_nest' 249 267 endif 250 268 endif … … 263 281 !call readspecies 264 282 265 266 283 ! Read the landuse inventory 267 284 !*************************** … … 272 289 call readlanduse 273 290 274 275 ! Assign fractional cover of landuse classes to each ECMWF grid point 276 !******************************************************************** 291 ! Assign fractional cover of landuse classes to each ECMWF grid point 292 !******************************************************************** 277 293 278 294 if (verbosity.gt.0 .and. lroot) then … … 289 305 call readreleases 290 306 291 292 ! Read and compute surface resistances to dry deposition of gases 293 !**************************************************************** 307 ! Read and compute surface resistances to dry deposition of gases 308 !**************************************************************** 294 309 295 310 if (verbosity.gt.0 .and. lroot) then … … 305 320 print*,'call coordtrafo' 306 321 endif 307 308 322 309 323 ! Initialize all particles to non-existent … … 337 351 endif 338 352 339 340 353 ! Calculate volume, surface area, etc., of all output grid cells 341 354 ! Allocate fluxes and OHfield if necessary 342 355 !*************************************************************** 343 344 356 345 357 if (verbosity.gt.0 .and. lroot) then … … 387 399 388 400 call writeheader 389 ! FLEXPART 9.2 ticket ?? write header in ASCII format401 ! FLEXPART 9.2 ticket ?? write header in ASCII format 390 402 call writeheader_txt 391 403 … … 445 457 end if 446 458 447 ! Calculate particle trajectories448 !********************************459 ! Calculate particle trajectories 460 !******************************** 449 461 450 462 if (verbosity.gt.0.and. lroot) then -
src/gridcheck_ecmwf.f90
r92fab65 rdba4221 103 103 ! OPENING OF DATA FILE (GRIB CODE) 104 104 ! 105 write(*,*) 'Reading: '//path(3)(1:length(3)) & 106 //trim(wfname(ifn)) 105 107 5 call grib_open_file(ifile,path(3)(1:length(3)) & 106 108 //trim(wfname(ifn)),'r',iret) … … 418 420 419 421 nuvz=iumax 420 nwz =iwmax 422 nwz =iwmax + 1 ! +1 needed if input contains only lower levels 421 423 if(nuvz.eq.nlev_ec) nwz=nlev_ec+1 422 424 -
src/gridcheck_gfs.f90
r92fab65 rdba4221 111 111 ! OPENING OF DATA FILE (GRIB CODE) 112 112 ! 113 write(*,*) 'Reading: '//path(3)(1:length(3)) & 114 //trim(wfname(ifn)) 113 115 5 call grib_open_file(ifile,path(3)(1:length(3)) & 114 116 //trim(wfname(ifn)),'r',iret) -
src/gridcheck_nests.f90
r92fab65 rdba4221 77 77 igrib=0 78 78 iret=0 79 80 write(*,*) 'Reading: '//path(numpath+2*(l-1)+1) & 81 (1:length(numpath+2*(l-1)+1))//trim(wfnamen(l,ifn)) 79 82 80 83 5 call grib_open_file(ifile,path(numpath+2*(l-1)+1) & … … 326 329 327 330 nuvzn=iumax 328 nwzn=iwmax 331 nwzn=iwmax + 1 ! +1 needed if input contains only lower levels 329 332 if(nuvzn.eq.nlev_ec) nwzn=nlev_ecn+1 330 333 -
src/par_mod.f90
r92fab65 rdba4221 131 131 !********************************************* 132 132 133 ! NOTE: dimensioning of zsec2 in gridcheck depends on nuvzmax, therefore nuvzmax 134 ! must represent all levels even if only lower levels are in the input files. 135 133 136 ! ECMWF 134 137 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=359 ! 1.0 degree 92 level -
src/readreleases.f90
r92fab65 rdba4221 555 555 ireleaseend(numpoint)=int((jul2-bdate)*86400.) 556 556 else 557 write(*,*) 'FLEXPART MODEL WARNING' 558 write(*,*) 'Too few particles to randomize release,' 559 write(*,*) 'release time set to mid-point of release interval' 557 560 ireleasestart(numpoint)=int((julm-bdate)*86400.) 558 561 ireleaseend(numpoint)=int((julm-bdate)*86400.) -
src/readspecies.f90
r92fab65 rdba4221 104 104 specnum(pos_spec)=id_spec 105 105 write(aspecnumb,'(i3.3)') specnum(pos_spec) 106 write(*,*) 'Reading: '// & 107 path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb 106 108 open(unitspecies,file=path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb,status='old',form='formatted',err=998) 107 109 !write(*,*) 'reading SPECIES',specnum(pos_spec) -
src/readwind_ecmwf.f90
r92fab65 rdba4221 103 103 ! OPENING OF DATA FILE (GRIB CODE) 104 104 ! 105 write(*,*) 'Reading: '//path(3)(1:length(3)) & 106 //trim(wfname(indj)) 105 107 5 call grib_open_file(ifile,path(3)(1:length(3)) & 106 108 //trim(wfname(indj)),'r',iret) … … 386 388 endif 387 389 388 if(levdiff2.eq.0) then389 iwmax= nlev_ec+1390 ! if(levdiff2.eq.0) then 391 iwmax=iwmax+1 390 392 do i=0,nxmin1 391 393 do j=0,nymin1 392 wwh(i,j, nlev_ec+1)=0.394 wwh(i,j,iwmax)=0. 393 395 end do 394 396 end do 395 endif397 ! endif 396 398 397 399 ! For global fields, assign the leftmost data column also to the rightmost -
src/readwind_ecmwf_mpi.f90
r92fab65 rdba4221 113 113 ! OPENING OF DATA FILE (GRIB CODE) 114 114 ! 115 write(*,*) 'Reading: '//path(3)(1:length(3)) & 116 //trim(wfname(indj)) 115 117 5 call grib_open_file(ifile,path(3)(1:length(3)) & 116 118 //trim(wfname(indj)),'r',iret) … … 394 396 endif 395 397 396 if(levdiff2.eq.0) then397 iwmax= nlev_ec+1398 ! if(levdiff2.eq.0) then 399 iwmax=iwmax+1 398 400 do i=0,nxmin1 399 401 do j=0,nymin1 400 wwh(i,j, nlev_ec+1)=0.402 wwh(i,j,iwmax)=0. 401 403 end do 402 404 end do 403 endif405 ! endif 404 406 405 407 ! For global fields, assign the leftmost data column also to the rightmost -
src/readwind_gfs.f90
r92fab65 rdba4221 103 103 104 104 !HSO 105 write(*,*) 'Reading: '//path(3)(1:length(3)) & 106 //trim(wfname(indj)) 105 107 call grib_open_file(ifile,path(3)(1:length(3)) & 106 108 //trim(wfname(indj)),'r',iret) -
src/readwind_nests.f90
r92fab65 rdba4221 79 79 ! OPENING OF DATA FILE (GRIB CODE) 80 80 ! 81 81 write(*,*) 'Reading: '//path(numpath+2*(l-1)+1) & 82 (1:length(numpath+2*(l-1)+1))//trim(wfnamen(l,indj)) 82 83 5 call grib_open_file(ifile,path(numpath+2*(l-1)+1) & 83 84 (1:length(numpath+2*(l-1)+1))//trim(wfnamen(l,indj)),'r') … … 365 366 endif 366 367 367 if(levdiff2.eq.0) then368 iwmax= nlev_ec+1368 ! if(levdiff2.eq.0) then 369 iwmax=iwmax+1 369 370 do i=0,nxn(l)-1 370 371 do j=0,nyn(l)-1 371 wwhn(i,j, nlev_ec+1,l)=0.372 wwhn(i,j,iwmax,l)=0. 372 373 end do 373 374 end do 374 endif375 ! endif 375 376 376 377 do i=0,nxn(l)-1 -
src/writeheader_txt.f90
r92fab65 rdba4221 52 52 53 53 write(unitheader,*) '# ibdate,ibtime, iedate, ietime, flexversion' 54 write(unitheader,*) ibdate, ibtime, iedate, ietime, trim(flexversion) ! 'FLEXPART V9.0'54 write(unitheader,*) ibdate, ibtime, iedate, ietime, trim(flexversion) 55 55 !if (ldirect.eq.1) then 56 56 ! write(unitheader,*) ibdate,ibtime,trim(flexversion) ! 'FLEXPART V9.0'
Note: See TracChangeset
for help on using the changeset viewer.