Changes in src/concoutput_mpi.f90 [f3054ea:92fab65] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/concoutput_mpi.f90
rf3054ea r92fab65 1 !********************************************************************** 2 ! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010 * 3 ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa, * 4 ! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann * 5 ! * 6 ! This file is part of FLEXPART. * 7 ! * 8 ! FLEXPART is free software: you can redistribute it and/or modify * 9 ! it under the terms of the GNU General Public License as published by* 10 ! the Free Software Foundation, either version 3 of the License, or * 11 ! (at your option) any later version. * 12 ! * 13 ! FLEXPART is distributed in the hope that it will be useful, * 14 ! but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 ! GNU General Public License for more details. * 17 ! * 18 ! You should have received a copy of the GNU General Public License * 19 ! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * 20 !********************************************************************** 1 ! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt 2 ! SPDX-License-Identifier: GPL-3.0-or-later 21 3 22 4 subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & … … 77 59 real :: sp_fact 78 60 real :: outnum,densityoutrecept(maxreceptor),xl,yl 79 ! RLT80 real :: densitydryrecept(maxreceptor)81 real :: factor_dryrecept(maxreceptor)82 61 83 62 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 114 93 character(LEN=8),save :: file_stat='REPLACE' 115 94 logical :: ldates_file 116 logical :: lexist117 95 integer :: ierr 118 96 character(LEN=100) :: dates_char … … 216 194 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 217 195 rho(iix,jjy,kzz-1,mind)*dz2)/dz 218 ! RLT219 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &220 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz221 196 end do 222 197 end do … … 230 205 !densityoutrecept(i)=rho(iix,jjy,1,2) 231 206 densityoutrecept(i)=rho(iix,jjy,1,mind) 232 ! RLT233 densitydryrecept(i)=rho_dry(iix,jjy,1,mind)234 207 end do 235 208 236 ! RLT237 ! conversion factor for output relative to dry air238 factor_drygrid=densityoutgrid/densitydrygrid239 factor_dryrecept=densityoutrecept/densitydryrecept240 209 241 210 ! Output is different for forward and backward simulations … … 290 259 write(unitoutgrid) itime 291 260 endif 261 292 262 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio 293 263 open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & 294 264 atime//'_'//anspec,form='unformatted') 265 295 266 write(unitoutgridppt) itime 296 267 endif … … 636 607 end do 637 608 638 ! RLT Aug 2017639 ! Write out conversion factor for dry air640 inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist)641 if (lexist) then642 ! open and append643 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&644 status='old',action='write',access='append')645 else646 ! create new647 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&648 status='new',action='write')649 endif650 sp_count_i=0651 sp_count_r=0652 sp_fact=-1.653 sp_zer=.true.654 do kz=1,numzgrid655 do jy=0,numygrid-1656 do ix=0,numxgrid-1657 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then658 if (sp_zer.eqv..true.) then ! first value not equal to one659 sp_count_i=sp_count_i+1660 sparse_dump_i(sp_count_i)= &661 ix+jy*numxgrid+kz*numxgrid*numygrid662 sp_zer=.false.663 sp_fact=sp_fact*(-1.)664 endif665 sp_count_r=sp_count_r+1666 sparse_dump_r(sp_count_r)= &667 sp_fact*factor_drygrid(ix,jy,kz)668 else ! factor is one669 sp_zer=.true.670 endif671 end do672 end do673 end do674 write(unitoutfactor) sp_count_i675 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)676 write(unitoutfactor) sp_count_r677 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)678 close(unitoutfactor)679 680 681 609 if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal 682 610 if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & … … 705 633 endif 706 634 707 ! RLT Aug 2017 708 ! Write out conversion factor for dry air 709 if (numreceptor.gt.0) then 710 inquire(file=path(2)(1:length(2))//'factor_dryreceptor',exist=lexist) 711 if (lexist) then 712 ! open and append 713 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 714 status='old',action='write',access='append') 715 else 716 ! create new 717 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 718 status='new',action='write') 719 endif 720 write(unitoutfactor) itime 721 write(unitoutfactor) (factor_dryrecept(i),i=1,numreceptor) 722 close(unitoutfactor) 723 endif 635 724 636 725 637 ! Reinitialization of grid
Note: See TracChangeset
for help on using the changeset viewer.