Changeset 3226 for palm/trunk/SOURCE
- Timestamp:
- Aug 31, 2018 12:27:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/radiation_model_mod.f90
r3186 r3226 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Bugfixes in calculation of sky-view factors and canopy-sink factors. 31 ! 32 ! 3186 2018-07-30 17:07:14Z suehring 30 33 ! Remove print statement 31 34 ! … … 393 396 !> @todo Output of full column vertical profiles used in RRTMG 394 397 !> @todo Output of other rrtm arrays (such as volume mixing ratios) 395 !> @todo Adapt for use with topography398 !> @todo Check for mis-used NINT() calls in raytrace_2d 396 399 !> @todo Optimize radiation_tendency routines 397 400 !> … … 2999 3002 rrtm_tsfc = t_rad_urb 3000 3003 3001 IF ( lw_radiation ) THEN 3004 IF ( lw_radiation ) THEN 3005 3002 3006 CALL rrtmg_lw( 1, nzt_rad , rrtm_icld , rrtm_idrv ,& 3003 3007 rrtm_play , rrtm_plev , rrtm_tlay , rrtm_tlev ,& … … 5545 5549 REAL(wp) :: horizon !< computed horizon height (tangent of elevation) 5546 5550 REAL(wp) :: azen !< zenith angle 5551 REAL(wp), DIMENSION(2) :: yxdir !< y,x *unit* vector of ray direction (in grid units) 5547 5552 REAL(wp), DIMENSION(:), ALLOCATABLE :: zdirs !< directions in z (tangent of elevation) 5548 5553 REAL(wp), DIMENSION(:), ALLOCATABLE :: zbdry !< zenith angle boundaries … … 5823 5828 !--sum of vffrac for all iaz equals 1, verified 5824 5829 ENDIF 5825 CALL raytrace_2d(ta, (/ COS(azmid), SIN(azmid) /), zdirs, &5826 surfstart(myid) + isurflt, facearea(td),&5827 vffrac, .TRUE., .FALSE., win_lad, horizon,&5828 ztransp) !FIXME unit vect in grid units + zdirs5830 yxdir = (/ COS(azmid), SIN(azmid) /) 5831 CALL raytrace_2d(ta, yxdir, zdirs, & 5832 -999, -999._wp, vffrac, .FALSE., .FALSE., & 5833 win_lad, horizon, ztransp) 5829 5834 5830 5835 azen = pi/2 - ATAN(horizon) … … 5951 5956 DO iaz = 1, naz 5952 5957 azmid = az0 + (REAL(iaz, wp) - .5_wp) * azs 5953 CALL raytrace_2d(ta, (/ COS(azmid), SIN(azmid) /), zdirs, & 5954 -999, -999._wp, vffrac, .FALSE., .TRUE., & 5955 win_lad, horizon, ztransp) !FIXME unit vect in grid units + zdirs 5958 yxdir = (/ COS(azmid), SIN(azmid) /) 5959 CALL raytrace_2d(ta, yxdir, zdirs, & 5960 surfstart(myid) + isurflt, facearea(td), & 5961 vffrac, .TRUE., .TRUE., win_lad, horizon, & 5962 ztransp) 5956 5963 5957 5964 !--Save direct solar transparency … … 6573 6580 ntrack = ntrack + 1 6574 6581 crmid = (lastdist + nextdist) * .5_wp 6575 column = NINT(yxorigin(:) + yxdir(:) * crmid, iwp)6582 column = INT(yxorigin(:) + yxdir(:) * crmid, iwp) !NINT(yxorigin(:) + yxdir(:) * crmid, iwp) 6576 6583 6577 6584 !-- calculate index of the grid with global indices (column(1),column(2)) … … 6658 6665 !-- 6659 6666 maxboxes = (ntrack + MAX(origin(1) - nzub, nzpt - origin(1))) * SIZE(zdirs, 1) 6660 IF ( ncsfl + maxboxes > ncsfla ) THEN6661 ! -- use this code for growing by fixed exponential increments (equivalent to case where ncsfl always increases by 1)6662 ! -- k = CEILING(grow_factor ** real(CEILING(log(real(ncsfl + maxboxes, kind=wp)) &6663 ! -- / log(grow_factor)), kind=wp))6664 ! -- or use this code to simply always keep some extra space after growing6665 k = CEILING(REAL(ncsfl + maxboxes, kind=wp) * grow_factor)6666 CALL merge_and_grow_csf(k)6667 ENDIF6667 ! IF ( ncsfl + maxboxes > ncsfla ) THEN 6668 ! !-- use this code for growing by fixed exponential increments (equivalent to case where ncsfl always increases by 1) 6669 ! !-- k = CEILING(grow_factor ** real(CEILING(log(real(ncsfl + maxboxes, kind=wp)) & 6670 ! !-- / log(grow_factor)), kind=wp)) 6671 ! !-- or use this code to simply always keep some extra space after growing 6672 ! k = CEILING(REAL(ncsfl + maxboxes, kind=wp) * grow_factor) 6673 ! CALL merge_and_grow_csf(k) 6674 ! ENDIF 6668 6675 6669 6676 !--Calculate transparencies and store new CSFs … … 6710 6717 IF ( rt2_track_lad(iz, i) > 0._wp ) THEN 6711 6718 curtrans = exp(-ext_coef * rt2_track_lad(iz, i) * (rt2_dist(l)-rt2_dist(l-1))) 6719 IF (ncsfl+1 > SIZE(acsf) ) & 6720 CALL merge_and_grow_csf(CEILING(REAL(ncsfl, kind=wp) * grow_factor)) 6712 6721 6713 6722 ncsfl = ncsfl + 1 … … 6770 6779 6771 6780 IF ( create_csf ) THEN 6781 IF (ncsfl+1 > SIZE(acsf) ) & 6782 CALL merge_and_grow_csf(CEILING(REAL(ncsfl, kind=wp) * grow_factor)) 6772 6783 ncsfl = ncsfl + 1 6773 6784 acsf(ncsfl)%ip = ip
Note: See TracChangeset
for help on using the changeset viewer.