- Timestamp:
- Jun 9, 2017 12:18:47 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r2259 r2270 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Revised numbering (removed 2 timeseries) 28 ! 29 ! 2259 2017-06-08 09:09:11Z gronemeier 27 30 ! Implemented synthetic turbulence generator 28 31 ! … … 923 926 ENDIF 924 927 928 929 ! 930 !-- When the land surface model is used, the flux output must be dynamic. 931 IF ( land_surface ) THEN 932 flux_output_mode = 'dynamic' 933 ENDIF 934 925 935 ! 926 936 !-- set the flux output units according to flux_output_mode -
palm/trunk/SOURCE/flow_statistics.f90
r2252 r2270 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Revised numbering (removed 2 timeseries) 28 ! 29 ! 2252 2017-06-07 09:35:37Z knoop 27 30 ! perturbation pressure now depending on flux_output_mode 28 31 ! … … 399 402 IF ( humidity ) sums_l(:,49,i) = sums_wsqs_ws_l(:,i) & 400 403 * waterflux_output_conversion ! w*q* 401 IF ( passive_scalar ) sums_l(:,11 6,i) = sums_wsss_ws_l(:,i) ! w*s*404 IF ( passive_scalar ) sums_l(:,114,i) = sums_wsss_ws_l(:,i) ! w*s* 402 405 ENDDO 403 406 … … 484 487 DO j = nys, nyn 485 488 DO k = nzb, nzt+1 486 sums_l(k,11 7,tn) = sums_l(k,117,tn) + s(k,j,i) &489 sums_l(k,115,tn) = sums_l(k,115,tn) + s(k,j,i) & 487 490 * rmask(j,i,sr) & 488 491 * MERGE( 1.0_wp, 0.0_wp, & … … 512 515 ENDIF 513 516 IF ( passive_scalar ) THEN 514 sums_l(:,11 7,0) = sums_l(:,117,0) + sums_l(:,117,i)517 sums_l(:,115,0) = sums_l(:,115,0) + sums_l(:,115,i) 515 518 ENDIF 516 519 ENDDO … … 553 556 IF ( passive_scalar ) THEN 554 557 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 555 CALL MPI_ALLREDUCE( sums_l(nzb,11 7,0), sums(nzb,117), nzt+2-nzb, &558 CALL MPI_ALLREDUCE( sums_l(nzb,115,0), sums(nzb,115), nzt+2-nzb, & 556 559 MPI_REAL, MPI_SUM, comm2d, ierr ) 557 560 ENDIF … … 569 572 ENDIF 570 573 ENDIF 571 IF ( passive_scalar ) sums(:,11 7) = sums_l(:,117,0)574 IF ( passive_scalar ) sums(:,115) = sums_l(:,115,0) 572 575 #endif 573 576 … … 607 610 ! 608 611 !-- Passive scalar 609 IF ( passive_scalar ) hom(:,1,11 7,sr) = sums(:,117) / &612 IF ( passive_scalar ) hom(:,1,115,sr) = sums(:,115) / & 610 613 ngp_2dh_s_inner(:,sr) ! s 611 614 … … 654 657 ENDIF 655 658 IF ( passive_scalar ) THEN 656 sums_l(k,11 8,tn) = sums_l(k,118,tn) + &657 ( s(k,j,i)-hom(k,1,11 7,sr) )**2 * rmask(j,i,sr)&659 sums_l(k,116,tn) = sums_l(k,116,tn) + & 660 ( s(k,j,i)-hom(k,1,115,sr) )**2 * rmask(j,i,sr)& 658 661 * flag 659 662 ENDIF … … 889 892 !-- Passive scalar flux 890 893 IF ( passive_scalar ) THEN 891 sums_l(k,11 9,tn) = sums_l(k,119,tn) &894 sums_l(k,117,tn) = sums_l(k,117,tn) & 892 895 - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )& 893 896 * ( s(k+1,j,i) - s(k,j,i) ) & … … 949 952 ENDIF 950 953 IF ( passive_scalar ) THEN 951 sums_l(k+ki,11 9,tn) = sums_l(k+ki,119,tn) + &954 sums_l(k+ki,117,tn) = sums_l(k+ki,117,tn) + & 952 955 surf_def_h(l)%ssws(m) * rmask(j,i,sr) ! w"s" 953 956 ENDIF … … 1001 1004 ENDIF 1002 1005 IF ( passive_scalar ) THEN 1003 sums_l(nzb,11 9,tn) = sums_l(nzb,119,tn) + &1006 sums_l(nzb,117,tn) = sums_l(nzb,117,tn) + & 1004 1007 surf_lsm_h%ssws(m) * rmask(j,i,sr) ! w"s" 1005 1008 ENDIF … … 1051 1054 ENDIF 1052 1055 IF ( passive_scalar ) THEN 1053 sums_l(nzb,11 9,tn) = sums_l(nzb,119,tn) + &1056 sums_l(nzb,117,tn) = sums_l(nzb,117,tn) + & 1054 1057 surf_usm_h%ssws(m) * rmask(j,i,sr) ! w"s" 1055 1058 ENDIF … … 1063 1066 IF ( surf_def_h(0)%ns >= 1 ) THEN 1064 1067 m = surf_def_h(0)%start_index(j,i) 1065 sums_l(nzb,11 4,tn) = sums_l(nzb,114,tn) + &1068 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + & 1066 1069 surf_def_h(0)%ol(m) * rmask(j,i,sr) ! L 1067 1070 ENDIF 1068 1071 IF ( surf_lsm_h%ns >= 1 ) THEN 1069 1072 m = surf_lsm_h%start_index(j,i) 1070 sums_l(nzb,11 4,tn) = sums_l(nzb,114,tn) + &1073 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + & 1071 1074 surf_lsm_h%ol(m) * rmask(j,i,sr) ! L 1072 1075 ENDIF 1073 1076 IF ( surf_usm_h%ns >= 1 ) THEN 1074 1077 m = surf_usm_h%start_index(j,i) 1075 sums_l(nzb,11 4,tn) = sums_l(nzb,114,tn) + &1078 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + & 1076 1079 surf_usm_h%ol(m) * rmask(j,i,sr) ! L 1077 1080 ENDIF … … 1079 1082 1080 1083 IF ( radiation .AND. radiation_scheme /= 'constant' ) THEN 1081 sums_l(nzb, 101,tn) = sums_l(nzb,101,tn) + rad_net(j,i)1082 sums_l(nzb,10 2,tn) = sums_l(nzb,102,tn) + rad_lw_in(nzb,j,i)1083 sums_l(nzb,10 3,tn) = sums_l(nzb,103,tn) + rad_lw_out(nzb,j,i)1084 sums_l(nzb,10 4,tn) = sums_l(nzb,104,tn) + rad_sw_in(nzb,j,i)1085 sums_l(nzb,10 5,tn) = sums_l(nzb,105,tn) + rad_sw_out(nzb,j,i)1084 sums_l(nzb,99,tn) = sums_l(nzb,99,tn) + rad_net(j,i) 1085 sums_l(nzb,100,tn) = sums_l(nzb,100,tn) + rad_lw_in(nzb,j,i) 1086 sums_l(nzb,101,tn) = sums_l(nzb,101,tn) + rad_lw_out(nzb,j,i) 1087 sums_l(nzb,102,tn) = sums_l(nzb,102,tn) + rad_sw_in(nzb,j,i) 1088 sums_l(nzb,103,tn) = sums_l(nzb,103,tn) + rad_sw_out(nzb,j,i) 1086 1089 1087 1090 #if defined ( __rrtmg ) 1088 1091 IF ( radiation_scheme == 'rrtmg' ) THEN 1089 sums_l(nzb,1 10,tn) = sums_l(nzb,110,tn) + rrtm_aldif(0,j,i)1090 sums_l(nzb,1 11,tn) = sums_l(nzb,111,tn) + rrtm_aldir(0,j,i)1091 sums_l(nzb,11 2,tn) = sums_l(nzb,112,tn) + rrtm_asdif(0,j,i)1092 sums_l(nzb,11 3,tn) = sums_l(nzb,113,tn) + rrtm_asdir(0,j,i)1092 sums_l(nzb,108,tn) = sums_l(nzb,108,tn) + rrtm_aldif(0,j,i) 1093 sums_l(nzb,109,tn) = sums_l(nzb,109,tn) + rrtm_aldir(0,j,i) 1094 sums_l(nzb,110,tn) = sums_l(nzb,110,tn) + rrtm_asdif(0,j,i) 1095 sums_l(nzb,111,tn) = sums_l(nzb,111,tn) + rrtm_asdir(0,j,i) 1093 1096 ENDIF 1094 1097 #endif … … 1144 1147 ENDIF 1145 1148 IF ( passive_scalar ) THEN 1146 sums_l(nzt,11 9,tn) = sums_l(nzt,119,tn) + &1149 sums_l(nzt,117,tn) = sums_l(nzt,117,tn) + & 1147 1150 surf_def_h(2)%ssws(m) * rmask(j,i,sr) ! w"s" 1148 1151 ENDIF … … 1247 1250 IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca & 1248 1251 .OR. sr /= 0 ) ) THEN 1249 pts = 0.5_wp * ( s(k,j,i) - hom(k,1,11 7,sr) + &1250 s(k+1,j,i) - hom(k+1,1,11 7,sr) )1251 sums_l(k,11 6,tn) = sums_l(k,116,tn) + pts * w(k,j,i) * &1252 pts = 0.5_wp * ( s(k,j,i) - hom(k,1,115,sr) + & 1253 s(k+1,j,i) - hom(k+1,1,115,sr) ) 1254 sums_l(k,114,tn) = sums_l(k,114,tn) + pts * w(k,j,i) * & 1252 1255 rmask(j,i,sr) * flag 1253 1256 ENDIF … … 1277 1280 IF ( i >= nxl .AND. i <= nxr .AND. & 1278 1281 j >= nys .AND. j <= nyn ) THEN 1279 sums_l(nzb,93,tn) = sums_l(nzb,93,tn) + surf_lsm_h%ghf_eb(m) 1280 sums_l(nzb,94,tn) = sums_l(nzb,94,tn) + surf_lsm_h%shf_eb(m) 1281 sums_l(nzb,95,tn) = sums_l(nzb,95,tn) + surf_lsm_h%qsws_eb(m) 1282 sums_l(nzb,96,tn) = sums_l(nzb,96,tn) + surf_lsm_h%qsws_liq_eb(m) 1283 sums_l(nzb,97,tn) = sums_l(nzb,97,tn) + surf_lsm_h%qsws_soil_eb(m) 1284 sums_l(nzb,98,tn) = sums_l(nzb,98,tn) + surf_lsm_h%qsws_veg_eb(m) 1285 sums_l(nzb,99,tn) = sums_l(nzb,99,tn) + surf_lsm_h%r_a(m) 1286 sums_l(nzb,100,tn) = sums_l(nzb,100,tn)+ surf_lsm_h%r_s(m) 1282 sums_l(nzb,93,tn) = sums_l(nzb,93,tn) + surf_lsm_h%ghf(m) 1283 sums_l(nzb,94,tn) = sums_l(nzb,94,tn) + surf_lsm_h%qsws_liq(m) 1284 sums_l(nzb,95,tn) = sums_l(nzb,95,tn) + surf_lsm_h%qsws_soil(m) 1285 sums_l(nzb,96,tn) = sums_l(nzb,96,tn) + surf_lsm_h%qsws_veg(m) 1286 sums_l(nzb,97,tn) = sums_l(nzb,97,tn) + surf_lsm_h%r_a(m) 1287 sums_l(nzb,98,tn) = sums_l(nzb,98,tn)+ surf_lsm_h%r_s(m) 1287 1288 ENDIF 1288 1289 ENDDO … … 1379 1380 ENDIF 1380 1381 IF ( passive_scalar ) THEN 1381 pts = 0.5_wp * ( s(k,j,i) - hom(k,1,11 7,sr) + &1382 s(k+1,j,i) - hom(k+1,1,11 7,sr) )1383 sums_l(k,11 6,tn) = sums_l(k,116,tn) + pts * w(k,j,i) * &1382 pts = 0.5_wp * ( s(k,j,i) - hom(k,1,115,sr) + & 1383 s(k+1,j,i) - hom(k+1,1,115,sr) ) 1384 sums_l(k,114,tn) = sums_l(k,114,tn) + pts * w(k,j,i) * & 1384 1385 rmask(j,i,sr) * flag 1385 1386 ENDIF … … 1581 1582 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 1582 1583 1583 sums_l(k,10 2,tn) = sums_l(k,102,tn) + rad_lw_in(k,j,i) &1584 sums_l(k,100,tn) = sums_l(k,100,tn) + rad_lw_in(k,j,i) & 1584 1585 * rmask(j,i,sr) * flag 1585 sums_l(k,10 3,tn) = sums_l(k,103,tn) + rad_lw_out(k,j,i) &1586 sums_l(k,101,tn) = sums_l(k,101,tn) + rad_lw_out(k,j,i) & 1586 1587 * rmask(j,i,sr) * flag 1587 sums_l(k,10 4,tn) = sums_l(k,104,tn) + rad_sw_in(k,j,i) &1588 sums_l(k,102,tn) = sums_l(k,102,tn) + rad_sw_in(k,j,i) & 1588 1589 * rmask(j,i,sr) * flag 1589 sums_l(k,10 5,tn) = sums_l(k,105,tn) + rad_sw_out(k,j,i) &1590 sums_l(k,103,tn) = sums_l(k,103,tn) + rad_sw_out(k,j,i) & 1590 1591 * rmask(j,i,sr) * flag 1591 sums_l(k,10 6,tn) = sums_l(k,106,tn) + rad_lw_cs_hr(k,j,i) &1592 sums_l(k,104,tn) = sums_l(k,104,tn) + rad_lw_cs_hr(k,j,i) & 1592 1593 * rmask(j,i,sr) * flag 1593 sums_l(k,10 7,tn) = sums_l(k,107,tn) + rad_lw_hr(k,j,i) &1594 sums_l(k,105,tn) = sums_l(k,105,tn) + rad_lw_hr(k,j,i) & 1594 1595 * rmask(j,i,sr) * flag 1595 sums_l(k,10 8,tn) = sums_l(k,108,tn) + rad_sw_cs_hr(k,j,i) &1596 sums_l(k,106,tn) = sums_l(k,106,tn) + rad_sw_cs_hr(k,j,i) & 1596 1597 * rmask(j,i,sr) * flag 1597 sums_l(k,10 9,tn) = sums_l(k,109,tn) + rad_sw_hr(k,j,i) &1598 sums_l(k,107,tn) = sums_l(k,107,tn) + rad_sw_hr(k,j,i) & 1598 1599 * rmask(j,i,sr) * flag 1599 1600 ENDDO … … 1655 1656 sums(k,55:63) = sums(k,55:63) / ngp_2dh(sr) 1656 1657 sums(k,81:88) = sums(k,81:88) / ngp_2dh(sr) 1657 sums(k,89:11 4) = sums(k,89:114) / ngp_2dh(sr)1658 sums(k,11 6) = sums(k,116) / ngp_2dh(sr)1659 sums(k,11 9) = sums(k,119) / ngp_2dh(sr)1658 sums(k,89:112) = sums(k,89:112) / ngp_2dh(sr) 1659 sums(k,114) = sums(k,114) / ngp_2dh(sr) 1660 sums(k,117) = sums(k,117) / ngp_2dh(sr) 1660 1661 IF ( ngp_2dh_s_inner(k,sr) /= 0 ) THEN 1661 1662 sums(k,8:11) = sums(k,8:11) / ngp_2dh_s_inner(k,sr) … … 1666 1667 sums(k,64) = sums(k,64) / ngp_2dh_s_inner(k,sr) 1667 1668 sums(k,70:80) = sums(k,70:80) / ngp_2dh_s_inner(k,sr) 1668 sums(k,11 8) = sums(k,118) / ngp_2dh_s_inner(k,sr)1669 sums(k,1 20:pr_palm-2) = sums(k,120:pr_palm-2) / ngp_2dh_s_inner(k,sr)1669 sums(k,116) = sums(k,116) / ngp_2dh_s_inner(k,sr) 1670 sums(k,118:pr_palm-2) = sums(k,118:pr_palm-2) / ngp_2dh_s_inner(k,sr) 1670 1671 ENDIF 1671 1672 ENDDO … … 1788 1789 hom(:,1,91,sr) = sums(:,91) ! m_soil 1789 1790 ! 92 is initial m_soil profile 1790 hom(:,1,93,sr) = sums(:,93) ! ghf_eb 1791 hom(:,1,94,sr) = sums(:,94) ! shf_eb 1792 hom(:,1,95,sr) = sums(:,95) ! qsws_eb 1793 hom(:,1,96,sr) = sums(:,96) ! qsws_liq_eb 1794 hom(:,1,97,sr) = sums(:,97) ! qsws_soil_eb 1795 hom(:,1,98,sr) = sums(:,98) ! qsws_veg_eb 1796 hom(:,1,99,sr) = sums(:,99) ! r_a 1797 hom(:,1,100,sr) = sums(:,100) ! r_s 1791 hom(:,1,93,sr) = sums(:,93) ! ghf 1792 hom(:,1,94,sr) = sums(:,94) ! qsws_liq 1793 hom(:,1,95,sr) = sums(:,95) ! qsws_soil 1794 hom(:,1,96,sr) = sums(:,96) ! qsws_veg 1795 hom(:,1,97,sr) = sums(:,97) ! r_a 1796 hom(:,1,98,sr) = sums(:,98) ! r_s 1798 1797 1799 1798 ENDIF 1800 1799 1801 1800 IF ( radiation ) THEN 1802 hom(:,1, 101,sr) = sums(:,101) ! rad_net1803 hom(:,1,10 2,sr) = sums(:,102) ! rad_lw_in1804 hom(:,1,10 3,sr) = sums(:,103) ! rad_lw_out1805 hom(:,1,10 4,sr) = sums(:,104) ! rad_sw_in1806 hom(:,1,10 5,sr) = sums(:,105) ! rad_sw_out1801 hom(:,1,99,sr) = sums(:,99) ! rad_net 1802 hom(:,1,100,sr) = sums(:,100) ! rad_lw_in 1803 hom(:,1,101,sr) = sums(:,101) ! rad_lw_out 1804 hom(:,1,102,sr) = sums(:,102) ! rad_sw_in 1805 hom(:,1,103,sr) = sums(:,103) ! rad_sw_out 1807 1806 1808 1807 IF ( radiation_scheme == 'rrtmg' ) THEN 1809 hom(:,1,10 6,sr) = sums(:,106) ! rad_lw_cs_hr1810 hom(:,1,10 7,sr) = sums(:,107) ! rad_lw_hr1811 hom(:,1,10 8,sr) = sums(:,108) ! rad_sw_cs_hr1812 hom(:,1,10 9,sr) = sums(:,109) ! rad_sw_hr1813 1814 hom(:,1,1 10,sr) = sums(:,110) ! rrtm_aldif1815 hom(:,1,1 11,sr) = sums(:,111) ! rrtm_aldir1816 hom(:,1,11 2,sr) = sums(:,112) ! rrtm_asdif1817 hom(:,1,11 3,sr) = sums(:,113) ! rrtm_asdir1808 hom(:,1,104,sr) = sums(:,104) ! rad_lw_cs_hr 1809 hom(:,1,105,sr) = sums(:,105) ! rad_lw_hr 1810 hom(:,1,106,sr) = sums(:,106) ! rad_sw_cs_hr 1811 hom(:,1,107,sr) = sums(:,107) ! rad_sw_hr 1812 1813 hom(:,1,108,sr) = sums(:,108) ! rrtm_aldif 1814 hom(:,1,109,sr) = sums(:,109) ! rrtm_aldir 1815 hom(:,1,110,sr) = sums(:,110) ! rrtm_asdif 1816 hom(:,1,111,sr) = sums(:,111) ! rrtm_asdir 1818 1817 ENDIF 1819 1818 ENDIF 1820 1819 1821 hom(:,1,11 4,sr) = sums(:,114) !: L1820 hom(:,1,112,sr) = sums(:,112) !: L 1822 1821 1823 1822 IF ( passive_scalar ) THEN 1824 hom(:,1,11 9,sr) = sums(:,119) ! w"s"1825 hom(:,1,11 6,sr) = sums(:,116) ! w*s*1826 hom(:,1,1 20,sr) = sums(:,119) + sums(:,116) ! ws1827 hom(:,1,11 8,sr) = sums(:,118) ! s*21828 ENDIF 1829 1830 hom(:,1,1 21,sr) = rho_air ! rho_air in Kg/m^31831 hom(:,1,12 2,sr) = rho_air_zw ! rho_air_zw in Kg/m^31823 hom(:,1,117,sr) = sums(:,117) ! w"s" 1824 hom(:,1,114,sr) = sums(:,114) ! w*s* 1825 hom(:,1,118,sr) = sums(:,117) + sums(:,114) ! ws 1826 hom(:,1,116,sr) = sums(:,116) ! s*2 1827 ENDIF 1828 1829 hom(:,1,119,sr) = rho_air ! rho_air in Kg/m^3 1830 hom(:,1,120,sr) = rho_air_zw ! rho_air_zw in Kg/m^3 1832 1831 1833 1832 hom(:,1,pr_palm,sr) = sums(:,pr_palm) … … 1972 1971 1973 1972 IF ( .NOT. neutral ) THEN 1974 ts_value(22,sr) = hom(nzb,1,11 4,sr) ! L1973 ts_value(22,sr) = hom(nzb,1,112,sr) ! L 1975 1974 ELSE 1976 1975 ts_value(22,sr) = 1.0E10_wp … … 1980 1979 1981 1980 IF ( passive_scalar ) THEN 1982 ts_value(24,sr) = hom(nzb+13,1,11 9,sr) ! w"s" ( to do ! )1981 ts_value(24,sr) = hom(nzb+13,1,117,sr) ! w"s" ( to do ! ) 1983 1982 ts_value(25,sr) = hom(nzb+13,1,pr_palm,sr) ! s* 1984 1983 ENDIF … … 1987 1986 !-- Collect land surface model timeseries 1988 1987 IF ( land_surface ) THEN 1989 ts_value(dots_soil ,sr) = hom(nzb,1,93,sr) ! ghf_eb 1990 ts_value(dots_soil+1,sr) = hom(nzb,1,94,sr) ! shf_eb 1991 ts_value(dots_soil+2,sr) = hom(nzb,1,95,sr) ! qsws_eb 1992 ts_value(dots_soil+3,sr) = hom(nzb,1,96,sr) ! qsws_liq_eb 1993 ts_value(dots_soil+4,sr) = hom(nzb,1,97,sr) ! qsws_soil_eb 1994 ts_value(dots_soil+5,sr) = hom(nzb,1,98,sr) ! qsws_veg_eb 1995 ts_value(dots_soil+6,sr) = hom(nzb,1,99,sr) ! r_a 1996 ts_value(dots_soil+7,sr) = hom(nzb,1,100,sr) ! r_s 1988 ts_value(dots_soil ,sr) = hom(nzb,1,93,sr) ! ghf 1989 ts_value(dots_soil+1,sr) = hom(nzb,1,94,sr) ! qsws_liq 1990 ts_value(dots_soil+2,sr) = hom(nzb,1,95,sr) ! qsws_soil 1991 ts_value(dots_soil+3,sr) = hom(nzb,1,96,sr) ! qsws_veg 1992 ts_value(dots_soil+4,sr) = hom(nzb,1,97,sr) ! r_a 1993 ts_value(dots_soil+5,sr) = hom(nzb,1,98,sr) ! r_s 1997 1994 ENDIF 1998 1995 ! 1999 1996 !-- Collect radiation model timeseries 2000 1997 IF ( radiation ) THEN 2001 ts_value(dots_rad,sr) = hom(nzb,1, 101,sr)! rad_net2002 ts_value(dots_rad+1,sr) = hom(nzb,1,10 2,sr) ! rad_lw_in2003 ts_value(dots_rad+2,sr) = hom(nzb,1,10 3,sr) ! rad_lw_out2004 ts_value(dots_rad+3,sr) = hom(nzb,1,10 4,sr) ! rad_sw_in2005 ts_value(dots_rad+4,sr) = hom(nzb,1,10 5,sr) ! rad_sw_out1998 ts_value(dots_rad,sr) = hom(nzb,1,99,sr) ! rad_net 1999 ts_value(dots_rad+1,sr) = hom(nzb,1,100,sr) ! rad_lw_in 2000 ts_value(dots_rad+2,sr) = hom(nzb,1,101,sr) ! rad_lw_out 2001 ts_value(dots_rad+3,sr) = hom(nzb,1,102,sr) ! rad_sw_in 2002 ts_value(dots_rad+4,sr) = hom(nzb,1,103,sr) ! rad_sw_out 2006 2003 2007 2004 IF ( radiation_scheme == 'rrtmg' ) THEN 2008 ts_value(dots_rad+5,sr) = hom(nzb,1,1 10,sr) ! rrtm_aldif2009 ts_value(dots_rad+6,sr) = hom(nzb,1,1 11,sr) ! rrtm_aldir2010 ts_value(dots_rad+7,sr) = hom(nzb,1,11 2,sr) ! rrtm_asdif2011 ts_value(dots_rad+8,sr) = hom(nzb,1,11 3,sr) ! rrtm_asdir2005 ts_value(dots_rad+5,sr) = hom(nzb,1,108,sr) ! rrtm_aldif 2006 ts_value(dots_rad+6,sr) = hom(nzb,1,109,sr) ! rrtm_aldir 2007 ts_value(dots_rad+7,sr) = hom(nzb,1,110,sr) ! rrtm_asdif 2008 ts_value(dots_rad+8,sr) = hom(nzb,1,111,sr) ! rrtm_asdir 2012 2009 ENDIF 2013 2010 -
palm/trunk/SOURCE/header.f90
r2259 r2270 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed Prandtl layer to constant flux layer 28 ! 29 ! 2259 2017-06-08 09:09:11Z gronemeier 27 30 ! Implemented synthetic turbulence generator 28 31 ! … … 2093 2096 303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1') 2094 2097 304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt') 2095 305 FORMAT (//' Prandtl-Layer between bottom surface and first ',&2096 2097 ' z p= ',F6.2,' m z0 =',F7.4,' m z0h =',F8.5,&2098 305 FORMAT (//' Constant flux layer between bottom surface and first ', & 2099 'computational u,v-level:'// & 2100 ' z_mo = ',F6.2,' m z0 =',F7.4,' m z0h =',F8.5,& 2098 2101 ' m kappa =',F5.2/ & 2099 2102 ' Rif value range: ',F8.2,' <= rif <=',F6.2) -
palm/trunk/SOURCE/init_3d_model.f90
r2259 r2270 25 25 ! ----------------- 26 26 ! $Id$ 27 ! dots_num must be increased when LSM and/or radiation is used 28 ! 29 ! 2259 2017-06-08 09:09:11Z gronemeier 27 30 ! Implemented synthetic turbulence generator 28 31 ! … … 381 384 382 385 USE radiation_model_mod, & 383 ONLY: radiation_init, radiation 386 ONLY: radiation_init, radiation, radiation_scheme 384 387 385 388 USE random_function_mod … … 1863 1866 ENDIF 1864 1867 1868 1869 ! 1870 !-- Temporary solution to add LSM and radiation time series to the default 1871 !-- output 1872 IF ( land_surface .OR. radiation ) THEN 1873 IF ( TRIM( radiation_scheme ) == 'rrtmg' ) THEN 1874 dots_num = dots_num + 15 1875 ELSE 1876 dots_num = dots_num + 11 1877 ENDIF 1878 ENDIF 1879 1865 1880 ! 1866 1881 !-- If required, initialize urban surface model -
palm/trunk/SOURCE/land_surface_model_mod.f90
r2249 r2270 20 20 ! Current revisions: 21 21 ! ----------------- 22 !23 22 ! 24 23 ! … … 26 25 ! ----------------- 27 26 ! $Id$ 27 ! Revised parameterization of heat conductivity between skin layer and soil. 28 ! Temperature and moisture are now defined at the center of the layers. 29 ! Renamed veg_type to vegetation_type and pave_type to pavement_type_name 30 ! Renamed and reduced the number of look-up tables (vegetation_pars, soil_pars) 31 ! Revised land surface model initialization 32 ! Removed output of shf_eb and qsws_eb and removed _eb throughout code 33 ! Removed Clapp & Hornberger parameterization 34 ! 35 ! 2249 2017-06-06 13:58:01Z sward 28 36 ! 29 37 ! 2248 2017-06-06 13:52:54Z sward $ … … 50 58 ! 51 59 ! 2149 2017-02-09 16:57:03Z scharf 52 ! Land surface parameters II corrected for veg _type 18 and 1960 ! Land surface parameters II corrected for vegetation_type 18 and 19 53 61 ! 54 62 ! 2031 2016-10-21 15:11:58Z knoop … … 177 185 ! ------------ 178 186 !> Land surface model, consisting of a solver for the energy balance at the 179 !> surface and a fourlayer soil scheme. The scheme is similar to the TESSEL187 !> surface and a multi layer soil scheme. The scheme is similar to the TESSEL 180 188 !> scheme implemented in the ECMWF IFS model, with modifications according to 181 189 !> H-TESSEL. The implementation is based on the formulation implemented in the … … 195 203 !> with considerable precipitation. 196 204 !> @todo Fix crashes with radiation_scheme == 'constant' 197 !> 205 !> @todo Revise calculation of f2 when wilting point is non-constant in the 206 !> soil 207 !> @todo Solve problems with soil heat flux paramterization 208 !> @todo Make pavement_depth variable for each surface element 209 !> @todo Allow for zero soil moisture (currently, it is set to wilting point) 198 210 !> @note No time step criterion is required as long as the soil layers do not 199 211 !> become too thin. … … 211 223 initializing_actions, intermediate_timestep_count_max, & 212 224 land_surface, max_masks, precipitation, pt_surface, & 213 rho_surface, roughness_length, surface_pressure,&214 time step_scheme, tsc, z0h_factor, time_since_reference_point225 rho_surface, surface_pressure, timestep_scheme, tsc, & 226 time_since_reference_point 215 227 216 228 USE indices, & … … 223 235 USE radiation_model_mod, & 224 236 ONLY: force_radiation_call, rad_net, rad_sw_in, rad_lw_out, & 225 rad_lw_out_change_0, radiation_scheme, unscheduled_radiation_calls 237 rad_lw_out_change_0, radiation_scheme, & 238 unscheduled_radiation_calls 226 239 227 240 USE statistics, & 228 241 ONLY: hom, statistic_regions 229 242 230 USE surface_mod, &243 USE surface_mod, & 231 244 ONLY : surf_lsm_h, surf_lsm_v, surf_type 232 245 … … 243 256 REAL(wp), PARAMETER :: & 244 257 b_ch = 6.04_wp, & ! Clapp & Hornberger exponent 245 lambda_h_dry = 0.19_wp, & ! heat conductivity for dry soil 246 lambda_h_sm = 3.44_wp, & ! heat conductivity of the soil matrix 247 lambda_h_water = 0.57_wp, & ! heat conductivity of water 258 lambda_h_dry = 0.19_wp, & ! heat conductivity for dry soil (W/m/K) 259 lambda_h_sm = 3.44_wp, & ! heat conductivity of the soil matrix (W/m/K) 260 lambda_h_water = 0.57_wp, & ! heat conductivity of water (W/m/K) 248 261 psi_sat = -0.388_wp, & ! soil matrix potential at saturation 249 rho_c_soil = 2.19E6_wp, & ! volumetric heat capacity of soil 250 rho_c_water = 4.20E6_wp, & ! volumetric heat capacity of water 262 rho_c_soil = 2.19E6_wp, & ! volumetric heat capacity of soil (J/m3/K) 263 rho_c_water = 4.20E6_wp, & ! volumetric heat capacity of water (J/m3/K) 251 264 m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) 252 265 … … 260 273 ! 261 274 !-- LSM variables 262 INTEGER(iwp) :: nzb_soil = 0, & !< bottom of the soil model (Earth's surface) 263 nzt_soil = 0, & !< top of the soil model 264 nzs = 0, & !< number of soil layers 265 veg_type = 2, & !< default NAMELIST veg_type_2d 266 soil_type = 3 !< default NAMELIST soil_type_2d 275 CHARACTER(10) :: surface_type = 'netcdf' !< general classification. Allowed are: 276 !< 'vegetation', 'pavement', ('building'), 277 !< 'water', and 'netcdf' 278 279 280 281 INTEGER(iwp) :: nzb_soil = 0, & !< bottom of the soil model (Earth's surface) 282 nzt_soil = 7, & !< top of the soil model 283 nzs = 8, & !< number of soil layers 284 pavement_type = 1, & !< default NAMELIST pavement_type 285 soil_type = 3, & !< default NAMELIST soil_type 286 vegetation_type = 2, & !< default NAMELIST vegetation_type 287 water_type = 1 !< default NAMELISt water_type 288 267 289 268 290 269 291 LOGICAL :: conserve_water_content = .TRUE., & !< open or closed bottom surface for the soil model 292 constant_roughness = .FALSE., & !< use fixed/dynamic roughness lengths for water surfaces 270 293 force_radiation_call_l = .FALSE., & !< flag to force calling of radiation routine 271 294 aero_resist_kray = .TRUE. !< flag to control parametrization of aerodynamic resistance at vertical surface elements … … 275 298 REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg 276 299 canopy_resistance_coefficient = 9999999.9_wp, & !< NAMELIST g_d 277 c_surface = 20000.0_wp, & !< Surface (skin) heat capacity300 c_surface = 9999999.9_wp, & !< Surface (skin) heat capacity (J/m2/K) 278 301 drho_l_lv, & !< (rho_l * l_v)**-1 279 302 exn, & !< value of the Exner function … … 283 306 hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_sat 284 307 ke = 0.0_wp, & !< Kersten number 285 lambda_h_sat = 0.0_wp, & !< heat conductivity for saturated soil 286 lambda_surface_stable = 9999999.9_wp, & !< NAMELIST lambda_surface_s 287 lambda_surface_unstable = 9999999.9_wp, & !< NAMELIST lambda_surface_u 308 lambda_h_sat = 0.0_wp, & !< heat conductivity for saturated soil (W/m/K) 309 lambda_surface_stable = 9999999.9_wp, & !< NAMELIST lambda_surface_s (W/m2/K) 310 lambda_surface_unstable = 9999999.9_wp, & !< NAMELIST lambda_surface_u (W/m2/K) 288 311 leaf_area_index = 9999999.9_wp, & !< NAMELIST lai 289 312 l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg … … 292 315 m_total = 0.0_wp, & !< weighted total water content of the soil (m3/m3) 293 316 n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg 294 pave _depth = 9999999.9_wp,& !< depth of the pavement295 pave _heat_capacity = 1.94E6_wp, & !< volumetric heat capacity of pavement (e.g. roads)296 pave _heat_conductivity = 1.00_wp, & !< heat conductivity for pavements (e.g. roads)317 pavement_depth = 9999999.9_wp, & !< depth of the pavement 318 pavement_heat_capacity = 9999999.9_wp, & !< volumetric heat capacity of pavement (e.g. roads) (J/m3/K) 319 pavement_heat_conduct = 9999999.9_wp, & !< heat conductivity for pavements (e.g. roads) (W/m/K) 297 320 q_s = 0.0_wp, & !< saturation specific humidity 298 321 residual_moisture = 9999999.9_wp, & !< NAMELIST m_res … … 303 326 skip_time_do_lsm = 0.0_wp, & !< LSM is not called before this time 304 327 vegetation_coverage = 9999999.9_wp, & !< NAMELIST c_veg 328 water_temperature = 9999999.9_wp, & !< water temperature 305 329 wilting_point = 9999999.9_wp, & !< NAMELIST m_wilt 306 z0_eb = 9999999.9_wp, & !< NAMELIST z0 (lsm_par) 307 z0h_eb = 9999999.9_wp, & !< NAMELIST z0h (lsm_par) 308 z0q_eb = 9999999.9_wp !< NAMELIST z0q (lsm_par) 309 330 z0_vegetation = 9999999.9_wp, & !< NAMELIST z0 (lsm_par) 331 z0h_vegetation = 9999999.9_wp, & !< NAMELIST z0h (lsm_par) 332 z0q_vegetation = 9999999.9_wp, & !< NAMELIST z0q (lsm_par) 333 z0_pavement = 9999999.9_wp, & !< NAMELIST z0 (lsm_par) 334 z0h_pavement = 9999999.9_wp, & !< NAMELIST z0h (lsm_par) 335 z0q_pavement = 9999999.9_wp, & !< NAMELIST z0q (lsm_par) 336 z0_water = 9999999.9_wp, & !< NAMELIST z0 (lsm_par) 337 z0h_water = 9999999.9_wp, & !< NAMELIST z0h (lsm_par) 338 z0q_water = 9999999.9_wp !< NAMELIST z0q (lsm_par) 339 340 310 341 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddz_soil, & !< 1/dz_soil 311 ddz_soil_ stag, & !< 1/dz_soil_stag312 dz_soil, & !< soil grid spacing ( edge-edge)313 dz_soil_ stag, & !< soil grid spacing (center-center)342 ddz_soil_layer, & !< 1/dz_soil_layer 343 dz_soil, & !< soil grid spacing (center-center) 344 dz_soil_layer, & !< soil grid spacing (edge-edge) 314 345 root_extr !< root extraction 315 346 316 347 317 348 318 REAL(wp), DIMENSION(0:20) :: root_fraction = 9999999.9_wp, & !< distribution of root surface area to the individual soil layers349 REAL(wp), DIMENSION(0:20) :: root_fraction = 9999999.9_wp, & !< (NAMELIST) distribution of root surface area to the individual soil layers 319 350 soil_moisture = 0.0_wp, & !< NAMELIST soil moisture content (m3/m3) 320 351 soil_temperature = 300.0_wp, & !< NAMELIST soil temperature (K) +1 321 zs = 9999999.9_wp !< soil layer depths 322 352 zs = 9999999.9_wp, & !< (NAMELIST) soil layer depths (center) 353 zs_layer = 9999999.9_wp !< soil layer depths (edge) 354 323 355 #if defined( __nopointer ) 324 356 TYPE(surf_type_lsm), TARGET :: t_soil_h, & !< Soil temperature (K), horizontal surface elements … … 359 391 TYPE(surf_type_lsm), TARGET :: t_surface_h, & !< surface temperature (K), horizontal surface elements 360 392 t_surface_h_p, & !< progn. surface temperature (K), horizontal surface elements 361 m_liq_ eb_h, & !< liquid water reservoir (m), horizontal surface elements362 m_liq_ eb_h_p !< progn. liquid water reservoir (m), horizontal surface elements393 m_liq_h, & !< liquid water reservoir (m), horizontal surface elements 394 m_liq_h_p !< progn. liquid water reservoir (m), horizontal surface elements 363 395 364 396 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: & 365 397 t_surface_v, & !< surface temperature (K), vertical surface elements 366 398 t_surface_v_p, & !< progn. surface temperature (K), vertical surface elements 367 m_liq_ eb_v, & !< liquid water reservoir (m), vertical surface elements368 m_liq_ eb_v_p !< progn. liquid water reservoir (m), vertical surface elements399 m_liq_v, & !< liquid water reservoir (m), vertical surface elements 400 m_liq_v_p !< progn. liquid water reservoir (m), vertical surface elements 369 401 #else 370 402 TYPE(surf_type_lsm), POINTER :: t_surface_h, & !< surface temperature (K), horizontal surface elements 371 403 t_surface_h_p, & !< progn. surface temperature (K), horizontal surface elements 372 m_liq_ eb_h, & !< liquid water reservoir (m), horizontal surface elements373 m_liq_ eb_h_p !< progn. liquid water reservoir (m), horizontal surface elements404 m_liq_h, & !< liquid water reservoir (m), horizontal surface elements 405 m_liq_h_p !< progn. liquid water reservoir (m), horizontal surface elements 374 406 375 407 TYPE(surf_type_lsm), TARGET :: t_surface_h_1, & !< 376 408 t_surface_h_2, & !< 377 m_liq_ eb_h_1, & !<378 m_liq_ eb_h_2 !<409 m_liq_h_1, & !< 410 m_liq_h_2 !< 379 411 380 412 TYPE(surf_type_lsm), DIMENSION(:), POINTER :: & 381 413 t_surface_v, & !< surface temperature (K), vertical surface elements 382 414 t_surface_v_p, & !< progn. surface temperature (K), vertical surface elements 383 m_liq_ eb_v, & !< liquid water reservoir (m), vertical surface elements384 m_liq_ eb_v_p !< progn. liquid water reservoir (m), vertical surface elements415 m_liq_v, & !< liquid water reservoir (m), vertical surface elements 416 m_liq_v_p !< progn. liquid water reservoir (m), vertical surface elements 385 417 386 418 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: & 387 419 t_surface_v_1, & !< 388 420 t_surface_v_2, & !< 389 m_liq_ eb_v_1, & !<390 m_liq_ eb_v_2 !<421 m_liq_v_1, & !< 422 m_liq_v_2 !< 391 423 #endif 392 424 393 425 #if defined( __nopointer ) 394 REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: m_liq_ eb_av426 REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: m_liq_av 395 427 #else 396 REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: m_liq_ eb_av428 REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: m_liq_av 397 429 #endif 398 430 … … 405 437 #endif 406 438 407 TYPE(surf_type_lsm), TARGET :: tm_liq_ eb_h_m !< liquid water reservoir tendency (m), horizontal surface elements439 TYPE(surf_type_lsm), TARGET :: tm_liq_h_m !< liquid water reservoir tendency (m), horizontal surface elements 408 440 TYPE(surf_type_lsm), TARGET :: tt_surface_h_m !< surface temperature tendency (K), horizontal surface elements 409 441 TYPE(surf_type_lsm), TARGET :: tt_soil_h_m !< t_soil storage array, horizontal surface elements 410 442 TYPE(surf_type_lsm), TARGET :: tm_soil_h_m !< m_soil storage array, horizontal surface elements 411 443 412 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tm_liq_ eb_v_m !< liquid water reservoir tendency (m), vertical surface elements444 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tm_liq_v_m !< liquid water reservoir tendency (m), vertical surface elements 413 445 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tt_surface_v_m !< surface temperature tendency (K), vertical surface elements 414 446 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tt_soil_v_m !< t_soil storage array, vertical surface elements … … 421 453 c_soil_av, & !< average of c_soil 422 454 c_veg_av, & !< average of c_veg 423 ghf_ eb_av, & !< average of ghf_eb455 ghf_av, & !< average of ghf 424 456 lai_av, & !< average of lai 425 qsws_eb_av, & !< average of qsws_eb 426 qsws_liq_eb_av, & !< average of qsws_liq_eb 427 qsws_soil_eb_av, & !< average of qsws_soil_eb 428 qsws_veg_eb_av, & !< average of qsws_veg_eb 457 qsws_liq_av, & !< average of qsws_liq 458 qsws_soil_av, & !< average of qsws_soil 459 qsws_veg_av, & !< average of qsws_veg 429 460 r_a_av, & !< average of r_a 430 r_s_av, & !< average of r_s 431 shf_eb_av !< average of shf_eb 432 433 434 ! 435 !-- Predefined Land surface classes (veg_type) 436 CHARACTER(26), DIMENSION(0:20), PARAMETER :: veg_type_name = (/ & 437 'user defined ', & ! 0 438 'crops, mixed farming ', & ! 1 439 'short grass ', & ! 2 440 'evergreen needleleaf trees', & ! 3 441 'deciduous needleleaf trees', & ! 4 442 'evergreen broadleaf trees ', & ! 5 443 'deciduous broadleaf trees ', & ! 6 444 'tall grass ', & ! 7 445 'desert ', & ! 8 446 'tundra ', & ! 9 447 'irrigated crops ', & ! 10 448 'semidesert ', & ! 11 449 'ice caps and glaciers ', & ! 12 450 'bogs and marshes ', & ! 13 451 'inland water ', & ! 14 452 'ocean ', & ! 15 453 'evergreen shrubs ', & ! 16 454 'deciduous shrubs ', & ! 17 455 'mixed forest/woodland ', & ! 18 456 'interrupted forest ', & ! 19 457 'pavements/roads ' & ! 20 461 r_s_av !< average of r_s 462 463 464 ! 465 !-- Predefined Land surface classes (vegetation_type) 466 CHARACTER(26), DIMENSION(0:18), PARAMETER :: vegetation_type_name = (/ & 467 'user defined ', & ! 0 468 'bare soil ', & ! 1 469 'crops, mixed farming ', & ! 2 470 'short grass ', & ! 3 471 'evergreen needleleaf trees', & ! 4 472 'deciduous needleleaf trees', & ! 5 473 'evergreen broadleaf trees ', & ! 6 474 'deciduous broadleaf trees ', & ! 7 475 'tall grass ', & ! 8 476 'desert ', & ! 9 477 'tundra ', & ! 10 478 'irrigated crops ', & ! 11 479 'semidesert ', & ! 12 480 'ice caps and glaciers ', & ! 13 481 'bogs and marshes ', & ! 14 482 'evergreen shrubs ', & ! 15 483 'deciduous shrubs ', & ! 16 484 'mixed forest/woodland ', & ! 17 485 'interrupted forest ' & ! 18 458 486 /) 459 487 460 488 ! 461 489 !-- Soil model classes (soil_type) 462 CHARACTER(12), DIMENSION(0: 7), PARAMETER :: soil_type_name = (/ &490 CHARACTER(12), DIMENSION(0:6), PARAMETER :: soil_type_name = (/ & 463 491 'user defined', & ! 0 464 492 'coarse ', & ! 1 … … 467 495 'fine ', & ! 4 468 496 'very fine ', & ! 5 469 'organic ', & ! 6 470 'loamy (CH) ' & ! 7 497 'organic ' & ! 6 471 498 /) 472 ! 473 !-- Land surface parameters according to the respective classes (veg_type) 474 475 ! 476 !-- Land surface parameters I 477 !-- r_canopy_min, lai, c_veg, g_d 478 REAL(wp), DIMENSION(0:3,1:20), PARAMETER :: veg_pars = RESHAPE( (/ & 479 180.0_wp, 3.00_wp, 0.90_wp, 0.00_wp, & ! 1 480 110.0_wp, 2.00_wp, 0.85_wp, 0.00_wp, & ! 2 481 500.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, & ! 3 482 500.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, & ! 4 483 175.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, & ! 5 484 240.0_wp, 6.00_wp, 0.99_wp, 0.13_wp, & ! 6 485 100.0_wp, 2.00_wp, 0.70_wp, 0.00_wp, & ! 7 486 250.0_wp, 0.05_wp, 0.00_wp, 0.00_wp, & ! 8 487 80.0_wp, 1.00_wp, 0.50_wp, 0.00_wp, & ! 9 488 180.0_wp, 3.00_wp, 0.90_wp, 0.00_wp, & ! 10 489 150.0_wp, 0.50_wp, 0.10_wp, 0.00_wp, & ! 11 490 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 12 491 240.0_wp, 4.00_wp, 0.60_wp, 0.00_wp, & ! 13 492 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 14 493 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 15 494 225.0_wp, 3.00_wp, 0.50_wp, 0.00_wp, & ! 16 495 225.0_wp, 1.50_wp, 0.50_wp, 0.00_wp, & ! 17 496 250.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, & ! 18 497 175.0_wp, 2.50_wp, 0.90_wp, 0.03_wp, & ! 19 498 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp & ! 20 499 /), (/ 4, 20 /) ) 500 501 ! 502 !-- Land surface parameters II z0, z0h, z0q 503 REAL(wp), DIMENSION(0:2,1:20), PARAMETER :: roughness_par = RESHAPE( (/ & 504 0.25_wp, 0.25E-2_wp, 0.25E-2_wp, & ! 1 505 0.20_wp, 0.20E-2_wp, 0.20E-2_wp, & ! 2 506 2.00_wp, 2.00_wp, 2.00_wp, & ! 3 507 2.00_wp, 2.00_wp, 2.00_wp, & ! 4 508 2.00_wp, 2.00_wp, 2.00_wp, & ! 5 509 2.00_wp, 2.00_wp, 2.00_wp, & ! 6 510 0.47_wp, 0.47E-2_wp, 0.47E-2_wp, & ! 7 511 0.013_wp, 0.013E-2_wp, 0.013E-2_wp, & ! 8 512 0.034_wp, 0.034E-2_wp, 0.034E-2_wp, & ! 9 513 0.5_wp, 0.50E-2_wp, 0.50E-2_wp, & ! 10 514 0.17_wp, 0.17E-2_wp, 0.17E-2_wp, & ! 11 515 1.3E-3_wp, 1.3E-4_wp, 1.3E-4_wp, & ! 12 516 0.83_wp, 0.83E-2_wp, 0.83E-2_wp, & ! 13 517 0.00_wp, 0.00_wp, 0.00_wp, & ! 14 518 0.00_wp, 0.00_wp, 0.00_wp, & ! 15 519 0.10_wp, 0.10E-2_wp, 0.10E-2_wp, & ! 16 520 0.25_wp, 0.25E-2_wp, 0.25E-2_wp, & ! 17 521 2.00_wp, 2.00_wp, 2.00_wp, & ! 18 522 1.10_wp, 1.10_wp, 1.10_wp, & ! 19 523 1.0E-4_wp, 1.0E-5_wp, 1.0E-5_wp & ! 20 524 /), (/ 3, 20 /) ) 525 526 ! 527 !-- Land surface parameters III lambda_surface_s, lambda_surface_u, f_sw_in 528 REAL(wp), DIMENSION(0:2,1:20), PARAMETER :: surface_pars = RESHAPE( (/ & 529 10.0_wp, 10.0_wp, 0.05_wp, & ! 1 530 10.0_wp, 10.0_wp, 0.05_wp, & ! 2 531 20.0_wp, 15.0_wp, 0.03_wp, & ! 3 532 20.0_wp, 15.0_wp, 0.03_wp, & ! 4 533 20.0_wp, 15.0_wp, 0.03_wp, & ! 5 534 20.0_wp, 15.0_wp, 0.03_wp, & ! 6 535 10.0_wp, 10.0_wp, 0.05_wp, & ! 7 536 15.0_wp, 15.0_wp, 0.00_wp, & ! 8 537 10.0_wp, 10.0_wp, 0.05_wp, & ! 9 538 10.0_wp, 10.0_wp, 0.05_wp, & ! 10 539 10.0_wp, 10.0_wp, 0.05_wp, & ! 11 540 58.0_wp, 58.0_wp, 0.00_wp, & ! 12 541 10.0_wp, 10.0_wp, 0.05_wp, & ! 13 542 1.0E10_wp, 1.0E10_wp, 0.00_wp, & ! 14 543 1.0E10_wp, 1.0E10_wp, 0.00_wp, & ! 15 544 10.0_wp, 10.0_wp, 0.05_wp, & ! 16 545 10.0_wp, 10.0_wp, 0.05_wp, & ! 17 546 20.0_wp, 15.0_wp, 0.03_wp, & ! 18 547 20.0_wp, 15.0_wp, 0.03_wp, & ! 19 548 0.0_wp, 0.0_wp, 0.00_wp & ! 20 549 /), (/ 3, 20 /) ) 550 551 ! 552 !-- Root distribution (sum = 1) level 1-8 553 !-- 554 REAL(wp), DIMENSION(0:7,1:20), PARAMETER :: root_distribution = RESHAPE( (/& 499 500 ! 501 !-- Pavement classes 502 CHARACTER(20), DIMENSION(0:7), PARAMETER :: pavement_type_name = (/ & 503 'user defined ', & ! 0 504 'asphalt ', & ! 1 505 'concrete ', & ! 2 506 'asphalt/concrete mix', & ! 3 507 'brick pavers ', & ! 4 508 'cobblestone pavers ', & ! 5 509 'sett pavers ', & ! 6 510 'gravel pavers ' & ! 7 511 /) 512 513 ! 514 !-- Water classes 515 CHARACTER(12), DIMENSION(0:4), PARAMETER :: water_type_name = (/ & 516 'user defined', & ! 0 517 'lake ', & ! 1 518 'river ', & ! 2 519 'ocean ', & ! 3 520 'pond ' & ! 4 521 /) 522 523 ! 524 !-- Land surface parameters according to the respective classes (vegetation_type) 525 526 ! 527 !-- Land surface parameters 528 !-- r_canopy_min, lai, c_veg, g_d z0, z0h, lambda_s_s, lambda_s_u, f_sw_in, c_surface 529 REAL(wp), DIMENSION(0:9,1:18), PARAMETER :: vegetation_pars = RESHAPE( (/ & 530 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, 0.5E-2_wp, 0.5E-4_wp, 0.0_wp, 0.0_wp, 0.00_wp, 0.00_wp, & ! 1 531 180.0_wp, 3.00_wp, 0.90_wp, 0.00_wp, 0.25_wp, 0.25E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 2 532 110.0_wp, 2.00_wp, 0.85_wp, 0.00_wp, 0.20_wp, 0.20E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 3 533 500.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, 2.00_wp, 2.00_wp, 280.0_wp, 196.0_wp, 0.03_wp, 0.00_wp, & ! 4 534 500.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, 2.00_wp, 2.00_wp, 280.0_wp, 196.0_wp, 0.03_wp, 0.00_wp, & ! 5 535 175.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, 2.00_wp, 2.00_wp, 280.0_wp, 196.0_wp, 0.03_wp, 0.00_wp, & ! 6 536 240.0_wp, 6.00_wp, 0.99_wp, 0.13_wp, 2.00_wp, 2.00_wp, 280.0_wp, 196.0_wp, 0.03_wp, 0.00_wp, & ! 7 537 100.0_wp, 2.00_wp, 0.70_wp, 0.00_wp, 0.47_wp, 0.47E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 8 538 250.0_wp, 0.05_wp, 0.00_wp, 0.00_wp, 0.013_wp, 0.013E-2_wp, 196.0_wp, 196.0_wp, 0.00_wp, 0.00_wp, & ! 9 539 80.0_wp, 1.00_wp, 0.50_wp, 0.00_wp, 0.034_wp, 0.034E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 10 540 180.0_wp, 3.00_wp, 0.90_wp, 0.00_wp, 0.5_wp, 0.50E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 11 541 150.0_wp, 0.50_wp, 0.10_wp, 0.00_wp, 0.17_wp, 0.17E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 12 542 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, 1.3E-3_wp, 1.3E-4_wp, 812.0_wp, 812.0_wp, 0.00_wp, 0.00_wp, & ! 13 543 240.0_wp, 4.00_wp, 0.60_wp, 0.00_wp, 0.83_wp, 0.83E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 14 544 225.0_wp, 3.00_wp, 0.50_wp, 0.00_wp, 0.10_wp, 0.10E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 15 545 225.0_wp, 1.50_wp, 0.50_wp, 0.00_wp, 0.25_wp, 0.25E-2_wp, 140.0_wp, 140.0_wp, 0.05_wp, 0.00_wp, & ! 16 546 250.0_wp, 5.00_wp, 0.90_wp, 0.03_wp, 2.00_wp, 2.00_wp, 280.0_wp, 196.0_wp, 0.03_wp, 0.00_wp, & ! 17 547 175.0_wp, 2.50_wp, 0.90_wp, 0.03_wp, 1.10_wp, 1.10_wp, 280.0_wp, 196.0_wp, 0.03_wp, 0.00_wp & ! 18 548 /), (/ 10, 18 /) ) 549 550 551 ! 552 !-- Root distribution for default soil layer configuration (sum = 1) 553 !-- level 1 - level 8 554 REAL(wp), DIMENSION(0:7,1:18), PARAMETER :: root_distribution = RESHAPE( (/& 555 1.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 556 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 1 555 557 0.035_wp, 0.069_wp, 0.069_wp, 0.108_wp, & 556 0.195_wp, 0.214_wp, 0.284_wp, 0.026_wp, & ! 1558 0.195_wp, 0.214_wp, 0.284_wp, 0.026_wp, & ! 2 557 559 0.050_wp, 0.100_wp, 0.100_wp, 0.136_wp, & 558 0.181_wp, 0.192_wp, 0.215_wp, 0.026_wp, & ! 2560 0.181_wp, 0.192_wp, 0.215_wp, 0.026_wp, & ! 3 559 561 0.038_wp, 0.075_wp, 0.075_wp, 0.111_wp, & 560 0.185_wp, 0.203_wp, 0.273_wp, 0.040_wp, & ! 3562 0.185_wp, 0.203_wp, 0.273_wp, 0.040_wp, & ! 4 561 563 0.038_wp, 0.075_wp, 0.075_wp, 0.110_wp, & 562 0.180_wp, 0.199_wp, 0.277_wp, 0.046_wp, & ! 4564 0.180_wp, 0.199_wp, 0.277_wp, 0.046_wp, & ! 5 563 565 0.035_wp, 0.069_wp, 0.069_wp, 0.105_wp, & 564 0.180_wp, 0.201_wp, 0.295_wp, 0.046_wp, & ! 5566 0.180_wp, 0.201_wp, 0.295_wp, 0.046_wp, & ! 6 565 567 0.035_wp, 0.072_wp, 0.072_wp, 0.105_wp, & 566 0.161_wp, 0.180_wp, 0.282_wp, 0.093_wp, & ! 6568 0.161_wp, 0.180_wp, 0.282_wp, 0.093_wp, & ! 7 567 569 0.040_wp, 0.077_wp, 0.077_wp, 0.112_wp, & 568 0.176_wp, 0.192_wp, 0.266_wp, 0.060_wp, & ! 7570 0.176_wp, 0.192_wp, 0.266_wp, 0.060_wp, & ! 8 569 571 0.142_wp, 0.286_wp, 0.286_wp, 0.286_wp, & 570 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 8572 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 9 571 573 0.068_wp, 0.134_wp, 0.134_wp, 0.177_wp, & 572 0.214_wp, 0.203_wp, 0.070_wp, 0.000_wp, & ! 9574 0.214_wp, 0.203_wp, 0.070_wp, 0.000_wp, & ! 10 573 575 0.035_wp, 0.068_wp, 0.068_wp, 0.108_wp, & 574 0.195_wp, 0.215_wp, 0.285_wp, 0.026_wp, & ! 1 0576 0.195_wp, 0.215_wp, 0.285_wp, 0.026_wp, & ! 11 575 577 0.025_wp, 0.048_wp, 0.048_wp, 0.078_wp, & 576 0.147_wp, 0.175_wp, 0.353_wp, 0.126_wp, & ! 1 1578 0.147_wp, 0.175_wp, 0.353_wp, 0.126_wp, & ! 12 577 579 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 578 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 1 2580 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 13 579 581 0.036_wp, 0.072_wp, 0.072_wp, 0.103_wp, & 580 0.163_wp, 0.180_wp, 0.273_wp, 0.074_wp, & ! 13 581 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 582 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 14 583 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 584 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 15 582 0.163_wp, 0.180_wp, 0.273_wp, 0.074_wp, & ! 14 583 0.032_wp, 0.066_wp, 0.066_wp, 0.100_wp, & 584 0.172_wp, 0.192_wp, 0.299_wp, 0.073_wp, & ! 15 585 585 0.032_wp, 0.066_wp, 0.066_wp, 0.100_wp, & 586 586 0.172_wp, 0.192_wp, 0.299_wp, 0.073_wp, & ! 16 587 0.032_wp, 0.066_wp, 0.066_wp, 0.100_wp, &588 0.172_wp, 0.192_wp, 0.299_wp, 0.073_wp, & ! 17589 587 0.028_wp, 0.055_wp, 0.055_wp, 0.087_wp, & 590 0.166_wp, 0.195_wp, 0.348_wp, 0.066_wp, & ! 1 8588 0.166_wp, 0.195_wp, 0.348_wp, 0.066_wp, & ! 17 591 589 0.028_wp, 0.055_wp, 0.055_wp, 0.087_wp, & 592 0.166_wp, 0.195_wp, 0.348_wp, 0.066_wp, & ! 19 593 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 594 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp & ! 20 595 /), (/ 8, 20 /) ) 590 0.166_wp, 0.195_wp, 0.348_wp, 0.066_wp & ! 18 591 /), (/ 8, 18 /) ) 596 592 597 593 … … 600 596 601 597 ! 602 !-- Soil parameters I alpha_vg, l_vg, n_vg, gamma_w_sat 603 REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & 604 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & ! 1 605 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & ! 2 606 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & ! 3 607 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & ! 4 608 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & ! 5 609 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & ! 6 610 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & ! 7 611 /), (/ 4, 7 /) ) 612 613 ! 614 !-- Soil parameters II m_sat, m_fc, m_wilt, m_res 615 REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & 616 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & ! 1 617 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & ! 2 618 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & ! 3 619 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & ! 4 620 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & ! 5 621 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & ! 6 622 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & ! 7 623 /), (/ 4, 7 /) ) 624 625 598 !-- Soil parameters alpha_vg, l_vg, n_vg, gamma_w_sat, m_sat, m_fc, m_wilt, m_res 599 REAL(wp), DIMENSION(0:7,1:6), PARAMETER :: soil_pars = RESHAPE( (/ & 600 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp,& ! 1 601 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp,& ! 2 602 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp,& ! 3 603 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp,& ! 4 604 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp,& ! 5 605 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp & ! 6 606 /), (/ 8, 6 /) ) 607 608 ! 609 !-- TO BE FILLED 610 !-- Pavement parameters depth, z0, z0h, lambda_h, rho_c 611 REAL(wp), DIMENSION(0:4,1:7), PARAMETER :: pavement_pars = RESHAPE( (/ & 612 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, & ! 1 613 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, & ! 2 614 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, & ! 3 615 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, & ! 4 616 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, & ! 5 617 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, & ! 6 618 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp & ! 7 619 /), (/ 5, 7 /) ) 620 621 ! 622 !-- TO BE FILLED 623 !-- Water parameters temperature, z0, z0h 624 REAL(wp), DIMENSION(0:2,1:4), PARAMETER :: water_pars = RESHAPE( (/ & 625 283.0_wp, 0.01_wp, 0.001_wp, & ! 1 626 283.0_wp, 0.01_wp, 0.001_wp, & ! 2 627 283.0_wp, 0.01_wp, 0.001_wp, & ! 3 628 283.0_wp, 10.01_wp, 0.001_wp & ! 4 629 /), (/ 3, 4 /) ) 630 626 631 SAVE 627 632 … … 637 642 lsm_header, lsm_init, lsm_init_arrays, lsm_parin, lsm_soil_model, & 638 643 lsm_swap_timelevel, lsm_read_restart_data, lsm_last_actions 639 ! 644 ! !vegetat 640 645 !-- Public parameters, constants and initial values 641 646 PUBLIC aero_resist_kray, skip_time_do_lsm … … 754 759 unit = 'K' 755 760 756 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'ghf _eb*', 'm_liq_eb*',&757 'qsws_ eb*', 'qsws_liq_eb*', 'qsws_soil_eb*', 'qsws_veg_eb*', &758 'r_a*', 'r_s*' , 'shf_eb*')761 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'ghf*', 'm_liq*',& 762 'qsws_liq*', 'qsws_soil*', 'qsws_veg*', & 763 'r_a*', 'r_s*' ) 759 764 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 760 765 message_string = 'illegal value for data_output: "' // & … … 783 788 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 784 789 ENDIF 785 IF ( TRIM( var ) == 'ghf _eb*' .AND. .NOT. land_surface ) THEN790 IF ( TRIM( var ) == 'ghf*' .AND. .NOT. land_surface ) THEN 786 791 message_string = 'output of "' // TRIM( var ) // '" requi' // & 787 792 'res land_surface = .TRUE.' 788 793 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 789 794 ENDIF 790 IF ( TRIM( var ) == 'm_liq _eb*' .AND. .NOT. land_surface ) THEN795 IF ( TRIM( var ) == 'm_liq*' .AND. .NOT. land_surface ) THEN 791 796 message_string = 'output of "' // TRIM( var ) // '" requi' // & 792 797 'res land_surface = .TRUE.' 793 798 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 794 799 ENDIF 795 IF ( TRIM( var ) == 'qsws_eb*' .AND. .NOT. land_surface ) THEN 796 message_string = 'output of "' // TRIM( var ) // '" requi' // & 797 'res land_surface = .TRUE.' 798 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 799 ENDIF 800 IF ( TRIM( var ) == 'qsws_liq_eb*' .AND. .NOT. land_surface ) & 800 IF ( TRIM( var ) == 'qsws_liq*' .AND. .NOT. land_surface ) & 801 801 THEN 802 802 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 804 804 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 805 805 ENDIF 806 IF ( TRIM( var ) == 'qsws_soil _eb*' .AND. .NOT. land_surface ) &806 IF ( TRIM( var ) == 'qsws_soil*' .AND. .NOT. land_surface ) & 807 807 THEN 808 808 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 810 810 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 811 811 ENDIF 812 IF ( TRIM( var ) == 'qsws_veg _eb*' .AND. .NOT. land_surface ) &812 IF ( TRIM( var ) == 'qsws_veg*' .AND. .NOT. land_surface ) & 813 813 THEN 814 814 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 833 833 IF ( TRIM( var ) == 'c_soil*') unit = 'none' 834 834 IF ( TRIM( var ) == 'c_veg*' ) unit = 'none' 835 IF ( TRIM( var ) == 'ghf_eb*') unit = 'W/m2' 836 IF ( TRIM( var ) == 'm_liq_eb*' ) unit = 'm' 837 IF ( TRIM( var ) == 'qsws_eb*' ) unit = 'W/m2' 838 IF ( TRIM( var ) == 'qsws_liq_eb*' ) unit = 'W/m2' 839 IF ( TRIM( var ) == 'qsws_soil_eb*' ) unit = 'W/m2' 840 IF ( TRIM( var ) == 'qsws_veg_eb*' ) unit = 'W/m2' 835 IF ( TRIM( var ) == 'ghf*') unit = 'W/m2' 836 IF ( TRIM( var ) == 'm_liq*' ) unit = 'm' 837 IF ( TRIM( var ) == 'qsws_liq*' ) unit = 'W/m2' 838 IF ( TRIM( var ) == 'qsws_soil*' ) unit = 'W/m2' 839 IF ( TRIM( var ) == 'qsws_veg*' ) unit = 'W/m2' 841 840 IF ( TRIM( var ) == 'r_a*') unit = 's/m' 842 841 IF ( TRIM( var ) == 'r_s*') unit = 's/m' 843 IF ( TRIM( var ) == 'shf_eb*') unit = 'W/m2'844 842 845 843 CASE DEFAULT … … 888 886 dopr_index(var_count) = 89 889 887 dopr_unit = 'K' 890 hom(0:nzs-1,2,89,:) = SPREAD( - zs , 2, statistic_regions+1 )888 hom(0:nzs-1,2,89,:) = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 ) 891 889 IF ( data_output_pr(var_count)(1:1) == '#' ) THEN 892 890 dopr_initial_index(var_count) = 90 893 hom(0:nzs-1,2,90,:) = SPREAD( - zs , 2, statistic_regions+1 )891 hom(0:nzs-1,2,90,:) = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 ) 894 892 data_output_pr(var_count) = data_output_pr(var_count)(2:) 895 893 ENDIF … … 906 904 dopr_index(var_count) = 91 907 905 dopr_unit = 'm3/m3' 908 hom(0:nzs-1,2,91,:) = SPREAD( - zs , 2, statistic_regions+1 )906 hom(0:nzs-1,2,91,:) = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 ) 909 907 IF ( data_output_pr(var_count)(1:1) == '#' ) THEN 910 908 dopr_initial_index(var_count) = 92 911 hom(0:nzs-1,2,92,:) = SPREAD( - zs , 2, statistic_regions+1 )909 hom(0:nzs-1,2,92,:) = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 ) 912 910 data_output_pr(var_count) = data_output_pr(var_count)(2:) 913 911 ENDIF … … 943 941 944 942 INTEGER(iwp) :: k !< running index, z-dimension 943 944 ! 945 !-- Check for a valid setting of surface_type. The default value is 'netcdf'. 946 !-- In that case, the surface types are read from NetCDF file 947 IF ( TRIM( surface_type ) /= 'vegetation' .AND. & 948 TRIM( surface_type ) /= 'pavement' .AND. & 949 TRIM( surface_type ) /= 'water' .AND. & 950 TRIM( surface_type ) /= 'netcdf' ) THEN 951 message_string = 'unknown surface type surface_type = "' // & 952 TRIM( surface_type ) // '"' 953 CALL message( 'check_parameters', 'PA0019', 1, 2, 0, 6, 0 ) 954 ENDIF 955 945 956 ! 946 957 !-- Dirichlet boundary conditions are required as the surface fluxes are … … 948 959 !-- model 949 960 IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN 950 message_string = 'lsm requires setting of'// &951 'bc_pt_b = "dirichlet" and '// &961 message_string = 'lsm requires setting of'// & 962 'bc_pt_b = "dirichlet" and '// & 952 963 'bc_q_b = "dirichlet"' 953 964 CALL message( 'check_parameters', 'PA0399', 1, 2, 0, 6, 0 ) … … 955 966 956 967 IF ( .NOT. constant_flux_layer ) THEN 957 message_string = 'lsm requires '// &968 message_string = 'lsm requires '// & 958 969 'constant_flux_layer = .T.' 959 970 CALL message( 'check_parameters', 'PA0400', 1, 2, 0, 6, 0 ) 960 971 ENDIF 961 972 962 IF ( ( veg_type == 14 .OR. veg_type == 15 ) .AND. & 963 most_method == 'lookup' ) THEN 964 WRITE( message_string, * ) 'veg_type = ', veg_type, ' is not ', & 965 'allowed in combination with ', & 966 'most_method = ', most_method 967 CALL message( 'check_parameters', 'PA0417', 1, 2, 0, 6, 0 ) 973 IF ( TRIM( surface_type ) == 'vegetation' ) THEN 974 975 IF ( vegetation_type == 0 ) THEN 976 IF ( min_canopy_resistance == 9999999.9_wp ) THEN 977 message_string = 'vegetation_type = 0 (user defined)'// & 978 'requires setting of min_canopy_resistance'// & 979 '/= 9999999.9' 980 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 981 ENDIF 982 983 IF ( leaf_area_index == 9999999.9_wp ) THEN 984 message_string = 'vegetation_type = 0 (user_defined)'// & 985 'requires setting of leaf_area_index'// & 986 '/= 9999999.9' 987 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 988 ENDIF 989 990 IF ( vegetation_coverage == 9999999.9_wp ) THEN 991 message_string = 'vegetation_type = 0 (user_defined)'// & 992 'requires setting of vegetation_coverage'// & 993 '/= 9999999.9' 994 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 995 ENDIF 996 997 IF ( canopy_resistance_coefficient == 9999999.9_wp) THEN 998 message_string = 'vegetation_type = 0 (user_defined)'// & 999 'requires setting of'// & 1000 'canopy_resistance_coefficient /= 9999999.9' 1001 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1002 ENDIF 1003 1004 IF ( lambda_surface_stable == 9999999.9_wp ) THEN 1005 message_string = 'vegetation_type = 0 (user_defined)'// & 1006 'requires setting of lambda_surface_stable'// & 1007 '/= 9999999.9' 1008 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1009 ENDIF 1010 1011 IF ( lambda_surface_unstable == 9999999.9_wp ) THEN 1012 message_string = 'vegetation_type = 0 (user_defined)'// & 1013 'requires setting of lambda_surface_unstable'// & 1014 '/= 9999999.9' 1015 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1016 ENDIF 1017 1018 IF ( f_shortwave_incoming == 9999999.9_wp ) THEN 1019 message_string = 'vegetation_type = 0 (user_defined)'// & 1020 'requires setting of f_shortwave_incoming'// & 1021 '/= 9999999.9' 1022 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1023 ENDIF 1024 1025 IF ( z0_vegetation == 9999999.9_wp ) THEN 1026 message_string = 'vegetation_type = 0 (user_defined)'// & 1027 'requires setting of z0_vegetation'// & 1028 '/= 9999999.9' 1029 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1030 ENDIF 1031 1032 IF ( z0h_vegetation == 9999999.9_wp ) THEN 1033 message_string = 'vegetation_type = 0 (user_defined)'// & 1034 'requires setting of z0h_vegetation'// & 1035 '/= 9999999.9' 1036 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1037 ENDIF 1038 ENDIF 1039 968 1040 ENDIF 969 970 IF ( veg_type == 0 ) THEN 971 IF ( min_canopy_resistance == 9999999.9_wp ) THEN 972 message_string = 'veg_type = 0 (user defined)'// & 973 'requires setting of min_canopy_resistance'// & 974 '/= 9999999.9' 975 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 976 ENDIF 977 978 IF ( leaf_area_index == 9999999.9_wp ) THEN 979 message_string = 'veg_type = 0 (user_defined)'// & 980 'requires setting of leaf_area_index'// & 981 '/= 9999999.9' 982 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 983 ENDIF 984 985 IF ( vegetation_coverage == 9999999.9_wp ) THEN 986 message_string = 'veg_type = 0 (user_defined)'// & 987 'requires setting of vegetation_coverage'// & 988 '/= 9999999.9' 989 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 990 ENDIF 991 992 IF ( canopy_resistance_coefficient == 9999999.9_wp) THEN 993 message_string = 'veg_type = 0 (user_defined)'// & 994 'requires setting of'// & 995 'canopy_resistance_coefficient /= 9999999.9' 996 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 997 ENDIF 998 999 IF ( lambda_surface_stable == 9999999.9_wp ) THEN 1000 message_string = 'veg_type = 0 (user_defined)'// & 1001 'requires setting of lambda_surface_stable'// & 1002 '/= 9999999.9' 1003 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1004 ENDIF 1005 1006 IF ( lambda_surface_unstable == 9999999.9_wp ) THEN 1007 message_string = 'veg_type = 0 (user_defined)'// & 1008 'requires setting of lambda_surface_unstable'// & 1009 '/= 9999999.9' 1010 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1011 ENDIF 1012 1013 IF ( f_shortwave_incoming == 9999999.9_wp ) THEN 1014 message_string = 'veg_type = 0 (user_defined)'// & 1015 'requires setting of f_shortwave_incoming'// & 1016 '/= 9999999.9' 1017 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1018 ENDIF 1019 1020 IF ( z0_eb == 9999999.9_wp ) THEN 1021 message_string = 'veg_type = 0 (user_defined)'// & 1022 'requires setting of z0_eb'// & 1023 '/= 9999999.9' 1024 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1025 ENDIF 1026 1027 IF ( z0h_eb == 9999999.9_wp ) THEN 1028 message_string = 'veg_type = 0 (user_defined)'// & 1029 'requires setting of z0h_eb'// & 1030 '/= 9999999.9' 1031 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1032 ENDIF 1033 1034 1041 1042 IF ( TRIM( surface_type ) == 'water' ) THEN 1043 1044 IF ( TRIM( most_method ) == 'lookup' ) THEN 1045 WRITE( message_string, * ) 'surface_type = ', surface_type, & 1046 ' is not allowed in combination with ', & 1047 'most_method = ', most_method 1048 CALL message( 'check_parameters', 'PA0417', 1, 2, 0, 6, 0 ) 1049 ENDIF 1050 1051 IF ( water_type == 0 ) THEN 1052 1053 IF ( z0_water == 9999999.9_wp ) THEN 1054 message_string = 'water_type = 0 (user_defined)'// & 1055 'requires setting of z0_water'// & 1056 '/= 9999999.9' 1057 CALL message( 'check_parameters', 'PA0415', 1, 2, 0, 6, 0 ) 1058 ENDIF 1059 1060 IF ( z0h_water == 9999999.9_wp ) THEN 1061 message_string = 'water_type = 0 (user_defined)'// & 1062 'requires setting of z0h_water'// & 1063 '/= 9999999.9' 1064 CALL message( 'check_parameters', 'PA0392', 1, 2, 0, 6, 0 ) 1065 ENDIF 1066 1067 IF ( water_temperature == 9999999.9_wp ) THEN 1068 message_string = 'water_type = 0 (user_defined)'// & 1069 'requires setting of water_temperature'// & 1070 '/= 9999999.9' 1071 CALL message( 'check_parameters', 'PA0379', 1, 2, 0, 6, 0 ) 1072 ENDIF 1073 1074 ENDIF 1075 1035 1076 ENDIF 1036 1077 1078 1079 1080 IF ( TRIM( surface_type ) == 'pavement' ) THEN 1081 1082 IF ( pavement_type == 0 ) THEN 1083 1084 IF ( z0_pavement == 9999999.9_wp ) THEN 1085 message_string = 'pavement_type = 0 (user_defined)'// & 1086 'requires setting of z0_pavement'// & 1087 '/= 9999999.9' 1088 CALL message( 'check_parameters', 'PA0352', 1, 2, 0, 6, 0 ) 1089 ENDIF 1090 1091 IF ( z0h_pavement == 9999999.9_wp ) THEN 1092 message_string = 'pavement_type = 0 (user_defined)'// & 1093 'requires setting of z0h_pavement'// & 1094 '/= 9999999.9' 1095 CALL message( 'check_parameters', 'PA0353', 1, 2, 0, 6, 0 ) 1096 ENDIF 1097 1098 IF ( pavement_depth == 9999999.9_wp ) THEN 1099 message_string = 'pavement_type = 0 (user_defined)'// & 1100 'requires setting of pavement_depth'// & 1101 '/= 9999999.9' 1102 CALL message( 'check_parameters', 'PA0341', 1, 2, 0, 6, 0 ) 1103 ENDIF 1104 1105 IF ( pavement_heat_conduct == 9999999.9_wp ) THEN 1106 message_string = 'pavement_type = 0 (user_defined)'// & 1107 'requires setting of pavement_heat_conduct'// & 1108 '/= 9999999.9' 1109 CALL message( 'check_parameters', 'PA0342', 1, 2, 0, 6, 0 ) 1110 ENDIF 1111 1112 IF ( pavement_heat_capacity == 9999999.9_wp ) THEN 1113 message_string = 'pavement_type = 0 (user_defined)'// & 1114 'requires setting of pavement_heat_capacity'// & 1115 '/= 9999999.9' 1116 CALL message( 'check_parameters', 'PA0139', 1, 2, 0, 6, 0 ) 1117 ENDIF 1118 1119 ENDIF 1120 1121 ENDIF 1122 1037 1123 IF ( soil_type == 0 ) THEN 1038 1124 … … 1094 1180 1095 1181 ENDIF 1096 !1097 !-- Check for proper setting of soil moisture, must not be larger than its1098 !-- saturation value.1099 DO k = nzb_soil, nzt_soil1100 IF ( soil_moisture(k) > m_soil_pars(0,soil_type) ) THEN1101 message_string = 'soil_moisture must not exceed its saturation' // &1102 ' value'1103 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )1104 ENDIF1105 ENDDO1106 1107 IF ( .NOT. radiation ) THEN1108 message_string = 'lsm requires '// &1109 'radiation = .T.'1110 CALL message( 'check_parameters', 'PA0400', 1, 2, 0, 6, 0 )1111 ENDIF1112 1113 1114 1182 1115 1183 ! … … 1117 1185 !-- root fraction is prescribed 1118 1186 nzb_soil = 0 1119 nzt_soil = 01187 nzt_soil = -1 1120 1188 IF ( ALL( zs == 9999999.9_wp ) ) THEN 1121 1189 nzt_soil = 7 … … 1136 1204 ENDIF 1137 1205 1138 IF ( veg _type == 0 ) THEN1206 IF ( vegetation_type == 0 ) THEN 1139 1207 IF ( SUM( root_fraction(nzb_soil:nzt_soil) ) /= 1.0_wp ) THEN 1140 message_string = 'veg _type = 0 (user_defined)'//&1141 'requires setting of root_fraction'// &1208 message_string = 'vegetation_type = 0 (user_defined)'// & 1209 'requires setting of root_fraction'// & 1142 1210 '/= 9999999.9 and SUM(root_fraction) = 1' 1143 1211 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1144 1212 ENDIF 1145 ENDIF 1213 ENDIF 1146 1214 1215 1216 ! 1217 !-- Check for proper setting of soil moisture, must not be larger than its 1218 !-- saturation value. 1219 DO k = nzb_soil, nzt_soil 1220 IF ( soil_moisture(k) > soil_pars(4,soil_type) ) THEN 1221 message_string = 'soil_moisture must not exceed its saturation' // & 1222 ' value' 1223 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) 1224 ENDIF 1225 ENDDO 1147 1226 1148 1227 END SUBROUTINE lsm_check_parameters … … 1155 1234 SUBROUTINE lsm_energy_balance( horizontal, l ) 1156 1235 1236 1237 USE pegrid 1157 1238 1158 1239 IMPLICIT NONE … … 1183 1264 coef_1, & !< coef. for prognostic equation 1184 1265 coef_2, & !< coef. for prognostic equation 1185 f_qsws, & !< factor for qsws _eb1186 f_qsws_veg, & !< factor for qsws_veg _eb1187 f_qsws_soil, & !< factor for qsws_soil _eb1188 f_qsws_liq, & !< factor for qsws_liq _eb1189 f_shf, & !< factor for shf _eb1190 lambda_surface, & !< Current value of lambda_surface 1191 m_liq_ eb_max, & !< maxmimum value of the liq. water reservoir1266 f_qsws, & !< factor for qsws 1267 f_qsws_veg, & !< factor for qsws_veg 1268 f_qsws_soil, & !< factor for qsws_soil 1269 f_qsws_liq, & !< factor for qsws_liq 1270 f_shf, & !< factor for shf 1271 lambda_surface, & !< Current value of lambda_surface (W/m2/K) 1272 m_liq_max, & !< maxmimum value of the liq. water reservoir 1192 1273 pt1, & !< potential temperature at first grid level 1193 1274 qv1 !< specific humidity at first grid level … … 1196 1277 TYPE(surf_type_lsm), POINTER :: surf_t_surface_p 1197 1278 TYPE(surf_type_lsm), POINTER :: surf_tt_surface_m 1198 TYPE(surf_type_lsm), POINTER :: surf_m_liq _eb1199 TYPE(surf_type_lsm), POINTER :: surf_m_liq_ eb_p1200 TYPE(surf_type_lsm), POINTER :: surf_tm_liq_ eb_m1279 TYPE(surf_type_lsm), POINTER :: surf_m_liq 1280 TYPE(surf_type_lsm), POINTER :: surf_m_liq_p 1281 TYPE(surf_type_lsm), POINTER :: surf_tm_liq_m 1201 1282 1202 1283 TYPE(surf_type_lsm), POINTER :: surf_m_soil … … 1211 1292 surf_t_surface_p => t_surface_h_p 1212 1293 surf_tt_surface_m => tt_surface_h_m 1213 surf_m_liq _eb => m_liq_eb_h1214 surf_m_liq_ eb_p => m_liq_eb_h_p1215 surf_tm_liq_ eb_m => tm_liq_eb_h_m1294 surf_m_liq => m_liq_h 1295 surf_m_liq_p => m_liq_h_p 1296 surf_tm_liq_m => tm_liq_h_m 1216 1297 surf_m_soil => m_soil_h 1217 1298 surf_t_soil => t_soil_h … … 1226 1307 surf_t_surface_p => t_surface_v_p(l) 1227 1308 surf_tt_surface_m => tt_surface_v_m(l) 1228 surf_m_liq _eb => m_liq_eb_v(l)1229 surf_m_liq_ eb_p => m_liq_eb_v_p(l)1230 surf_tm_liq_ eb_m => tm_liq_eb_v_m(l)1309 surf_m_liq => m_liq_v(l) 1310 surf_m_liq_p => m_liq_v_p(l) 1311 surf_tm_liq_m => tm_liq_v_m(l) 1231 1312 surf_m_soil => m_soil_v(l) 1232 1313 surf_t_soil => t_soil_v(l) … … 1263 1344 !-- radiation can be obtained at respective height level 1264 1345 k_rad = MERGE( 0, k + k_off, radiation_scheme /= 'rrtmg' ) 1265 ! 1266 !-- Set lambda_surface according to stratification between skin layer and soil 1267 IF ( .NOT. surf%pave_surface(m) ) THEN 1268 1269 c_surface_tmp = c_surface 1270 1271 IF ( surf_t_surface%var_1d(m) >= surf_t_soil%var_2d(nzb_soil,m)) THEN 1272 lambda_surface = surf%lambda_surface_s(m) 1273 ELSE 1274 lambda_surface = surf%lambda_surface_u(m) 1275 ENDIF 1346 1347 ! 1348 !-- Define heat conductivity between surface and soil depending on surface 1349 !-- type. For vegetation, a skin layer parameterization is used. For bare 1350 !-- soil and pavements, no skin layer is applied. In these cases, the 1351 !-- temperature is assumed to be constant between the surface and the first 1352 !-- soil layer. The heat conductivity is then derived from the soil/ 1353 !-- pavement properties. For water surfaces, the conductivity is already set 1354 !-- to 1E10. 1355 !-- Moreover, the heat capacity is set. For bare soil the heat capacity is 1356 !-- the capacity of the uppermost soil layer 1357 IF ( surf%lambda_surface_s(m) == 0.0_wp ) THEN 1358 1359 lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat(nzb_soil,m)) * & 1360 lambda_h_water ** surf_m_soil%var_2d(nzb_soil,m) 1361 1362 ke = 1.0_wp + LOG10( MAX( 0.1_wp, surf_m_soil%var_2d(nzb_soil,m) / & 1363 surf%m_sat(nzb_soil,m) ) ) 1364 1365 lambda_surface = (ke * (lambda_h_sat - lambda_h_dry) + lambda_h_dry )& 1366 * ddz_soil_layer(nzb_soil) * 2.0_wp 1367 1368 c_surface_tmp = (rho_c_soil * ( 1.0_wp - surf%m_sat(nzb_soil,m) ) & 1369 + rho_c_water * surf_m_soil%var_2d(nzb_soil,m) ) & 1370 * dz_soil_layer(nzb_soil) * 0.25_wp 1371 1372 ELSEIF ( surf_t_surface%var_1d(m) >= surf_t_soil%var_2d(nzb_soil,m)) & 1373 THEN 1374 1375 lambda_surface = surf%lambda_surface_s(m) 1376 c_surface_tmp = surf%c_surface(m) 1377 1276 1378 ELSE 1277 1379 1278 c_surface_tmp = pave_heat_capacity * dz_soil(nzb_soil) * 0.5_wp1279 lambda_surface = pave_heat_conductivity * ddz_soil(nzb_soil)1280 1380 lambda_surface = surf%lambda_surface_u(m) 1381 c_surface_tmp = surf%c_surface(m) 1382 1281 1383 ENDIF 1282 1384 … … 1333 1435 DO ks = nzb_soil, nzt_soil 1334 1436 m_total = m_total + surf%root_fr(ks,m) & 1335 * MAX( surf_m_soil%var_2d(ks,m), surf%m_wilt( m) )1437 * MAX( surf_m_soil%var_2d(ks,m), surf%m_wilt(ks,m) ) 1336 1438 ENDDO 1337 1439 1338 IF ( m_total > surf%m_wilt(m) .AND. & 1339 m_total < surf%m_fc(m) ) THEN 1340 f2 = ( m_total - surf%m_wilt(m) ) / & 1341 ( surf%m_fc(m) - surf%m_wilt(m) ) 1342 ELSEIF ( m_total >= surf%m_fc(m) ) THEN 1440 ! 1441 !-- The calculation of f2 is based on only one wilting point value for all 1442 !-- soil layers. The value at k=nzb_soil is used here as a proxy but might 1443 !-- need refinement in the future. 1444 IF ( m_total > surf%m_wilt(nzb_soil,m) .AND. & 1445 m_total < surf%m_fc(nzb_soil,m) ) THEN 1446 f2 = ( m_total - surf%m_wilt(nzb_soil,m) ) / & 1447 ( surf%m_fc(nzb_soil,m) - surf%m_wilt(nzb_soil,m) ) 1448 ELSEIF ( m_total >= surf%m_fc(nzb_soil,m) ) THEN 1343 1449 f2 = 1.0_wp 1344 1450 ELSE … … 1366 1472 ( surf%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) 1367 1473 ! 1368 !-- Third step: calculate bare soil resistance r_soil. The Clapp & 1369 !-- Hornberger parametrization does not consider c_veg. 1370 IF ( surf%soil_type_2d(m) /= 7 ) THEN 1371 m_min = surf%c_veg(m) * surf%m_wilt(m) + & 1372 ( 1.0_wp - surf%c_veg(m) ) * surf%m_res(m) 1373 ELSE 1374 m_min = surf%m_wilt(m) 1375 ENDIF 1376 1377 f2 = ( surf_m_soil%var_2d(nzb_soil,m) - m_min ) / ( surf%m_fc(m) - m_min ) 1474 !-- Third step: calculate bare soil resistance r_soil. 1475 m_min = surf%c_veg(m) * surf%m_wilt(nzb_soil,m) + & 1476 ( 1.0_wp - surf%c_veg(m) ) * surf%m_res(nzb_soil,m) 1477 1478 1479 f2 = ( surf_m_soil%var_2d(nzb_soil,m) - m_min ) / ( surf%m_fc(nzb_soil,m) - m_min ) 1378 1480 f2 = MAX( f2, 1.0E-20_wp ) 1379 1481 f2 = MIN( f2, 1.0_wp ) 1380 1482 1381 1483 surf%r_soil(m) = surf%r_soil_min(m) / f2 1382 1484 1383 1485 ! 1384 1486 !-- Calculate the maximum possible liquid water amount on plants and … … 1388 1490 !-- Noilhan & Planton (1989), while the ECMWF formulation is used for 1389 1491 !-- vegetated surfaces and bare soils. 1390 IF ( surf%pave _surface(m) ) THEN1391 m_liq_ eb_max = m_max_depth * 5.0_wp1392 surf%c_liq(m) = MIN( 1.0_wp, ( surf_m_liq _eb%var_1d(m) / m_liq_eb_max)**0.67 )1492 IF ( surf%pavement_surface(m) ) THEN 1493 m_liq_max = m_max_depth * 5.0_wp 1494 surf%c_liq(m) = MIN( 1.0_wp, ( surf_m_liq%var_1d(m) / m_liq_max)**0.67 ) 1393 1495 ELSE 1394 m_liq_ eb_max = m_max_depth * ( surf%c_veg(m) * surf%lai(m)&1395 1396 surf%c_liq(m) = MIN( 1.0_wp, surf_m_liq _eb%var_1d(m) / m_liq_eb_max )1496 m_liq_max = m_max_depth * ( surf%c_veg(m) * surf%lai(m) & 1497 + ( 1.0_wp - surf%c_veg(m) ) ) 1498 surf%c_liq(m) = MIN( 1.0_wp, surf_m_liq%var_1d(m) / m_liq_max ) 1397 1499 ENDIF 1398 1500 ! … … 1415 1517 f_qsws_soil = 0.0_wp 1416 1518 f_qsws_liq = rho_lv / surf%r_a(m) 1417 ELSEIF ( surf%pave _surface (m) ) THEN1519 ELSEIF ( surf%pavement_surface (m) ) THEN 1418 1520 f_qsws_veg = 0.0_wp 1419 1521 f_qsws_soil = 0.0_wp … … 1428 1530 surf%r_a(m) 1429 1531 ENDIF 1430 !1431 !-- If soil moisture is below wilting point, plants do no longer1432 !-- transpirate.1433 ! IF ( m_soil(k,j,i) < m_wilt(j,i) ) THEN1434 ! f_qsws_veg = 0.0_wp1435 ! ENDIF1436 1532 1437 1533 f_shf = rho_cp / surf%r_a(m) … … 1535 1631 ( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) ) 1536 1632 1537 surf%ghf _eb(m) = lambda_surface * ( surf_t_surface_p%var_1d(m) &1633 surf%ghf(m) = lambda_surface * ( surf_t_surface_p%var_1d(m) & 1538 1634 - surf_t_soil%var_2d(nzb_soil,m) ) 1539 1635 1540 surf%shf_eb(m) = - f_shf * ( pt1 - surf%pt_surface(m) ) 1541 1542 surf%shf(m) = surf%shf_eb(m) / rho_cp 1636 surf%shf(m) = - f_shf * ( pt1 - surf%pt_surface(m) ) / cp 1637 1543 1638 1544 1639 IF ( humidity ) THEN 1545 surf%qsws _eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt &1640 surf%qsws(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & 1546 1641 * surf_t_surface%var_1d(m) - dq_s_dt * & 1547 1642 surf_t_surface_p%var_1d(m) ) 1548 1643 1549 surf%qsws(m) = surf%qsws_eb(m) / rho_lv 1550 1551 surf%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & 1644 surf%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & 1552 1645 + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt & 1553 1646 * surf_t_surface_p%var_1d(m) ) 1554 1647 1555 surf%qsws_soil _eb(m) = - f_qsws_soil * ( qv1 - q_s &1648 surf%qsws_soil(m) = - f_qsws_soil * ( qv1 - q_s & 1556 1649 + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt & 1557 1650 * surf_t_surface_p%var_1d(m) ) 1558 1651 1559 surf%qsws_liq _eb(m) = - f_qsws_liq * ( qv1 - q_s &1652 surf%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & 1560 1653 + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt & 1561 1654 * surf_t_surface_p%var_1d(m) ) … … 1564 1657 ! 1565 1658 !-- Calculate the true surface resistance 1566 IF ( surf%qsws_eb(m) == 0.0_wp) THEN1659 IF ( .NOT. humidity ) THEN 1567 1660 surf%r_s(m) = 1.0E10_wp 1568 1661 ELSE … … 1570 1663 * surf_t_surface%var_1d(m) - dq_s_dt * & 1571 1664 surf_t_surface_p%var_1d(m) ) / & 1572 surf%qsws _eb(m) - surf%r_a(m)1665 surf%qsws(m) - surf%r_a(m) 1573 1666 ENDIF 1574 1667 … … 1578 1671 IF ( humidity ) THEN 1579 1672 ! 1580 !-- If precipitation is activated, add rain water to qsws_liq _eb1581 !-- and qsws_soil _ebaccording the the vegetation coverage.1673 !-- If precipitation is activated, add rain water to qsws_liq 1674 !-- and qsws_soil according the the vegetation coverage. 1582 1675 !-- precipitation_rate is given in mm. 1583 1676 IF ( precipitation ) THEN … … 1587 1680 !-- Otherwise, add the water to soil. In case of 1588 1681 !-- pavements, the exceeding water amount is implicitely removed 1589 !-- as runoff as qsws_soil _ebis then not used in the soil model1590 IF ( surf_m_liq _eb%var_1d(m) /= m_liq_eb_max ) THEN1591 surf%qsws_liq _eb(m) = surf%qsws_liq_eb(m) &1682 !-- as runoff as qsws_soil is then not used in the soil model 1683 IF ( surf_m_liq%var_1d(m) /= m_liq_max ) THEN 1684 surf%qsws_liq(m) = surf%qsws_liq(m) & 1592 1685 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)& 1593 1686 * hyrho(k+k_off) & 1594 1687 * 0.001_wp * rho_l * l_v 1595 1688 ELSE 1596 surf%qsws_soil _eb(m) = surf%qsws_soil_eb(m) &1689 surf%qsws_soil(m) = surf%qsws_soil(m) & 1597 1690 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)& 1598 1691 * hyrho(k+k_off) & … … 1602 1695 !-- Add precipitation to bare soil according to the bare soil 1603 1696 !-- coverage. 1604 surf%qsws_soil _eb(m) = surf%qsws_soil_eb(m) + ( 1.0_wp &1697 surf%qsws_soil(m) = surf%qsws_soil(m) + ( 1.0_wp & 1605 1698 - surf%c_veg(m) ) * prr(k+k_off,j+j_off,i+i_off)& 1606 1699 * hyrho(k+k_off) & … … 1610 1703 ! 1611 1704 !-- If the air is saturated, check the reservoir water level 1612 IF ( surf%qsws _eb(m) < 0.0_wp ) THEN1613 ! 1614 !-- Check if reservoir is full (avoid values > m_liq_ eb_max)1615 !-- In that case, qsws_liq _eb goes to qsws_soil_eb. In this1616 !-- case qsws_veg _ebis zero anyway (because c_liq = 1),1705 IF ( surf%qsws(m) < 0.0_wp ) THEN 1706 ! 1707 !-- Check if reservoir is full (avoid values > m_liq_max) 1708 !-- In that case, qsws_liq goes to qsws_soil. In this 1709 !-- case qsws_veg is zero anyway (because c_liq = 1), 1617 1710 !-- so that tend is zero and no further check is needed 1618 IF ( surf_m_liq _eb%var_1d(m) == m_liq_eb_max ) THEN1619 surf%qsws_soil _eb(m) = surf%qsws_soil_eb(m) + surf%qsws_liq_eb(m)1620 1621 surf%qsws_liq _eb(m) = 0.0_wp1711 IF ( surf_m_liq%var_1d(m) == m_liq_max ) THEN 1712 surf%qsws_soil(m) = surf%qsws_soil(m) + surf%qsws_liq(m) 1713 1714 surf%qsws_liq(m) = 0.0_wp 1622 1715 ENDIF 1623 1716 1624 1717 ! 1625 !-- In case qsws_veg _ebbecomes negative (unphysical behavior),1718 !-- In case qsws_veg becomes negative (unphysical behavior), 1626 1719 !-- let the water enter the liquid water reservoir as dew on the 1627 1720 !-- plant 1628 IF ( surf%qsws_veg _eb(m) < 0.0_wp ) THEN1629 surf%qsws_liq _eb(m) = surf%qsws_liq_eb(m) + surf%qsws_veg_eb(m)1630 surf%qsws_veg _eb(m) = 0.0_wp1721 IF ( surf%qsws_veg(m) < 0.0_wp ) THEN 1722 surf%qsws_liq(m) = surf%qsws_liq(m) + surf%qsws_veg(m) 1723 surf%qsws_veg(m) = 0.0_wp 1631 1724 ENDIF 1632 1725 ENDIF 1633 1726 1634 tend = - surf%qsws_liq_eb(m) * drho_l_lv 1635 surf_m_liq_eb_p%var_1d(m) = surf_m_liq_eb%var_1d(m) + dt_3d * & 1727 surf%qsws(m) = surf%qsws(m) / l_v 1728 1729 tend = - surf%qsws_liq(m) * drho_l_lv 1730 surf_m_liq_p%var_1d(m) = surf_m_liq%var_1d(m) + dt_3d * & 1636 1731 ( tsc(2) * tend + & 1637 tsc(3) * surf_tm_liq_ eb_m%var_1d(m) )1732 tsc(3) * surf_tm_liq_m%var_1d(m) ) 1638 1733 ! 1639 1734 !-- Check if reservoir is overfull -> reduce to maximum 1640 1735 !-- (conservation of water is violated here) 1641 surf_m_liq_ eb_p%var_1d(m) = MIN( surf_m_liq_eb_p%var_1d(m),m_liq_eb_max )1736 surf_m_liq_p%var_1d(m) = MIN( surf_m_liq_p%var_1d(m),m_liq_max ) 1642 1737 1643 1738 ! 1644 1739 !-- Check if reservoir is empty (avoid values < 0.0) 1645 1740 !-- (conservation of water is violated here) 1646 surf_m_liq_ eb_p%var_1d(m) = MAX( surf_m_liq_eb_p%var_1d(m), 0.0_wp )1647 ! 1648 !-- Calculate m_liq _ebtendencies for the next Runge-Kutta step1741 surf_m_liq_p%var_1d(m) = MAX( surf_m_liq_p%var_1d(m), 0.0_wp ) 1742 ! 1743 !-- Calculate m_liq tendencies for the next Runge-Kutta step 1649 1744 IF ( timestep_scheme(1:5) == 'runge' ) THEN 1650 1745 IF ( intermediate_timestep_count == 1 ) THEN 1651 surf_tm_liq_ eb_m%var_1d(m) = tend1746 surf_tm_liq_m%var_1d(m) = tend 1652 1747 ELSEIF ( intermediate_timestep_count < & 1653 1748 intermediate_timestep_count_max ) THEN 1654 surf_tm_liq_ eb_m%var_1d(m) = -9.5625_wp * tend + &1655 5.3125_wp * surf_tm_liq_ eb_m%var_1d(m)1749 surf_tm_liq_m%var_1d(m) = -9.5625_wp * tend + & 1750 5.3125_wp * surf_tm_liq_m%var_1d(m) 1656 1751 ENDIF 1657 1752 ENDIF … … 1684 1779 ! 1685 1780 !-- Calculate new roughness lengths (for water surfaces only) 1686 IF ( horizontal ) CALL calc_z0_water_surface1781 IF ( horizontal .AND. .NOT. constant_roughness ) CALL calc_z0_water_surface 1687 1782 1688 1783 CONTAINS … … 1799 1894 ENDIF 1800 1895 1801 WRITE( io, 4 ) TRIM( veg _type_name(veg_type) ),&1896 WRITE( io, 4 ) TRIM( vegetation_type_name(vegetation_type) ), & 1802 1897 TRIM (soil_type_name(soil_type) ) 1803 1898 WRITE( io, 5 ) TRIM( soil_depth_chr ), TRIM( t_soil_chr ), & … … 1829 1924 SUBROUTINE lsm_init 1830 1925 1831 1926 USE control_parameters, & 1927 ONLY: message_string 1928 1832 1929 IMPLICIT NONE 1833 1930 … … 1864 1961 tt_soil_h_m%var_2d = 0.0_wp 1865 1962 tm_soil_h_m%var_2d = 0.0_wp 1866 tm_liq_ eb_h_m%var_1d = 0.0_wp1963 tm_liq_h_m%var_1d = 0.0_wp 1867 1964 surf_lsm_h%c_liq = 0.0_wp 1868 1965 1869 surf_lsm_h%ghf_eb = 0.0_wp 1870 surf_lsm_h%shf_eb = rho_cp * surf_lsm_h%shf 1871 1872 IF ( humidity ) THEN 1873 surf_lsm_h%qsws_eb = rho_lv * surf_lsm_h%qsws 1874 ELSE 1875 surf_lsm_h%qsws_eb = 0.0_wp 1876 ENDIF 1877 1878 surf_lsm_h%qsws_liq_eb = 0.0_wp 1879 surf_lsm_h%qsws_soil_eb = 0.0_wp 1880 surf_lsm_h%qsws_veg_eb = 0.0_wp 1966 surf_lsm_h%ghf = 0.0_wp 1967 1968 surf_lsm_h%qsws_liq = 0.0_wp 1969 surf_lsm_h%qsws_soil = 0.0_wp 1970 surf_lsm_h%qsws_veg = 0.0_wp 1881 1971 1882 1972 surf_lsm_h%r_a = 50.0_wp … … 1890 1980 tt_soil_v_m(l)%var_2d = 0.0_wp 1891 1981 tm_soil_v_m(l)%var_2d = 0.0_wp 1892 tm_liq_ eb_v_m(l)%var_1d = 0.0_wp1982 tm_liq_v_m(l)%var_1d = 0.0_wp 1893 1983 surf_lsm_v(l)%c_liq = 0.0_wp 1894 1984 1895 surf_lsm_v(l)%ghf_eb = 0.0_wp 1896 surf_lsm_v(l)%shf_eb = rho_cp * surf_lsm_v(l)%shf 1897 1898 IF ( humidity ) THEN 1899 surf_lsm_v(l)%qsws_eb = rho_lv * surf_lsm_v(l)%qsws 1900 ELSE 1901 surf_lsm_v(l)%qsws_eb = 0.0_wp 1902 ENDIF 1903 1904 surf_lsm_v(l)%qsws_liq_eb = 0.0_wp 1905 surf_lsm_v(l)%qsws_soil_eb = 0.0_wp 1906 surf_lsm_v(l)%qsws_veg_eb = 0.0_wp 1985 surf_lsm_v(l)%ghf = 0.0_wp 1986 1987 surf_lsm_v(l)%qsws_liq = 0.0_wp 1988 surf_lsm_v(l)%qsws_soil = 0.0_wp 1989 surf_lsm_v(l)%qsws_veg = 0.0_wp 1907 1990 1908 1991 surf_lsm_v(l)%r_a = 50.0_wp … … 1911 1994 surf_lsm_v(l)%r_soil = 0.0_wp 1912 1995 ENDDO 1913 1914 1996 1915 1997 ! 1916 1998 !-- Allocate 3D soil model arrays 1917 1999 !-- First, for horizontal surfaces 2000 ALLOCATE ( surf_lsm_h%alpha_vg(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2001 ALLOCATE ( surf_lsm_h%gamma_w_sat(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2002 ALLOCATE ( surf_lsm_h%lambda_h(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2003 ALLOCATE ( surf_lsm_h%l_vg(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2004 ALLOCATE ( surf_lsm_h%m_fc(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2005 ALLOCATE ( surf_lsm_h%m_res(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2006 ALLOCATE ( surf_lsm_h%m_sat(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2007 ALLOCATE ( surf_lsm_h%m_wilt(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2008 ALLOCATE ( surf_lsm_h%n_vg(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 2009 ALLOCATE ( surf_lsm_h%rho_c_total(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 1918 2010 ALLOCATE ( surf_lsm_h%root_fr(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 1919 ALLOCATE ( surf_lsm_h%lambda_h(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 1920 ALLOCATE ( surf_lsm_h%rho_c_total(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) 1921 1922 surf_lsm_h%lambda_h = 0.0_wp 2011 2012 surf_lsm_h%lambda_h = 0.0_wp 1923 2013 ! 1924 2014 !-- If required, allocate humidity-related variables for the soil model … … 1932 2022 !-- For vertical surfaces 1933 2023 DO l = 0, 3 2024 ALLOCATE ( surf_lsm_v(l)%alpha_vg(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2025 ALLOCATE ( surf_lsm_v(l)%gamma_w_sat(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2026 ALLOCATE ( surf_lsm_v(l)%lambda_h(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2027 ALLOCATE ( surf_lsm_v(l)%l_vg(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2028 ALLOCATE ( surf_lsm_v(l)%m_fc(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2029 ALLOCATE ( surf_lsm_v(l)%m_res(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2030 ALLOCATE ( surf_lsm_v(l)%m_sat(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2031 ALLOCATE ( surf_lsm_v(l)%m_wilt(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2032 ALLOCATE ( surf_lsm_v(l)%n_vg(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 2033 ALLOCATE ( surf_lsm_v(l)%rho_c_total(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 1934 2034 ALLOCATE ( surf_lsm_v(l)%root_fr(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 1935 ALLOCATE ( surf_lsm_v(l)%lambda_h(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 1936 ALLOCATE ( surf_lsm_v(l)%rho_c_total(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) 1937 1938 surf_lsm_v(l)%lambda_h = 0.0_wp 2035 2036 surf_lsm_v(l)%lambda_h = 0.0_wp 2037 1939 2038 ! 1940 2039 !-- If required, allocate humidity-related variables for the soil model … … 1949 2048 ! 1950 2049 !-- Calculate grid spacings. Temperature and moisture are defined at 1951 !-- the edges of the soil layers (_stag), whereas gradients/fluxes are defined 1952 !-- at the centers 1953 dz_soil(nzb_soil) = zs(nzb_soil) 1954 2050 !-- the center of the soil layers, whereas gradients/fluxes are 2051 !-- defined at the edges (_layer) 2052 DO k = nzb_soil, nzt_soil-1 2053 dz_soil(k) = zs(k+1) - zs(k) 2054 2055 IF ( dz_soil(k) == 0.0_wp ) THEN 2056 message_string = 'invalid soil layer configuration found ' // & 2057 '(dz_soil(k) = 0.0)' 2058 CALL message( 'lsm_read_restart_data', 'PA0140', 1, 2, 0, 6, 0 ) 2059 ENDIF 2060 2061 ENDDO 2062 2063 dz_soil_layer(nzb_soil) = 2.0_wp * zs(nzb_soil) 2064 zs_layer(nzb_soil) = 2.0_wp * zs(nzb_soil) 2065 2066 2067 2068 1955 2069 DO k = nzb_soil+1, nzt_soil 1956 dz_soil(k) = zs(k) - zs(k-1) 2070 dz_soil_layer(k) = ( zs(k) - zs_layer(k-1) ) * 2.0_wp 2071 zs_layer(k) = zs_layer(k-1) + dz_soil_layer(k) 1957 2072 ENDDO 1958 dz_soil(nzt_soil+1) = dz_soil(nzt_soil) 1959 1960 DO k = nzb_soil, nzt_soil-1 1961 dz_soil_stag(k) = 0.5_wp * (dz_soil(k+1) + dz_soil(k)) 2073 dz_soil_layer(nzt_soil+1) = 0.5_wp * dz_soil_layer(nzt_soil) 2074 dz_soil(nzt_soil) = zs_layer(k-1) + dz_soil_layer(k) - zs(nzt_soil) 2075 2076 2077 ddz_soil = 1.0_wp / dz_soil 2078 ddz_soil_layer = 1.0_wp / dz_soil_layer 2079 2080 2081 ! 2082 !-- Set flag parameter for the prescribed surface type depending on user 2083 !-- input. 2084 DO m = 1, surf_lsm_h%ns 2085 2086 SELECT CASE ( TRIM( surface_type ) ) 2087 2088 CASE ( 'vegetation' ) 2089 2090 surf_lsm_h%vegetation_surface(m) = .TRUE. 2091 2092 CASE ( 'water' ) 2093 2094 surf_lsm_h%water_surface(m) = .TRUE. 2095 2096 CASE ( 'pavement' ) 2097 2098 surf_lsm_h%pavement_surface(m) = .TRUE. 2099 2100 END SELECT 2101 1962 2102 ENDDO 1963 dz_soil_stag(nzt_soil) = dz_soil(nzt_soil) 1964 1965 ddz_soil = 1.0_wp / dz_soil 1966 ddz_soil_stag = 1.0_wp / dz_soil_stag 1967 2103 2104 DO l = 0, 3 2105 SELECT CASE ( TRIM( surface_type ) ) 2106 2107 CASE ( 'vegetation' ) 2108 2109 surf_lsm_v(l)%vegetation_surface = .TRUE. 2110 2111 CASE ( 'water' ) 2112 2113 surf_lsm_v(l)%water_surface = .TRUE. 2114 2115 CASE ( 'pavement' ) 2116 2117 surf_lsm_h%pavement_surface = .TRUE. 2118 2119 END SELECT 2120 2121 ENDDO 1968 2122 ! 1969 2123 !-- Initialize standard soil types. It is possible to overwrite each … … 1989 2143 1990 2144 IF ( saturation_moisture == 9999999.9_wp ) THEN 1991 saturation_moisture = m_soil_pars(0,soil_type)2145 saturation_moisture = soil_pars(4,soil_type) 1992 2146 ENDIF 1993 2147 1994 2148 IF ( field_capacity == 9999999.9_wp ) THEN 1995 field_capacity = m_soil_pars(1,soil_type)2149 field_capacity = soil_pars(5,soil_type) 1996 2150 ENDIF 1997 2151 1998 2152 IF ( wilting_point == 9999999.9_wp ) THEN 1999 wilting_point = m_soil_pars(2,soil_type)2153 wilting_point = soil_pars(6,soil_type) 2000 2154 ENDIF 2001 2155 2002 2156 IF ( residual_moisture == 9999999.9_wp ) THEN 2003 residual_moisture = m_soil_pars(3,soil_type)2157 residual_moisture = soil_pars(7,soil_type) 2004 2158 ENDIF 2005 2159 2006 2160 ENDIF 2007 2008 ! 2009 !-- Map values to the respective 2D arrays 2161 2162 ! 2163 !-- Check whether parameters from the lookup tables are to be used 2164 IF ( vegetation_type /= 0 ) THEN 2165 2166 IF ( min_canopy_resistance == 9999999.9_wp ) THEN 2167 min_canopy_resistance = vegetation_pars(0,vegetation_type) 2168 ENDIF 2169 2170 IF ( leaf_area_index == 9999999.9_wp ) THEN 2171 leaf_area_index = vegetation_pars(1,vegetation_type) 2172 ENDIF 2173 2174 IF ( vegetation_coverage == 9999999.9_wp ) THEN 2175 vegetation_coverage = vegetation_pars(2,vegetation_type) 2176 ENDIF 2177 2178 IF ( canopy_resistance_coefficient == 9999999.9_wp ) THEN 2179 canopy_resistance_coefficient= vegetation_pars(3,vegetation_type) 2180 ENDIF 2181 2182 IF ( z0_vegetation == 9999999.9_wp ) THEN 2183 z0_vegetation = vegetation_pars(4,vegetation_type) 2184 ENDIF 2185 2186 IF ( z0h_vegetation == 9999999.9_wp ) THEN 2187 z0h_vegetation = vegetation_pars(5,vegetation_type) 2188 ENDIF 2189 2190 ! 2191 !-- The heat conductivity between canopy and first soil layer must 2192 !-- depend on the depth of the soil layer. The value in the lookup 2193 !-- table refers to the first soil temperature at zs = -0.005 m. Lambda 2194 !-- is thus interpolated to the actual soil layer depth used. 2195 IF ( lambda_surface_stable == 9999999.9_wp ) THEN 2196 lambda_surface_stable = vegetation_pars(6,vegetation_type) & 2197 * 0.005_wp * ddz_soil_layer(nzb_soil) & 2198 * 2.0_wp 2199 ENDIF 2200 2201 IF ( lambda_surface_unstable == 9999999.9_wp ) THEN 2202 lambda_surface_unstable = vegetation_pars(7,vegetation_type) & 2203 * 0.005_wp * ddz_soil_layer(nzb_soil) & 2204 * 2.0_wp 2205 ENDIF 2206 2207 IF ( f_shortwave_incoming == 9999999.9_wp ) THEN 2208 f_shortwave_incoming = vegetation_pars(8,vegetation_type) 2209 ENDIF 2210 2211 IF ( c_surface == 9999999.9_wp ) THEN 2212 c_surface = vegetation_pars(9,vegetation_type) 2213 ENDIF 2214 2215 ENDIF 2216 2217 IF ( water_type /= 0 ) THEN 2218 2219 IF ( water_temperature == 9999999.9_wp ) THEN 2220 water_temperature = water_pars(0,water_type) 2221 ENDIF 2222 2223 IF ( z0_water == 9999999.9_wp ) THEN 2224 z0_water = water_pars(1,water_type) 2225 ENDIF 2226 2227 IF ( z0h_water == 9999999.9_wp ) THEN 2228 z0h_water = water_pars(2,water_type) 2229 ENDIF 2230 2231 ENDIF 2232 2233 IF ( pavement_type /= 0 ) THEN 2234 2235 IF ( pavement_depth == 9999999.9_wp ) THEN 2236 pavement_depth = pavement_pars(0,pavement_type) 2237 ELSE 2238 pavement_depth = MAX( zs(nzb_soil), pavement_depth ) 2239 ENDIF 2240 2241 IF ( z0_pavement == 9999999.9_wp ) THEN 2242 z0_pavement = pavement_pars(1,pavement_type) 2243 ENDIF 2244 2245 IF ( z0h_pavement == 9999999.9_wp ) THEN 2246 z0h_pavement = pavement_pars(2,pavement_type) 2247 ENDIF 2248 2249 IF ( pavement_heat_conduct == 9999999.9_wp ) THEN 2250 pavement_heat_conduct = pavement_pars(3,pavement_type) 2251 ENDIF 2252 2253 IF ( pavement_heat_capacity == 9999999.9_wp ) THEN 2254 pavement_heat_capacity = pavement_pars(4,pavement_type) 2255 ENDIF 2256 2257 ENDIF 2258 ! 2259 !-- Map values to the respective 2D/3D arrays 2010 2260 !-- Horizontal surfaces 2011 2261 surf_lsm_h%alpha_vg = alpha_vangenuchten … … 2032 2282 ENDDO 2033 2283 2034 2035 2036 2284 ! 2037 2285 !-- Initial run actions … … 2039 2287 ! 2040 2288 !-- First, for horizontal surfaces 2041 t_soil_h%var_2d = 0.0_wp2042 m_soil_h%var_2d = 0.0_wp2043 m_liq_eb_h%var_1d = 0.0_wp2044 2045 !2046 !-- Map user settings of T and q for each soil layer2047 !-- (make sure that the soil moisture does not drop below the permanent2048 !-- wilting point) -> problems with devision by zero)2049 DO k = nzb_soil, nzt_soil2050 t_soil_h%var_2d(k,:) = soil_temperature(k)2051 m_soil_h%var_2d(k,:) = MAX(soil_moisture(k),surf_lsm_h%m_wilt(:))2052 soil_moisture(k) = MAX(soil_moisture(k),wilting_point)2053 ENDDO2054 t_soil_h%var_2d(nzt_soil+1,:) = soil_temperature(nzt_soil+1)2055 2056 !2057 !-- Calculate surface temperature2058 t_surface_h%var_1d(:) = pt_surface * exn2059 surf_lsm_h%pt_surface(:) = pt_surface2060 2061 2289 ! 2062 2290 !-- Set artifical values for ts and us so that r_a has its initial value 2063 2291 !-- for the first time step. Only for interior core domain, not for ghost points 2064 2292 DO m = 1, surf_lsm_h%ns 2293 2294 t_soil_h%var_2d(:,m) = 0.0_wp 2295 m_soil_h%var_2d(:,m) = 0.0_wp 2296 m_liq_h%var_1d(m) = 0.0_wp 2297 2298 !-- Map user settings of T and q for each soil layer 2299 !-- (make sure that the soil moisture does not drop below the permanent 2300 !-- wilting point) -> problems with devision by zero) 2301 IF ( surf_lsm_h%water_surface(m) ) THEN 2302 2303 surf_lsm_h%z0(m) = z0_water 2304 surf_lsm_h%z0h(m) = z0h_water 2305 surf_lsm_h%z0q(m) = z0h_water 2306 t_soil_h%var_2d(:,m) = water_temperature 2307 surf_lsm_h%lambda_surface_s(m) = 1.0E10_wp 2308 surf_lsm_h%lambda_surface_u(m) = 1.0E10_wp 2309 surf_lsm_h%c_surface(m) = 0.0_wp 2310 2311 ELSEIF ( surf_lsm_h%pavement_surface(m) ) THEN 2312 2313 surf_lsm_h%z0(m) = z0_pavement 2314 surf_lsm_h%z0h(m) = z0h_pavement 2315 surf_lsm_h%z0q(m) = z0h_pavement 2316 DO k = nzb_soil, nzt_soil 2317 t_soil_h%var_2d(k,m) = soil_temperature(k) 2318 m_soil_h%var_2d(k,m) = MAX(soil_moisture(k),surf_lsm_h%m_wilt(k,m)) 2319 soil_moisture(k) = MAX(soil_moisture(k),wilting_point) 2320 ENDDO 2321 t_soil_h%var_2d(nzt_soil+1,m) = soil_temperature(nzt_soil+1) 2322 surf_lsm_h%lambda_surface_s(m) = pavement_heat_conduct & 2323 * ddz_soil_layer(nzb_soil) & 2324 * 2.0_wp 2325 surf_lsm_h%lambda_surface_u(m) = surf_lsm_h%lambda_surface_s(m) 2326 surf_lsm_h%c_surface(m) = pavement_heat_capacity & 2327 * dz_soil_layer(nzb_soil) & 2328 * 0.25_wp 2329 surf_lsm_h%lambda_h_def(m) = pavement_heat_conduct 2330 surf_lsm_h%rho_c_def(m) = pavement_heat_capacity 2331 2332 ELSEIF ( surf_lsm_h%vegetation_surface(m) ) THEN 2333 2334 surf_lsm_h%z0(m) = z0_vegetation 2335 surf_lsm_h%z0h(m) = z0h_vegetation 2336 surf_lsm_h%z0q(m) = z0h_vegetation 2337 DO k = nzb_soil, nzt_soil 2338 t_soil_h%var_2d(k,m) = soil_temperature(k) 2339 m_soil_h%var_2d(k,m) = MAX(soil_moisture(k),surf_lsm_h%m_wilt(k,m)) 2340 soil_moisture(k) = MAX(soil_moisture(k),wilting_point) 2341 ENDDO 2342 t_soil_h%var_2d(nzt_soil+1,m) = soil_temperature(nzt_soil+1) 2343 surf_lsm_h%lambda_surface_s(m) = lambda_surface_stable 2344 surf_lsm_h%lambda_surface_u(m) = lambda_surface_unstable 2345 surf_lsm_h%c_surface(m) = c_surface 2346 2347 ENDIF 2348 2065 2349 i = surf_lsm_h%i(m) 2066 2350 j = surf_lsm_h%j(m) 2067 2351 k = surf_lsm_h%k(m) 2068 2352 ! 2353 !-- Calculate surface temperature. In case of bare soil, the surface 2354 !-- temperature must be reset to the soil temperature in the first soil 2355 !-- layer 2356 IF ( surf_lsm_h%lambda_surface_s(m) == 0.0_wp ) THEN 2357 t_surface_h%var_1d(:) = t_soil_h%var_2d(nzb_soil,m) 2358 surf_lsm_h%pt_surface(:) = t_soil_h%var_2d(nzb_soil,m) / exn 2359 ELSE 2360 t_surface_h%var_1d(:) = pt_surface * exn 2361 surf_lsm_h%pt_surface(:) = pt_surface 2362 ENDIF 2363 2069 2364 IF ( cloud_physics ) THEN 2070 2365 pt1 = pt(k,j,i) + l_d_cp * pt_d_t(k) * ql(k,j,i) … … 2079 2374 surf_lsm_h%us(m) = 0.1_wp 2080 2375 surf_lsm_h%ts(m) = ( pt1 - surf_lsm_h%pt_surface(m) ) / surf_lsm_h%r_a(m) 2081 surf_lsm_h%shf(m) = - surf_lsm_h%us(m) * surf_lsm_h%ts(m) 2082 ENDDO 2083 ! 2084 !-- Vertical surfaces 2085 DO l = 0, 3 2086 2087 t_soil_v(l)%var_2d = 0.0_wp 2088 m_soil_v(l)%var_2d = 0.0_wp 2089 m_liq_eb_v(l)%var_1d = 0.0_wp 2090 2091 ! 2092 !-- Map user settings of T and q for each soil layer 2093 !-- (make sure that the soil moisture does not drop below the permanent 2094 !-- wilting point) -> problems with devision by zero) 2095 DO k = nzb_soil, nzt_soil 2096 t_soil_v(l)%var_2d(k,:) = soil_temperature(k) 2097 m_soil_v(l)%var_2d(k,:) = MAX(soil_moisture(k),surf_lsm_v(l)%m_wilt(:)) 2098 soil_moisture(k) = MAX(soil_moisture(k),wilting_point) 2099 ENDDO 2100 t_soil_v(l)%var_2d(nzt_soil+1,:) = soil_temperature(nzt_soil+1) 2101 2102 ! 2103 !-- Calculate surface temperature 2104 t_surface_v(l)%var_1d(:) = pt_surface * exn 2105 surf_lsm_h%pt_surface(:) = pt_surface 2106 2107 ! 2108 !-- Set artifical values for ts and us so that r_a has its initial value 2109 !-- for the first time step. Only for interior core domain, not for ghost points 2376 surf_lsm_h%shf(m) = - surf_lsm_h%us(m) * surf_lsm_h%ts(m) * rho_surface 2377 2378 ENDDO 2379 2380 ! 2381 !-- Vertical surfaces 2382 DO l = 0, 3 2110 2383 DO m = 1, surf_lsm_v(l)%ns 2384 2385 t_soil_v(l)%var_2d = 0.0_wp 2386 m_soil_v(l)%var_2d = 0.0_wp 2387 m_liq_v(l)%var_1d = 0.0_wp 2388 2389 2390 !-- Map user settings of T and q for each soil layer 2391 !-- (make sure that the soil moisture does not drop below the permanent 2392 !-- wilting point) -> problems with devision by zero) 2393 IF ( surf_lsm_v(l)%water_surface(m) ) THEN 2394 surf_lsm_v(l)%z0(m) = z0_water 2395 surf_lsm_v(l)%z0h(m) = z0h_water 2396 surf_lsm_v(l)%z0q(m) = z0h_water 2397 t_soil_v(l)%var_2d(:,m) = water_temperature 2398 surf_lsm_v(l)%lambda_surface_s(m) = 1.0E10_wp 2399 surf_lsm_v(l)%lambda_surface_u(m) = 1.0E10_wp 2400 surf_lsm_v(l)%c_surface(m) = 0.0_wp 2401 2402 ELSEIF ( surf_lsm_v(l)%pavement_surface(m) ) THEN 2403 surf_lsm_v(l)%z0(m) = z0_pavement 2404 surf_lsm_v(l)%z0h(m) = z0h_pavement 2405 surf_lsm_v(l)%z0q(m) = z0h_pavement 2406 DO k = nzb_soil, nzt_soil 2407 t_soil_v(l)%var_2d(k,m) = soil_temperature(k) 2408 m_soil_v(l)%var_2d(k,m) = MAX(soil_moisture(k),surf_lsm_v(l)%m_wilt(k,m)) 2409 soil_moisture(k) = MAX(soil_moisture(k),wilting_point) 2410 ENDDO 2411 t_soil_v(l)%var_2d(nzt_soil+1,m) = soil_temperature(nzt_soil+1) 2412 surf_lsm_v(l)%lambda_surface_s(m) = pavement_heat_conduct & 2413 * ddz_soil_layer(nzb_soil) & 2414 * 2.0_wp 2415 surf_lsm_v(l)%lambda_surface_u(m) = surf_lsm_v(l)%lambda_surface_s(m) 2416 surf_lsm_v(l)%c_surface(m) = pavement_heat_capacity & 2417 * dz_soil_layer(nzb_soil) & 2418 * 0.25_wp 2419 surf_lsm_v(l)%lambda_h_def(m) = pavement_heat_conduct 2420 surf_lsm_v(l)%rho_c_def(m) = pavement_heat_capacity 2421 2422 ELSEIF ( surf_lsm_v(l)%vegetation_surface(m) ) THEN 2423 2424 surf_lsm_v(l)%z0(m) = z0_vegetation 2425 surf_lsm_v(l)%z0h(m) = z0h_vegetation 2426 surf_lsm_v(l)%z0q(m) = z0h_vegetation 2427 DO k = nzb_soil, nzt_soil 2428 t_soil_v(l)%var_2d(k,m) = soil_temperature(k) 2429 m_soil_v(l)%var_2d(k,m) = MAX(soil_moisture(k),surf_lsm_v(l)%m_wilt(k,m)) 2430 soil_moisture(k) = MAX(soil_moisture(k),wilting_point) 2431 ENDDO 2432 t_soil_v(l)%var_2d(nzt_soil+1,m) = soil_temperature(nzt_soil+1) 2433 surf_lsm_v(l)%lambda_surface_s(m) = lambda_surface_stable 2434 surf_lsm_v(l)%lambda_surface_u(m) = lambda_surface_unstable 2435 surf_lsm_v(l)%c_surface(m) = c_surface 2436 ENDIF 2437 2438 ! 2439 !-- Calculate surface temperature. In case of bare soil, the surface 2440 !-- temperature must be reset to the soil temperature in the first soil 2441 !-- layer 2442 IF ( surf_lsm_v(l)%lambda_surface_s(m) == 0.0_wp ) THEN 2443 t_surface_v(l)%var_1d(:) = t_soil_v(l)%var_2d(nzb_soil,m) 2444 surf_lsm_v(l)%pt_surface(:) = t_soil_v(l)%var_2d(nzb_soil,m) / exn 2445 ELSE 2446 t_surface_v(l)%var_1d(:) = pt_surface * exn 2447 surf_lsm_v(l)%pt_surface(:) = pt_surface 2448 ENDIF 2449 2450 ! 2451 !-- Set artifical values for ts and us so that r_a has its initial value 2452 !-- for the first time step. Only for interior core domain, not for ghost points 2453 2111 2454 i = surf_lsm_v(l)%i(m) 2112 2455 j = surf_lsm_v(l)%j(m) … … 2121 2464 ! 2122 2465 !-- Assure that r_a cannot be zero at model start 2123 IF ( pt1 == surf_lsm_ h%pt_surface(m) ) pt1 = pt1 + 1.0E-10_wp2466 IF ( pt1 == surf_lsm_v(l)%pt_surface(m) ) pt1 = pt1 + 1.0E-10_wp 2124 2467 2125 2468 surf_lsm_v(l)%us(m) = 0.1_wp 2126 surf_lsm_v(l)%ts(m) = ( pt1 - surf_lsm_ h%pt_surface(m) ) / surf_lsm_v(l)%r_a(m)2127 surf_lsm_v(l)%shf(m) = - surf_lsm_v(l)%us(m) * surf_lsm_v(l)%ts(m) 2469 surf_lsm_v(l)%ts(m) = ( pt1 - surf_lsm_v(l)%pt_surface(m) ) / surf_lsm_v(l)%r_a(m) 2470 surf_lsm_v(l)%shf(m) = - surf_lsm_v(l)%us(m) * surf_lsm_v(l)%ts(m) * rho_surface 2128 2471 ENDDO 2129 2472 ENDDO … … 2191 2534 ENDDO 2192 2535 2193 IF ( veg_type /= 0 ) THEN 2194 IF ( min_canopy_resistance == 9999999.9_wp ) THEN 2195 min_canopy_resistance = veg_pars(0,veg_type) 2196 ENDIF 2197 IF ( leaf_area_index == 9999999.9_wp ) THEN 2198 leaf_area_index = veg_pars(1,veg_type) 2199 ENDIF 2200 IF ( vegetation_coverage == 9999999.9_wp ) THEN 2201 vegetation_coverage = veg_pars(2,veg_type) 2202 ENDIF 2203 IF ( canopy_resistance_coefficient == 9999999.9_wp ) THEN 2204 canopy_resistance_coefficient= veg_pars(3,veg_type) 2205 ENDIF 2206 IF ( lambda_surface_stable == 9999999.9_wp ) THEN 2207 lambda_surface_stable = surface_pars(0,veg_type) 2208 ENDIF 2209 IF ( lambda_surface_unstable == 9999999.9_wp ) THEN 2210 lambda_surface_unstable = surface_pars(1,veg_type) 2211 ENDIF 2212 IF ( f_shortwave_incoming == 9999999.9_wp ) THEN 2213 f_shortwave_incoming = surface_pars(2,veg_type) 2214 ENDIF 2215 IF ( z0_eb == 9999999.9_wp ) THEN 2216 roughness_length = roughness_par(0,veg_type) 2217 z0_eb = roughness_par(0,veg_type) 2218 ENDIF 2219 IF ( z0h_eb == 9999999.9_wp ) THEN 2220 z0h_eb = roughness_par(1,veg_type) 2221 ENDIF 2222 IF ( z0q_eb == 9999999.9_wp ) THEN 2223 z0q_eb = roughness_par(2,veg_type) 2224 ENDIF 2225 z0h_factor = z0h_eb / ( z0_eb + 1.0E-20_wp ) 2226 2227 IF ( ALL( root_fraction == 9999999.9_wp ) ) THEN 2228 DO m = 1, surf_lsm_h%ns 2229 i = surf_lsm_h%i(m) 2230 j = surf_lsm_h%j(m) 2231 2232 2233 DO k = nzb_soil, nzt_soil 2234 surf_lsm_h%root_fr(k,m) = root_distribution(k,veg_type) 2235 root_fraction(k) = root_distribution(k,veg_type) 2536 2537 2538 IF ( ALL( root_fraction == 9999999.9_wp ) ) THEN 2539 DO m = 1, surf_lsm_h%ns 2540 i = surf_lsm_h%i(m) 2541 j = surf_lsm_h%j(m) 2542 2543 2544 DO k = nzb_soil, nzt_soil 2545 surf_lsm_h%root_fr(k,m) = root_distribution(k,vegetation_type) 2546 root_fraction(k) = root_distribution(k,vegetation_type) 2547 ENDDO 2548 ENDDO 2549 DO l = 0, 3 2550 DO m = 1, surf_lsm_v(l)%ns 2551 i = surf_lsm_v(l)%i(m) 2552 j = surf_lsm_v(l)%j(m) 2553 2554 DO k = nzb_soil, nzt_soil 2555 surf_lsm_v(l)%root_fr(k,m) = root_distribution(k,vegetation_type) 2556 root_fraction(k) = root_distribution(k,vegetation_type) 2236 2557 ENDDO 2237 2558 ENDDO 2238 DO l = 0, 3 2239 DO m = 1, surf_lsm_v(l)%ns 2240 i = surf_lsm_v(l)%i(m) 2241 j = surf_lsm_v(l)%j(m) 2242 2243 DO k = nzb_soil, nzt_soil 2244 surf_lsm_v(l)%root_fr(k,m) = root_distribution(k,veg_type) 2245 root_fraction(k) = root_distribution(k,veg_type) 2246 ENDDO 2247 ENDDO 2248 ENDDO 2249 ENDIF 2250 2251 ELSE 2252 2253 IF ( z0_eb == 9999999.9_wp ) THEN 2254 z0_eb = roughness_length 2255 ENDIF 2256 IF ( z0h_eb == 9999999.9_wp ) THEN 2257 z0h_eb = z0_eb * z0h_factor 2258 ENDIF 2259 IF ( z0q_eb == 9999999.9_wp ) THEN 2260 z0q_eb = z0_eb * z0h_factor 2261 ENDIF 2262 2263 ENDIF 2264 2265 ! 2266 !-- For surfaces covered with pavement, set depth of the pavement (with dry 2267 !-- soil below). The depth must be greater than the first soil layer depth 2268 IF ( veg_type == 20 ) THEN 2269 IF ( pave_depth == 9999999.9_wp ) THEN 2270 pave_depth = zs(nzb_soil) 2271 ELSE 2272 pave_depth = MAX( zs(nzb_soil), pave_depth ) 2273 ENDIF 2274 ENDIF 2275 2276 ! 2277 !-- Map vegetation and soil types to 2D array to allow for heterogeneous 2278 !-- surfaces via user interface see below 2279 !-- First for horizontal surfaces 2280 surf_lsm_h%veg_type_2d = veg_type 2281 surf_lsm_h%soil_type_2d = soil_type 2559 ENDDO 2560 ENDIF 2282 2561 2283 2562 ! … … 2287 2566 surf_lsm_h%c_veg = vegetation_coverage 2288 2567 surf_lsm_h%g_d = canopy_resistance_coefficient 2289 surf_lsm_h%lambda_surface_s = lambda_surface_stable2290 surf_lsm_h%lambda_surface_u = lambda_surface_unstable2291 2568 surf_lsm_h%f_sw_in = f_shortwave_incoming 2292 surf_lsm_h%z0 = z0_eb2293 surf_lsm_h%z0h = z0h_eb2294 surf_lsm_h%z0q = z0q_eb2295 2569 2296 2570 !-- Vertical surfaces 2297 2571 DO l = 0, 3 2298 surf_lsm_v(l)%veg_type_2d = veg_type2299 surf_lsm_v(l)%soil_type_2d = soil_type2300 2572 2301 2573 ! … … 2305 2577 surf_lsm_v(l)%c_veg = vegetation_coverage 2306 2578 surf_lsm_v(l)%g_d = canopy_resistance_coefficient 2307 surf_lsm_v(l)%lambda_surface_s = lambda_surface_stable2308 surf_lsm_v(l)%lambda_surface_u = lambda_surface_unstable2309 2579 surf_lsm_v(l)%f_sw_in = f_shortwave_incoming 2310 surf_lsm_v(l)%z0 = z0_eb2311 surf_lsm_v(l)%z0h = z0h_eb2312 surf_lsm_v(l)%z0q = z0q_eb2313 2580 ENDDO 2314 2581 2315 2582 ! 2316 2583 !-- Possibly do user-defined actions (e.g. define heterogeneous land surface) 2317 2584 CALL user_init_land_surface 2318 2585 2319 !2320 !-- Set flag parameter if vegetation type was set to a water surface. Also2321 !-- set temperature to a constant value in all "soil" layers.2322 !-- For now, do not set water surface for vertical surfaces2323 DO m = 1, surf_lsm_h%ns2324 i = surf_lsm_h%i(m)2325 j = surf_lsm_h%j(m)2326 2327 IF ( surf_lsm_h%veg_type_2d(m) == 14 .OR. &2328 surf_lsm_h%veg_type_2d(m) == 15 ) THEN2329 surf_lsm_h%water_surface(m) = .TRUE.2330 t_soil_h%var_2d(:,m) = t_surface_h%var_1d(m)2331 ELSEIF ( surf_lsm_h%veg_type_2d(m) == 20 ) THEN2332 surf_lsm_h%pave_surface(m) = .TRUE.2333 m_soil_h%var_2d(:,m) = 0.0_wp2334 ENDIF2335 2336 ENDDO2337 2586 2338 2587 ! … … 2343 2592 t_soil_h_p = t_soil_h 2344 2593 m_soil_h_p = m_soil_h 2345 m_liq_ eb_h_p = m_liq_eb_h2594 m_liq_h_p = m_liq_h 2346 2595 t_surface_h_p = t_surface_h 2347 2596 2348 2597 t_soil_v_p = t_soil_v 2349 2598 m_soil_v_p = m_soil_v 2350 m_liq_ eb_v_p = m_liq_eb_v2599 m_liq_v_p = m_liq_v 2351 2600 t_surface_v_p = t_surface_v 2352 2601 … … 2377 2626 ! 2378 2627 !-- Allocate global 1D arrays 2379 ALLOCATE ( ddz_soil(nzb_soil:nzt_soil +1) )2380 ALLOCATE ( ddz_soil_ stag(nzb_soil:nzt_soil) )2381 ALLOCATE ( dz_soil(nzb_soil:nzt_soil +1) )2382 ALLOCATE ( dz_soil_ stag(nzb_soil:nzt_soil) )2628 ALLOCATE ( ddz_soil(nzb_soil:nzt_soil) ) 2629 ALLOCATE ( ddz_soil_layer(nzb_soil:nzt_soil+1) ) 2630 ALLOCATE ( dz_soil(nzb_soil:nzt_soil) ) 2631 ALLOCATE ( dz_soil_layer(nzb_soil:nzt_soil+1) ) 2383 2632 ALLOCATE ( root_extr(nzb_soil:nzt_soil) ) 2384 2633 … … 2393 2642 ! 2394 2643 !-- Horizontal surfaces 2395 ALLOCATE ( m_liq_ eb_h%var_1d(1:surf_lsm_h%ns) )2396 ALLOCATE ( m_liq_ eb_h_p%var_1d(1:surf_lsm_h%ns) )2644 ALLOCATE ( m_liq_h%var_1d(1:surf_lsm_h%ns) ) 2645 ALLOCATE ( m_liq_h_p%var_1d(1:surf_lsm_h%ns) ) 2397 2646 ALLOCATE ( t_surface_h%var_1d(1:surf_lsm_h%ns) ) 2398 2647 ALLOCATE ( t_surface_h_p%var_1d(1:surf_lsm_h%ns) ) … … 2401 2650 ALLOCATE ( t_soil_h%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) ) 2402 2651 ALLOCATE ( t_soil_h_p%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) ) 2652 2403 2653 ! 2404 2654 !-- Vertical surfaces 2405 2655 DO l = 0, 3 2406 ALLOCATE ( m_liq_ eb_v(l)%var_1d(1:surf_lsm_v(l)%ns) )2407 ALLOCATE ( m_liq_ eb_v(l)_p%var_1d(1:surf_lsm_v(l)%ns) )2656 ALLOCATE ( m_liq_v(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2657 ALLOCATE ( m_liq_v(l)_p%var_1d(1:surf_lsm_v(l)%ns) ) 2408 2658 ALLOCATE ( t_surface_v(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2409 2659 ALLOCATE ( t_surface_v(l)_p%var_1d(1:surf_lsm_v(l)%ns) ) … … 2416 2666 ! 2417 2667 !-- Horizontal surfaces 2418 ALLOCATE ( m_liq_ eb_h_1%var_1d(1:surf_lsm_h%ns) )2419 ALLOCATE ( m_liq_ eb_h_2%var_1d(1:surf_lsm_h%ns) )2668 ALLOCATE ( m_liq_h_1%var_1d(1:surf_lsm_h%ns) ) 2669 ALLOCATE ( m_liq_h_2%var_1d(1:surf_lsm_h%ns) ) 2420 2670 ALLOCATE ( t_surface_h_1%var_1d(1:surf_lsm_h%ns) ) 2421 2671 ALLOCATE ( t_surface_h_2%var_1d(1:surf_lsm_h%ns) ) … … 2427 2677 !-- Vertical surfaces 2428 2678 DO l = 0, 3 2429 ALLOCATE ( m_liq_ eb_v_1(l)%var_1d(1:surf_lsm_v(l)%ns) )2430 ALLOCATE ( m_liq_ eb_v_2(l)%var_1d(1:surf_lsm_v(l)%ns) )2679 ALLOCATE ( m_liq_v_1(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2680 ALLOCATE ( m_liq_v_2(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2431 2681 ALLOCATE ( t_surface_v_1(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2432 2682 ALLOCATE ( t_surface_v_2(l)%var_1d(1:surf_lsm_v(l)%ns) ) … … 2441 2691 !-- Allocate intermediate timestep arrays 2442 2692 !-- Horizontal surfaces 2443 ALLOCATE ( tm_liq_ eb_h_m%var_1d(1:surf_lsm_h%ns) )2693 ALLOCATE ( tm_liq_h_m%var_1d(1:surf_lsm_h%ns) ) 2444 2694 ALLOCATE ( tt_surface_h_m%var_1d(1:surf_lsm_h%ns) ) 2445 2695 ALLOCATE ( tm_soil_h_m%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) … … 2448 2698 !-- Horizontal surfaces 2449 2699 DO l = 0, 3 2450 ALLOCATE ( tm_liq_ eb_v_m(l)%var_1d(1:surf_lsm_v(l)%ns) )2700 ALLOCATE ( tm_liq_v_m(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2451 2701 ALLOCATE ( tt_surface_v_m(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2452 2702 ALLOCATE ( tm_soil_v_m(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) … … 2463 2713 !-- Allocate 2D vegetation model arrays 2464 2714 !-- Horizontal surfaces 2465 ALLOCATE ( surf_lsm_h%alpha_vg(1:surf_lsm_h%ns) )2466 2715 ALLOCATE ( surf_lsm_h%building_surface(1:surf_lsm_h%ns) ) 2467 2716 ALLOCATE ( surf_lsm_h%c_liq(1:surf_lsm_h%ns) ) 2717 ALLOCATE ( surf_lsm_h%c_surface(1:surf_lsm_h%ns) ) 2468 2718 ALLOCATE ( surf_lsm_h%c_veg(1:surf_lsm_h%ns) ) 2469 2719 ALLOCATE ( surf_lsm_h%f_sw_in(1:surf_lsm_h%ns) ) 2470 ALLOCATE ( surf_lsm_h%ghf_eb(1:surf_lsm_h%ns) ) 2471 ALLOCATE ( surf_lsm_h%gamma_w_sat(1:surf_lsm_h%ns) ) 2720 ALLOCATE ( surf_lsm_h%ghf(1:surf_lsm_h%ns) ) 2472 2721 ALLOCATE ( surf_lsm_h%g_d(1:surf_lsm_h%ns) ) 2473 2722 ALLOCATE ( surf_lsm_h%lai(1:surf_lsm_h%ns) ) 2474 ALLOCATE ( surf_lsm_h%l _vg(1:surf_lsm_h%ns))2723 ALLOCATE ( surf_lsm_h%lambda_h_def(1:surf_lsm_h%ns) ) 2475 2724 ALLOCATE ( surf_lsm_h%lambda_surface_u(1:surf_lsm_h%ns) ) 2476 2725 ALLOCATE ( surf_lsm_h%lambda_surface_s(1:surf_lsm_h%ns) ) 2477 ALLOCATE ( surf_lsm_h%m_fc(1:surf_lsm_h%ns) ) 2478 ALLOCATE ( surf_lsm_h%m_res(1:surf_lsm_h%ns) ) 2479 ALLOCATE ( surf_lsm_h%m_sat(1:surf_lsm_h%ns) ) 2480 ALLOCATE ( surf_lsm_h%m_wilt(1:surf_lsm_h%ns) ) 2481 ALLOCATE ( surf_lsm_h%n_vg(1:surf_lsm_h%ns) ) 2482 ALLOCATE ( surf_lsm_h%pave_surface(1:surf_lsm_h%ns) ) 2483 ALLOCATE ( surf_lsm_h%qsws_eb(1:surf_lsm_h%ns) ) 2484 ALLOCATE ( surf_lsm_h%qsws_soil_eb(1:surf_lsm_h%ns) ) 2485 ALLOCATE ( surf_lsm_h%qsws_liq_eb(1:surf_lsm_h%ns) ) 2486 ALLOCATE ( surf_lsm_h%qsws_veg_eb(1:surf_lsm_h%ns) ) 2726 ALLOCATE ( surf_lsm_h%vegetation_surface(1:surf_lsm_h%ns) ) 2727 ALLOCATE ( surf_lsm_h%pavement_surface(1:surf_lsm_h%ns) ) 2728 ALLOCATE ( surf_lsm_h%qsws_soil(1:surf_lsm_h%ns) ) 2729 ALLOCATE ( surf_lsm_h%qsws_liq(1:surf_lsm_h%ns) ) 2730 ALLOCATE ( surf_lsm_h%qsws_veg(1:surf_lsm_h%ns) ) 2487 2731 ALLOCATE ( surf_lsm_h%rad_net_l(1:surf_lsm_h%ns) ) 2732 ALLOCATE ( surf_lsm_h%rho_c_def(1:surf_lsm_h%ns) ) 2488 2733 ALLOCATE ( surf_lsm_h%r_a(1:surf_lsm_h%ns) ) 2489 2734 ALLOCATE ( surf_lsm_h%r_canopy(1:surf_lsm_h%ns) ) … … 2492 2737 ALLOCATE ( surf_lsm_h%r_s(1:surf_lsm_h%ns) ) 2493 2738 ALLOCATE ( surf_lsm_h%r_canopy_min(1:surf_lsm_h%ns) ) 2494 ALLOCATE ( surf_lsm_h%shf_eb(1:surf_lsm_h%ns) )2495 ALLOCATE ( surf_lsm_h%soil_type_2d(1:surf_lsm_h%ns) )2496 ALLOCATE ( surf_lsm_h%veg_type_2d(1:surf_lsm_h%ns) )2497 2739 ALLOCATE ( surf_lsm_h%water_surface(1:surf_lsm_h%ns) ) 2498 2740 2499 surf_lsm_h%water_surface = .FALSE. 2500 surf_lsm_h%pave_surface = .FALSE. 2741 surf_lsm_h%water_surface = .FALSE. 2742 surf_lsm_h%pavement_surface = .FALSE. 2743 surf_lsm_h%vegetation_surface = .FALSE. 2501 2744 ! 2502 2745 !-- Vertical surfaces 2503 2746 DO l = 0, 3 2504 ALLOCATE ( surf_lsm_v(l)%alpha_vg(1:surf_lsm_v(l)%ns) )2505 2747 ALLOCATE ( surf_lsm_v(l)%building_surface(1:surf_lsm_v(l)%ns) ) 2506 2748 ALLOCATE ( surf_lsm_v(l)%c_liq(1:surf_lsm_v(l)%ns) ) 2749 ALLOCATE ( surf_lsm_v(l)%c_surface(1:surf_lsm_v(l)%ns) ) 2507 2750 ALLOCATE ( surf_lsm_v(l)%c_veg(1:surf_lsm_v(l)%ns) ) 2508 2751 ALLOCATE ( surf_lsm_v(l)%f_sw_in(1:surf_lsm_v(l)%ns) ) 2509 ALLOCATE ( surf_lsm_v(l)%ghf_eb(1:surf_lsm_v(l)%ns) ) 2510 ALLOCATE ( surf_lsm_v(l)%gamma_w_sat(1:surf_lsm_v(l)%ns) ) 2752 ALLOCATE ( surf_lsm_v(l)%ghf(1:surf_lsm_v(l)%ns) ) 2511 2753 ALLOCATE ( surf_lsm_v(l)%g_d(1:surf_lsm_v(l)%ns) ) 2512 2754 ALLOCATE ( surf_lsm_v(l)%lai(1:surf_lsm_v(l)%ns) ) 2513 ALLOCATE ( surf_lsm_v(l)%l _vg(1:surf_lsm_v(l)%ns))2755 ALLOCATE ( surf_lsm_v(l)%lambda_h_def(1:surf_lsm_v(l)%ns) ) 2514 2756 ALLOCATE ( surf_lsm_v(l)%lambda_surface_u(1:surf_lsm_v(l)%ns) ) 2515 2757 ALLOCATE ( surf_lsm_v(l)%lambda_surface_s(1:surf_lsm_v(l)%ns) ) 2516 ALLOCATE ( surf_lsm_v(l)%m_fc(1:surf_lsm_v(l)%ns) ) 2517 ALLOCATE ( surf_lsm_v(l)%m_res(1:surf_lsm_v(l)%ns) ) 2518 ALLOCATE ( surf_lsm_v(l)%m_sat(1:surf_lsm_v(l)%ns) ) 2519 ALLOCATE ( surf_lsm_v(l)%m_wilt(1:surf_lsm_v(l)%ns) ) 2520 ALLOCATE ( surf_lsm_v(l)%n_vg(1:surf_lsm_v(l)%ns) ) 2521 ALLOCATE ( surf_lsm_v(l)%pave_surface(1:surf_lsm_v(l)%ns) ) 2522 ALLOCATE ( surf_lsm_v(l)%qsws_eb(1:surf_lsm_v(l)%ns) ) 2523 ALLOCATE ( surf_lsm_v(l)%qsws_soil_eb(1:surf_lsm_v(l)%ns) ) 2524 ALLOCATE ( surf_lsm_v(l)%qsws_liq_eb(1:surf_lsm_v(l)%ns) ) 2525 ALLOCATE ( surf_lsm_v(l)%qsws_veg_eb(1:surf_lsm_v(l)%ns) ) 2758 ALLOCATE ( surf_lsm_v(l)%vegetation_surface(1:surf_lsm_v(l)%ns) ) 2759 ALLOCATE ( surf_lsm_v(l)%pavement_surface(1:surf_lsm_v(l)%ns) ) 2760 ALLOCATE ( surf_lsm_v(l)%qsws_soil(1:surf_lsm_v(l)%ns) ) 2761 ALLOCATE ( surf_lsm_v(l)%qsws_liq(1:surf_lsm_v(l)%ns) ) 2762 ALLOCATE ( surf_lsm_v(l)%qsws_veg(1:surf_lsm_v(l)%ns) ) 2526 2763 ALLOCATE ( surf_lsm_v(l)%rad_net_l(1:surf_lsm_v(l)%ns) ) 2764 ALLOCATE ( surf_lsm_v(l)%rho_c_def(1:surf_lsm_h%ns) ) 2527 2765 ALLOCATE ( surf_lsm_v(l)%r_a(1:surf_lsm_v(l)%ns) ) 2528 2766 ALLOCATE ( surf_lsm_v(l)%r_canopy(1:surf_lsm_v(l)%ns) ) … … 2531 2769 ALLOCATE ( surf_lsm_v(l)%r_s(1:surf_lsm_v(l)%ns) ) 2532 2770 ALLOCATE ( surf_lsm_v(l)%r_canopy_min(1:surf_lsm_v(l)%ns) ) 2533 ALLOCATE ( surf_lsm_v(l)%shf_eb(1:surf_lsm_v(l)%ns) )2534 ALLOCATE ( surf_lsm_v(l)%soil_type_2d(1:surf_lsm_v(l)%ns) )2535 ALLOCATE ( surf_lsm_v(l)%veg_type_2d(1:surf_lsm_v(l)%ns) )2536 2771 ALLOCATE ( surf_lsm_v(l)%water_surface(1:surf_lsm_v(l)%ns) ) 2537 2772 2538 surf_lsm_v(l)%water_surface = .FALSE. 2539 surf_lsm_v(l)%pave_surface = .FALSE. 2773 surf_lsm_v(l)%water_surface = .FALSE. 2774 surf_lsm_v(l)%pavement_surface = .FALSE. 2775 surf_lsm_v(l)%vegetation_surface = .FALSE. 2776 2540 2777 ENDDO 2541 2778 … … 2547 2784 t_surface_h => t_surface_h_1; t_surface_h_p => t_surface_h_2 2548 2785 m_soil_h => m_soil_h_1; m_soil_h_p => m_soil_h_2 2549 m_liq_ eb_h => m_liq_eb_h_1; m_liq_eb_h_p => m_liq_eb_h_22786 m_liq_h => m_liq_h_1; m_liq_h_p => m_liq_h_2 2550 2787 ! 2551 2788 !-- Vertical surfaces … … 2553 2790 t_surface_v => t_surface_v_1; t_surface_v_p => t_surface_v_2 2554 2791 m_soil_v => m_soil_v_1; m_soil_v_p => m_soil_v_2 2555 m_liq_ eb_v => m_liq_eb_v_1; m_liq_eb_v_p => m_liq_eb_v_22792 m_liq_v => m_liq_v_1; m_liq_v_p => m_liq_v_2 2556 2793 #endif 2557 2794 … … 2574 2811 NAMELIST /lsm_par/ alpha_vangenuchten, c_surface, & 2575 2812 canopy_resistance_coefficient, & 2813 constant_roughness, & 2576 2814 conserve_water_content, & 2577 2815 f_shortwave_incoming, field_capacity, & … … 2581 2819 l_vangenuchten, min_canopy_resistance, & 2582 2820 min_soil_resistance, n_vangenuchten, & 2583 pave _depth, pave_heat_capacity,&2584 pave _heat_conductivity,&2821 pavement_depth, pavement_heat_capacity, & 2822 pavement_heat_conduct, pavement_type, & 2585 2823 residual_moisture, root_fraction, & 2586 2824 saturation_moisture, skip_time_do_lsm, & 2587 2825 soil_moisture, soil_temperature, soil_type, & 2588 vegetation_coverage, veg_type, wilting_point,& 2589 zs, z0_eb, z0h_eb, z0q_eb 2826 surface_type, & 2827 vegetation_coverage, vegetation_type, & 2828 water_temperature, water_type, & 2829 wilting_point, zs, z0_vegetation, & 2830 z0h_vegetation, z0q_vegetation, z0_water, & 2831 z0h_water, z0q_water, z0_pavement, & 2832 z0h_pavement, z0q_pavement 2590 2833 2591 2834 line = ' ' … … 2668 2911 DO m = 1, surf%ns 2669 2912 2670 IF ( surf%pave_surface(m) ) THEN2671 surf%rho_c_total(nzb_soil,m) = pave_heat_capacity2672 lambda_temp(nzb_soil) = pave_heat_conductivity2673 ENDIF2674 2675 2913 IF ( .NOT. surf%water_surface(m) ) THEN 2676 2914 DO k = nzb_soil, nzt_soil 2677 2915 2678 IF ( surf%pave _surface(m) .AND. zs(k) <= pave_depth ) THEN2916 IF ( surf%pavement_surface(m) .AND. zs(k) <= pavement_depth ) THEN 2679 2917 2680 surf%rho_c_total(k,m) = pave_heat_capacity2681 lambda_temp(k) = pave_heat_conductivity2918 surf%rho_c_total(k,m) = surf%rho_c_def(m) 2919 lambda_temp(k) = surf%lambda_h_def(m) 2682 2920 2683 2921 ELSE … … 2686 2924 !-- into account water content 2687 2925 surf%rho_c_total(k,m) = (rho_c_soil * & 2688 ( 1.0_wp - surf%m_sat( m) )&2926 ( 1.0_wp - surf%m_sat(k,m) )& 2689 2927 + rho_c_water * surf_m_soil%var_2d(k,m) ) 2690 2928 … … 2692 2930 !-- Calculate soil heat conductivity at the center of the soil 2693 2931 !-- layers 2694 lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat( m)) *&2932 lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat(k,m)) * & 2695 2933 lambda_h_water ** surf_m_soil%var_2d(k,m) 2696 2934 2697 ke = 1.0_wp + LOG10( MAX( 0.1_wp, surf_m_soil%var_2d(k,m) / 2698 surf%m_sat( m) ) )2935 ke = 1.0_wp + LOG10( MAX( 0.1_wp, surf_m_soil%var_2d(k,m) / & 2936 surf%m_sat(k,m) ) ) 2699 2937 2700 2938 lambda_temp(k) = ke * (lambda_h_sat - lambda_h_dry) + & … … 2704 2942 2705 2943 ! 2706 !-- Calculate soil heat conductivity (lambda_h) at the _ staglevel2944 !-- Calculate soil heat conductivity (lambda_h) at the _layer level 2707 2945 !-- using linear interpolation. For pavement surface, the 2708 2946 !-- true pavement depth is considered 2709 2947 DO k = nzb_soil, nzt_soil-1 2710 IF ( surf%pave_surface(m) .AND. zs(k) < pave_depth & 2711 .AND. zs(k+1) > pave_depth ) THEN 2712 surf%lambda_h(k,m) = ( pave_depth - zs(k) ) / dz_soil(k+1)& 2713 * lambda_temp(k) & 2714 + ( 1.0_wp - ( pave_depth - zs(k) ) & 2715 / dz_soil(k+1) ) * lambda_temp(k+1) 2948 IF ( surf%pavement_surface(m) .AND. zs(k) < pavement_depth & 2949 .AND. zs(k+1) > pavement_depth ) & 2950 THEN 2951 surf%lambda_h(k,m) = ( pavement_depth - zs(k) ) * ddz_soil(k+1) & 2952 * lambda_temp(k) & 2953 + ( zs(k+1) - pavement_depth ) * ddz_soil(k+1) & 2954 * lambda_temp(k+1) 2716 2955 ELSE 2717 surf%lambda_h(k,m) = ( lambda_temp(k+1) + lambda_temp(k) ) &2718 * 0.5_wp2956 surf%lambda_h(k,m) = ( lambda_temp(k+1) + lambda_temp(k) ) & 2957 * 0.5_wp 2719 2958 ENDIF 2959 2720 2960 ENDDO 2721 2961 surf%lambda_h(nzt_soil,m) = lambda_temp(nzt_soil) … … 2725 2965 tend(:) = 0.0_wp 2726 2966 2727 tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) * &2967 tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) * & 2728 2968 ( surf%lambda_h(nzb_soil,m) * ( surf_t_soil%var_2d(nzb_soil+1,m) & 2729 - surf_t_soil%var_2d(nzb_soil,m) ) * ddz_soil(nzb_soil +1)&2730 + surf%ghf _eb(m) ) * ddz_soil_stag(nzb_soil)2969 - surf_t_soil%var_2d(nzb_soil,m) ) * ddz_soil(nzb_soil) & 2970 + surf%ghf(m) ) * ddz_soil_layer(nzb_soil) 2731 2971 2732 2972 DO k = nzb_soil+1, nzt_soil 2733 tend(k) = ( 1.0_wp / surf%rho_c_total(k,m) ) &2734 * ( surf%lambda_h(k,m) &2735 * ( surf_t_soil%var_2d(k+1,m) - surf_t_soil%var_2d(k,m) ) 2736 * ddz_soil(k +1)&2737 - surf%lambda_h(k-1,m) &2738 * ( surf_t_soil%var_2d(k,m) - surf_t_soil%var_2d(k-1,m) ) 2739 * ddz_soil(k )&2740 ) * ddz_soil_ stag(k)2973 tend(k) = ( 1.0_wp / surf%rho_c_total(k,m) ) & 2974 * ( surf%lambda_h(k,m) & 2975 * ( surf_t_soil%var_2d(k+1,m) - surf_t_soil%var_2d(k,m) ) & 2976 * ddz_soil(k) & 2977 - surf%lambda_h(k-1,m) & 2978 * ( surf_t_soil%var_2d(k,m) - surf_t_soil%var_2d(k-1,m) ) & 2979 * ddz_soil(k-1) & 2980 ) * ddz_soil_layer(k) 2741 2981 2742 2982 ENDDO … … 2769 3009 ! 2770 3010 !-- Calculate soil diffusivity at the center of the soil layers 2771 lambda_temp(k) = (- b_ch * surf%gamma_w_sat( m) * psi_sat &2772 / surf%m_sat( m) ) * ( MAX( surf_m_soil%var_2d(k,m), &2773 surf%m_wilt( m) ) / surf%m_sat(m) )**(&3011 lambda_temp(k) = (- b_ch * surf%gamma_w_sat(k,m) * psi_sat & 3012 / surf%m_sat(k,m) ) * ( MAX( surf_m_soil%var_2d(k,m), & 3013 surf%m_wilt(k,m) ) / surf%m_sat(k,m) )**(& 2774 3014 b_ch + 2.0_wp ) 2775 3015 2776 3016 ! 2777 3017 !-- Parametrization of Van Genuchten 2778 IF ( soil_type /= 7 ) THEN 2779 ! 2780 !-- Calculate the hydraulic conductivity after Van Genuchten 2781 !-- (1980) 2782 h_vg = ( ( ( surf%m_res(m) - surf%m_sat(m) ) / & 2783 ( surf%m_res(m) - & 2784 MAX( surf_m_soil%var_2d(k,m), surf%m_wilt(m) ) & 2785 ) & 2786 )**( & 2787 surf%n_vg(m) / ( surf%n_vg(m) - 1.0_wp ) & 2788 ) - 1.0_wp & 2789 )**( 1.0_wp / surf%n_vg(m) ) / surf%alpha_vg(m) 2790 2791 gamma_temp(k) = surf%gamma_w_sat(m) * ( ( ( 1.0_wp + & 2792 ( surf%alpha_vg(m) * h_vg )**surf%n_vg(m)& 3018 !-- Calculate the hydraulic conductivity after Van Genuchten (1980) 3019 h_vg = ( ( ( surf%m_res(k,m) - surf%m_sat(k,m) ) / & 3020 ( surf%m_res(k,m) - & 3021 MAX( surf_m_soil%var_2d(k,m), surf%m_wilt(k,m) ) & 3022 ) & 3023 )**( & 3024 surf%n_vg(k,m) / ( surf%n_vg(k,m) - 1.0_wp ) & 3025 ) - 1.0_wp & 3026 )**( 1.0_wp / surf%n_vg(k,m) ) / surf%alpha_vg(k,m) 3027 3028 gamma_temp(k) = surf%gamma_w_sat(k,m) * ( ( ( 1.0_wp + & 3029 ( surf%alpha_vg(k,m) * h_vg )**surf%n_vg(k,m)& 2793 3030 )**( & 2794 1.0_wp - 1.0_wp / surf%n_vg(m)) - ( & 2795 surf%alpha_vg(m) * h_vg )**( surf%n_vg(m)& 2796 - 1.0_wp) )**2 ) & 2797 / ( ( 1.0_wp + ( surf%alpha_vg(m) * h_vg & 2798 )**surf%n_vg(m) )**( ( 1.0_wp - 1.0_wp & 2799 / surf%n_vg(m) ) * & 2800 ( surf%l_vg(m) + 2.0_wp) ) ) 2801 ! 2802 !-- Parametrization of Clapp & Hornberger 2803 ELSE 2804 gamma_temp(k) = surf%gamma_w_sat(m) * ( surf_m_soil%var_2d(k,m) & 2805 / surf%m_sat(m) )**(2.0_wp * b_ch + 3.0_wp) 2806 ENDIF 3031 1.0_wp - 1.0_wp / surf%n_vg(k,m)) - ( & 3032 surf%alpha_vg(k,m) * h_vg )**( surf%n_vg(k,m)& 3033 - 1.0_wp) )**2 ) & 3034 / ( ( 1.0_wp + ( surf%alpha_vg(k,m) * h_vg & 3035 )**surf%n_vg(k,m) )**( ( 1.0_wp - 1.0_wp & 3036 / surf%n_vg(k,m) ) * & 3037 ( surf%l_vg(k,m) + 2.0_wp) ) ) 2807 3038 2808 3039 ENDDO … … 2812 3043 !-- when humidity is enabled in the atmosphere and the surface type 2813 3044 !-- is not pavement (implies dry soil below). 2814 IF ( humidity .AND. .NOT. surf%pave _surface(m) ) THEN2815 ! 2816 !-- Calculate soil diffusivity (lambda_w) at the _ staglevel3045 IF ( humidity .AND. .NOT. surf%pavement_surface(m) ) THEN 3046 ! 3047 !-- Calculate soil diffusivity (lambda_w) at the _layer level 2817 3048 !-- using linear interpolation. To do: replace this with 2818 3049 !-- ECMWF-IFS Eq. 8.81 … … 2837 3068 ENDIF 2838 3069 2839 !-- The root extraction (= root_extr * qsws_veg _eb/ (rho_l3070 !-- The root extraction (= root_extr * qsws_veg / (rho_l 2840 3071 !-- * l_v)) ensures the mass conservation for water. The 2841 3072 !-- transpiration of plants equals the cumulative withdrawals by … … 2852 3083 m_total = 0.0_wp 2853 3084 DO k = nzb_soil, nzt_soil 2854 IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt( m) ) THEN3085 IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt(k,m) ) THEN 2855 3086 m_total = m_total + surf%root_fr(k,m) * surf_m_soil%var_2d(k,m) 2856 3087 ENDIF … … 2858 3089 IF ( m_total > 0.0_wp ) THEN 2859 3090 DO k = nzb_soil, nzt_soil 2860 IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt( m) ) THEN3091 IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt(k,m) ) THEN 2861 3092 root_extr(k) = surf%root_fr(k,m) * surf_m_soil%var_2d(k,m) & 2862 3093 / m_total … … 2872 3103 tend(nzb_soil) = ( surf%lambda_w(nzb_soil,m) * ( & 2873 3104 surf_m_soil%var_2d(nzb_soil+1,m) - surf_m_soil%var_2d(nzb_soil,m) ) & 2874 * ddz_soil(nzb_soil +1) - surf%gamma_w(nzb_soil,m) - &3105 * ddz_soil(nzb_soil) - surf%gamma_w(nzb_soil,m) - & 2875 3106 ( & 2876 root_extr(nzb_soil) * surf%qsws_veg _eb(m) &2877 + surf%qsws_soil _eb(m) ) * drho_l_lv ) &2878 * ddz_soil_ stag(nzb_soil)3107 root_extr(nzb_soil) * surf%qsws_veg(m) & 3108 + surf%qsws_soil(m) ) * drho_l_lv ) & 3109 * ddz_soil_layer(nzb_soil) 2879 3110 2880 3111 DO k = nzb_soil+1, nzt_soil-1 2881 3112 tend(k) = ( surf%lambda_w(k,m) * ( surf_m_soil%var_2d(k+1,m) & 2882 - surf_m_soil%var_2d(k,m) ) * ddz_soil(k +1) &3113 - surf_m_soil%var_2d(k,m) ) * ddz_soil(k) & 2883 3114 - surf%gamma_w(k,m) & 2884 3115 - surf%lambda_w(k-1,m) * ( surf_m_soil%var_2d(k,m) - & 2885 surf_m_soil%var_2d(k-1,m)) * ddz_soil(k ) &3116 surf_m_soil%var_2d(k-1,m)) * ddz_soil(k-1) & 2886 3117 + surf%gamma_w(k-1,m) - (root_extr(k) & 2887 * surf%qsws_veg _eb(m) * drho_l_lv) &2888 ) * ddz_soil_ stag(k)3118 * surf%qsws_veg(m) * drho_l_lv) & 3119 ) * ddz_soil_layer(k) 2889 3120 ENDDO 2890 3121 tend(nzt_soil) = ( - surf%gamma_w(nzt_soil,m) & … … 2892 3123 * ( surf_m_soil%var_2d(nzt_soil,m) & 2893 3124 - surf_m_soil%var_2d(nzt_soil-1,m)) & 2894 * ddz_soil(nzt_soil ) &3125 * ddz_soil(nzt_soil-1) & 2895 3126 + surf%gamma_w(nzt_soil-1,m) - ( & 2896 3127 root_extr(nzt_soil) & 2897 * surf%qsws_veg _eb(m) * drho_l_lv ) &2898 ) * ddz_soil_ stag(nzt_soil)3128 * surf%qsws_veg(m) * drho_l_lv ) & 3129 ) * ddz_soil_layer(nzt_soil) 2899 3130 2900 3131 surf_m_soil_p%var_2d(nzb_soil:nzt_soil,m) = surf_m_soil%var_2d(nzb_soil:nzt_soil,m) & … … 2950 3181 IF ( humidity ) THEN 2951 3182 m_soil_h = m_soil_h_p 2952 m_liq_ eb_h = m_liq_eb_h_p3183 m_liq_h = m_liq_h_p 2953 3184 ENDIF 2954 3185 ! … … 2958 3189 IF ( humidity ) THEN 2959 3190 m_soil_v = m_soil_v_p 2960 m_liq_ eb_v = m_liq_eb_v_p3191 m_liq_v = m_liq_v_p 2961 3192 ENDIF 2962 3193 … … 2972 3203 IF ( humidity ) THEN 2973 3204 m_soil_h => m_soil_h_1; m_soil_h_p => m_soil_h_2 2974 m_liq_ eb_h => m_liq_eb_h_1; m_liq_eb_h_p => m_liq_eb_h_23205 m_liq_h => m_liq_h_1; m_liq_h_p => m_liq_h_2 2975 3206 ENDIF 2976 3207 ! … … 2980 3211 IF ( humidity ) THEN 2981 3212 m_soil_v => m_soil_v_1; m_soil_v_p => m_soil_v_2 2982 m_liq_ eb_v => m_liq_eb_v_1; m_liq_eb_v_p => m_liq_eb_v_23213 m_liq_v => m_liq_v_1; m_liq_v_p => m_liq_v_2 2983 3214 ENDIF 2984 3215 … … 2992 3223 IF ( humidity ) THEN 2993 3224 m_soil_h => m_soil_h_2; m_soil_h_p => m_soil_h_1 2994 m_liq_ eb_h => m_liq_eb_h_2; m_liq_eb_h_p => m_liq_eb_h_13225 m_liq_h => m_liq_h_2; m_liq_h_p => m_liq_h_1 2995 3226 ENDIF 2996 3227 ! … … 3000 3231 IF ( humidity ) THEN 3001 3232 m_soil_v => m_soil_v_2; m_soil_v_p => m_soil_v_1 3002 m_liq_ eb_v => m_liq_eb_v_2; m_liq_eb_v_p => m_liq_eb_v_13233 m_liq_v => m_liq_v_2; m_liq_v_p => m_liq_v_1 3003 3234 ENDIF 3004 3235 … … 3058 3289 c_veg_av = 0.0_wp 3059 3290 3060 CASE ( 'ghf _eb*' )3061 IF ( .NOT. ALLOCATED( ghf_ eb_av ) ) THEN3062 ALLOCATE( ghf_ eb_av(nysg:nyng,nxlg:nxrg) )3291 CASE ( 'ghf*' ) 3292 IF ( .NOT. ALLOCATED( ghf_av ) ) THEN 3293 ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) ) 3063 3294 ENDIF 3064 ghf_ eb_av = 0.0_wp3295 ghf_av = 0.0_wp 3065 3296 3066 3297 CASE ( 'lai*' ) … … 3070 3301 lai_av = 0.0_wp 3071 3302 3072 CASE ( 'm_liq _eb*' )3073 IF ( .NOT. ALLOCATED( m_liq_ eb_av ) ) THEN3074 ALLOCATE( m_liq_ eb_av(nysg:nyng,nxlg:nxrg) )3303 CASE ( 'm_liq*' ) 3304 IF ( .NOT. ALLOCATED( m_liq_av ) ) THEN 3305 ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) ) 3075 3306 ENDIF 3076 m_liq_ eb_av = 0.0_wp3307 m_liq_av = 0.0_wp 3077 3308 3078 3309 CASE ( 'm_soil' ) … … 3082 3313 m_soil_av = 0.0_wp 3083 3314 3084 CASE ( 'qsws_ eb*' )3085 IF ( .NOT. ALLOCATED( qsws_ eb_av ) ) THEN3086 ALLOCATE( qsws_ eb_av(nysg:nyng,nxlg:nxrg) )3315 CASE ( 'qsws_liq*' ) 3316 IF ( .NOT. ALLOCATED( qsws_liq_av ) ) THEN 3317 ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) ) 3087 3318 ENDIF 3088 qsws_ eb_av = 0.0_wp3089 3090 CASE ( 'qsws_ liq_eb*' )3091 IF ( .NOT. ALLOCATED( qsws_ liq_eb_av ) ) THEN3092 ALLOCATE( qsws_ liq_eb_av(nysg:nyng,nxlg:nxrg) )3319 qsws_liq_av = 0.0_wp 3320 3321 CASE ( 'qsws_soil*' ) 3322 IF ( .NOT. ALLOCATED( qsws_soil_av ) ) THEN 3323 ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) ) 3093 3324 ENDIF 3094 qsws_ liq_eb_av = 0.0_wp3095 3096 CASE ( 'qsws_ soil_eb*' )3097 IF ( .NOT. ALLOCATED( qsws_ soil_eb_av ) ) THEN3098 ALLOCATE( qsws_ soil_eb_av(nysg:nyng,nxlg:nxrg) )3325 qsws_soil_av = 0.0_wp 3326 3327 CASE ( 'qsws_veg*' ) 3328 IF ( .NOT. ALLOCATED( qsws_veg_av ) ) THEN 3329 ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) ) 3099 3330 ENDIF 3100 qsws_soil_eb_av = 0.0_wp 3101 3102 CASE ( 'qsws_veg_eb*' ) 3103 IF ( .NOT. ALLOCATED( qsws_veg_eb_av ) ) THEN 3104 ALLOCATE( qsws_veg_eb_av(nysg:nyng,nxlg:nxrg) ) 3105 ENDIF 3106 qsws_veg_eb_av = 0.0_wp 3331 qsws_veg_av = 0.0_wp 3107 3332 3108 3333 CASE ( 'r_a*' ) … … 3118 3343 r_s_av = 0.0_wp 3119 3344 3120 CASE ( 'shf_eb*' )3121 IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN3122 ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) )3123 ENDIF3124 shf_eb_av = 0.0_wp3125 3126 3345 CASE ( 't_soil' ) 3127 3346 IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN … … 3160 3379 ENDDO 3161 3380 3162 CASE ( 'ghf _eb*' )3381 CASE ( 'ghf*' ) 3163 3382 DO m = 1, surf_lsm_h%ns 3164 3383 i = surf_lsm_h%i(m) 3165 3384 j = surf_lsm_h%j(m) 3166 ghf_ eb_av(j,i) = ghf_eb_av(j,i) + surf_lsm_h%ghf_eb(m)3385 ghf_av(j,i) = ghf_av(j,i) + surf_lsm_h%ghf(m) 3167 3386 ENDDO 3168 3387 … … 3174 3393 ENDDO 3175 3394 3176 CASE ( 'm_liq _eb*' )3395 CASE ( 'm_liq*' ) 3177 3396 DO m = 1, surf_lsm_h%ns 3178 3397 i = surf_lsm_h%i(m) 3179 3398 j = surf_lsm_h%j(m) 3180 m_liq_ eb_av(j,i) = m_liq_eb_av(j,i) + m_liq_eb_h%var_1d(m)3399 m_liq_av(j,i) = m_liq_av(j,i) + m_liq_h%var_1d(m) 3181 3400 ENDDO 3182 3401 … … 3190 3409 ENDDO 3191 3410 3192 CASE ( 'qsws_ eb*' )3411 CASE ( 'qsws_liq*' ) 3193 3412 DO m = 1, surf_lsm_h%ns 3194 3413 i = surf_lsm_h%i(m) 3195 3414 j = surf_lsm_h%j(m) 3196 qsws_eb_av(j,i) = qsws_eb_av(j,i) + surf_lsm_h%qsws_eb(m) 3197 ENDDO 3198 3199 CASE ( 'qsws_liq_eb*' ) 3415 qsws_liq_av(j,i) = qsws_liq_av(j,i) + & 3416 surf_lsm_h%qsws_liq(m) 3417 ENDDO 3418 3419 CASE ( 'qsws_soil*' ) 3200 3420 DO m = 1, surf_lsm_h%ns 3201 3421 i = surf_lsm_h%i(m) 3202 3422 j = surf_lsm_h%j(m) 3203 qsws_ liq_eb_av(j,i) = qsws_liq_eb_av(j,i) +&3204 surf_lsm_h%qsws_liq_eb(m)3205 ENDDO 3206 3207 CASE ( 'qsws_ soil_eb*' )3423 qsws_soil_av(j,i) = qsws_soil_av(j,i) + & 3424 surf_lsm_h%qsws_soil(m) 3425 ENDDO 3426 3427 CASE ( 'qsws_veg*' ) 3208 3428 DO m = 1, surf_lsm_h%ns 3209 3429 i = surf_lsm_h%i(m) 3210 3430 j = surf_lsm_h%j(m) 3211 qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) + & 3212 surf_lsm_h%qsws_soil_eb(m) 3213 ENDDO 3214 3215 CASE ( 'qsws_veg_eb*' ) 3216 DO m = 1, surf_lsm_h%ns 3217 i = surf_lsm_h%i(m) 3218 j = surf_lsm_h%j(m) 3219 qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) + & 3220 surf_lsm_h%qsws_veg_eb(m) 3431 qsws_veg_av(j,i) = qsws_veg_av(j,i) + & 3432 surf_lsm_h%qsws_veg(m) 3221 3433 ENDDO 3222 3434 … … 3233 3445 j = surf_lsm_h%j(m) 3234 3446 r_s_av(j,i) = r_s_av(j,i) + surf_lsm_h%r_s(m) 3235 ENDDO3236 3237 CASE ( 'shf_eb*' )3238 DO m = 1, surf_lsm_h%ns3239 i = surf_lsm_h%i(m)3240 j = surf_lsm_h%j(m)3241 shf_eb_av(j,i) = shf_eb_av(j,i) + surf_lsm_h%shf_eb(m)3242 3447 ENDDO 3243 3448 … … 3281 3486 ENDDO 3282 3487 3283 CASE ( 'ghf _eb*' )3488 CASE ( 'ghf*' ) 3284 3489 DO i = nxl, nxr 3285 3490 DO j = nys, nyn 3286 ghf_ eb_av(j,i) = ghf_eb_av(j,i) / REAL( average_count_3d, KIND=wp )3491 ghf_av(j,i) = ghf_av(j,i) / REAL( average_count_3d, KIND=wp ) 3287 3492 ENDDO 3288 3493 ENDDO … … 3295 3500 ENDDO 3296 3501 3297 CASE ( 'm_liq _eb*' )3502 CASE ( 'm_liq*' ) 3298 3503 DO i = nxl, nxr 3299 3504 DO j = nys, nyn 3300 m_liq_ eb_av(j,i) = m_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp )3505 m_liq_av(j,i) = m_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) 3301 3506 ENDDO 3302 3507 ENDDO … … 3311 3516 ENDDO 3312 3517 3313 CASE ( 'qsws_ eb*' )3518 CASE ( 'qsws_liq*' ) 3314 3519 DO i = nxl, nxr 3315 3520 DO j = nys, nyn 3316 qsws_ eb_av(j,i) = qsws_eb_av(j,i) / REAL( average_count_3d, KIND=wp )3521 qsws_liq_av(j,i) = qsws_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) 3317 3522 ENDDO 3318 3523 ENDDO 3319 3524 3320 CASE ( 'qsws_ liq_eb*' )3525 CASE ( 'qsws_soil*' ) 3321 3526 DO i = nxl, nxr 3322 3527 DO j = nys, nyn 3323 qsws_ liq_eb_av(j,i) = qsws_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp )3528 qsws_soil_av(j,i) = qsws_soil_av(j,i) / REAL( average_count_3d, KIND=wp ) 3324 3529 ENDDO 3325 3530 ENDDO 3326 3531 3327 CASE ( 'qsws_ soil_eb*' )3532 CASE ( 'qsws_veg*' ) 3328 3533 DO i = nxl, nxr 3329 3534 DO j = nys, nyn 3330 qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 3331 ENDDO 3332 ENDDO 3333 3334 CASE ( 'qsws_veg_eb*' ) 3335 DO i = nxl, nxr 3336 DO j = nys, nyn 3337 qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 3535 qsws_veg_av(j,i) = qsws_veg_av(j,i) / REAL( average_count_3d, KIND=wp ) 3338 3536 ENDDO 3339 3537 ENDDO … … 3503 3701 grid = 'zu1' 3504 3702 3505 CASE ( 'ghf _eb*_xy' ) ! 2d-array3703 CASE ( 'ghf*_xy' ) ! 2d-array 3506 3704 IF ( av == 0 ) THEN 3507 3705 DO m = 1, surf_lsm_h%ns 3508 3706 i = surf_lsm_h%i(m) 3509 3707 j = surf_lsm_h%j(m) 3510 local_pf(i,j,nzb+1) = surf_lsm_h%ghf _eb(m)3708 local_pf(i,j,nzb+1) = surf_lsm_h%ghf(m) 3511 3709 ENDDO 3512 3710 ELSE 3513 3711 DO i = nxlg, nxrg 3514 3712 DO j = nysg, nyng 3515 local_pf(i,j,nzb+1) = ghf_ eb_av(j,i)3713 local_pf(i,j,nzb+1) = ghf_av(j,i) 3516 3714 ENDDO 3517 3715 ENDDO … … 3539 3737 grid = 'zu1' 3540 3738 3541 CASE ( 'm_liq _eb*_xy' ) ! 2d-array3739 CASE ( 'm_liq*_xy' ) ! 2d-array 3542 3740 IF ( av == 0 ) THEN 3543 3741 DO m = 1, surf_lsm_h%ns 3544 3742 i = surf_lsm_h%i(m) 3545 3743 j = surf_lsm_h%j(m) 3546 local_pf(i,j,nzb+1) = m_liq_ eb_h%var_1d(m)3744 local_pf(i,j,nzb+1) = m_liq_h%var_1d(m) 3547 3745 ENDDO 3548 3746 ELSE 3549 3747 DO i = nxlg, nxrg 3550 3748 DO j = nysg, nyng 3551 local_pf(i,j,nzb+1) = m_liq_ eb_av(j,i)3749 local_pf(i,j,nzb+1) = m_liq_av(j,i) 3552 3750 ENDDO 3553 3751 ENDDO … … 3581 3779 IF ( mode == 'xy' ) grid = 'zs' 3582 3780 3583 CASE ( 'qsws_ eb*_xy' ) ! 2d-array3781 CASE ( 'qsws_liq*_xy' ) ! 2d-array 3584 3782 IF ( av == 0 ) THEN 3585 3783 DO m = 1, surf_lsm_h%ns 3586 3784 i = surf_lsm_h%i(m) 3587 3785 j = surf_lsm_h%j(m) 3588 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_eb(m)3786 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_liq(m) 3589 3787 ENDDO 3590 3788 ELSE 3591 3789 DO i = nxlg, nxrg 3592 3790 DO j = nysg, nyng 3593 local_pf(i,j,nzb+1) = qsws_ eb_av(j,i)3791 local_pf(i,j,nzb+1) = qsws_liq_av(j,i) 3594 3792 ENDDO 3595 3793 ENDDO … … 3599 3797 grid = 'zu1' 3600 3798 3601 CASE ( 'qsws_ liq_eb*_xy' ) ! 2d-array3799 CASE ( 'qsws_soil*_xy' ) ! 2d-array 3602 3800 IF ( av == 0 ) THEN 3603 3801 DO m = 1, surf_lsm_h%ns 3604 3802 i = surf_lsm_h%i(m) 3605 3803 j = surf_lsm_h%j(m) 3606 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_liq_eb(m)3804 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_soil(m) 3607 3805 ENDDO 3608 3806 ELSE 3609 3807 DO i = nxlg, nxrg 3610 3808 DO j = nysg, nyng 3611 local_pf(i,j,nzb+1) = qsws_ liq_eb_av(j,i)3809 local_pf(i,j,nzb+1) = qsws_soil_av(j,i) 3612 3810 ENDDO 3613 3811 ENDDO … … 3617 3815 grid = 'zu1' 3618 3816 3619 CASE ( 'qsws_ soil_eb*_xy' ) ! 2d-array3817 CASE ( 'qsws_veg*_xy' ) ! 2d-array 3620 3818 IF ( av == 0 ) THEN 3621 3819 DO m = 1, surf_lsm_h%ns 3622 3820 i = surf_lsm_h%i(m) 3623 3821 j = surf_lsm_h%j(m) 3624 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_ soil_eb(m)3822 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_veg(m) 3625 3823 ENDDO 3626 3824 ELSE 3627 3825 DO i = nxlg, nxrg 3628 3826 DO j = nysg, nyng 3629 local_pf(i,j,nzb+1) = qsws_soil_eb_av(j,i) 3630 ENDDO 3631 ENDDO 3632 ENDIF 3633 3634 two_d = .TRUE. 3635 grid = 'zu1' 3636 3637 CASE ( 'qsws_veg_eb*_xy' ) ! 2d-array 3638 IF ( av == 0 ) THEN 3639 DO m = 1, surf_lsm_h%ns 3640 i = surf_lsm_h%i(m) 3641 j = surf_lsm_h%j(m) 3642 local_pf(i,j,nzb+1) = surf_lsm_h%qsws_veg_eb(m) 3643 ENDDO 3644 ELSE 3645 DO i = nxlg, nxrg 3646 DO j = nysg, nyng 3647 local_pf(i,j,nzb+1) = qsws_veg_eb_av(j,i) 3827 local_pf(i,j,nzb+1) = qsws_veg_av(j,i) 3648 3828 ENDDO 3649 3829 ENDDO … … 3683 3863 DO j = nysg, nyng 3684 3864 local_pf(i,j,nzb+1) = r_s_av(j,i) 3685 ENDDO3686 ENDDO3687 ENDIF3688 3689 two_d = .TRUE.3690 grid = 'zu1'3691 3692 CASE ( 'shf_eb*_xy' ) ! 2d-array3693 IF ( av == 0 ) THEN3694 DO m = 1, surf_lsm_h%ns3695 i = surf_lsm_h%i(m)3696 j = surf_lsm_h%j(m)3697 local_pf(i,j,nzb+1) = surf_lsm_h%shf_eb(m)3698 ENDDO3699 ELSE3700 DO i = nxlg, nxrg3701 DO j = nysg, nyng3702 local_pf(i,j,nzb+1) = shf_eb_av(j,i)3703 3865 ENDDO 3704 3866 ENDDO … … 3852 4014 WRITE ( 14 ) 'c_veg_av '; WRITE ( 14 ) c_veg_av 3853 4015 ENDIF 3854 IF ( ALLOCATED( ghf_ eb_av ) ) THEN3855 WRITE ( 14 ) 'ghf_ eb_av '; WRITE ( 14 ) ghf_eb_av4016 IF ( ALLOCATED( ghf_av ) ) THEN 4017 WRITE ( 14 ) 'ghf_av '; WRITE ( 14 ) ghf_av 3856 4018 ENDIF 3857 4019 IF ( ALLOCATED( lai_av ) ) THEN 3858 4020 WRITE ( 14 ) 'lai_av '; WRITE ( 14 ) lai_av 3859 4021 ENDIF 3860 WRITE ( 14 ) 'm_liq _eb '; WRITE ( 14 ) m_liq_eb_h%var_1d3861 IF ( ALLOCATED( m_liq_ eb_av ) ) THEN3862 WRITE ( 14 ) 'm_liq_ eb_av '; WRITE ( 14 ) m_liq_eb_av4022 WRITE ( 14 ) 'm_liq '; WRITE ( 14 ) m_liq_h%var_1d 4023 IF ( ALLOCATED( m_liq_av ) ) THEN 4024 WRITE ( 14 ) 'm_liq_av '; WRITE ( 14 ) m_liq_av 3863 4025 ENDIF 3864 4026 WRITE ( 14 ) 'm_soil '; WRITE ( 14 ) m_soil_h%var_2d … … 3866 4028 WRITE ( 14 ) 'm_soil_av '; WRITE ( 14 ) m_soil_av 3867 4029 ENDIF 3868 IF ( ALLOCATED( qsws_eb_av ) ) THEN 3869 WRITE ( 14 ) 'qsws_eb_av '; WRITE ( 14 ) qsws_eb_av 3870 ENDIF 3871 IF ( ALLOCATED( qsws_liq_eb_av ) ) THEN 3872 WRITE ( 14 ) 'qsws_liq_eb_av '; WRITE ( 14 ) qsws_liq_eb_av 4030 IF ( ALLOCATED( qsws_liq_av ) ) THEN 4031 WRITE ( 14 ) 'qsws_liq_av '; WRITE ( 14 ) qsws_liq_av 3873 4032 ENDIF 3874 IF ( ALLOCATED( qsws_soil_ eb_av ) ) THEN3875 WRITE ( 14 ) 'qsws_soil_ eb_av '; WRITE ( 14 ) qsws_soil_eb_av4033 IF ( ALLOCATED( qsws_soil_av ) ) THEN 4034 WRITE ( 14 ) 'qsws_soil_av '; WRITE ( 14 ) qsws_soil_av 3876 4035 ENDIF 3877 IF ( ALLOCATED( qsws_veg_ eb_av ) ) THEN3878 WRITE ( 14 ) 'qsws_veg_ eb_av '; WRITE ( 14 ) qsws_veg_eb_av4036 IF ( ALLOCATED( qsws_veg_av ) ) THEN 4037 WRITE ( 14 ) 'qsws_veg_av '; WRITE ( 14 ) qsws_veg_av 3879 4038 ENDIF 3880 IF ( ALLOCATED( shf_eb_av ) ) THEN3881 WRITE ( 14 ) 'shf_eb_av '; WRITE ( 14 ) shf_eb_av3882 ENDIF3883 4039 WRITE ( 14 ) 't_soil '; WRITE ( 14 ) t_soil_h%var_2d 3884 4040 IF ( ALLOCATED( t_soil_av ) ) THEN … … 4002 4158 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4003 4159 4004 CASE ( 'ghf_ eb_av' )4005 IF ( .NOT. ALLOCATED( ghf_ eb_av ) ) THEN4006 ALLOCATE( ghf_ eb_av(nysg:nyng,nxlg:nxrg) )4160 CASE ( 'ghf_av' ) 4161 IF ( .NOT. ALLOCATED( ghf_av ) ) THEN 4162 ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) ) 4007 4163 ENDIF 4008 4164 IF ( k == 1 ) READ ( 13 ) tmp_2d 4009 ghf_ eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4165 ghf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4010 4166 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4011 4167 4012 CASE ( 'm_liq _eb' )4168 CASE ( 'm_liq' ) 4013 4169 IF ( k == 1 ) READ ( 13 ) tmp_walltype_1d !tmp_2d 4014 m_liq_ eb_h%var_1d(1:surf_lsm_h%ns) = &4170 m_liq_h%var_1d(1:surf_lsm_h%ns) = & 4015 4171 tmp_walltype_1d(1:surf_lsm_h%ns) 4016 4172 … … 4023 4179 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4024 4180 4025 CASE ( 'm_liq_ eb_av' )4026 IF ( .NOT. ALLOCATED( m_liq_ eb_av ) ) THEN4027 ALLOCATE( m_liq_ eb_av(nysg:nyng,nxlg:nxrg) )4181 CASE ( 'm_liq_av' ) 4182 IF ( .NOT. ALLOCATED( m_liq_av ) ) THEN 4183 ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) ) 4028 4184 ENDIF 4029 4185 IF ( k == 1 ) READ ( 13 ) tmp_2d 4030 m_liq_ eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4186 m_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4031 4187 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4032 4188 … … 4045 4201 -nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4046 4202 4047 CASE ( 'qsws_ eb_av' )4048 IF ( .NOT. ALLOCATED( qsws_ eb_av ) ) THEN4049 ALLOCATE( qsws_ eb_av(nysg:nyng,nxlg:nxrg) )4203 CASE ( 'qsws_liq_av' ) 4204 IF ( .NOT. ALLOCATED( qsws_liq_av ) ) THEN 4205 ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) ) 4050 4206 ENDIF 4051 4207 IF ( k == 1 ) READ ( 13 ) tmp_2d 4052 qsws_ eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =&4208 qsws_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4053 4209 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4054 4055 CASE ( 'qsws_liq_eb_av' ) 4056 IF ( .NOT. ALLOCATED( qsws_liq_eb_av ) ) THEN 4057 ALLOCATE( qsws_liq_eb_av(nysg:nyng,nxlg:nxrg) ) 4210 CASE ( 'qsws_soil_av' ) 4211 IF ( .NOT. ALLOCATED( qsws_soil_av ) ) THEN 4212 ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) ) 4058 4213 ENDIF 4059 4214 IF ( k == 1 ) READ ( 13 ) tmp_2d 4060 qsws_ liq_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =&4215 qsws_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4061 4216 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4062 CASE ( 'qsws_soil_eb_av' ) 4063 IF ( .NOT. ALLOCATED( qsws_soil_eb_av ) ) THEN 4064 ALLOCATE( qsws_soil_eb_av(nysg:nyng,nxlg:nxrg) ) 4217 4218 CASE ( 'qsws_veg_av' ) 4219 IF ( .NOT. ALLOCATED( qsws_veg_av ) ) THEN 4220 ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) ) 4065 4221 ENDIF 4066 4222 IF ( k == 1 ) READ ( 13 ) tmp_2d 4067 qsws_ soil_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =&4223 qsws_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4068 4224 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4069 4070 CASE ( 'qsws_veg_eb_av' )4071 IF ( .NOT. ALLOCATED( qsws_veg_eb_av ) ) THEN4072 ALLOCATE( qsws_veg_eb_av(nysg:nyng,nxlg:nxrg) )4073 ENDIF4074 IF ( k == 1 ) READ ( 13 ) tmp_2d4075 qsws_veg_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4076 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)4077 4078 CASE ( 'shf_eb_av' )4079 IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN4080 ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) )4081 ENDIF4082 IF ( k == 1 ) READ ( 13 ) tmp_2d4083 shf_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4084 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)4085 4225 4086 4226 CASE ( 't_soil' ) -
palm/trunk/SOURCE/lpm_splitting.f90
r2263 r2270 25 25 ! ----------------- 26 26 ! 27 ! 28 ! 29 ! 27 30 ! Initial revision 28 31 ! -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r2265 r2270 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Removed 2 timeseries (shf_eb + qsws_eb). Removed _eb suffixes 28 ! 29 ! 2265 2017-06-08 16:58:28Z schwenkel 27 30 ! Unused variables removed. 28 31 ! … … 250 253 'm2/s2 ', 'm2/s2 ', 'm2/s2 ', 'm2/s2 ', 'number2' /) 251 254 252 INTEGER(iwp) :: dots_num = 33!< number of timeseries defined by default255 INTEGER(iwp) :: dots_num = 25 !< number of timeseries defined by default 253 256 INTEGER(iwp) :: dots_soil = 26 !< starting index for soil-timeseries 254 INTEGER(iwp) :: dots_rad = 3 4!< starting index for radiation-timeseries257 INTEGER(iwp) :: dots_rad = 32 !< starting index for radiation-timeseries 255 258 256 259 CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label = & … … 263 266 'w"u"0 ', 'w"v"0 ', 'w"q"0 ', & 264 267 'ol ', 'q* ', 'w"s" ', & 265 's* ', 'ghf _eb ', 'shf_eb', &266 'qsws_ eb ', 'qsws_liq_eb ', 'qsws_soil_eb', &267 ' qsws_veg_eb ', 'r_a ', 'r_s ',&268 's* ', 'ghf ', 'qsws_liq ', & 269 'qsws_soil ', 'qsws_veg ', 'r_a ', & 270 'r_s ', & 268 271 'rad_net ', 'rad_lw_in ', 'rad_lw_out ', & 269 272 'rad_sw_in ', 'rad_sw_out ', 'rrtm_aldif ', & 270 273 'rrtm_aldir ', 'rrtm_asdif ', 'rrtm_asdir ', & 271 ( 'unknown ', i9 = 1, dots_max-4 2) /)274 ( 'unknown ', i9 = 1, dots_max-40 ) /) 272 275 273 276 CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_unit = & … … 281 284 'm ', 'kg/kg ', 'kg m/(kg s) ', & 282 285 'kg/kg ', 'W/m2 ', 'W/m2 ', & 283 'W/m2 ', 'W/m2 ', ' W/m2', &284 ' W/m2 ', 's/m ', 's/m ',&286 'W/m2 ', 'W/m2 ', 's/m ', & 287 's/m ', & 285 288 'W/m2 ', 'W/m2 ', 'W/m2 ', & 286 289 'W/m2 ', 'W/m2 ', ' ', & 287 290 ' ', ' ', ' ', & 288 ( 'unknown ', i9 = 1, dots_max-4 2) /)291 ( 'unknown ', i9 = 1, dots_max-40 ) /) 289 292 290 293 CHARACTER (LEN=16) :: heatflux_output_unit !< unit for heatflux output -
palm/trunk/SOURCE/radiation_model_mod.f90
r2249 r2270 20 20 ! Current revisions: 21 21 ! ----------------- 22 !23 22 ! 24 23 ! … … 26 25 ! ----------------- 27 26 ! $Id$ 27 ! Numbering changed (2 timeseries removed) 28 ! 29 ! 2249 2017-06-06 13:58:01Z sward 28 30 ! Allow for RRTMG runs without humidity/cloud physics 29 31 ! … … 658 660 CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 ) 659 661 ELSE 662 dopr_index(var_count) = 99 663 dopr_unit = 'W/m2' 664 hom(:,2,99,:) = SPREAD( zw, 2, statistic_regions+1 ) 665 unit = dopr_unit 666 ENDIF 667 668 CASE ( 'rad_lw_in' ) 669 IF ( ( .NOT. radiation) .OR. radiation_scheme == 'constant' ) & 670 THEN 671 message_string = 'data_output_pr = ' // & 672 TRIM( data_output_pr(var_count) ) // ' is' // & 673 'not available for radiation = .FALSE. or ' //& 674 'radiation_scheme = "constant"' 675 CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 ) 676 ELSE 677 dopr_index(var_count) = 100 678 dopr_unit = 'W/m2' 679 hom(:,2,100,:) = SPREAD( zw, 2, statistic_regions+1 ) 680 unit = dopr_unit 681 ENDIF 682 683 CASE ( 'rad_lw_out' ) 684 IF ( ( .NOT. radiation ) .OR. radiation_scheme == 'constant' ) & 685 THEN 686 message_string = 'data_output_pr = ' // & 687 TRIM( data_output_pr(var_count) ) // ' is' // & 688 'not available for radiation = .FALSE. or ' //& 689 'radiation_scheme = "constant"' 690 CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 ) 691 ELSE 660 692 dopr_index(var_count) = 101 661 693 dopr_unit = 'W/m2' 662 694 hom(:,2,101,:) = SPREAD( zw, 2, statistic_regions+1 ) 663 unit = dopr_unit 695 unit = dopr_unit 664 696 ENDIF 665 697 666 CASE ( 'rad_ lw_in' )667 IF ( ( .NOT. radiation) .OR. radiation_scheme == 'constant' ) &698 CASE ( 'rad_sw_in' ) 699 IF ( ( .NOT. radiation ) .OR. radiation_scheme == 'constant' ) & 668 700 THEN 669 701 message_string = 'data_output_pr = ' // & … … 676 708 dopr_unit = 'W/m2' 677 709 hom(:,2,102,:) = SPREAD( zw, 2, statistic_regions+1 ) 678 unit = dopr_unit 710 unit = dopr_unit 679 711 ENDIF 680 712 681 CASE ( 'rad_ lw_out')682 IF ( ( .NOT. radiation ) .OR. radiation_scheme == 'constant' )&713 CASE ( 'rad_sw_out') 714 IF ( ( .NOT. radiation ) .OR. radiation_scheme == 'constant' )& 683 715 THEN 684 716 message_string = 'data_output_pr = ' // & … … 691 723 dopr_unit = 'W/m2' 692 724 hom(:,2,103,:) = SPREAD( zw, 2, statistic_regions+1 ) 693 unit = dopr_unit 725 unit = dopr_unit 694 726 ENDIF 695 727 696 CASE ( 'rad_ sw_in' )697 IF ( ( .NOT. radiation ) .OR. radiation_scheme == 'constant' )&728 CASE ( 'rad_lw_cs_hr' ) 729 IF ( ( .NOT. radiation ) .OR. radiation_scheme /= 'rrtmg' ) & 698 730 THEN 699 731 message_string = 'data_output_pr = ' // & 700 732 TRIM( data_output_pr(var_count) ) // ' is' // & 701 733 'not available for radiation = .FALSE. or ' //& 702 'radiation_scheme = "constant"'703 CALL message( 'check_parameters', 'PA04 08', 1, 2, 0, 6, 0 )734 'radiation_scheme /= "rrtmg"' 735 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 ) 704 736 ELSE 705 737 dopr_index(var_count) = 104 706 dopr_unit = ' W/m2'707 hom(:,2,104,:) = SPREAD( z w, 2, statistic_regions+1 )738 dopr_unit = 'K/h' 739 hom(:,2,104,:) = SPREAD( zu, 2, statistic_regions+1 ) 708 740 unit = dopr_unit 709 741 ENDIF 710 742 711 CASE ( 'rad_ sw_out')712 IF ( ( .NOT. radiation ) .OR. radiation_scheme == 'constant' )&743 CASE ( 'rad_lw_hr' ) 744 IF ( ( .NOT. radiation ) .OR. radiation_scheme /= 'rrtmg' ) & 713 745 THEN 714 746 message_string = 'data_output_pr = ' // & 715 747 TRIM( data_output_pr(var_count) ) // ' is' // & 716 748 'not available for radiation = .FALSE. or ' //& 717 'radiation_scheme = "constant"'718 CALL message( 'check_parameters', 'PA04 08', 1, 2, 0, 6, 0 )749 'radiation_scheme /= "rrtmg"' 750 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 ) 719 751 ELSE 720 752 dopr_index(var_count) = 105 721 dopr_unit = ' W/m2'722 hom(:,2,105,:) = SPREAD( z w, 2, statistic_regions+1 )753 dopr_unit = 'K/h' 754 hom(:,2,105,:) = SPREAD( zu, 2, statistic_regions+1 ) 723 755 unit = dopr_unit 724 756 ENDIF 725 757 726 CASE ( 'rad_ lw_cs_hr' )758 CASE ( 'rad_sw_cs_hr' ) 727 759 IF ( ( .NOT. radiation ) .OR. radiation_scheme /= 'rrtmg' ) & 728 760 THEN … … 739 771 ENDIF 740 772 741 CASE ( 'rad_ lw_hr' )773 CASE ( 'rad_sw_hr' ) 742 774 IF ( ( .NOT. radiation ) .OR. radiation_scheme /= 'rrtmg' ) & 743 775 THEN … … 751 783 dopr_unit = 'K/h' 752 784 hom(:,2,107,:) = SPREAD( zu, 2, statistic_regions+1 ) 753 unit = dopr_unit754 ENDIF755 756 CASE ( 'rad_sw_cs_hr' )757 IF ( ( .NOT. radiation ) .OR. radiation_scheme /= 'rrtmg' ) &758 THEN759 message_string = 'data_output_pr = ' // &760 TRIM( data_output_pr(var_count) ) // ' is' // &761 'not available for radiation = .FALSE. or ' //&762 'radiation_scheme /= "rrtmg"'763 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )764 ELSE765 dopr_index(var_count) = 108766 dopr_unit = 'K/h'767 hom(:,2,108,:) = SPREAD( zu, 2, statistic_regions+1 )768 unit = dopr_unit769 ENDIF770 771 CASE ( 'rad_sw_hr' )772 IF ( ( .NOT. radiation ) .OR. radiation_scheme /= 'rrtmg' ) &773 THEN774 message_string = 'data_output_pr = ' // &775 TRIM( data_output_pr(var_count) ) // ' is' // &776 'not available for radiation = .FALSE. or ' //&777 'radiation_scheme /= "rrtmg"'778 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )779 ELSE780 dopr_index(var_count) = 109781 dopr_unit = 'K/h'782 hom(:,2,109,:) = SPREAD( zu, 2, statistic_regions+1 )783 785 unit = dopr_unit 784 786 ENDIF -
palm/trunk/SOURCE/surface_mod.f90
r2269 r2270 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Parameters removed/added due to changes in the LSM 28 ! 29 ! 2269 2017-06-09 11:57:32Z suehring 27 30 ! Formatting and description adjustments 28 31 ! … … 137 140 REAL(wp), DIMENSION(:), ALLOCATABLE :: rad_net_l !< net radiation 138 141 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: lambda_h !< heat conductivity of soil (W/m/K) 139 140 ! 141 !-- Variables required for land-surface model 142 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: soil_type_2d !< soil type, 0: user-defined, 1-7: generic (see list) 143 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: veg_type_2d !< vegetation type, 0: user-defined, 1-19: generic (see list) 144 142 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_h_def !< default heat conductivity of soil (W/m/K) 143 145 144 LOGICAL, DIMENSION(:), ALLOCATABLE :: building_surface !< flag parameter indicating that the surface element is covered by buildings (no LSM actions, not implemented yet) 146 LOGICAL, DIMENSION(:), ALLOCATABLE :: pave _surface !< flag parameter for pavements (asphalt etc.) (class 20)147 LOGICAL, DIMENSION(:), ALLOCATABLE :: water_surface !< flag parameter for water surfaces (classes 14+15)148 149 REAL(wp), DIMENSION(:), ALLOCATABLE :: alpha_vg !< coef. of Van Genuchten 145 LOGICAL, DIMENSION(:), ALLOCATABLE :: pavement_surface !< flag parameter for pavements 146 LOGICAL, DIMENSION(:), ALLOCATABLE :: water_surface !< flag parameter for water surfaces 147 LOGICAL, DIMENSION(:), ALLOCATABLE :: vegetation_surface !< flag parameter for natural land surfaces 148 150 149 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_liq !< liquid water coverage (of vegetated area) 151 150 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_veg !< vegetation coverage 152 151 REAL(wp), DIMENSION(:), ALLOCATABLE :: f_sw_in !< fraction of absorbed shortwave radiation by the surface layer (not implemented yet) 153 REAL(wp), DIMENSION(:), ALLOCATABLE :: ghf_eb !< ground heat flux 154 REAL(wp), DIMENSION(:), ALLOCATABLE :: gamma_w_sat !< hydraulic conductivity at saturation 152 REAL(wp), DIMENSION(:), ALLOCATABLE :: ghf !< ground heat flux 155 153 REAL(wp), DIMENSION(:), ALLOCATABLE :: g_d !< coefficient for dependence of r_canopy on water vapour pressure deficit 156 REAL(wp), DIMENSION(:), ALLOCATABLE :: l_vg !< coef. of Van Genuchten157 154 REAL(wp), DIMENSION(:), ALLOCATABLE :: lai !< leaf area index 158 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_surface_u !< coupling between surface and soil (depends on vegetation type) 159 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_surface_s !< coupling between surface and soil (depends on vegetation type) 160 REAL(wp), DIMENSION(:), ALLOCATABLE :: m_fc !< soil moisture at field capacity (m3/m3) 161 REAL(wp), DIMENSION(:), ALLOCATABLE :: m_res !< residual soil moisture 162 REAL(wp), DIMENSION(:), ALLOCATABLE :: m_sat !< saturation soil moisture (m3/m3) 163 REAL(wp), DIMENSION(:), ALLOCATABLE :: m_wilt !< soil moisture at permanent wilting point (m3/m3) 164 REAL(wp), DIMENSION(:), ALLOCATABLE :: n_vg !< coef. Van Genuchten 165 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb !< surface flux of latent heat (total) 166 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_eb !< surface flux of latent heat (liquid water portion) 167 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_soil_eb !< surface flux of latent heat (soil portion) 168 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_eb !< surface flux of latent heat (vegetation portion) 155 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_surface_u !< coupling between surface and soil (depends on vegetation type) (W/m2/K) 156 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_surface_s !< coupling between surface and soil (depends on vegetation type) (W/m2/K) 157 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq !< surface flux of latent heat (liquid water portion) 158 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_soil !< surface flux of latent heat (soil portion) 159 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg !< surface flux of latent heat (vegetation portion) 169 160 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_a !< aerodynamic resistance 170 161 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_canopy !< canopy resistance … … 173 164 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_s !< total surface resistance (combination of r_soil and r_canopy) 174 165 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_canopy_min !< minimum canopy (stomatal) resistance 175 REAL(wp), DIMENSION(:), ALLOCATABLE :: shf_eb !< surface flux of sensible heat 176 166 167 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: alpha_vg !< coef. of Van Genuchten 177 168 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: lambda_w !< hydraulic diffusivity of soil (?) 178 169 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gamma_w !< hydraulic conductivity of soil (W/m/K) 179 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: rho_c_total !< volumetric heat capacity of the actual soil matrix (?) 170 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gamma_w_sat !< hydraulic conductivity at saturation 171 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: l_vg !< coef. of Van Genuchten 172 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: m_fc !< soil moisture at field capacity (m3/m3) 173 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: m_res !< residual soil moisture 174 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: m_sat !< saturation soil moisture (m3/m3) 175 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: m_wilt !< soil moisture at permanent wilting point (m3/m3) 176 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: n_vg !< coef. Van Genuchten 177 REAL(wp), DIMENSION(:), ALLOCATABLE :: rho_c_def !< default volumetric heat capacity of the (soil) layer (J/m3/K) 178 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: rho_c_total !< volumetric heat capacity of the actual soil matrix (J/m3/K) 180 179 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: root_fr !< root fraction within the soil layers 181 180 ! … … 186 185 187 186 REAL(wp), DIMENSION(:), ALLOCATABLE :: albedo_surf !< albedo of the surface 188 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_surface !< heat capacity of the wall surface skin ( J mâ2 Kâ1)187 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_surface !< heat capacity of the wall surface skin (J/m2/K) 189 188 REAL(wp), DIMENSION(:), ALLOCATABLE :: emiss_surf !< emissivity of the wall surface 190 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_surf !< heat conductivity λS between air and surface ( W mâ2 Kâ1)189 REAL(wp), DIMENSION(:), ALLOCATABLE :: lambda_surf !< heat conductivity between air and surface (W/m2/K) 191 190 REAL(wp), DIMENSION(:), ALLOCATABLE :: roughness_wall !< roughness relative to concrete 192 191 REAL(wp), DIMENSION(:), ALLOCATABLE :: thickness_wall !< thickness of the wall, roof and soil layers
Note: See TracChangeset
for help on using the changeset viewer.