Changeset 3572 for palm/trunk/SOURCE/radiation_model_mod.f90
 Timestamp:
 Nov 28, 2018 11:40:28 AM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/radiation_model_mod.f90
r3528 r3572 28 28 !  29 29 ! $Id$ 30 ! Add filling the short and longwave radiation flux arrays (e.g. diffuse, 31 ! direct, reflected, resedual) for all surfaces. This is required to surface 32 ! outputs in suface_output_mod. (M. Salim) 33 ! 34 ! 3571 20181128 09:24:03Z moh.hefny 30 35 ! Add an epsilon value to compare values in if statement to fix possible 31 36 ! precsion related errors in raytrace routines. … … 692 697 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: rad_sw_out_xy_av !< average of outgoing shortwave radiation at surface 693 698 ! 694 ! Land surface albedos for solar zenith angle of 60 Â° after Briegleb (1992)699 ! Land surface albedos for solar zenith angle of 60° after Briegleb (1992) 695 700 ! (shortwave, longwave, broadband): sw, lw, bb, 696 701 REAL(wp), DIMENSION(0:2,1:33), PARAMETER :: albedo_pars = RESHAPE( (/& … … 788 793 rrtm_cfc22vmr, & !< CFC22 volume mixing ratio (g/mol) 789 794 rrtm_ch4vmr, & !< CH4 volume mixing ratio 790 rrtm_cicewp, & !< incloud ice water path (g/m Â²)795 rrtm_cicewp, & !< incloud ice water path (g/m2) 791 796 rrtm_cldfr, & !< cloud fraction (0,1) 792 rrtm_cliqwp, & !< incloud liquid water path (g/m Â²)797 rrtm_cliqwp, & !< incloud liquid water path (g/m2) 793 798 rrtm_co2vmr, & !< CO2 volume mixing ratio (g/mol) 794 799 rrtm_emis, & !< surface emissivity (01) … … 1710 1715 ALLOCATE( surf_lsm_h%rad_sw_in(1:surf_lsm_h%ns) ) 1711 1716 ALLOCATE( surf_lsm_h%rad_sw_out(1:surf_lsm_h%ns) ) 1717 ALLOCATE( surf_lsm_h%rad_sw_dir(1:surf_lsm_h%ns) ) 1718 ALLOCATE( surf_lsm_h%rad_sw_dif(1:surf_lsm_h%ns) ) 1719 ALLOCATE( surf_lsm_h%rad_sw_ref(1:surf_lsm_h%ns) ) 1720 ALLOCATE( surf_lsm_h%rad_sw_res(1:surf_lsm_h%ns) ) 1712 1721 ALLOCATE( surf_lsm_h%rad_lw_in(1:surf_lsm_h%ns) ) 1713 1722 ALLOCATE( surf_lsm_h%rad_lw_out(1:surf_lsm_h%ns) ) 1723 ALLOCATE( surf_lsm_h%rad_lw_dif(1:surf_lsm_h%ns) ) 1724 ALLOCATE( surf_lsm_h%rad_lw_ref(1:surf_lsm_h%ns) ) 1725 ALLOCATE( surf_lsm_h%rad_lw_res(1:surf_lsm_h%ns) ) 1714 1726 surf_lsm_h%rad_sw_in = 0.0_wp 1715 1727 surf_lsm_h%rad_sw_out = 0.0_wp 1728 surf_lsm_h%rad_sw_dir = 0.0_wp 1729 surf_lsm_h%rad_sw_dif = 0.0_wp 1730 surf_lsm_h%rad_sw_ref = 0.0_wp 1731 surf_lsm_h%rad_sw_res = 0.0_wp 1716 1732 surf_lsm_h%rad_lw_in = 0.0_wp 1717 1733 surf_lsm_h%rad_lw_out = 0.0_wp 1734 surf_lsm_h%rad_lw_dif = 0.0_wp 1735 surf_lsm_h%rad_lw_ref = 0.0_wp 1736 surf_lsm_h%rad_lw_res = 0.0_wp 1718 1737 ENDIF 1719 1738 IF ( .NOT. ALLOCATED ( surf_usm_h%rad_sw_in ) .AND. & … … 1721 1740 ALLOCATE( surf_usm_h%rad_sw_in(1:surf_usm_h%ns) ) 1722 1741 ALLOCATE( surf_usm_h%rad_sw_out(1:surf_usm_h%ns) ) 1742 ALLOCATE( surf_usm_h%rad_sw_dir(1:surf_usm_h%ns) ) 1743 ALLOCATE( surf_usm_h%rad_sw_dif(1:surf_usm_h%ns) ) 1744 ALLOCATE( surf_usm_h%rad_sw_ref(1:surf_usm_h%ns) ) 1745 ALLOCATE( surf_usm_h%rad_sw_res(1:surf_usm_h%ns) ) 1723 1746 ALLOCATE( surf_usm_h%rad_lw_in(1:surf_usm_h%ns) ) 1724 1747 ALLOCATE( surf_usm_h%rad_lw_out(1:surf_usm_h%ns) ) 1748 ALLOCATE( surf_usm_h%rad_lw_dif(1:surf_usm_h%ns) ) 1749 ALLOCATE( surf_usm_h%rad_lw_ref(1:surf_usm_h%ns) ) 1750 ALLOCATE( surf_usm_h%rad_lw_res(1:surf_usm_h%ns) ) 1725 1751 surf_usm_h%rad_sw_in = 0.0_wp 1726 1752 surf_usm_h%rad_sw_out = 0.0_wp 1753 surf_usm_h%rad_sw_dir = 0.0_wp 1754 surf_usm_h%rad_sw_dif = 0.0_wp 1755 surf_usm_h%rad_sw_ref = 0.0_wp 1756 surf_usm_h%rad_sw_res = 0.0_wp 1727 1757 surf_usm_h%rad_lw_in = 0.0_wp 1728 1758 surf_usm_h%rad_lw_out = 0.0_wp 1759 surf_usm_h%rad_lw_dif = 0.0_wp 1760 surf_usm_h%rad_lw_ref = 0.0_wp 1761 surf_usm_h%rad_lw_res = 0.0_wp 1729 1762 ENDIF 1730 1763 DO l = 0, 3 … … 1733 1766 ALLOCATE( surf_lsm_v(l)%rad_sw_in(1:surf_lsm_v(l)%ns) ) 1734 1767 ALLOCATE( surf_lsm_v(l)%rad_sw_out(1:surf_lsm_v(l)%ns) ) 1768 ALLOCATE( surf_lsm_v(l)%rad_sw_dir(1:surf_lsm_v(l)%ns) ) 1769 ALLOCATE( surf_lsm_v(l)%rad_sw_dif(1:surf_lsm_v(l)%ns) ) 1770 ALLOCATE( surf_lsm_v(l)%rad_sw_ref(1:surf_lsm_v(l)%ns) ) 1771 ALLOCATE( surf_lsm_v(l)%rad_sw_res(1:surf_lsm_v(l)%ns) ) 1772 1735 1773 ALLOCATE( surf_lsm_v(l)%rad_lw_in(1:surf_lsm_v(l)%ns) ) 1736 1774 ALLOCATE( surf_lsm_v(l)%rad_lw_out(1:surf_lsm_v(l)%ns) ) 1775 ALLOCATE( surf_lsm_v(l)%rad_lw_dif(1:surf_lsm_v(l)%ns) ) 1776 ALLOCATE( surf_lsm_v(l)%rad_lw_ref(1:surf_lsm_v(l)%ns) ) 1777 ALLOCATE( surf_lsm_v(l)%rad_lw_res(1:surf_lsm_v(l)%ns) ) 1778 1737 1779 surf_lsm_v(l)%rad_sw_in = 0.0_wp 1738 surf_lsm_v(l)%rad_sw_out = 0.0_wp 1780 surf_lsm_v(l)%rad_sw_out = 0.0_wp 1781 surf_lsm_v(l)%rad_sw_dir = 0.0_wp 1782 surf_lsm_v(l)%rad_sw_dif = 0.0_wp 1783 surf_lsm_v(l)%rad_sw_ref = 0.0_wp 1784 surf_lsm_v(l)%rad_sw_res = 0.0_wp 1785 1739 1786 surf_lsm_v(l)%rad_lw_in = 0.0_wp 1740 1787 surf_lsm_v(l)%rad_lw_out = 0.0_wp 1788 surf_lsm_v(l)%rad_lw_dif = 0.0_wp 1789 surf_lsm_v(l)%rad_lw_ref = 0.0_wp 1790 surf_lsm_v(l)%rad_lw_res = 0.0_wp 1741 1791 ENDIF 1742 1792 IF ( .NOT. ALLOCATED ( surf_usm_v(l)%rad_sw_in ) .AND. & … … 1744 1794 ALLOCATE( surf_usm_v(l)%rad_sw_in(1:surf_usm_v(l)%ns) ) 1745 1795 ALLOCATE( surf_usm_v(l)%rad_sw_out(1:surf_usm_v(l)%ns) ) 1796 ALLOCATE( surf_usm_v(l)%rad_sw_dir(1:surf_usm_v(l)%ns) ) 1797 ALLOCATE( surf_usm_v(l)%rad_sw_dif(1:surf_usm_v(l)%ns) ) 1798 ALLOCATE( surf_usm_v(l)%rad_sw_ref(1:surf_usm_v(l)%ns) ) 1799 ALLOCATE( surf_usm_v(l)%rad_sw_res(1:surf_usm_v(l)%ns) ) 1746 1800 ALLOCATE( surf_usm_v(l)%rad_lw_in(1:surf_usm_v(l)%ns) ) 1747 1801 ALLOCATE( surf_usm_v(l)%rad_lw_out(1:surf_usm_v(l)%ns) ) 1802 ALLOCATE( surf_usm_v(l)%rad_lw_dif(1:surf_usm_v(l)%ns) ) 1803 ALLOCATE( surf_usm_v(l)%rad_lw_ref(1:surf_usm_v(l)%ns) ) 1804 ALLOCATE( surf_usm_v(l)%rad_lw_res(1:surf_usm_v(l)%ns) ) 1748 1805 surf_usm_v(l)%rad_sw_in = 0.0_wp 1749 surf_usm_v(l)%rad_sw_out = 0.0_wp 1806 surf_usm_v(l)%rad_sw_out = 0.0_wp 1807 surf_usm_v(l)%rad_sw_dir = 0.0_wp 1808 surf_usm_v(l)%rad_sw_dif = 0.0_wp 1809 surf_usm_v(l)%rad_sw_ref = 0.0_wp 1810 surf_usm_v(l)%rad_sw_res = 0.0_wp 1750 1811 surf_usm_v(l)%rad_lw_in = 0.0_wp 1751 1812 surf_usm_v(l)%rad_lw_out = 0.0_wp 1813 surf_usm_v(l)%rad_lw_dif = 0.0_wp 1814 surf_usm_v(l)%rad_lw_ref = 0.0_wp 1815 surf_usm_v(l)%rad_lw_res = 0.0_wp 1752 1816 ENDIF 1753 1817 ENDDO … … 3200 3264 ! 3201 3265 ! Calculate liquid water path and cloud fraction for each column. 3202 ! Note that LWP is required in g/m Â²instead of kg/kg m.3266 ! Note that LWP is required in g/m2 instead of kg/kg m. 3203 3267 rrtm_cldfr = 0.0_wp 3204 3268 rrtm_reliq = 0.0_wp … … 3386 3450 ! 3387 3451 ! Calculate liquid water path and cloud fraction for each column. 3388 ! Note that LWP is required in g/m Â²instead of kg/kg m.3452 ! Note that LWP is required in g/m2 instead of kg/kg m. 3389 3453 rrtm_cldfr = 0.0_wp 3390 3454 rrtm_reliq = 0.0_wp … … 5136 5200 surf_usm_h%rad_sw_in(m) = surfinsw(i) 5137 5201 surf_usm_h%rad_sw_out(m) = surfoutsw(i) 5202 surf_usm_h%rad_sw_dir(m) = surfinswdir(i) 5203 surf_usm_h%rad_sw_dif(m) = surfinswdif(i) 5204 surf_usm_h%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5205 surfinswdif(i) 5206 surf_usm_h%rad_sw_res(m) = surfins(i) 5138 5207 surf_usm_h%rad_lw_in(m) = surfinlw(i) 5139 5208 surf_usm_h%rad_lw_out(m) = surfoutlw(i) … … 5141 5210 surfinlw(i)  surfoutlw(i) 5142 5211 surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net(m) 5212 surf_usm_h%rad_lw_dif(m) = surfinlwdif(i) 5213 surf_usm_h%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5214 surf_usm_h%rad_lw_res(m) = surfinl(i) 5143 5215 ! 5144 5216 ! northwardfacding … … 5146 5218 surf_usm_v(0)%rad_sw_in(m) = surfinsw(i) 5147 5219 surf_usm_v(0)%rad_sw_out(m) = surfoutsw(i) 5220 surf_usm_v(0)%rad_sw_dir(m) = surfinswdir(i) 5221 surf_usm_v(0)%rad_sw_dif(m) = surfinswdif(i) 5222 surf_usm_v(0)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5223 surfinswdif(i) 5224 surf_usm_v(0)%rad_sw_res(m) = surfins(i) 5148 5225 surf_usm_v(0)%rad_lw_in(m) = surfinlw(i) 5149 5226 surf_usm_v(0)%rad_lw_out(m) = surfoutlw(i) … … 5151 5228 surfinlw(i)  surfoutlw(i) 5152 5229 surf_usm_v(0)%rad_net_l(m) = surf_usm_v(0)%rad_net(m) 5230 surf_usm_v(0)%rad_lw_dif(m) = surfinlwdif(i) 5231 surf_usm_v(0)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5232 surf_usm_v(0)%rad_lw_res(m) = surfinl(i) 5153 5233 ! 5154 5234 ! southwardfacding … … 5156 5236 surf_usm_v(1)%rad_sw_in(m) = surfinsw(i) 5157 5237 surf_usm_v(1)%rad_sw_out(m) = surfoutsw(i) 5238 surf_usm_v(1)%rad_sw_dir(m) = surfinswdir(i) 5239 surf_usm_v(1)%rad_sw_dif(m) = surfinswdif(i) 5240 surf_usm_v(1)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5241 surfinswdif(i) 5242 surf_usm_v(1)%rad_sw_res(m) = surfins(i) 5158 5243 surf_usm_v(1)%rad_lw_in(m) = surfinlw(i) 5159 5244 surf_usm_v(1)%rad_lw_out(m) = surfoutlw(i) … … 5161 5246 surfinlw(i)  surfoutlw(i) 5162 5247 surf_usm_v(1)%rad_net_l(m) = surf_usm_v(1)%rad_net(m) 5248 surf_usm_v(1)%rad_lw_dif(m) = surfinlwdif(i) 5249 surf_usm_v(1)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5250 surf_usm_v(1)%rad_lw_res(m) = surfinl(i) 5163 5251 ! 5164 5252 ! eastwardfacing … … 5166 5254 surf_usm_v(2)%rad_sw_in(m) = surfinsw(i) 5167 5255 surf_usm_v(2)%rad_sw_out(m) = surfoutsw(i) 5256 surf_usm_v(2)%rad_sw_dir(m) = surfinswdir(i) 5257 surf_usm_v(2)%rad_sw_dif(m) = surfinswdif(i) 5258 surf_usm_v(2)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5259 surfinswdif(i) 5260 surf_usm_v(2)%rad_sw_res(m) = surfins(i) 5168 5261 surf_usm_v(2)%rad_lw_in(m) = surfinlw(i) 5169 5262 surf_usm_v(2)%rad_lw_out(m) = surfoutlw(i) … … 5171 5264 surfinlw(i)  surfoutlw(i) 5172 5265 surf_usm_v(2)%rad_net_l(m) = surf_usm_v(2)%rad_net(m) 5266 surf_usm_v(2)%rad_lw_dif(m) = surfinlwdif(i) 5267 surf_usm_v(2)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5268 surf_usm_v(2)%rad_lw_res(m) = surfinl(i) 5173 5269 ! 5174 5270 ! westwardfacding … … 5176 5272 surf_usm_v(3)%rad_sw_in(m) = surfinsw(i) 5177 5273 surf_usm_v(3)%rad_sw_out(m) = surfoutsw(i) 5274 surf_usm_v(3)%rad_sw_dir(m) = surfinswdir(i) 5275 surf_usm_v(3)%rad_sw_dif(m) = surfinswdif(i) 5276 surf_usm_v(3)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5277 surfinswdif(i) 5278 surf_usm_v(3)%rad_sw_res(m) = surfins(i) 5178 5279 surf_usm_v(3)%rad_lw_in(m) = surfinlw(i) 5179 5280 surf_usm_v(3)%rad_lw_out(m) = surfoutlw(i) … … 5181 5282 surfinlw(i)  surfoutlw(i) 5182 5283 surf_usm_v(3)%rad_net_l(m) = surf_usm_v(3)%rad_net(m) 5284 surf_usm_v(3)%rad_lw_dif(m) = surfinlwdif(i) 5285 surf_usm_v(3)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5286 surf_usm_v(3)%rad_lw_res(m) = surfinl(i) 5183 5287 ! 5184 5288 ! (2) land surfaces … … 5187 5291 surf_lsm_h%rad_sw_in(m) = surfinsw(i) 5188 5292 surf_lsm_h%rad_sw_out(m) = surfoutsw(i) 5293 surf_lsm_h%rad_sw_dir(m) = surfinswdir(i) 5294 surf_lsm_h%rad_sw_dif(m) = surfinswdif(i) 5295 surf_lsm_h%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5296 surfinswdif(i) 5297 surf_lsm_h%rad_sw_res(m) = surfins(i) 5189 5298 surf_lsm_h%rad_lw_in(m) = surfinlw(i) 5190 5299 surf_lsm_h%rad_lw_out(m) = surfoutlw(i) 5191 5300 surf_lsm_h%rad_net(m) = surfinsw(i)  surfoutsw(i) + & 5192 5301 surfinlw(i)  surfoutlw(i) 5302 surf_lsm_h%rad_lw_dif(m) = surfinlwdif(i) 5303 surf_lsm_h%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5304 surf_lsm_h%rad_lw_res(m) = surfinl(i) 5193 5305 ! 5194 5306 ! northwardfacding … … 5196 5308 surf_lsm_v(0)%rad_sw_in(m) = surfinsw(i) 5197 5309 surf_lsm_v(0)%rad_sw_out(m) = surfoutsw(i) 5310 surf_lsm_v(0)%rad_sw_dir(m) = surfinswdir(i) 5311 surf_lsm_v(0)%rad_sw_dif(m) = surfinswdif(i) 5312 surf_lsm_v(0)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5313 surfinswdif(i) 5314 surf_lsm_v(0)%rad_sw_res(m) = surfins(i) 5198 5315 surf_lsm_v(0)%rad_lw_in(m) = surfinlw(i) 5199 5316 surf_lsm_v(0)%rad_lw_out(m) = surfoutlw(i) 5200 5317 surf_lsm_v(0)%rad_net(m) = surfinsw(i)  surfoutsw(i) + & 5201 5318 surfinlw(i)  surfoutlw(i) 5319 surf_lsm_v(0)%rad_lw_dif(m) = surfinlwdif(i) 5320 surf_lsm_v(0)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5321 surf_lsm_v(0)%rad_lw_res(m) = surfinl(i) 5202 5322 ! 5203 5323 ! southwardfacding … … 5205 5325 surf_lsm_v(1)%rad_sw_in(m) = surfinsw(i) 5206 5326 surf_lsm_v(1)%rad_sw_out(m) = surfoutsw(i) 5327 surf_lsm_v(1)%rad_sw_dir(m) = surfinswdir(i) 5328 surf_lsm_v(1)%rad_sw_dif(m) = surfinswdif(i) 5329 surf_lsm_v(1)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5330 surfinswdif(i) 5331 surf_lsm_v(1)%rad_sw_res(m) = surfins(i) 5207 5332 surf_lsm_v(1)%rad_lw_in(m) = surfinlw(i) 5208 5333 surf_lsm_v(1)%rad_lw_out(m) = surfoutlw(i) 5209 5334 surf_lsm_v(1)%rad_net(m) = surfinsw(i)  surfoutsw(i) + & 5210 5335 surfinlw(i)  surfoutlw(i) 5336 surf_lsm_v(1)%rad_lw_dif(m) = surfinlwdif(i) 5337 surf_lsm_v(1)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5338 surf_lsm_v(1)%rad_lw_res(m) = surfinl(i) 5211 5339 ! 5212 5340 ! eastwardfacing … … 5214 5342 surf_lsm_v(2)%rad_sw_in(m) = surfinsw(i) 5215 5343 surf_lsm_v(2)%rad_sw_out(m) = surfoutsw(i) 5344 surf_lsm_v(2)%rad_sw_dir(m) = surfinswdir(i) 5345 surf_lsm_v(2)%rad_sw_dif(m) = surfinswdif(i) 5346 surf_lsm_v(2)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5347 surfinswdif(i) 5348 surf_lsm_v(2)%rad_sw_res(m) = surfins(i) 5216 5349 surf_lsm_v(2)%rad_lw_in(m) = surfinlw(i) 5217 5350 surf_lsm_v(2)%rad_lw_out(m) = surfoutlw(i) 5218 5351 surf_lsm_v(2)%rad_net(m) = surfinsw(i)  surfoutsw(i) + & 5219 5352 surfinlw(i)  surfoutlw(i) 5353 surf_lsm_v(2)%rad_lw_dif(m) = surfinlwdif(i) 5354 surf_lsm_v(2)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5355 surf_lsm_v(2)%rad_lw_res(m) = surfinl(i) 5220 5356 ! 5221 5357 ! westwardfacing … … 5223 5359 surf_lsm_v(3)%rad_sw_in(m) = surfinsw(i) 5224 5360 surf_lsm_v(3)%rad_sw_out(m) = surfoutsw(i) 5361 surf_lsm_v(3)%rad_sw_dir(m) = surfinswdir(i) 5362 surf_lsm_v(3)%rad_sw_dif(m) = surfinswdif(i) 5363 surf_lsm_v(3)%rad_sw_ref(m) = surfinsw(i)  surfinswdir(i)  & 5364 surfinswdif(i) 5365 surf_lsm_v(3)%rad_sw_res(m) = surfins(i) 5225 5366 surf_lsm_v(3)%rad_lw_in(m) = surfinlw(i) 5226 5367 surf_lsm_v(3)%rad_lw_out(m) = surfoutlw(i) 5227 5368 surf_lsm_v(3)%rad_net(m) = surfinsw(i)  surfoutsw(i) + & 5228 5369 surfinlw(i)  surfoutlw(i) 5370 surf_lsm_v(3)%rad_lw_dif(m) = surfinlwdif(i) 5371 surf_lsm_v(3)%rad_lw_ref(m) = surfinlw(i)  surfinlwdif(i) 5372 surf_lsm_v(3)%rad_lw_res(m) = surfinl(i) 5229 5373 ENDIF 5230 5374
Note: See TracChangeset
for help on using the changeset viewer.