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

Micro_era5: Issue with running model; missing era5 variables #32

Open
emmawhite15 opened this issue Jan 24, 2025 · 2 comments
Open

Micro_era5: Issue with running model; missing era5 variables #32

emmawhite15 opened this issue Jan 24, 2025 · 2 comments

Comments

@emmawhite15
Copy link

emmawhite15 commented Jan 24, 2025

Hello,

I have run into an error when running the micro_era5 function in R. The first few lines of code below show the error when trying to run the micro_era5 function and the lines of code below show the variable names within my era5 NetCDF file. As you can see, the variable name for "msnlwrf" in the micro_era5 function is not the same as the name in the NetCDF ("avg_snlwrf"). I think the same will be true for "msdlwrf" being changed to "avg_sdlwrf". I had downloaded era5 data from the CDS on 1/19 and ran the micro_era5 function with no issues. I downloaded era5 data from the CDS on 1/23 and have ran into this error. I think the change in variable names must have occurred during the past week.

Any help with the issue would be great. Thanks!

Error in dplyr::mutate():
ℹ In argument: netlong = abs(msnlwrf) * 0.0036.
Caused by error:
! object 'msnlwrf' not found
Run rlang::last_trace() to see where the error occurred.

nc_data <- nc_open(file_path)
variable_names <- names(nc_data$var)
print(variable_names)
[1] "tp" "fdir" "ssrd" "avg_snlwrf" "avg_sdlwrf" "t2m" "d2m" "sp" "u10" "v10" "tcc" "lsm"

@mrke
Copy link
Owner

mrke commented Feb 4, 2025 via email

@dklinges9
Copy link

dklinges9 commented Feb 11, 2025

Hi,

Was just made aware of this via discussion on the NicheMapR google group. This fix has now been made in mcera5.

Mike, I think you can close this issue.

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

3 participants