Changeset 2797
- Timestamp:
- Feb 8, 2018 1:24:35 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/average_3d_data.f90
r2766 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable output of ground-heat flux also at urban surfaces. 28 ! 29 ! 2766 2018-01-22 17:17:47Z kanani 27 30 ! Removed preprocessor directive __chem 28 31 ! … … 200 203 ENDDO 201 204 205 CASE ( 'ghf*' ) 206 DO i = nxl, nxr 207 DO j = nys, nyn 208 ghf_av(j,i) = ghf_av(j,i) & 209 / REAL( average_count_3d, KIND=wp ) 210 ENDDO 211 ENDDO 212 CALL exchange_horiz_2d( ghf_av, nbgp ) 213 202 214 CASE ( 'qsws*' ) 203 215 DO i = nxlg, nxrg -
palm/trunk/SOURCE/check_parameters.f90
r2776 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable output of ground-heat flux also at urban surfaces. 28 ! 29 ! 2776 2018-01-31 10:44:42Z Giersch 27 30 ! Variable synthetic_turbulence_generator has been abbreviated 28 31 ! … … 3322 3325 CONTINUE 3323 3326 3324 CASE ( ' lwp*', 'ol*', 'pra*', 'prr*', 'qsws*', 'r_a*', 'shf*', &3325 's sws*', 't*', 'tsurf*', 'u*', 'z0*', 'z0h*', 'z0q*' )3327 CASE ( 'ghf*', 'lwp*', 'ol*', 'pra*', 'prr*', 'qsws*', 'r_a*', & 3328 'shf*', 'ssws*', 't*', 'tsurf*', 'u*', 'z0*', 'z0h*', 'z0q*' ) 3326 3329 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 3327 3330 message_string = 'illegal value for data_output: "' // & … … 3358 3361 CALL message( 'check_parameters', 'PA0322', 1, 2, 0, 6, 0 ) 3359 3362 ENDIF 3360 IF ( ( TRIM( var ) == 'r_a*' .OR. TRIM( var ) == 'tsurf*' ) & 3363 3364 IF ( TRIM( var ) == 'ghf*' .AND. .NOT. land_surface ) THEN 3365 message_string = 'output of "' // TRIM( var ) // '" requi' // & 3366 'res land_surface = .TRUE.' 3367 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 3368 ENDIF 3369 3370 IF ( ( TRIM( var ) == 'r_a*' .OR. TRIM( var ) == 'tsurf*' .OR. & 3371 TRIM( var ) == 'ghf*' ) & 3361 3372 .AND. .NOT. land_surface .AND. .NOT. urban_surface ) & 3362 3373 THEN … … 3372 3383 ENDIF 3373 3384 3385 IF ( TRIM( var ) == 'ghf*' ) unit = 'W/m2' 3374 3386 IF ( TRIM( var ) == 'lwp*' ) unit = 'kg/m2' 3375 3387 IF ( TRIM( var ) == 'ol*' ) unit = 'm' -
palm/trunk/SOURCE/data_output_2d.f90
r2743 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable output of ground-heat flux also at urban surfaces. 28 ! 29 ! 2743 2018-01-12 16:03:39Z suehring 27 30 ! In case of natural- and urban-type surfaces output surfaces fluxes in W/m2. 28 31 ! … … 545 548 ENDIF 546 549 IF ( mode == 'xy' ) level_z = zu 550 551 CASE ( 'ghf*_xy' ) ! 2d-array 552 IF ( av == 0 ) THEN 553 DO m = 1, surf_lsm_h%ns 554 i = surf_lsm_h%i(m) 555 j = surf_lsm_h%j(m) 556 local_pf(i,j,nzb+1) = surf_lsm_h%ghf(m) 557 ENDDO 558 DO m = 1, surf_usm_h%ns 559 i = surf_usm_h%i(m) 560 j = surf_usm_h%j(m) 561 local_pf(i,j,nzb+1) = surf_usm_h%frac(0,m) * & 562 surf_usm_h%wghf_eb(m) + & 563 surf_usm_h%frac(1,m) * & 564 surf_usm_h%wghf_eb_green(m) + & 565 surf_usm_h%frac(2,m) * & 566 surf_usm_h%wghf_eb_window(m) 567 ENDDO 568 ELSE 569 DO i = nxl, nxr 570 DO j = nys, nyn 571 local_pf(i,j,nzb+1) = ghf_av(j,i) 572 ENDDO 573 ENDDO 574 ENDIF 575 576 resorted = .TRUE. 577 two_d = .TRUE. 578 level_z(nzb+1) = zu(nzb+1) 547 579 548 580 CASE ( 'ol*_xy' ) ! 2d-array -
palm/trunk/SOURCE/land_surface_model_mod.f90
r2765 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Move output of ghf to general 2D output to output ghf also at urban-type 28 ! surfaces. 29 ! Move restart data of ghf_av to read/write_3d_binary, as this is not a 30 ! exclusively LSM variable anymore. 31 ! 32 ! 2765 2018-01-22 11:34:58Z maronga 27 33 ! Major bugfix in calculation of f_shf for vertical surfaces 28 34 ! … … 598 604 c_soil_av, & !< average of c_soil 599 605 c_veg_av, & !< average of c_veg 600 ghf_av, & !< average of ghf601 606 lai_av, & !< average of lai 602 607 qsws_liq_av, & !< average of qsws_liq … … 1044 1049 unit = 'K' 1045 1050 1046 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', ' ghf*', 'm_liq*',&1051 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'm_liq*', & 1047 1052 'qsws_liq*', 'qsws_soil*', 'qsws_veg*', 'r_s*' ) 1048 1053 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN … … 1072 1077 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 1073 1078 ENDIF 1074 IF ( TRIM( var ) == 'ghf*' .AND. .NOT. land_surface ) THEN1075 message_string = 'output of "' // TRIM( var ) // '" requi' // &1076 'res land_surface = .TRUE.'1077 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )1078 ENDIF1079 1079 IF ( TRIM( var ) == 'm_liq*' .AND. .NOT. land_surface ) THEN 1080 1080 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 1111 1111 IF ( TRIM( var ) == 'c_soil*') unit = 'none' 1112 1112 IF ( TRIM( var ) == 'c_veg*' ) unit = 'none' 1113 IF ( TRIM( var ) == 'ghf*') unit = 'W/m2'1114 1113 IF ( TRIM( var ) == 'm_liq*' ) unit = 'm' 1115 1114 IF ( TRIM( var ) == 'qsws_liq*' ) unit = 'W/m2' … … 5042 5041 c_veg_av = 0.0_wp 5043 5042 5044 CASE ( 'ghf*' )5045 IF ( .NOT. ALLOCATED( ghf_av ) ) THEN5046 ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) )5047 ENDIF5048 ghf_av = 0.0_wp5049 5050 5043 CASE ( 'lai*' ) 5051 5044 IF ( .NOT. ALLOCATED( lai_av ) ) THEN … … 5124 5117 j = surf_lsm_h%j(m) 5125 5118 c_veg_av(j,i) = c_veg_av(j,i) + surf_lsm_h%c_veg(m) 5126 ENDDO5127 5128 CASE ( 'ghf*' )5129 DO m = 1, surf_lsm_h%ns5130 i = surf_lsm_h%i(m)5131 j = surf_lsm_h%j(m)5132 ghf_av(j,i) = ghf_av(j,i) + surf_lsm_h%ghf(m)5133 5119 ENDDO 5134 5120 … … 5226 5212 c_veg_av(j,i) = c_veg_av(j,i) & 5227 5213 / REAL( average_count_3d, KIND=wp ) 5228 ENDDO5229 ENDDO5230 5231 CASE ( 'ghf*' )5232 DO i = nxl, nxr5233 DO j = nys, nyn5234 ghf_av(j,i) = ghf_av(j,i) &5235 / REAL( average_count_3d, KIND=wp )5236 5214 ENDDO 5237 5215 ENDDO … … 5439 5417 DO j = nys, nyn 5440 5418 local_pf(i,j,nzb+1) = c_veg_av(j,i) 5441 ENDDO5442 ENDDO5443 ENDIF5444 5445 two_d = .TRUE.5446 grid = 'zu1'5447 5448 CASE ( 'ghf*_xy' ) ! 2d-array5449 IF ( av == 0 ) THEN5450 DO m = 1, surf_lsm_h%ns5451 i = surf_lsm_h%i(m)5452 j = surf_lsm_h%j(m)5453 local_pf(i,j,nzb+1) = surf_lsm_h%ghf(m)5454 ENDDO5455 ELSE5456 DO i = nxl, nxr5457 DO j = nys, nyn5458 local_pf(i,j,nzb+1) = ghf_av(j,i)5459 5419 ENDDO 5460 5420 ENDDO … … 5750 5710 IF ( ALLOCATED( c_veg_av ) ) THEN 5751 5711 WRITE ( 14 ) 'c_veg_av '; WRITE ( 14 ) c_veg_av 5752 ENDIF5753 IF ( ALLOCATED( ghf_av ) ) THEN5754 WRITE ( 14 ) 'ghf_av '; WRITE ( 14 ) ghf_av5755 5712 ENDIF 5756 5713 IF ( ALLOCATED( lai_av ) ) THEN … … 5993 5950 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 5994 5951 5995 CASE ( 'ghf_av' )5996 IF ( .NOT. ALLOCATED( ghf_av ) ) THEN5997 ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) )5998 ENDIF5999 IF ( k == 1 ) READ ( 13 ) tmp_2d6000 ghf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &6001 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)6002 6003 5952 CASE ( 'lai_av' ) 6004 5953 IF ( .NOT. ALLOCATED( lai_av ) ) THEN -
palm/trunk/SOURCE/modules.f90
r2776 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! +ghf_av 28 ! 29 ! 2776 2018-01-31 10:44:42Z Giersch 27 30 ! Variable synthetic_turbulence_generator has been abbreviated and _prerun flags 28 31 ! for skipping module related restart data has beed introduced … … 896 899 USE kinds 897 900 901 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ghf_av !< avg. ground heat flux 898 902 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: lwp_av !< avg. liquid water path 899 903 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: precipitation_rate_av !< avg. precipitation rate -
palm/trunk/SOURCE/read_3d_binary.f90
r2766 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable restarts for land- and urban-surface variables ghf_av, r_a_av and 28 ! tsurf_av. 29 ! 30 ! 2766 2018-01-22 17:17:47Z kanani 27 31 ! Removed preprocessor directive __chem 28 32 ! … … 481 485 SELECT CASE ( TRIM( field_chr ) ) 482 486 487 CASE ( 'ghf_av' ) 488 IF ( .NOT. ALLOCATED( ghf_av ) ) THEN 489 ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) ) 490 ENDIF 491 IF ( k == 1 ) READ ( 13 ) tmp_2d 492 ghf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 493 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 494 483 495 CASE ( 'e' ) 484 496 IF ( k == 1 ) READ ( 13 ) tmp_3d … … 729 741 qv_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 730 742 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 743 744 CASE ( 'r_a_av' ) 745 IF ( .NOT. ALLOCATED( r_a_av ) ) THEN 746 ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) ) 747 ENDIF 748 IF ( k == 1 ) READ ( 13 ) tmp_2d 749 r_a_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 750 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 731 751 732 752 CASE ( 'random_iv' ) ! still unresolved issue … … 840 860 ts_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 841 861 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 862 863 CASE ( 'tsurf_av' ) 864 IF ( .NOT. ALLOCATED( tsurf_av ) ) THEN 865 ALLOCATE( tsurf_av(nysg:nyng,nxlg:nxrg) ) 866 ENDIF 867 IF ( k == 1 ) READ ( 13 ) tmp_2d 868 tsurf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 869 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 842 870 843 871 CASE ( 'u' ) -
palm/trunk/SOURCE/sum_up_3d_data.f90
r2790 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable output of ground-heat flux also at urban surfaces. 28 ! 29 ! 2790 2018-02-06 11:57:19Z suehring 27 30 ! Bugfix in summation of surface sensible and latent heat flux 28 31 ! … … 172 175 173 176 USE averaging, & 174 ONLY: diss_av, e_av, kh_av, km_av, lpt_av, lwp_av, nc_av, nr_av, & 177 ONLY: diss_av, e_av, ghf_av, kh_av, km_av, lpt_av, lwp_av, nc_av, & 178 nr_av, & 175 179 ol_av, p_av, pc_av, pr_av, prr_av, precipitation_rate_av, pt_av,& 176 180 q_av, qc_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qr_av, qsws_av, & … … 255 259 SELECT CASE ( trimvar ) 256 260 261 CASE ( 'ghf*' ) 262 IF ( .NOT. ALLOCATED( ghf_av ) ) THEN 263 ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) ) 264 ENDIF 265 ghf_av = 0.0_wp 266 257 267 CASE ( 'e' ) 258 268 IF ( .NOT. ALLOCATED( e_av ) ) THEN … … 538 548 !-- Store the array chosen on the temporary array. 539 549 SELECT CASE ( trimvar ) 550 551 CASE ( 'ghf*' ) 552 DO m = 1, surf_lsm_h%ns 553 i = surf_lsm_h%i(m) 554 j = surf_lsm_h%j(m) 555 ghf_av(j,i) = ghf_av(j,i) + surf_lsm_h%ghf(m) 556 ENDDO 557 558 DO m = 1, surf_usm_h%ns 559 i = surf_usm_h%i(m) 560 j = surf_usm_h%j(m) 561 ghf_av(j,i) = ghf_av(j,i) + surf_usm_h%frac(0,m) * & 562 surf_usm_h%wghf_eb(m) + & 563 surf_usm_h%frac(1,m) * & 564 surf_usm_h%wghf_eb_green(m) + & 565 surf_usm_h%frac(2,m) * & 566 surf_usm_h%wghf_eb_window(m) 567 ENDDO 540 568 541 569 CASE ( 'e' ) -
palm/trunk/SOURCE/urban_surface_mod.f90
r2766 r2797 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Comment concerning output of ground-heat flux added. 29 ! 30 ! 2766 2018-01-22 17:17:47Z kanani 28 31 ! Removed redundant commas, added some blanks 29 32 ! … … 1332 1335 ENDIF 1333 1336 ENDDO 1334 1337 ! 1338 !-- Please note, the following output quantities belongs to the 1339 !-- individual tile fractions - ground heat flux at wall-, window-, 1340 !-- and green fraction. Aggregated ground-heat flux is treated 1341 !-- accordingly in average_3d_data, sum_up_3d_data, etc.. 1335 1342 CASE ( 'usm_wghf' ) 1336 1343 !-- array of heat flux from ground (wall, roof, land) -
palm/trunk/SOURCE/write_3d_binary.f90
r2718 r2797 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable restarts for land- and urban-surface variables ghf_av, r_a_av and 28 ! tsurf_av. 29 ! 30 ! 2718 2018-01-02 08:49:38Z maronga 27 31 ! Corrected "Former revisions" section 28 32 ! … … 135 139 136 140 USE control_parameters, & 137 ONLY: iran, humidity, passive_scalar, cloud_physics, cloud_droplets, & 138 microphysics_morrison, microphysics_seifert, ocean, topography 141 ONLY: cloud_physics, cloud_droplets, humidity, iran, & 142 land_surface, microphysics_morrison, microphysics_seifert, & 143 ocean, passive_scalar, topography, urban_surface 139 144 140 145 USE indices, & … … 378 383 WRITE ( 14 ) 'z0q_av '; WRITE ( 14 ) z0q_av 379 384 ENDIF 385 IF ( land_surface .OR. urban_surface ) THEN 386 IF ( ALLOCATED( ghf_av ) ) THEN 387 WRITE ( 14 ) 'ghf_av '; WRITE ( 14 ) ghf_av 388 ENDIF 389 IF ( ALLOCATED( r_a_av ) ) THEN 390 WRITE ( 14 ) 'r_a_av '; WRITE ( 14 ) r_a_av 391 ENDIF 392 IF ( ALLOCATED( tsurf_av ) ) THEN 393 WRITE ( 14 ) 'tsurf_av '; WRITE ( 14 ) tsurf_av 394 ENDIF 395 ENDIF 380 396 381 397 !
Note: See TracChangeset
for help on using the changeset viewer.