bundles, scripts question

I'm using 1.3b2, on Linux.

I am trying to automate/script the construction of a jnlp bundle file,
so that the end user can just click on a url and see what I've prepared.
The data is a max wind speed field from a forecast model, with 24 time
steps, for IDV viewing as an animation. Each day as new data arrives, I'd like to re-write the bundle to include the new data (actually a change in url to a http web server where the new data will be)


I have looked at IDV scripts but they seem to lack some features, e.g
how do I specify fields and times? and controls ?

What I would like to do is this

0. generate today's data, in a netcdf file.  This I can do, and is
outside the domain of IDV, e.g. shell script

1. via a cron-run IDV invocation with an isl parameter, start IDV, load
the nc file, create a display, select a field to display and a display
type.  set some contour levels in the control

2 save to a jnlp bundle

In step 1, I can automate the composition of the .isl file to include
the correct nc file name.

So far I have used the datasource and display isl tags, and I get
errors.  The isl currently looks like this

<isl debug="true" offscreen="false">

<datasource url="2006062900.bis.nc" type="FILE.NETCDF">
  <display type="planviewcontourfilled"/>
</datasource>


</isl>

The top of the stack trace is this:


ava.lang.NullPointerException
        at ucar.unidata.data.DataInstance.getData(DataInstance.java:216)
        at ucar.unidata.data.DataInstance.getData(DataInstance.java:181)
        at 
ucar.unidata.data.grid.GridDataInstance.init(GridDataInstance.java:176)
        at
ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:138)
        at
ucar.unidata.idv.control.GridDisplayControl.doMakeDataInstance(GridDisplayControl.java:216)
        at
ucar.unidata.idv.control.DisplayControlImpl.initializeDataInstance(DisplayControlImpl.java:2509)
        at
ucar.unidata.idv.control.DisplayControlImpl.setData(DisplayControlImpl.java:2491)
        at
ucar.unidata.idv.control.PlanViewControl.setData(PlanViewControl.java:390)
        at
ucar.unidata.idv.control.ContourPlanViewControl.setData(ContourPlanViewControl.java:112)
        at 
ucar.unidata.idv.control.PlanViewControl.init(PlanViewControl.java:307)
        
The .nc file loads fine into non-script mode IDV.


I wonder if a non-scripting solution would work.  With a template bundle
file, edit the datasource content, and then somehow convert that bundle
xml to the jnlp style of bundle?  I did see a ref to this idea on the
list. Does it work ? I found a base64 encoder online, but when I run it on a xidv bundle file, its output is not the same as the base64 encoded bundle data in the jnlp bundle which IDV can produce. I was hoping to use a xidv template, replace url strings and encode using the base64 encoder, then add the header and footer jnlp fragments.


Any help gratefully appreciated

Stuart



  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: