go dods_winds
 
 
!      **********************************************************
!        DEMO: Using Ferret and DODS to access remote ocean data
!      **********************************************************
 
! Note: All data access is "live" from the distributed sources of data
 
! First we will examine the COADS dataset from NOAA's
! Climate Diagnostics Center (CDC) in Boulder, Colorado
 
! Open the data set
use "http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/coads/1degree/global/enh/uwnd.mean.nc"

! Plot global 1x1 degree Zonal Wind from COADS
SHADE/t=1-jan-1997/levels=c/palette=centered uwnd

GO land
 
! Note the westerly winds in the western Tropical Pacific
 
! Mark a blue line to help explain the next plot
PLOT/COLOR=blue/THICK/LINE/nolab/over/vs {130,270},{0,0}
 
PAUSE


!      *********************************************************
 
! Next we will plot the evolution of wind at the Equator (an XT section)
 
SET REGION/x=130e:80w/t=1-dec-1995:1-dec-1997
SHADE/levels=c/palette=centered uwnd[y=.5s]
 
! Notice how sparse it is!
 
PAUSE


!      *********************************************************
 
! Improve the plot by averaging 2s to 2n and limited zonal hole filling
FILL/levels=c/palette=centered uwnd[y=2s:2n@ave,x=@fav:5]
 
! We see clearly a major westerly wind burst event at the start of 1997
! -- pre-cursor to the '97-'98 El Nino.
 
PAUSE


!      *********************************************************
! Lets explore this further through the TAO data set from NOAA's
! Pacific Marine Environmental Laboratory (PMEL) in Seattle, Washington
 
USE "http://ferret.pmel.noaa.gov/cgi-bin/nph-dods/data/TAO_gridded.nc"

PLOT/t=1-dec-1995:1-dec-1997 uwind[k=2,x=165e,y=0]
 
! Note the gap in the wind series.
! Lets look at other sources of wind data that might be available to fill it

 
PAUSE


!      *********************************************************
 
! Compare this to the NCEP global daily analysis from CDC in Boulder, Colorado
use "http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/ncep/uwnd.1996.nc"
PLOT/COLOR=blue/t=1-dec-1995:1-dec-1997/over  uwnd[x=165e,y=0,k=13]
 
PAUSE


!      *********************************************************
 
! Lets fill the gap using NCEP winds
! We define a new variable, "filled_uwind"
LET filled_uwind = MISSING( uwind[k=2,D=TAO_gridded],  uwnd[k=13,G=uwind[D=TAO_gridded],GZ=uwnd,D=uwnd.1996.nc])
SET VARIABLE/title="TAO ZONAL WIND gap-filled by NCEP"/units="m/s" filled_uwind
PLOT/t=1-dec-1995:1-dec-1997  filled_uwind[x=165e,y=0]
 
PAUSE


!      *********************************************************
 
! Lets compare the filled TAO wind with the FSU wind pseudo-stress fields
! To obtain pseudo-stresses we require the meridional component of NCEP winds
use "http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/ncep/vwnd.1996.nc"

LET filled_vwind = MISSING( vwind[k=2,D=TAO_gridded],  vwnd[k=13,G=uwind[D=TAO_gridded],GZ=vwnd,D=vwnd.1996.nc])
SET VARIABLE/title="TAO MERIDIONAL WIND gap-filled by NCEP"/units="m/s" filled_vwind
 
! Define the pseudo-stress and plot it
LET filled_pstress = filled_uwind * (filled_uwind^2 + filled_vwind^2)^0.5
PLOT/t=1-dec-1995:1-dec-1997  filled_pstress[x=165e,y=0]
 
PAUSE


!      *********************************************************
 
 
! To conclude, we compute the monthly average of the TAO pseudo-stresses
! and plot it with the FSU pseudo-stresses from Tallahassee, Florida
set data "http://www.coaps.fsu.edu/cgi-bin/dods/nph-nc/dods_data/FSU_WINDS_PAC/pac_pstress_6199.nc"
PLOT/t=1-dec-1995:1-dec-1997  wu[x=165e,y=0],  filled_pstress[x=165e,y=0,gt=wu@ave]
 


Last modified 23-May-2006