Skip to content

Commit

Permalink
199 data request 20km regional projections for cordex cmip6 queenslan…
Browse files Browse the repository at this point in the history
…d future climate science (#219)

* Updated .gitignore to include some vs code settings

* * Added type hints

* Replaced a couple of try/excepts with .get in `src/access_nri_intake/catalog/translators.py`

* Updated a misleading docstring

* More type hints

* Type hint upddates

* Updated data_vars => variables in parse_access_ncfile to allow coordinate variable searching & indexing

* Updated all the builders to use a dataclass rather than a tuple:
likely to be necessary for passing around coordinates as well as
data variables as we begin to make coordinates indexable - I think
we'll begin to get confused about what belongs where.

* - Updated the builders to use separate coordinate & variables
   dataclasses that are fed into a dataclass holding all the
   coordinate and data variables from a netCDF file.
- Updated tests so that they are all passing: tests now expect
  to find coordinate variables from the netCDF files as well as
  data variables.
- Some minor changes to make code more readable - changed long
  tuples to dataclasses & dictionaries where possible.

* - Added mypy checks for 3.9..3.12. Note type hints fail on Python3.9 due to use of '|' type union syntax - might be worth consideration?
- Removed a couple of unused imports, cleaned up some comments

* Rewrote type hints to be compatible with Python3.9 (T | None => Optional[T], etc)

* Fixed some issues tests weren't catching

* Renamed  =>  - makes indexing more consistent

* Fixed a couple of issues relating to changing from coords => coord in search (forgot to test)

* Add cmip6_ig45 to catalog

* - Moved coordinate variables back into variables (simpler interface)
- Updated tests to better respect moving coordinate variables back into variables
- Moved mypy setup stuff into to 'pre-commit-config.yaml'

* Cleaned up _cmip_realm_translator & added sorting to test (order unimportant, causing unnecessary test failures)

* Added _DispatchKeys dataclass to hold tagnames

* Refactored a bunch of the translations out to the DefaultTranslator

* Updated translators.py to include CordexTranslator, added config/cordex.yaml and config/metadata_sources/cordex-ig45/metadata.yaml

* Working cordex translator

* Revert "Merge branch '660-coordinate-variables' into 199-data-request-20km-regional-projections-for-cordex-cmip6-queensland-future-climate-science"

This reverts commit 27e460f, reversing
changes made to 0c96e28.

* - Updated tests (covered missing lines introduced by refactor found by
  sentry)
- Updated cmip6.yaml as a different translator is required for Cordex
  experiments as main CMIP6 experiments.

* - Renamed experiment in metadata.yaml
- Updated path for cordex.yaml file

* Add missing newlines to end of yaml & json files

---------

Co-authored-by: Marc White <[email protected]>
  • Loading branch information
charles-turner-1 and marc-white authored Oct 17, 2024
1 parent d66ff09 commit 761e7f4
Show file tree
Hide file tree
Showing 6 changed files with 458 additions and 103 deletions.
9 changes: 9 additions & 0 deletions config/cordex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
builder: null

translator: CordexTranslator

sources:

- metadata_yaml: /g/data/xp65/admin/intake/metadata/cordex_ig45/metadata.yaml
path:
- /g/data/ig45/catalog/v2/esm/catalog.json
126 changes: 126 additions & 0 deletions config/metadata_sources/cordex-ig45/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: cordex_ig45
experiment_uuid: c7021d1e-7ba2-11ef-beb5-000007d3fe80
description: 20km regional projections for CORDEX-CMIP6 from the Queensland Future Climate Science Program
long_description: >-
This dataset includes projections at 20km and 10km, formatted to meet the CORDEX-CMIP6 data standards.
The 20km projections were derived from the 10km projections.
model:
- CMIP6
frequency:
- day
- mon
- 1hr
- fx
variable:
- clt
- tauv
- clh
- clwvi
- ua850
- sund
- ua100m
- va250
- uas
- prc
- vas
- mrfso
- rlds
- ta200
- hus1000
- hus600
- prw
- hus850
- va200
- tas
- clivi
- zg200
- rsut
- va600
- rsdt
- tasmax
- sfcWindmax
- va850
- mrso
- ps
- hus400
- ta1000
- ua250
- tauu
- pr
- va925
- snc
- hus200
- clm
- zg500
- hurs
- rlut
- hus300
- rsds
- ua200
- psl
- ta850
- va400
- zg400
- snm
- ta925
- prsn
- hus250
- zg1000
- ta600
- zg925
- huss
- ta500
- va1000
- zg700
- zmla
- hfss
- zg850
- ua925
- zg600
- ua300
- rsus
- hus500
- sfcWind
- ts
- va500
- va100m
- ua500
- ua700
- va700
- soilt
- snd
- ua1000
- ta700
- hfls
- tasmin
- zg250
- cll
- hus700
- rlus
- va300
- ua600
- hus925
- ta250
- ua400
- prhmax
- sftlf
- ta400
- ta300
- snw
- zg300
- orog
- sftlaf
nominal_resolution:
- 20km
- 10km
version:
contact: NCI
email: [email protected]
reference:
license:
url: https://geonetwork.nci.org.au/geonetwork/srv/eng/catalog.search#/metadata/f7465_8388_5100_7022
parent_experiment:
related_experiments:
notes:
keywords:
- cmip
Loading

0 comments on commit 761e7f4

Please sign in to comment.