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

Eref and CMD are NaN above ~68N latitude #286

Open
cmahony opened this issue Jun 20, 2024 · 4 comments
Open

Eref and CMD are NaN above ~68N latitude #286

cmahony opened this issue Jun 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@cmahony
Copy link
Collaborator

cmahony commented Jun 20, 2024

@kdaust i'm out of time but this needs an urgent fix. can you look into this?

image

@cmahony cmahony added bug Something isn't working Urgent resolve asap labels Jun 20, 2024
@kdaust
Copy link
Collaborator

kdaust commented Jun 20, 2024

Very weird. Yep will do

@cmahony
Copy link
Collaborator Author

cmahony commented Jun 20, 2024

@kdaust, i'm taking a quick look at the calc_Eref script. hopefully i can take the troubleshooting a bit further.

@cmahony
Copy link
Collaborator Author

cmahony commented Jun 20, 2024

This is an artefact of the Hargreaves Eref equation.
line 64 in calc_Eref_CMD.R OM <- -atan(Z / sqrt(-Z * Z + 1)) + pi / 2 is solely related to latitude; the value of -Z * Z + 1 becomes negative above a latitude of ~68N.
i checked hargreaves 1985 and our script is correct.
makes rough sense that Hargreave's Eref wouldn't be valid at high elevation.
i havent' checked the behaviour in climateNA but i'll figure out what we should replace the NaNs with.
@kdaust no need for action on your part at this point

@kdaust kdaust added bug Something isn't working and removed bug Something isn't working Urgent resolve asap labels Jun 21, 2024
@carloscarroll
Copy link

Eref values from ClimateNA seem valid even above 68 degrees (ie not 0, <0, or NaN). (see attached arbitrary example from CNRM-ESM2-1_ssp585_2071).
eref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants