Changeset 3159 for palm/trunk/SOURCE/check_open.f90
- Timestamp:
- Jul 20, 2018 11:20:01 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_open.f90
r3045 r3159 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added multi agent system 28 ! 29 ! 3045 2018-05-28 07:55:41Z Giersch 27 30 ! Output case 108 disabled 28 31 ! … … 190 193 191 194 USE netcdf_interface, & 192 ONLY: id_set_fl, id_set_mask, id_set_pr, id_set_prt, id_set_pts, & 193 id_set_sp, id_set_ts, id_set_xy, id_set_xz, id_set_yz, & 194 id_set_3d, nc_stat, netcdf_create_file, netcdf_data_format, & 195 netcdf_define_header, netcdf_handle_error, netcdf_open_write_file 195 ONLY: id_set_agt, id_set_fl, id_set_mask, id_set_pr, id_set_prt, & 196 id_set_pts, id_set_sp, id_set_ts, id_set_xy, id_set_xz, & 197 id_set_yz, id_set_3d, nc_stat, netcdf_create_file, & 198 netcdf_data_format, netcdf_define_header, netcdf_handle_error, & 199 netcdf_open_write_file 196 200 197 201 USE particle_attributes, & … … 1077 1081 ENDIF 1078 1082 1083 CASE ( 118 ) 1084 1085 IF ( myid == 0 ) THEN 1086 filename = 'DATA_AGT_NETCDF' 1087 ! 1088 !-- Inquire, if there is a netCDF file from a previuos run. This should 1089 !-- be opened for extension, if its variables match the actual run. 1090 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 1091 1092 ! 1093 !-- Create a new netCDF output file with requested netCDF format 1094 CALL netcdf_create_file( filename, id_set_agt, .FALSE., 43 ) 1095 1096 ! 1097 !-- Define the header 1098 CALL netcdf_define_header( 'ag', netcdf_extend, 0 ) 1099 ENDIF 1100 1101 ! IF ( netcdf_extend ) THEN 1102 ! ! 1103 ! !-- Open an existing netCDF file for output 1104 ! CALL netcdf_open_write_file( filename, id_set_agt, .FALSE., 41 ) 1105 ! ! 1106 ! !-- Read header information and set all ids. If there is a mismatch 1107 ! !-- between the previuos and the actual run, netcdf_extend is returned 1108 ! !-- as .FALSE. 1109 ! CALL netcdf_define_header( 'ag', netcdf_extend, 0 ) 1110 ! 1111 ! ! 1112 ! !-- Remove the local file, if it can not be extended 1113 ! IF ( .NOT. netcdf_extend ) THEN 1114 ! nc_stat = NF90_CLOSE( id_set_agt ) 1115 ! CALL netcdf_handle_error( 'check_open', 42 ) 1116 ! CALL local_system( 'rm ' // TRIM( filename ) ) 1117 ! ENDIF 1118 ! 1119 ! ENDIF 1120 1121 IF ( .NOT. netcdf_extend ) THEN 1122 1123 ! 1124 ! !-- For runs on multiple processors create the subdirectory 1125 ! IF ( myid_char /= '' ) THEN 1126 ! IF ( myid == 0 .AND. .NOT. openfile(file_id)%opened_before ) & 1127 ! THEN ! needs modification in case of non-extendable sets 1128 ! CALL local_system( 'mkdir DATA_PRT_NETCDF' // & 1129 ! TRIM( coupling_char ) // '/' ) 1130 ! ENDIF 1131 ! #if defined( __parallel ) 1132 ! ! 1133 ! !-- Set a barrier in order to allow that all other processors in the 1134 ! !-- directory created by PE0 can open their file 1135 ! CALL MPI_BARRIER( comm2d, ierr ) 1136 ! #endif 1137 ! ENDIF 1138 1139 ENDIF 1140 1079 1141 ! 1080 1142 !-- nc-file for virtual flight measurements
Note: See TracChangeset
for help on using the changeset viewer.