utils
¶
Utility functions for WPS processes.
Module Contents¶
-
utils.
esgf_archive_path
(url)¶
-
utils.
dupname
(path, filename)¶ avoid dupliate filenames TODO: needs to be improved
-
utils.
user_id
(openid)¶ generate user_id from openid
-
utils.
within_date_range
(timesteps, start=None, end=None)¶
-
utils.
filter_timesteps
(timesteps, aggregation="monthly", start=None, end=None)¶
-
utils.
nc_copy
(source, target, overwrite=True, time_dimname="time", nchunk=10, istart=0, istop=-1, format="NETCDF3_64BIT")¶ copy netcdf file from opendap to netcdf3 file
Parameters: - overwrite – Overwite destination file (default is to raise an error if output file already exists).
- format – netcdf3 format to use (NETCDF3_64BIT by default, can be set to NETCDF3_CLASSIC)
- chunk – number of records along unlimited dimension to write at once. Default 10. Ignored if there is no unlimited dimension. chunk=0 means write all the data at once.
- istart – number of record to start at along unlimited dimension. Default 0. Ignored if there is no unlimited dimension.
- istop – number of record to stop at along unlimited dimension. Default -1. Ignored if there is no unlimited dimension.