Using Python to subset large gridded datasets (v2)

Re: Using Python to subset large gridded datasets (v2)

Postby gssanjeev_126 » Thu Apr 04, 2019 2:40 am

I am unable to locate subset_dataset.py file.
Can you please provide the python script.

My interest is SMAP L2 dataset which is in .h5 file type
gssanjeev_126
 
Posts: 2
Joined: Thu Apr 04, 2019 2:35 am

Re: Using Python to subset large gridded datasets (v2)

Postby yiboj » Mon Apr 08, 2019 7:49 am

Thank you for your inquiry.

Here is the link to the ftp site, please check.

ftp://podaac.jpl.nasa.gov/allData/commo ... dataset.py

Thank you for your patience.

PODAAC Team
yiboj
 
Posts: 80
Joined: Mon Mar 30, 2015 11:22 am

Re: Using Python to subset large gridded datasets (v2)

Postby gssanjeev_126 » Mon Apr 08, 2019 8:13 pm

Thank you for your response.
gssanjeev_126
 
Posts: 2
Joined: Thu Apr 04, 2019 2:35 am

Re: Using Python to subset large gridded datasets (v2)

Postby sal13 » Fri May 17, 2019 12:24 pm

Hello. Thank you very much for the code to download a subset from large gridded datasets. I am new to Python and I am trying to download from the OSTM_L2_OST_OGDR_GPS. I tried the following command:
python subset_dataset_l2.py -s 20090601 -f 20190501 -b -90 -60 10 30 -x OSTM_L2_OST_OGDR_GPS

Please wait while program searching for the granules ...


Longitude range: -90.000000 to -60.000000
Latitude range: 10.000000 to 30.000000

OK to download? [yes or no]: yes
Traceback (most recent call last):
File "subset_dataset_l2.py", line 266, in <module>
standalone_main()
File "subset_dataset_l2.py", line 233, in standalone_main
selindex = np.where( (dataset.lon > box[0]) & (dataset.lon < box[1]) & (dataset.lat > box[2]) & (dataset.lat < box[3]) )
TypeError: '>' not supported between instances of 'GridType' and 'float'

Can you guide me in how to fix this error? Thanks.
sal13
 
Posts: 1
Joined: Fri May 17, 2019 12:18 pm

Previous

Return to Data Access and Services