Changeset 1957
- Timestamp:
- Jul 7, 2016 10:43:48 AM (8 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r1947 r1957 20 20 # Current revisions: 21 21 # ------------------ 22 # 22 # flight module added 23 23 # 24 24 # Former revisions: … … 294 294 cuda_fft_interfaces_mod.f90 data_log.f90 data_output_dvrp.f90 \ 295 295 data_output_mask.f90 data_output_profiles.f90 \ 296 data_output_ptseries.f90 data_output_spectra.f90 \296 data_output_ptseries.f90 data_output_spectra.f90 data_output_flight.f90\ 297 297 data_output_tseries.f90 data_output_2d.f90 data_output_3d.f90 \ 298 298 diffusion_e.f90 diffusion_s.f90 diffusion_u.f90 diffusion_v.f90 \ … … 336 336 user_data_output_mask.f90 user_define_netcdf_grid.f90 \ 337 337 user_dvrp_coltab.f90 user_header.f90 user_init.f90 \ 338 user_init_3d_model.f90 user_init_ grid.f90 user_init_land_surface.f90 \339 user_init_plant_canopy.f90 user_init_radiation.f90 \338 user_init_3d_model.f90 user_init_flight.f90 user_init_grid.f90 user_init_land_surface.f90 \ 339 user_init_plant_canopy.f90 user_init_radiation.f90 user_flight.f90\ 340 340 user_last_actions.f90 user_lpm_advec.f90 \ 341 341 user_lpm_init.f90 user_lpm_set_attributes.f90 user_module.f90 \ 342 342 user_parin.f90 user_read_restart_data.f90 \ 343 user_spectra.f90 user_statistics.f90 wall_fluxes.f90 \343 user_spectra.f90 user_statistics.f90 virtual_flight_mod.f90 wall_fluxes.f90 \ 344 344 wind_turbine_model_mod.f90 write_3d_binary.f90 write_var_list.f90 345 345 … … 422 422 spectra_mod.o 423 423 data_output_tseries.o: modules.o cpulog_mod.o mod_kinds.o netcdf_interface_mod.o 424 data_output_flight.o: modules.o cpulog_mod.o mod_kinds.o netcdf_interface_mod.o virtual_flight_mod.o 424 425 data_output_2d.o: modules.o cpulog_mod.o mod_kinds.o mod_particle_attributes.o \ 425 426 netcdf_interface_mod.o land_surface_model_mod.o radiation_model_mod.o … … 445 446 header.o: modules.o cpulog_mod.o mod_kinds.o netcdf_interface_mod.o land_surface_model_mod.o\ 446 447 microphysics_mod.o plant_canopy_model_mod.o pmc_handle_communicator_mod.o pmc_interface_mod.o \ 447 radiation_model_mod.o spectra_mod.o subsidence_mod.o 448 radiation_model_mod.o spectra_mod.o subsidence_mod.o virtual_flight_mod.o 448 449 inflow_turbulence.o: modules.o cpulog_mod.o mod_kinds.o 449 450 init_1d_model.o: modules.o mod_kinds.o … … 452 453 radiation_model_mod.o random_function_mod.o random_generator_parallel_mod.o \ 453 454 surface_layer_fluxes_mod.o microphysics_mod.o mod_particle_attributes.o \ 454 wind_turbine_model_mod.o455 virtual_flight_mod.o wind_turbine_model_mod.o 455 456 init_advec.o: modules.o mod_kinds.o 456 457 init_cloud_physics.o: modules.o mod_kinds.o … … 509 510 parin.o: modules.o cpulog_mod.o land_surface_model_mod.o mod_kinds.o netcdf_interface_mod.o \ 510 511 plant_canopy_model_mod.o pmc_interface_mod.o progress_bar_mod.o spectra_mod.o \ 511 radiation_model_mod.o microphysics_mod.o wind_turbine_model_mod.o512 radiation_model_mod.o microphysics_mod.o virtual_flight_mod.o wind_turbine_model_mod.o 512 513 plant_canopy_model_mod.o: modules.o mod_kinds.o 513 514 pmc_interface_mod.o: modules.o mod_kinds.o pmc_child_mod.o pmc_general_mod.o \ … … 541 542 spectra_mod.o 542 543 read_var_list.o: modules.o mod_kinds.o netcdf_interface_mod.o plant_canopy_model_mod.o \ 543 spectra_mod.o microphysics_mod.o 544 spectra_mod.o microphysics_mod.o virtual_flight_mod.o 544 545 run_control.o: modules.o cpulog_mod.o mod_kinds.o 545 546 set_slicer_attributes_dvrp.o: modules.o mod_kinds.o … … 556 557 temperton_fft_mod.o: modules.o mod_kinds.o 557 558 time_integration.o: modules.o advec_ws.o buoyancy.o calc_mean_profile.o \ 558 cpulog_mod.o interaction_droplets_ptq.o land_surface_model_mod.o \559 cpulog_mod.o data_output_flight.o interaction_droplets_ptq.o land_surface_model_mod.o \ 559 560 ls_forcing_mod.o mod_kinds.o nudging_mod.o pmc_interface_mod.o production_e.o \ 560 561 prognostic_equations.o progress_bar_mod.o radiation_model_mod.o \ 561 562 spectra_mod.o user_actions.o surface_layer_fluxes_mod.o microphysics_mod.o \ 562 wind_turbine_model_mod.o563 virtual_flight_mod.o wind_turbine_model_mod.o 563 564 time_to_string.o: mod_kinds.o 564 565 timestep.o: modules.o cpulog_mod.o mod_kinds.o microphysics_mod.o … … 579 580 user_define_netcdf_grid.o: modules.o mod_kinds.o user_module.o 580 581 user_dvrp_coltab.o: modules.o mod_kinds.o user_module.o 582 user_flight.o: modules.o mod_kinds.o user_module.o 581 583 user_header.o: modules.o mod_kinds.o user_module.o 582 584 user_init.o: modules.o mod_kinds.o netcdf_interface_mod.o user_module.o 583 585 user_init_3d_model.o: modules.o mod_kinds.o user_module.o 586 user_init_flight.o: modules.o mod_kinds.o netcdf_interface_mod.o user_module.o 584 587 user_init_grid.o: modules.o mod_kinds.o user_module.o 585 588 user_init_land_surface.o: modules.o mod_kinds.o user_module.o land_surface_model_mod.o … … 595 598 user_spectra.o: modules.o mod_kinds.o spectra_mod.o user_module.o 596 599 user_statistics.o: modules.o mod_kinds.o netcdf_interface_mod.o user_module.o 600 virtual_flight_mod.o: modules.o cpulog_mod.o mod_kinds.o netcdf_interface_mod.o user_init_flight.o user_flight.o 597 601 wall_fluxes.o: modules.o mod_kinds.o 598 602 wind_turbine_model_mod.o: modules.o cpulog_mod.o mod_kinds.o … … 601 605 spectra_mod.o 602 606 write_var_list.o: modules.o mod_kinds.o netcdf_interface_mod.o plant_canopy_model_mod.o\ 603 spectra_mod.o microphysics_mod.o 607 spectra_mod.o microphysics_mod.o virtual_flight_mod.o -
palm/trunk/SOURCE/check_open.f90
r1818 r1957 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 128 128 129 129 USE netcdf_interface, & 130 ONLY: id_set_ mask, id_set_pr, id_set_prt, id_set_pts, id_set_sp, &131 id_set_ ts, id_set_xy, id_set_xz, id_set_yz, id_set_3d, nc_stat,&132 netcdf_create_file, netcdf_data_format, netcdf_define_header,&133 netcdf_ handle_error, netcdf_open_write_file130 ONLY: id_set_fl, id_set_mask, id_set_pr, id_set_prt, id_set_pts, & 131 id_set_sp, id_set_ts, id_set_xy, id_set_xz, id_set_yz, & 132 id_set_3d, nc_stat, netcdf_create_file, netcdf_data_format, & 133 netcdf_define_header, netcdf_handle_error, netcdf_open_write_file 134 134 135 135 USE particle_attributes, & … … 1108 1108 OPEN ( 117, FILE='PROGRESS'//TRIM( coupling_char ), & 1109 1109 STATUS='REPLACE', FORM='FORMATTED' ) 1110 ! 1111 !-- nc-file for virtual flight measurements 1112 CASE ( 199 ) 1113 ! 1114 !-- Set filename 1115 filename = 'DATA_1D_FL_NETCDF' // TRIM( coupling_char ) 1116 1117 ! 1118 !-- Inquire, if there is a netCDF file from a previuos run. This should 1119 !-- be opened for extension, if its variables match the actual run. 1120 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 1121 1122 IF ( netcdf_extend ) THEN 1123 ! 1124 !-- Open an existing netCDF file for output 1125 CALL netcdf_open_write_file( filename, id_set_fl, .FALSE., 532 ) 1126 ! 1127 !-- Read header information and set all ids. If there is a mismatch 1128 !-- between the previuos and the actual run, netcdf_extend is returned 1129 !-- as .FALSE. 1130 CALL netcdf_define_header( 'fl', netcdf_extend, 0 ) 1131 1132 ! 1133 !-- Remove the local file, if it can not be extended 1134 IF ( .NOT. netcdf_extend ) THEN 1135 nc_stat = NF90_CLOSE( id_set_fl ) 1136 CALL netcdf_handle_error( 'check_open', 533 ) 1137 CALL local_system( 'rm ' // TRIM( filename ) ) 1138 ENDIF 1139 1140 ENDIF 1141 1142 IF ( .NOT. netcdf_extend ) THEN 1143 ! 1144 !-- Create a new netCDF output file with requested netCDF format 1145 CALL netcdf_create_file( filename, id_set_fl, .FALSE., 534 ) 1146 ! 1147 !-- Define the header 1148 CALL netcdf_define_header( 'fl', netcdf_extend, 0 ) 1149 1150 ENDIF 1110 1151 1111 1152 -
palm/trunk/SOURCE/header.f90
r1932 r1957 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 275 275 USE dvrp_variables, & 276 276 ONLY: use_seperate_pe_for_dvrp_output 277 278 USE flight_mod, & 279 ONLY: flight_header 277 280 278 281 USE grid_variables, & … … 1644 1647 ENDIF 1645 1648 #endif 1649 ! 1650 !-- Output of virtual flight information 1651 IF ( virtual_flight ) CALL flight_header( io ) 1646 1652 1647 1653 ! -
palm/trunk/SOURCE/init_3d_model.f90
r1921 r1957 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 292 292 USE control_parameters 293 293 294 USE flight_mod, & 295 ONLY: flight_init 296 294 297 USE grid_variables, & 295 298 ONLY: dx, dy … … 707 710 CALL wtm_init_arrays 708 711 ENDIF 712 713 ! 714 !-- Initialize virtual flight measurements 715 IF ( virtual_flight ) THEN 716 CALL flight_init 717 ENDIF 709 718 710 719 ! … … 1311 1320 #endif 1312 1321 ENDDO 1322 write(9,*) "EOF read binary" 1323 flush(9) 1313 1324 1314 1325 ! -
palm/trunk/SOURCE/modules.f90
r1919 r1957 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! +fl_max, num_leg, num_var_fl, num_var_fl_user, var_fl_max, virtual_flight 22 22 ! 23 23 ! Former revisions: … … 615 615 CHARACTER (LEN=20), DIMENSION(0:1,100) :: do2d = ' ', do3d = ' ' 616 616 617 INTEGER(iwp), PARAMETER :: fl_max = 100, var_fl_max = 20 618 617 619 INTEGER(iwp) :: abort_mode = 1, average_count_pr = 0, & 618 620 average_count_3d = 0, current_timestep_number = 0, & … … 637 639 nr_timesteps_this_run = 0, & 638 640 nsor = 20, nsor_ini = 100, n_sor, normalizing_region = 0, & 641 num_leg=0, num_var_fl, num_var_fl_user=0, & 639 642 nz_do3d = -9999, prt_time_count = 0, & 640 643 recycling_plane, runnr = 0, & … … 701 704 microphysics_seifert = .FALSE., & 702 705 mg_switch_to_pe0 = .FALSE., & 703 monotonic_adjustment = .FALSE. 706 monotonic_adjustment = .FALSE., virtual_flight = .FALSE. 704 707 LOGICAL :: nest_bound_l = .FALSE. !< nested boundary on left side 705 708 LOGICAL :: nest_bound_n = .FALSE. !< nested boundary on north side -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r1851 r1957 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 139 139 MODULE netcdf_interface 140 140 141 USE control_parameters, ONLY: max_masks 141 USE control_parameters, ONLY: max_masks, fl_max, var_fl_max 142 142 USE kinds 143 143 #if defined( __netcdf ) … … 238 238 CHARACTER(LEN=40) :: netcdf_data_format_string 239 239 240 INTEGER(iwp) :: id_dim_prtnum, id_dim_time_ pr, id_dim_time_prt, &240 INTEGER(iwp) :: id_dim_prtnum, id_dim_time_fl, id_dim_time_pr, id_dim_time_prt, & 241 241 id_dim_time_pts, id_dim_time_sp, id_dim_time_ts, id_dim_x_sp, & 242 id_dim_y_sp, id_dim_zu_sp, id_dim_zw_sp, id_set_ pr, &243 id_set_prt, id_set_pts, id_set_sp, id_set_ts, id_var_ prtnum, &244 id_var_ rnop_prt, id_var_time_pr, id_var_time_prt, &242 id_dim_y_sp, id_dim_zu_sp, id_dim_zw_sp, id_set_fl, id_set_pr, & 243 id_set_prt, id_set_pts, id_set_sp, id_set_ts, id_var_time_fl, & 244 id_var_prtnum, id_var_rnop_prt, id_var_time_pr, id_var_time_prt, & 245 245 id_var_time_pts, id_var_time_sp, id_var_time_ts, id_var_x_sp, & 246 246 id_var_y_sp, id_var_zu_sp, id_var_zw_sp, nc_stat 247 247 248 248 249 INTEGER(iwp), DIMENSION(0:1) :: id_dim_time_xy, id_dim_time_xz, & … … 271 272 !< compression 272 273 274 INTEGER(iwp) :: dofl_time_count 273 275 INTEGER(iwp), DIMENSION(10) :: id_var_dospx, id_var_dospy 274 276 INTEGER(iwp), DIMENSION(20) :: id_var_prt 275 277 INTEGER(iwp), DIMENSION(11) :: nc_precision 276 278 INTEGER(iwp), DIMENSION(dopr_norm_num) :: id_var_norm_dopr 279 280 INTEGER(iwp), DIMENSION(fl_max) :: id_dim_x_fl, id_dim_y_fl, id_dim_z_fl 281 INTEGER(iwp), DIMENSION(fl_max) :: id_var_x_fl, id_var_y_fl, id_var_z_fl 282 283 CHARACTER (LEN=20), DIMENSION(fl_max*var_fl_max) :: dofl_label 284 CHARACTER (LEN=20), DIMENSION(fl_max*var_fl_max) :: dofl_unit 285 CHARACTER (LEN=20), DIMENSION(fl_max) :: dofl_dim_label_x 286 CHARACTER (LEN=20), DIMENSION(fl_max) :: dofl_dim_label_y 287 CHARACTER (LEN=20), DIMENSION(fl_max) :: dofl_dim_label_z 288 289 INTEGER(iwp), DIMENSION(fl_max*var_fl_max) :: id_var_dofl 277 290 278 291 INTEGER(iwp), DIMENSION(dopts_num,0:10) :: id_var_dopts … … 300 313 301 314 302 PUBLIC domask_unit, dopr_unit, dopts_num, dots_label, dots_max, dots_num, & 303 dots_rad, dots_soil, dots_unit, do2d_unit, do3d_unit, id_set_mask, & 304 id_set_pr, id_set_prt, id_set_pts, id_set_sp, id_set_ts, & 305 id_set_xy, id_set_xz, id_set_yz, id_set_3d, id_var_domask, & 306 id_var_dopr, id_var_dopts, id_var_dospx, id_var_dospy, & 307 id_var_dots, id_var_do2d, id_var_do3d, id_var_norm_dopr, & 308 id_var_time_mask, id_var_time_pr, id_var_time_pts, id_var_time_sp, & 309 id_var_time_ts, id_var_time_xy, id_var_time_xz, id_var_time_yz, & 310 id_var_time_3d, nc_stat, netcdf_data_format, & 311 netcdf_data_format_string, netcdf_deflate, netcdf_precision, & 312 output_for_t0 313 315 PUBLIC dofl_dim_label_x, dofl_dim_label_y, dofl_dim_label_z, dofl_label, & 316 dofl_time_count, dofl_unit, domask_unit, dopr_unit, dopts_num, & 317 dots_label, dots_max, dots_num, dots_rad, dots_soil, dots_unit, & 318 do2d_unit, do3d_unit, id_set_fl, id_set_mask, id_set_pr, & 319 id_set_prt, id_set_pts, id_set_sp, id_set_ts, id_set_xy, id_set_xz,& 320 id_set_yz, id_set_3d, id_var_domask, id_var_dofl, id_var_dopr, & 321 id_var_dopts, id_var_dospx, id_var_dospy, id_var_dots, id_var_do2d,& 322 id_var_do3d, id_var_norm_dopr, id_var_time_fl, id_var_time_mask, & 323 id_var_time_pr, id_var_time_pts, id_var_time_sp, id_var_time_ts, & 324 id_var_time_xy, id_var_time_xz, id_var_time_yz, id_var_time_3d, & 325 id_var_x_fl, id_var_y_fl, id_var_z_fl, nc_stat, & 326 netcdf_data_format, netcdf_data_format_string, netcdf_deflate, & 327 netcdf_precision, output_for_t0 328 329 314 330 SAVE 315 331 … … 366 382 simulated_time_at_begin, skip_time_data_output_av, & 367 383 skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz, & 368 skip_time_do3d, topography 384 skip_time_do3d, topography, num_leg, num_var_fl 369 385 370 386 USE grid_variables, & … … 433 449 INTEGER(iwp) :: ntime_count !< number of time levels found in file 434 450 INTEGER(iwp) :: nz_old !< 451 INTEGER(iwp) :: l !< 435 452 436 453 INTEGER(iwp), SAVE :: oldmode !< … … 510 527 CASE ( 'masks' ) 511 528 nc_precision(11) = j 529 CASE ( 'fl' ) 530 nc_precision(9) = j 512 531 CASE ( 'all' ) 513 532 nc_precision = j … … 4887 4906 CALL message( 'netcdf_define_header', 'PA0269', 0, 0, 0, 6, 0 ) 4888 4907 4889 4908 ! 4909 !-- Flight data 4910 CASE ( 'fl_new' ) 4911 ! 4912 !-- Define some global attributes of the dataset 4913 nc_stat = NF90_PUT_ATT( id_set_fl, NF90_GLOBAL, 'title', & 4914 TRIM( run_description_header ) ) 4915 CALL netcdf_handle_error( 'netcdf_define_header', 249 ) 4916 4917 ! 4918 !-- Define time and location coordinates for flight space-time series 4919 !-- (unlimited dimension) 4920 !-- Error number must still be set appropriately. 4921 CALL netcdf_create_dim( id_set_fl, 'time', NF90_UNLIMITED, & 4922 id_dim_time_fl, 250 ) 4923 CALL netcdf_create_var( id_set_fl, (/ id_dim_time_fl /), 'time', & 4924 NF90_DOUBLE, id_var_time_fl, 'seconds', '', & 4925 251, 252, 000 ) 4926 4927 DO l = 1, num_leg 4928 CALL netcdf_create_dim( id_set_fl, dofl_dim_label_x(l), & 4929 NF90_UNLIMITED, id_dim_x_fl(l), 250 ) 4930 CALL netcdf_create_dim( id_set_fl, dofl_dim_label_y(l), & 4931 NF90_UNLIMITED, id_dim_y_fl(l), 250 ) 4932 CALL netcdf_create_dim( id_set_fl, dofl_dim_label_z(l), & 4933 NF90_UNLIMITED, id_dim_z_fl(l), 250 ) 4934 4935 CALL netcdf_create_var( id_set_fl, (/ id_dim_x_fl(l) /), & 4936 dofl_dim_label_x(l), NF90_DOUBLE, & 4937 id_var_x_fl(l), 'm', '', 251, 252, 000 ) 4938 CALL netcdf_create_var( id_set_fl, (/ id_dim_y_fl(l) /), & 4939 dofl_dim_label_y(l), NF90_DOUBLE, & 4940 id_var_y_fl(l), 'm', '', 251, 252, 000 ) 4941 CALL netcdf_create_var( id_set_fl, (/ id_dim_z_fl(l) /), & 4942 dofl_dim_label_z(l), NF90_DOUBLE, & 4943 id_var_z_fl(l), 'm', '', 251, 252, 000 ) 4944 ENDDO 4945 ! 4946 !-- Define the variables 4947 var_list = ';' 4948 k = 1 4949 DO l = 1, num_leg 4950 DO i = 1, num_var_fl 4951 4952 CALL netcdf_create_var( id_set_fl, (/ id_dim_time_fl /), & 4953 dofl_label(k), nc_precision(9), & 4954 id_var_dofl(k), & 4955 TRIM( dofl_unit(k) ), & 4956 TRIM( dofl_label(k) ), 253, 254, 255 ) 4957 4958 k = k + 1 4959 4960 ENDDO 4961 4962 ENDDO 4963 4964 ! 4965 !-- Write the list of variables as global attribute (this is used by 4966 !-- restart runs) 4967 nc_stat = NF90_PUT_ATT( id_set_fl, NF90_GLOBAL, 'VAR_LIST', var_list ) 4968 CALL netcdf_handle_error( 'netcdf_define_header', 258 ) 4969 4970 ! 4971 !-- Leave netCDF define mode 4972 nc_stat = NF90_ENDDEF( id_set_fl ) 4973 CALL netcdf_handle_error( 'netcdf_define_header', 259 ) 4974 4975 4976 CASE ( 'fl_ext' ) 4977 4978 ! 4979 !-- Get the list of variables and compare with the actual run. 4980 !-- First var_list_old has to be reset, since GET_ATT does not assign 4981 !-- trailing blanks. 4982 var_list_old = ' ' 4983 nc_stat = NF90_GET_ATT( id_set_fl, NF90_GLOBAL, 'VAR_LIST', & 4984 var_list_old ) 4985 CALL netcdf_handle_error( 'netcdf_define_header', 260 ) 4986 4987 var_list = ';' 4988 i = 1 4989 DO i = 1, num_leg * num_var_fl 4990 4991 var_list = TRIM( var_list ) // TRIM( dofl_label(i) ) // ';' 4992 4993 ENDDO 4994 4995 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 4996 message_string = 'netCDF file for flight time series ' // & 4997 'from previous run found,' // & 4998 '& but this file cannot be extended due to' // & 4999 ' variable mismatch.' // & 5000 '&New file is created instead.' 5001 CALL message( 'define_netcdf_header', 'PA0257', 0, 1, 0, 6, 0 ) 5002 extend = .FALSE. 5003 RETURN 5004 ENDIF 5005 5006 ! 5007 !-- Get the id of the time coordinate (unlimited coordinate) and its 5008 !-- last index on the file. The next time level is dofl_time_count+1. 5009 !-- The current time must be larger than the last output time 5010 !-- on the file. 5011 nc_stat = NF90_INQ_VARID( id_set_fl, 'time', id_var_time_fl ) 5012 CALL netcdf_handle_error( 'netcdf_define_header', 261 ) 5013 5014 nc_stat = NF90_INQUIRE_VARIABLE( id_set_fl, id_var_time_fl, & 5015 dimids = id_dim_time_old ) 5016 CALL netcdf_handle_error( 'netcdf_define_header', 262 ) 5017 id_dim_time_fl = id_dim_time_old(1) 5018 5019 nc_stat = NF90_INQUIRE_DIMENSION( id_set_fl, id_dim_time_fl, & 5020 len = dofl_time_count ) 5021 CALL netcdf_handle_error( 'netcdf_define_header', 263 ) 5022 5023 nc_stat = NF90_GET_VAR( id_set_fl, id_var_time_fl, & 5024 last_time_coordinate, & 5025 start = (/ dofl_time_count /), & 5026 count = (/ 1 /) ) 5027 CALL netcdf_handle_error( 'netcdf_define_header', 264 ) 5028 5029 IF ( last_time_coordinate(1) >= simulated_time ) THEN 5030 message_string = 'netCDF file for flight-time series ' // & 5031 'from previous run found,' // & 5032 '&but this file cannot be extended becaus' // & 5033 'e the current output time' // & 5034 '&is less or equal than the last output t' // & 5035 'ime on this file.' // & 5036 '&New file is created instead.' 5037 CALL message( 'define_netcdf_header', 'PA0258', 0, 1, 0, 6, 0 ) 5038 dofl_time_count = 0 5039 extend = .FALSE. 5040 RETURN 5041 ENDIF 5042 5043 ! 5044 !-- Dataset seems to be extendable. 5045 !-- Now get the remaining dimension and variable ids 5046 DO l = 1, num_leg 5047 nc_stat = NF90_INQ_VARID( id_set_fl, dofl_dim_label_x(l), & 5048 id_var_x_fl(l) ) 5049 CALL netcdf_handle_error( 'netcdf_define_header', 265 ) 5050 nc_stat = NF90_INQ_VARID( id_set_fl, dofl_dim_label_y(l), & 5051 id_var_y_fl(l) ) 5052 CALL netcdf_handle_error( 'netcdf_define_header', 265 ) 5053 nc_stat = NF90_INQ_VARID( id_set_fl, dofl_dim_label_z(l), & 5054 id_var_z_fl(l) ) 5055 CALL netcdf_handle_error( 'netcdf_define_header', 265 ) 5056 5057 ENDDO 5058 5059 5060 DO i = 1, num_leg * num_var_fl 5061 5062 nc_stat = NF90_INQ_VARID( id_set_fl, dofl_label(i), & 5063 id_var_dofl(i) ) 5064 CALL netcdf_handle_error( 'netcdf_define_header', 265 ) 5065 5066 ENDDO 5067 5068 ! 5069 !-- Update the title attribute on file 5070 !-- In order to avoid 'data mode' errors if updated attributes are larger 5071 !-- than their original size, NF90_PUT_ATT is called in 'define mode' 5072 !-- enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 5073 !-- performance loss due to data copying; an alternative strategy would be 5074 !-- to ensure equal attribute size in a job chain. Maybe revise later. 5075 nc_stat = NF90_REDEF( id_set_fl ) 5076 CALL netcdf_handle_error( 'netcdf_define_header', 439 ) 5077 nc_stat = NF90_PUT_ATT( id_set_fl, NF90_GLOBAL, 'title', & 5078 TRIM( run_description_header ) ) 5079 CALL netcdf_handle_error( 'netcdf_define_header', 267 ) 5080 nc_stat = NF90_ENDDEF( id_set_fl ) 5081 CALL netcdf_handle_error( 'netcdf_define_header', 440 ) 5082 message_string = 'netCDF file for flight-time series ' // & 5083 'from previous run found.' // & 5084 '&This file will be extended.' 5085 CALL message( 'define_netcdf_header', 'PA0259', 0, 0, 0, 6, 0 ) 5086 5087 4890 5088 CASE DEFAULT 4891 5089 -
palm/trunk/SOURCE/parin.f90
r1956 r1957 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 30 30 ! initialized for nest domains. Prognostic variables are later initialized by 31 31 ! interpolation from the parent domain. 32 ! 32 ! 33 33 ! 1917 2016-05-27 14:28:12Z witha 34 34 ! Initial version of purely vertical nesting introduced. … … 228 228 USE dvrp_variables, & 229 229 ONLY: local_dvrserver_running 230 231 USE flight_mod, & 232 ONLY: flight_parin 230 233 231 234 USE grid_variables, & … … 481 484 ENDIF 482 485 486 483 487 ! 484 488 !-- Check validity of lateral boundary conditions. This has to be done … … 555 559 !-- required 556 560 CALL wtm_parin 561 ! 562 !-- Check if virtual flights should be carried out and read &flight_part 563 !-- if required 564 CALL flight_parin 557 565 558 566 ! -
palm/trunk/SOURCE/read_var_list.f90
r1852 r1957 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 176 176 USE control_parameters 177 177 178 USE flight_mod, & 179 ONLY: flight_read_restart_data 180 178 181 USE grid_variables, & 179 182 ONLY: dx, dy … … 507 510 CASE ( 'nudging' ) 508 511 READ ( 13 ) nudging 512 CASE ( 'num_leg' ) 513 READ ( 13 ) num_leg 509 514 CASE ( 'nx' ) 510 515 READ ( 13 ) nx … … 725 730 CASE ( 'vg_vertical_gradient_level_ind' ) 726 731 READ ( 13 ) vg_vertical_gradient_level_ind 732 CASE ( 'virtual_flight' ) 733 READ ( 13 ) virtual_flight 727 734 CASE ( 'volume_flow_area' ) 728 735 READ ( 13 ) volume_flow_area … … 759 766 760 767 ENDDO 768 769 IF ( virtual_flight ) CALL flight_read_restart_data 761 770 762 771 … … 988 997 SUBROUTINE skip_var_list 989 998 990 999 USE control_parameters, & 1000 ONLY: virtual_flight 1001 1002 USE flight_mod, & 1003 ONLY: flight_skip_var_list 1004 991 1005 IMPLICIT NONE 992 1006 … … 1007 1021 1008 1022 ENDDO 1009 1023 ! 1024 !-- In case of virtual flights, skip also variables related to 1025 !-- this module. 1026 IF ( virtual_flight ) CALL flight_skip_var_list 1027 1010 1028 1011 1029 END SUBROUTINE skip_var_list -
palm/trunk/SOURCE/time_integration.f90
r1933 r1957 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 260 260 time_run_control, time_since_reference_point, & 261 261 turbulent_inflow, use_initial_profile_as_reference, & 262 use_single_reference_value, u_gtrans, v_gtrans, ws_scheme_mom,&263 ws_scheme_ sca262 use_single_reference_value, u_gtrans, v_gtrans, virtual_flight, & 263 ws_scheme_mom, ws_scheme_sca 264 264 265 265 USE cpulog, & 266 266 ONLY: cpu_log, log_point, log_point_s 267 268 USE flight_mod, & 269 ONLY: flight_measurement 270 267 271 268 272 USE indices, & … … 912 916 time_since_reference_point = simulated_time - coupling_start_time 913 917 918 919 914 920 IF ( simulated_time >= skip_time_data_output_av ) THEN 915 921 time_do_av = time_do_av + dt_3d … … 1031 1037 MAX( dt_averaging_input_pr, dt_3d ) ) 1032 1038 ENDIF 1039 ENDIF 1040 1041 ! 1042 !-- Call flight module and output data 1043 IF ( virtual_flight ) THEN 1044 CALL flight_measurement 1045 CALL data_output_flight 1033 1046 ENDIF 1034 1047 -
palm/trunk/SOURCE/write_var_list.f90
r1852 r1957 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! flight module added 22 22 ! 23 23 ! Former revisions: … … 154 154 155 155 USE control_parameters 156 157 USE flight_mod, & 158 ONLY: flight_write_restart_data 156 159 157 160 USE grid_variables, & … … 418 421 WRITE ( 14 ) 'nudging ' 419 422 WRITE ( 14 ) nudging 423 WRITE ( 14 ) 'num_leg ' 424 WRITE ( 14 ) num_leg 420 425 WRITE ( 14 ) 'nx ' 421 426 WRITE ( 14 ) nx … … 632 637 WRITE ( 14 ) 'vg_vertical_gradient_level_ind' 633 638 WRITE ( 14 ) vg_vertical_gradient_level_ind 639 WRITE ( 14 ) 'virtual_flight ' 640 WRITE ( 14 ) virtual_flight 634 641 WRITE ( 14 ) 'volume_flow_area ' 635 642 WRITE ( 14 ) volume_flow_area … … 653 660 WRITE ( 14 ) zeta_min 654 661 WRITE ( 14 ) 'z0h_factor ' 655 WRITE ( 14 ) z0h_factor 656 662 WRITE ( 14 ) z0h_factor 657 663 ! 658 664 !-- Set the end-of-file mark 659 665 WRITE ( 14 ) '*** end *** ' 660 661 666 ! 667 !-- If required, write restart data for virtual measurements. 668 IF ( virtual_flight ) CALL flight_write_restart_data 669 670 662 671 END SUBROUTINE write_var_list
Note: See TracChangeset
for help on using the changeset viewer.