Changeset 4312 for palm/trunk/SOURCE/land_surface_model_mod.f90
- Timestamp:
- Nov 27, 2019 2:06:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r4296 r4312 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Initialization of relative surface fractions revised 23 23 ! 24 24 ! Former revisions: … … 2656 2656 soil_type_f%var_2d(j,i) = 1 2657 2657 ! 2658 !-- Set surface_fraction if provided in static input, 2659 !-- else, in case no tiles are used, this will be done 2660 !-- on basis of the prescribed types (vegetation/pavement/ 2661 !-- water_type). 2658 !-- If surface_fraction is provided in static input, 2659 !-- set fraction for vegetation to one at building-covered 2660 !-- surfaces. 2662 2661 IF ( surface_fraction_f%from_file ) THEN 2663 2662 surface_fraction_f%frac(ind_veg_wall,j,i) = 1.0_wp … … 2708 2707 j = surf_lsm_h%j(m) 2709 2708 ! 2710 !-- 0 - vegetation fraction, 1 - pavement fraction, 2 - water fraction 2711 surf_lsm_h%frac(ind_veg_wall,m) = & 2712 surface_fraction_f%frac(ind_veg_wall,j,i) 2713 surf_lsm_h%frac(ind_pav_green,m) = & 2714 surface_fraction_f%frac(ind_pav_green,j,i) 2715 surf_lsm_h%frac(ind_wat_win,m) = & 2709 !-- 0 - vegetation fraction, 1 - pavement fraction, 2 - water fraction 2710 IF ( surface_fraction_f%frac(ind_veg_wall,j,i) /= & 2711 surface_fraction_f%fill ) THEN 2712 surf_lsm_h%frac(ind_veg_wall,m) = & 2713 surface_fraction_f%frac(ind_veg_wall,j,i) 2714 ENDIF 2715 IF ( surface_fraction_f%frac(ind_pav_green,j,i) /= & 2716 surface_fraction_f%fill ) THEN 2717 surf_lsm_h%frac(ind_pav_green,m) = & 2718 surface_fraction_f%frac(ind_pav_green,j,i) 2719 ENDIF 2720 IF ( surface_fraction_f%frac(ind_wat_win,j,i) /= & 2721 surface_fraction_f%fill ) THEN 2722 surf_lsm_h%frac(ind_wat_win,m) = & 2716 2723 surface_fraction_f%frac(ind_wat_win,j,i) 2724 ENDIF 2725 ! 2726 !-- Check if sum of relative fractions is zero. This case, give an 2727 !-- error message. 2728 IF ( SUM ( surf_lsm_h%frac(:,m) ) == 0.0_wp ) THEN 2729 WRITE( message_string, * ) & 2730 'surface fractions at grid point (j,i) = (', & 2731 j, i, ') are all zero.' 2732 CALL message( 'land_surface_model_mod', 'PA0688', & 2733 2, 2, myid, 6, 0 ) 2734 ENDIF 2735 ! 2736 !-- In case the sum of all surfaces is not 1, which may happen 2737 !-- due to rounding errors or type conversions, normalize the 2738 !-- fractions to one. Note, at the moment no tile approach is 2739 !-- implemented, so that relative fractions are either 1 or zero. 2740 IF ( SUM ( surf_lsm_h%frac(:,m) ) > 1.0_wp .OR. & 2741 SUM ( surf_lsm_h%frac(:,m) ) < 1.0_wp ) THEN 2742 surf_lsm_h%frac(:,m) = surf_lsm_h%frac(:,m) / & 2743 SUM ( surf_lsm_h%frac(:,m) ) 2744 2745 ENDIF 2717 2746 2718 2747 ENDDO … … 2725 2754 ! 2726 2755 !-- 0 - vegetation fraction, 1 - pavement fraction, 2 - water fraction 2727 surf_lsm_v(l)%frac(ind_veg_wall,m) = & 2728 surface_fraction_f%frac(ind_veg_wall,j,i) 2729 surf_lsm_v(l)%frac(ind_pav_green,m) = & 2730 surface_fraction_f%frac(ind_pav_green,j,i) 2731 surf_lsm_v(l)%frac(ind_wat_win,m) = & 2756 IF ( surface_fraction_f%frac(ind_veg_wall,j,i) /= & 2757 surface_fraction_f%fill ) THEN 2758 surf_lsm_v(l)%frac(ind_veg_wall,m) = & 2759 surface_fraction_f%frac(ind_veg_wall,j,i) 2760 ENDIF 2761 IF ( surface_fraction_f%frac(ind_pav_green,j,i) /= & 2762 surface_fraction_f%fill ) THEN 2763 surf_lsm_v(l)%frac(ind_pav_green,m) = & 2764 surface_fraction_f%frac(ind_pav_green,j,i) 2765 ENDIF 2766 IF ( surface_fraction_f%frac(ind_wat_win,j,i) /= & 2767 surface_fraction_f%fill ) THEN 2768 surf_lsm_v(l)%frac(ind_wat_win,m) = & 2732 2769 surface_fraction_f%frac(ind_wat_win,j,i) 2733 2770 ENDIF 2771 ! 2772 !-- Check if sum of relative fractions is zero. This case, give an 2773 !-- error message. 2774 IF ( SUM ( surf_lsm_v(l)%frac(:,m) ) == 0.0_wp ) THEN 2775 WRITE( message_string, * ) & 2776 'surface fractions at grid point (j,i) = (', & 2777 j, i, ') are all zero.' 2778 CALL message( 'land_surface_model_mod', 'PA0688', & 2779 2, 2, myid, 6, 0 ) 2780 ENDIF 2781 ! 2782 !-- In case the sum of all surfaces is not 1, which may happen 2783 !-- due to rounding errors or type conversions, normalize the 2784 !-- fractions to one. Note, at the moment no tile approach is 2785 !-- implemented, so that relative fractions are either 1 or zero. 2786 IF ( SUM ( surf_lsm_v(l)%frac(:,m) ) > 1.0_wp .OR. & 2787 SUM ( surf_lsm_v(l)%frac(:,m) ) < 1.0_wp ) THEN 2788 surf_lsm_v(l)%frac(:,m) = surf_lsm_v(l)%frac(:,m) / & 2789 SUM ( surf_lsm_v(l)%frac(:,m) ) 2790 2791 ENDIF 2734 2792 ENDDO 2735 2793 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.