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

Re: 20030327:Integrated Data Viewer (IDV) problems (cont.)



Hans-Juergen,

> Do you know any functioning tool that combines parameters coming from 
> different
> netCDF files into a common one?

No but that is a good idea and I will ask here about one. If there
is such a thing, someone at Unidata will know.

> > ... makeVector(a,b) is a defined method in the
> > IDV Jython libraries. You can see the Jyhton library supplied
> > with your IDV with the menu selection Edit->Jython library,
> > and in the window that pops up, click on the "System Library 1" tab.
> 
> That is what the Users Guide also told me. But the problem is, there is no
> Jython System Library, only the User Library.

I see that this problem is our mistake.  It turns out that 
in the released version IDV the jar file did not include
the default.py file with the Jython System library.  I apologize
for misleading you and wasting your time and effort about an omission
we should have detected here first.  

The next release of the IDV will have the Jython system library, due
in late April. The few system Jython methods we do have are
included below. You can cut and paste this text into any
beta5 IDV in your user Jython library, so you don't need to
get more code.

> I installed and downloaded IDV from the following sources:
> 1.)  http://www.cdc.noaa.gov/PublicData/tools.html#idv
> here you can launch IDV directly if Java WebStart is installed on the PC

Did you know Unidata provides IDV by Web Start too?
http://www.unidata.ucar.edu/projects/metapps/webstart/IDV/
I expect you do, but your note about the CDC web site might suggest
Web Start for IDV was new to you.

Stuart 


def makeVector(a,b):
  from ucar.unidata.data.grid.DerivedGridFactory import *
  return DerivedGridFactory.createWindVectors(a,b)


def extractPressureFromNWPGrid(fieldimpl):
  """get pressure coordinate grid from a VisAD FieldImpl 
     (a time series of one or more FlatFields);
     user must be sure input is a suitable FlatField. """
  #import methods from
  from ucar.unidata.data.grid.DerivedGridFactory import *
  #import FlatField and FieldImpl class
  from visad.FlatField import *
  from visad.FieldImpl import *
  ff = fieldimpl.getSample(0)
  return DerivedGridFactory.createPressureGridFromDomain(ff)


def extractLatitudeFromNWPGrid(fieldimpl):
  """get the latitude coordinate grid from a 3D VisAD FieldImpl 
     (a time series of one or more FlatFields);
     user must be sure input is a suitable FlatField. """
  #import methods from
  from ucar.unidata.data.grid.DerivedGridFactory import *
  from ucar.unidata.data.grid.GridUtil import *
  #import FlatField and FieldImpl class
  from visad.FieldImpl import *
  ff = DerivedGridFactory.getLatitudeGrid(fieldimpl)
  #ff2 = GridUtil.sliceAtLevel(ff, l000.0)
  return ff


def getNthTimeGrid(fieldimpl, N):
  """get Nth grid in time series fieldimpl, a VisAD FieldImpl;
     user must be sure input is a suitable data field. 
     returns a FlatField. 
     N is an integer, >=0, <= max index of grid time series. """
  #import FlatField and FieldImpl class
  from visad.FlatField import *
  from visad.FieldImpl import *
  # print causes error : print " get sample N = "+N
  #dumpTypes(fieldimpl)  #this does print to console ok
  #trap bad values of N
  if N<0 :
    N = 0
  ff = fieldimpl.getSample(N)
  return ff


def getSliceAtLevel(fieldimpl, level) :
  """ extract a 2D horizontal slice from a 3D grid at "Level."
      level is a real number; must be appropriate for the grid.
      param fieldimpl is a VisAD FieldImpl which may have
      one or more time steps.  """
  #import methods from
  from ucar.unidata.data.grid.GridUtil import *
  from visad.FieldImpl import *
  #level = 500.0 #level in units known by the grid
  ff = sliceAtLevel(fieldimpl, level)
  return ff

> > > Hans-Juergen
> > > > > >
> > > >
> > ****************************************************************************
> > > > > > **
> > > > > > > *                                        \
> > > > > > *
> > > > > > > *               III  M   M  K   K         \  Dr. Hans-Juergen
> > Panitz
> > > > > > *
> > > > > > > *                I   MM MM  K  K           \
> > > > > > *
> > > > > > > *                I   M M M  KKK             \  E-mail:
> > > > > > *
> > > > > > > *                I   M   M  K  K             \  address@hidden
> > > > > > *
> > > > > > > *               III  M   M  K   K             \
> > > > > > *
> > > > > > > * postal address:                              \
> > > > > > *
> > > > > > > * Forschungszentrum Karlsruhe                   \   Phone:
> > > > > > *
> > > > > > > * Institut fuer Meteorologie und Klimaforschung  \
> > +49-7247-82-2802
> > > > > > *
> > > > > > > * Hermann-von-Helmholtz-Platz 1                   \ Fax:
> > > > > > *
> > > > > > > * D-76344 Eggenstein-Leopoldshafen                 \
> > +49-7247-82-4377
> > > > > > *
> > > > > > > * Germany                                           \
> > > > > >

> --
> ******************************************************************************
> *                                        \                                   *
> *               III  M   M  K   K         \  Dr. Hans-Juergen Panitz         *
> *                I   MM MM  K  K           \                                 *
> *                I   M M M  KKK             \  E-mail:                       *
> *                I   M   M  K  K             \  address@hidden            *
> *               III  M   M  K   K             \                              *
> * postal address:                              \                             *
> * Forschungszentrum Karlsruhe                   \   Phone:                   *
> * Institut fuer Meteorologie und Klimaforschung  \  +49-7247-82-2802         *
> * Hermann-von-Helmholtz-Platz 1                   \ Fax:                     *
> * D-76344 Eggenstein-Leopoldshafen                 \  +49-7247-82-4377       *
> * Germany                                           \
> 
> ------- End of Forwarded Message

****************************************************************************
Unidata User Support                                    UCAR Unidata Program
303 497 8643                                                  P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata WWW Service                        http://www.unidata.ucar.edu/     
****************************************************************************