Changes in src/concoutput.f90 [2eefa58:20963b1] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/concoutput.f90
r2eefa58 r20963b1 72 72 real :: sp_fact 73 73 real :: outnum,densityoutrecept(maxreceptor),xl,yl 74 ! RLT75 real :: densitydryrecept(maxreceptor)76 real :: factor_dryrecept(maxreceptor)77 74 78 75 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 109 106 character(LEN=8),save :: file_stat='REPLACE' 110 107 logical :: ldates_file 111 logical :: lexist112 108 integer :: ierr 113 109 character(LEN=100) :: dates_char … … 207 203 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 208 204 rho(iix,jjy,kzz-1,mind)*dz2)/dz 209 ! RLT210 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &211 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz212 205 end do 213 206 end do … … 221 214 !densityoutrecept(i)=rho(iix,jjy,1,2) 222 215 densityoutrecept(i)=rho(iix,jjy,1,mind) 223 ! RLT224 densitydryrecept(i)=rho_dry(iix,jjy,1,mind)225 216 end do 226 217 227 ! RLT228 ! conversion factor for output relative to dry air229 factor_drygrid=densityoutgrid/densitydrygrid230 factor_dryrecept=densityoutrecept/densitydryrecept231 218 232 219 ! Output is different for forward and backward simulations … … 366 353 ! Concentration output 367 354 !********************* 368 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5) ) then355 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5).or.(iout.eq.6)) then 369 356 370 357 ! Wet deposition … … 627 614 end do 628 615 629 ! RLT Aug 2017630 ! Write out conversion factor for dry air631 inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist)632 if (lexist) then633 ! open and append634 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&635 status='old',action='write',access='append')636 else637 ! create new638 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&639 status='new',action='write')640 endif641 sp_count_i=0642 sp_count_r=0643 sp_fact=-1.644 sp_zer=.true.645 do kz=1,numzgrid646 do jy=0,numygrid-1647 do ix=0,numxgrid-1648 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then649 if (sp_zer.eqv..true.) then ! first value not equal to one650 sp_count_i=sp_count_i+1651 sparse_dump_i(sp_count_i)= &652 ix+jy*numxgrid+kz*numxgrid*numygrid653 sp_zer=.false.654 sp_fact=sp_fact*(-1.)655 endif656 sp_count_r=sp_count_r+1657 sparse_dump_r(sp_count_r)= &658 sp_fact*factor_drygrid(ix,jy,kz)659 else ! factor is one660 sp_zer=.true.661 endif662 end do663 end do664 end do665 write(unitoutfactor) sp_count_i666 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)667 write(unitoutfactor) sp_count_r668 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)669 close(unitoutfactor)670 671 672 616 if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal 673 617 if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & … … 696 640 endif 697 641 698 ! RLT Aug 2017 699 ! Write out conversion factor for dry air 700 if (numreceptor.gt.0) then 701 inquire(file=path(2)(1:length(2))//'factor_dryreceptor',exist=lexist) 702 if (lexist) then 703 ! open and append 704 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 705 status='old',action='write',access='append') 706 else 707 ! create new 708 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 709 status='new',action='write') 710 endif 711 write(unitoutfactor) itime 712 write(unitoutfactor) (factor_dryrecept(i),i=1,numreceptor) 713 close(unitoutfactor) 714 endif 642 715 643 716 644 ! Reinitialization of grid
Note: See TracChangeset
for help on using the changeset viewer.