Changeset 1070b4c in flexpart.git for src/concoutput_mpi.f90
- Timestamp:
- Aug 27, 2020, 9:51:56 PM (4 years ago)
- Branches:
- GFS_025, dev
- Children:
- b0ecb61
- Parents:
- 8c0ae9b (diff), a803521 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/concoutput_mpi.f90
r92fab65 ra803521 59 59 real :: sp_fact 60 60 real :: outnum,densityoutrecept(maxreceptor),xl,yl 61 ! RLT 62 real :: densitydryrecept(maxreceptor) 63 real :: factor_dryrecept(maxreceptor) 61 64 62 65 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 93 96 character(LEN=8),save :: file_stat='REPLACE' 94 97 logical :: ldates_file 98 logical :: lexist 95 99 integer :: ierr 96 100 character(LEN=100) :: dates_char … … 194 198 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 195 199 rho(iix,jjy,kzz-1,mind)*dz2)/dz 200 ! RLT 201 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ & 202 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz 196 203 end do 197 204 end do … … 205 212 !densityoutrecept(i)=rho(iix,jjy,1,2) 206 213 densityoutrecept(i)=rho(iix,jjy,1,mind) 214 ! RLT 215 densitydryrecept(i)=rho_dry(iix,jjy,1,mind) 207 216 end do 208 217 218 ! RLT 219 ! conversion factor for output relative to dry air 220 factor_drygrid=densityoutgrid/densitydrygrid 221 factor_dryrecept=densityoutrecept/densitydryrecept 209 222 210 223 ! Output is different for forward and backward simulations … … 259 272 write(unitoutgrid) itime 260 273 endif 261 262 274 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio 263 275 open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & 264 276 atime//'_'//anspec,form='unformatted') 265 266 277 write(unitoutgridppt) itime 267 278 endif … … 607 618 end do 608 619 620 ! RLT Aug 2017 621 ! Write out conversion factor for dry air 622 inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist) 623 if (lexist) then 624 ! open and append 625 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',& 626 status='old',action='write',access='append') 627 else 628 ! create new 629 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',& 630 status='new',action='write') 631 endif 632 sp_count_i=0 633 sp_count_r=0 634 sp_fact=-1. 635 sp_zer=.true. 636 do kz=1,numzgrid 637 do jy=0,numygrid-1 638 do ix=0,numxgrid-1 639 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then 640 if (sp_zer.eqv..true.) then ! first value not equal to one 641 sp_count_i=sp_count_i+1 642 sparse_dump_i(sp_count_i)= & 643 ix+jy*numxgrid+kz*numxgrid*numygrid 644 sp_zer=.false. 645 sp_fact=sp_fact*(-1.) 646 endif 647 sp_count_r=sp_count_r+1 648 sparse_dump_r(sp_count_r)= & 649 sp_fact*factor_drygrid(ix,jy,kz) 650 else ! factor is one 651 sp_zer=.true. 652 endif 653 end do 654 end do 655 end do 656 write(unitoutfactor) sp_count_i 657 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i) 658 write(unitoutfactor) sp_count_r 659 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r) 660 close(unitoutfactor) 661 662 609 663 if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal 610 664 if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & … … 633 687 endif 634 688 635 689 ! RLT Aug 2017 690 ! Write out conversion factor for dry air 691 if (numreceptor.gt.0) then 692 inquire(file=path(2)(1:length(2))//'factor_dryreceptor',exist=lexist) 693 if (lexist) then 694 ! open and append 695 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 696 status='old',action='write',access='append') 697 else 698 ! create new 699 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 700 status='new',action='write') 701 endif 702 write(unitoutfactor) itime 703 write(unitoutfactor) (factor_dryrecept(i),i=1,numreceptor) 704 close(unitoutfactor) 705 endif 636 706 637 707 ! Reinitialization of grid
Note: See TracChangeset
for help on using the changeset viewer.