Skip to content

Commit

Permalink
Merge pull request #518 from nsidc/feature/issue-517-add-asdc-as-daac
Browse files Browse the repository at this point in the history
add ASDC daac entry and cloud provider
  • Loading branch information
betolink authored Apr 16, 2024
2 parents 8d65d03 + 291583a commit adfe8fa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions earthaccess/daac.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@
"s3-credentials": "https://data.laadsdaac.earthdatacloud.nasa.gov/s3credentials",
"eulas": [],
},
{
"short-name": "ASDC",
"name": "Atmospheric Science Data Center",
"homepage": "https://asdc.larc.nasa.gov/",
"cloud-providers": ["LARC_CLOUD"],
"on-prem-providers": ["LARC_ASDC"],
"s3-credentials": "https://data.asdc.earthdata.nasa.gov/s3credentials",
"eulas": [],
},
]


Expand All @@ -106,6 +115,7 @@
"GHRC_DAAC",
"ORNL_CLOUD",
"LAADS",
"LARC_CLOUD",
]

# Some testing urls behind EDL
Expand All @@ -116,6 +126,7 @@
"https://hydro1.gesdisc.eosdis.nasa.gov/data/GLDAS/GLDAS_NOAH10_M.2.0/1948/",
"https://e4ftl01.cr.usgs.gov//DP114/MOTA/MCD43A3.006/2000.02.24/MCD43A3.A2000055.h15v07.006.2016101151720.hdf.xml",
"https://daac.ornl.gov/daacdata/npp/grassland/NPP_BCN/data/bcn_cli.txt",
"https://data.asdc.earthdata.nasa.gov/asdc-prod-protected/FIELDCAMPAIGN/TRACE/TRACE-A_001/TRACE-A-tra11_90.m.Z",
]


Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_collection_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def test_query_can_find_cloud_provider():
# SEDAC does not have a cloud provider so it should default to the on prem provider
query = DataCollections().cloud_hosted(True).daac("SEDAC")
assert query.params["provider"] == "SEDAC"
query = DataCollections().daac("ASDC").cloud_hosted(True)
assert query.params["provider"] == "LARC_CLOUD"
query = DataCollections().cloud_hosted(True).daac("ASDC")
assert query.params["provider"] == "LARC_CLOUD"


def test_querybuilder_can_handle_doi():
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def test_store_can_create_s3_fsspec_session(self):
"GES_DISC",
"ASF",
"OBDAAC",
"ASDC",
]:
s3_fs = store.get_s3fs_session(daac=daac)
assert isinstance(s3_fs, s3fs.S3FileSystem)
Expand All @@ -123,6 +124,7 @@ def test_store_can_create_s3_fsspec_session(self):
"GES_DISC",
"ASF",
"OB_CLOUD",
"LARC_CLOUD",
]:
s3_fs = store.get_s3fs_session(provider=provider)
assert isinstance(s3_fs, s3fs.S3FileSystem)
Expand Down

0 comments on commit adfe8fa

Please sign in to comment.