Using NetCDF GHRSTT files in R

Using NetCDF GHRSTT files in R

Postby kr0401 » Sun Jan 10, 2021 12:17 pm

Hi all,

Looking to pull SST data for specific lat longs over a 3 year period using R, with the intention of having the data in simple csv format for excel, to carry out some basic stats. I've managed to access the SST data for individual days since the nc files are stored in individual folders (1 for each day of the year). Looking for a quick way to extract all SST data from all days in the 3 year period without having to extract day by day.

The dataset I'm using is 'GHRSST Level 4 K10_SST Global 1 meter Sea Surface Temperature Analysis'
and can be found at: 'https://podaac.jpl.nasa.gov/dataset/NAVO-L4HR1m-GLOB-K10_SST?ids=Measurement:Variable:ProcessingLevel:Platform&values=OCEAN%20TEMPERATURE:SEA%20SURFACE%20TEMPERATURE:*4*:Aqua'

Thanks in advance
kr0401
 
Posts: 3
Joined: Sun Jan 10, 2021 12:04 pm

Re: Using NetCDF GHRSTT files in R

Postby wenhaoli » Mon Jan 11, 2021 10:17 am

Hi,

PO.DAAC provides the netCDF file reader in R. You could try to use it as starting point for extracting the GHRSST netCDF datasets. Please download the script from https://podaac-tools.jpl.nasa.gov/drive ... _readers/R. Let's know if you have more questions.

Best Regards,
wenhaoli
 
Posts: 31
Joined: Wed Oct 26, 2016 1:57 pm

Re: Using NetCDF GHRSTT files in R

Postby kr0401 » Thu Jan 14, 2021 7:49 am

Hi,
Thank you for your reply.
This is a useful document to have when working with NetCDF files in R, however it works on the assumption the user is only processing one file but I require to process around 1000 in one go. Any ideas?
Thanks
kr0401
 
Posts: 3
Joined: Sun Jan 10, 2021 12:04 pm

Re: Using NetCDF GHRSTT files in R

Postby wenhaoli » Thu Jan 14, 2021 12:13 pm

Hi,

PO.DAAC has developed many recipes for downloading multiple granules. For example:
1. Multiple File Download from PO.DAAC Drive Using Python (viewtopic.php?f=5&t=1127)
2. Download Multiple Data Files from PODAAC Drive Using curl (viewtopic.php?f=5&t=946)
3. Download Multiple Data Files from PODAAC Drive Using wget (viewtopic.php?f=85&t=452)
You could further browse the PO.DAAC Forum page (viewforum.php?f=5&start=50) for more recipes.

For your own needs, you may want to write a wrapper over the PO.DAAC netCDF reader module to aggregate multiple granules.

Thanks,
wenhaoli
 
Posts: 31
Joined: Wed Oct 26, 2016 1:57 pm

Re: Using NetCDF GHRSTT files in R

Postby kr0401 » Mon Feb 01, 2021 7:01 am

Thanks wenhaoli,
I ended up using SST data obtained from (Copernicus marine service) CMS, which allows a download of one netcdf file that covers the full time series I required. This way I was still able to use R, which saved the time of learning new software
Thanks,
Karl
kr0401
 
Posts: 3
Joined: Sun Jan 10, 2021 12:04 pm


Return to General Questions