Changeset 3754 for palm


Ignore:
Timestamp:
Feb 19, 2019 5:02:26 PM (3 years ago)
Author:
kanani
Message:

Bugfixes for calculation and I/O of view factors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r3743 r3754  
    2828! -----------------
    2929! $Id$
     30! (resler, pavelkrc)
     31! Bugfixes: add further required MRT factors to read/write_svf,
     32! fix for aggregating view factors to eliminate local noise in reflected
     33! irradiance at mutually close surfaces (corners, presence of trees) in the
     34! angular discretization scheme.
     35!
     36! 3752 2019-02-19 09:37:22Z resler
    3037! added read/write number of MRT factors to the respective routines
    3138!
     
    67456752               CALL quicksort_itarget(itarget,vffrac,ztransp,1,nzn*naz)
    67466753!
     6754!--            For aggregation, we need fractions multiplied by transmissivities
     6755               ztransp(:) = vffrac(:) * ztransp(:)
     6756!
    67476757!--            find the first valid position
    67486758               itarg0 = 1
     
    67586768                     IF ( itarget(i+1) == itarget(i) )  THEN
    67596769                        vffrac(i+1) = vffrac(i+1) + vffrac(i)
     6770                        ztransp(i+1) = ztransp(i+1) + ztransp(i)
    67606771                        CYCLE
    67616772                     ENDIF
     
    67906801                  asvf(nsvfl)%isurfs = itarget(i)
    67916802                  asvf(nsvfl)%rsvf = vffrac(i)
    6792                   asvf(nsvfl)%rtransp = ztransp(i)
     6803                  asvf(nsvfl)%rtransp = ztransp(i) / vffrac(i)
    67936804               END DO
    67946805
     
    76977708      ENDIF
    76987709
    7699       IF ( yxdir(2) >= 0._wp )  THEN
     7710      IF ( yxdir(2) > 0._wp )  THEN
    77007711          bdydim = nx + .5_wp !< east global boundary
    77017712          crossdist(2) = (bdydim - yxorigin(2)) / yxdir(2)
     
    77927803         ENDIF
    77937804
    7794          IF ( ABS(distance - nextdist) < eps )  EXIT
     7805         IF ( nextdist + eps >= distance )  EXIT
    77957806
    77967807         IF ( rad_angular_discretization  .AND.  calc_svf )  THEN
     
    82838294! Description:
    82848295! ------------
    8285 !> Soubroutine reads svf and svfsurf data from saved file
     8296!> Reads svf, svfsurf, csf, csfsurf and mrt factors data from saved file
    82868297!> SVF means sky view factors and CSF means canopy sink factors
    82878298!------------------------------------------------------------------------------!
     
    84118422
    84128423             IF ( nmrtbl > 0 )  THEN
     8424                READ(88) mrtsky
     8425                READ(88) mrtskyt
     8426                READ(88) mrtdsit
     8427             ENDIF
     8428
     8429             IF ( nmrtf > 0 )  THEN
    84138430                ALLOCATE ( mrtf(nmrtf) )
    84148431                ALLOCATE ( mrtft(nmrtf) )
     
    84368453! Description:
    84378454! ------------
    8438 !> Subroutine stores svf, svfsurf, csf and csfsurf data to a file.
     8455!> Subroutine stores svf, svfsurf, csf, csfsurf and mrt data to a file.
    84398456!------------------------------------------------------------------------------!
    84408457    SUBROUTINE radiation_write_svf
     
    84698486             ENDIF
    84708487             IF ( nmrtbl > 0 )  THEN
     8488                WRITE ( 89 ) mrtsky
     8489                WRITE ( 89 ) mrtskyt
     8490                WRITE ( 89 ) mrtdsit
     8491             ENDIF
     8492             IF ( nmrtf > 0 )  THEN
    84718493                 WRITE ( 89 )  mrtf
    84728494                 WRITE ( 89 )  mrtft               
     
    84838505       ENDDO
    84848506    END SUBROUTINE radiation_write_svf
     8507
    84858508
    84868509!------------------------------------------------------------------------------!
Note: See TracChangeset for help on using the changeset viewer.