[Thread Prev][Thread Next][Index]
Re: adding non-COARDS netCDF file
Whoa there John!
You should try to look at this file with Ferret first and see what you
get.
You've defined a grid in the xml so that LAS can present an interface,
but the dataset is not self-documenting enough for Ferret to know what
to do with it. You're going to have to write a custom initialization
script for Ferret that assigns the data to an appropriate grid. You may
get some ideas from this FAQ:
http://ferret.wrc.noaa.gov/Ferret/LAS/FAQ/initializing_data.htm
Good luck!
-- Jon
John C Cartwright wrote:
>
> Hello All,
> I'm trying to add a netCDF file that contains a single simple grid and
> has the following header:
>
> netcdf gom30sec {
> dimensions:
> side = 2 ;
> xysize = 1817401 ;
> variables:
> double x_range(side) ;
> x_range:units = "" ;
> double y_range(side) ;
> y_range:units = "" ;
> double z_range(side) ;
> z_range:units = "" ;
> double spacing(side) ;
> int dimension(side) ;
> float z(xysize) ;
> z:scale_factor = 1. ;
> z:add_offset = 0. ;
> z:node_offset = 0 ;
>
> // global attributes:
> :title = "" ;
> :source = "" ;
> }
>
> I made the following entries into $las/server/las.xml:
>
> <datasets>
> <gom30sec_cdf name="Gulf of Mexico Bathymetry"
> url="file:/data/incoming/gom30sec.nc" doc="">
> <variables>
> <z_range units="METERS" name="bathymetry/topography">
> <link match="/lasdata/grids/gom30sec_cdf_grid" />
> </z_range>
> </variables>
> </gom30sec_cdf>
> </datasets>
>
> <grids>
> <gom30sec_cdf_grid>
> <link match="/lasdata/axes/gom30sec_cdf_x" />
> <link match="/lasdata/axes/gom30sec_cdf_y" />
> </gom30sec_cdf_grid>
> </grids>
>
> <axes>
> <gom30sec_cdf_x units="degrees_east" type="x">
> <arange start="-98" step="0.00833" size="2161" />
> </gom30sec_cdf_x>
> <gom30sec_cdf_y units="degrees_north" type="y">
> <arange start="25" step="0.00833" size="841" />
> </gom30sec_cdf_y>
> </axes>
>
> However, although the dataset/variable shows up in the interface, when I
> try to get a xy slice of the full region, ferret dies seeming
> complaining about a range on the axis (attached is the debug file).
>
> Can anyone tell me what I'm doing wrong?
>
> Thanks!
>
> -- john
>
> ------------------------------------------------------------------------
> Browser = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311
>
> Dumping config file
> cache : 1
> error_file : log/errors
> ferret_ps_args : -server -batch
> log_file : log/access
> output_directory : output/
> custom_include : custom
> which_ferret : /usr/local/ferret/bin/ferret
> ferret_args : -gif -server
> debug_file : log/GenericLAS_debug.txt
> output_alias : /las-output/
> Got XML request:
> <?xml version="1.0"?><lasRequest href="file:las.xml"><link match="/lasdata/operations/shade" /><properties><ferret><format>shade</format><size>0.5</size><imgWidth>800</imgWidth><imgHeight>600</imgHeight></ferret><ui><varname>bathymetry/topography</varname><dsetname>Gulf of Mexico Bathymetry</dsetname><view>xy</view><configid>0</configid></ui></properties><args><link match="/lasdata/datasets/gom30sec_cdf/variables/z_range"></link><region><range type="x" low="-98.0" high="-80.0072"/><range type="y" low="25.0" high="31.9972"/></region></args></lasRequest>
> Region: -98.0 -80.0072 x
> Region: 25.0 31.9972 y
> ferret prop: HASH(0x8800820) =
> ferret prop: refmap_xhi = 279.9928
> ferret prop: view = xy
> ferret prop: refmap_yhi = 31.9972
> ferret prop: x_hi = 279.9928
> ferret prop: y_hi = 31.9972
> ferret prop: land_type = shade
> ferret prop: format = shade
> ferret prop: imgHeight = 600
> ferret prop: size = 0.5
> ferret prop: refmap_xlo = 262
> ferret prop: refmap_view = box
> ferret prop array: jnl_t = ()
> ferret prop: refmap_ylo = 25.0
> ferret prop: x_lo = 262
> ferret prop: fill_type = fill
> ferret prop: view_centered = no
> ferret prop: variable_name = z_range
> ferret prop array: jnl_x = (262,279.9928)
> ferret prop: y_lo = 25.0
> ferret prop array: jnl_y = (25.0,31.9972)
> ferret prop array: jnl_z = ()
> ferret prop: diag_direction = up
> ferret prop: imgWidth = 800
> ferret prop: dataset_name = /data/incoming/gom30sec.nc
> ferret prop: rank = 2
> Starting:/usr/local/ferret/bin/ferret -gif -server
> Got reply: NOAA/PMEL TMAP
> Program FERRET
> Version 5.22 - 07/27/00
> 03-Apr-02 11:57
>
> yes? Sent command: cancel mode verify
> Got reply: yes? Sent command: cancel mode interp
> Got reply: yes? Sent command: canc data/all
> Got reply: yes? Sent command: go std_initialize "/data/incoming/gom30sec.nc" "1" "1" "z_range"
> Got reply: yes? Sent command: set region/x="262":"279.9928"/y="25.0":"31.9972"/k=1/l=1
> Got reply: yes? Sent command: set win/size=0.5
> Got reply: yes? Aspect: 0.6
> Sent command: set win/asp=0.6
> Got reply: yes?
> Searching for template/journal file: custom/std_gif.tmpl
>
> Searching for template/journal file: custom/std_gif_xyref.jnl
>
> Searching for template/journal file: custom/std_gif.tmpl
>
> Searching for template/journal file: custom/std_gif_xyref.jnl
>
> Searching for template/journal file: jnls/std_gif.tmpl
>
> Running template file jnls/std_gif.tmpl
> template: props is: HASH(0x88d05e8) arg is: 'dataset_name' val is: /data/incoming/gom30sec.nc
> template: props is: HASH(0x88d05e8) arg is: 'variable_name' val is: z_range
> template: props is: HASH(0x88d05e8) arg is: 'fill_type' val is: fill
> template: props is: HASH(0x88d05e8) arg is: 'view' val is: xy
> template: props is: HASH(0x88d05e8) arg is: 'fill_levels' val is:
> template: props is: HASH(0x88d05e8) arg is: 'contour_levels' val is:
> template: props is: HASH(0x88d05e8) arg is: 'magnify' val is: 5
> template: props is: HASH(0x88d05e8) arg is: 'palette' val is:
> template: props is: HASH(0x88d05e8) arg is: 'draw_reference' val is: 1
> template: props is: HASH(0x88d05e8) arg is: 'do_shade' val is:
> template: props is: HASH(0x88d05e8) arg is: 'do_contour' val is: 1
> template: props is: HASH(0x88d05e8) arg is: 'do_overlay' val is:
> template: props is: HASH(0x88d05e8) arg is: 'rank' val is: 2
> template: props is: HASH(0x88d05e8) arg is: 'title' val is:
> template: props is: HASH(0x88d05e8) arg is: 'overlay_variable_name' val is:
> Sent command: GO "/tmp/lasgo211533655241.jnl"
> Got reply: **ERROR: illegal limits: "Z_RANGE" is not in the range X=262:280
> Axis extremes are X=0.5:2.5
> CONTOUR/FILL/levels=30/set z_range
> Command file, command group, or REPEAT execution aborted
> Error: transcript is
> Adding an acceptable error string: "*** NOTE: ".
> NOAA/PMEL TMAP
> Program FERRET
> Version 5.22 - 07/27/00
> 03-Apr-02 11:57
>
> yes? cancel mode verify
> yes? cancel mode interp
> yes? canc data/all
> yes? go std_initialize "/data/incoming/gom30sec.nc" "1" "1" "z_range"
> yes? set region/x="262":"279.9928"/y="25.0":"31.9972"/k=1/l=1
> yes? set win/size=0.5
> yes? set win/asp=0.6
> yes? GO "/tmp/lasgo211533655241.jnl"
> **ERROR: illegal limits: "Z_RANGE" is not in the range X=262:280
> Axis extremes are X=0.5:2.5
> CONTOUR/FILL/levels=30/set z_range
> Command file, command group, or REPEAT execution aborted
>
> killing...Waiting for program to exit...
> program exited...
> killing...Waiting for program to exit...
> program exited...
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement