Changeset 247 for palm/trunk/SOURCE/check_open.f90
- Timestamp:
- Feb 27, 2009 2:01:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_open.f90
r198 r247 1 1 SUBROUTINE check_open( file_id ) 2 2 3 3 !------------------------------------------------------------------------------! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! Output of messages replaced by message handling routine 7 ! 7 8 ! 8 9 ! Former revisions: … … 99 100 CASE ( 13, 14, 21, 22, 23, 80:85 ) 100 101 IF ( file_id == 14 .AND. openfile(file_id)%opened_before ) THEN 101 IF ( myid == 0 ) PRINT*, '+++ check_open: re-open of unit ', & 102 ' 14 is not verified. Please check results!' 102 message_string = 're-open of unit ' // & 103 ' 14 is not verified. Please check results!' 104 CALL message( 'check_open', 'PA0165', 0, 1, 0, 6, 0 ) 103 105 ENDIF 104 106 105 107 CASE DEFAULT 106 IF ( myid == 0 ) THEN107 PRINT*, '+++ check_open: re-opening of file-id ', file_id, &108 ' is not allowed'109 ENDIF108 WRITE( message_string, * ) 're-opening of file-id ', file_id, & 109 ' is not allowed' 110 CALL message( 'check_open', 'PA0166', 0, 1, 0, 6, 0 ) 111 110 112 RETURN 111 113 … … 119 121 CASE ( 15, 16, 17, 18, 19, 40:49, 50:59, 81:84, 101:107, 109, 111:113, & 120 122 116 ) 121 123 122 124 IF ( myid /= 0 ) THEN 123 PRINT*,'+++ check_open: opening file-id ',file_id, & 124 ' not allowed for PE ',myid 125 #if defined( __parallel ) 126 CALL MPI_ABORT( comm2d, 9999, ierr ) 127 #else 128 CALL local_stop 129 #endif 125 WRITE( message_string, * ) 'opening file-id ',file_id, & 126 ' not allowed for PE ',myid 127 CALL message( 'check_open', 'PA0167', 2, 2, 0, 6, 0 ) 130 128 ENDIF 131 129 … … 134 132 IF ( .NOT. data_output_2d_on_each_pe ) THEN 135 133 IF ( myid /= 0 ) THEN 136 PRINT*,'+++ check_open: opening file-id ',file_id, & 137 ' not allowed for PE ',myid 138 #if defined( __parallel ) 139 CALL MPI_ABORT( comm2d, 9999, ierr ) 140 #else 141 CALL local_stop 142 #endif 143 ENDIF 134 WRITE( message_string, * ) 'opening file-id ',file_id, & 135 ' not allowed for PE ',myid 136 CALL message( 'check_open', 'PA0167', 2, 2, 0, 6, 0 ) 137 END IF 144 138 ENDIF 145 139 … … 148 142 ! 149 143 !-- File-ids that are used temporarily in other routines 150 PRINT*,'+++ check_open: opening file-id ',file_id, & 151 ' is not allowed since it is used otherwise' 152 144 WRITE( message_string, * ) 'opening file-id ',file_id, & 145 ' is not allowed since it is used otherwise' 146 CALL message( 'check_open', 'PA0168', 0, 1, 0, 6, 0 ) 147 153 148 END SELECT 154 149 … … 409 404 IF ( .NOT. avs_coor_file_found .OR. & 410 405 .NOT. avs_data_file_found ) THEN 411 PRINT*, '+++ check_open: no filename for AVS-data-file ',&412 'found in MRUN-config-file'413 PRINT*, ' filename in FLD-file set to ', &414 '"unknown"'406 message_string= 'no filename for AVS-data-file ' // & 407 'found in MRUN-config-file' // & 408 ' &filename in FLD-file set to "unknown"' 409 CALL message( 'check_open', 'PA0169', 0, 1, 0, 6, 0 ) 415 410 416 411 avs_coor_file = 'unknown' … … 429 424 batch_scp = '/home/nhbksira/pub/batch_scp' 430 425 ELSE 431 PRINT*,'+++ check_open: no path for batch_scp on host "',& 432 TRIM( host ), '"' 426 message_string= 'no path for batch_scp on host "' // & 427 TRIM( host ) // '"' 428 CALL message( 'check_open', 'PA0170', 0, 1, 0, 6, 0 ) 433 429 get_filenames = .FALSE. 434 430 ENDIF … … 727 723 id_set_xy(av) ) 728 724 #else 729 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 730 'offset allowed on this machine' 725 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 726 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 727 731 728 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xy(av) ) 732 729 #endif … … 787 784 id_set_xz(av) ) 788 785 #else 789 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 790 'offset allowed on this machine' 786 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 787 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 788 791 789 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xz(av) ) 792 790 #endif … … 847 845 id_set_yz(av) ) 848 846 #else 849 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 850 'offset allowed on this machine' 847 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 848 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 849 851 850 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_yz(av) ) 852 851 #endif … … 900 899 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 901 900 id_set_pr ) 902 #else 903 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 904 'offset allowed on this machine' 901 #else 902 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 903 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 904 905 905 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pr ) 906 906 #endif … … 954 954 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 955 955 id_set_ts ) 956 #else 957 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 958 'offset allowed on this machine' 956 #else 957 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 958 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 959 959 960 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_ts ) 960 961 #endif … … 1015 1016 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1016 1017 id_set_3d(av) ) 1017 #else 1018 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 1019 'offset allowed on this machine' 1018 #else 1019 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 1020 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 1021 1020 1022 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_3d(av) ) 1021 1023 #endif … … 1070 1072 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1071 1073 id_set_sp ) 1072 #else 1073 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 1074 'offset allowed on this machine' 1074 #else 1075 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 1076 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 1077 1075 1078 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_sp ) 1076 1079 #endif … … 1146 1149 id_set_prt ) 1147 1150 #else 1148 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 1149 'offset allowed on this machine' 1151 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 1152 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 1153 1150 1154 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_prt ) 1151 1155 #endif … … 1201 1205 id_set_pts ) 1202 1206 #else 1203 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 1204 'offset allowed on this machine' 1207 message_string = 'NetCDF: no 64-bit offset allowed on this machine' 1208 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 1209 1205 1210 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pts ) 1206 1211 #endif … … 1226 1231 CASE DEFAULT 1227 1232 1228 PRINT*,'+++ check_open: no OPEN-statement for file-id ',file_id 1229 #if defined( __parallel ) 1230 CALL MPI_ABORT( comm2d, 9999, ierr ) 1231 #else 1232 CALL local_stop 1233 #endif 1233 WRITE( message_string, * ) 'no OPEN-statement for file-id ',file_id 1234 CALL message( 'check_open', 'PA0172', 2, 2, 0, 6, 0 ) 1234 1235 1235 1236 END SELECT
Note: See TracChangeset
for help on using the changeset viewer.