[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #TQX-759446]: RE: enhancing CrawlableDatasetDods and THREDDS



Hi Valentijn,

Your NcML isn't very far off the mark. The problem is that you are creating new 
variables without defining any data. To get the data into IDV, you can either 
1) leave the variables with their existing names and add attributes for units 
and such or 2) rename the existing dimensions and variables then add attributes 
for units and such. I'll go through both options and attach the resulting NcML 
files.

Here's the process I went through for option one:

1) I opened the data file in the ToolsUI "Viewer" tab for a quick look at what 
the data looks like.

2) I then open the data file in the "NcML" tab and start editing (You can used 
the "NcML" tab to edit the NcML. I prefer to use an XML editor so I saved the 
NcML to disk and edited it outside of ToolsUI).

3) First I removed the dimension declarations and a bunch of attributes. All of 
this information will come from the data file. (We've found that it is best to 
remove all the things you can that you aren't changing. For one, if it doesn't 
match the data file, things will break in strange ways. But also, it makes the 
intent of the NcML clear.)

4) Then I added your title global attribute and long_name and units attributes 
for all the variables as well as your standard_name for the z variable.

The results are in the first attached file (etopo2_2006apr-Ethan1.ncml).

For the second option (renaming dimensions and variables), I edited the NcML 
from above as follows:

1) Add dimension elements to rename the existing dimensions:
  <dimension name="longitude" orgName="x" />
  <dimension name="latitude" orgName="y" />

2) Rename the variables and change their shape to use the renamed dimensions, 
e.g.:
  <variable name="longitude" orgName="x" shape="longitude"> ... </variable>
 
3) The last thing I did was to remove the scale_factor and add_offset 
attributes in the z/altitude variable. If they are given, they will be used to 
scale/offset the data. Since the values are 1.0 and 0.0 which doesn't actually 
change the data. It is best to remove them so all that computation is not 
performed.

The results of this are in the second file (etopo2_2006apr-Ethan2.ncml).

Hope this helps,

Ethan


Ticket Details
===================
Ticket ID: TQX-759446
Department: Support THREDDS
Priority: Normal
Status: Closed