GrADS

How to use the OPeNDAP server in GrADS.

The following explains the steps of loading data served by OPeNDAP using GrADS.

Download and install GrADS (if needed):

Start GrADS using gradsdods which is included in version 1.8 and higher:

Load data using sdfopen and proceed as you normally would:
Note: * operator as comments.

    * Opens the DODS served data.
ga->  sdfopen http://apdrc.soest.hawaii.edu/dods/public_data/NLOM/nlom_ssh
ga-> 
ga-> 
ga-> 
ga-> 
ga-> 
ga-> 
ga-> 
ga-> 
ga-> 
 
 
q dims
q file
set lat 18 24
set lon 195 207
set time 03OCT04
set gxout shaded
d ssh
run cbarn.gs
draw title NLOM 1/16 degree Sea Surface Height [cm] October 3, 2004
* Returns datasets spatial and temporal information.
* Gives variable name(s).
* Specify the desired latitude range
* Specify the desired longitude range
* Specify the desired time
* Choose a shaded contour plot
* Plot sea surface height
* Draw colorbar
* Draw title


Or use script.gs as described below with GrADS command: gradsdods -lc script.gs

* Opens the DODS served data.
'sdfopen http://apdrc.soest.hawaii.edu/dods/public_data/NLOM/nlom_ssh'
* Returns datasets spatial and temporal information.
'q dims'
* Gives variable name(s).
'q file'
* Specify the desired latitude range
'set lat 18 24'
* Specify the desired longitude range
'set lon 195 207'
* Specify the desired time
'set time 03OCT04'
* Choose a shaded contour plot
'set gxout shaded'
* Plot sea surface height
'd ssh'
* Draw colorbar
'run cbarn.gs'
* Draw title
'draw title NLOM 1/16 degree Sea Surface Height [cm] October 3, 2004'


Downloading a subset of the data is popular. Please be mindful of the size of the downloads especially for high resolution datasets. Load data using the URL, specify a subset and save a netcdf file:
Note: * indicates a comment.

Start opengrads or grads with dap support:

ga-> sdfopen http://apdrc.soest.hawaii.edu/dods/public_data/Reanalysis_Data/ERA5/daily_3d/U_component_of_wind

ga-> 'q dims'* Returns datasets spatial and temporal information.
ga-> 'q file'* Gives variable name(s).
ga-> 'set lat 18 24'* Specify the desired latitude range
ga-> 'set lon 195 207'* Specify the desired longitude range
ga-> 'set lev 850 '* Specify the 850mb level
ga-> 'set time 01Jun07 30Jun07'* Specify the desired time
ga-> define uvel = u* Define a new variable
ga-> set sdfwrite era5_jun07.nc* netcdf file era5_jun07.nc
ga-> sdfwrite uvel* write the U subset

The result will be a netcdf file called era5_jun07 with the variable uvel.