-
Notifications
You must be signed in to change notification settings - Fork 12
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
Number of max resources not updated by set_max_resource
?
#344
Comments
Also, any advice on how I should set-up large-scale requests? (all glaciers worldwide) (That should give me guidance on how to split my requests in smaller bits! 😄) |
@rhugonnet The issue is the call to you can see the So in your script above, if you flip the order in the lines: # Set max resources
earthdata.set_max_resources(5000)
# Configure ICESat-2 API
icesat2.init("slideruleearth.io") then that should take care of the problem. Alternatively, you could also add the max_resources to the # Configure ICESat-2 API
icesat2.init("slideruleearth.io", max_resources=5000) |
As for using the shapefile - yes, in the code you have, the convex hull is being generated and used to subset to the area of interest. If you want to preserve the features of the shapefile, you need to use the # Specify region of interest from geojson
poly_fn = '/home/atom/data/inventory_products/RGI/00_rgi60_neighb_renamed/11_rgi60_CentralEurope/region_11_rgi60_CentralEurope.shp'
region = sliderule.toregion(poly_fn) # NOTE REMOVED ["poly"]
parms = {
"poly": region["poly"],
"raster": region["raster"], # ADD THIS LINE HERE
"srt": icesat2.SRT_LAND,
"cnf": icesat2.CNF_SURFACE_HIGH,
"ats": 20.0,
"cnt": 10,
"len": 200.0,
"res": 100.0,
"maxi": 1
} This will send a geojson representation of the shapefile to the servers, where they will burn a raster of the geojson and use that raster as an inclusion mask. When making the call to This functionality has not gotten a lot of use, and still needs some work. So please provide us feedback as you go on how we can make it better. One of the things we know about (and is on our short list to work on), is that using the shapefile this way (i.e. burning a raster for an inclusion mask) slows down the subsetting substantially. So please expect significantly longer runs. We have some ideas on how to make this faster, but haven't had the time to do it yet. But you using this functionality is good motivation to get on it. |
Lastly, for large processing runs like this, you should definitely use one of the private clusters. I'd recommend using the If you haven't done so already, you can create an account on https://ps.slideruleearth.io to get started. Then here is a link to our write up on how to use a private cluster: https://slideruleearth.io/web/rtd/user_guide/Private-Clusters.html. If you have any questions, please let me know. |
Thanks a lot for all the info @jpswinski! 😃 Moving forward with this. I'm adding this |
Also: to find "outdated examples" that fail during CI, we could activate
More generally, the What do you think @jpswinski? |
Hey @jpswinski,
I'm running the following code adapted from the first notebook:
which fails with the default max resources of 300 instead of the 5000 that I set:
Am I doing anything wrong?
The region is just a big shapefile with all glaciers polygons in the European Alps, which I guess gets converted into a convexhull of all dissolved features? (couldn't find info on this in the doc, adding to #343)
Here it is to reproduce the behaviour on your side!
The text was updated successfully, but these errors were encountered: