Code Monkey home page Code Monkey logo

Comments (8)

spidru avatar spidru commented on August 15, 2024

Hi @pavelber, I'm not quite sure what you mean by "when record is constant". Could you please clarify? Also, it would probably speed things up if you could send the GRIB file and explain what you're trying to do. Cheers!

from jgribx.

pavelber avatar pavelber commented on August 15, 2024

Small code in Kotlin, using attached file

import mt.edu.um.cf2.jgribx.GribFile
import mt.edu.um.cf2.jgribx.grib1.Grib1Record


object Test1 {
    @JvmStatic
    fun main(args: Array<String>) {
        val file = GribFile("C:\\temp\\C3_2019112600_CLCL.grb")
        val record = file.records.filter { r-> (r as Grib1Record).bds.isConstant }.first()
      
        println(record.forecastTime.toInstant())
        println(record.getValue(31.93, 34.7))
    }
}

C3_2019112600_CLCL.zip

from jgribx.

spidru avatar spidru commented on August 15, 2024

Hi @pavelber,

Just to let you know that I've managed to reproduce the issue. Will keep you posted. Thanks for finding these issues!

from jgribx.

pavelber avatar pavelber commented on August 15, 2024

Thank you!

from jgribx.

spidru avatar spidru commented on August 15, 2024

Found an issue in how the BDS is handled. Made a fix in e2f86fd

The exception should be gone now, but I see that all values for your sample code is zero, since all records have a constant-valued BDS. Is this what you were expecting?

from jgribx.

pavelber avatar pavelber commented on August 15, 2024

Yes, exactly, believe or not but now we have hot weather w/o clouds :)

Will try the fix now.

from jgribx.

spidru avatar spidru commented on August 15, 2024

Just checked the coords ... Gan Raveh Regional Council, Israel? Looks like a great place to be... :)

from jgribx.

pavelber avatar pavelber commented on August 15, 2024

Looks good, thank you!
Fixed!

It is good place now, but terrible place in summer :)

from jgribx.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.