Skip to content

Commit

Permalink
Merge pull request #265 from andypbarrett/add-download-onprem-howto
Browse files Browse the repository at this point in the history
add download from onprem how-to to documentation
  • Loading branch information
betolink authored Jul 23, 2023
2 parents 068a269 + 1bfe57d commit 6b713cc
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/tutorials/onprem.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Download data for on-prem datasets

Coming soon
Import the `earthaccess` library, search for granules in an on-prem dataset and download to a local computer.
The Sea Ice Concentrations from Nimbus-7 SMMR and DMSP SSM/I-SSMIS Passive Microwave Data, Version 2, dataset is used.
This has the shortname NSIDC-0051. We search for and download data granules for the northern hemisphere for November 2023.
In this example, granules are downloaded to the current working directory using the `local_path` keyword. This can be changed to your preferred download location.

```py
import earthaccess

auth = earthaccess.login()

results = earthaccess.search_data(
short_name='NSIDC-0051',
temporal=('2022-11-01', '2022-11-30'),
bounding_box=(-180, 0, 180, 90)
)

downloaded_files = earthaccess.download(
results,
local_path='.',
)
```

0 comments on commit 6b713cc

Please # to comment.