Changeset 151
- Timestamp:
- Mar 7, 2008 1:42:18 PM (17 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r150 r151 26 26 User-defined spectra. 27 27 28 advec_particles, calc_spectra, check_open, check_parameters, data_output_spectra, init_particles, init_pegrid, init_3d_model, modules, netcdf, particle_boundary_conds, read_var_list, read_3d_binary, user_interface, write_var_list, write_3d_binary 28 advec_particles, calc_spectra, check_open, check_parameters, data_output_spectra, init_particles, init_pegrid, init_3d_model, modules, netcdf, particle_boundary_conds, read_var_list, read_3d_binary, time_integration, user_interface, write_var_list, write_3d_binary 29 30 New: inflow_turbulence 29 31 30 32 … … 64 66 Bugfix: extra '*' removed in user_statistics sample code (user_interface) 65 67 Bugfix: a stop command was missing in some cases of the parallel branch (local_stop) 68 Bugfix in volume flow control for non-cyclic boundary conditions (pres) 66 69 67 70 71 flow_statistics, local_stop, plant_canopy_model, pres, read_3d_binary, user_interface, write_3d_binary 68 72 69 flow_statistics, local_stop, plant_canopy_model, read_3d_binary, user_interface, write_3d_binary70 -
palm/trunk/SOURCE/Makefile
r138 r151 4 4 # Actual revisions: 5 5 # ----------------- 6 # +plant_canopy_model 6 # +plant_canopy_model, inflow_turbulence 7 7 # 8 8 # +surface_coupler … … 55 55 disturb_heatflux.f90 eqn_state_seawater.f90 exchange_horiz.f90 exchange_horiz_2d.f90 \ 56 56 fft_xy.f90 flow_statistics.f90 global_min_max.f90 header.f90 \ 57 impact_of_latent_heat.f90 init_1d_model.f90 init_3d_model.f90 \ 58 init_advec.f90 init_cloud_physics.f90 init_dvrp.f90 init_grid.f90 \ 59 init_ocean.f90 init_particles.f90 init_pegrid.f90 init_pt_anomaly.f90 \ 60 init_rankine.f90 init_slope.f90 interaction_droplets_ptq.f90 \ 61 local_flush.f90 local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \ 57 impact_of_latent_heat.f90 inflow_turbulence.f90 init_1d_model.f90 \ 58 init_3d_model.f90 init_advec.f90 init_cloud_physics.f90 init_dvrp.f90 \ 59 init_grid.f90 init_ocean.f90 init_particles.f90 init_pegrid.f90 \ 60 init_pt_anomaly.f90 init_rankine.f90 init_slope.f90 \ 61 interaction_droplets_ptq.f90 local_flush.f90 local_getenv.f90 \ 62 local_stop.f90 local_system.f90 local_tremain.f90 \ 62 63 local_tremain_ini.f90 modules.f90 netcdf.f90 package_parin.f90 \ 63 64 palm.f90 parin.f90 particle_boundary_conds.f90 \ … … 87 88 disturb_heatflux.o eqn_state_seawater.o exchange_horiz.o exchange_horiz_2d.o fft_xy.o \ 88 89 flow_statistics.o global_min_max.o header.o impact_of_latent_heat.o \ 89 in it_1d_model.o init_3d_model.o init_advec.o init_cloud_physics.o \90 inflow_turbulence.o init_1d_model.o init_3d_model.o init_advec.o init_cloud_physics.o \ 90 91 init_dvrp.o init_grid.o init_ocean.o init_particles.o init_pegrid.o \ 91 92 init_pt_anomaly.o init_rankine.o init_slope.o \ … … 182 183 header.o: modules.o 183 184 impact_of_latent_heat.o: modules.o 185 inflow_turbulence.o: modules.o 184 186 init_1d_model.o: modules.o 185 187 init_3d_model.o: modules.o random_function.o -
palm/trunk/SOURCE/check_parameters.f90
r147 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Case of reading data for recycling included in initializing_actions 6 ! Case of reading data for recycling included in initializing_actions, 7 ! check of turbulent_inflow and calculation of recycling_plane 7 8 ! 8 9 ! Former revisions: … … 2981 2982 2982 2983 ! 2984 !-- A turbulent inflow requires Dirichlet conditions at the respective inflow 2985 !-- boundary (so far, a turbulent inflow is realized from the left side only) 2986 IF ( turbulent_inflow .AND. bc_lr /= 'dirichlet/radiation' ) THEN 2987 IF ( myid == 0 ) THEN 2988 PRINT*, '+++ check_parameters:' 2989 PRINT*, ' turbulent_inflow = .T. requires a Dirichlet condition', & 2990 ' at the inflow boundary' 2991 ENDIF 2992 CALL local_stop 2993 ENDIF 2994 2995 ! 2996 !-- In case of turbulent inflow calculate the index of the recycling plane 2997 IF ( turbulent_inflow ) THEN 2998 IF ( recycling_width == 9999999.9 ) THEN 2999 ! 3000 !-- Set the default value for the width of the recycling domain 3001 recycling_width = 0.1 * nx * dx 3002 ELSE 3003 IF ( recycling_width < dx .OR. recycling_width > nx * dx ) THEN 3004 IF ( myid == 0 ) THEN 3005 PRINT*, '+++ check_parameters:' 3006 PRINT*, ' illegal value for recycling_width: ', & 3007 recycling_width 3008 ENDIF 3009 CALL local_stop 3010 ENDIF 3011 ENDIF 3012 ! 3013 !-- Calculate the index 3014 recycling_plane = recycling_width / dx 3015 ENDIF 3016 3017 ! 2983 3018 !-- Check random generator 2984 3019 IF ( random_generator /= 'system-specific' .AND. & -
palm/trunk/SOURCE/header.f90
r147 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Output of turbulence recycling informations 7 7 ! 8 8 ! Former revisions: … … 514 514 WRITE ( io, 304 ) 515 515 IF ( coupling_mode == 'uncoupled' ) THEN 516 WRITE ( io, 3 19) top_momentumflux_u, top_momentumflux_v516 WRITE ( io, 320 ) top_momentumflux_u, top_momentumflux_v 517 517 IF ( constant_top_heatflux ) THEN 518 518 WRITE ( io, 306 ) top_heatflux … … 548 548 IF ( bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' ) THEN 549 549 WRITE ( io, 318 ) outflow_damping_width, km_damp_max 550 IF ( turbulent_inflow ) THEN 551 WRITE ( io, 319 ) recycling_width, recycling_plane, & 552 inflow_damping_height, inflow_damping_width 553 ENDIF 550 554 ENDIF 551 555 552 556 ! 553 557 !-- Listing of 1D-profiles 554 WRITE ( io, 32 0) dt_dopr_listing558 WRITE ( io, 325 ) dt_dopr_listing 555 559 IF ( averaging_interval_pr /= 0.0 ) THEN 556 WRITE ( io, 32 1) averaging_interval_pr, dt_averaging_input_pr560 WRITE ( io, 326 ) averaging_interval_pr, dt_averaging_input_pr 557 561 ENDIF 558 562 … … 561 565 WRITE ( io, 330 ) 562 566 IF ( averaging_interval_pr /= 0.0 ) THEN 563 WRITE ( io, 32 1) averaging_interval_pr, dt_averaging_input_pr567 WRITE ( io, 326 ) averaging_interval_pr, dt_averaging_input_pr 564 568 ENDIF 565 569 … … 1414 1418 318 FORMAT (/' outflow damping layer width: ',I3,' gridpoints with km_', & 1415 1419 'max =',F5.1,' m**2/s') 1416 319 FORMAT (' Predefined constant momentumflux: u: ',F9.6,' m**2/s**2'/ & 1420 319 FORMAT (' turbulence recycling at inflow switched on'/ & 1421 ' width of recycling domain: ',F7.1,' m grid index: ',I4/ & 1422 ' inflow damping height: ',F6.1,' m width: ',F6.1,' m') 1423 320 FORMAT (' Predefined constant momentumflux: u: ',F9.6,' m**2/s**2'/ & 1417 1424 ' v: ',F9.6,' m**2/s**2') 1418 32 0FORMAT (//' List output:'/ &1425 325 FORMAT (//' List output:'/ & 1419 1426 ' -----------'// & 1420 1427 ' 1D-Profiles:'/ & 1421 1428 ' Output every ',F8.2,' s') 1422 32 1FORMAT (' Time averaged over ',F8.2,' s'/ &1429 326 FORMAT (' Time averaged over ',F8.2,' s'/ & 1423 1430 ' Averaging input every ',F8.2,' s') 1424 1431 330 FORMAT (//' Data output:'/ & -
palm/trunk/SOURCE/init_3d_model.f90
r147 r151 602 602 603 603 ! 604 !-- apply channel flow boundary condition604 !-- Apply channel flow boundary condition 605 605 IF ( TRIM( bc_uv_t ) == 'dirichlet_0' ) THEN 606 606 … … 608 608 v(nzt+1,:,:) = 0.0 609 609 610 !-- for the Dirichlet condition to be correctly applied at the top, set610 !-- For the Dirichlet condition to be correctly applied at the top, set 611 611 !-- ug and vg to zero there 612 612 ug(nzt+1) = 0.0 … … 755 755 756 756 ! 757 !-- For the moment, perturbation pressure and vertical velocity are zero 758 p = 0.0; w = 0.0 759 760 ! 761 !-- Initialize array sums (must be defined in first call of pres) 762 sums = 0.0 763 764 ! 765 !-- Treating cloud physics, liquid water content and precipitation amount 766 !-- are zero at beginning of the simulation 767 IF ( cloud_physics ) THEN 768 ql = 0.0 769 IF ( precipitation ) precipitation_amount = 0.0 770 ENDIF 771 772 ! 773 !-- Impose vortex with vertical axis on the initial velocity profile 774 IF ( INDEX( initializing_actions, 'initialize_vortex' ) /= 0 ) THEN 775 CALL init_rankine 776 ENDIF 777 778 ! 779 !-- Impose temperature anomaly (advection test only) 780 IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 ) THEN 781 CALL init_pt_anomaly 782 ENDIF 783 784 ! 785 !-- If required, change the surface temperature at the start of the 3D run 786 IF ( pt_surface_initial_change /= 0.0 ) THEN 787 pt(nzb,:,:) = pt(nzb,:,:) + pt_surface_initial_change 788 ENDIF 789 790 ! 791 !-- If required, change the surface humidity/scalar at the start of the 3D 792 !-- run 793 IF ( ( humidity .OR. passive_scalar ) .AND. & 794 q_surface_initial_change /= 0.0 ) THEN 795 q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change 796 ENDIF 797 798 ! 799 !-- Initialize the random number generator (from numerical recipes) 800 CALL random_function_ini 801 802 ! 803 !-- Impose random perturbation on the horizontal velocity field and then 804 !-- remove the divergences from the velocity field 805 IF ( create_disturbances ) THEN 806 CALL disturb_field( nzb_u_inner, tend, u ) 807 CALL disturb_field( nzb_v_inner, tend, v ) 808 n_sor = nsor_ini 809 CALL pres 810 n_sor = nsor 811 ENDIF 812 813 ! 814 !-- Once again set the perturbation pressure explicitly to zero in order to 815 !-- assure that it does not generate any divergences in the first time step. 816 !-- At t=0 the velocity field is free of divergence (as constructed above). 817 !-- Divergences being created during a time step are not yet known and thus 818 !-- cannot be corrected during the time step yet. 819 p = 0.0 820 821 ! 822 !-- Initialize old and new time levels. 823 IF ( timestep_scheme(1:5) /= 'runge' ) THEN 824 e_m = e; pt_m = pt; u_m = u; v_m = v; w_m = w; kh_m = kh; km_m = km 825 ELSE 826 te_m = 0.0; tpt_m = 0.0; tu_m = 0.0; tv_m = 0.0; tw_m = 0.0 827 ENDIF 828 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w 829 830 IF ( humidity .OR. passive_scalar ) THEN 831 IF ( ASSOCIATED( q_m ) ) q_m = q 832 IF ( timestep_scheme(1:5) == 'runge' ) tq_m = 0.0 833 q_p = q 834 IF ( humidity .AND. ASSOCIATED( vpt_m ) ) vpt_m = vpt 835 ENDIF 836 837 IF ( ocean ) THEN 838 tsa_m = 0.0 839 sa_p = sa 840 ENDIF 841 842 843 ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data' .OR. & 844 TRIM( initializing_actions ) == 'read_data_for_recycling' ) & 845 THEN 846 ! 847 !-- When reading data for initializing the recycling method, first read 848 !-- some of the global variables from restart file 849 IF ( TRIM( initializing_actions ) == 'read_data_for_recycling' ) THEN 850 851 WRITE (9,*) 'before read_parts_of_var_list' 852 CALL local_flush( 9 ) 853 CALL read_parts_of_var_list 854 WRITE (9,*) 'after read_parts_of_var_list' 855 CALL local_flush( 9 ) 856 CALL close_file( 13 ) 857 ! 858 !-- Store temporally and horizontally averaged vertical profiles to be 859 !-- used as mean inflow profiles 860 ALLOCATE( mean_inflow_profiles(nzb:nzt+1,5) ) 861 862 mean_inflow_profiles(:,1) = hom_sum(:,1,0) ! u 863 mean_inflow_profiles(:,2) = hom_sum(:,2,0) ! v 864 mean_inflow_profiles(:,4) = hom_sum(:,4,0) ! pt 865 mean_inflow_profiles(:,5) = hom_sum(:,8,0) ! e 866 867 ! 868 !-- Use these mean profiles for the inflow (provided that Dirichlet 869 !-- conditions are used) 870 IF ( inflow_l ) THEN 871 DO j = nys-1, nyn+1 872 DO k = nzb, nzt+1 873 u(k,j,-1) = mean_inflow_profiles(k,1) 874 v(k,j,-1) = mean_inflow_profiles(k,2) 875 w(k,j,-1) = 0.0 876 pt(k,j,-1) = mean_inflow_profiles(k,4) 877 e(k,j,-1) = mean_inflow_profiles(k,5) 878 ENDDO 879 ENDDO 880 ENDIF 881 882 ! 883 !-- Calculate the damping factors to be used at the inflow. For a 884 !-- turbulent inflow the turbulent fluctuations have to be limited 885 !-- vertically because otherwise the turbulent inflow layer will grow 886 !-- in time. 887 IF ( inflow_damping_height == 9999999.9 ) THEN 888 ! 889 !-- Default: use the inversion height calculated by the prerun 890 inflow_damping_height = hom_sum(nzb+6,pr_palm,0) 891 892 ENDIF 893 894 IF ( inflow_damping_width == 9999999.9 ) THEN 895 ! 896 !-- Default for the transition range: one tenth of the undamped layer 897 inflow_damping_width = 0.1 * inflow_damping_height 898 899 ENDIF 900 901 ALLOCATE( inflow_damping_factor(nzb:nzt+1) ) 902 903 DO k = nzb, nzt+1 904 905 IF ( zu(k) <= inflow_damping_height ) THEN 906 inflow_damping_factor(k) = 1.0 907 ELSEIF ( zu(k) <= inflow_damping_height + inflow_damping_width ) & 908 THEN 909 inflow_damping_factor(k) = 1.0 - & 910 ( zu(k) - inflow_damping_height ) / & 911 inflow_damping_width 912 ELSE 913 inflow_damping_factor(k) = 0.0 914 ENDIF 915 916 ENDDO 917 918 ENDIF 919 920 921 ! 922 !-- Read binary data from restart file 923 WRITE (9,*) 'before read_3d_binary' 924 CALL local_flush( 9 ) 925 CALL read_3d_binary 926 WRITE (9,*) 'after read_3d_binary' 927 CALL local_flush( 9 ) 928 929 ! 930 !-- Calculate initial temperature field and other constants used in case 931 !-- of a sloping surface 932 IF ( sloping_surface ) CALL init_slope 933 934 ! 935 !-- Initialize new time levels (only done in order to set boundary values 936 !-- including ghost points) 937 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w 938 IF ( humidity .OR. passive_scalar ) q_p = q 939 IF ( ocean ) sa_p = sa 940 941 ELSE 942 ! 943 !-- Actually this part of the programm should not be reached 944 IF ( myid == 0 ) PRINT*,'+++ init_3d_model: unknown initializing ', & 945 'problem' 946 CALL local_stop 947 ENDIF 948 949 950 IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN 951 ! 952 !-- Initialize old timelevels needed for radiation boundary conditions 953 IF ( outflow_l ) THEN 954 u_m_l(:,:,:) = u(:,:,1:2) 955 v_m_l(:,:,:) = v(:,:,0:1) 956 w_m_l(:,:,:) = w(:,:,0:1) 957 ENDIF 958 IF ( outflow_r ) THEN 959 u_m_r(:,:,:) = u(:,:,nx-1:nx) 960 v_m_r(:,:,:) = v(:,:,nx-1:nx) 961 w_m_r(:,:,:) = w(:,:,nx-1:nx) 962 ENDIF 963 IF ( outflow_s ) THEN 964 u_m_s(:,:,:) = u(:,0:1,:) 965 v_m_s(:,:,:) = v(:,1:2,:) 966 w_m_s(:,:,:) = w(:,0:1,:) 967 ENDIF 968 IF ( outflow_n ) THEN 969 u_m_n(:,:,:) = u(:,ny-1:ny,:) 970 v_m_n(:,:,:) = v(:,ny-1:ny,:) 971 w_m_n(:,:,:) = w(:,ny-1:ny,:) 972 ENDIF 973 974 ! 757 975 !-- Calculate the initial volume flow at the right and north boundary 758 976 IF ( conserve_volume_flow ) THEN … … 800 1018 ENDIF 801 1019 802 !803 !-- For the moment, perturbation pressure and vertical velocity are zero804 p = 0.0; w = 0.0805 806 !807 !-- Initialize array sums (must be defined in first call of pres)808 sums = 0.0809 810 !811 !-- Treating cloud physics, liquid water content and precipitation amount812 !-- are zero at beginning of the simulation813 IF ( cloud_physics ) THEN814 ql = 0.0815 IF ( precipitation ) precipitation_amount = 0.0816 ENDIF817 818 !819 !-- Impose vortex with vertical axis on the initial velocity profile820 IF ( INDEX( initializing_actions, 'initialize_vortex' ) /= 0 ) THEN821 CALL init_rankine822 ENDIF823 824 !825 !-- Impose temperature anomaly (advection test only)826 IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 ) THEN827 CALL init_pt_anomaly828 ENDIF829 830 !831 !-- If required, change the surface temperature at the start of the 3D run832 IF ( pt_surface_initial_change /= 0.0 ) THEN833 pt(nzb,:,:) = pt(nzb,:,:) + pt_surface_initial_change834 ENDIF835 836 !837 !-- If required, change the surface humidity/scalar at the start of the 3D838 !-- run839 IF ( ( humidity .OR. passive_scalar ) .AND. &840 q_surface_initial_change /= 0.0 ) THEN841 q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change842 ENDIF843 844 !845 !-- Initialize the random number generator (from numerical recipes)846 CALL random_function_ini847 848 !849 !-- Impose random perturbation on the horizontal velocity field and then850 !-- remove the divergences from the velocity field851 IF ( create_disturbances ) THEN852 CALL disturb_field( nzb_u_inner, tend, u )853 CALL disturb_field( nzb_v_inner, tend, v )854 n_sor = nsor_ini855 CALL pres856 n_sor = nsor857 ENDIF858 859 !860 !-- Once again set the perturbation pressure explicitly to zero in order to861 !-- assure that it does not generate any divergences in the first time step.862 !-- At t=0 the velocity field is free of divergence (as constructed above).863 !-- Divergences being created during a time step are not yet known and thus864 !-- cannot be corrected during the time step yet.865 p = 0.0866 867 !868 !-- Initialize old and new time levels.869 IF ( timestep_scheme(1:5) /= 'runge' ) THEN870 e_m = e; pt_m = pt; u_m = u; v_m = v; w_m = w; kh_m = kh; km_m = km871 ELSE872 te_m = 0.0; tpt_m = 0.0; tu_m = 0.0; tv_m = 0.0; tw_m = 0.0873 ENDIF874 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w875 876 IF ( humidity .OR. passive_scalar ) THEN877 IF ( ASSOCIATED( q_m ) ) q_m = q878 IF ( timestep_scheme(1:5) == 'runge' ) tq_m = 0.0879 q_p = q880 IF ( humidity .AND. ASSOCIATED( vpt_m ) ) vpt_m = vpt881 ENDIF882 883 IF ( ocean ) THEN884 tsa_m = 0.0885 sa_p = sa886 ENDIF887 888 !889 !-- Initialize old timelevels needed for radiation boundary conditions890 IF ( outflow_l ) THEN891 u_m_l(:,:,:) = u(:,:,1:2)892 v_m_l(:,:,:) = v(:,:,0:1)893 w_m_l(:,:,:) = w(:,:,0:1)894 ENDIF895 IF ( outflow_r ) THEN896 u_m_r(:,:,:) = u(:,:,nx-1:nx)897 v_m_r(:,:,:) = v(:,:,nx-1:nx)898 w_m_r(:,:,:) = w(:,:,nx-1:nx)899 ENDIF900 IF ( outflow_s ) THEN901 u_m_s(:,:,:) = u(:,0:1,:)902 v_m_s(:,:,:) = v(:,1:2,:)903 w_m_s(:,:,:) = w(:,0:1,:)904 ENDIF905 IF ( outflow_n ) THEN906 u_m_n(:,:,:) = u(:,ny-1:ny,:)907 v_m_n(:,:,:) = v(:,ny-1:ny,:)908 w_m_n(:,:,:) = w(:,ny-1:ny,:)909 ENDIF910 911 ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data' .OR. &912 TRIM( initializing_actions ) == 'read_data_for_recycling' ) &913 THEN914 !915 !-- When reading data for initializing the recycling method, first read916 !-- some of the global variables from restart file917 IF ( TRIM( initializing_actions ) == 'read_data_for_recycling' ) THEN918 WRITE (9,*) 'before read_parts_of_var_list'919 CALL local_flush( 9 )920 CALL read_parts_of_var_list921 WRITE (9,*) 'after read_parts_of_var_list'922 CALL local_flush( 9 )923 CALL close_file( 13 )924 ENDIF925 926 !927 !-- Read binary data from restart file928 WRITE (9,*) 'before read_3d_binary'929 CALL local_flush( 9 )930 CALL read_3d_binary931 WRITE (9,*) 'after read_3d_binary'932 CALL local_flush( 9 )933 934 !935 !-- Calculate initial temperature field and other constants used in case936 !-- of a sloping surface937 IF ( sloping_surface ) CALL init_slope938 939 !940 !-- Initialize new time levels (only done in order to set boundary values941 !-- including ghost points)942 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w943 IF ( humidity .OR. passive_scalar ) q_p = q944 IF ( ocean ) sa_p = sa945 946 ELSE947 !948 !-- Actually this part of the programm should not be reached949 IF ( myid == 0 ) PRINT*,'+++ init_3d_model: unknown initializing ', &950 'problem'951 CALL local_stop952 1020 ENDIF 953 1021 -
palm/trunk/SOURCE/init_pegrid.f90
r145 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Collect on PE0 horizontal index bounds from all other PEs 6 ! Collect on PE0 horizontal index bounds from all other PEs, 7 ! broadcast the id of the inflow PE (using the respective communicator) 7 8 ! TEST OUTPUT (TO BE REMOVED) logging mpi2 ierr values 8 9 ! … … 57 58 IMPLICIT NONE 58 59 59 INTEGER :: gathered_size, i, i nd(5), j, k, maximum_grid_level_l,&60 m g_switch_to_pe0_level_l, mg_levels_x, mg_levels_y,&61 mg_levels_ z, nnx_y, nnx_z, nny_x, nny_z, nnz_x, nnz_y,&62 n umproc_sqr, nx_total, nxl_l, nxr_l, nyn_l, nys_l, nzb_l,&63 nz t_l, omp_get_num_threads, subdomain_size60 INTEGER :: gathered_size, i, id_inflow_l, ind(5), j, k, & 61 maximum_grid_level_l, mg_switch_to_pe0_level_l, mg_levels_x, & 62 mg_levels_y, mg_levels_z, nnx_y, nnx_z, nny_x, nny_z, nnz_x, & 63 nnz_y, numproc_sqr, nx_total, nxl_l, nxr_l, nyn_l, nys_l, & 64 nzb_l, nzt_l, omp_get_num_threads, subdomain_size 64 65 65 66 INTEGER, DIMENSION(:), ALLOCATABLE :: ind_all, nxlf, nxrf, nynf, nysf … … 918 919 ENDIF 919 920 921 ! 922 !-- Broadcast the id of the inflow PE 923 IF ( inflow_l ) THEN 924 id_inflow_l = myid 925 ELSE 926 id_inflow_l = 0 927 ENDIF 928 CALL MPI_ALLREDUCE( id_inflow_l, id_inflow, 1, MPI_INTEGER, MPI_SUM, & 929 comm1dx, ierr ) 930 920 931 #else 921 932 IF ( bc_lr == 'dirichlet/radiation' ) THEN -
palm/trunk/SOURCE/modules.f90
r150 r151 5 5 ! Actual revisions: 6 6 ! ----------------- 7 ! +hor_index_bounds, hor_index_bounds_previous_run, numprocs_previous_run, 8 ! nx_on_file, ny_on_file, offset_ocean_* 7 ! +hor_index_bounds, hor_index_bounds_previous_run, id_inflow, 8 ! inflow_damping_*, mean_inflow_profiles, numprocs_previous_run, nx_on_file, 9 ! ny_on_file, offset_ocean_*, recycling_plane, recycling_width, turbulent_inflow 9 10 ! -myid_char_14 10 11 ! … … 115 116 116 117 REAL, DIMENSION(:), ALLOCATABLE :: & 117 ddzu, dd2zu, dzu, ddzw, dzw, hyp, km_damp_x, km_damp_y, lad, l_grid,&118 pt_init, q_init, rdf, sa_init, ug, u_init, u_nzb_p1_for_vfc, vg,&119 v_init, v_nzb_p1_for_vfc, zu, zw118 ddzu, dd2zu, dzu, ddzw, dzw, hyp, inflow_damping_factor, km_damp_x, & 119 km_damp_y, lad, l_grid, pt_init, q_init, rdf, sa_init, ug, u_init, & 120 u_nzb_p1_for_vfc, vg, v_init, v_nzb_p1_for_vfc, zu, zw 120 121 121 122 REAL, DIMENSION(:,:), ALLOCATABLE :: & 122 c_u, c_v, c_w, dzu_mg, dzw_mg, f1_mg, f2_mg, f3_mg, pt_slope_ref,&123 qs, qswst_remote, ts, us, z0123 c_u, c_v, c_w, dzu_mg, dzw_mg, f1_mg, f2_mg, f3_mg, & 124 mean_inflow_profiles, pt_slope_ref, qs, qswst_remote, ts, us, z0 124 125 125 126 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET :: & … … 309 310 nsor_ini = 100, n_sor, normalizing_region = 0, & 310 311 nz_do1d, nz_do3d = -9999, outflow_damping_width = -1, & 311 prt_time_count = 0, r unnr = 0, skip_do_avs= 0, &312 terminate_coupled = 0, terminate_coupled_remote= 0, &313 t imestep_count = 0312 prt_time_count = 0, recycling_plane, runnr = 0, & 313 skip_do_avs = 0, terminate_coupled = 0, & 314 terminate_coupled_remote = 0, timestep_count = 0 314 315 315 316 INTEGER :: dist_nxl(0:1), dist_nxr(0:1), dist_nyn(0:1), dist_nys(0:1), & … … 357 358 random_heatflux = .FALSE., run_control_header = .FALSE., & 358 359 sloping_surface = .FALSE., stop_dt = .FALSE., & 359 terminate_run = .FALSE., use_prior_plot1d_parameters = .FALSE.,& 360 use_reference = .FALSE., use_surface_fluxes = .FALSE., & 361 use_top_fluxes = .FALSE., use_ug_for_galilei_tr = .TRUE., & 362 use_upstream_for_tke = .FALSE., wall_adjustment = .TRUE. 360 terminate_run = .FALSE., turbulent_inflow = .FALSE., & 361 use_prior_plot1d_parameters = .FALSE., use_reference = .FALSE.,& 362 use_surface_fluxes = .FALSE., use_top_fluxes = .FALSE., & 363 use_ug_for_galilei_tr = .TRUE., use_upstream_for_tke = .FALSE.,& 364 wall_adjustment = .TRUE. 363 365 364 366 LOGICAL :: data_output_xy(0:1) = .FALSE., data_output_xz(0:1) = .FALSE., & … … 392 394 dz_stretch_level = 100000.0, e_init = 0.0, e_min = 0.0, & 393 395 end_time = 0.0, & 394 f = 0.0, fs = 0.0, g = 9.81, kappa = 0.4, km_constant = -1.0, & 396 f = 0.0, fs = 0.0, g = 9.81, inflow_damping_height = 9999999.9, & 397 inflow_damping_width = 9999999.9, kappa = 0.4, km_constant = -1.0,& 395 398 km_damp_max = -1.0, lad_surface = 0.0, long_filter_factor = 0.0, & 396 399 maximum_cpu_time_allowed = 0.0, molecular_viscosity = 1.461E-5, & … … 405 408 q_surface = 0.0, q_surface_initial_change = 0.0, & 406 409 rayleigh_damping_factor = -1.0, rayleigh_damping_height = -1.0, & 407 residual_limit = 1.0E-4, restart_time = 9999999.9, rho_reference, & 408 rho_surface, rif_max = 1.0, & 410 recycling_width = 9999999.9, residual_limit = 1.0E-4, & 411 restart_time = 9999999.9, rho_reference, rho_surface, & 412 rif_max = 1.0, & 409 413 rif_min = -5.0, roughness_length = 0.1, sa_surface = 35.0, & 410 414 simulated_time = 0.0, simulated_time_at_begin, sin_alpha_surface, & … … 961 965 #endif 962 966 CHARACTER(LEN=5) :: myid_char = '' 963 INTEGER :: myid=0, npex = -1, npey = -1, numprocs = 1,&964 numprocs _previous_run = -1,&967 INTEGER :: id_inflow, myid=0, npex = -1, npey = -1, & 968 numprocs = 1, numprocs_previous_run = -1, & 965 969 tasks_per_node = -9999, threads_per_task = 1 966 970 -
palm/trunk/SOURCE/parin.f90
r147 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +inflow_damping_height, inflow_damping_width, recycling_width, 7 ! turbulent_inflow in inipar 6 8 ! Allocation of hom_sum moved from init_3d_model to here, 7 9 ! npex, npey moved from inipar to d3par, setting of myid_char_14 removed, … … 85 87 dz_stretch_level, e_init, e_min, end_time_1d, fft_method, & 86 88 galilei_transformation, grid_matching, humidity, & 89 inflow_damping_height, inflow_damping_width, & 87 90 inflow_disturbance_begin, inflow_disturbance_end, & 88 91 initializing_actions, km_constant, km_damp_max, lad_surface, & … … 97 100 pt_vertical_gradient_level, q_surface, q_surface_initial_change, & 98 101 q_vertical_gradient, q_vertical_gradient_level, radiation, & 99 random_generator, random_heatflux, r if_max, rif_min, &100 r oughness_length, sa_surface, sa_vertical_gradient, &102 random_generator, random_heatflux, recycling_width, rif_max, & 103 rif_min, roughness_length, sa_surface, sa_vertical_gradient, & 101 104 sa_vertical_gradient_level, scalar_advec, statistic_regions, & 102 105 surface_heatflux, surface_pressure, surface_scalarflux, & … … 104 107 s_vertical_gradient, s_vertical_gradient_level, top_heatflux, & 105 108 top_momentumflux_u, top_momentumflux_v, top_salinityflux, & 106 timestep_scheme, topography, ug_surface, &109 timestep_scheme, topography, turbulent_inflow, ug_surface, & 107 110 ug_vertical_gradient, ug_vertical_gradient_level, ups_limit_e, & 108 111 ups_limit_pt, ups_limit_u, ups_limit_v, ups_limit_w, & -
palm/trunk/SOURCE/pres.f90
r110 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Bugfix in volume flow control for non-cyclic boundary conditions 7 7 ! 8 8 ! Former revisions: … … 110 110 / volume_flow_area(1) 111 111 112 DO j = nys , nyn112 DO j = nys-1, nyn+1 113 113 DO k = nzb_v_inner(j,i) + 1, nzt 114 114 u(k,j,i) = u(k,j,i) + volume_flow_offset(1) 115 115 ENDDO 116 116 ENDDO 117 118 CALL exchange_horiz( u )119 117 120 118 ENDIF … … 150 148 / volume_flow_area(2) 151 149 152 DO i = nxl , nxr150 DO i = nxl-1, nxr+1 153 151 DO k = nzb_v_inner(j,i) + 1, nzt 154 152 v(k,j,i) = v(k,j,i) + volume_flow_offset(2) 155 153 ENDDO 156 154 ENDDO 157 158 CALL exchange_horiz( v )159 155 160 156 ENDIF -
palm/trunk/SOURCE/read_var_list.f90
r147 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +numprocs_previous_run, hor_index_bounds_previous_run, 6 ! +numprocs_previous_run, hor_index_bounds_previous_run, inflow_damping_factor, 7 ! inflow_damping_height, inflow_damping_width, mean_inflow_profiles, 8 ! recycling_width, turbulent_inflow, 7 9 ! -cross_ts_*, npex, npey, 8 10 ! hom_sum, volume_flow_area, volume_flow_initial moved from … … 279 281 CASE ( 'hom_sum' ) 280 282 READ ( 13 ) hom_sum 283 CASE ( 'humidity' ) 284 READ ( 13 ) humidity 285 CASE ( 'inflow_damping_factor' ) 286 IF ( .NOT. ALLOCATED( inflow_damping_factor ) ) THEN 287 ALLOCATE( inflow_damping_factor(0:nz+1) ) 288 ENDIF 289 READ ( 13 ) inflow_damping_factor 290 CASE ( 'inflow_damping_height' ) 291 READ ( 13 ) inflow_damping_height 292 CASE ( 'inflow_damping_width' ) 293 READ ( 13 ) inflow_damping_width 281 294 CASE ( 'inflow_disturbance_begin' ) 282 295 READ ( 13 ) inflow_disturbance_begin … … 303 316 CASE ( 'loop_optimization' ) 304 317 READ ( 13 ) loop_optimization 318 CASE ( 'mean_inflow_profiles' ) 319 IF ( .NOT. ALLOCATED( mean_inflow_profiles ) ) THEN 320 ALLOCATE( mean_inflow_profiles(0:nz+1,5) ) 321 ENDIF 322 READ ( 13 ) mean_inflow_profiles 305 323 CASE ( 'mixing_length_1d' ) 306 324 READ ( 13 ) mixing_length_1d 307 CASE ( 'humidity' )308 READ ( 13 ) humidity309 325 CASE ( 'momentum_advec' ) 310 326 READ ( 13 ) momentum_advec … … 381 397 CASE ( 'random_heatflux' ) 382 398 READ ( 13 ) random_heatflux 399 CASE ( 'recycling_width' ) 400 READ ( 13 ) recycling_width 383 401 CASE ( 'rif_max' ) 384 402 READ ( 13 ) rif_max … … 467 485 CASE ( 'tsc' ) 468 486 READ ( 13 ) tsc 487 CASE ( 'turbulent_inflow' ) 488 READ ( 13 ) turbulent_inflow 469 489 CASE ( 'u_init' ) 470 490 READ ( 13 ) u_init … … 552 572 ! Skipping the global control variables from restart-file (binary format) 553 573 ! except some informations needed when reading restart data from a previous 554 ! run which used a smaller total domain .574 ! run which used a smaller total domain or/and a different domain decomposition. 555 575 !------------------------------------------------------------------------------! 556 576 577 USE arrays_3d 557 578 USE control_parameters 558 579 USE indices … … 568 589 statistic_regions_on_file 569 590 591 REAL, DIMENSION(:,:,:), ALLOCATABLE :: hom_sum_on_file 570 592 REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: hom_on_file 571 593 … … 672 694 SELECT CASE ( TRIM( variable_chr ) ) 673 695 696 CASE ( 'average_count_pr' ) 697 READ ( 13 ) average_count_pr 698 IF ( average_count_pr /= 0 .AND. myid == 0 ) THEN 699 PRINT*, '+++ read_parts_of_var_list:' 700 PRINT*, ' WARNING: inflow profiles not temporally averaged.' 701 PRINT*, ' Averaging will be done now using ', & 702 average_count_pr, ' samples.' 703 ENDIF 704 674 705 CASE ( 'hom' ) 675 706 ALLOCATE( hom_on_file(0:nz+1,2,pr_palm+max_pr_user_on_file, & … … 678 709 hom = hom_on_file(:,:,1:pr_palm+max_pr_user,0:statistic_regions) 679 710 DEALLOCATE( hom_on_file ) 711 712 CASE ( 'hom_sum' ) 713 ALLOCATE( hom_sum_on_file(0:nz+1,pr_palm+max_pr_user_on_file, & 714 0:statistic_regions_on_file) ) 715 READ ( 13 ) hom_sum_on_file 716 hom_sum = hom_sum_on_file(:,1:pr_palm+max_pr_user, & 717 0:statistic_regions) 718 DEALLOCATE( hom_sum_on_file ) 680 719 681 720 CASE ( 'nx' ) … … 710 749 ENDDO 711 750 751 ! 752 !-- Calculate the temporal average of vertical profiles, if neccessary 753 IF ( average_count_pr /= 0 ) THEN 754 hom_sum = hom_sum / REAL( average_count_pr ) 755 ENDIF 756 712 757 713 758 END SUBROUTINE read_parts_of_var_list -
palm/trunk/SOURCE/time_integration.f90
r110 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! inflow turbulence is imposed by calling new routine inflow_turbulence 7 7 ! 8 8 ! Former revisions: … … 214 214 215 215 ! 216 !-- Impose a turbulent inflow using the recycling method 217 IF ( turbulent_inflow ) CALL inflow_turbulence 218 219 ! 216 220 !-- Impose a random perturbation on the horizontal velocity field 217 221 IF ( create_disturbances .AND. & -
palm/trunk/SOURCE/write_var_list.f90
r145 r151 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +numprocs, hor_index_bounds, -cross_ts_*, npex, npey 6 ! +numprocs, hor_index_bounds, inflow_damping_height, inflow_damping_width, 7 ! mean_inflow_profiles, recycling_width, turbulent_inflow, 8 ! -cross_ts_*, npex, npey 7 9 ! hom_sum, volume_flow_area, volume_flow_initial moved from write_3d_binary 8 10 ! to here … … 199 201 WRITE ( 14 ) 'hom_sum ' 200 202 WRITE ( 14 ) hom_sum 203 WRITE ( 14 ) 'humidity ' 204 WRITE ( 14 ) humidity 205 IF ( ALLOCATED( inflow_damping_factor ) ) THEN 206 WRITE ( 14 ) 'inflow_damping_factor ' 207 WRITE ( 14 ) inflow_damping_factor 208 ENDIF 209 WRITE ( 14 ) 'inflow_damping_height ' 210 WRITE ( 14 ) inflow_damping_height 211 WRITE ( 14 ) 'inflow_damping_width ' 212 WRITE ( 14 ) inflow_damping_width 201 213 WRITE ( 14 ) 'inflow_disturbance_begin ' 202 214 WRITE ( 14 ) inflow_disturbance_begin … … 223 235 WRITE ( 14 ) 'loop_optimization ' 224 236 WRITE ( 14 ) loop_optimization 237 IF ( ALLOCATED( mean_inflow_profiles ) ) THEN 238 WRITE ( 14 ) 'mean_inflow_profiles ' 239 WRITE ( 14 ) mean_inflow_profiles 240 ENDIF 225 241 WRITE ( 14 ) 'mixing_length_1d ' 226 242 WRITE ( 14 ) mixing_length_1d 227 WRITE ( 14 ) 'humidity '228 WRITE ( 14 ) humidity229 243 WRITE ( 14 ) 'momentum_advec ' 230 244 WRITE ( 14 ) momentum_advec … … 299 313 WRITE ( 14 ) 'random_heatflux ' 300 314 WRITE ( 14 ) random_heatflux 315 WRITE ( 14 ) 'recycling_width ' 316 WRITE ( 14 ) recycling_width 301 317 WRITE ( 14 ) 'rif_max ' 302 318 WRITE ( 14 ) rif_max … … 385 401 WRITE ( 14 ) 'tsc ' 386 402 WRITE ( 14 ) tsc 403 WRITE ( 14 ) 'turbulent_inflow ' 404 WRITE ( 14 ) turbulent_inflow 387 405 WRITE ( 14 ) 'u_init ' 388 406 WRITE ( 14 ) u_init
Note: See TracChangeset
for help on using the changeset viewer.