Changeset 2338 for palm/trunk
- Timestamp:
- Aug 7, 2017 12:15:38 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 9 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r2320 r2338 25 25 # ----------------- 26 26 # $Id$ 27 # Modularize 1D model 28 # 29 # 27 30 # -ls_forcing nudging 28 31 # +large_scale_forcing_nudging … … 360 363 exchange_horiz_2d.f90 fft_xy_mod.f90 flow_statistics.f90 \ 361 364 global_min_max.f90 header.f90 \ 362 inflow_turbulence.f90 init_ 1d_model.f90 init_3d_model.f90 \365 inflow_turbulence.f90 init_3d_model.f90 \ 363 366 init_advec.f90 init_cloud_physics.f90 init_coupling.f90 init_dvrp.f90 \ 364 367 init_grid.f90 init_masks.f90 init_ocean.f90 \ … … 375 378 lpm_write_exchange_statistics.f90 lpm_write_restart_file.f90 \ 376 379 large_scale_forcing_nudging_mod.f90 message.f90 microphysics_mod.f90 \ 377 modules.f90 mod_kinds.f90 mod_particle_attributes.f90 netcdf_interface_mod.f90 \380 modules.f90 mod_kinds.f90 mod_particle_attributes.f90 model_1d_mod.f90 netcdf_interface_mod.f90 \ 378 381 outflow_turbulence.f90 package_parin.f90 palm.f90 parin.f90 plant_canopy_model_mod.f90 \ 379 382 pmc_interface_mod.f90 pmc_child_mod.f90 pmc_general_mod.f90 pmc_handle_communicator_mod.f90 \ … … 458 461 netcdf_interface_mod.o posix_calls_from_fortran.o 459 462 check_parameters.o: modules.o mod_kinds.o land_surface_model_mod.o large_scale_forcing_nudging_mod.o \ 460 microphysics_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o pmc_interface_mod.o \463 microphysics_mod.o model_1d_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o pmc_interface_mod.o \ 461 464 radiation_model_mod.o spectra_mod.o subsidence_mod.o synthetic_turbulence_generator_mod.o \ 462 465 wind_turbine_model_mod.o urban_surface_mod.o … … 500 503 global_min_max.o: modules.o mod_kinds.o 501 504 header.o: modules.o cpulog_mod.o mod_kinds.o large_scale_forcing_nudging_mod.o netcdf_interface_mod.o \ 502 land_surface_model_mod.o microphysics_mod.o plant_canopy_model_mod.o pmc_handle_communicator_mod.o \505 land_surface_model_mod.o microphysics_mod.o model_1d_mod.o plant_canopy_model_mod.o pmc_handle_communicator_mod.o \ 503 506 pmc_interface_mod.o radiation_model_mod.o spectra_mod.o subsidence_mod.o surface_mod.o virtual_flight_mod.o 504 507 inflow_turbulence.o: modules.o cpulog_mod.o mod_kinds.o 505 init_1d_model.o: modules.o mod_kinds.o506 508 init_3d_model.o: modules.o mod_kinds.o advec_ws.o cpulog_mod.o disturb_heatflux.o land_surface_model_mod.o \ 507 large_scale_forcing_nudging_mod.o lpm_init.o netcdf_interface_mod.o \509 large_scale_forcing_nudging_mod.o lpm_init.o model_1d_mod.o netcdf_interface_mod.o \ 508 510 plant_canopy_model_mod.o radiation_model_mod.o random_function_mod.o random_generator_parallel_mod.o \ 509 511 microphysics_mod.o mod_particle_attributes.o surface_layer_fluxes_mod.o \ … … 558 560 message.o: modules.o mod_kinds.o pmc_interface_mod.o 559 561 microphysics_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o 562 model_1d_mod.o: modules.o mod_kinds.o 560 563 modules.o: modules.f90 mod_kinds.o 561 564 mod_kinds.o: mod_kinds.f90 … … 567 570 palm.o: modules.o cpulog_mod.o land_surface_model_mod.o mod_kinds.o \ 568 571 pmc_interface_mod.o surface_layer_fluxes_mod.o 569 parin.o: modules.o cpulog_mod.o land_surface_model_mod.o mod_kinds.o netcdf_interface_mod.o \572 parin.o: modules.o cpulog_mod.o land_surface_model_mod.o mod_kinds.o model_1d_mod.o netcdf_interface_mod.o \ 570 573 plant_canopy_model_mod.o pmc_interface_mod.o progress_bar_mod.o spectra_mod.o \ 571 574 synthetic_turbulence_generator_mod.o radiation_model_mod.o microphysics_mod.o \ … … 604 607 land_surface_model_mod.o radiation_model_mod.o random_function_mod.o random_generator_parallel_mod.o \ 605 608 spectra_mod.o surface_mod.o urban_surface_mod.o 606 read_var_list.o: modules.o mod_kinds.o netcdf_interface_mod.o plant_canopy_model_mod.o \609 read_var_list.o: modules.o mod_kinds.o model_1d_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o \ 607 610 spectra_mod.o microphysics_mod.o urban_surface_mod.o virtual_flight_mod.o 608 611 run_control.o: modules.o cpulog_mod.o mod_kinds.o … … 617 620 surface_layer_fluxes_mod.o: modules.o mod_kinds.o exchange_horiz_2d.o land_surface_model_mod.o \ 618 621 urban_surface_mod.o surface_mod.o 619 surface_mod.o: modules.o mod_kinds.o init_pegrid.o 622 surface_mod.o: modules.o mod_kinds.o init_pegrid.o model_1d_mod.o 620 623 swap_timelevel.o: modules.o cpulog_mod.o mod_kinds.o land_surface_model_mod.o \ 621 624 pmc_interface_mod.o urban_surface_mod.o … … 674 677 radiation_model_mod.o random_function_mod.o random_generator_parallel_mod.o \ 675 678 spectra_mod.o surface_mod.o 676 write_var_list.o: modules.o mod_kinds.o netcdf_interface_mod.o plant_canopy_model_mod.o\679 write_var_list.o: modules.o mod_kinds.o model_1d_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o\ 677 680 spectra_mod.o microphysics_mod.o urban_surface_mod.o virtual_flight_mod.o -
palm/trunk/SOURCE/check_parameters.f90
r2329 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! Bugfix: index corrected for rho_air and rho_air_zw output 28 31 ! … … 510 513 511 514 USE kinds 512 USE model_1d 515 516 USE model_1d_mod, & 517 ONLY: damp_level_1d, damp_level_ind_1d 518 513 519 USE netcdf_interface, & 514 520 ONLY: dopr_unit, do2d_unit, do3d_unit, netcdf_data_format, & -
palm/trunk/SOURCE/header.f90
r2320 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! Modularize large-scale forcing and nudging 28 31 ! … … 354 357 ventilation_effect 355 358 356 USE model_1d ,&359 USE model_1d_mod, & 357 360 ONLY: damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d 358 361 359 362 USE netcdf_interface, & 360 363 ONLY: netcdf_data_format, netcdf_data_format_string, netcdf_deflate -
palm/trunk/SOURCE/init_3d_model.f90
r2329 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! Removed temporary bugfix (r2327) as bug is properly resolved by this revision 28 31 ! … … 387 390 ONLY: collision_turbulence, microphysics_init 388 391 389 USE model_1d, & 390 ONLY: e1d, kh1d, km1d, l1d, rif1d, u1d, us1d, usws1d, v1d, vsws1d 391 392 USE model_1d_mod, & 393 ONLY: e1d, init_1d_model, kh1d, km1d, l1d, rif1d, u1d, us1d, usws1d, & 394 v1d, vsws1d 395 392 396 USE netcdf_interface, & 393 397 ONLY: dots_max, dots_num -
palm/trunk/SOURCE/model_1d_mod.f90
r2337 r2338 1 !> @file init_1d_model.f901 !> @file model_1d_mod.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of PALM. … … 25 25 ! ----------------- 26 26 ! $Id$ 27 ! renamed init_1d_model to model_1d_mod and and formatted it as a module; 28 ! reformatted output of profiles 29 ! 30 ! 27 31 ! revised calculation of mixing length 28 32 ! removed rounding of time step … … 113 117 !> @bug 1D model crashes when using small grid spacings in the order of 1 m 114 118 !------------------------------------------------------------------------------! 119 MODULE model_1d_mod 120 121 USE arrays_3d, & 122 ONLY: dd2zu, ddzu, ddzw, dzu, l_grid, pt_init, q_init, ug, u_init, & 123 vg, v_init, zu 124 125 USE control_parameters, & 126 ONLY: constant_diffusion, constant_flux_layer, dissipation_1d, f, g, & 127 humidity, ibc_e_b, intermediate_timestep_count, & 128 intermediate_timestep_count_max, kappa, km_constant, & 129 message_string, mixing_length_1d, prandtl_number, & 130 roughness_length, run_description_header, simulated_time_chr, timestep_scheme, tsc, z0h_factor 131 132 USE indices, & 133 ONLY: nzb, nzb_diff, nzt 134 135 USE kinds 136 137 USE pegrid 138 139 140 IMPLICIT NONE 141 142 143 INTEGER(iwp) :: current_timestep_number_1d = 0 !< current timestep number (1d-model) 144 INTEGER(iwp) :: damp_level_ind_1d !< lower grid index of damping layer (1d-model) !# 145 146 LOGICAL :: run_control_header_1d = .FALSE. !< flag for output of run control header (1d-model) 147 LOGICAL :: stop_dt_1d = .FALSE. !< termination flag, used in case of too small timestep (1d-model) 148 149 REAL(wp) :: c_m = 0.4_wp !< model constant, 0.4 according to Detering and Etling (1985) 150 REAL(wp) :: damp_level_1d = -1.0_wp !< namelist parameter !# 151 REAL(wp) :: dt_1d = 60.0_wp !< dynamic timestep (1d-model) 152 REAL(wp) :: dt_max_1d = 300.0_wp !< timestep limit (1d-model) 153 REAL(wp) :: dt_pr_1d = 9999999.9_wp !< namelist parameter !# 154 REAL(wp) :: dt_run_control_1d = 60.0_wp !< namelist parameter !# 155 REAL(wp) :: end_time_1d = 864000.0_wp !< namelist parameter !# 156 REAL(wp) :: qs1d !< characteristic humidity scale (1d-model) 157 REAL(wp) :: simulated_time_1d = 0.0_wp !< updated simulated time (1d-model) 158 REAL(wp) :: time_pr_1d = 0.0_wp !< updated simulated time for profile output (1d-model) 159 REAL(wp) :: time_run_control_1d = 0.0_wp !< updated simulated time for run-control output (1d-model) 160 REAL(wp) :: ts1d !< characteristic temperature scale (1d-model) 161 REAL(wp) :: us1d !< friction velocity (1d-model) !# 162 REAL(wp) :: usws1d !< u-component of the momentum flux (1d-model) !# 163 REAL(wp) :: vsws1d !< v-component of the momentum flux (1d-model) !# 164 REAL(wp) :: z01d !< roughness length for momentum (1d-model) 165 REAL(wp) :: z0h1d !< roughness length for scalars (1d-model) 166 167 168 REAL(wp), DIMENSION(:), ALLOCATABLE :: e1d !< tke (1d-model) !# 169 REAL(wp), DIMENSION(:), ALLOCATABLE :: e1d_p !< prognostic value of tke (1d-model) 170 REAL(wp), DIMENSION(:), ALLOCATABLE :: kh1d !< turbulent diffusion coefficient for heat (1d-model) !# 171 REAL(wp), DIMENSION(:), ALLOCATABLE :: km1d !< turbulent diffusion coefficient for momentum (1d-model)!# 172 REAL(wp), DIMENSION(:), ALLOCATABLE :: l_black !< mixing length Blackadar (1d-model) 173 REAL(wp), DIMENSION(:), ALLOCATABLE :: l1d !< mixing length for turbulent diffusion coefficients (1d-model) !# 174 REAL(wp), DIMENSION(:), ALLOCATABLE :: l1d_diss !< mixing length for dissipation (1d-model) 175 REAL(wp), DIMENSION(:), ALLOCATABLE :: rif1d !< Richardson flux number (1d-model) !# 176 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_e !< tendency of e (1d-model) 177 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_em !< weighted tendency of e for previous sub-timestep (1d-model) 178 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_u !< tendency of u (1d-model) 179 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_um !< weighted tendency of u for previous sub-timestep (1d-model) 180 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_v !< tendency of v (1d-model) 181 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_vm !< weighted tendency of v for previous sub-timestep (1d-model) 182 REAL(wp), DIMENSION(:), ALLOCATABLE :: u1d !< u-velocity component (1d-model) !# 183 REAL(wp), DIMENSION(:), ALLOCATABLE :: u1d_p !< prognostic value of u-velocity component (1d-model) 184 REAL(wp), DIMENSION(:), ALLOCATABLE :: v1d !< v-velocity component (1d-model) !# 185 REAL(wp), DIMENSION(:), ALLOCATABLE :: v1d_p !< prognostic value of v-velocity component (1d-model) 186 187 ! 188 !-- Initialize 1D model 189 INTERFACE init_1d_model 190 MODULE PROCEDURE init_1d_model 191 END INTERFACE init_1d_model 192 193 ! 194 !-- Print profiles 195 INTERFACE print_1d_model 196 MODULE PROCEDURE print_1d_model 197 END INTERFACE print_1d_model 198 199 ! 200 !-- Print run control information 201 INTERFACE run_control_1d 202 MODULE PROCEDURE run_control_1d 203 END INTERFACE run_control_1d 204 205 ! 206 !-- Main procedure 207 INTERFACE time_integration_1d 208 MODULE PROCEDURE time_integration_1d 209 END INTERFACE time_integration_1d 210 211 ! 212 !-- Calculate time step 213 INTERFACE timestep_1d 214 MODULE PROCEDURE timestep_1d 215 END INTERFACE timestep_1d 216 217 SAVE 218 219 PRIVATE 220 ! 221 !-- Public interfaces 222 PUBLIC init_1d_model 223 224 ! 225 !-- Public variables 226 PUBLIC damp_level_1d, damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, & 227 e1d, end_time_1d, kh1d, km1d, l1d, rif1d, u1d, us1d, usws1d, v1d, & 228 vsws1d 229 230 231 CONTAINS 232 115 233 SUBROUTINE init_1d_model 116 234 117 118 USE arrays_3d, &119 ONLY: l_grid, ug, u_init, vg, v_init, zu120 121 USE indices, &122 ONLY: nzb, nzt123 124 USE kinds125 126 USE model_1d, &127 ONLY: e1d, e1d_p, kh1d, km1d, l1d, l1d_diss, l_black, qs1d, rif1d, &128 simulated_time_1d, te_e, te_em, te_u, te_um, te_v, te_vm, ts1d, &129 u1d, u1d_p, us1d, usws1d, v1d, v1d_p, vsws1d, z01d, z0h1d130 131 USE control_parameters, &132 ONLY: constant_diffusion, constant_flux_layer, f, humidity, kappa, &133 km_constant, mixing_length_1d, prandtl_number, &134 roughness_length, simulated_time_chr, z0h_factor135 136 235 IMPLICIT NONE 137 236 … … 144 243 ! 145 244 !-- Allocate required 1D-arrays 146 ALLOCATE( e1d(nzb:nzt+1), e1d_p(nzb:nzt+1), & 147 kh1d(nzb:nzt+1), km1d(nzb:nzt+1), & 148 l_black(nzb:nzt+1), l1d(nzb:nzt+1), l1d_diss(nzb:nzt+1), & 149 rif1d(nzb:nzt+1), te_e(nzb:nzt+1), & 150 te_em(nzb:nzt+1), te_u(nzb:nzt+1), te_um(nzb:nzt+1), & 151 te_v(nzb:nzt+1), te_vm(nzb:nzt+1), u1d(nzb:nzt+1), & 152 u1d_p(nzb:nzt+1), v1d(nzb:nzt+1), & 153 v1d_p(nzb:nzt+1) ) 245 ALLOCATE( e1d(nzb:nzt+1), e1d_p(nzb:nzt+1), kh1d(nzb:nzt+1), & 246 km1d(nzb:nzt+1), l_black(nzb:nzt+1), l1d(nzb:nzt+1), & 247 l1d_diss(nzb:nzt+1), rif1d(nzb:nzt+1), te_e(nzb:nzt+1), & 248 te_em(nzb:nzt+1), te_u(nzb:nzt+1), te_um(nzb:nzt+1), & 249 te_v(nzb:nzt+1), te_vm(nzb:nzt+1), u1d(nzb:nzt+1), & 250 u1d_p(nzb:nzt+1), v1d(nzb:nzt+1), v1d_p(nzb:nzt+1) ) 154 251 155 252 ! … … 228 325 229 326 ! 327 !-- Set model constant 328 IF ( dissipation_1d == 'as_in_3d_model' ) c_m = 0.1_wp 329 330 ! 230 331 !-- Set start time in hh:mm:ss - format 231 332 simulated_time_chr = time_to_string( simulated_time_1d ) … … 243 344 ! Description: 244 345 ! ------------ 245 !> Leap-frogtime differencing scheme for the 1D-model.346 !> Runge-Kutta time differencing scheme for the 1D-model. 246 347 !------------------------------------------------------------------------------! 247 348 248 349 SUBROUTINE time_integration_1d 249 350 250 251 USE arrays_3d, &252 ONLY: dd2zu, ddzu, ddzw, l_grid, pt_init, q_init, ug, vg, zu253 254 USE control_parameters, &255 ONLY: constant_diffusion, constant_flux_layer, dissipation_1d, &256 humidity, intermediate_timestep_count, &257 intermediate_timestep_count_max, f, g, ibc_e_b, kappa, &258 mixing_length_1d, &259 simulated_time_chr, timestep_scheme, tsc260 261 USE indices, &262 ONLY: nzb, nzb_diff, nzt263 264 USE kinds265 266 USE model_1d, &267 ONLY: current_timestep_number_1d, damp_level_ind_1d, dt_1d, &268 dt_pr_1d, dt_run_control_1d, e1d, e1d_p, end_time_1d, &269 kh1d, km1d, l1d, l1d_diss, l_black, qs1d, rif1d, simulated_time_1d, &270 stop_dt_1d, te_e, te_em, te_u, te_um, te_v, te_vm, time_pr_1d, &271 ts1d, time_run_control_1d, u1d, u1d_p, us1d, usws1d, v1d, &272 v1d_p, vsws1d, z01d, z0h1d273 274 USE pegrid275 276 351 IMPLICIT NONE 277 352 278 353 CHARACTER (LEN=9) :: time_to_string !< 279 354 280 INTEGER(iwp) :: k !< 355 INTEGER(iwp) :: k !< loop index 281 356 282 REAL(wp) :: a !< 283 REAL(wp) :: b !< 284 REAL(wp) :: c_m = 0.4_wp !< model constant, 0.4 according to Detering and Etling (1985) 285 REAL(wp) :: dissipation !< 286 REAL(wp) :: dpt_dz !< 287 REAL(wp) :: flux !< 288 REAL(wp) :: kmzm !< 289 REAL(wp) :: kmzp !< 290 REAL(wp) :: l_stable !< 291 REAL(wp) :: pt_0 !< 292 REAL(wp) :: uv_total !< 357 REAL(wp) :: a !< auxiliary variable 358 REAL(wp) :: b !< auxiliary variable 359 REAL(wp) :: dissipation !< dissipation of TKE 360 REAL(wp) :: dpt_dz !< vertical temperature gradient 361 REAL(wp) :: flux !< vertical temperature gradient 362 REAL(wp) :: kmzm !< Km(z-dz/2) 363 REAL(wp) :: kmzp !< Km(z+dz/2) 364 REAL(wp) :: l_stable !< mixing length for stable case 365 REAL(wp) :: pt_0 !< reference temperature 366 REAL(wp) :: uv_total !< horizontal wind speed 293 367 294 368 ! … … 759 833 USE constants, & 760 834 ONLY: pi 761 762 USE indices, & 763 ONLY: nzb, nzt 764 765 USE kinds 835 836 IMPLICIT NONE 837 838 INTEGER(iwp) :: k !< loop index 766 839 767 USE model_1d, & 768 ONLY: current_timestep_number_1d, dt_1d, run_control_header_1d, u1d, & 769 us1d, v1d 770 771 USE pegrid 772 773 USE control_parameters, & 774 ONLY: simulated_time_chr 775 776 IMPLICIT NONE 777 778 INTEGER(iwp) :: k !< 779 780 REAL(wp) :: alpha 781 REAL(wp) :: energy 782 REAL(wp) :: umax 783 REAL(wp) :: uv_total 784 REAL(wp) :: vmax 840 REAL(wp) :: alpha !< angle of wind vector at top of constant-flux layer 841 REAL(wp) :: energy !< kinetic energy 842 REAL(wp) :: umax !< maximum of u 843 REAL(wp) :: uv_total !< horizontal wind speed 844 REAL(wp) :: vmax !< maximum of v 785 845 786 846 ! … … 844 904 SUBROUTINE timestep_1d 845 905 846 847 USE arrays_3d, &848 ONLY: dzu, zu849 850 USE indices, &851 ONLY: nzb, nzt852 853 USE kinds854 855 USE model_1d, &856 ONLY: dt_1d, dt_max_1d, km1d, stop_dt_1d857 858 USE pegrid859 860 USE control_parameters, &861 ONLY: message_string862 863 906 IMPLICIT NONE 864 907 865 INTEGER(iwp) :: k !< 866 867 REAL(wp) :: div !< 868 REAL(wp) :: dt_diff !< 869 REAL(wp) :: fac !< 870 REAL(wp) :: value !< 871 908 INTEGER(iwp) :: k !< loop index 909 910 REAL(wp) :: dt_diff !< time step accorind to diffusion criterion 911 REAL(wp) :: fac !< factor of criterion 912 REAL(wp) :: value !< auxiliary variable 872 913 873 914 ! … … 906 947 SUBROUTINE print_1d_model 907 948 908 909 USE arrays_3d, &910 ONLY: pt_init, zu911 912 USE indices, &913 ONLY: nzb, nzt914 915 USE kinds916 917 USE model_1d, &918 ONLY: e1d, kh1d, km1d, l1d, rif1d, u1d, v1d919 920 USE pegrid921 922 USE control_parameters, &923 ONLY: run_description_header, simulated_time_chr924 925 949 IMPLICIT NONE 926 950 927 928 INTEGER(iwp) :: k !< 951 INTEGER(iwp) :: k !< loop parameter 952 953 LOGICAL, SAVE :: write_first = .TRUE. !< flag for writing header 929 954 930 955 … … 936 961 ! 937 962 !-- Write Header 938 WRITE ( 17, 100 ) TRIM( run_description_header ), & 939 TRIM( simulated_time_chr ) 963 IF ( write_first ) THEN 964 WRITE ( 17, 100 ) TRIM( run_description_header ) 965 write_first = .FALSE. 966 ENDIF 967 968 ! 969 !-- Write the values 970 WRITE ( 17, 104 ) TRIM( simulated_time_chr ) 940 971 WRITE ( 17, 101 ) 941 942 !943 !-- Write the values944 972 WRITE ( 17, 102 ) 945 973 WRITE ( 17, 101 ) … … 960 988 ! 961 989 !-- Formats 962 100 FORMAT ( //1X,A/1X,10('-')/' 1d-model profiles'/ &963 'Time: ',A)964 101 FORMAT ( 1X,79('-'))965 102 FORMAT (' 990 100 FORMAT ('# ',A/'#',10('-')/'# 1d-model profiles') 991 104 FORMAT (//'# Time: ',A) 992 101 FORMAT ('#',79('-')) 993 102 FORMAT ('# k zu u v pt e rif Km Kh ', & 966 994 'l zu k') 967 995 103 FORMAT (1X,I4,1X,F7.1,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F5.2,1X,F5.2, & … … 970 998 971 999 END SUBROUTINE print_1d_model 1000 1001 1002 END MODULE -
palm/trunk/SOURCE/modules.f90
r2337 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! moved 1d-model varaibles to own module model_1d_mod 28 ! 29 ! 27 30 ! -old_dt_1d 28 31 ! +l1d_diss … … 1743 1746 ! Description: 1744 1747 ! ------------ 1745 !> Definition of variables for the 1D-model.1746 !------------------------------------------------------------------------------!1747 MODULE model_1d1748 1749 USE kinds1750 1751 INTEGER(iwp) :: current_timestep_number_1d = 0 !< current timestep number (1d-model)1752 INTEGER(iwp) :: damp_level_ind_1d !< lower grid index of damping layer (1d-model)1753 1754 LOGICAL :: run_control_header_1d = .FALSE. !< flag for output of run control header (1d-model)1755 LOGICAL :: stop_dt_1d = .FALSE. !< termination flag, used in case of too small timestep (1d-model)1756 1757 REAL(wp) :: damp_level_1d = -1.0_wp !< namelist parameter1758 REAL(wp) :: dt_1d = 60.0_wp !< dynamic timestep (1d-model)1759 REAL(wp) :: dt_max_1d = 300.0_wp !< timestep limit (1d-model)1760 REAL(wp) :: dt_pr_1d = 9999999.9_wp !< namelist parameter1761 REAL(wp) :: dt_run_control_1d = 60.0_wp !< namelist parameter1762 REAL(wp) :: end_time_1d = 864000.0_wp !< namelist parameter1763 REAL(wp) :: qs1d !< characteristic humidity scale (1d-model)1764 REAL(wp) :: simulated_time_1d = 0.0_wp !< updated simulated time (1d-model)1765 REAL(wp) :: time_pr_1d = 0.0_wp !< updated simulated time for profile output (1d-model)1766 REAL(wp) :: time_run_control_1d = 0.0_wp !< updated simulated time for run-control output (1d-model)1767 REAL(wp) :: ts1d !< characteristic temperature scale (1d-model)1768 REAL(wp) :: us1d !< friction velocity (1d-model)1769 REAL(wp) :: usws1d !< u-component of the momentum flux (1d-model)1770 REAL(wp) :: vsws1d !< v-component of the momentum flux (1d-model)1771 REAL(wp) :: z01d !< roughness length for momentum (1d-model)1772 REAL(wp) :: z0h1d !< roughness length for scalars (1d-model)1773 1774 1775 REAL(wp), DIMENSION(:), ALLOCATABLE :: e1d !< tke (1d-model)1776 REAL(wp), DIMENSION(:), ALLOCATABLE :: e1d_p !< prognostic value of tke (1d-model)1777 REAL(wp), DIMENSION(:), ALLOCATABLE :: kh1d !< turbulent diffusion coefficient for heat (1d-model)1778 REAL(wp), DIMENSION(:), ALLOCATABLE :: km1d !< turbulent diffusion coefficient for momentum (1d-model)1779 REAL(wp), DIMENSION(:), ALLOCATABLE :: l_black !< mixing length Blackadar (1d-model)1780 REAL(wp), DIMENSION(:), ALLOCATABLE :: l1d !< mixing length for turbulent diffusion coefficients (1d-model)1781 REAL(wp), DIMENSION(:), ALLOCATABLE :: l1d_diss !< mixing length for dissipation (1d-model)1782 REAL(wp), DIMENSION(:), ALLOCATABLE :: rif1d !< Richardson flux number (1d-model)1783 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_e !< tendency of e (1d-model)1784 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_em !< weighted tendency of e for previous sub-timestep (1d-model)1785 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_u !< tendency of u (1d-model)1786 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_um !< weighted tendency of u for previous sub-timestep (1d-model)1787 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_v !< tendency of v (1d-model)1788 REAL(wp), DIMENSION(:), ALLOCATABLE :: te_vm !< weighted tendency of v for previous sub-timestep (1d-model)1789 REAL(wp), DIMENSION(:), ALLOCATABLE :: u1d !< u-velocity component (1d-model)1790 REAL(wp), DIMENSION(:), ALLOCATABLE :: u1d_p !< prognostic value of u-velocity component (1d-model)1791 REAL(wp), DIMENSION(:), ALLOCATABLE :: v1d !< v-velocity component (1d-model)1792 REAL(wp), DIMENSION(:), ALLOCATABLE :: v1d_p !< prognostic value of v-velocity component (1d-model)1793 1794 SAVE1795 1796 END MODULE model_1d1797 1798 1799 1800 1801 !------------------------------------------------------------------------------!1802 ! Description:1803 ! ------------1804 1748 !> Definition of variables which define processor topology and the exchange of 1805 1749 !> ghost point layers. This module must be placed in all routines containing -
palm/trunk/SOURCE/parin.f90
r2310 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! Bugfix: re-arranged call for error messages for ENVPAR file 28 31 ! … … 313 316 limiter_sedimentation ,na_init, nc_const, ventilation_effect 314 317 315 USE model_1d ,&318 USE model_1d_mod, & 316 319 ONLY: damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d 317 320 -
palm/trunk/SOURCE/read_var_list.f90
r2320 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! Formatting adjustment 28 31 ! … … 222 225 nc_const, ventilation_effect 223 226 224 USE model_1d ,&227 USE model_1d_mod, & 225 228 ONLY: damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d 226 229 -
palm/trunk/SOURCE/surface_mod.f90
r2318 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! New function to obtain topography top index. 28 31 ! … … 71 74 USE kinds 72 75 73 USE model_1d ,&76 USE model_1d_mod, & 74 77 ONLY: rif1d, us1d, usws1d, vsws1d 75 78 76 79 77 80 IMPLICIT NONE -
palm/trunk/SOURCE/write_var_list.f90
r2265 r2338 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize 1D model 28 ! 29 ! 27 30 ! Unused variables removed. 28 31 ! … … 194 197 ventilation_effect 195 198 196 USE model_1d ,&199 USE model_1d_mod, & 197 200 ONLY: damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d 198 201
Note: See TracChangeset
for help on using the changeset viewer.