Ignore:
Timestamp:
Apr 5, 2013, 5:26:18 PM (12 years ago)
Author:
steve
Message:

Fixed unit test in test_urs2sww.py to work with netcdf4 on windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/file/netcdf.py

    r8810 r8812  
    4242    """
    4343
    44 
    45 
    46     try:
    47         from Scientific.IO.NetCDF import NetCDFFile
    48         return NetCDFFile(file_name, netcdf_mode)
    49     except:
    50         from netCDF4 import Dataset
    51         if netcdf_mode == 'wl' :
    52             return Dataset(file_name, 'w', format='NETCDF3_64BIT')
    53         else:
    54             return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT')
     44    from netCDF4 import Dataset
     45    if netcdf_mode == 'wl' :
     46        return Dataset(file_name, 'w', format='NETCDF3_64BIT')
     47    else:
     48        return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT')
     49
     50
     51#    try:
     52#        from Scientific.IO.NetCDF import NetCDFFile
     53#        return NetCDFFile(file_name, netcdf_mode)
     54#    except:
     55#        from netCDF4 import Dataset
     56#        if netcdf_mode == 'wl' :
     57#            return Dataset(file_name, 'w', format='NETCDF3_64BIT')
     58#        else:
     59#            return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT')
    5560
    5661#    from netCDF4 import Dataset
Note: See TracChangeset for help on using the changeset viewer.