Sorry for the delay in responding to your previous post.
Stuart Maclean wrote:
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
Right now, there's no way from the command line to change the contour
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">
The top of the stack trace is this:
We'll look into this problem.
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.
When you save a bundle as a JNLP file, the bundle (.xidv) gets
base64 encoded and placed in the JNLP file. You can also
have the bundle reference an external bundle, so I think a better
solution would be to create the bundle as an xidv file and
have the JNLP file reference that. To do this:
- load in your datasource, set up the displays, etc.
- save the display as a bundle.
- modify the IDV's default JNLP file to point to the bundle.
- from the IDV webstart page:
right click on the link to start the IDV and save the JNLP
file to your local disk.
- edit the JNLP file as follows:
where %pathtobundle% would be the path to the bundle file. You
could use this as a template for use with multiple bundle files.
Now, for the bundle, you could do one of two things:
- have a symbolic link to the latest model file which
(e.g. latest.nc) and use that when you create the bundle.
That way, you wouldn't have to edit the bundle (we don't
recommend editing bundles).
- edit the bundle every time, modifying the data source
Would this work for you?