Changeset 3170
- Timestamp:
- Jul 25, 2018 3:19:37 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/radiation_model_mod.f90
r3156 r3170 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Bugfix, map signle-column radiation forcing profiles on top of any topography 31 ! 32 ! 3156 2018-07-19 16:30:54Z knoop 30 33 ! Bugfix: replaced usage of the pt array with the surf%pt_surface array 31 34 ! … … 2997 3000 2998 3001 ! 2999 !-- Save heating rates (convert from K/d to K/h) 3000 DO k = nzb+1, nzt+1 3001 rad_lw_hr(k,:,:) = rrtm_lwhr(0,k) * d_hours_day 3002 rad_lw_cs_hr(k,:,:) = rrtm_lwhrc(0,k) * d_hours_day 3002 !-- Save heating rates (convert from K/d to K/h). 3003 !-- Further, even though an aggregated radiation is computed, map 3004 !-- signle-column profiles on top of any topography, in order to 3005 !-- obtain correct near surface radiation heating/cooling rates. 3006 DO i = nxl, nxr 3007 DO j = nys, nyn 3008 k_topo = get_topography_top_index_ji( j, i, 's' ) 3009 DO k = k_topo+1, nzt+1 3010 rad_lw_hr(k,j,i) = rrtm_lwhr(0,k) * d_hours_day 3011 rad_lw_cs_hr(k,j,i) = rrtm_lwhrc(0,k) * d_hours_day 3012 ENDDO 3013 ENDDO 3003 3014 ENDDO 3004 3015 -
palm/trunk/SOURCE/sum_up_3d_data.f90
r3151 r3170 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Revise output of surface quantities in case of overhanging structures 28 ! 29 ! 3151 2018-07-19 08:45:38Z raasch 27 30 ! Remaining preprocessor directive __chem removed 28 31 ! … … 247 250 IMPLICIT NONE 248 251 252 LOGICAL :: match_def !< flag indicating default-type surface 253 LOGICAL :: match_lsm !< flag indicating natural-type surface 254 LOGICAL :: match_usm !< flag indicating urban-type surface 255 249 256 INTEGER(iwp) :: i !< grid index x direction 250 257 INTEGER(iwp) :: ii !< running index … … 571 578 CASE ( 'ghf*' ) 572 579 IF ( ALLOCATED( ghf_av ) ) THEN 573 DO m = 1, surf_lsm_h%ns 574 i = surf_lsm_h%i(m) 575 j = surf_lsm_h%j(m) 576 ghf_av(j,i) = ghf_av(j,i) + surf_lsm_h%ghf(m) 577 ENDDO 578 579 DO m = 1, surf_usm_h%ns 580 i = surf_usm_h%i(m) 581 j = surf_usm_h%j(m) 582 ghf_av(j,i) = ghf_av(j,i) + surf_usm_h%frac(ind_veg_wall,m) * & 583 surf_usm_h%wghf_eb(m) + & 584 surf_usm_h%frac(ind_pav_green,m) * & 585 surf_usm_h%wghf_eb_green(m) + & 586 surf_usm_h%frac(ind_wat_win,m) * & 587 surf_usm_h%wghf_eb_window(m) 580 DO i = nxl, nxr 581 DO j = nys, nyn 582 ! 583 !-- Check whether grid point is a natural- or urban-type 584 !-- surface. 585 match_lsm = surf_lsm_h%start_index(j,i) <= & 586 surf_lsm_h%end_index(j,i) 587 match_usm = surf_usm_h%start_index(j,i) <= & 588 surf_usm_h%end_index(j,i) 589 ! 590 !-- In order to avoid double-counting of surface properties, 591 !-- always assume that natural-type surfaces are below urban- 592 !-- type surfaces, e.g. in case of bridges. 593 !-- Further, take only the last suface element, i.e. the 594 !-- uppermost surface which would be visible from above 595 IF ( match_lsm .AND. .NOT. match_usm ) THEN 596 m = surf_lsm_h%end_index(j,i) 597 tsurf_av(j,i) = tsurf_av(j,i) + & 598 surf_lsm_h%ghf(m) 599 ELSEIF ( match_usm ) THEN 600 m = surf_usm_h%end_index(j,i) 601 tsurf_av(j,i) = tsurf_av(j,i) + & 602 surf_usm_h%frac(ind_veg_wall,m) * & 603 surf_usm_h%wghf_eb(m) + & 604 surf_usm_h%frac(ind_pav_green,m) * & 605 surf_usm_h%wghf_eb_green(m) + & 606 surf_usm_h%frac(ind_wat_win,m) * & 607 surf_usm_h%wghf_eb_window(m) 608 ENDIF 609 ENDDO 588 610 ENDDO 589 611 ENDIF … … 645 667 CASE ( 'ol*' ) 646 668 IF ( ALLOCATED( ol_av ) ) THEN 647 DO m = 1, surf_def_h(0)%ns 648 i = surf_def_h(0)%i(m) 649 j = surf_def_h(0)%j(m) 650 ol_av(j,i) = ol_av(j,i) + surf_def_h(0)%ol(m) 651 ENDDO 652 DO m = 1, surf_lsm_h%ns 653 i = surf_lsm_h%i(m) 654 j = surf_lsm_h%j(m) 655 ol_av(j,i) = ol_av(j,i) + surf_lsm_h%ol(m) 656 ENDDO 657 DO m = 1, surf_usm_h%ns 658 i = surf_usm_h%i(m) 659 j = surf_usm_h%j(m) 660 ol_av(j,i) = ol_av(j,i) + surf_usm_h%ol(m) 669 DO i = nxl, nxr 670 DO j = nys, nyn 671 match_def = surf_def_h(0)%start_index(j,i) <= & 672 surf_def_h(0)%end_index(j,i) 673 match_lsm = surf_lsm_h%start_index(j,i) <= & 674 surf_lsm_h%end_index(j,i) 675 match_usm = surf_usm_h%start_index(j,i) <= & 676 surf_usm_h%end_index(j,i) 677 678 IF ( match_def ) THEN 679 m = surf_def_h(0)%end_index(j,i) 680 tsurf_av(j,i) = tsurf_av(j,i) + & 681 surf_def_h(0)%ol(m) 682 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 683 m = surf_lsm_h%end_index(j,i) 684 tsurf_av(j,i) = tsurf_av(j,i) + & 685 surf_lsm_h%ol(m) 686 ELSEIF ( match_usm ) THEN 687 m = surf_usm_h%end_index(j,i) 688 tsurf_av(j,i) = tsurf_av(j,i) + & 689 surf_usm_h%ol(m) 690 ENDIF 691 ENDDO 661 692 ENDDO 662 693 ENDIF … … 842 873 !-- dynamic units. 843 874 IF ( ALLOCATED( qsws_av ) ) THEN 844 DO m = 1, surf_def_h(0)%ns 845 i = surf_def_h(0)%i(m) 846 j = surf_def_h(0)%j(m) 847 k = surf_def_h(0)%k(m) 848 qsws_av(j,i) = qsws_av(j,i) + surf_def_h(0)%qsws(m) * & 849 waterflux_output_conversion(k) 850 ENDDO 851 DO m = 1, surf_lsm_h%ns 852 i = surf_lsm_h%i(m) 853 j = surf_lsm_h%j(m) 854 qsws_av(j,i) = qsws_av(j,i) + surf_lsm_h%qsws(m) * l_v 855 ENDDO 856 DO m = 1, surf_usm_h%ns 857 i = surf_usm_h%i(m) 858 j = surf_usm_h%j(m) 859 qsws_av(j,i) = qsws_av(j,i) + surf_usm_h%qsws(m) * l_v 875 DO i = nxl, nxr 876 DO j = nys, nyn 877 match_def = surf_def_h(0)%start_index(j,i) <= & 878 surf_def_h(0)%end_index(j,i) 879 match_lsm = surf_lsm_h%start_index(j,i) <= & 880 surf_lsm_h%end_index(j,i) 881 match_usm = surf_usm_h%start_index(j,i) <= & 882 surf_usm_h%end_index(j,i) 883 884 IF ( match_def ) THEN 885 m = surf_def_h(0)%end_index(j,i) 886 tsurf_av(j,i) = tsurf_av(j,i) + & 887 surf_def_h(0)%qsws(m) * & 888 waterflux_output_conversion(k) 889 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 890 m = surf_lsm_h%end_index(j,i) 891 tsurf_av(j,i) = tsurf_av(j,i) + & 892 surf_lsm_h%qsws(m) * l_v 893 ELSEIF ( match_usm ) THEN 894 m = surf_usm_h%end_index(j,i) 895 tsurf_av(j,i) = tsurf_av(j,i) + & 896 surf_usm_h%qsws(m) * l_v 897 ENDIF 898 ENDDO 860 899 ENDDO 861 900 ENDIF … … 874 913 CASE ( 'r_a*' ) 875 914 IF ( ALLOCATED( r_a_av ) ) THEN 876 DO m = 1, surf_lsm_h%ns 877 i = surf_lsm_h%i(m) 878 j = surf_lsm_h%j(m) 879 r_a_av(j,i) = r_a_av(j,i) + surf_lsm_h%r_a(m) 880 ENDDO 881 ! 882 !-- Please note, resistance is also applied at urban-type surfaces, 883 !-- and is output only as a single variable. Here, tile approach is 884 !-- already implemented, so for each surface fraction resistance 885 !-- need to be summed-up. 886 DO m = 1, surf_usm_h%ns 887 i = surf_usm_h%i(m) 888 j = surf_usm_h%j(m) 889 r_a_av(j,i) = r_a_av(j,i) + & 890 ( surf_usm_h%frac(ind_veg_wall,m) * & 891 surf_usm_h%r_a(m) + & 892 surf_usm_h%frac(ind_pav_green,m) * & 893 surf_usm_h%r_a_green(m) + & 894 surf_usm_h%frac(ind_wat_win,m) * & 895 surf_usm_h%r_a_window(m) ) 915 DO i = nxl, nxr 916 DO j = nys, nyn 917 match_lsm = surf_lsm_h%start_index(j,i) <= & 918 surf_lsm_h%end_index(j,i) 919 match_usm = surf_usm_h%start_index(j,i) <= & 920 surf_usm_h%end_index(j,i) 921 922 IF ( match_lsm .AND. .NOT. match_usm ) THEN 923 m = surf_lsm_h%end_index(j,i) 924 tsurf_av(j,i) = tsurf_av(j,i) + & 925 surf_lsm_h%r_a(m) 926 ELSEIF ( match_usm ) THEN 927 m = surf_usm_h%end_index(j,i) 928 tsurf_av(j,i) = tsurf_av(j,i) + & 929 surf_usm_h%frac(ind_veg_wall,m) * & 930 surf_usm_h%r_a(m) + & 931 surf_usm_h%frac(ind_pav_green,m) * & 932 surf_usm_h%r_a_green(m) + & 933 surf_usm_h%frac(ind_wat_win,m) * & 934 surf_usm_h%r_a_window(m) 935 ENDIF 936 ENDDO 896 937 ENDDO 897 938 ENDIF … … 936 977 !-- dynamic units. 937 978 IF ( ALLOCATED( shf_av ) ) THEN 938 DO m = 1, surf_def_h(0)%ns 939 i = surf_def_h(0)%i(m) 940 j = surf_def_h(0)%j(m) 941 k = surf_def_h(0)%k(m) 942 shf_av(j,i) = shf_av(j,i) + surf_def_h(0)%shf(m) * & 943 heatflux_output_conversion(k) 944 ENDDO 945 DO m = 1, surf_lsm_h%ns 946 i = surf_lsm_h%i(m) 947 j = surf_lsm_h%j(m) 948 shf_av(j,i) = shf_av(j,i) + surf_lsm_h%shf(m) * cp 949 ENDDO 950 DO m = 1, surf_usm_h%ns 951 i = surf_usm_h%i(m) 952 j = surf_usm_h%j(m) 953 shf_av(j,i) = shf_av(j,i) + surf_usm_h%shf(m) * cp 979 DO i = nxl, nxr 980 DO j = nys, nyn 981 match_def = surf_def_h(0)%start_index(j,i) <= & 982 surf_def_h(0)%end_index(j,i) 983 match_lsm = surf_lsm_h%start_index(j,i) <= & 984 surf_lsm_h%end_index(j,i) 985 match_usm = surf_usm_h%start_index(j,i) <= & 986 surf_usm_h%end_index(j,i) 987 988 IF ( match_def ) THEN 989 m = surf_def_h(0)%end_index(j,i) 990 tsurf_av(j,i) = tsurf_av(j,i) + & 991 surf_def_h(0)%shf(m) * & 992 heatflux_output_conversion(k) 993 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 994 m = surf_lsm_h%end_index(j,i) 995 tsurf_av(j,i) = tsurf_av(j,i) + & 996 surf_lsm_h%shf(m) * cp 997 ELSEIF ( match_usm ) THEN 998 m = surf_usm_h%end_index(j,i) 999 tsurf_av(j,i) = tsurf_av(j,i) + & 1000 surf_usm_h%shf(m) * cp 1001 ENDIF 1002 ENDDO 954 1003 ENDDO 955 1004 ENDIF … … 957 1006 CASE ( 'ssws*' ) 958 1007 IF ( ALLOCATED( ssws_av ) ) THEN 959 DO m = 1, surf_def_h(0)%ns 960 i = surf_def_h(0)%i(m) 961 j = surf_def_h(0)%j(m) 962 ssws_av(j,i) = ssws_av(j,i) + surf_def_h(0)%ssws(m) 963 ENDDO 964 DO m = 1, surf_lsm_h%ns 965 i = surf_lsm_h%i(m) 966 j = surf_lsm_h%j(m) 967 ssws_av(j,i) = ssws_av(j,i) + surf_lsm_h%ssws(m) 968 ENDDO 969 DO m = 1, surf_usm_h%ns 970 i = surf_usm_h%i(m) 971 j = surf_usm_h%j(m) 972 ssws_av(j,i) = ssws_av(j,i) + surf_usm_h%ssws(m) 1008 DO i = nxl, nxr 1009 DO j = nys, nyn 1010 match_def = surf_def_h(0)%start_index(j,i) <= & 1011 surf_def_h(0)%end_index(j,i) 1012 match_lsm = surf_lsm_h%start_index(j,i) <= & 1013 surf_lsm_h%end_index(j,i) 1014 match_usm = surf_usm_h%start_index(j,i) <= & 1015 surf_usm_h%end_index(j,i) 1016 1017 IF ( match_def ) THEN 1018 m = surf_def_h(0)%end_index(j,i) 1019 tsurf_av(j,i) = tsurf_av(j,i) + & 1020 surf_def_h(0)%ssws(m) 1021 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1022 m = surf_lsm_h%end_index(j,i) 1023 tsurf_av(j,i) = tsurf_av(j,i) + & 1024 surf_lsm_h%ssws(m) 1025 ELSEIF ( match_usm ) THEN 1026 m = surf_usm_h%end_index(j,i) 1027 tsurf_av(j,i) = tsurf_av(j,i) + & 1028 surf_usm_h%ssws(m) 1029 ENDIF 1030 ENDDO 973 1031 ENDDO 974 1032 ENDIF … … 976 1034 CASE ( 't*' ) 977 1035 IF ( ALLOCATED( ts_av ) ) THEN 978 DO m = 1, surf_def_h(0)%ns 979 i = surf_def_h(0)%i(m) 980 j = surf_def_h(0)%j(m) 981 ts_av(j,i) = ts_av(j,i) + surf_def_h(0)%ts(m) 982 ENDDO 983 DO m = 1, surf_lsm_h%ns 984 i = surf_lsm_h%i(m) 985 j = surf_lsm_h%j(m) 986 ts_av(j,i) = ts_av(j,i) + surf_lsm_h%ts(m) 987 ENDDO 988 DO m = 1, surf_usm_h%ns 989 i = surf_usm_h%i(m) 990 j = surf_usm_h%j(m) 991 ts_av(j,i) = ts_av(j,i) + surf_usm_h%ts(m) 1036 DO i = nxl, nxr 1037 DO j = nys, nyn 1038 match_def = surf_def_h(0)%start_index(j,i) <= & 1039 surf_def_h(0)%end_index(j,i) 1040 match_lsm = surf_lsm_h%start_index(j,i) <= & 1041 surf_lsm_h%end_index(j,i) 1042 match_usm = surf_usm_h%start_index(j,i) <= & 1043 surf_usm_h%end_index(j,i) 1044 1045 IF ( match_def ) THEN 1046 m = surf_def_h(0)%end_index(j,i) 1047 tsurf_av(j,i) = tsurf_av(j,i) + & 1048 surf_def_h(0)%ts(m) 1049 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1050 m = surf_lsm_h%end_index(j,i) 1051 tsurf_av(j,i) = tsurf_av(j,i) + & 1052 surf_lsm_h%ts(m) 1053 ELSEIF ( match_usm ) THEN 1054 m = surf_usm_h%end_index(j,i) 1055 tsurf_av(j,i) = tsurf_av(j,i) + & 1056 surf_usm_h%ts(m) 1057 ENDIF 1058 ENDDO 992 1059 ENDDO 993 1060 ENDIF 994 1061 995 1062 CASE ( 'tsurf*' ) 996 IF ( ALLOCATED( tsurf_av ) ) THEN 997 DO m = 1, surf_def_h(0)%ns 998 i = surf_def_h(0)%i(m) 999 j = surf_def_h(0)%j(m) 1000 tsurf_av(j,i) = tsurf_av(j,i) + surf_def_h(0)%pt_surface(m) 1001 ENDDO 1002 1003 DO m = 1, surf_lsm_h%ns 1004 i = surf_lsm_h%i(m) 1005 j = surf_lsm_h%j(m) 1006 tsurf_av(j,i) = tsurf_av(j,i) + surf_lsm_h%pt_surface(m) 1007 ENDDO 1008 1009 DO m = 1, surf_usm_h%ns 1010 i = surf_usm_h%i(m) 1011 j = surf_usm_h%j(m) 1012 tsurf_av(j,i) = tsurf_av(j,i) + surf_usm_h%pt_surface(m) 1063 IF ( ALLOCATED( tsurf_av ) ) THEN 1064 DO i = nxl, nxr 1065 DO j = nys, nyn 1066 match_def = surf_def_h(0)%start_index(j,i) <= & 1067 surf_def_h(0)%end_index(j,i) 1068 match_lsm = surf_lsm_h%start_index(j,i) <= & 1069 surf_lsm_h%end_index(j,i) 1070 match_usm = surf_usm_h%start_index(j,i) <= & 1071 surf_usm_h%end_index(j,i) 1072 1073 IF ( match_def ) THEN 1074 m = surf_def_h(0)%end_index(j,i) 1075 tsurf_av(j,i) = tsurf_av(j,i) + & 1076 surf_def_h(0)%pt_surface(m) 1077 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1078 m = surf_lsm_h%end_index(j,i) 1079 tsurf_av(j,i) = tsurf_av(j,i) + & 1080 surf_lsm_h%pt_surface(m) 1081 ELSEIF ( match_usm ) THEN 1082 m = surf_usm_h%end_index(j,i) 1083 tsurf_av(j,i) = tsurf_av(j,i) + & 1084 surf_usm_h%pt_surface(m) 1085 ENDIF 1086 ENDDO 1013 1087 ENDDO 1014 1088 ENDIF … … 1027 1101 CASE ( 'u*' ) 1028 1102 IF ( ALLOCATED( us_av ) ) THEN 1029 DO m = 1, surf_def_h(0)%ns 1030 i = surf_def_h(0)%i(m) 1031 j = surf_def_h(0)%j(m) 1032 us_av(j,i) = us_av(j,i) + surf_def_h(0)%us(m) 1033 ENDDO 1034 DO m = 1, surf_lsm_h%ns 1035 i = surf_lsm_h%i(m) 1036 j = surf_lsm_h%j(m) 1037 us_av(j,i) = us_av(j,i) + surf_lsm_h%us(m) 1038 ENDDO 1039 DO m = 1, surf_usm_h%ns 1040 i = surf_usm_h%i(m) 1041 j = surf_usm_h%j(m) 1042 us_av(j,i) = us_av(j,i) + surf_usm_h%us(m) 1103 DO i = nxl, nxr 1104 DO j = nys, nyn 1105 match_def = surf_def_h(0)%start_index(j,i) <= & 1106 surf_def_h(0)%end_index(j,i) 1107 match_lsm = surf_lsm_h%start_index(j,i) <= & 1108 surf_lsm_h%end_index(j,i) 1109 match_usm = surf_usm_h%start_index(j,i) <= & 1110 surf_usm_h%end_index(j,i) 1111 1112 IF ( match_def ) THEN 1113 m = surf_def_h(0)%end_index(j,i) 1114 tsurf_av(j,i) = tsurf_av(j,i) + & 1115 surf_def_h(0)%us(m) 1116 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1117 m = surf_lsm_h%end_index(j,i) 1118 tsurf_av(j,i) = tsurf_av(j,i) + & 1119 surf_lsm_h%us(m) 1120 ELSEIF ( match_usm ) THEN 1121 m = surf_usm_h%end_index(j,i) 1122 tsurf_av(j,i) = tsurf_av(j,i) + & 1123 surf_usm_h%us(m) 1124 ENDIF 1125 ENDDO 1043 1126 ENDDO 1044 1127 ENDIF … … 1079 1162 CASE ( 'z0*' ) 1080 1163 IF ( ALLOCATED( z0_av ) ) THEN 1081 DO m = 1, surf_def_h(0)%ns 1082 i = surf_def_h(0)%i(m) 1083 j = surf_def_h(0)%j(m) 1084 z0_av(j,i) = z0_av(j,i) + surf_def_h(0)%z0(m) 1085 ENDDO 1086 DO m = 1, surf_lsm_h%ns 1087 i = surf_lsm_h%i(m) 1088 j = surf_lsm_h%j(m) 1089 z0_av(j,i) = z0_av(j,i) + surf_lsm_h%z0(m) 1090 ENDDO 1091 DO m = 1, surf_usm_h%ns 1092 i = surf_usm_h%i(m) 1093 j = surf_usm_h%j(m) 1094 z0_av(j,i) = z0_av(j,i) + surf_usm_h%z0(m) 1095 ENDDO 1164 DO i = nxl, nxr 1165 DO j = nys, nyn 1166 match_def = surf_def_h(0)%start_index(j,i) <= & 1167 surf_def_h(0)%end_index(j,i) 1168 match_lsm = surf_lsm_h%start_index(j,i) <= & 1169 surf_lsm_h%end_index(j,i) 1170 match_usm = surf_usm_h%start_index(j,i) <= & 1171 surf_usm_h%end_index(j,i) 1172 1173 IF ( match_def ) THEN 1174 m = surf_def_h(0)%end_index(j,i) 1175 tsurf_av(j,i) = tsurf_av(j,i) + & 1176 surf_def_h(0)%z0(m) 1177 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1178 m = surf_lsm_h%end_index(j,i) 1179 tsurf_av(j,i) = tsurf_av(j,i) + & 1180 surf_lsm_h%z0(m) 1181 ELSEIF ( match_usm ) THEN 1182 m = surf_usm_h%end_index(j,i) 1183 tsurf_av(j,i) = tsurf_av(j,i) + & 1184 surf_usm_h%z0(m) 1185 ENDIF 1186 ENDDO 1187 ENDDO 1096 1188 ENDIF 1097 1189 1098 1190 CASE ( 'z0h*' ) 1099 1191 IF ( ALLOCATED( z0h_av ) ) THEN 1100 DO m = 1, surf_def_h(0)%ns 1101 i = surf_def_h(0)%i(m) 1102 j = surf_def_h(0)%j(m) 1103 z0h_av(j,i) = z0h_av(j,i) + surf_def_h(0)%z0h(m) 1104 ENDDO 1105 DO m = 1, surf_lsm_h%ns 1106 i = surf_lsm_h%i(m) 1107 j = surf_lsm_h%j(m) 1108 z0h_av(j,i) = z0h_av(j,i) + surf_lsm_h%z0h(m) 1109 ENDDO 1110 DO m = 1, surf_usm_h%ns 1111 i = surf_usm_h%i(m) 1112 j = surf_usm_h%j(m) 1113 z0h_av(j,i) = z0h_av(j,i) + surf_usm_h%z0h(m) 1192 DO i = nxl, nxr 1193 DO j = nys, nyn 1194 match_def = surf_def_h(0)%start_index(j,i) <= & 1195 surf_def_h(0)%end_index(j,i) 1196 match_lsm = surf_lsm_h%start_index(j,i) <= & 1197 surf_lsm_h%end_index(j,i) 1198 match_usm = surf_usm_h%start_index(j,i) <= & 1199 surf_usm_h%end_index(j,i) 1200 1201 IF ( match_def ) THEN 1202 m = surf_def_h(0)%end_index(j,i) 1203 tsurf_av(j,i) = tsurf_av(j,i) + & 1204 surf_def_h(0)%z0h(m) 1205 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1206 m = surf_lsm_h%end_index(j,i) 1207 tsurf_av(j,i) = tsurf_av(j,i) + & 1208 surf_lsm_h%z0h(m) 1209 ELSEIF ( match_usm ) THEN 1210 m = surf_usm_h%end_index(j,i) 1211 tsurf_av(j,i) = tsurf_av(j,i) + & 1212 surf_usm_h%z0h(m) 1213 ENDIF 1214 ENDDO 1114 1215 ENDDO 1115 1216 ENDIF … … 1117 1218 CASE ( 'z0q*' ) 1118 1219 IF ( ALLOCATED( z0q_av ) ) THEN 1119 DO m = 1, surf_def_h(0)%ns 1120 i = surf_def_h(0)%i(m) 1121 j = surf_def_h(0)%j(m) 1122 z0q_av(j,i) = z0q_av(j,i) + surf_def_h(0)%z0q(m) 1123 ENDDO 1124 DO m = 1, surf_lsm_h%ns 1125 i = surf_lsm_h%i(m) 1126 j = surf_lsm_h%j(m) 1127 z0q_av(j,i) = z0q_av(j,i) + surf_lsm_h%z0q(m) 1128 ENDDO 1129 DO m = 1, surf_usm_h%ns 1130 i = surf_usm_h%i(m) 1131 j = surf_usm_h%j(m) 1132 z0q_av(j,i) = z0q_av(j,i) + surf_usm_h%z0q(m) 1220 DO i = nxl, nxr 1221 DO j = nys, nyn 1222 match_def = surf_def_h(0)%start_index(j,i) <= & 1223 surf_def_h(0)%end_index(j,i) 1224 match_lsm = surf_lsm_h%start_index(j,i) <= & 1225 surf_lsm_h%end_index(j,i) 1226 match_usm = surf_usm_h%start_index(j,i) <= & 1227 surf_usm_h%end_index(j,i) 1228 1229 IF ( match_def ) THEN 1230 m = surf_def_h(0)%end_index(j,i) 1231 tsurf_av(j,i) = tsurf_av(j,i) + & 1232 surf_def_h(0)%z0q(m) 1233 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 1234 m = surf_lsm_h%end_index(j,i) 1235 tsurf_av(j,i) = tsurf_av(j,i) + & 1236 surf_lsm_h%z0q(m) 1237 ELSEIF ( match_usm ) THEN 1238 m = surf_usm_h%end_index(j,i) 1239 tsurf_av(j,i) = tsurf_av(j,i) + & 1240 surf_usm_h%z0q(m) 1241 ENDIF 1242 ENDDO 1133 1243 ENDDO 1134 1244 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.