[gradsusr] handling non-world coordinates
Jennifer Adams
jma at cola.iges.org
Wed Sep 24 07:56:01 EDT 2014
Hi, Jeff —
Your data file has 4 dimensions, so you can map your data’s dimensions to the world coordinate grid dimensions and not worry about putting array indices in your variable declarations. May I suggest the following:
xdef 803 linear 1 1
ydef 603 linear 1 1
zdef 5 linear 1 1
edef 3 names 1 2 3
tdef 1 linear 01jan0001 1mo
vars 2
forecast_PoP=>fcst 5 e,z,y,x forecast PoP
observed_PoP=>obs 5 z,y,x observed PoP
endvars
It is more confusing to use T for a dimension that isn’t really a time coordinate, so I have left that one unused, with a default time and a size of 1.
—Jennifer
On Sep 23, 2014, at 11:42 AM, Jeff Duda <jeffduda319 at gmail.com> wrote:
> Hello,
> I have some netCDF files that I created using my own FORTRAN code. I wish to display some arrays in those files that have some non-world-coordinate dimensions. For example, my data contain probabilities of precipitation from three different ensembles using five different precipitation accumulation thresholds. Therefore, I have two non-world-coordinate dimensions. I see in the documentation how to handle one (see below):
> If your data file contains a variable that also varies in a non-world-coordinate dimension (e.g. histogram interval, spectral band, ensemble number) then you can put a non-negative integer in the list of varying dimensions that will become the array index of the extra dimension. For example:
>
> VAR=>hist0 0 0,y,x First historgram interval for VAR
> VAR=>hist1 0 1,y,x Second historgram interval for VAR
> VAR=>hist2 0 2,y,x Third histogram interval for VAR
>
> Another option in this example would be to fill the unused Z axis with the histogram intervals:
>
> zdef 3 linear 1 1
> ...
> VAR=>hist 3 z,y,x VAR Histogram
>
> In this case, it would appear to GrADS that variable 'hist' varies in Z, but the user would have to remember that the Z levels correspond to histogram intervals. The latter technique makes it easier to slice through the data, but is not the most accurate representation. And if you don't have an unsued world-coordinate axis available, then you still have a way to access your data.
>
> However, I am unsure of how to handle two. Let alone, if you have no "free" world coordinates, how do you reference these other dimensions when displaying the grids in Grads?
>
> Here is an ncdump of one of my files:
>
> netcdf \0527_neighborhood_PoP_007200 {
> dimensions:
> X = 803 ;
> Y = 603 ;
> threshold = 5 ;
> ensemble = 3 ;
> variables:
> float forecast_PoP(ensemble, threshold, Y, X) ;
> float observed_PoP(threshold, Y, X) ;
> }
>
> Jeff Duda
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140924/f67a2c14/attachment.html
More information about the gradsusr
mailing list