Changeset 3003
- Timestamp:
- Apr 23, 2018 10:22:58 AM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/flow_statistics.f90
r2968 r3003 25 25 ! ----------------- 26 26 ! $Id$ 27 ! The inversion height will not be calcuated before the first timestep in 28 ! case of restarts. 29 ! 30 ! 2968 2018-04-13 11:52:24Z suehring 27 31 ! Bugfix in output of timeseries quantities in case of elevated model surfaces. 28 32 ! … … 277 281 USE control_parameters, & 278 282 ONLY: average_count_pr, cloud_droplets, cloud_physics, do_sum, & 279 dt_3d, g, humidity, kappa, land_surface, large_scale_forcing, & 280 large_scale_subsidence, max_pr_user, message_string, neutral, & 281 microphysics_morrison, microphysics_seifert, ocean, & 282 passive_scalar, simulated_time, use_subsidence_tendencies, & 283 dt_3d, g, humidity, initializing_actions, kappa, land_surface, & 284 large_scale_forcing, large_scale_subsidence, max_pr_user, & 285 message_string, neutral, microphysics_morrison, & 286 microphysics_seifert, ocean, passive_scalar, simulated_time, & 287 simulated_time_at_begin, use_subsidence_tendencies, & 283 288 use_surface_fluxes, use_top_fluxes, ws_scheme_mom, & 284 289 ws_scheme_sca … … 357 362 REAL(wp) :: v2 !< 358 363 REAL(wp) :: w2 !< 359 REAL(wp) :: z_i(2) !<360 364 361 365 REAL(wp) :: dptdz(nzb+1:nzt+1) !< … … 2004 2008 !-- is less than 1.5 times the height where the heat flux becomes negative 2005 2009 !-- (positive) for the first time. 2006 z_i(1) = 0.0_wp 2007 first = .TRUE. 2008 2009 IF ( ocean ) THEN 2010 DO k = nzt, nzb+1, -1 2011 IF ( first .AND. hom(k,1,18,sr) < -1.0E-8_wp ) THEN 2012 first = .FALSE. 2013 height = zw(k) 2014 ENDIF 2015 IF ( hom(k,1,18,sr) < -1.0E-8_wp .AND. & 2016 hom(k-1,1,18,sr) > hom(k,1,18,sr) ) THEN 2017 IF ( zw(k) < 1.5_wp * height ) THEN 2018 z_i(1) = zw(k) 2019 ELSE 2020 z_i(1) = height 2021 ENDIF 2022 EXIT 2023 ENDIF 2024 ENDDO 2025 ELSE 2026 DO k = nzb, nzt-1 2027 IF ( first .AND. hom(k,1,18,sr) < -1.0E-8_wp ) THEN 2028 first = .FALSE. 2029 height = zw(k) 2030 ENDIF 2031 IF ( hom(k,1,18,sr) < -1.0E-8_wp .AND. & 2032 hom(k+1,1,18,sr) > hom(k,1,18,sr) ) THEN 2033 IF ( zw(k) < 1.5_wp * height ) THEN 2034 z_i(1) = zw(k) 2035 ELSE 2036 z_i(1) = height 2037 ENDIF 2038 EXIT 2039 ENDIF 2040 ENDDO 2041 ENDIF 2042 2043 ! 2044 !-- Second scheme: Gradient scheme from Sullivan et al. (1998), modified 2045 !-- by Uhlenbrock(2006). The boundary layer height is the height with the 2046 !-- maximal local temperature gradient: starting from the second (the last 2047 !-- but one) vertical gridpoint, the local gradient must be at least 2048 !-- 0.2K/100m and greater than the next four gradients. 2049 !-- WARNING: The threshold value of 0.2K/100m must be adjusted for the 2050 !-- ocean case! 2051 z_i(2) = 0.0_wp 2052 DO k = nzb+1, nzt+1 2053 dptdz(k) = ( hom(k,1,4,sr) - hom(k-1,1,4,sr) ) * ddzu(k) 2054 ENDDO 2055 dptdz_threshold = 0.2_wp / 100.0_wp 2056 2057 IF ( ocean ) THEN 2058 DO k = nzt+1, nzb+5, -1 2059 IF ( dptdz(k) > dptdz_threshold .AND. & 2060 dptdz(k) > dptdz(k-1) .AND. dptdz(k) > dptdz(k-2) .AND. & 2061 dptdz(k) > dptdz(k-3) .AND. dptdz(k) > dptdz(k-4) ) THEN 2062 z_i(2) = zw(k-1) 2063 EXIT 2064 ENDIF 2065 ENDDO 2066 ELSE 2067 DO k = nzb+1, nzt-3 2068 IF ( dptdz(k) > dptdz_threshold .AND. & 2069 dptdz(k) > dptdz(k+1) .AND. dptdz(k) > dptdz(k+2) .AND. & 2070 dptdz(k) > dptdz(k+3) .AND. dptdz(k) > dptdz(k+4) ) THEN 2071 z_i(2) = zw(k-1) 2072 EXIT 2073 ENDIF 2074 ENDDO 2010 IF ( TRIM( initializing_actions ) /= 'read_restart_data' .OR. & 2011 simulated_time_at_begin /= simulated_time ) THEN 2012 2013 z_i(1) = 0.0_wp 2014 first = .TRUE. 2015 2016 IF ( ocean ) THEN 2017 DO k = nzt, nzb+1, -1 2018 IF ( first .AND. hom(k,1,18,sr) < -1.0E-8_wp ) THEN 2019 first = .FALSE. 2020 height = zw(k) 2021 ENDIF 2022 IF ( hom(k,1,18,sr) < -1.0E-8_wp .AND. & 2023 hom(k-1,1,18,sr) > hom(k,1,18,sr) ) THEN 2024 IF ( zw(k) < 1.5_wp * height ) THEN 2025 z_i(1) = zw(k) 2026 ELSE 2027 z_i(1) = height 2028 ENDIF 2029 EXIT 2030 ENDIF 2031 ENDDO 2032 ELSE 2033 DO k = nzb, nzt-1 2034 IF ( first .AND. hom(k,1,18,sr) < -1.0E-8_wp ) THEN 2035 first = .FALSE. 2036 height = zw(k) 2037 ENDIF 2038 IF ( hom(k,1,18,sr) < -1.0E-8_wp .AND. & 2039 hom(k+1,1,18,sr) > hom(k,1,18,sr) ) THEN 2040 IF ( zw(k) < 1.5_wp * height ) THEN 2041 z_i(1) = zw(k) 2042 ELSE 2043 z_i(1) = height 2044 ENDIF 2045 EXIT 2046 ENDIF 2047 ENDDO 2048 ENDIF 2049 2050 ! 2051 !-- Second scheme: Gradient scheme from Sullivan et al. (1998), modified 2052 !-- by Uhlenbrock(2006). The boundary layer height is the height with the 2053 !-- maximal local temperature gradient: starting from the second (the 2054 !-- last but one) vertical gridpoint, the local gradient must be at least 2055 !-- 0.2K/100m and greater than the next four gradients. 2056 !-- WARNING: The threshold value of 0.2K/100m must be adjusted for the 2057 !-- ocean case! 2058 z_i(2) = 0.0_wp 2059 DO k = nzb+1, nzt+1 2060 dptdz(k) = ( hom(k,1,4,sr) - hom(k-1,1,4,sr) ) * ddzu(k) 2061 ENDDO 2062 dptdz_threshold = 0.2_wp / 100.0_wp 2063 2064 IF ( ocean ) THEN 2065 DO k = nzt+1, nzb+5, -1 2066 IF ( dptdz(k) > dptdz_threshold .AND. & 2067 dptdz(k) > dptdz(k-1) .AND. dptdz(k) > dptdz(k-2) .AND.& 2068 dptdz(k) > dptdz(k-3) .AND. dptdz(k) > dptdz(k-4) ) THEN 2069 z_i(2) = zw(k-1) 2070 EXIT 2071 ENDIF 2072 ENDDO 2073 ELSE 2074 DO k = nzb+1, nzt-3 2075 IF ( dptdz(k) > dptdz_threshold .AND. & 2076 dptdz(k) > dptdz(k+1) .AND. dptdz(k) > dptdz(k+2) .AND.& 2077 dptdz(k) > dptdz(k+3) .AND. dptdz(k) > dptdz(k+4) ) THEN 2078 z_i(2) = zw(k-1) 2079 EXIT 2080 ENDIF 2081 ENDDO 2082 ENDIF 2083 2075 2084 ENDIF 2076 2085 … … 2087 2096 ENDIF 2088 2097 ENDDO 2098 2089 2099 ! 2090 2100 !-- Computation of both the characteristic vertical velocity and -
palm/trunk/SOURCE/modules.f90
r2968 r3003 25 25 ! ----------------- 26 26 ! $Id$ 27 ! The inversion height is defined as a global variable now which belongs to the 28 ! module statistics 29 ! 30 ! 2968 2018-04-13 11:52:24Z suehring 27 31 ! +topo_min_level 28 32 ! … … 2041 2045 REAL(wp) :: v_max !< maximum of absolute v-veloctiy in entire domain 2042 2046 REAL(wp) :: w_max !< maximum of absolute w-veloctiy in entire domain 2047 2048 REAL(wp), DIMENSION(2) :: z_i !< inversion height 2043 2049 2044 2050 REAL(wp), DIMENSION(:), ALLOCATABLE :: mean_surface_level_height !< mean surface level height for the different statistic regions -
palm/trunk/SOURCE/read_restart_data_mod.f90
r2956 r3003 25 25 ! ----------------- 26 26 ! $Id$ 27 ! z_i is also read to use the last known inversion height from the 28 ! initial run as the first inversion height which is written into the 29 ! run control file 30 ! 31 ! 2956 2018-04-10 11:01:03Z Giersch 27 32 ! spectrum_x and spectrum_y have been moved to global data 28 33 ! … … 124 129 USE statistics, & 125 130 ONLY: statistic_regions, hom, hom_sum, pr_palm, u_max, u_max_ijk, & 126 v_max, v_max_ijk, w_max, w_max_ijk 131 v_max, v_max_ijk, w_max, w_max_ijk, z_i 127 132 128 133 USE synthetic_turbulence_generator_mod, & … … 748 753 CASE ( 'zeta_min' ) 749 754 READ ( 13 ) zeta_min 755 CASE ( 'z_i' ) 756 READ ( 13 ) z_i 757 750 758 751 759 CASE DEFAULT -
palm/trunk/SOURCE/write_restart_data_mod.f90
r2956 r3003 25 25 ! ----------------- 26 26 ! $Id$ 27 ! z_i is also written out to use the last known inversion height from the 28 ! initial run as the first inversion height which is written into the 29 ! run control file 30 ! 31 ! 2956 2018-04-10 11:01:03Z Giersch 27 32 ! spectrum_x and spectrum_y have been moved to global data 28 33 ! … … 126 131 USE statistics, & 127 132 ONLY: statistic_regions, hom, hom_sum, u_max, u_max_ijk, v_max, & 128 v_max_ijk, w_max, w_max_ijk 133 v_max_ijk, w_max, w_max_ijk, z_i 129 134 130 135 USE user_write_restart_data_mod, & … … 900 905 WRITE ( 14 ) zeta_min 901 906 907 CALL wrd_write_string( 'z_i' ) 908 WRITE ( 14 ) z_i 909 902 910 903 911 ! … … 915 923 !-- If required, write restart data for turbulence generator. 916 924 IF ( syn_turb_gen ) CALL stg_wrd_global 925 917 926 ! 918 927 !-- If required, write restart data for gust module.
Note: See TracChangeset
for help on using the changeset viewer.