[gradsusr] spatial plot form a time series of multiple stations

Thomas W. Collow tcollow at eden.rutgers.edu
Tue Oct 19 16:55:45 EDT 2010


I asked a similar question awhile back but perhaps did not make it clear enough what I am trying to do.

I have several ARM/CART files for soil moisture data for about 12 different stations over the central USA.  Each file is a netcdf file for 24 different times (every hour for one day).  I am able to template each of the files that are for the same station to make a time series say over one month.  So for each of the 12 different stations I can make a monthly time series.  What I would like to do is create a spatial plot of this data which would involve me taking one point from each of the 12 files and plotting it on a single map in GrADS.  Each point would have a different latitude and longitude depending on the file but it would be at the same time.  I have created a control file for each station which allows me to display the station time series in GrADS using the xdfopen command.  The command sdfopen did not work in opening the control file.  Also there was no latitude/ longitude dimension, only time and depth.  The latitude and longitude are known and are put in for the ydef and xdef parameters respectively.

Here is a control file for opening the time series of one station (ARM_E4)

DSET ^ARM_files/sgpswatsE4.b1.201008%d2.000700.cdf
OPTIONS template
OPTIONS zrev
TITLE ARM Data
UNDEF -9999
XDEF time 01 levels -98.329
YDEF time 01 levels 37.953
ZDEF depth 8 levels 175 125 85 60 35 25 15 5
TDEF time 720 linear 00Z01aug2010 1hr
VARS 2
watcont_W=>smw 8 99 water content west
watcont_E=>sme 8 99 water content east
ENDVARS

For station E9 (ARM_E9)
DSET ^ARM_files/sgpswatsE9.b1.201008%d2.000700.cdf
OPTIONS template
OPTIONS zrev
TITLE ARM Data
UNDEF -9999
XDEF time 01 levels -97.266
YDEF time 01 levels 37.133
ZDEF depth 8 levels 175 125 85 60 35 25 15 5
TDEF time 720 linear 00Z01aug2010 1hr
VARS 2
watcont_W=>smw 8 99 water content west
watcont_E=>sme 8 99 water content east
ENDVARS

This is one approach I took, here is a GrADS script I tried to use to plot these two stations on a spatial map.

reinit
set mpdset hires
xdfopen ARM_E4
xdfopen ARM_E9
set lat 25 45
set lon -105 -85
set T 1
set z 8
set gxout grfill
d smw
d smw.2


However, all this did was plot two points on a map in the right locations but GrADS is treating them as entirely different variables and it seems two maps were made with one map on top of the other.  Therefore it looks like one map but it really isn?t.  How do I treat these as one variable on one map for two or more stations?  Thanks

Tom




More information about the gradsusr mailing list