Ignore:
Timestamp:
Mar 1, 2010 8:30:24 AM (14 years ago)
Author:
raasch
Message:

New:
---
Output in NetCDF4-format. New d3par-parameter netcdf_data_format.

(check_open, check_parameters, close_file, data_output_2d, data_output_3d, header, modules, netcdf, parin)

Modules to be loaded for compilation (mbuild) or job execution (mrun)
can be given in the configuration file using variable modules. Example:

%modules ifort/11.0.069:netcdf lcsgih parallel

This method replaces the (undocumented) mpilib-variable.

WARNING: All fixed settings of modules in the scripts mbuild, mrun, and subjob
have been removed! Please set the modules variable appropriately in your
configuration file. (mbuild, mrun, subjob)

Changed:


Parameters netcdf_64bit and netcdf_64bit_3d have been removed. Use
netcdf_data_format = 2 for choosing the classic 64bit-offset format (this is
the default). The offset-format can not be set independently for the
3d-output-data any more.

Parameters netcdf_format_mask, netcdf_format_mask_av, and variables
nc_format_mask, format_parallel_io removed. They are replaced by the new
parameter netcdf_data_format. (check_open, close_file,
data_output_mask, header, init_masks, modules, parin)

Errors:


bugfix in trunk/UTIL/Makefile: forgot to compile for interpret_config

Bugfix: timeseries data have to be collected by PE0 (user_statistics)

File:
1 edited

