- Timestamp:
- Aug 7, 2017 5:11:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r2333 r2340 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Revised root_distribution tabel and implemented a pseudo-generic root fraction 28 ! calculation 29 ! 30 ! 2333 2017-08-04 09:08:26Z maronga 27 31 ! minor bugfixes 28 32 ! … … 306 310 0.07_wp, 0.15_wp, 0.21_wp, & 307 311 0.72_wp, 1.89_wp/) 312 313 REAL(wp), DIMENSION(0:3), PARAMETER :: dz_soil_ref = & ! reference four layer soil configuration used for estimating the root fractions 314 (/ 0.07_wp, 0.21_wp, 0.72_wp, & 315 1.89_wp /) 316 317 REAL(wp), DIMENSION(0:3), PARAMETER :: zs_ref = & ! reference four layer soil configuration used for estimating the root fractions 318 (/ 0.07_wp, 0.28_wp, 1.0_wp, & 319 2.89_wp /) 308 320 309 321 … … 589 601 ! 590 602 !-- Root distribution for default soil layer configuration (sum = 1) 591 !-- level 1 - level 8 592 REAL(wp), DIMENSION(0:7,1:18), PARAMETER :: root_distribution = RESHAPE( (/& 593 1.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 594 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 1 595 0.035_wp, 0.069_wp, 0.069_wp, 0.108_wp, & 596 0.195_wp, 0.214_wp, 0.284_wp, 0.026_wp, & ! 2 597 0.050_wp, 0.100_wp, 0.100_wp, 0.136_wp, & 598 0.181_wp, 0.192_wp, 0.215_wp, 0.026_wp, & ! 3 599 0.038_wp, 0.075_wp, 0.075_wp, 0.111_wp, & 600 0.185_wp, 0.203_wp, 0.273_wp, 0.040_wp, & ! 4 601 0.038_wp, 0.075_wp, 0.075_wp, 0.110_wp, & 602 0.180_wp, 0.199_wp, 0.277_wp, 0.046_wp, & ! 5 603 0.035_wp, 0.069_wp, 0.069_wp, 0.105_wp, & 604 0.180_wp, 0.201_wp, 0.295_wp, 0.046_wp, & ! 6 605 0.035_wp, 0.072_wp, 0.072_wp, 0.105_wp, & 606 0.161_wp, 0.180_wp, 0.282_wp, 0.093_wp, & ! 7 607 0.040_wp, 0.077_wp, 0.077_wp, 0.112_wp, & 608 0.176_wp, 0.192_wp, 0.266_wp, 0.060_wp, & ! 8 609 0.142_wp, 0.286_wp, 0.286_wp, 0.286_wp, & 610 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 9 611 0.068_wp, 0.134_wp, 0.134_wp, 0.177_wp, & 612 0.214_wp, 0.203_wp, 0.070_wp, 0.000_wp, & ! 10 613 0.035_wp, 0.068_wp, 0.068_wp, 0.108_wp, & 614 0.195_wp, 0.215_wp, 0.285_wp, 0.026_wp, & ! 11 615 0.025_wp, 0.048_wp, 0.048_wp, 0.078_wp, & 616 0.147_wp, 0.175_wp, 0.353_wp, 0.126_wp, & ! 12 617 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & 618 0.000_wp, 0.000_wp, 0.000_wp, 0.000_wp, & ! 13 619 0.036_wp, 0.072_wp, 0.072_wp, 0.103_wp, & 620 0.163_wp, 0.180_wp, 0.273_wp, 0.074_wp, & ! 14 621 0.032_wp, 0.066_wp, 0.066_wp, 0.100_wp, & 622 0.172_wp, 0.192_wp, 0.299_wp, 0.073_wp, & ! 15 623 0.032_wp, 0.066_wp, 0.066_wp, 0.100_wp, & 624 0.172_wp, 0.192_wp, 0.299_wp, 0.073_wp, & ! 16 625 0.028_wp, 0.055_wp, 0.055_wp, 0.087_wp, & 626 0.166_wp, 0.195_wp, 0.348_wp, 0.066_wp, & ! 17 627 0.028_wp, 0.055_wp, 0.055_wp, 0.087_wp, & 628 0.166_wp, 0.195_wp, 0.348_wp, 0.066_wp & ! 18 629 /), (/ 8, 18 /) ) 630 603 !-- level 1 - level 4 according to zs_ref 604 REAL(wp), DIMENSION(0:3,1:18), PARAMETER :: root_distribution = RESHAPE( (/ & 605 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 1 606 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp, & ! 2 607 0.35_wp, 0.38_wp, 0.23_wp, 0.04_wp, & ! 3 608 0.26_wp, 0.39_wp, 0.29_wp, 0.06_wp, & ! 4 609 0.26_wp, 0.38_wp, 0.29_wp, 0.07_wp, & ! 5 610 0.24_wp, 0.38_wp, 0.31_wp, 0.07_wp, & ! 6 611 0.25_wp, 0.34_wp, 0.27_wp, 0.14_wp, & ! 7 612 0.27_wp, 0.27_wp, 0.27_wp, 0.09_wp, & ! 8 613 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 9 614 0.47_wp, 0.45_wp, 0.08_wp, 0.00_wp, & ! 10 615 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp, & ! 11 616 0.17_wp, 0.31_wp, 0.33_wp, 0.19_wp, & ! 12 617 0.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 13 618 0.25_wp, 0.34_wp, 0.27_wp, 0.11_wp, & ! 14 619 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp, & ! 15 620 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp, & ! 16 621 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp, & ! 17 622 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp & ! 18 623 /), (/ 4, 18 /) ) 631 624 632 625 ! … … 1238 1231 IF ( dz_soil(k) /= 9999999.9_wp ) THEN 1239 1232 nzt_soil = nzt_soil + 1 1240 IF ( root_fraction(k) == 9999999.9_wp ) THEN1241 message_string = 'manual setting of dz_soil '// &1242 'requires adequate setting of root_fraction'//&1243 '/= 9999999.9 ' // &1244 'and SUM(root_fraction) = 1'1245 CALL message( 'check_parameters', 'PA0452', 1, 2, 0, 6, 0 )1246 ENDIF1247 1233 ENDIF 1248 1234 ENDDO … … 2035 2021 INTEGER(iwp) :: j_off !< index offset of surface element, seen from atmospheric grid point 2036 2022 INTEGER(iwp) :: k !< running index 2023 INTEGER(iwp) :: kn !< running index 2024 INTEGER(iwp) :: ko !< running index 2025 INTEGER(iwp) :: kroot !< running index 2026 INTEGER(iwp) :: kzs !< running index 2037 2027 INTEGER(iwp) :: l !< running index surface facing 2038 2028 INTEGER(iwp) :: m !< running index 2029 INTEGER(iwp) :: n_soil_layers_total !< temperature variable, stores the total number of soil layers + 4 2030 2039 2031 2040 2032 REAL(wp) :: pt1 !< potential temperature at first grid level 2033 2034 REAL(wp), DIMENSION(:), ALLOCATABLE :: bound, bound_root_fr !< temporary arrays for storing index bounds 2041 2035 2042 2036 ! … … 2613 2607 ENDDO 2614 2608 2615 2616 2609 ! 2610 !-- When no root distribution is given by the user, use look-up table to prescribe 2611 !-- the root fraction in the individual soil layers 2617 2612 IF ( ALL( root_fraction == 9999999.9_wp ) ) THEN 2613 2614 ! 2615 !-- First, calculate the index bounds for integration 2616 n_soil_layers_total = nzt_soil - nzb_soil + 6 2617 ALLOCATE ( bound(0:n_soil_layers_total) ) 2618 ALLOCATE ( bound_root_fr(0:n_soil_layers_total) ) 2619 2620 kn = 0 2621 ko = 0 2622 bound(0) = 0.0_wp 2623 DO k = 1, n_soil_layers_total-1 2624 IF ( zs_layer(kn) <= zs_ref(ko) ) THEN 2625 bound(k) = zs_layer(kn) 2626 bound_root_fr(k) = ko 2627 kn = kn + 1 2628 IF ( kn > nzt_soil+1 ) THEN 2629 kn = nzt_soil 2630 ENDIF 2631 ELSE 2632 bound(k) = zs_ref(ko) 2633 bound_root_fr(k) = ko 2634 ko = ko + 1 2635 IF ( ko > 3 ) THEN 2636 ko = 3 2637 ENDIF 2638 ENDIF 2639 2640 ENDDO 2641 2642 ! 2643 !-- Integrate over all soil layers based on the four-layer root fraction 2644 kzs = 1 2645 root_fraction = 0.0_wp 2646 DO k = 0, n_soil_layers_total-2 2647 kroot = bound_root_fr(k+1) 2648 root_fraction(kzs-1) = root_fraction(kzs-1) & 2649 + root_distribution(kroot,vegetation_type) & 2650 / dz_soil_ref(kroot) * ( bound(k+1) - bound(k) ) 2651 2652 IF ( bound(k+1) == zs_layer(kzs-1) ) THEN 2653 kzs = kzs+1 2654 ENDIF 2655 ENDDO 2656 2657 2658 ! 2659 !-- Normalize so that the sum of all fractions equals one 2660 root_fraction = root_fraction / SUM(root_fraction) 2661 2662 DEALLOCATE ( bound ) 2663 DEALLOCATE ( bound_root_fr ) 2664 2665 ! 2666 !-- Map calculated root fractions 2618 2667 DO m = 1, surf_lsm_h%ns 2619 2668 i = surf_lsm_h%i(m) 2620 2669 j = surf_lsm_h%j(m) 2621 2622 2623 2670 DO k = nzb_soil, nzt_soil 2624 surf_lsm_h%root_fr(k,m) = root_distribution(k,vegetation_type) 2625 root_fraction(k) = root_distribution(k,vegetation_type) 2671 surf_lsm_h%root_fr(k,m) = root_fraction(k) 2626 2672 ENDDO 2627 2673 ENDDO … … 2632 2678 2633 2679 DO k = nzb_soil, nzt_soil 2634 surf_lsm_v(l)%root_fr(k,m) = root_distribution(k,vegetation_type) 2635 root_fraction(k) = root_distribution(k,vegetation_type) 2680 surf_lsm_v(l)%root_fr(k,m) = root_fraction(k) 2636 2681 ENDDO 2637 2682 ENDDO 2638 2683 ENDDO 2639 2684 ENDIF 2640 2641 2685 ! 2642 2686 !-- Map vegetation parameters to the respective 2D arrays
Note: See TracChangeset
for help on using the changeset viewer.