Skip to content

NetCDF example files used for the testing suite of Xclim

License

Notifications You must be signed in to change notification settings

Ouranosinc/xclim-testdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xclim-testdata

NetCDF example files used for the testing suite of xclim

Contributing

In order to add a new dataset to the xclim testing data, please ensure you perform the following:

  1. Create a new branch: git checkout -b my_new_testdata_branch
  2. Place your dataset within an appropriate subdirectory (or create a new one: mkdir data/my_testdata_contribution).
  3. Run the registry generation script: python make_check_sums.py
  4. Commit your changes: git add testdata_contribution && git commit -m "added my_new_testdata"
  5. Open a Pull Request.

To modify an existing dataset, be sure to remove the existing checksum file before running the make_check_sums.py script.

If you wish to perform preliminary tests against the dataset using xclim, this can be done with the following procedure:

from xclim.testing import open_dataset


ds = open_dataset(
    "testdata_contribution/my_netcdf.nc",
    github_url="https://github.com/my_username/xclim-testdata/data",
    branch="my_new_testdata_branch",
    checksum="sha256:1234567890abcdef",
)

Note

The following options only work for branches based on Ouranosinc/xclim-testdata, not forks.

If you wish to run the entire xclim testing suite locally against your branch, this can be set via an environment variable:

$ export XCLIM_TESTDATA_BRANCH="my_new_testdata_branch"

$ pytest xclim
# or, alternatively:
$ tox

If you wish to run the entire xclim testing suite on the Ouranosinc/xclim GitHub Workflows (CI) against your branch, this can be set via an environment variable default in the .github/workflows/main.yml workflow configuration:

env:
  XCLIM_TESTDATA_BRANCH: my_new_testdata_branch

![WARNING] Be aware that modifying this variable to a value other than the latest tagged version of xclim-testdata will trigger a GitHub Workflow that will block merging of your Pull Request until changes are effected.

Versioning

When updating a dataset in xclim-testdata using a development branch and Pull Request, once changes have been merged to the main branch, you should tag a new version of xclim-testdata.

The version tag of xclim-testdata should follow a calendar versioning scheme (i.e. version string follows from vYYYY.MM.DD-r#) reflecting the date of the tag creation, with modifiers if required.

Data Information

CMIP(3/5/6)

ECCC (AHCCD: Adjusted and Homogenized Canadian Climate Data)

ERA5

NA-CORDEX (CRCM5)

NASA (GFWED)

NRCAN (NRCan Canada Daily Gridded 10Km and CFFDRS)

OURANOS (Generic Climate Scenarios)

PCIC (BCCAQv2)

Regional Variance Dataset

Lafferty-Sriver Uncertainty Dataset

About

NetCDF example files used for the testing suite of Xclim

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages