Changes in src/concoutput_nest.f90 [2eefa58:7d02c2f] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/concoutput_nest.f90
r2eefa58 r7d02c2f 70 70 real :: sp_fact 71 71 real :: outnum,densityoutrecept(maxreceptor),xl,yl 72 ! RLT73 real :: densitydryrecept(maxreceptor)74 real :: factor_dryrecept(maxreceptor)75 72 76 73 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 99 96 character :: adate*8,atime*6 100 97 character(len=3) :: anspec 101 logical :: lexist102 98 integer :: mind 103 99 ! mind eso:added to ensure identical results between 2&3-fields versions … … 168 164 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 169 165 rho(iix,jjy,kzz-1,mind)*dz2)/dz 170 ! RLT171 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &172 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz173 166 end do 174 167 end do … … 182 175 !densityoutrecept(i)=rho(iix,jjy,1,2) 183 176 densityoutrecept(i)=rho(iix,jjy,1,mind) 184 ! RLT185 densitydryrecept(i)=rho_dry(iix,jjy,1,mind)186 177 end do 187 178 188 ! RLT189 ! conversion factor for output relative to dry air190 factor_drygrid=densityoutgrid/densitydrygrid191 factor_dryrecept=densityoutrecept/densitydryrecept192 179 193 180 ! Output is different for forward and backward simulations … … 564 551 end do 565 552 566 ! RLT Aug 2017567 ! Write out conversion factor for dry air568 inquire(file=path(2)(1:length(2))//'factor_drygrid_nest',exist=lexist)569 if (lexist) then570 ! open and append571 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid_nest',form='unformatted',&572 status='old',action='write',access='append')573 else574 ! create new575 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid_nest',form='unformatted',&576 status='new',action='write')577 endif578 sp_count_i=0579 sp_count_r=0580 sp_fact=-1.581 sp_zer=.true.582 do kz=1,numzgrid583 do jy=0,numygridn-1584 do ix=0,numxgridn-1585 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then586 if (sp_zer.eqv..true.) then ! first value not equal to one587 sp_count_i=sp_count_i+1588 sparse_dump_i(sp_count_i)= &589 ix+jy*numxgridn+kz*numxgridn*numygridn590 sp_zer=.false.591 sp_fact=sp_fact*(-1.)592 endif593 sp_count_r=sp_count_r+1594 sparse_dump_r(sp_count_r)= &595 sp_fact*factor_drygrid(ix,jy,kz)596 else ! factor is one597 sp_zer=.true.598 endif599 end do600 end do601 end do602 write(unitoutfactor) sp_count_i603 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)604 write(unitoutfactor) sp_count_r605 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)606 close(unitoutfactor)607 553 608 554
Note: See TracChangeset
for help on using the changeset viewer.