Changeset 6a678e3 in flexpart.git for src/netcdf_output_mod.f90


Ignore:
Timestamp:
Jan 25, 2016, 2:17:34 PM (8 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
26f6039
Parents:
fddc6ec
Message:

Added option to use double precision for calculating the deposition fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/netcdf_output_mod.f90

    rd8107c2 r6a678e3  
    3636  !    switch write_releases
    3737  !  - additional updates for FLEXPART 9.x
     38  !
     39  ! ESO 2016
     40  !  - Deposition fields can be calculated in double precision, see variable
     41  !    'dep_prec' in par_mod
    3842  !*****************************************************************************
    3943
     
    4852                       wetgrid,wetgridsigma,drygrid,drygridsigma,grid,gridsigma,&
    4953                       area,arean,volumen, orooutn
    50   use par_mod,   only: dp, maxspec, maxreceptor, nclassunc,&
     54  use par_mod,   only: dep_prec, sp, dp, maxspec, maxreceptor, nclassunc,&
    5155                       unitoutrecept,unitoutreceptppt, nxmax,unittmp
    5256  use com_mod,   only: path,length,ldirect,ibdate,ibtime,iedate,ietime, &
     
    7074                       nested_output, ipout, surf_only, linit_cond, &
    7175                       flexversion,mpi_mode
     76
     77  use mean_mod
    7278
    7379  implicit none
     
    723729  integer, intent(in) :: itime
    724730  real, intent(in)    :: outnum
    725   real, intent(out)   :: gridtotalunc,wetgridtotalunc,drygridtotalunc
     731  real(dep_prec),intent(out):: wetgridtotalunc,drygridtotalunc
     732  real, intent(out)   :: gridtotalunc
    726733  real                :: densityoutrecept(maxreceptor)
    727734  integer             :: ncid,kp,ks,kz,ix,jy,iix,jjy,kzz,kzzm1,ngrid
    728   integer             :: nage,i,l, jj
     735  integer             :: nage,i,l,jj
    729736  real                :: tot_mu(maxspec,maxpointspec_act)
    730737  real                :: halfheight,dz,dz1,dz2
    731738  real                :: xl,yl,xlrot,ylrot,zagnd,zagndprev
    732   real                :: auxgrid(nclassunc),gridtotal,gridsigmatotal
    733   real                :: wetgridtotal,wetgridsigmatotal
    734   real                :: drygridtotal,drygridsigmatotal
     739  real(dep_prec)      :: auxgrid(nclassunc)
     740  real(dep_prec)      :: gridtotal,gridsigmatotal
     741  real(dep_prec)      :: wetgridtotal,wetgridsigmatotal
     742  real(dep_prec)      :: drygridtotal,drygridsigmatotal
     743  ! real(sp)            :: gridtotal,gridsigmatotal
     744  ! real(sp)            :: wetgridtotal,wetgridsigmatotal
     745  ! real(sp)            :: drygridtotal,drygridsigmatotal
    735746
    736747  real, parameter     :: weightair=28.97
     
    889900                   wetgridsigma(ix,jy),nclassunc)
    890901              ! Multiply by number of classes to get total concentration
    891               wetgrid(ix,jy)=wetgrid(ix,jy)*real(nclassunc)
     902              wetgrid(ix,jy)=wetgrid(ix,jy)*real(nclassunc,kind=dep_prec)
    892903              wetgridtotal=wetgridtotal+wetgrid(ix,jy)
    893904              ! Calculate standard deviation of the mean
    894905              wetgridsigma(ix,jy)= &
    895906                   wetgridsigma(ix,jy)* &
    896                    sqrt(real(nclassunc))
     907                   sqrt(real(nclassunc,kind=dep_prec))
    897908              wetgridsigmatotal=wetgridsigmatotal+ &
    898909                   wetgridsigma(ix,jy)
     
    10611072  integer, intent(in) :: itime
    10621073  real, intent(in)    :: outnum
    1063   real, intent(out)   :: gridtotalunc,wetgridtotalunc,drygridtotalunc
     1074  real(sp), intent(out)   :: gridtotalunc
     1075  real(dep_prec), intent(out)   :: wetgridtotalunc,drygridtotalunc
    10641076
    10651077  print*,'Netcdf output for surface only not yet implemented'
     
    11171129  real                :: halfheight,dz,dz1,dz2
    11181130  real                :: xl,yl,xlrot,ylrot,zagnd,zagndprev
    1119   real                :: auxgrid(nclassunc),gridtotal
     1131  real(dep_prec)      :: auxgrid(nclassunc)
     1132  real                :: gridtotal
    11201133  real, parameter     :: weightair=28.97
    11211134
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG