-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial cleanup of tests * incorporated PR#274 from @MaxJones.
- Loading branch information
1 parent
0c70933
commit 178af15
Showing
4 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import numpy as np | ||
import pytest | ||
from xarray_schema import DataArraySchema, DatasetSchema | ||
|
||
from cmip6_downscaling.data.observations import open_era5 | ||
|
||
params = ['ua', 'va', 'tasmin', 'tasmax', 'pr'] | ||
|
||
|
||
@pytest.mark.parametrize('params', params) | ||
def test_open_era5(params): | ||
ds = open_era5(params, slice('2020', '2020')) | ||
print(ds) | ||
print(params) | ||
schema = DatasetSchema( | ||
{params: DataArraySchema(dtype=np.floating, dims=['time', 'lat', 'lon'])}, | ||
) | ||
schema.validate(ds) |
178af15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cmip6-downscaling – ./
cmip6-downscaling.docs.carbonplan.org
cmip6-downscaling-git-main-carbonplan.vercel.app
cmip6-downscaling-carbonplan.vercel.app
cmip6-downscaling.vercel.app