Changeset 4564 for palm/trunk/SOURCE
- Timestamp:
- Jun 12, 2020 2:03:36 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4534 r4564 25 25 # ----------------- 26 26 # $Id$ 27 # Vertical nesting method of Huq et al. (2019) removed 28 # 29 # 4534 2020-05-14 18:35:22Z raasch 27 30 # shared_memory_io_mod included and respective dependencies added 28 31 # … … 327 330 user_spectra.f90 \ 328 331 vdi_internal_controls.f90 \ 329 vertical_nesting_mod.f90 \330 332 virtual_flight_mod.f90 \ 331 333 virtual_measurement_mod.f90 \ … … 453 455 netcdf_interface_mod.o \ 454 456 pmc_interface_mod.o \ 455 subsidence_mod.o \ 456 vertical_nesting_mod.o 457 subsidence_mod.o 457 458 chem_emissions_mod.o: \ 458 459 chem_gasphase_mod.o \ … … 715 716 init_coupling.o: \ 716 717 mod_kinds.o \ 717 modules.o \ 718 vertical_nesting_mod.o 718 modules.o 719 719 init_grid.o: \ 720 720 exchange_horiz_mod.o \ … … 722 722 modules.o \ 723 723 netcdf_data_input_mod.o \ 724 netcdf_interface_mod.o \ 725 vertical_nesting_mod.o 724 netcdf_interface_mod.o 726 725 init_masks.o: \ 727 726 bulk_cloud_model_mod.o \ … … 735 734 pmc_interface_mod.o \ 736 735 spectra_mod.o \ 737 synthetic_turbulence_generator_mod.o \ 738 vertical_nesting_mod.o 736 synthetic_turbulence_generator_mod.o 739 737 init_pt_anomaly.o: \ 740 738 exchange_horiz_mod.o \ … … 787 785 mod_kinds.o \ 788 786 modules.o \ 789 pmc_interface_mod.o \ 790 vertical_nesting_mod.o 787 pmc_interface_mod.o 791 788 local_tremain.o: \ 792 789 cpulog_mod.o \ … … 935 932 progress_bar_mod.o \ 936 933 read_restart_data_mod.o \ 937 turbulence_closure_mod.o \ 938 vertical_nesting_mod.o 934 turbulence_closure_mod.o 939 935 plant_canopy_model_mod.o: \ 940 936 bulk_cloud_model_mod.o \ … … 1092 1088 surface_mod.o \ 1093 1089 user_module.o \ 1094 vertical_nesting_mod.o \1095 1090 virtual_measurement_mod.o 1096 1091 restart_data_mpi_io_mod.o: \ … … 1228 1223 turbulence_closure_mod.o\ 1229 1224 urban_surface_mod.o \ 1230 vertical_nesting_mod.o \1231 1225 virtual_flight_mod.o \ 1232 1226 virtual_measurement_mod.o \ … … 1253 1247 mod_kinds.o \ 1254 1248 modules.o \ 1255 pmc_interface_mod.o \ 1256 vertical_nesting_mod.o 1249 pmc_interface_mod.o 1257 1250 timestep_scheme_steering.o: \ 1258 1251 mod_kinds.o \ … … 1357 1350 modules.o \ 1358 1351 pmc_interface_mod.o 1359 vertical_nesting_mod.o: \1360 exchange_horiz_mod.o \1361 mod_kinds.o \1362 modules.o \1363 surface_mod.o \1364 turbulence_closure_mod.o1365 1352 virtual_flight_mod.o: \ 1366 1353 basic_constants_and_equations_mod.o \ … … 1414 1401 surface_mod.o \ 1415 1402 user_module.o \ 1416 vertical_nesting_mod.o \1417 1403 virtual_measurement_mod.o -
palm/trunk/SOURCE/check_parameters.f90
r4562 r4564 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Vertical nesting method of Huq et al. (2019) removed 27 ! 28 ! 4562 2020-06-12 08:38:47Z raasch 26 29 ! bugfix: revised error message for exceeding allow number of time series 27 30 ! … … 191 194 192 195 USE transpose_indices 193 194 #if defined( __parallel )195 USE vertical_nesting_mod, &196 ONLY: vnested, &197 vnest_check_parameters198 #endif199 200 196 201 197 IMPLICIT NONE … … 247 243 coupling_mode /= 'precursor_atmos' .AND. & 248 244 coupling_mode /= 'precursor_ocean' .AND. & 249 coupling_mode /= 'vnested_crse' .AND. &250 coupling_mode /= 'vnested_fine' .AND. &251 245 coupling_mode /= 'atmosphere_to_ocean' .AND. & 252 246 coupling_mode /= 'ocean_to_atmosphere' ) THEN … … 302 296 !-- Check dt_coupling, restart_time, dt_restart, end_time, dx, dy, nx and ny 303 297 IF ( coupling_mode /= 'uncoupled' .AND. & 304 coupling_mode(1:8) /= 'vnested_' .AND. &305 298 coupling_mode /= 'precursor_atmos' .AND. & 306 299 coupling_mode /= 'precursor_ocean' ) THEN … … 478 471 IF ( coupling_mode == 'uncoupled' ) THEN 479 472 coupling_string = '' 480 ELSEIF ( coupling_mode == 'vnested_crse' ) THEN481 coupling_string = ' nested (coarse)'482 ELSEIF ( coupling_mode == 'vnested_fine' ) THEN483 coupling_string = ' nested (fine)'484 473 ELSEIF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 485 474 coupling_string = ' coupled (atmosphere)' … … 3058 3047 ENDIF 3059 3048 3060 #if defined( __parallel )3061 !3062 !-- Vertical nesting: check fine and coarse grid compatibility for data exchange3063 IF ( vnested ) CALL vnest_check_parameters3064 #endif3065 3066 3049 ! 3067 3050 !-- Check if topography is read from file in case of complex terrain simulations -
palm/trunk/SOURCE/init_coupling.f90
r4444 r4564 25 25 ! ------------------ 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4444 2020-03-05 15:59:50Z raasch 27 30 ! bugfix: cpp-directives for serial mode added 28 31 ! … … 50 53 51 54 USE pegrid 52 53 USE vertical_nesting_mod54 55 55 56 IMPLICIT NONE … … 84 85 IF ( TRIM( coupling_mode ) == 'coupled_run' ) THEN 85 86 i = 1 86 ELSEIF ( TRIM( coupling_mode ) == 'vnested_twi' ) THEN87 i = 988 87 ELSE 89 88 i = 0 … … 111 110 CLOSE ( 90 ) 112 111 ENDIF 113 ELSEIF ( i == 9 ) THEN114 115 !116 !-- Set a flag to identify runs with vertical nesting117 vnested = .TRUE.118 119 comm_inter = MPI_COMM_WORLD120 121 !122 !-- Split the total available PE's into two groups123 !-- numprocs for coarse and fine grid are read from stdin (see above, and124 !-- execution command in the palmrun script, numprocs are provided via125 !-- palmrun option -Y)126 IF ( myid < bc_data(1) ) THEN127 inter_color = 0128 numprocs = bc_data(1)129 coupling_mode = 'vnested_crse'130 ELSE131 inter_color = 1132 numprocs = bc_data(2)133 coupling_mode = 'vnested_fine'134 ENDIF135 136 CALL MPI_COMM_SPLIT( MPI_COMM_WORLD, inter_color, 0, comm_palm, ierr )137 comm2d = comm_palm138 139 OPEN( 90, FILE='VNESTING_PORT_OPENED', FORM='FORMATTED' )140 WRITE ( 90, '(''TRUE'')' )141 CLOSE ( 90 )142 143 112 ELSE 144 113 comm_inter = MPI_COMM_WORLD … … 174 143 ENDIF 175 144 176 IF ( TRIM( coupling_mode ) == 'vnested_fine' ) THEN177 !178 !-- Set file extension for vertical nesting179 coupling_char = '_NV'180 ENDIF181 182 145 END SUBROUTINE init_coupling -
palm/trunk/SOURCE/init_grid.f90
r4543 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4543 2020-05-20 14:12:22Z gronemeier 27 30 ! Remove non-required check for canyon height 28 31 ! … … 184 187 185 188 USE pegrid 186 187 #if defined( __parallel )188 USE vertical_nesting_mod, &189 ONLY: vnested, vnest_init_grid190 #endif191 189 192 190 IMPLICIT NONE … … 766 764 ENDDO 767 765 ENDIF 768 769 #if defined( __parallel )770 !771 !-- Vertical nesting: communicate vertical grid level arrays between fine and772 !-- coarse grid773 IF ( vnested ) CALL vnest_init_grid774 #endif775 766 776 767 END SUBROUTINE init_grid -
palm/trunk/SOURCE/init_pegrid.f90
r4461 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4461 2020-03-12 16:51:59Z raasch 27 30 ! communicator configurations for four virtual pe grids defined 28 31 ! … … 139 142 USE transpose_indices, & 140 143 ONLY: nxl_yd, nxr_yd, nzb_yd, nzt_yd 141 142 USE vertical_nesting_mod, &143 ONLY: vnested, vnest_init_pegrid_domain, vnest_init_pegrid_rank144 144 #endif 145 145 … … 357 357 358 358 ! 359 !-- Vertical nesting: store four lists that identify partner ranks to exchange360 !-- data361 IF ( vnested ) CALL vnest_init_pegrid_rank362 363 !364 359 !-- Determine sub-topologies for transpositions 365 360 !-- Transposition from z to x: … … 666 661 CALL MPI_TYPE_COMMIT( type_xy, ierr ) 667 662 668 IF ( TRIM( coupling_mode ) /= 'uncoupled' .AND. .NOT. vnested) THEN663 IF ( TRIM( coupling_mode ) /= 'uncoupled' ) THEN 669 664 670 665 ! … … 766 761 767 762 ENDIF 768 769 !770 !-- Store partner grid point co-ordinates as lists.771 !-- Create custom MPI vector datatypes for contiguous data transfer772 IF ( vnested ) CALL vnest_init_pegrid_domain773 763 774 764 #else -
palm/trunk/SOURCE/local_stop.f90
r4444 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4444 2020-03-05 15:59:50Z raasch 27 30 ! bugfix: misplaced cpp-directive moved 28 31 ! … … 57 60 58 61 IF ( coupling_mode == 'uncoupled' ) THEN 62 59 63 IF ( nested_run ) THEN 60 64 ! … … 72 76 ENDIF 73 77 ENDIF 74 ELSEIF ( coupling_mode(1:8) == 'vnested_' ) THEN75 78 76 PRINT*, '+++ local_stop:'77 PRINT*, ' model "', TRIM( coupling_mode ), '" terminated'78 !79 !-- Abort both coarse and fine grid80 CALL MPI_ABORT( MPI_COMM_WORLD, 9999, ierr )81 79 ELSE 82 80 -
palm/trunk/SOURCE/nesting_offl_mod.f90
r4561 r4564 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! Adapt mass-flux correction also for the anelastic approximation22 ! 23 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Adapt mass-flux correction also for the anelastic approximation 28 ! 29 ! 4561 2020-06-12 07:05:56Z suehring 27 30 ! use statement for exchange horiz added 28 31 ! -
palm/trunk/SOURCE/parin.f90
r4536 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4536 2020-05-17 17:24:13Z raasch 27 30 ! bugfix for restart data format query 28 31 ! … … 146 149 USE turbulence_closure_mod, & 147 150 ONLY: rans_const_c, rans_const_sigma 148 149 USE vertical_nesting_mod, &150 ONLY: vnest_start_time151 151 152 152 … … 325 325 skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz, & 326 326 skip_time_do3d, skip_time_domask, synchronous_exchange, & 327 termination_time_needed , vnest_start_time327 termination_time_needed 328 328 329 329 NAMELIST /runtime_parameters/ averaging_interval, averaging_interval_pr, & … … 351 351 skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz, & 352 352 skip_time_do3d, skip_time_domask, synchronous_exchange, & 353 termination_time_needed , vnest_start_time353 termination_time_needed 354 354 355 355 NAMELIST /envpar/ progress_bar_disabled, host, & -
palm/trunk/SOURCE/read_restart_data_mod.f90
r4539 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4539 2020-05-18 14:05:17Z raasch 27 30 ! location message added 28 31 ! … … 195 198 USE user, & 196 199 ONLY: user_module_enabled 197 198 USE vertical_nesting_mod, &199 ONLY: vnest_init200 200 201 201 USE virtual_measurement_mod, & … … 789 789 CASE ( 'virtual_flight' ) 790 790 READ ( 13 ) virtual_flight 791 CASE ( 'vnest_init' )792 READ ( 13 ) vnest_init793 791 CASE ( 'volume_flow_area' ) 794 792 READ ( 13 ) volume_flow_area … … 1129 1127 CALL rrd_mpi_io_global_array( 'vg_vertical_gradient_level_ind', vg_vertical_gradient_level_ind ) 1130 1128 CALL rrd_mpi_io( 'virtual_flight', virtual_flight ) 1131 CALL rrd_mpi_io( 'vnest_init', vnest_init )1132 1129 CALL rrd_mpi_io_global_array( 'volume_flow_area', volume_flow_area ) 1133 1130 CALL rrd_mpi_io_global_array( 'volume_flow_initial', volume_flow_initial ) -
palm/trunk/SOURCE/time_integration.f90
r4521 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4521 2020-05-06 11:39:49Z schwenkel 27 30 ! Rename variable 28 31 ! … … 398 401 usm_surface_energy_balance, usm_green_heat_model 399 402 400 USE vertical_nesting_mod, &401 ONLY: vnested, vnest_init402 403 #if defined( __parallel )404 USE vertical_nesting_mod, &405 ONLY: vnest_anterpolate, vnest_anterpolate_e, vnest_boundary_conds, &406 vnest_boundary_conds_khkm, vnest_deallocate, vnest_init_fine, vnest_start_time407 #endif408 409 403 USE virtual_measurement_mod, & 410 404 ONLY: dt_virtual_measurement, & … … 616 610 !-- Data exchange between coupled models in case that a call has been omitted 617 611 !-- at the end of the previous run of a job chain. 618 IF ( coupling_mode /= 'uncoupled' .AND. run_coupled .AND. .NOT. vnested) THEN612 IF ( coupling_mode /= 'uncoupled' .AND. run_coupled ) THEN 619 613 ! 620 614 !-- In case of model termination initiated by the local model the coupler … … 636 630 637 631 CALL cpu_log( log_point_s(10), 'timesteps', 'start' ) 638 639 #if defined( __parallel )640 !641 !-- Vertical nesting: initialize fine grid642 IF ( vnested ) THEN643 IF ( .NOT. vnest_init .AND. simulated_time >= vnest_start_time ) THEN644 CALL cpu_log( log_point_s(22), 'vnest_init', 'start' )645 CALL vnest_init_fine646 vnest_init = .TRUE.647 CALL cpu_log( log_point_s(22), 'vnest_init', 'stop' )648 ENDIF649 ENDIF650 #endif651 632 652 633 ! … … 868 849 869 850 #if defined( __parallel ) 870 !871 !-- Vertical nesting: Interpolate fine grid data to the coarse grid872 IF ( vnest_init ) THEN873 CALL cpu_log( log_point_s(37), 'vnest_anterpolate', 'start' )874 CALL vnest_anterpolate875 CALL cpu_log( log_point_s(37), 'vnest_anterpolate', 'stop' )876 ENDIF877 878 851 IF ( nested_run ) THEN 879 852 … … 1033 1006 !-- Reduce the velocity divergence via the equation for perturbation 1034 1007 !-- pressure. 1035 IF ( intermediate_timestep_count == 1 .OR. & 1036 call_psolver_at_all_substeps ) THEN 1037 1038 IF ( vnest_init ) THEN 1008 IF ( intermediate_timestep_count == 1 .OR. call_psolver_at_all_substeps ) THEN 1009 1039 1010 #if defined( __parallel ) 1040 1011 ! 1041 !-- Compute pressure in the CG, interpolate top boundary conditions 1042 !-- to the FG and then compute pressure in the FG 1043 IF ( coupling_mode == 'vnested_crse' ) CALL pres 1044 1045 CALL cpu_log( log_point_s(30), 'vnest_bc', 'start' ) 1046 CALL vnest_boundary_conds 1047 CALL cpu_log( log_point_s(30), 'vnest_bc', 'stop' ) 1048 1049 IF ( coupling_mode == 'vnested_fine' ) CALL pres 1050 1051 !-- Anterpolate TKE, satisfy Germano Identity 1052 CALL cpu_log( log_point_s(28), 'vnest_anter_e', 'start' ) 1053 CALL vnest_anterpolate_e 1054 CALL cpu_log( log_point_s(28), 'vnest_anter_e', 'stop' ) 1055 #else 1056 CONTINUE 1012 !-- Mass (volume) flux correction to ensure global mass conservation for child domains. 1013 IF ( child_domain ) THEN 1014 IF ( nesting_mode == 'vertical' ) THEN 1015 CALL pmci_ensure_nest_mass_conservation_vertical 1016 ELSE 1017 CALL pmci_ensure_nest_mass_conservation 1018 ENDIF 1019 ENDIF 1057 1020 #endif 1058 1059 ELSE 1060 #if defined( __parallel ) 1061 ! 1062 !-- Mass (volume) flux correction to ensure global mass conservation for child domains. 1063 IF ( child_domain ) THEN 1064 IF ( nesting_mode == 'vertical' ) THEN 1065 CALL pmci_ensure_nest_mass_conservation_vertical 1066 ELSE 1067 CALL pmci_ensure_nest_mass_conservation 1068 ENDIF 1069 ENDIF 1070 #endif 1071 CALL pres 1072 1073 ENDIF 1021 CALL pres 1074 1022 1075 1023 ENDIF … … 1187 1135 ENDIF 1188 1136 CALL cpu_log( log_point(17), 'diffusivities', 'stop' ) 1189 1190 #if defined( __parallel )1191 !1192 !-- Vertical nesting: set fine grid eddy viscosity top boundary condition1193 IF ( vnest_init ) CALL vnest_boundary_conds_khkm1194 #endif1195 1137 1196 1138 ENDIF … … 1402 1344 ! 1403 1345 !-- Data exchange between coupled models 1404 IF ( coupling_mode /= 'uncoupled' .AND. run_coupled .AND. .NOT. vnested) THEN1346 IF ( coupling_mode /= 'uncoupled' .AND. run_coupled ) THEN 1405 1347 time_coupling = time_coupling + dt_3d 1406 1348 … … 1741 1683 !$ACC END DATA 1742 1684 1743 #if defined( __parallel )1744 !1745 !-- Vertical nesting: Deallocate variables initialized for vertical nesting1746 IF ( vnest_init ) CALL vnest_deallocate1747 #endif1748 1749 1685 IF ( myid == 0 ) CALL finish_progress_bar 1750 1686 -
palm/trunk/SOURCE/timestep.f90
r4540 r4564 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Vertical nesting method of Huq et al. (2019) removed 28 ! 29 ! 4540 2020-05-18 15:23:29Z raasch 27 30 ! File re-formatted to follow the PALM coding standard 28 31 ! … … 135 138 w_max, & 136 139 w_max_ijk 137 138 #if defined( __parallel )139 USE vertical_nesting_mod, &140 ONLY: vnested, &141 vnest_timestep_sync142 #endif143 140 144 141 IMPLICIT NONE … … 413 410 ENDIF 414 411 415 #if defined( __parallel )416 !417 !-- Vertical nesting: coarse and fine grid timestep has to be identical418 IF ( vnested ) CALL vnest_timestep_sync419 #endif420 421 412 CALL cpu_log( log_point(12), 'calculate_timestep', 'stop' ) 422 413 -
palm/trunk/SOURCE/write_restart_data_mod.f90
r4536 r4564 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Vertical nesting method of Huq et al. (2019) removed 27 ! 28 ! 4536 2020-05-17 17:24:13Z raasch 26 29 ! binary version incremented 27 30 ! … … 143 146 ONLY: user_module_enabled 144 147 145 USE vertical_nesting_mod, &146 ONLY: vnest_init147 148 148 USE virtual_measurement_mod, & 149 149 ONLY: time_virtual_measurement … … 839 839 CALL wrd_write_string( 'virtual_flight' ) 840 840 WRITE ( 14 ) virtual_flight 841 842 CALL wrd_write_string( 'vnest_init' )843 WRITE ( 14 ) vnest_init844 841 845 842 CALL wrd_write_string( 'volume_flow_area' ) … … 1122 1119 CALL wrd_mpi_io_global_array( 'vg_vertical_gradient_level_ind', vg_vertical_gradient_level_ind ) 1123 1120 CALL wrd_mpi_io( 'virtual_flight', virtual_flight ) 1124 CALL wrd_mpi_io( 'vnest_init', vnest_init )1125 1121 CALL wrd_mpi_io_global_array( 'volume_flow_area', volume_flow_area ) 1126 1122 CALL wrd_mpi_io_global_array( 'volume_flow_initial', volume_flow_initial )
Note: See TracChangeset
for help on using the changeset viewer.