Changes in src/concoutput_surf.f90 [2eefa58:16b61a5] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/concoutput_surf.f90
r2eefa58 r16b61a5 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), … … 104 101 character :: adate*8,atime*6 105 102 character(len=3) :: anspec 106 logical :: lexist107 103 108 104 … … 184 180 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ & 185 181 rho(iix,jjy,kzz-1,2)*dz2)/dz 186 ! RLT187 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,2)*dz1+ &188 rho_dry(iix,jjy,kzz-1,2)*dz2)/dz189 182 end do 190 183 end do … … 197 190 jjy=max(min(nint(yl),nymin1),0) 198 191 densityoutrecept(i)=rho(iix,jjy,1,2) 199 ! RLT200 densitydryrecept(i)=rho_dry(iix,jjy,1,2)201 192 end do 202 193 203 ! RLT204 ! conversion factor for output relative to dry air205 factor_drygrid=densityoutgrid/densitydrygrid206 factor_dryrecept=densityoutrecept/densitydryrecept207 194 208 195 ! Output is different for forward and backward simulations … … 609 596 end do 610 597 611 ! RLT Aug 2017612 ! Write out conversion factor for dry air613 inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist)614 if (lexist) then615 ! open and append616 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&617 status='old',action='write',access='append')618 else619 ! create new620 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&621 status='new',action='write')622 endif623 sp_count_i=0624 sp_count_r=0625 sp_fact=-1.626 sp_zer=.true.627 do kz=1,1628 do jy=0,numygrid-1629 do ix=0,numxgrid-1630 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then631 if (sp_zer.eqv..true.) then ! first value not equal to one632 sp_count_i=sp_count_i+1633 sparse_dump_i(sp_count_i)= &634 ix+jy*numxgrid+kz*numxgrid*numygrid635 sp_zer=.false.636 sp_fact=sp_fact*(-1.)637 endif638 sp_count_r=sp_count_r+1639 sparse_dump_r(sp_count_r)= &640 sp_fact*factor_drygrid(ix,jy,kz)641 else ! factor is one642 sp_zer=.true.643 endif644 end do645 end do646 end do647 write(unitoutfactor) sp_count_i648 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)649 write(unitoutfactor) sp_count_r650 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)651 close(unitoutfactor)652 653 654 598 if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal 655 599 if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & … … 678 622 endif 679 623 680 ! RLT Aug 2017 681 ! Write out conversion factor for dry air 682 if (numreceptor.gt.0) then 683 inquire(file=path(2)(1:length(2))//'factor_dryreceptor',exist=lexist) 684 if (lexist) then 685 ! open and append 686 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 687 status='old',action='write',access='append') 688 else 689 ! create new 690 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 691 status='new',action='write') 692 endif 693 write(unitoutfactor) itime 694 write(unitoutfactor) (factor_dryrecept(i),i=1,numreceptor) 695 close(unitoutfactor) 696 endif 624 697 625 698 626 ! Reinitialization of grid
Note: See TracChangeset
for help on using the changeset viewer.