Legend:

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

    r449 r493  
    44! Current revisions:
    55! -----------------
    6 !
     6! NetCDF4 support (parallel output)
    77!
    88! Former revisions:
     
    125125    SELECT CASE ( file_id )
    126126
    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 )
    129128             
    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
    131138         
    132139             IF ( myid /= 0 )  THEN
     
    136143             ENDIF
    137144             
    138           ENDIF
     145          ENDIF
    139146
    140147       CASE ( 21, 22, 23 )
     
    705712          IF ( netcdf_extend )  THEN
    706713!
    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
    708719             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av) )
     720#endif
    709721
    710722             CALL handle_netcdf_error( 'check_open', 20 )
     
    720732                nc_stat = NF90_CLOSE( id_set_xy(av) )
    721733                CALL handle_netcdf_error( 'check_open', 21 )
    722                 CALL local_system( 'rm ' // TRIM( filename ) )
     734                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
    723735             ENDIF
    724736
     
    727739          IF ( .NOT. netcdf_extend )  THEN
    728740!
    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
    732750                nc_stat = NF90_CREATE( filename,                               &
    733751                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    734752                                       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
    745774             CALL handle_netcdf_error( 'check_open', 22 )
     775
    746776!
    747777!--          Define the header
    748778             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
    749788
    750789          ENDIF
     
    769808!
    770809!--          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
    771814             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av) )
     815#endif
    772816             CALL handle_netcdf_error( 'check_open', 23 )
    773817!
     
    782826                nc_stat = NF90_CLOSE( id_set_xz(av) )
    783827                CALL handle_netcdf_error( 'check_open', 24 )
    784                 CALL local_system( 'rm ' // TRIM( filename ) )
     828                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
    785829             ENDIF
    786830
     
    789833          IF ( .NOT. netcdf_extend )  THEN
    790834!
    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
    794844                nc_stat = NF90_CREATE( filename,                               &
    795845                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    796846                                       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
    807868             CALL handle_netcdf_error( 'check_open', 25 )
     869
    808870!
    809871!--          Define the header
    810872             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
    811882
    812883          ENDIF
     
    831902!
    832903!--          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
    833908             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av) )
     909#endif
    834910             CALL handle_netcdf_error( 'check_open', 26 )
    835911!
     
    844920                nc_stat = NF90_CLOSE( id_set_yz(av) )
    845921                CALL handle_netcdf_error( 'check_open', 27 )
    846                 CALL local_system( 'rm ' // TRIM( filename ) )
     922                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
    847923             ENDIF
    848924
     
    851927          IF ( .NOT. netcdf_extend )  THEN
    852928!
    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 ),&
    858940                                       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
    869962             CALL handle_netcdf_error( 'check_open', 28 )
     963
    870964!
    871965!--          Define the header
    872966             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
    873976
    874977          ENDIF
     
    9081011!
    9091012!--          Create a new NetCDF output file
    910              IF ( netcdf_64bit )  THEN
    911 #if defined( __netcdf_64bit )
     1013             IF ( netcdf_data_format > 1 )  THEN
    9121014                nc_stat = NF90_CREATE( filename,                               &
    9131015                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    9141016                                       id_set_pr )
    915 #else
    916                 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 #endif
    9221017             ELSE
    9231018                nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pr )
     
    9641059!
    9651060!--          Create a new NetCDF output file
    966              IF ( netcdf_64bit )  THEN
    967 #if defined( __netcdf_64bit )
     1061             IF ( netcdf_data_format > 1 )  THEN
    9681062                nc_stat = NF90_CREATE( filename,                               &
    9691063                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    9701064                                       id_set_ts )
    971 #else
    972                 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 #endif
    9781065             ELSE
    9791066                nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_ts )
     
    9981085          ENDIF
    9991086!
    1000 !--       Inquire, if there is a NetCDF file from a previuos run. This should
     1087!--       Inquire, if there is a NetCDF file from a previous run. This should
    10011088!--       be opened for extension, if its dimensions and variables match the
    10021089!--       actual run.
     
    10051092          IF ( netcdf_extend )  THEN
    10061093!
    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
    10081099             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_3d(av) )
     1100#endif
    10091101             CALL handle_netcdf_error( 'check_open', 35 )
    10101102!
     
    10261118          IF ( .NOT. netcdf_extend )  THEN
    10271119!
    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
    10311129                nc_stat = NF90_CREATE( filename,                               &
    10321130                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    10331131                                       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
    10441153             CALL handle_netcdf_error( 'check_open', 37 )
     1154
    10451155!
    10461156!--          Define the header
    10471157             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
    10481167
    10491168          ENDIF
     
    10851204!
    10861205!--          Create a new NetCDF output file
    1087              IF ( netcdf_64bit )  THEN
    1088 #if defined( __netcdf_64bit )
     1206             IF ( netcdf_data_format > 1 )  THEN
    10891207                nc_stat = NF90_CREATE( filename,                               &
    10901208                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    10911209                                       id_set_sp )
    1092 #else
    1093                 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 #endif
    10991210             ELSE
    11001211                nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_sp )
     
    11621273!
    11631274!--          Create a new NetCDF output file
    1164              IF ( netcdf_64bit )  THEN
    1165 #if defined( __netcdf_64bit )
     1275             IF ( netcdf_data_format > 1 )  THEN
    11661276                nc_stat = NF90_CREATE( filename,                               &
    11671277                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    11681278                                       id_set_prt )
    1169 #else
    1170                 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 #endif
    11761279             ELSE
    11771280                nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_prt )
     
    12191322!
    12201323!--          Create a new NetCDF output file
    1221              IF ( netcdf_64bit )  THEN
    1222 #if defined( __netcdf_64bit )
     1324             IF ( netcdf_data_format > 1 )  THEN
    12231325                nc_stat = NF90_CREATE( filename,                               &
    12241326                                       OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),&
    12251327                                       id_set_pts )
    1226 #else
    1227                 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 #endif
    12331328             ELSE
    12341329                nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pts )
     
    12661361!--          Open an existing NetCDF file for output
    12671362#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 )
    12701365#else
    12711366             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_mask(mid,av) )
     
    12901385          IF ( .NOT. netcdf_extend )  THEN
    12911386!
    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
    13121402#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
    13441422             CALL handle_netcdf_error( 'check_open', 9998 )
    13451423!
Note: See TracChangeset for help on using the changeset viewer.