Subset Dataset Across International Date Line

Subset Dataset Across International Date Line

Postby yiboj » Thu Oct 12, 2017 12:40 pm

Subset dataset across International Date Line (180 degree longitude) sometimes may be confusing if the longitude value is not continuous across the International Date Line, such as a jump from -180 to 180 degree. In the post, we show the examples about dealing with this issue.

Subset dataset in a small region from longitude 170 degree to -170 degree across International Date Line by using the following command from the PODAAC OPeNDAP server:

Code: Select all
>>> curl -g "https://podaac-opendap.jpl.nasa.gov/opendap/allData/ghrsst/data/GDS2/L4/GLOB/NCEI/AVHRR_OI/v2/2017/002/20170102120000-NCEI-L4_GHRSST-SSTblend-AVHRR_OI-GLOB-v02.0-fv02.0.nc.nc?analysed_sst[0:1:0][219:1:500][39:1:1400],analysis_error[0:1:0][219:1:500][39:1:1400],mask[0:1:0][219:1:500][39:1:1400],sea_ice_fraction[0:1:0][219:1:500][39:1:1400]" -o 20170102120000-NCEI-L4_GHRSST-SSTblend-AVHRR_OI-GLOB-v02.0-fv02.0_subset.nc


The contour plot of the subsetted file looks like this:
subset_1.png
subset_1.png (91.84 KiB) Viewed 13181 times


We then use NCO utilities command ncks to subset the dataset using the following command:

Code: Select all
>>>ncks -d lon,170.0,-170.0 -d lat,-35.,35. -l . ftp://podaac-ftp.jpl.nasa.gov/allData/ghrsst/data/GDS2/L4/GLOB/NCEI/AVHRR_OI/v2/2017/001/20170101120000-NCEI-L4_GHRSST-SSTblend-AVHRR_OI-GLOB-v02.0-fv02.0.nc out.nc


The contour plot of the subsetted file looks like this:
subset_2.png
subset_2.png (63.06 KiB) Viewed 13181 times
yiboj
 
Posts: 130
Joined: Mon Mar 30, 2015 11:22 am

Return to Data Recipes

cron