Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@
"orcid": "https://orcid.org/0009-0001-4486-0120",
"affiliation": "Independent researcher, Vietnam",
"name": "Bogacheva, Jenya"
},
{
"orcid": "https://orcid.org/0009-0004-9553-8387",
"affiliation": "Independent researcher, Australia",
"name": "James, Matthew"
}


],
"license": "Apache-2.0",
"title": "PyEarthTools: Machine learning for Earth system science",
Expand Down
4 changes: 2 additions & 2 deletions notebooks/data/CustomDataIndex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
" \n",
" ##Initialise Parent Class, passing in base_transforms and data resolution\n",
" ## Setup transform to cut data to specified variable\n",
" base_transforms = pyearthtools.data.transform.variables.variable_trim(variables) + transforms\n",
" base_transforms = pyearthtools.data.transform.variables.Trim(variables) + transforms\n",
" \n",
" #Lets say this is hourly data\n",
" super().__init__(base_transforms, (1,'H'))\n",
Expand Down Expand Up @@ -207,7 +207,7 @@
" \n",
" ##Initialise Parent Class, passing in base_transforms and data resolution\n",
" ## Setup transform to cut data to specified variable\n",
" base_transforms = pyearthtools.data.transform.variables.variable_trim(variables) + transforms\n",
" base_transforms = pyearthtools.data.transform.variables.Trim(variables) + transforms\n",
" \n",
" #Lets say this is hourly data\n",
" super().__init__(cache = cachelocation, base_transforms = base_transforms, data_resolution = (1,'H'))\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def __init__(

transforms = kwargs.pop("transforms", pyearthtools.data.TransformCollection())
# Rename variables to match other indexes, and trim out any not requested
self.download_transforms = pyearthtools.data.transforms.variables.rename_variables(
self.download_transforms = pyearthtools.data.transforms.attributes.Rename(
**RENAME_DICT # type: ignore
) + pyearthtools.data.transforms.variables.variable_trim(
) + pyearthtools.data.transforms.variables.Trim(
*variables
) # + pyearthtools.data.transforms.coordinates.Drop("meanSea", "valid_time", "heightAboveGround", "entireAtmosphere", ignore_missing=True)

Expand Down
2 changes: 1 addition & 1 deletion packages/data/src/pyearthtools/data/patterns/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(
super().__init__(
root_dir="",
transforms=(
pyearthtools.data.transforms.variables.variable_trim(variables)
pyearthtools.data.transforms.variables.Trim(variables)
if variables
else TransformCollection() + transforms
),
Expand Down
5 changes: 0 additions & 5 deletions packages/data/src/pyearthtools/data/transforms/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@

import xarray as xr

import pyearthtools.data.transforms.attributes as attr
from pyearthtools.data.transforms.transform import Transform

# Backwards compatability
rename_variables = attr.Rename
replace_name_deviation = rename_variables


__all__ = ["Trim", "Drop"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(
base_transform = TransformCollection()

# base_transform += pyearthtools.data.transforms.attributes.Rename(ERA5_RENAME)
# base_transform += pyearthtools.data.transforms.variables.variable_trim(variables)
# base_transform += pyearthtools.data.transforms.variables.Trim(variables)

self.level_value = level_value

Expand Down
4 changes: 2 additions & 2 deletions packages/nci_site_archive/src/site_archive_nci/AGCD.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def __init__(
self.variables = variables
base_transform = TransformCollection()

base_transform += pyearthtools.data.transforms.variables.rename_variables(AGCD_RENAME)
base_transform += pyearthtools.data.transforms.variables.variable_trim(variables)
base_transform += pyearthtools.data.transforms.attributes.Rename(AGCD_RENAME)
base_transform += pyearthtools.data.transforms.variables.Trim(variables)

super().__init__(
transforms=base_transform + (transforms or TransformCollection()),
Expand Down
2 changes: 1 addition & 1 deletion packages/nci_site_archive/src/site_archive_nci/ERA5.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(
base_transform = TransformCollection()

base_transform += pyearthtools.data.transforms.attributes.Rename(ERA5_RENAME)
# base_transform += pyearthtools.data.transforms.variables.variable_trim(variables)
# base_transform += pyearthtools.data.transforms.variables.Trim(variables)

self.level_value = level_value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ def __init__(
check_project(project_code="rq0")
self.variables = [variables] if isinstance(variables, str) else variables

base_transform = pyearthtools.data.transforms.variables.variable_trim(variables)
base_transform = pyearthtools.data.transforms.variables.Trim(variables)

self.walk_cache = {} # Caches filesystem walks for efficiency

Expand Down
4 changes: 2 additions & 2 deletions packages/tutorial/src/pyearthtools/tutorial/ERA5DataClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __init__(
base_transform = TransformCollection()

# base_transform += pyearthtools.data.transforms.attributes.Rename(ERA5_RENAME)
# base_transform += pyearthtools.data.transforms.variables.variable_trim(variables)
# base_transform += pyearthtools.data.transforms.variables.Trim(variables)

self.level_value = level_value

Expand Down Expand Up @@ -255,7 +255,7 @@ def __init__(
base_transforms = TransformCollection()

# base_transforms += pyearthtools.data.transforms.attributes.Rename(ERA5DEMO_RENAME)
base_transforms += pyearthtools.data.transforms.variables.variable_trim(variables)
base_transforms += pyearthtools.data.transforms.variables.Trim(variables)

self.level_value = level_value

Expand Down
Loading