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

Date and field issues #72

Open
oguzhannysr opened this issue May 16, 2024 · 0 comments
Open

Date and field issues #72

oguzhannysr opened this issue May 16, 2024 · 0 comments

Comments

@oguzhannysr
Copy link

@ZachHoppinen I wanted to make this analysis for Turkey boundary using the code below. But "NoDataInBounds: No data found in bounds." I get the error, and even though I change the dates, it always downloads images between 2020-2021.

from pathlib import Path

# Add main repo to path if you haven't added with conda-develop
# import sys
# sys.path.append('path/to/the/spicy-snow/')

from spicy_snow.retrieval import retrieve_snow_depth
from spicy_snow.IO.user_dates import get_input_dates
import shapely 
# Define the bounding box for Turkey
min_long = 25.0  # Minimum longitude for Turkey
min_lat = 36.0   # Minimum latitude for Turkey
max_long = 45.0  # Maximum longitude for Turkey
max_lat = 42.0   # Maximum latitude for Turkey

# Create a shapely geometry box for Turkey
area = shapely.geometry.box(min_long, min_lat, max_long, max_lat)

# this will be where your results are saved
out_nc = Path('test.nc').expanduser()

# this will generate a tuple of dates from the previous August 1st to this date
dates = get_input_dates("2024-05-01", "2024-02-01") #('2024-04-01') # run on all s1 images from (2020-08-01, 2021-04-01) in this example

#f*64KaD!qfFSiAL
spicy_ds = retrieve_snow_depth(area = area, dates = dates, 
                               work_dir = Path('spicy-snow/').expanduser(), 
                               job_name = f'testing_spicy',
                               existing_job_name = 'testing_spicy',
                               debug=False,
                               outfp=out_nc)
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

1 participant