Ignore:
Timestamp:
Jul 7, 2016 10:43:48 AM (8 years ago)
Author:
suehring
Message:

flight module added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/check_open.f90

    r1818 r1957  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! flight module added
    2222!
    2323! Former revisions:
     
    128128
    129129    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_file
     130        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
    134134
    135135    USE particle_attributes,                                                   &
     
    11081108          OPEN ( 117, FILE='PROGRESS'//TRIM( coupling_char ),                  &
    11091109                      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
    11101151
    11111152
Note: See TracChangeset for help on using the changeset viewer.