[Thread Prev][Thread Next][Index]

Re: Using Dimension Variable



Hi Steve,

I think I just ran into the sane question yesterday.  NetCDF coordinate variables (Dimension
variable) are not used the same as other variables in Ferret.  In order to use the values of
the dimension variable in this way, you must have a user-defined variable.

Try:

let valz = z[gz=zpos]
let depth_at_sigma = valz * depth

I hope this works.

Joe
--------------------------------------------

Steve Cousins wrote:

> I'm trying to create a new 3D variable based on two variables in a NetCDF file as follows:
>
>    let depth_at_sigma = zpos * depth
>
> but it produces:
>
>     **ERROR: variable unknown or not in data set: 'zpos'
>
> zpos is a Dimension variable.  The header for the NetCDF file looks like:
>
> netcdf pom.24day {
> dimensions:
>         xpos = 151 ;
>         ypos = 121 ;
>         zpos = 15 ;
>         time = UNLIMITED ; // (46 currently)
> variables:
>         float xpos(xpos) ;
>                 xpos:long_name = "Columns" ;
>                 xpos:units = "column" ;
>         float ypos(ypos) ;
>                 ypos:long_name = "Rows" ;
>                 ypos:units = "row" ;
>         float zpos(zpos) ;
>                 zpos:long_name = "Layer" ;
>                 zpos:units = "sigma_level" ;
>         float time(time) ;
>                 time:units = "days since 30-MAR-1998 00:00:00" ;
>                 time:time_origin = "30-MAR-1998 00:00:0" ;
>                 time:modulo = " " ;
>         float depth(ypos, xpos) ;
>                 depth:valid_range = 0.f, 5000.f ;
>                 depth:long_name = "Bathymetry" ;
>                 depth:units = "meters" ;
>                 depth:missing_value = -99999.f ;
>
> Is there a way for me to use this variable in the way I want?
>
> Thanks,
>
> Steve
> ________________________________________________
>  Steve Cousins                        Email: cousins@umit.maine.edu
>  Research Associate                 Phone: (207) 581-4302
>  Ocean Modeling Group
>  School of Marine Sciences      208 Libby Hall,
>  University of Maine                Orono ME 04469

--
Joseph McLean
NOAA/PMEL/TMAP
(206)526-4286




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement