-
Notifications
You must be signed in to change notification settings - Fork 23
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
> 100% complete values from the GDP break the progress bar #366
Comments
When this failure happens, is this the message? |
I think we need to catch some of the issues w/
|
This error is a problem when pulling data for a large number of lakes within a loop to loop over years. It only causes a problem for a large number of lakes (I am not sure what the threshold number is). 20 lakes work. 12000 lakes does not work. So somewhere in between :)
produces this error at first iteration after progress bar goes to 100, although job is done and can be accessed via web server.
|
with smaller numbers of lakes (4000-6000), the looping code works but not reliably. It will work for a few years and then fail with the same error. |
I think this is a different problem than what this issue was created for --- it looks like the error you and Gretchen are getting is because This may solve the original issue too. |
oh, ok - should we create another issue for this issue? |
Thank you for the detective work. To clarify, it returns a 100% but not a $statusType
[1] "ProcessSucceeded" so it checks again later? |
@gjahansen2 as a quick fix, I bet gconfig('sleep.time' = 45, 'wait' = TRUE) will solve your issue for the time being. Default is for |
OK, so I would run that code prior to the loop and it will set the
configuration for all subsequent geoknife jobs? Or do I put that within the
geoknife call?
In other news, everything is trucking along just fine for ACCESS years
2045-2055. Best run yet.
…On Fri, Sep 21, 2018 at 1:34 PM Jordan S Read ***@***.***> wrote:
@gjahansen2 <https://github.com/gjahansen2> as a quick fix, I bet
gconfig('sleep.time' = 45, 'wait' = TRUE)
will solve your issue for the time being. Default is for geoknife to
check w/ the GDP every 5 seconds. We know your job is slower than that, so
let's delay for 45 seconds in between checks. Haven't had time to test this
though...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#366 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASiU6oebf2TnFFpLipBqxJfge0FY9Roaks5udTFAgaJpZM4RgZyF>
.
--
Gretchen Hansen
https://gretchenhansen.squarespace.com
|
@jread I'm rerunning to check. The code doesn't check Adding that may be the fix. @gjahansen2 Yes, run it prior to the loop. That will set that option for the rest of your R session. |
Yep, looks like that is the issue. This is just printing parts of what
|
@wdwatkins so you are saying Jordan's fix should work? I will give it a try. Right after I said everything was working it failed again. |
Yes, it should prevent it for now. We should be able to have a real fix out by Monday though. |
@gjahansen2 We just merged a fix in the package that should solve your issue. You can install the latest version with the fix with |
Seeing this issue while pulling the new debiased GCMs down (http://gdp-netcdfdev.cr.usgs.gov:8080/thredds/dodsC/notaro_debias_access) for 24 out of my 54 queries. I can bypass this for now by adding |
Can you share a reprex? I'll see if I can get it fixed. |
I was struggling to do this because the geom I am using has 69 points and choosing just 1 doesn't recreate the issue. I've attached a small CSV that is used in this code. library(tidyverse)
library(sf)
library(geoknife)
# Reproject query cell centroids to WGS84
sf_pts_to_simplegeom <- function(sf_obj) {
sf_obj %>%
st_coordinates() %>%
t() %>% as.data.frame() %>%
# Include the cell numbers in the GDP geom so that the
# results can be linked to the correct cells
setNames(sf_obj$cell_no) %>%
simplegeom()
}
query_simplegeom <- readr::read_csv('lplatt_query_geom.csv') %>%
st_as_sf(coords = c("X", "Y")) %>%
sf_pts_to_simplegeom()
gcm_job <- geoknife(
stencil = query_simplegeom,
fabric = webdata(
url = "http://gdp-netcdfdev.cr.usgs.gov:8080/thredds/dodsC/notaro_debias_access",
variables = c(
'windspeed_debias',
'tas_debias', # air temp
'rsds_debias', #shortwave radiation
'rsdl_debias', # longwave radiation
'rh_debias', # relative humidity
'prcp_debias'), # precip
times = c('1980-01-01', '2100-01-01')
)
# The default knife algorithm is appropriate
)
# This throws an error
wait(gcm_job)
# But when you check on this, it succeeded
check(gcm_job)$statusType |
Hope this example is adequate. I wonder if you can trigger the error to by setting |
Pending the changes in #406 I think you will be good to go @lindsayplatt I don't actually think this was a status > 100% issue. It seems like we were trying to set the progress bar to 100% more than once but it was ending up in a state where it didn't want to update anymore after hitting it's maximum already. What I did will also handle the case where progress goes over 100% by just not updating. |
Side note, that csv has some funky characters in the first an last lines... not sure how you generated it, but I had to strip some characters... |
Oh hmm sorry about the file funkiness. Not sure what that would have been from. I made the CSV by exporting the readLines('lplatt_query_geom.csv')
[1] "X,Y,cell_no"
[2] "-96.21941006058987,43.5205760557457,13782"
[3] "-95.9072056134748,43.51798718988345,13783"
[4] "-95.59503268846021,43.514535543265445,13784" |
Just checked with the development version and this did fix the issue I was having (which sounds different than what was noted in this issue originally). Thanks! |
The progress bar function (from
progress
package) contains an assertion that the percent complete ratio is < 1, which fails. We could pre-empt this to give a nicer error message, but this only happens with the unweighted algorithm which generally shouldn't be used anyways.There is something in the GDP itself that is actually causing the wild percent complete values.
The text was updated successfully, but these errors were encountered: