Changeset 37d6222 in flexpart.git
- Timestamp:
- Apr 13, 2018, 3:10:24 PM (6 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug
- Children:
- 44322ef
- Parents:
- 9f59af6 (diff), 20963b1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 2 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FLEXPART.f90
r0c00f1f ra9cf4b1 52 52 use com_mod 53 53 use conv_mod 54 use netcdf_output_mod, only: writeheader_netcdf 54 55 55 use random_mod, only: gasdev1 56 56 use class_gribfile 57 58 #ifdef USE_NCF 59 use netcdf_output_mod, only: writeheader_netcdf 60 #endif 57 61 58 62 implicit none … … 352 356 !****************************************************************** 353 357 358 #ifdef USE_NCF 354 359 if (lnetcdfout.eq.1) then 355 360 call writeheader_netcdf(lnest=.false.) … … 365 370 endif 366 371 endif 372 #endif 367 373 368 374 if (verbosity.gt.0) then -
src/FLEXPART_MPI.f90
r0c00f1f r20963b1 53 53 use conv_mod 54 54 use mpi_mod 55 use netcdf_output_mod, only: writeheader_netcdf56 55 use random_mod, only: gasdev1 57 56 use class_gribfile 57 58 #ifdef USE_NCF 59 use netcdf_output_mod, only: writeheader_netcdf 60 #endif 58 61 59 62 implicit none … … 64 67 integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN 65 68 integer :: detectformat 66 69 integer(selected_int_kind(16)), dimension(maxspec) :: tot_b=0, & 70 & tot_i=0 67 71 68 72 … … 203 207 204 208 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 205 print *,'ECMWF metdata detected'209 if (lroot) print *,'ECMWF metdata detected' 206 210 elseif (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 207 print *,'NCEP metdata detected'211 if (lroot) print *,'NCEP metdata detected' 208 212 else 209 print *,'Unknown metdata format'213 if (lroot) print *,'Unknown metdata format' 210 214 stop 211 215 endif … … 378 382 379 383 if (mp_measure_time) call mpif_mtime('iotime',0) 384 380 385 if (lroot) then ! MPI: this part root process only 381 382 if (lnetcdfout.eq.1) then383 call writeheader_netcdf(lnest=.false.)384 else385 call writeheader386 end if387 388 if (nested_output.eq.1) then389 if (lnetcdfout.eq.1) then390 call writeheader_netcdf(lnest=.true.)391 else392 call writeheader_nest393 endif394 endif395 396 ! 386 #ifdef USE_NCF 387 if (lnetcdfout.eq.1) then 388 call writeheader_netcdf(lnest=.false.) 389 else 390 call writeheader 391 end if 392 393 if (nested_output.eq.1) then 394 if (lnetcdfout.eq.1) then 395 call writeheader_netcdf(lnest=.true.) 396 else 397 call writeheader_nest 398 endif 399 endif 400 #endif 401 397 402 if (verbosity.gt.0) then 398 403 print*,'call writeheader' … … 402 407 ! FLEXPART 9.2 ticket ?? write header in ASCII format 403 408 call writeheader_txt 404 !if (nested_output.eq.1) call writeheader_nest 409 405 410 if (nested_output.eq.1.and.surf_only.ne.1) call writeheader_nest 406 411 if (nested_output.eq.1.and.surf_only.eq.1) call writeheader_nest_surf … … 409 414 410 415 if (mp_measure_time) call mpif_mtime('iotime',0) 411 412 !open(unitdates,file=path(2)(1:length(2))//'dates')413 416 414 417 if (verbosity.gt.0 .and. lroot) then … … 481 484 482 485 ! NIK 16.02.2005 483 if ( lroot) then484 call MPI_Reduce( MPI_IN_PLACE, tot_blc_count, nspec, MPI_INTEGER8, MPI_SUM, id_root, &486 if (mp_partgroup_pid.ge.0) then ! Skip for readwind process 487 call MPI_Reduce(tot_blc_count, tot_b, nspec, MPI_INTEGER8, MPI_SUM, id_root, & 485 488 & mp_comm_used, mp_ierr) 486 call MPI_Reduce( MPI_IN_PLACE, tot_inc_count, nspec, MPI_INTEGER8, MPI_SUM, id_root, &489 call MPI_Reduce(tot_inc_count, tot_i, nspec, MPI_INTEGER8, MPI_SUM, id_root, & 487 490 & mp_comm_used, mp_ierr) 488 else489 if (mp_partgroup_pid.ge.0) then ! Skip for readwind process490 call MPI_Reduce(tot_blc_count, 0, nspec, MPI_INTEGER8, MPI_SUM, id_root, &491 & mp_comm_used, mp_ierr)492 call MPI_Reduce(tot_inc_count, 0, nspec, MPI_INTEGER8, MPI_SUM, id_root, &493 & mp_comm_used, mp_ierr)494 end if495 491 end if 492 496 493 497 494 if (lroot) then … … 500 497 write(*,*) 'Scavenging statistics for species ', species(i), ':' 501 498 write(*,*) 'Total number of occurences of below-cloud scavenging', & 502 & tot_blc_count(i) 499 & tot_b(i) 500 ! & tot_blc_count(i) 503 501 write(*,*) 'Total number of occurences of in-cloud scavenging', & 504 & tot_inc_count(i) 502 & tot_i(i) 503 ! & tot_inc_count(i) 505 504 write(*,*) '**********************************************' 506 505 end do -
src/concoutput.f90
r08a38b5 r20963b1 140 140 close(unitdates) 141 141 142 ! Overwrite existing dates file on first call, later append to it 143 ! This fixes a bug where the dates file kept growing across multiple runs 142 144 IF (init) THEN 143 145 file_stat='OLD' … … 313 315 drygridsigma(ix,jy)* & 314 316 sqrt(real(nclassunc)) 315 125drygridsigmatotal=drygridsigmatotal+ &317 drygridsigmatotal=drygridsigmatotal+ & 316 318 drygridsigma(ix,jy) 317 319 endif -
src/concoutput_mpi.f90
r6a678e3 r20963b1 104 104 real,parameter :: weightair=28.97 105 105 logical :: sp_zer 106 LOGICAL,save :: init=.true.106 logical,save :: init=.true. 107 107 character :: adate*8,atime*6 108 108 character(len=3) :: anspec … … 113 113 integer :: ierr 114 114 character(LEN=100) :: dates_char 115 ! character :: dates_char116 115 117 116 ! Measure execution time … … 129 128 ! This fixes a bug where the dates file kept growing across multiple runs 130 129 131 ! If 'dates' file exists , make a backup130 ! If 'dates' file exists in output directory, make a backup 132 131 inquire(file=path(2)(1:length(2))//'dates', exist=ldates_file) 133 132 if (ldates_file.and.init) then … … 258 257 259 258 write(anspec,'(i3.3)') ks 260 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then 261 if (ldirect.eq.1) then 262 open(unitoutgrid,file=path(2)(1:length(2))//'grid_conc_'//adate// & 259 260 if (DRYBKDEP.or.WETBKDEP) then !scavdep output 261 if (DRYBKDEP) & 262 open(unitoutgrid,file=path(2)(1:length(2))//'grid_drydep_'//adate// & 263 atime//'_'//anspec,form='unformatted') 264 if (WETBKDEP) & 265 open(unitoutgrid,file=path(2)(1:length(2))//'grid_wetdep_'//adate// & 266 atime//'_'//anspec,form='unformatted') 267 write(unitoutgrid) itime 268 else 269 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then 270 if (ldirect.eq.1) then 271 open(unitoutgrid,file=path(2)(1:length(2))//'grid_conc_'//adate// & 272 atime//'_'//anspec,form='unformatted') 273 else 274 open(unitoutgrid,file=path(2)(1:length(2))//'grid_time_'//adate// & 275 atime//'_'//anspec,form='unformatted') 276 endif 277 write(unitoutgrid) itime 278 endif 279 280 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio 281 open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & 263 282 atime//'_'//anspec,form='unformatted') 264 else 265 open(unitoutgrid,file=path(2)(1:length(2))//'grid_time_'//adate// & 266 atime//'_'//anspec,form='unformatted') 283 284 write(unitoutgridppt) itime 267 285 endif 268 write(unitoutgrid) itime 269 endif 270 271 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio 272 open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & 273 atime//'_'//anspec,form='unformatted') 274 275 write(unitoutgridppt) itime 276 endif 286 endif ! if deposition output 277 287 278 288 do kp=1,maxpointspec_act … … 354 364 ! Concentration output 355 365 !********************* 356 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5) ) then366 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5).or.(iout.eq.6)) then 357 367 358 368 ! Wet deposition … … 449 459 endif 450 460 sp_count_r=sp_count_r+1 461 if (lparticlecountoutput) then 462 sparse_dump_r(sp_count_r)= & 463 sp_fact* & 464 grid(ix,jy,kz) 465 else 451 466 sparse_dump_r(sp_count_r)= & 452 467 sp_fact* & 453 468 grid(ix,jy,kz)* & 454 469 factor3d(ix,jy,kz)/tot_mu(ks,kp) 470 end if 471 472 455 473 ! if ((factor(ix,jy,kz)/tot_mu(ks,kp)).eq.0) 456 474 ! + write (*,*) factor(ix,jy,kz),tot_mu(ks,kp),ks,kp … … 638 656 !************************* 639 657 640 do ks=1,nspec 641 do kp=1,maxpointspec_act 642 do i=1,numreceptor 643 creceptor(i,ks)=0. 644 end do 645 do jy=0,numygrid-1 646 do ix=0,numxgrid-1 647 do l=1,nclassunc 648 do nage=1,nageclass 649 do kz=1,numzgrid 650 gridunc(ix,jy,kz,ks,kp,l,nage)=0. 651 end do 652 end do 653 end do 654 end do 655 end do 656 end do 657 end do 658 creceptor(:,:)=0. 659 gridunc(:,:,:,:,:,:,:)=0. 658 660 659 661 if (mp_measure_time) call mpif_mtime('rootonly',1) -
src/getfields_mpi.f90
r6ecb30a r20963b1 233 233 40 indmin=indj 234 234 235 if (WETBKDEP.and.(lmpreader.or.(.not.lmp_use_reader.and.lroot))) then 236 call writeprecip(itime,memind(1)) 237 endif 238 235 239 else 236 240 … … 287 291 60 indmin=indj 288 292 289 mind3=memstat 293 ! if (WETBKDEP.and.lroot) then 294 if (WETBKDEP.and.(lmpreader.or.(.not.lmp_use_reader.and.lroot))) then 295 call writeprecip(itime,memind(1)) 296 endif 290 297 291 298 endif -
src/makefile
rccc9ec2 ra9cf4b1 31 31 # make [-j] mpi-dbg 32 32 # 33 # NETCDF OUTPUT 34 # To add support for output in netCDF format, append `ncf=yes` to the 35 # `make` command 36 # 33 37 ################################################################################ 34 38 … … 57 61 INCPATH2 = ${ROOT_DIR}/include 58 62 LIBPATH1 = ${ROOT_DIR}/lib 59 60 else #ifeq ($(gcc), 5.4) 63 else 61 64 # Compiled libraries under user ~flexpart, gfortran v5.4 62 65 ROOT_DIR = /homevip/flexpart/ … … 68 71 INCPATH2 = /usr/include 69 72 LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib 70 71 #else72 # Default: System libraries at NILU, gfortran v4.673 # F90 = /usr/bin/gfortran74 # MPIF90 = /usr/bin/mpif90.openmpi75 76 # INCPATH1 = /xnilu_wrk/projects/FLEXPART/flex_wrk/bin64/grib_api/include77 # INCPATH2 = /usr/include78 # LIBPATH1 = /xnilu_wrk/projects/FLEXPART/flex_wrk/bin64/grib_api/lib79 73 endif 74 75 76 ### Enable netCDF output? 77 ifeq ($(ncf), yes) 78 NCOPT = -DUSE_NCF -lnetcdff 79 else 80 NCOPT = -UUSE_NCF 81 endif 82 80 83 81 84 … … 89 92 90 93 ## LIBRARIES 91 LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff # -fopenmp 92 93 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(FUSER) #-Warray-bounds -fcheck=all # -march=native 94 95 DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) -fbacktrace -Wall -fdump-core $(FUSER) # -ffpe-trap=invalid,overflow,denormal,underflow,zero -Warray-bounds -fcheck=all 94 #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff 95 LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT) 96 97 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native 98 99 DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) $(NCOPT) -fbacktrace -Wall -fdump-core $(FUSER) # -ffpe-trap=invalid,overflow,denormal,underflow,zero -Warray-bounds -fcheck=all 96 100 97 101 LDFLAGS = $(FFLAGS) -L$(LIBPATH1) -Wl,-rpath,$(LIBPATH1) $(LIBS) #-L$(LIBPATH2) … … 139 143 getfields_mpi.o \ 140 144 readwind_ecmwf_mpi.o 145 146 OBJECTS_NCF = netcdf_output_mod.o 141 147 142 148 OBJECTS = \ … … 196 202 dynamic_viscosity.o get_settling.o \ 197 203 initialize_cbl_vel.o re_initialize_particle.o \ 198 cbl.o netcdf_output_mod.o 204 cbl.o 205 206 ifeq ($(ncf), yes) 207 OBJECTS := $(OBJECTS) $(OBJECTS_NCF) 208 endif 199 209 200 210 %.o: %.mod -
src/readOHfield.f90
rd7aab4b r3f149cc 22 22 subroutine readOHfield 23 23 24 !***************************************************************************** 25 ! * 26 ! Reads the OH field into memory * 27 ! * 28 ! AUTHOR: R.L. Thompson, Nov 2014 * 29 ! * 30 !***************************************************************************** 31 ! * 32 ! Variables: * 33 ! * 34 ! path(numpath) contains the path names * 35 ! lonOH(nxOH) longitude of OH fields * 36 ! latOH(nyOH) latitude of OH fields * 37 ! altOH(nzOH) altitude of OH fields * 38 ! etaOH(nzOH) eta-levels of OH fields * 39 ! OH_field(nxOH,nyOH,nzOH,m) OH concentration (molecules/cm3) * 40 ! * 41 ! * 42 !***************************************************************************** 24 !***************************************************************************** 25 ! * 26 ! Reads the OH field into memory * 27 ! * 28 ! AUTHOR: R.L. Thompson, Nov 2014 * 29 ! * 30 ! UPDATES: * 31 ! 03/2018 SEC: Converted original netCDF files to binary format * 32 !***************************************************************************** 33 ! * 34 ! Variables: * 35 ! * 36 ! path(numpath) contains the path names * 37 ! lonOH(nxOH) longitude of OH fields * 38 ! latOH(nyOH) latitude of OH fields * 39 ! altOH(nzOH) altitude of OH fields * 40 ! etaOH(nzOH) eta-levels of OH fields * 41 ! OH_field(nxOH,nyOH,nzOH,m) OH concentration (molecules/cm3) * 42 ! * 43 ! * 44 !***************************************************************************** 43 45 44 46 use oh_mod … … 48 50 implicit none 49 51 50 include 'netcdf.inc' 51 52 character(len=150) :: thefile 53 character(len=2) :: mm 54 integer :: nid,ierr,xid,yid,zid,vid,m 52 integer :: i,j,k,l,ierr 55 53 real, dimension(:), allocatable :: etaOH 56 54 … … 61 59 real, parameter :: scalehgt=7000. ! scale height in metres 62 60 63 ! Read OH fields and level heights64 !********************************65 61 66 do m=1,12 67 68 ! open netcdf file 69 write(mm,fmt='(i2.2)') m 70 ! thefile=trim(path(1))//'OH_FIELDS/'//'geos-chem.OH.2005'//mm//'01.nc' 71 thefile=trim(ohfields_path)//'OH_FIELDS/'//'geos-chem.OH.2005'//mm//'01.nc' 72 ierr=nf_open(trim(thefile),NF_NOWRITE,nid) 73 if(ierr.ne.0) then 74 write (*,*) 'The OH field at: '//thefile// ' could not be opened' 75 write (*,*) 'please copy the OH fields there, or change the path in the' 76 write (*,*) 'COMMAND namelist!' 77 write(*,*) nf_strerror(ierr) 78 stop 79 endif 62 open(unitOH,file=trim(ohfields_path) & 63 //'OH_FIELDS/OH_variables.bin',status='old', & 64 form='UNFORMATTED', iostat=ierr, convert='little_endian') 80 65 81 ! inquire about variables82 ierr=nf_inq_dimid(nid,'Lon-000',xid)83 if(ierr.ne.0) then84 write(*,*) nf_strerror(ierr)85 stop86 endif87 ierr=nf_inq_dimid(nid,'Lat-000',yid)88 if(ierr.ne.0) then89 write(*,*) nf_strerror(ierr)90 stop91 endif92 ierr=nf_inq_dimid(nid,'Alt-000',zid)93 if(ierr.ne.0) then94 write(*,*) nf_strerror(ierr)95 stop96 endif97 98 if(m.eq.1) then99 100 ! read dimension sizes101 ierr=nf_inq_dimlen(nid,xid,nxOH)102 if(ierr.ne.0) then103 write(*,*) nf_strerror(ierr)104 stop105 endif106 ierr=nf_inq_dimlen(nid,yid,nyOH)107 if(ierr.ne.0) then108 write(*,*) nf_strerror(ierr)109 stop110 endif111 ierr=nf_inq_dimlen(nid,zid,nzOH)112 if(ierr.ne.0) then113 write(*,*) nf_strerror(ierr)114 stop115 endif116 117 ! allocate variables118 allocate(lonOH(nxOH))119 allocate(latOH(nyOH))120 allocate(etaOH(nzOH))121 allocate(altOH(nzOH))122 allocate(OH_field(nxOH,nyOH,nzOH,12))123 allocate(OH_hourly(nxOH,nyOH,nzOH,2))124 125 ! read dimension variables126 ierr=nf_inq_varid(nid,'LON',xid)127 ierr=nf_get_var_real(nid,xid,lonOH)128 if(ierr.ne.0) then129 write(*,*) nf_strerror(ierr)130 stop131 endif132 ierr=nf_inq_varid(nid,'LAT',yid)133 ierr=nf_get_var_real(nid,yid,latOH)134 if(ierr.ne.0) then135 write(*,*) nf_strerror(ierr)136 stop137 endif138 ierr=nf_inq_varid(nid,'ETAC',zid)139 ierr=nf_get_var_real(nid,zid,etaOH)140 if(ierr.ne.0) then141 write(*,*) nf_strerror(ierr)142 stop143 endif144 145 ! convert eta-level to altitude (assume surface pressure of 1010 hPa)146 altOH=log(1010./(etaOH*1010.))*scalehgt147 148 endif ! m.eq.1149 150 ! read OH_field151 ierr=nf_inq_varid(nid,'CHEM-L_S__OH',vid)152 ierr=nf_get_var_real(nid,vid,OH_field(:,:,:,m))153 if(ierr.ne.0) then154 write(*,*) nf_strerror(ierr)155 stop156 endif157 158 ierr=nf_close(nid)159 160 end do161 162 deallocate(etaOH)163 164 ! Read J(O1D) photolysis rates165 !********************************166 167 ! open netcdf file168 ! thefile=trim(path(1))//'OH_FIELDS/jrate_average.nc'169 thefile=trim(ohfields_path)//'OH_FIELDS/jrate_average.nc'170 ierr=nf_open(trim(thefile),NF_NOWRITE,nid)171 66 if(ierr.ne.0) then 172 write(*,*) nf_strerror(ierr)67 write(*,*) 'Cannot read binary OH fields in ',trim(ohfields_path)//'OH_FIELDS/OH_variables.bin' 173 68 stop 174 69 endif 175 70 176 ! read dimension variables 177 ierr=nf_inq_varid(nid,'longitude',xid) 178 ierr=nf_get_var_real(nid,xid,lonjr) 179 if(ierr.ne.0) then 180 write(*,*) nf_strerror(ierr) 181 stop 182 endif 183 ierr=nf_inq_varid(nid,'latitude',yid) 184 ierr=nf_get_var_real(nid,yid,latjr) 185 if(ierr.ne.0) then 186 write(*,*) nf_strerror(ierr) 187 stop 188 endif 71 read(unitOH) nxOH 72 read(unitOH) nyOH 73 read(unitOH) nzOH 74 write(*,*) nxOH,nyOH,nzOH 189 75 190 ! read jrate_average 191 ierr=nf_inq_varid(nid,'jrate',vid)192 ierr=nf_get_var_real(nid,vid,jrate_average)193 if(ierr.ne.0) then194 write(*,*) nf_strerror(ierr)195 stop196 endif76 ! allocate variables 77 allocate(lonOH(nxOH)) 78 allocate(latOH(nyOH)) 79 allocate(etaOH(nzOH)) 80 allocate(altOH(nzOH)) 81 allocate(OH_field(nxOH,nyOH,nzOH,12)) 82 allocate(OH_hourly(nxOH,nyOH,nzOH,2)) 197 83 198 ierr=nf_close(nid) 84 read(unitOH) (lonjr(i),i=1,360) 85 read(unitOH) (latjr(i),i=1,180) 86 read(unitOH) (((jrate_average(i,j,k),i=1,360),j=1,180),k=1,12) 87 read(unitOH) (lonOH(i),i=1,nxOH) 88 read(unitOH) (latOH(i),i=1,nyOH) 89 read(unitOH) (lonOH(i),i=1,nxOH) 199 90 200 return 91 read(unitOH) (altOH(i),i=1,nzOH) 92 read(unitOH) ((((OH_field(i,j,k,l),i=1,nxOH),j=1,nyOH),k=1,nzOH),l=1,12) 93 read(unitOH) ((((OH_hourly(i,j,k,l),i=1,nxOH),j=1,nyOH),k=1,nzOH),l=1,2) 201 94 202 95 end subroutine readOHfield -
src/readcommand.f90
r01e6052 r20963b1 332 332 case (3) ! 3 .. wet deposition in outputfield 333 333 ind_rel = 3 334 write(*,*) ' #### FLEXPART WET DEPOSITION BACKWARD MODE #### ' 335 write(*,*) ' #### Releaseheight is forced to 0 - 20km #### ' 336 write(*,*) ' #### Release is performed above ground lev #### ' 334 if (lroot) then 335 write(*,*) ' #### FLEXPART WET DEPOSITION BACKWARD MODE #### ' 336 write(*,*) ' #### Releaseheight is forced to 0 - 20km #### ' 337 write(*,*) ' #### Release is performed above ground lev #### ' 338 end if 337 339 WETBKDEP=.true. 338 340 allocate(xscav_frac1(maxpart,maxspec)) 339 341 case (4) ! 4 .. dry deposition in outputfield 340 342 ind_rel = 4 341 write(*,*) ' #### FLEXPART DRY DEPOSITION BACKWARD MODE #### ' 342 write(*,*) ' #### Releaseheight is forced to 0 - 2*href #### ' 343 write(*,*) ' #### Release is performed above ground lev #### ' 343 if (lroot) then 344 write(*,*) ' #### FLEXPART DRY DEPOSITION BACKWARD MODE #### ' 345 write(*,*) ' #### Releaseheight is forced to 0 - 2*href #### ' 346 write(*,*) ' #### Release is performed above ground lev #### ' 347 end if 344 348 DRYBKDEP=.true. 345 349 allocate(xscav_frac1(maxpart,maxspec)) … … 392 396 endif 393 397 394 ! check for netcdf output switch (use for non-namelist input only!) 398 ! Check for netcdf output switch 399 !******************************* 395 400 if (iout.ge.8) then 396 401 lnetcdfout = 1 397 402 iout = iout - 8 398 ! #ifndef NETCDF_OUTPUT 399 ! print*,'ERROR: netcdf output not activated during compile time but used in COMMAND file!'400 ! print*,'Please recompile with netcdf libraryor use standard output format.'401 !stop402 !#endif403 #ifndef USE_NCF 404 write(*,*) 'ERROR: netcdf output not activated during compile time but used in COMMAND file!' 405 write(*,*) 'Please recompile with netcdf library (`make [...] ncf=yes`) or use standard output format.' 406 stop 407 #endif 403 408 endif 404 409 -
src/readwind_ecmwf_mpi.f90
r61e07ba r20963b1 103 103 104 104 integer :: isec1(56),isec2(22+nxmax+nymax) 105 real( kind=4) :: zsec4(jpunp)106 real( kind=4) :: xaux,yaux107 real( kind=8) :: xauxin,yauxin108 real ,parameter :: eps=1.e-4109 real( kind=4) :: nsss(0:nxmax-1,0:nymax-1),ewss(0:nxmax-1,0:nymax-1)110 real :: plev1,pmean,tv,fu,hlev1,ff10m,fflev1,conversion_factor105 real(sp) :: zsec4(jpunp) 106 real(sp) :: xaux,yaux 107 real(dp) :: xauxin,yauxin 108 real(sp),parameter :: eps=1.e-4 109 real(sp) :: nsss(0:nxmax-1,0:nymax-1),ewss(0:nxmax-1,0:nymax-1) 110 real(sp) :: plev1,pmean,tv,fu,hlev1,ff10m,fflev1,conversion_factor 111 111 112 112 logical :: hflswitch,strswitch !,readcloud … … 123 123 !ZHG test the grib fields that have lcwc without using them 124 124 ! readcloud=.false. 125 !hg end 125 126 126 levdiff2=nlev_ec-nwz+1 127 127 iumax=0 -
src/releaseparticles_mpi.f90
r16b61a5 r20963b1 216 216 xmass1(ipart,k)=xmass(i,k)/real(npart(i)) & 217 217 *timecorrect(k)/average_timecorrect 218 ! write (*,*) 'xmass1: ',xmass1(ipart,k),ipart,k 218 if (DRYBKDEP.or.WETBKDEP) then ! if there is no scavenging in wetdepo it will be set to 0 219 ! if ( henry(k).gt.0 .or. & 220 ! crain_aero(k).gt.0. .or. csnow_aero(k).gt.0. .or. & 221 ! ccn_aero(k).gt.0. .or. in_aero(k).gt.0. ) then 222 xscav_frac1(ipart,k)=-1. 223 endif 219 224 ! Assign certain properties to particle 220 225 !************************************** … … 366 371 !Af ind_rel is defined in readcommand.f 367 372 368 if ( ind_rel .eq. 1) then373 if ((ind_rel .eq. 1).or.(ind_rel .eq. 3).or.(ind_rel .eq. 4)) then 369 374 370 375 ! Interpolate the air density -
src/timemanager.f90
rfe32dca ra9cf4b1 101 101 use par_mod 102 102 use com_mod 103 #ifdef USE_NCF 103 104 use netcdf_output_mod, only: concoutput_netcdf,concoutput_nest_netcdf,& 104 105 &concoutput_surf_netcdf,concoutput_surf_nest_netcdf 106 #endif 105 107 106 108 implicit none … … 389 391 if (surf_only.ne.1) then 390 392 if (lnetcdfout.eq.1) then 393 #ifdef USE_NCF 391 394 call concoutput_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 395 #endif 392 396 else 393 397 call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) … … 399 403 write(*,*) 'system clock',count_clock - count_clock0 400 404 endif 401 if (lnetcdfout.eq.1) then 405 if (lnetcdfout.eq.1) then 406 #ifdef USE_NCF 402 407 call concoutput_surf_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 408 #endif 403 409 else 404 410 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) … … 419 425 endif 420 426 else 427 #ifdef USE_NCF 421 428 if (surf_only.ne.1) then 422 429 call concoutput_nest_netcdf(itime,outnum) … … 424 431 call concoutput_surf_nest_netcdf(itime,outnum) 425 432 endif 433 #endif 426 434 endif 427 435 endif -
src/timemanager_mpi.f90
rd8eed02 r20963b1 102 102 use com_mod 103 103 use mpi_mod 104 #ifdef USE_NCF 104 105 use netcdf_output_mod, only: concoutput_netcdf,concoutput_nest_netcdf,& 105 106 &concoutput_surf_netcdf,concoutput_surf_nest_netcdf 107 #endif 106 108 107 109 implicit none … … 113 115 integer :: ip 114 116 integer :: loutnext,loutstart,loutend 115 integer :: ix,jy,ldeltat,itage,nage 117 integer :: ix,jy,ldeltat,itage,nage,idummy 116 118 integer :: i_nan=0,ii_nan,total_nan_intl=0 !added by mc to check instability in CBL scheme 117 119 integer :: numpart_tot_mpi ! for summing particles on all processes 118 real :: outnum,weight,prob(maxspec) 119 real :: decfact 120 real :: outnum,weight,prob(maxspec), prob_rec(maxspec), decfact,wetscav 120 121 121 122 real(sp) :: gridtotalunc … … 123 124 & drydeposit(maxspec)=0_dep_prec 124 125 real :: xold,yold,zold,xmassfract 126 real :: grfraction(3) 125 127 real, parameter :: e_inv = 1.0/exp(1.0) 126 128 … … 157 159 !CGZ-lifetime: set lifetime to 0 158 160 161 if (.not.lusekerneloutput) write(*,*) 'Not using the kernel' 162 if (turboff) write(*,*) 'Turbulence switched off' 159 163 160 164 … … 481 485 if (lroot) then 482 486 if (lnetcdfout.eq.1) then 487 #ifdef USE_NCF 483 488 call concoutput_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,& 484 489 &drygridtotalunc) 490 #endif 485 491 else 486 492 call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) … … 494 500 if (lroot) then 495 501 if (lnetcdfout.eq.1) then 502 #ifdef USE_NCF 496 503 call concoutput_surf_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,& 497 504 &drygridtotalunc) 505 #endif 498 506 else 499 507 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) … … 513 521 call mpif_tm_reduce_grid_nest 514 522 515 if (mp_measure_time) call mpif_mtime('iotime',0)523 if (mp_measure_time) call mpif_mtime('iotime',0) 516 524 517 525 if (lnetcdfout.eq.0) then … … 526 534 else ! :TODO: check for zeroing in the netcdf module 527 535 call concoutput_surf_nest(itime,outnum) 528 529 536 end if 530 531 537 else 532 538 #ifdef USE_NCF 533 539 if (surf_only.ne.1) then 534 540 if (lroot) then … … 544 550 end if 545 551 endif 546 547 552 #endif 548 553 end if 549 554 end if 550 551 552 555 outnum=0. 553 556 endif … … 707 710 zold=ztra1(j) 708 711 712 713 ! RECEPTOR: dry/wet depovel 714 !**************************** 715 ! Before the particle is moved 716 ! the calculation of the scavenged mass shall only be done once after release 717 ! xscav_frac1 was initialised with a negative value 718 719 if (DRYBKDEP) then 720 do ks=1,nspec 721 if ((xscav_frac1(j,ks).lt.0)) then 722 call get_vdep_prob(itime,xtra1(j),ytra1(j),ztra1(j),prob_rec) 723 if (DRYDEPSPEC(ks)) then ! dry deposition 724 xscav_frac1(j,ks)=prob_rec(ks) 725 else 726 xmass1(j,ks)=0. 727 xscav_frac1(j,ks)=0. 728 endif 729 endif 730 enddo 731 endif 732 733 if (WETBKDEP) then 734 do ks=1,nspec 735 if ((xscav_frac1(j,ks).lt.0)) then 736 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav) 737 if (wetscav.gt.0) then 738 xscav_frac1(j,ks)=wetscav* & 739 (zpoint2(npoint(j))-zpoint1(npoint(j)))*grfraction(1) 740 else 741 xmass1(j,ks)=0. 742 xscav_frac1(j,ks)=0. 743 endif 744 endif 745 enddo 746 endif 747 709 748 ! Integrate Lagevin equation for lsynctime seconds 710 749 !************************************************* … … 808 847 call initial_cond_calc(itime+lsynctime,j) 809 848 itra1(j)=-999999999 810 !print*, 'terminated particle ',j,'for age' 849 if (verbosity.gt.0) then 850 print*, 'terminated particle ',j,'for age' 851 endif 811 852 endif 812 853 endif … … 819 860 820 861 821 ! Added by mc: counter of "unstable" particle velocity during a time scale822 ! 823 862 ! Counter of "unstable" particle velocity during a time scale 863 ! of maximumtl=20 minutes (defined in com_mod) 864 !************************************************************ 824 865 total_nan_intl=0 825 866 i_nan=i_nan+1 ! added by mc to count nan during a time of maxtl (i.e. maximum tl fixed here to 20 minutes, see com_mod) -
README.md
r054cf84 r3d04845 1 1 # README # 2 2 3 This README would normally document whatever steps are necessary to get your application up and running.4 3 5 4 ### What is this repository for? ### 6 5 7 * This repository contains the development version of the Lagrangian model FLEXPART 9.2 migrated from svn6 * This repository contains the development version of the Lagrangian model FLEXPART 8 7 9 ### How do I get set up? ###8 ### How do I get set up? ### 10 9 11 * Summary of set up12 10 * Configuration 11 12 Edit the makefile with the paths to libraries and include files 13 13 14 * Dependencies 14 * Database configuration 15 * How to run tests 16 * Deployment instructions 15 16 * Jasper and grib_api or ECCodes 17 * NetCDF (optional) 18 19 * Compilation 20 21 ``` 22 > cd src 23 > make 24 ``` 25 26 * Deployment instructions 27 28 FLEXPART is a standalone executable 17 29 18 30 ### Contribution guidelines ### 19 31 20 * The version contributed should compile on a reference version of the system and compiler. The current reference is gfortran on Ubuntu 12.04 -- GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.332 * The version contributed should compile on a reference version of the system and compiler. The current reference is gfortran 5.4 on Ubuntu 16.04 21 33 * Code contribution including new features and bug fixes should be complemented with appropriate tests 22 * Writing tests:23 34 An essential test consists of a set of input files and directories that allow FLEXPART to run. 24 35 A test can be accompanied by output files for verification 25 36 * Code review 26 * Other guidelines27 37 28 ### Who do I talk to? ### 38 [comment]: # "### Who do I talk to? ###" 29 39 30 * Ignacio Pisso ip@nilu.no40 ignacio.pisso@nilu.no -
options/COMMAND
r5b7ec80 r9f59af6 12 12 CTL= -5.0000000 , 13 13 IFINE= 4, 14 IOUT= 2,14 IOUT= 1, 15 15 IPOUT= 0, 16 16 LSUBGRID= 0, -
options/SPECIES/SPECIES.README
r8d70e43 r9f59af6 6 6 ./specoverview 7 7 8 UPDATE FOR FLEXPART VERSION 10. 0 DEV:8 UPDATE FOR FLEXPART VERSION 10.3: 9 9 --------------------------------------------------------------------------------------------------------------------------- 10 10 Please note that the format of the SPECIES files has changed from the previous version (9.2) of FLEXPART and it is important … … 41 41 D is the diffusivity of water vapor and 42 42 D_i is the diffusivity of the species, 43 H is the effective Henry ’s constant,43 H is the effective Henry's constant, 44 44 f0 varies between 0 and 1 and gives the reactivity of a species relative to that of ozone. For non-reactive species f0 is 0, for slightly reactive it is 0.1 and for highly reactive it is 1. 45 45 Dry deposition of gases is switched off by negative D.
Note: See TracChangeset
for help on using the changeset viewer.