Changeset 2759 for palm/trunk/SOURCE/surface_mod.f90
- Timestamp:
- Jan 17, 2018 4:24:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/surface_mod.f90
r2753 r2759 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Bugfix, consider density in vertical fluxes of passive scalar as well as 29 ! chemical species. 30 ! 31 ! 2753 2018-01-16 14:16:49Z suehring 28 32 ! +r_a_green, r_a_window 29 33 ! … … 116 120 117 121 USE arrays_3d, & 118 ONLY: zu, zw, heatflux_input_conversion, waterflux_input_conversion,&119 momentumflux_input_conversion122 ONLY: heatflux_input_conversion, momentumflux_input_conversion, & 123 rho_air, rho_air_zw, zu, zw, waterflux_input_conversion 120 124 121 125 #if defined( __chem ) … … 1753 1757 IF ( .NOT. random_heatflux ) THEN 1754 1758 surf%shf(num_h) = surface_heatflux * & 1755 heatflux_input_conversion( nzb)1759 heatflux_input_conversion(k-1) 1756 1760 ! 1757 1761 !-- Check if surface heat flux might be replaced by … … 1784 1788 IF ( constant_waterflux ) THEN 1785 1789 surf%qsws(num_h) = surface_waterflux * & 1786 waterflux_input_conversion( nzb)1790 waterflux_input_conversion(k-1) 1787 1791 IF ( k-1 /= 0 ) THEN 1788 1792 surf%qsws(num_h) = wall_humidityflux(0) * & … … 1801 1805 IF ( upward_facing ) THEN 1802 1806 IF ( constant_scalarflux ) THEN 1803 surf%ssws(num_h) = surface_scalarflux 1807 surf%ssws(num_h) = surface_scalarflux * rho_air_zw(k-1) 1804 1808 1805 1809 IF ( k-1 /= 0 ) & 1806 surf%ssws(num_h) = wall_scalarflux(0) 1810 surf%ssws(num_h) = wall_scalarflux(0) * & 1811 rho_air_zw(k-1) 1807 1812 1808 1813 ELSE … … 1810 1815 ENDIF 1811 1816 ELSE 1812 surf%ssws(num_h) = wall_scalarflux(5) 1817 surf%ssws(num_h) = wall_scalarflux(5) * rho_air_zw(k) 1813 1818 ENDIF 1814 1819 ENDIF … … 1824 1829 IF ( upward_facing ) THEN 1825 1830 IF ( constant_csflux(lsp_pr) ) THEN 1826 surf%cssws(lsp,num_h) = surface_csflux(lsp_pr) 1827 1828 IF ( k-1 /= 0 ) & 1829 surf%cssws(lsp,num_h) = wall_csflux(lsp,0) 1831 surf%cssws(lsp,num_h) = & 1832 surface_csflux(lsp_pr) *& 1833 rho_air_zw(k-1) 1834 1835 IF ( k-1 /= 0 ) & 1836 surf%cssws(lsp,num_h) = & 1837 wall_csflux(lsp,0) * & 1838 rho_air_zw(k-1) 1830 1839 ELSE 1831 1840 surf%cssws(lsp,num_h) = 0.0_wp 1832 1841 ENDIF 1833 1842 ELSE 1834 surf%cssws(lsp,num_h) = wall_csflux(lsp,5) 1843 surf%cssws(lsp,num_h) = wall_csflux(lsp,5) * & 1844 rho_air_zw(k) 1835 1845 ENDIF 1836 1846 ENDIF … … 1843 1853 IF ( ocean ) THEN 1844 1854 IF ( upward_facing ) THEN 1845 surf%sasws(num_h) = bottom_salinityflux 1855 surf%sasws(num_h) = bottom_salinityflux * rho_air_zw(k-1) 1846 1856 ELSE 1847 1857 surf%sasws(num_h) = 0.0_wp … … 1907 1917 !-- Prescribe top scalar flux 1908 1918 IF ( passive_scalar .AND. constant_top_scalarflux ) & 1909 surf%ssws(num_h) = top_scalarflux 1919 surf%ssws(num_h) = top_scalarflux * rho_air_zw(nzt+1) 1910 1920 ! 1911 1921 !-- Prescribe top chemical species' flux … … 1913 1923 DO lsp = 1, nvar 1914 1924 IF ( air_chemistry .AND. constant_top_csflux(lsp) ) THEN 1915 surf%cssws(lsp,num_h) = top_csflux(lsp) 1925 surf%cssws(lsp,num_h) = top_csflux(lsp) * rho_air_zw(nzt+1) 1916 1926 ENDIF 1917 1927 ENDDO … … 1920 1930 !-- Prescribe top salinity flux 1921 1931 IF ( ocean .AND. constant_top_salinityflux) & 1922 surf%sasws(num_h) = top_salinityflux 1932 surf%sasws(num_h) = top_salinityflux * rho_air_zw(nzt+1) 1923 1933 ! 1924 1934 !-- Top momentum fluxes
Note: See TracChangeset
for help on using the changeset viewer.