Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge case for names of variables #199

Open
kmdeck opened this issue Feb 21, 2025 · 1 comment
Open

Edge case for names of variables #199

kmdeck opened this issue Feb 21, 2025 · 1 comment

Comments

@kmdeck
Copy link
Member

kmdeck commented Feb 21, 2025

A variable name of the form "x_1m" e.g. will fail here:

julia> short_name = short_names[1]
"iwc_1m"

julia> var = get(simdir; short_name)
ERROR: Variable iwc_1m not found. Available: Set(Any["si", "et", "trans", "swc", "ct", "msf", "lwp", "swu", "swe", "iwc", "gpp", "lwu"])

even though the file (iwc_1m_1M_average.nc) is present. This may because the code assumes "_1m" refers to the time interval of a minute.

@ph-kev
Copy link
Member

ph-kev commented Feb 24, 2025

The bug lies in match_nc_filename. It is non-obvious to me how to fix this because iwc_1m_1M_average.nc can be interpreted as a variable having a period of one minute and one month if iwc is the variable name or a period of one month if iwc_1m is the variable name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants