CABLE-LSM / CABLE

Home to the CABLE land surface model and its documentation
https://cable.readthedocs.io/en/latest/
Other
8 stars 4 forks source link

Add routine to search for dimension IDs by name. #377

Closed Whyborn closed 1 week ago

Whyborn commented 1 month ago

CABLE

Thank you for submitting a pull request to the CABLE Project.

Description

The retrieving of dimension IDs from input NetCDF files is inconsistent across the code. Add routines to the cable_common module to standardise the retrieving of said IDs by searching through a list of possible names for the dimension.

Fixes #(issue)

Type of change

Checklist

Please add a reviewer when ready for review.

Whyborn commented 2 weeks ago

Made some adjustments- now a single routine, with the possible names defined in the cable_common module. Used the NF90_BADDIM as the default for ok, since I'm fairly sure that's what the routine throws when the dimension can't be found.

Whyborn commented 1 week ago

I've changed to square brackets and made the lists of names PARAMETERs.