Classes | |
| class | NetcdfDict |
| Represent a netcdf dimension or variable. More... | |
| class | NetcdfError |
| Error returned by module_netcdf. More... | |
Functions | |
| def | find_inlist |
| Find a NetcdfDict by its name in a list of NetcdfDict objects. More... | |
| def | cftime2datetime |
| Convert a list of cftime.DatetimeGregorian objects into a list datetime.datetime objects. More... | |
| def | datetime2cftime |
| Convert a list of datetime.datetime objects into a list cftime.DatetimeGregorian objects. More... | |
| def | read |
| Read a Netcdf file. More... | |
| def | write |
| Write a Netcdf file. More... | |
| def common.module_netcdf.cftime2datetime | ( | date_cftimes | ) |
Convert a list of cftime.DatetimeGregorian objects into a list datetime.datetime objects.
List of cftimes returned by:
netCDF4.num2date(dset.variables['time'][:],units=dset.variables['time'].units,calendar='standard',only_use_cftime_datetimes=True)

| def common.module_netcdf.datetime2cftime | ( | date_datetimes, | |
unit = 'milliseconds since 1970-01-01T00:00:00Z' |
|||
| ) |
Convert a list of datetime.datetime objects into a list cftime.DatetimeGregorian objects.

| def common.module_netcdf.find_inlist | ( | netcdfdicts, | |
| name | |||
| ) |
Find a NetcdfDict by its name in a list of NetcdfDict objects.
| def common.module_netcdf.read | ( | filepath | ) |
Read a Netcdf file.
| [in] | file | path |
| [out] | header,: | dictionnary containing: attributes (dictionnary) + data_model + file_format. |
| [out] | dimensions,: | All dimensions. List of NetcdfDict objects |
| [out] | variables,: | All variables. List of NetcdfDict objects |
| [out] | datetimes,: | list of datetime.datetime objects. |

| def common.module_netcdf.write | ( | filepath, | |
| header, | |||
| dimensions, | |||
| variables, | |||
| datetimes | |||
| ) |
Write a Netcdf file.
| [in] | file | path |
| [in] | header,: | dictionnary containing at least: dictionnary attributes and data_model |
| [in] | dimensions,: | All dimensions. List of NetcdfDict objects |
| [in] | variables,: | All variables. List of NetcdfDict objects |
| [in] | datetimes,: | list of datetime.datetime objects. |

1.8.5