salem.WRF
- class salem.WRF(file, grid=None, time=None)[source]
WRF proof-of-concept template.
Adds unstaggered and diagnostic variables.
- __init__(file, grid=None, time=None)[source]
Open the file and try to understand it.
- Parameters:
- file: path to the netcdf file
- grid: a Grid object. This will override the normal behavior of
- GeoNetcdf, which is to try to understand the grid automatically.
- time: a time array. This will override the normal behavior of
- GeoNetcdf, which is to try to understand the time automatically.
- monthbegin: set to true if you are sure that your data is monthly
- and that the data provider decided to tag the date as the center of
- the month (stupid)
Methods
__init__
(file[, grid, time])Open the file and try to understand it.
close
()get_vardata
([var_id, as_xarray])Reads the data out of the netCDF file while taking into account time and spatial subsets.
set_period
([t0, t1])Set a period of interest for the dataset.
set_roi
([shape, geometry, crs, grid, ...])Set a region of interest for the dataset.
set_subset
([corners, crs, toroi, margin])Set a subset for the dataset.
Attributes
roi
Mask of the ROI (same size as subset).
time
Time array