Changeset 493 for palm/trunk/SOURCE/check_open.f90
- Timestamp:
- Mar 1, 2010 8:30:24 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_open.f90
r449 r493 4 4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! NetCDF4 support (parallel output) 7 7 ! 8 8 ! Former revisions: … … 125 125 SELECT CASE ( file_id ) 126 126 127 CASE ( 15, 16, 17, 18, 19, 40:49, 50:59, 81:84, 101:107, 109, 111:113, & 128 116, 121:160 ) 127 CASE ( 15, 16, 17, 18, 19, 40:49, 50:59, 81:84, 104:105, 107, 109 ) 129 128 130 IF ( .NOT. format_parallel_io) THEN 129 IF ( myid /= 0 ) THEN 130 WRITE( message_string, * ) 'opening file-id ',file_id, & 131 ' not allowed for PE ',myid 132 CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 ) 133 ENDIF 134 135 CASE ( 101:103, 106, 111:113, 116, 121:160 ) 136 137 IF ( netcdf_data_format < 3 ) THEN 131 138 132 139 IF ( myid /= 0 ) THEN … … 136 143 ENDIF 137 144 138 145 ENDIF 139 146 140 147 CASE ( 21, 22, 23 ) … … 705 712 IF ( netcdf_extend ) THEN 706 713 ! 707 !-- Open an existing NetCDF file for output 714 !-- Open an existing NetCDF file for output 715 #if defined( __netcdf4 ) 716 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av), & 717 COMM = comm2d, INFO = MPI_INFO_NULL ) 718 #else 708 719 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av) ) 720 #endif 709 721 710 722 CALL handle_netcdf_error( 'check_open', 20 ) … … 720 732 nc_stat = NF90_CLOSE( id_set_xy(av) ) 721 733 CALL handle_netcdf_error( 'check_open', 21 ) 722 CALL local_system( 'rm ' // TRIM( filename ) )734 IF ( myid == 0 ) CALL local_system( 'rm ' // TRIM( filename ) ) 723 735 ENDIF 724 736 … … 727 739 IF ( .NOT. netcdf_extend ) THEN 728 740 ! 729 !-- Create a new NetCDF output file 730 IF ( netcdf_64bit ) THEN 731 #if defined( __netcdf_64bit ) 741 !-- Create a new NetCDF output file with requested NetCDF format 742 IF ( netcdf_data_format == 1 ) THEN 743 ! 744 !-- Classic NetCDF format 745 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xy(av) ) 746 747 ELSEIF ( netcdf_data_format == 2 ) THEN 748 ! 749 !-- 64bit-offset format 732 750 nc_stat = NF90_CREATE( filename, & 733 751 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 734 752 id_set_xy(av) ) 735 #else 736 message_string = 'NetCDF: no 64-bit offset allowed ' // & 737 'on this machine' 738 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 739 740 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xy(av) ) 741 #endif 742 ELSE 743 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xy(av) ) 744 ENDIF 753 754 #if defined( __netcdf4 ) 755 ELSEIF ( netcdf_data_format == 3 ) THEN 756 ! 757 !-- NetCDF4/HDF5 format 758 nc_stat = NF90_CREATE( filename, & 759 OR( NF90_NOCLOBBER, NF90_NETCDF4 ), & 760 id_set_xy(av), COMM = comm2d, & 761 INFO = MPI_INFO_NULL ) 762 763 ELSEIF ( netcdf_data_format == 4 ) THEN 764 ! 765 !-- NetCDF4/HDF5 format with classic model flag 766 nc_stat = NF90_CREATE( filename, & 767 OR( NF90_NOCLOBBER, & 768 OR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ), & 769 id_set_xy(av), COMM = comm2d, & 770 INFO = MPI_INFO_NULL ) 771 #endif 772 ENDIF 773 745 774 CALL handle_netcdf_error( 'check_open', 22 ) 775 746 776 ! 747 777 !-- Define the header 748 778 CALL define_netcdf_header( 'xy', netcdf_extend, av ) 779 780 ! 781 !-- In case of parallel NetCDF output, create flag file which tells 782 !-- combine_plot_fields that nothing is to do. 783 IF ( myid == 0 .AND. netcdf_data_format > 2 ) THEN 784 OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_XY' ) 785 WRITE ( 99, '(A)' ) 'no combine_plot_fields.x neccessary' 786 CLOSE( 99 ) 787 ENDIF 749 788 750 789 ENDIF … … 769 808 ! 770 809 !-- Open an existing NetCDF file for output 810 #if defined( __netcdf4 ) 811 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av), & 812 COMM = comm2d, INFO = MPI_INFO_NULL ) 813 #else 771 814 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av) ) 815 #endif 772 816 CALL handle_netcdf_error( 'check_open', 23 ) 773 817 ! … … 782 826 nc_stat = NF90_CLOSE( id_set_xz(av) ) 783 827 CALL handle_netcdf_error( 'check_open', 24 ) 784 CALL local_system( 'rm ' // TRIM( filename ) )828 IF ( myid == 0 ) CALL local_system( 'rm ' // TRIM( filename ) ) 785 829 ENDIF 786 830 … … 789 833 IF ( .NOT. netcdf_extend ) THEN 790 834 ! 791 !-- Create a new NetCDF output file 792 IF ( netcdf_64bit ) THEN 793 #if defined( __netcdf_64bit ) 835 !-- Create a new NetCDF output file with requested NetCDF format 836 IF ( netcdf_data_format == 1 ) THEN 837 ! 838 !-- Classic NetCDF format 839 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xz(av) ) 840 841 ELSEIF ( netcdf_data_format == 2 ) THEN 842 ! 843 !-- 64bit-offset format 794 844 nc_stat = NF90_CREATE( filename, & 795 845 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 796 846 id_set_xz(av) ) 797 #else 798 message_string = 'NetCDF: no 64-bit offset allowed ' // & 799 'on this machine' 800 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 801 802 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xz(av) ) 803 #endif 804 ELSE 805 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_xz(av) ) 806 ENDIF 847 848 #if defined( __netcdf4 ) 849 ELSEIF ( netcdf_data_format == 3 ) THEN 850 ! 851 !-- NetCDF4/HDF5 format 852 nc_stat = NF90_CREATE( filename, & 853 OR( NF90_NOCLOBBER, NF90_NETCDF4 ), & 854 id_set_xz(av), COMM = comm2d, & 855 INFO = MPI_INFO_NULL ) 856 857 ELSEIF ( netcdf_data_format == 4 ) THEN 858 ! 859 !-- NetCDF4/HDF5 format with classic model flag 860 nc_stat = NF90_CREATE( filename, & 861 OR( NF90_NOCLOBBER, & 862 OR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ), & 863 id_set_xz(av), COMM = comm2d, & 864 INFO = MPI_INFO_NULL ) 865 #endif 866 ENDIF 867 807 868 CALL handle_netcdf_error( 'check_open', 25 ) 869 808 870 ! 809 871 !-- Define the header 810 872 CALL define_netcdf_header( 'xz', netcdf_extend, av ) 873 874 ! 875 !-- In case of parallel NetCDF output, create flag file which tells 876 !-- combine_plot_fields that nothing is to do. 877 IF ( myid == 0 .AND. netcdf_data_format > 2 ) THEN 878 OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_XZ' ) 879 WRITE ( 99, '(A)' ) 'no combine_plot_fields.x neccessary' 880 CLOSE( 99 ) 881 ENDIF 811 882 812 883 ENDIF … … 831 902 ! 832 903 !-- Open an existing NetCDF file for output 904 #if defined( __netcdf4 ) 905 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av), & 906 COMM = comm2d, INFO = MPI_INFO_NULL ) 907 #else 833 908 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av) ) 909 #endif 834 910 CALL handle_netcdf_error( 'check_open', 26 ) 835 911 ! … … 844 920 nc_stat = NF90_CLOSE( id_set_yz(av) ) 845 921 CALL handle_netcdf_error( 'check_open', 27 ) 846 CALL local_system( 'rm ' // TRIM( filename ) )922 IF ( myid == 0 ) CALL local_system( 'rm ' // TRIM( filename ) ) 847 923 ENDIF 848 924 … … 851 927 IF ( .NOT. netcdf_extend ) THEN 852 928 ! 853 !-- Create a new NetCDF output file 854 IF ( netcdf_64bit ) THEN 855 #if defined( __netcdf_64bit ) 856 nc_stat = NF90_CREATE( filename, & 857 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET), & 929 !-- Create a new NetCDF output file with requested NetCDF format 930 IF ( netcdf_data_format == 1 ) THEN 931 ! 932 !-- Classic NetCDF format 933 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_yz(av) ) 934 935 ELSEIF ( netcdf_data_format == 2 ) THEN 936 ! 937 !-- 64bit-offset format 938 nc_stat = NF90_CREATE( filename, & 939 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 858 940 id_set_yz(av) ) 859 #else 860 message_string = 'NetCDF: no 64-bit offset allowed ' // & 861 'on this machine' 862 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 863 864 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_yz(av) ) 865 #endif 866 ELSE 867 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_yz(av) ) 868 ENDIF 941 942 #if defined( __netcdf4 ) 943 ELSEIF ( netcdf_data_format == 3 ) THEN 944 ! 945 !-- NetCDF4/HDF5 format 946 nc_stat = NF90_CREATE( filename, & 947 OR( NF90_NOCLOBBER, NF90_NETCDF4 ), & 948 id_set_yz(av), COMM = comm2d, & 949 INFO = MPI_INFO_NULL ) 950 951 ELSEIF ( netcdf_data_format == 4 ) THEN 952 ! 953 !-- NetCDF4/HDF5 format with classic model flag 954 nc_stat = NF90_CREATE( filename, & 955 OR( NF90_NOCLOBBER, & 956 OR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ), & 957 id_set_yz(av), COMM = comm2d, & 958 INFO = MPI_INFO_NULL ) 959 #endif 960 ENDIF 961 869 962 CALL handle_netcdf_error( 'check_open', 28 ) 963 870 964 ! 871 965 !-- Define the header 872 966 CALL define_netcdf_header( 'yz', netcdf_extend, av ) 967 968 ! 969 !-- In case of parallel NetCDF output, create flag file which tells 970 !-- combine_plot_fields that nothing is to do. 971 IF ( myid == 0 .AND. netcdf_data_format > 2 ) THEN 972 OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_YZ' ) 973 WRITE ( 99, '(A)' ) 'no combine_plot_fields.x neccessary' 974 CLOSE( 99 ) 975 ENDIF 873 976 874 977 ENDIF … … 908 1011 ! 909 1012 !-- Create a new NetCDF output file 910 IF ( netcdf_64bit ) THEN 911 #if defined( __netcdf_64bit ) 1013 IF ( netcdf_data_format > 1 ) THEN 912 1014 nc_stat = NF90_CREATE( filename, & 913 1015 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 914 1016 id_set_pr ) 915 #else916 message_string = 'NetCDF: no 64-bit offset allowed ' // &917 'on this machine'918 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 )919 920 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pr )921 #endif922 1017 ELSE 923 1018 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pr ) … … 964 1059 ! 965 1060 !-- Create a new NetCDF output file 966 IF ( netcdf_64bit ) THEN 967 #if defined( __netcdf_64bit ) 1061 IF ( netcdf_data_format > 1 ) THEN 968 1062 nc_stat = NF90_CREATE( filename, & 969 1063 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 970 1064 id_set_ts ) 971 #else972 message_string = 'NetCDF: no 64-bit offset allowed ' // &973 'on this machine'974 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 )975 976 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_ts )977 #endif978 1065 ELSE 979 1066 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_ts ) … … 998 1085 ENDIF 999 1086 ! 1000 !-- Inquire, if there is a NetCDF file from a previ uos run. This should1087 !-- Inquire, if there is a NetCDF file from a previous run. This should 1001 1088 !-- be opened for extension, if its dimensions and variables match the 1002 1089 !-- actual run. … … 1005 1092 IF ( netcdf_extend ) THEN 1006 1093 ! 1007 !-- Open an existing NetCDF file for output 1094 !-- Open an existing NetCDF file for output 1095 #if defined( __netcdf4 ) 1096 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_3d(av), & 1097 COMM = comm2d, INFO = MPI_INFO_NULL ) 1098 #else 1008 1099 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_3d(av) ) 1100 #endif 1009 1101 CALL handle_netcdf_error( 'check_open', 35 ) 1010 1102 ! … … 1026 1118 IF ( .NOT. netcdf_extend ) THEN 1027 1119 ! 1028 !-- Create a new NetCDF output file 1029 IF ( netcdf_64bit_3d ) THEN 1030 #if defined( __netcdf_64bit ) 1120 !-- Create a new NetCDF output file with requested NetCDF format 1121 IF ( netcdf_data_format == 1 ) THEN 1122 ! 1123 !-- Classic NetCDF format 1124 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_3d(av) ) 1125 1126 ELSEIF ( netcdf_data_format == 2 ) THEN 1127 ! 1128 !-- 64bit-offset format 1031 1129 nc_stat = NF90_CREATE( filename, & 1032 1130 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1033 1131 id_set_3d(av) ) 1034 #else 1035 message_string = 'NetCDF: no 64-bit offset allowed ' // & 1036 'on this machine' 1037 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 ) 1038 1039 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_3d(av) ) 1040 #endif 1041 ELSE 1042 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_3d(av) ) 1043 ENDIF 1132 1133 #if defined( __netcdf4 ) 1134 ELSEIF ( netcdf_data_format == 3 ) THEN 1135 ! 1136 !-- NetCDF4/HDF5 format 1137 nc_stat = NF90_CREATE( filename, & 1138 OR( NF90_NOCLOBBER, NF90_NETCDF4 ), & 1139 id_set_3d(av), COMM = comm2d, & 1140 INFO = MPI_INFO_NULL ) 1141 1142 ELSEIF ( netcdf_data_format == 4 ) THEN 1143 ! 1144 !-- NetCDF4/HDF5 format with classic model flag 1145 nc_stat = NF90_CREATE( filename, & 1146 OR( NF90_NOCLOBBER, & 1147 OR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ), & 1148 id_set_3d(av), COMM = comm2d, & 1149 INFO = MPI_INFO_NULL ) 1150 #endif 1151 ENDIF 1152 1044 1153 CALL handle_netcdf_error( 'check_open', 37 ) 1154 1045 1155 ! 1046 1156 !-- Define the header 1047 1157 CALL define_netcdf_header( '3d', netcdf_extend, av ) 1158 1159 ! 1160 !-- In case of parallel NetCDF output, create flag file which tells 1161 !-- combine_plot_fields that nothing is to do. 1162 IF ( myid == 0 .AND. netcdf_data_format > 2 ) THEN 1163 OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_3D' ) 1164 WRITE ( 99, '(A)' ) 'no combine_plot_fields.x neccessary' 1165 CLOSE( 99 ) 1166 ENDIF 1048 1167 1049 1168 ENDIF … … 1085 1204 ! 1086 1205 !-- Create a new NetCDF output file 1087 IF ( netcdf_64bit ) THEN 1088 #if defined( __netcdf_64bit ) 1206 IF ( netcdf_data_format > 1 ) THEN 1089 1207 nc_stat = NF90_CREATE( filename, & 1090 1208 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1091 1209 id_set_sp ) 1092 #else1093 message_string = 'NetCDF: no 64-bit offset allowed ' // &1094 'on this machine'1095 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 )1096 1097 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_sp )1098 #endif1099 1210 ELSE 1100 1211 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_sp ) … … 1162 1273 ! 1163 1274 !-- Create a new NetCDF output file 1164 IF ( netcdf_64bit ) THEN 1165 #if defined( __netcdf_64bit ) 1275 IF ( netcdf_data_format > 1 ) THEN 1166 1276 nc_stat = NF90_CREATE( filename, & 1167 1277 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1168 1278 id_set_prt ) 1169 #else1170 message_string = 'NetCDF: no 64-bit offset allowed ' // &1171 'on this machine'1172 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 )1173 1174 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_prt )1175 #endif1176 1279 ELSE 1177 1280 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_prt ) … … 1219 1322 ! 1220 1323 !-- Create a new NetCDF output file 1221 IF ( netcdf_64bit ) THEN 1222 #if defined( __netcdf_64bit ) 1324 IF ( netcdf_data_format > 1 ) THEN 1223 1325 nc_stat = NF90_CREATE( filename, & 1224 1326 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1225 1327 id_set_pts ) 1226 #else1227 message_string = 'NetCDF: no 64-bit offset allowed ' // &1228 'on this machine'1229 CALL message( 'check_open', 'PA0171', 0, 1, 0, 6, 0 )1230 1231 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pts )1232 #endif1233 1328 ELSE 1234 1329 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pts ) … … 1266 1361 !-- Open an existing NetCDF file for output 1267 1362 #if defined( __netcdf4 ) 1268 nc_stat = NF90_OPEN _PAR( filename, NF90_WRITE, comm2d, &1269 MPI_INFO_NULL, id_set_mask(mid,av))1363 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_mask(mid,av), & 1364 COMM = comm2d, INFO = MPI_INFO_NULL ) 1270 1365 #else 1271 1366 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_mask(mid,av) ) … … 1290 1385 IF ( .NOT. netcdf_extend ) THEN 1291 1386 ! 1292 !-- Create a new NetCDF output file 1293 SELECT CASE ( nc_format_mask(mid,av) ) 1294 1295 CASE ( 1 ) 1296 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, & 1297 id_set_mask(mid,av) ) 1298 1299 CASE ( 2 ) 1300 #if defined( __netcdf_64bit ) 1301 nc_stat = NF90_CREATE( filename, OR( NF90_NOCLOBBER, & 1302 NF90_64BIT_OFFSET ), id_set_mask(mid,av) ) 1303 #else 1304 WRITE( message_string, * ) 'NetCDF: no 64-bit ', & 1305 'offset format allowed on this machine' 1306 CALL message( 'check_open', 'PA9998', 0, 1, 0, 6, 0 ) 1307 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, & 1308 id_set_mask(mid,av) ) 1309 #endif 1310 1311 CASE ( 3 ) 1387 !-- Create a new NetCDF output file with requested NetCDF format 1388 IF ( netcdf_data_format == 1 ) THEN 1389 ! 1390 !-- Classic NetCDF format 1391 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, & 1392 id_set_mask(mid,av) ) 1393 1394 ELSEIF ( netcdf_data_format == 2 ) THEN 1395 ! 1396 !-- 64bit-offset format 1397 nc_stat = NF90_CREATE( filename, & 1398 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1399 id_set_mask(mid,av) ) 1400 1401 1312 1402 #if defined( __netcdf4 ) 1313 nc_stat = NF90_CREATE_PAR( filename, OR( NF90_NOCLOBBER, & 1314 NF90_NETCDF4 ), comm2d, MPI_INFO_NULL, & 1315 id_set_mask(mid,av) ) 1316 #else 1317 WRITE( message_string, * ) 'NetCDF: no NetCDF 4 ', & 1318 'format allowed on this machine' 1319 CALL message( 'check_open', 'PA9998', 0, 1, 0, 6, 0 ) 1320 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, & 1321 id_set_mask(mid,av) ) 1322 #endif 1323 1324 CASE ( 4 ) 1325 #if defined( __netcdf4 ) 1326 nc_stat = NF90_CREATE_PAR( filename, OR( NF90_NOCLOBBER, & 1327 NF90_CLASSIC_MODEL ), comm2d, & 1328 MPI_INFO_NULL, id_set_mask(mid,av) ) 1329 #else 1330 WRITE( message_string, * ) 'NetCDF: no NetCDF 4 (Classic ', & 1331 'model) format allowed on this machine' 1332 CALL message( 'check_open', 'PA9998', 0, 1, 0, 6, 0 ) 1333 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, & 1334 id_set_mask(mid,av) ) 1335 #endif 1336 1337 CASE DEFAULT 1338 WRITE( message_string, * ) 'illegal NetCDF file format: ', & 1339 'nc_format_mask(mid=',mid,',av=',av,')=', & 1340 nc_format_mask(mid,av) 1341 CALL message( 'check_open', 'PA9998', 2, 2, 0, 6, 0 ) 1342 1343 END SELECT 1403 ELSEIF ( netcdf_data_format == 3 ) THEN 1404 ! 1405 !-- NetCDF4/HDF5 format 1406 nc_stat = NF90_CREATE( filename, & 1407 OR( NF90_NOCLOBBER, NF90_NETCDF4 ), & 1408 id_set_mask(mid,av), COMM = comm2d, & 1409 INFO = MPI_INFO_NULL ) 1410 1411 ELSEIF ( netcdf_data_format == 4 ) THEN 1412 ! 1413 !-- NetCDF4/HDF5 format with classic model flag 1414 nc_stat = NF90_CREATE( filename, & 1415 OR( NF90_NOCLOBBER, & 1416 OR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ), & 1417 id_set_mask(mid,av), COMM = comm2d, & 1418 INFO = MPI_INFO_NULL ) 1419 #endif 1420 ENDIF 1421 1344 1422 CALL handle_netcdf_error( 'check_open', 9998 ) 1345 1423 !
Note: See TracChangeset
for help on using the changeset viewer.