[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[IDV #WAC-705632]: Error: FlatField: RangeUnits must be convertable with RangeType default Units
- Subject: [IDV #WAC-705632]: Error: FlatField: RangeUnits must be convertable with RangeType default Units
- Date: Thu, 19 Mar 2015 14:26:58 -0600
Jeffrey,
Unfortunately, you need to use some tricks because the IDV is having trouble
dealing
with the units.
Define this Jython function and refer to it with a formula.
def lwc(th,prs):
lwc = noUnit(th)*pow((noUnit(prs)/100000.0),(287.04/1005.7))
return newUnit(lwc,"lwc","g.m-3")
I describe Jython functions and formulas in this IDV video.
https://www.youtube.com/watch?v=TuHpf3HT3Xs&index=14&list=PLQut5OXpV-0gqVk8LFD6Riv6X3QcAVw_U
Let us know if you need more help.
Best,
Unidata IDV Support
> I should note too that prs and th are predicted variables in CM1, in the
> correct SI units (Pa and K, respectively).
>
> address@hidden> wrote:
>
> > The formula that I was trying to write/execute is this:
> >
> > t = th*pow((prs/100000.0),(287.04/1005.7))
> >
> > As far as the outdated version of IDV goes, I'm working remotely off a
> > machine that my professor controls, so I'll talk to him about that.
> >
> > The .ctl file was uploaded to the link provided, I did not upload the
> > accompanying .dat file as that is on the order of 45gb in size.
> >
> > Thank you!
> >
> > Jeff
> >
> > address@hidden> wrote:
> >
> >> Jeff,
> >>
> >> First, update your IDV. It is very old.
> >>
> >> http://www.unidata.ucar.edu/downloads/idv/current/index.jsp
> >>
> >> Second, please respond with the full Jython function you are trying to
> >> write.
> >> (I could not find it in the bundle.)
> >>
> >> Also please upload the GrADS file here:
> >>
> >> http://motherlode.ucar.edu/repository/alias/idvupload
> >>
> >> Best,
> >>
> >> Unidata IDV Support
> >>
> >> > Full Name: Jeff Wetter
> >> > Email Address: address@hidden
> >> > Organization: South Dakota School of Mines and Technology
> >> > Package Version: 3.1u1 build date:2012-11-30 17:36 UTC
> >> > Operating System: Linux
> >> > Hardware: Java: home: /usr/local/IDV_3.1u1/jre version: 1.6.0_31
> >> j3d:1.5.2 fcs (build4)
> >> > Description of problem: Hello. I imported a GrADS file from CM1 into
> >> IDV. I am interested in calculating certain cloud physics parameters in
> >> three dimensions, in this case cloud liquid water content. In order to do
> >> that, one needs to first calculate the temperature (in Kelvins) and density
> >> (in kg/m^3) to plug into a formula for LWC. I tested out my formula for
> >> temperature (which is just the standard
> >> [th*pow((prs/100000.0),(287.04/1005.7))], where th= potential temperature
> >> in Kelvins and prs=pressure in Pa. It ran and gave me the error that I put
> >> as the title for this email. I'm new at creating new variables within IDV,
> >> and perhaps this is an easily correctable problem. If there is anything
> >> else that you need to diagnose the problem, let me know.
> >> >
> >> > Thank you!
> >> >
> >> > Jeff
> >> >
> >> > ******************
> >> > Stack trace:
> >> > visad.UnitException: FlatField: RangeUnits must be convertable with
> >> RangeType default Units
> >> > at visad.FlatField.<init>(FlatField.java:412)
> >> > at visad.FlatField.cloneFloat(FlatField.java:5605)
> >> > at visad.FlatField.binary(FlatField.java:2642)
> >> > at visad.FieldImpl.binary(FieldImpl.java:836)
> >> > at visad.DataImpl.binary(DataImpl.java:139)
> >> > 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._pyx108.f$0(<string>:1)
> >> > at org.python.pycode._pyx108.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:782)
> >> > at ucar.unidata.data.DataChoice.getData(DataChoice.java:607)
> >> > at
> >> ucar.unidata.idv.JythonManager.evaluateDataChoice(JythonManager.java:1817)
> >> > at ucar.unidata.idv.JythonManager$10$1.run(JythonManager.java:1756)
> >> > at ucar.unidata.util.Misc$3.run(Misc.java:1250)
> >> >
> >> >
> >> >
> >>
> >>
> >> Ticket Details
> >> ===================
> >> Ticket ID: WAC-705632
> >> Department: Support IDV
> >> Priority: Normal
> >> Status: Closed
> >>
> >>
> >
>
>
Ticket Details
===================
Ticket ID: WAC-705632
Department: Support IDV
Priority: Normal
Status: Closed