- Timestamp:
- Jan 11, 2018 12:01:27 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/average_3d_data.f90
r2718 r2735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! output of r_a moved from land-surface to consider also urban-type surfaces 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 360 363 ENDDO 361 364 365 CASE ( 'r_a*' ) 366 DO i = nxlg, nxrg 367 DO j = nysg, nyng 368 r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp ) 369 ENDDO 370 ENDDO 371 CALL exchange_horiz_2d( r_a_av, nbgp ) 372 362 373 CASE ( 'rho_ocean' ) 363 374 DO i = nxlg, nxrg -
palm/trunk/SOURCE/check_parameters.f90
r2718 r2735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! output of r_a moved from land-surface to consider also urban-type surfaces 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 3282 3285 CONTINUE 3283 3286 3284 CASE ( 'lwp*', 'ol*', 'pra*', 'prr*', 'qsws*', ' shf*', 'ssws*', 't*',&3285 ' u*', 'z0*', 'z0h*', 'z0q*' )3287 CASE ( 'lwp*', 'ol*', 'pra*', 'prr*', 'qsws*', 'r_a*', 'shf*', & 3288 'ssws*', 't*', 'u*', 'z0*', 'z0h*', 'z0q*' ) 3286 3289 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 3287 3290 message_string = 'illegal value for data_output: "' // & … … 3318 3321 CALL message( 'check_parameters', 'PA0322', 1, 2, 0, 6, 0 ) 3319 3322 ENDIF 3323 IF ( TRIM( var ) == 'r_a*' .AND. .NOT. land_surface .AND. & 3324 .NOT. urban_surface ) & 3325 THEN 3326 message_string = 'output of "' // TRIM( var ) // '" requi' // & 3327 'res land_surface = .TRUE. or ' // & 3328 'urban_surface = .TRUE.' 3329 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 3330 ENDIF 3320 3331 IF ( TRIM( var ) == 'ssws*' .AND. .NOT. passive_scalar ) THEN 3321 3332 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 3325 3336 3326 3337 IF ( TRIM( var ) == 'lwp*' ) unit = 'kg/m2' 3327 IF ( TRIM( var ) == 'ol*' )unit = 'm'3338 IF ( TRIM( var ) == 'ol*' ) unit = 'm' 3328 3339 IF ( TRIM( var ) == 'pra*' ) unit = 'mm' 3329 3340 IF ( TRIM( var ) == 'prr*' ) unit = 'mm/s' 3330 3341 IF ( TRIM( var ) == 'qsws*' ) unit = 'kgm/kgs' 3342 IF ( TRIM( var ) == 'r_a*' ) unit = 's/m' 3331 3343 IF ( TRIM( var ) == 'shf*' ) unit = 'K*m/s' 3332 3344 IF ( TRIM( var ) == 'ssws*' ) unit = 'kg/m2*s' -
palm/trunk/SOURCE/data_output_2d.f90
r2718 r2735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! output of r_a moved from land-surface to consider also urban-type surfaces 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 844 847 IF ( mode == 'xy' ) level_z = zu 845 848 846 849 CASE ( 'r_a*_xy' ) ! 2d-array 850 IF ( av == 0 ) THEN 851 DO m = 1, surf_lsm_h%ns 852 i = surf_lsm_h%i(m) 853 j = surf_lsm_h%j(m) 854 local_pf(i,j,nzb+1) = surf_lsm_h%r_a(m) 855 ENDDO 856 857 DO m = 1, surf_usm_h%ns 858 i = surf_usm_h%i(m) 859 j = surf_usm_h%j(m) 860 local_pf(i,j,nzb+1) = & 861 ( surf_usm_h%frac(0,m) * surf_usm_h%r_a(m) + & 862 surf_usm_h%frac(1,m) * surf_usm_h%r_a_green(m) + & 863 surf_usm_h%frac(2,m) * surf_usm_h%r_a_window(m) ) 864 ENDDO 865 866 ELSE 867 DO i = nxl, nxr 868 DO j = nys, nyn 869 local_pf(i,j,nzb+1) = r_a_av(j,i) 870 ENDDO 871 ENDDO 872 ENDIF 873 resorted = .TRUE. 874 two_d = .TRUE. 875 level_z(nzb+1) = zu(nzb+1) 847 876 848 877 CASE ( 'rho_ocean_xy', 'rho_ocean_xz', 'rho_ocean_yz' ) -
palm/trunk/SOURCE/land_surface_model_mod.f90
r2729 r2735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! output of r_a moved from land-surface to consider also urban-type surfaces 28 ! 29 ! 2729 2018-01-09 11:22:28Z maronga 27 30 ! Separated deep soil temperature from soil_temperature array 28 31 ! … … 597 600 qsws_soil_av, & !< average of qsws_soil 598 601 qsws_veg_av, & !< average of qsws_veg 599 r_a_av, & !< average of r_a600 602 r_s_av !< average of r_s 601 603 … … 1040 1042 1041 1043 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'ghf*', 'm_liq*', & 1042 'qsws_liq*', 'qsws_soil*', 'qsws_veg*', & 1043 'r_a*', 'r_s*' ) 1044 'qsws_liq*', 'qsws_soil*', 'qsws_veg*', 'r_s*' ) 1044 1045 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 1045 1046 message_string = 'illegal value for data_output: "' // & … … 1091 1092 ENDIF 1092 1093 IF ( TRIM( var ) == 'qsws_veg*' .AND. .NOT. land_surface ) & 1093 THEN1094 message_string = 'output of "' // TRIM( var ) // '" requi' // &1095 'res land_surface = .TRUE.'1096 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )1097 ENDIF1098 IF ( TRIM( var ) == 'r_a*' .AND. .NOT. land_surface ) &1099 1094 THEN 1100 1095 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 1118 1113 IF ( TRIM( var ) == 'qsws_soil*' ) unit = 'W/m2' 1119 1114 IF ( TRIM( var ) == 'qsws_veg*' ) unit = 'W/m2' 1120 IF ( TRIM( var ) == 'r_a*') unit = 's/m'1121 1115 IF ( TRIM( var ) == 'r_s*') unit = 's/m' 1122 1116 … … 5065 5059 qsws_veg_av = 0.0_wp 5066 5060 5067 CASE ( 'r_a*' )5068 IF ( .NOT. ALLOCATED( r_a_av ) ) THEN5069 ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) )5070 ENDIF5071 r_a_av = 0.0_wp5072 5073 5061 CASE ( 'r_s*' ) 5074 5062 IF ( .NOT. ALLOCATED( r_s_av ) ) THEN … … 5165 5153 qsws_veg_av(j,i) = qsws_veg_av(j,i) + & 5166 5154 surf_lsm_h%qsws_veg(m) 5167 ENDDO5168 5169 CASE ( 'r_a*' )5170 DO m = 1, surf_lsm_h%ns5171 i = surf_lsm_h%i(m)5172 j = surf_lsm_h%j(m)5173 r_a_av(j,i) = r_a_av(j,i) + surf_lsm_h%r_a(m)5174 5155 ENDDO 5175 5156 … … 5281 5262 ENDDO 5282 5263 5283 CASE ( 'r_a*' )5284 DO i = nxl, nxr5285 DO j = nys, nyn5286 r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp )5287 ENDDO5288 ENDDO5289 5290 5264 CASE ( 'r_s*' ) 5291 5265 DO i = nxl, nxr … … 5579 5553 grid = 'zu1' 5580 5554 5581 5582 CASE ( 'r_a*_xy' ) ! 2d-array5583 IF ( av == 0 ) THEN5584 DO m = 1, surf_lsm_h%ns5585 i = surf_lsm_h%i(m)5586 j = surf_lsm_h%j(m)5587 local_pf(i,j,nzb+1) = surf_lsm_h%r_a(m)5588 ENDDO5589 ELSE5590 DO i = nxl, nxr5591 DO j = nys, nyn5592 local_pf(i,j,nzb+1) = r_a_av(j,i)5593 ENDDO5594 ENDDO5595 ENDIF5596 5597 two_d = .TRUE.5598 grid = 'zu1'5599 5555 5600 5556 CASE ( 'r_s*_xy' ) ! 2d-array -
palm/trunk/SOURCE/modules.f90
r2718 r2735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! +r_a_av 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 884 887 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ol_av !< avg. Obukhov length 885 888 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: qsws_av !< avg. surface moisture flux 889 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: r_a_av !< avg. resistance 886 890 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ssws_av !< avg. surface scalar flux 887 891 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: shf_av !< avg. surface heat flux -
palm/trunk/SOURCE/sum_up_3d_data.f90
r2718 r2735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! output of r_a moved from land-surface to consider also urban-type surfaces 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 158 161 ol_av, p_av, pc_av, pr_av, prr_av, precipitation_rate_av, pt_av,& 159 162 q_av, qc_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qr_av, qsws_av, & 160 qv_av, r ho_ocean_av, s_av, sa_av, shf_av, ssws_av, ts_av, u_av,&161 us_av, v_av, vpt_av, w_av, z0_av, z0h_av, z0q_av163 qv_av, r_a_av, rho_ocean_av, s_av, sa_av, shf_av, ssws_av, & 164 ts_av, u_av, us_av, v_av, vpt_av, w_av, z0_av, z0h_av, z0q_av 162 165 #if defined( __chem ) 163 166 USE chemistry_model_mod, & … … 364 367 ENDIF 365 368 qv_av = 0.0_wp 369 370 CASE ( 'r_a*' ) 371 IF ( .NOT. ALLOCATED( r_a_av ) ) THEN 372 ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) ) 373 ENDIF 374 r_a_av = 0.0_wp 366 375 367 376 CASE ( 'rho_ocean' ) … … 746 755 ENDDO 747 756 757 CASE ( 'r_a*' ) 758 DO m = 1, surf_lsm_h%ns 759 i = surf_lsm_h%i(m) 760 j = surf_lsm_h%j(m) 761 r_a_av(j,i) = r_a_av(j,i) + surf_lsm_h%r_a(m) 762 ENDDO 763 ! 764 !-- Please note, resistance is also applied at urban-type surfaces, 765 !-- and is output only as a single variable. Here, tile approach is 766 !-- already implemented, so for each surface fraction resistance 767 !-- need to be summed-up. 768 DO m = 1, surf_usm_h%ns 769 i = surf_usm_h%i(m) 770 j = surf_usm_h%j(m) 771 r_a_av(j,i) = r_a_av(j,i) + & 772 ( surf_usm_h%frac(0,m) * surf_usm_h%r_a(m) + & 773 surf_usm_h%frac(1,m) * surf_usm_h%r_a_green(m) + & 774 surf_usm_h%frac(2,m) * surf_usm_h%r_a_window(m) ) 775 ENDDO 776 748 777 CASE ( 'rho_ocean' ) 749 778 DO i = nxlg, nxrg -
palm/trunk/SOURCE/surface_mod.f90
r2718 r2735 26 26 ! ----------------- 27 27 ! $Id$ 28 ! +r_a_green, r_a_window 29 ! 30 ! 2718 2018-01-02 08:49:38Z maronga 28 31 ! Changes from last commit documented 29 32 ! … … 264 267 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg !< surface flux of latent heat (vegetation portion) 265 268 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_a !< aerodynamic resistance 269 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_a_green !< aerodynamic resistance at green fraction 270 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_a_window !< aerodynamic resistance at window fraction 266 271 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_canopy !< canopy resistance 267 272 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_soil !< soil resistance -
palm/trunk/SOURCE/urban_surface_mod.f90
r2723 r2735 26 26 ! ----------------- 27 27 ! $Id$ 28 ! resistances are saved in surface attributes 29 ! 30 ! 2723 2018-01-05 09:27:03Z maronga 28 31 ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) 29 32 ! … … 826 829 ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) 827 830 ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) 831 ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) 832 ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) 833 ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) 828 834 829 835 ! … … 838 844 ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) 839 845 ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) 840 841 846 ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) 847 ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) 848 ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) 849 ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) 842 850 ENDDO 843 851 … … 6859 6867 REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation 6860 6868 REAL(wp) :: rho_cp !< rho_wall_surface * cp 6861 REAL(wp) :: r_a !< aerodynamic resistance for horizontal and vertical surfaces6862 REAL(wp) :: r_a_window !< aerodynamic resistance for horizontal and vertical window surfaces6863 REAL(wp) :: r_a_green !< aerodynamic resistance for horizontal and vertical green surfaces6864 6869 REAL(wp) :: f_shf !< factor for shf_eb 6865 6870 REAL(wp) :: f_shf_window !< factor for shf_eb window … … 6918 6923 !-- Workaround: use single r_a as stability is only treated for the 6919 6924 !-- average temperature 6920 r_a = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) / & 6921 ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) 6922 r_a_window = r_a 6923 r_a_green = r_a 6925 surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& 6926 ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) 6927 surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) 6928 surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) 6929 6924 6930 ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exn(k) ) / & 6925 6931 ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) … … 6930 6936 6931 6937 !-- make sure that the resistance does not drop to zero 6932 IF ( r_a < 1.0_wp ) r_a = 1.0_wp 6933 IF ( r_a_window < 1.0_wp ) r_a_window = 1.0_wp 6934 IF ( r_a_green < 1.0_wp ) r_a_green = 1.0_wp 6938 IF ( surf_usm_h%r_a(m) < 1.0_wp ) & 6939 surf_usm_h%r_a(m) = 1.0_wp 6940 IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & 6941 surf_usm_h%r_a_green(m) = 1.0_wp 6942 IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & 6943 surf_usm_h%r_a_window(m) = 1.0_wp 6935 6944 6936 6945 … … 6941 6950 !-- A temporary solution would be multiplication by magic constant :-(. 6942 6951 !-- For the moment this is comment out. 6943 r_a = r_a!* ra_horiz_coef6944 r_a_window = r_a_window!* ra_horiz_coef6945 r_a_green = r_a_green!* ra_horiz_coef6952 surf_usm_h%r_a(m) = surf_usm_h%r_a(m) !* ra_horiz_coef 6953 surf_usm_h%r_a_window(m) = surf_usm_h%r_a_window(m) !* ra_horiz_coef 6954 surf_usm_h%r_a_green(m) = surf_usm_h%r_a_green(m) !* ra_horiz_coef 6946 6955 6947 6956 !-- factor for shf_eb 6948 f_shf = rho_cp / r_a6949 f_shf_window = rho_cp / r_a_window6950 f_shf_green = rho_cp / r_a_green6957 f_shf = rho_cp / surf_usm_h%r_a(m) 6958 f_shf_window = rho_cp / surf_usm_h%r_a_window(m) 6959 f_shf_green = rho_cp / surf_usm_h%r_a_green(m) 6951 6960 6952 6961 !-- add LW up so that it can be removed in prognostic equation
Note: See TracChangeset
for help on using the changeset viewer.