Changeset 3045 for palm/trunk/SOURCE/check_open.f90
- Timestamp:
- May 28, 2018 7:55:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_open.f90
r2964 r3045 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Output case 108 disabled 28 ! 29 ! 2964 2018-04-12 16:04:03Z Giersch 27 30 ! Error message moved to radiation_model_mod 28 31 ! … … 971 974 ENDIF 972 975 973 974 CASE ( 108 ) 975 976 IF ( myid_char == '' ) THEN 977 filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) 978 ELSE 979 filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) // '/' // & 980 myid_char 981 ENDIF 976 ! 977 !-- Currently disabled 978 ! CASE ( 108 ) 979 980 ! IF ( myid_char == '' ) THEN 981 ! filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) 982 ! ELSE 983 ! filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) // '/' // & 984 ! myid_char 985 ! ENDIF 982 986 ! 983 987 !-- Inquire, if there is a netCDF file from a previuos run. This should 984 988 !-- be opened for extension, if its variables match the actual run. 985 INQUIRE( FILE=filename, EXIST=netcdf_extend )986 987 IF ( netcdf_extend ) THEN989 ! INQUIRE( FILE=filename, EXIST=netcdf_extend ) 990 991 ! IF ( netcdf_extend ) THEN 988 992 ! 989 993 !-- Open an existing netCDF file for output 990 CALL netcdf_open_write_file( filename, id_set_prt, .FALSE., 41 )994 ! CALL netcdf_open_write_file( filename, id_set_prt, .FALSE., 41 ) 991 995 ! 992 996 !-- Read header information and set all ids. If there is a mismatch 993 997 !-- between the previuos and the actual run, netcdf_extend is returned 994 998 !-- as .FALSE. 995 CALL netcdf_define_header( 'pt', netcdf_extend, 0 )999 ! CALL netcdf_define_header( 'pt', netcdf_extend, 0 ) 996 1000 997 1001 ! 998 1002 !-- Remove the local file, if it can not be extended 999 IF ( .NOT. netcdf_extend ) THEN1000 nc_stat = NF90_CLOSE( id_set_prt )1001 CALL netcdf_handle_error( 'check_open', 42 )1002 CALL local_system( 'rm ' // TRIM( filename ) )1003 ENDIF1004 1005 ENDIF1006 1007 IF ( .NOT. netcdf_extend ) THEN1003 ! IF ( .NOT. netcdf_extend ) THEN 1004 ! nc_stat = NF90_CLOSE( id_set_prt ) 1005 ! CALL netcdf_handle_error( 'check_open', 42 ) 1006 ! CALL local_system( 'rm ' // TRIM( filename ) ) 1007 ! ENDIF 1008 1009 ! ENDIF 1010 1011 ! IF ( .NOT. netcdf_extend ) THEN 1008 1012 1009 1013 ! 1010 1014 !-- For runs on multiple processors create the subdirectory 1011 IF ( myid_char /= '' ) THEN1012 IF ( myid == 0 .AND. .NOT. openfile(file_id)%opened_before ) &1013 THEN ! needs modification in case of non-extendable sets1014 CALL local_system( 'mkdir DATA_PRT_NETCDF' // &1015 TRIM( coupling_char ) // '/' )1016 ENDIF1015 ! IF ( myid_char /= '' ) THEN 1016 ! IF ( myid == 0 .AND. .NOT. openfile(file_id)%opened_before ) & 1017 ! THEN ! needs modification in case of non-extendable sets 1018 ! CALL local_system( 'mkdir DATA_PRT_NETCDF' // & 1019 ! TRIM( coupling_char ) // '/' ) 1020 ! ENDIF 1017 1021 #if defined( __parallel ) 1018 1022 ! 1019 1023 !-- Set a barrier in order to allow that all other processors in the 1020 1024 !-- directory created by PE0 can open their file 1021 CALL MPI_BARRIER( comm2d, ierr )1025 ! CALL MPI_BARRIER( comm2d, ierr ) 1022 1026 #endif 1023 ENDIF1027 ! ENDIF 1024 1028 1025 1029 ! 1026 1030 !-- Create a new netCDF output file with requested netCDF format 1027 CALL netcdf_create_file( filename, id_set_prt, .FALSE., 43 )1031 ! CALL netcdf_create_file( filename, id_set_prt, .FALSE., 43 ) 1028 1032 1029 1033 ! 1030 1034 !-- Define the header 1031 CALL netcdf_define_header( 'pt', netcdf_extend, 0 )1032 1033 ENDIF1035 ! CALL netcdf_define_header( 'pt', netcdf_extend, 0 ) 1036 1037 ! ENDIF 1034 1038 1035 1039 CASE ( 109 )
Note: See TracChangeset
for help on using the changeset viewer.