API Reference¶
Reading/copying data¶
|
Read netcdf data as a DataSet object |
|
Make a deep copy of an DataSet object |
Merging or analyzing multiple datasets¶
|
Merge datasets |
|
Calculate the temporal correlation coefficient between two datasets This will calculate the temporal correlation coefficient, in each grid cell, between two datasets |
|
Calculate the spatial correlation coefficient between two datasets This will calculate the spatial correlation coefficient, for each time step, between two datasets |
Accessing attributes¶
List variables contained in a dataset |
|
List years contained in a dataset |
|
List months contained in a dataset |
|
List times contained in a dataset |
|
List levels contained in a dataset |
|
The size of an object This will print the number of files, total size, and smallest and largest files in an DataSet object. |
|
The current file or files in the DataSet object |
|
The history of operations on the DataSet |
|
The starting file or files of the DataSet object |
Plotting¶
|
Autoplotting method. |
|
Open the current dataset’s file in ncview |
Variable modification¶
|
Create new variables using mathematical expressions, and keep original variables |
|
Create new variables using mathematical expressions, and drop original variables |
|
Rename variables in a dataset |
|
Set the missing value for a single number or a range |
|
Calculate the sum of all variables for each time step |
NetCDF file attribute modification¶
|
Set the long names of variables |
|
Set the units for variables |
Vertical/level methods¶
|
Extract the top/surface level from a dataset This extracts the first vertical level from each file in a dataset. |
|
Extract the bottom level from a dataset This extracts the bottom level from each NetCDF file. |
|
Verticaly interpolate a dataset based on given vertical levels This is calculated for each time step and grid cell |
|
Calculate the depth-averaged mean for each variable This is calculated for each time step and grid cell |
|
Calculate the vertical minimum of variable values This is calculated for each time step and grid cell |
|
Calculate the vertical maximum of variable values This is calculated for each time step and grid cell |
|
Calculate the vertical range of variable values This is calculated for each time step and grid cell |
|
Calculate the vertical sum of variable values This is calculated for each time step and grid cell |
|
Calculate the vertical sum of variable values This is calculated for each time step and grid cell |
|
Invert the levels of 3D variables This is calculated for each time step and grid cell |
|
Create a mask identifying the deepest cell without missing values. |
Rolling methods¶
|
Calculate a rolling mean based on a window |
|
Calculate a rolling minimum based on a window |
|
Calculate a rolling maximum based on a window |
|
Calculate a rolling sum based on a window |
|
Calculate a rolling range based on a window |
Evaluation setting¶
|
Run all stored commands in a dataset |
Cleaning functions¶
Ensemble creation¶
|
Generate an ensemble |
Arithemetic methods¶
|
Create new variables using mathematical expressions, and keep original variables |
|
Create new variables using mathematical expressions, and drop original variables |
|
Add to a dataset This will add a constant, another dataset or a NetCDF file to the dataset. |
|
Subtract from a dataset This will subtract a constant, another dataset or a NetCDF file from the dataset. |
|
Multiply a dataset This will multiply a dataset by a constant, another dataset or a NetCDF file. |
|
Divide the data This will divide the dataset by a constant, another dataset or a NetCDF file. |
Ensemble statistics¶
|
Calculate an ensemble mean |
|
Calculate an ensemble min |
|
Calculate an ensemble maximum |
|
Calculate an ensemble percentile This will calculate the percentles for each time step in the files. |
|
Calculate an ensemble range The range is calculated for each time step; for example, if each file in the ensemble has 12 months of data the statistic will be calculated for each month. |
Subsetting operations¶
|
Clip to a rectangular longitude and latitude box |
|
Select variables from a dataset |
|
Remove variables This will remove stated variables from files in the dataset. |
|
Select years from a dataset This method will subset the dataset to only contain years within the list given. |
|
Select months from a dataset This method will subset the dataset to only contain months within the list given. |
|
Select season from a dataset |
|
Select timesteps from a dataset |
Time-based methods¶
|
Set the date in a dataset You should only do this if you have to fix/change a dataset with a single, not multiple dates. |
|
Select months from a dataset This method will subset the dataset to only contain months within the list given. |
|
Select season from a dataset |
|
Select years from a dataset This method will subset the dataset to only contain years within the list given. |
Interpolation methods¶
|
Regrid a dataset to a target grid |
|
Regrid a dataset to a regular latlon grid |
|
Temporally interpolate variables based on date range and time resolution |
Masking methods¶
|
Mask a lon/lat box |
Summary methods¶
|
Calculate annual anomalies for each variable based on a baseline period The anomaly is derived by first calculating the climatological annual mean for the given baseline period. |
|
Calculate monthly anomalies based on a baseline period The anomaly is derived by first calculating the climatological monthly mean for the given baseline period. |
|
Calculate phenologies from a dataset Each file in an ensemble must only cover a single year, and ideally have all days. |
Statistical methods¶
|
Calculate the temporal mean of all variables |
|
Calculate the temporal minimum of all variables |
|
Calculate the temporal percentile of all variables |
|
Calculate the temporal maximum of all variables |
|
Calculate the temporal sum of all variables |
|
Calculate the temporal range of all variables |
|
Calculate the temporal variance of all variables |
|
Calculate the temporal cumulative sum of all variables |
|
Calculate the correlation correct between two variables in space This is calculated for each time step. |
|
Calculate the correlation correct in time between two variables The correlation is calculated for each grid cell, ignoring missing values. |
|
Calculate the area weighted spatial mean for all variables This is performed for each time step. |
|
Calculate the spatial minimum for all variables This is performed for each time step. |
|
Calculate the spatial maximum for all variables This is performed for each time step. |
|
Calculate the spatial sum for all variables This is performed for each time step. |
|
Calculate the spatial range for all variables This is performed for each time step. |
|
Calculate the spatial sum for all variables This is performed for each time step. |
|
Calculate the monthly mean for each year/month combination in files. |
|
Calculate the monthly minimum for each year/month combination in files. |
|
Calculate the monthly maximum for each year/month combination in files. |
|
Calculate the monthly range for each year/month combination in files. |
Calculate a daily mean climatology |
|
Calculate a daily minimum climatology |
|
Calculate a daily maximum climatology |
|
Calculate a daily mean climatology |
|
Calculate a daily range climatology |
|
Calculate the monthly mean climatologies Defined as the minimum value in each month across all years. |
|
Calculate the monthly minimum climatologies Defined as the minimum value in each month across all years. |
|
Calculate the monthly maximum climatologies Defined as the maximum value in each month across all years. |
|
Calculate the monthly range climatologies Defined as the range of value in each month across all years. |
|
|
Calculate the annual mean for each variable |
|
Calculate the annual minimum for each variable |
|
Calculate the annual maximum for each variable |
|
Calculate the annual range for each variable |
|
Calculate the seasonal mean for each year. |
|
Calculate the seasonal minimum for each year. |
|
Calculate the seasonal maximum for each year. |
|
Calculate the seasonal range for each year. |
Calculate a climatological seasonal mean |
|
Calculate a climatological seasonal min This is defined as the minimum value in each season across all years. |
|
Calculate a climatological seasonal max This is defined as the maximum value in each season across all years. |
|
Calculate a climatological seasonal range This is defined as the range of values in each season across all years. |
Seasonal methods¶
|
Calculate the seasonal mean for each year. |
|
Calculate the seasonal minimum for each year. |
|
Calculate the seasonal maximum for each year. |
|
Calculate the seasonal range for each year. |
Calculate a climatological seasonal mean |
|
Calculate a climatological seasonal min This is defined as the minimum value in each season across all years. |
|
Calculate a climatological seasonal max This is defined as the maximum value in each season across all years. |
|
Calculate a climatological seasonal range This is defined as the range of values in each season across all years. |
|
|
Select season from a dataset |
Merging methods¶
|
Merge a multi-file ensemble into a single file Merging will occur based on the time steps in the first file. |
|
Time-based merging of a multi-file ensemble into a single file This method is ideal if you have the same data split over multiple files covering different data sets. |
Climatology methods¶
Calculate a daily mean climatology |
|
Calculate a daily minimum climatology |
|
Calculate a daily maximum climatology |
|
Calculate a daily mean climatology |
|
Calculate a daily range climatology |
|
Calculate the monthly mean climatologies Defined as the minimum value in each month across all years. |
|
Calculate the monthly minimum climatologies Defined as the minimum value in each month across all years. |
|
Calculate the monthly maximum climatologies Defined as the maximum value in each month across all years. |
|
Calculate the monthly range climatologies Defined as the range of value in each month across all years. |
Splitting methods¶
|
Split the dataset Each file in the ensemble will be separated into new files based on the splitting argument. |
Output methods¶
|
Save a dataset to a named file This will only work with single file datasets. |
|
Open a dataset as an xarray object |
|
Open a dataset as a pandas data frame |
|
Zip the dataset This will compress the files within the dataset. |
Miscellaneous methods¶
|
Calculate the area of grid cells. |
|
Apply a cdo command |
|
Apply an nco command |
|
Compare all variables to a constant |
|
Reduce dimensions of data This will remove any dimensions with only one value. |
|
Reduce the dataset to non-zero locations in a mask :param mask: single variable dataset or path to .nc file. |