Re: Subsetting MUR-JPL-L4-GLOB-v4.1 data?
Posted: Tue Nov 21, 2023 7:45 pm America/New_York
Thanks for the last information. It worked.
but know, I have another issue.
In order to contextualize, I'm following this post (https://github.com/podaac/tutorials/blob/master/notebooks/opendap/MUR-OPeNDAP.ipynb)
1) my request is OK --> manager.add_password(None, endpoint, username, password)
r = requests.get('https://cmr.earthdata.nasa.gov/search/granules.umm_json?collection_concept_id=C1996881146-POCLOUD&temporal=2019-01-01T10:00:00Z,2019-01-05T00:00:00Z&pageSize=365')
r.status_code
Out[140]: <Response [200]>
2) Next, I got the opendap product...
'https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/GHRSST%20Level%204%20MUR%20Global%20Foundation%20Sea%20Surface%20Temperature%20Analysis%20(v4.1)/granules/20190101090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1'
3) and... I added the extension '.dap.nc4?dap4'
'https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/GHRSST%20Level%204%20MUR%20Global%20Foundation%20Sea%20Surface%20Temperature%20Analysis%20(v4.1)/granules/20190101090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.dap.nc4?dap4'
4) next...
required_variables = {'analysed_sst[0:1:0][000:1:9000][000:1:9000]',
'analysis_error[0:1:0][000:1:9000][000:1:9000]',
'lat[000:1:9000]',
'lon[000:1:9000]',
'time[0:1:0]'}
5) and finally (here I have the issue)
basename = os.path.basename(data_url)
request_params = {'dap4.ce': ';'.join(required_variables)}
response = requests.get(data_url, params=request_params, headers={'Accept-Encoding': 'identity'})
response
<Response [401]>
response.text
Out[154]: 'HTTP Basic: Access denied.\n'
Please, some sugestion ?
but know, I have another issue.
In order to contextualize, I'm following this post (https://github.com/podaac/tutorials/blob/master/notebooks/opendap/MUR-OPeNDAP.ipynb)
1) my request is OK --> manager.add_password(None, endpoint, username, password)
r = requests.get('https://cmr.earthdata.nasa.gov/search/granules.umm_json?collection_concept_id=C1996881146-POCLOUD&temporal=2019-01-01T10:00:00Z,2019-01-05T00:00:00Z&pageSize=365')
r.status_code
Out[140]: <Response [200]>
2) Next, I got the opendap product...
'https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/GHRSST%20Level%204%20MUR%20Global%20Foundation%20Sea%20Surface%20Temperature%20Analysis%20(v4.1)/granules/20190101090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1'
3) and... I added the extension '.dap.nc4?dap4'
'https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/GHRSST%20Level%204%20MUR%20Global%20Foundation%20Sea%20Surface%20Temperature%20Analysis%20(v4.1)/granules/20190101090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.dap.nc4?dap4'
4) next...
required_variables = {'analysed_sst[0:1:0][000:1:9000][000:1:9000]',
'analysis_error[0:1:0][000:1:9000][000:1:9000]',
'lat[000:1:9000]',
'lon[000:1:9000]',
'time[0:1:0]'}
5) and finally (here I have the issue)
basename = os.path.basename(data_url)
request_params = {'dap4.ce': ';'.join(required_variables)}
response = requests.get(data_url, params=request_params, headers={'Accept-Encoding': 'identity'})
response
<Response [401]>
response.text
Out[154]: 'HTTP Basic: Access denied.\n'
Please, some sugestion ?