esa_cci_sm package¶
Submodules¶
esa_cci_sm.grid module¶
esa_cci_sm.interface module¶
- class esa_cci_sm.interface.CCITs(ts_path, grid_path=None, **kwargs)[source]¶
Bases:
GriddedNcOrthoMultiTs
- class esa_cci_sm.interface.CCI_SM_025Ds(data_path, parameter=None, subgrid=None, array_1D=False, freq_h=24)[source]¶
Bases:
MultiTemporalImageBaseClass for reading ESA CCI SM images in nc format.
- Parameters:
data_path (string) – Path to the nc image files
parameter (string or list, optional (default: 'sm')) – One or list of parameters to read, see ESA CCI SM documentation for more information
array_1D (boolean, optional (default: False)) – If set then the data is read into 1D arrays. Needed for some legacy code.
- class esa_cci_sm.interface.CCI_SM_025Img(filename, mode='r', parameter=None, subgrid=None, array_1D=False)[source]¶
Bases:
ImageBaseClass for reading one ESA CCI SM netcdf image file on a 0.25 DEG grid.
- Parameters:
filename (str) – Filename of the ESA CCI SM netcdf file
mode (str, optional (default: 'r')) – Mode of opening the file, only ‘r’ is implemented at the moment
parameter (str or list[str,...], optional (default: 'sm')) – One or list of parameters to read, see ESA CCI documentation for more information
array_1D (boolean, optional (default: False)) – If set then the data is read into 1D arrays. Where the first element refers to the lower left data point in the 2d image.
esa_cci_sm.reshuffle module¶
Module for a command line interface to convert the ESACCI data into a time series format using the repurpose package
- esa_cci_sm.reshuffle.parse_args(args)[source]¶
Parse command line parameters for conversion from image to timeseries
- Parameters:
args (list) – command line parameters as list of strings
- Returns:
params – Command line parameters
- Return type:
- esa_cci_sm.reshuffle.parse_filename(data_dir, template='{product}-SOILMOISTURE-L3S-{data_type}-{sensor_type}-{datetime}000000-fv{version}.{sub_version}.nc')[source]¶
Take the first file in the passed directory and use its file name to retrieve the product type, version number and variables in the file.
- esa_cci_sm.reshuffle.read_metadata(sensortype, version, varnames)[source]¶
Read metadata dictionaries from the according ini file
- esa_cci_sm.reshuffle.reshuffle(input_root, outputpath, startdate, enddate, parameters=None, land_points=True, ignore_meta=True, template='{product}-SOILMOISTURE-L3S-{data_type}-{sensor_type}-{datetime}000000-fv{version}.{sub_version}.nc', imgbuffer=200)[source]¶
Reshuffle method applied to ESA CCI SM images.
- Parameters:
input_root (string) – input path where era interim data was downloaded
outputpath (string) – Output path.
startdate (datetime) – Start date.
enddate (datetime) – End date.
parameters (list, optional (default: None)) – parameters to read and convert If none are passed, we read an image in the root path and use vars from the image.
land_points (bool, optional (default: True)) – Use the land grid to calculate time series on. Leads to faster processing and smaller files.
imgbuffer (int, optional) – How many images to read at once before writing time series.