-
Notifications
You must be signed in to change notification settings - Fork 240
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
model2netcdf.ED2 Fails if output files missing "AVG_SOIL_TEMP" aka "Soiltemp" #2623
Comments
This error is dependent on the output files being written out by the version of ED2 one is using. In my personal branch, I modified (this section)[https://github.com/PecanProject/pecan/blob/develop/models/ed/R/model2netcdf.ED2.R#L285] to check for FMEAN_SOIL_TEMP_PY instead of average values.
|
@mccabete I suspect the more general, scalable solution is to check for the presence of the different output variables themselves, rather than checking which ED2 version you were running, with some priority given to one over the other (i.e. check for variable A, if it's not there check for variable B, if it's not there then skip adding that variable to the nc file). Would also be great to see a PR that includes a fix for everyone, not just your personal branch |
Can do
…________________________________
From: Michael Dietze <notifications@github.com>
Sent: Friday, June 12, 2020 9:21 AM
To: PecanProject/pecan <pecan@noreply.github.com>
Cc: Mccabe, Tempest <tmccabe@bu.edu>; Mention <mention@noreply.github.com>
Subject: Re: [PecanProject/pecan] model2netcdf.ED2 Fails if output files missing "AVG_SOIL_TEMP" aka "Soiltemp" (#2623)
@mccabete<https://github.com/mccabete> I suspect the more general, scalable solution is to check for the presence of the different output variables themselves, rather than checking which ED2 version you were running, with some priority given to one over the other (i.e. check for variable A, if it's not there check for variable B, if it's not there then skip adding that variable to the nc file). Would also be great to see a PR that includes a fix for everyone, not just your personal branch
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2623 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCH6FYTEAW4FKQRBEUFE7TRWITVNANCNFSM4NRB2SGQ>.
|
Bug Description
model2netcdf.ED2 fails if
-T-
file is missing the variable "AVG_SOIL_TEMP", known as "Soiltemp" in the pecan standard. It fails specifically at this line.To Reproduce
Steps to reproduce the behavior:
-T-
file that has no "AVG_SOIL_TEMP" data.Expected behavior
The function's assigning
Soiltemp
the value-999
would mean that the.nc
file it produces would have "missing values" of-999
for Soiltemp.Error message
Machine (please complete the following information):
Additional context
I tried an
if(soiltemp != -999){}
around the code chunk from line 520 to line 579, but it messed up the dimensions during the write-out step.The text was updated successfully, but these errors were encountered: