Sources¶
Sources read data for the data interfaces. Those with a coordinate reference system (CRS) extend rompy's sources, which are listed in the rompy reference.
XBEACH Rompy sources.
SourceGeotiff
pydantic-model
¶
SourceGeotiff(**data: Any)
Bases: SourceBase
Geotiff source class.
Fields:
Validators:
validate_rasterio_kwargs
pydantic-validator
¶
validate_rasterio_kwargs(v) -> dict
Validate the rasterio keyword arguments.
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceXYZ
pydantic-model
¶
SourceXYZ(**data: Any)
Bases: SourceBase
XYZ source class.
Fields:
-
model_type(Literal['xyz']) -
filename(str | Path) -
crs(Union[int, str]) -
res(float) -
xcol(str) -
ycol(str) -
zcol(str) -
read_csv_kwargs(dict) -
griddata_kwargs(dict)
read_csv_kwargs
pydantic-field
¶
read_csv_kwargs: dict = {}
Keyword arguments to pass to pandas.read_csv
griddata_kwargs
pydantic-field
¶
griddata_kwargs: dict = {'method': 'linear'}
Keyword arguments to pass to scipy.interpolate.griddata
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceMixin
¶
Mixin class for crs aware source objects.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceCRSDataset
¶
Bases: SourceMixin, SourceDataset
Source dataset with CRS support from an existing xarray Dataset object.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceCRSFile
pydantic-model
¶
SourceCRSFile(**data: Any)
Bases: SourceMixin, SourceFile
Source dataset with CRS support from file to open with xarray.open_dataset.
Config:
arbitrary_types_allowed:True
Fields:
-
model_type(Literal['file']) -
uri(Union[str, Path]) -
kwargs(dict) -
variable(Optional[str]) -
crs(CRS_TYPES) -
x_dim(str) -
y_dim(str)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceCRSIntake
pydantic-model
¶
SourceCRSIntake(**data: Any)
Bases: SourceMixin, SourceIntake
Source dataset with CRS support from intake catalog.
Fields:
-
model_type(Literal['intake']) -
dataset_id(str) -
catalog_uri(Optional[str | Path]) -
catalog_yaml(Optional[str]) -
kwargs(dict) -
crs(CRS_TYPES) -
x_dim(str) -
y_dim(str)
Validators:
catalog_uri
pydantic-field
¶
The URI of the catalog to read from
catalog_yaml
pydantic-field
¶
The YAML string of the catalog to read from
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceCRSWavespectra
pydantic-model
¶
SourceCRSWavespectra(**data: Any)
Bases: SourceMixin, SourceWavespectra
Source dataset with CRS support from wavespectra reader.
Note
Default values are provided for crs, x_dim and y_dim fields as they are common to most wavespectra datasets.
Fields:
-
model_type(Literal['wavespectra']) -
uri(str | Path) -
reader(str) -
kwargs(dict) -
crs(CRS_TYPES) -
x_dim(str) -
y_dim(str)
Validators:
model_type
pydantic-field
¶
model_type: Literal['wavespectra'] = 'wavespectra'
Model type discriminator
set_defaults
pydantic-validator
¶
Set default values for wavespectra-specific fields.
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceOceantide
pydantic-model
¶
SourceOceantide(**data: Any)
Bases: SourceBase
Geotiff source class.
Fields:
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceCRSOceantide
pydantic-model
¶
SourceCRSOceantide(**data: Any)
Bases: SourceMixin, SourceOceantide
Source dataset with CRS support from intake catalog.
Fields:
-
model_type(Literal['oceantide']) -
reader(str) -
kwargs(dict) -
crs(CRS_TYPES) -
x_dim(str) -
y_dim(str)
Validators:
set_defaults
pydantic-validator
¶
Set default values for oceantide-specific fields.
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.
SourceTideConsPointCSV
pydantic-model
¶
SourceTideConsPointCSV(**data: Any)
Bases: SourceBase
Tide point source class.
Fields:
-
model_type(Literal['tide_cons_point_csv']) -
filename(str | Path) -
acol(str) -
pcol(str) -
ccol(str) -
read_csv_kwargs(dict)
Validators:
model_type
pydantic-field
¶
model_type: Literal["tide_cons_point_csv"] = (
"tide_cons_point_csv"
)
Model type discriminator
read_csv_kwargs
pydantic-field
¶
read_csv_kwargs: dict = {}
Keyword arguments to pass to pandas.read_csv
validate_kwargs
pydantic-validator
¶
validate_kwargs() -> SourceTideConsPointCSV
Validate the keyword arguments.
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
open
¶
Return the filtered dataset object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
list
|
List of variables to select from the dataset. |
[]
|
filters
|
Filter
|
Filters to apply to the dataset. |
{}
|
Notes
The kwargs are only a placeholder in case a subclass needs to pass additional arguments to the open method.