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

[IDV #SLF-112254]: problems in using formula



Bonjour Alain,

Here is the correct formula: (make2D(SRH)*CAPE)/160000

Unfortunately, arriving at this formula requires some knowledge of the
inner data representations of the IDV.

The problem was not associated with units as I had originally
believed. Rather the formula was multiplying a 2D field with a 3D
field but with only *one* level. We can see this fact below. Note the
domain dimension is 3 but the manifold dimension is 2. To fix this
problem, we simply need to call "make2D".

Cordialement,

Unidata IDV Support

---SRH-----
FieldImpl
  Type: (Time -> ((x[unit:km], y[unit:km], alti[unit:m]) -> 
Storm_relative_helicity_height_above_ground_layer[unit:J/kg]))
  DomainSet:
    SingletonSet: (2014-03-16 16:00:00Z)  Range value 0:
    FlatField
      Type: ((x[unit:km], y[unit:km], alti[unit:m]) -> 
Storm_relative_helicity_height_above_ground_layer[unit:J/kg])
      DomainSet:
        visad.Gridded3DSet: DomainDimension = 3 ManifoldDimension = 2 Length = 
22833
          ManifoldDimension 0: Length = 177
          ManifoldDimension 1: Length = 129
          DomainDimension 0: Range = -255.0486 to 272.9514
          DomainDimension 1: Range = 68.98529 to 452.9853
          DomainDimension 2: Range = 1500.0 to 1500.0
      RangeSet[0]:
        FloatSet: Dimension = 1 


---CAPE-----
FieldImpl
  Type: (Time -> ((x[unit:km], y[unit:km]) -> 
Convective_available_potential_energy_surface[unit:J/kg]))
  DomainSet:
    SingletonSet: (2014-03-16 16:00:00Z)  Range value 0:
    FlatField
      Type: ((x[unit:km], y[unit:km]) -> 
Convective_available_potential_energy_surface[unit:J/kg])
      DomainSet:
        Linear2DSet: Length = 22833
          Dimension 1: Length = 177 Range = -255.04859924316406 to 
272.9513854980469
          Dimension 2: Length = 129 Range = 68.98529052734375 to 
452.98529052734375
      RangeSet[0]:
        FloatSet: Dimension = 1

> Hello !
> Thanks a lot for your support,
> I have just uploaded the data files on your server. The filename is
> "currentAF_d02.grb2".
> 
> Here are the units of the variables :
> 
> SRH : m2.s-2
> CAPE : J.kg-1
> 
> Bonsoir,
> 
> Alain Ferragut
> 
> 
> Le 17/03/2014 18:08, Unidata IDV Support a écrit :
> > Bonjour Alain,
> >
> > This problem is likely related to units.
> >
> > We are going to need more information about the WRF data. In the
> > formula what units are you expecting for SRH and CAPE?
> >
> > Also, please upload the WRF file here:
> >
> > http://motherlode.ucar.edu/repository/alias/idvupload
> >
> > Let us know when they are uploaded and the names of the data files.
> >
> > Cordialement,
> >
> > Unidata IDV Support
> >
> >> Full Name: Alain FERRAGUT
> >> Email Address: address@hidden
> >> Organization: none
> >> Package Version: 3.0 build date:2011-08-29 16:38 UTC
> >> Operating System: Linux
> >> Hardware: Java: home: /home/wrf/IDV_3.0/jre version: 1.6.0_20 j3d:1.5.2 
> >> fcs (build4)
> >> Description of problem:
> >>
> >> Creating display: Color-Filled Contour Plan View
> >> visad.TypeException: visad.TypeException: FunctionType.binary: types don't 
> >> match
> >> FunctionType.binary: types don't match
> >>
> >> This problem happens when I try the formula : (SRH*CAPE)/160000, in
> >> order to calculate Energy Helicity INdex
> >>
> >> ******************
> >> Stack trace:
> >> visad.TypeException: FunctionType.binary: types don't match
> >> at visad.FunctionType.binary(FunctionType.java:283)
> >> at visad.DataImpl.binary(DataImpl.java:138)
> >> at visad.DataImpl.multiply(DataImpl.java:205)
> >> at visad.DataImpl.__mul__(DataImpl.java:1407)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >> at java.lang.reflect.Method.invoke(Unknown Source)
> >> at 
> >> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
> >> at 
> >> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
> >> at org.python.core.PyObject.__call__(PyObject.java:404)
> >> at org.python.core.PyObject.__call__(PyObject.java:408)
> >> at org.python.core.PyMethod.__call__(PyMethod.java:124)
> >> at org.python.core.PyMethod.__call__(PyMethod.java:115)
> >> at org.python.core.PyObjectDerived.__mul__(PyObjectDerived.java:211)
> >> at org.python.core.PyObject._basic_mul(PyObject.java:2229)
> >> at org.python.core.PyObject._mul(PyObject.java:2215)
> >> at org.python.pycode._pyx111.f$0(<string>:1)
> >> at org.python.pycode._pyx111.call_function(<string>)
> >> at org.python.core.PyTableCode.call(PyTableCode.java:165)
> >> at org.python.core.PyCode.call(PyCode.java:18)
> >> at org.python.core.Py.runCode(Py.java:1261)
> >> at org.python.core.__builtin__.eval(__builtin__.java:484)
> >> at org.python.core.__builtin__.eval(__builtin__.java:488)
> >> at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:190)
> >> at ucar.unidata.data.DerivedDataChoice.getData(DerivedDataChoice.java:764)
> >> at ucar.unidata.data.DataChoice.getData(DataChoice.java:607)
> >> at ucar.unidata.data.DerivedDataChoice.getData(DerivedDataChoice.java:776)
> >> at ucar.unidata.data.DataChoice.getData(DataChoice.java:637)
> >> at ucar.unidata.data.DataInstance.getData(DataInstance.java:243)
> >> at ucar.unidata.data.DataInstance.getData(DataInstance.java:207)
> >> at ucar.unidata.data.grid.GridDataInstance.init(GridDataInstance.java:205)
> >> at 
> >> ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:162)
> >> at 
> >> ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:143)
> >> at 
> >> ucar.unidata.idv.control.PlanViewControl.doMakeDataInstance(PlanViewControl.java:1511)
> >> at 
> >> ucar.unidata.idv.control.DisplayControlImpl.initializeDataInstance(DisplayControlImpl.java:3084)
> >> at 
> >> ucar.unidata.idv.control.DisplayControlImpl.setData(DisplayControlImpl.java:3066)
> >> at 
> >> ucar.unidata.idv.control.PlanViewControl.setData(PlanViewControl.java:642)
> >> at 
> >> ucar.unidata.idv.control.ContourPlanViewControl.setData(ContourPlanViewControl.java:194)
> >> at ucar.unidata.idv.control.PlanViewControl.init(PlanViewControl.java:473)
> >> at 
> >> ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1333)
> >> at 
> >> ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1034)
> >> at 
> >> ucar.unidata.idv.ControlDescriptor.initControl(ControlDescriptor.java:986)
> >> at ucar.unidata.idv.ControlDescriptor$1.run(ControlDescriptor.java:911)
> >> at ucar.unidata.util.Misc$3.run(Misc.java:1091)
> >>
> >>
> >>
> >
> > Ticket Details
> > ===================
> > Ticket ID: SLF-112254
> > Department: Support IDV
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: SLF-112254
Department: Support IDV
Priority: Normal
Status: Closed