Giter Site home page Giter Site logo

Comments (5)

mathisc avatar mathisc commented on July 20, 2024

Hi,

I ran into the same error and I dug a little bit more to get a better understanding :
Previously in my image, the default cdo version was 1.9.6, it was recently updated to 1.9.10...
In 1.9.10, with DEBUG=True flag in your environment, the first value for operator is PRE_MAIN_DEBUG, this was not the case for 1.9.6.

Here is a little script explaining the issue :

import os
import subprocess

def print_first_operators():
    proc = subprocess.Popen(["cdo", '--operators'],
                            stderr=subprocess.PIPE, stdout=subprocess.PIPE)
    ret = proc.communicate()
    ops = list(map(lambda x: x.split(' ')[0], ret[0].decode(
        "utf-8")[0:-1].split(os.linesep)))
    ios = list(map(lambda x: x.split(' ')[-1], ret[0].decode(
        "utf-8")[0:-1].split(os.linesep)))

    print(f'{ops[0]} {ios[0]}')

os.environ['DEBUG'] = "False"
print_first_operators()
# prints:
# cdo-1.9.10 : abs (1|1)
# cdo-1.9.6 : abs (1|1)
os.environ['DEBUG'] = "True"
print_first_operators()
# prints :
# cdo-1.9.10 : PRE-MAIN-DEBUG [0x7ff96caac9a0]
# cdo-1.9.6 : abs (1|1)

from cdo-bindings.

mathisc avatar mathisc commented on July 20, 2024

(NB: created merge request for that : #53 )

from cdo-bindings.

Try2Code avatar Try2Code commented on July 20, 2024

hi!
Thx for the report. But it's hard to provide workarounds for strange installations. There is no direct link from CDO to eckit. Someone published a very strange build of CDO. I doubt that this is coming from debian since they use a very strict building policy.

Can you tell mode about which image exactly is affected?

from cdo-bindings.

Try2Code avatar Try2Code commented on July 20, 2024

hi again!
I investigated a bit more in to this error. Unfortunately all operators which write to stdout (showname, showlevel, sinfov, etc.) have problems.
So I recommend to avoid the debian (or debian-based) binary. for linux conda (conda-force channel) is a valid options. Those releases are update-to-date. you can check at https://code.mpimet.mpg.de/projects/cdo/wiki/Linux_Platform for more info

from cdo-bindings.

pjpetersik avatar pjpetersik commented on July 20, 2024

Hi @Try2Code,
thanks for having a look into the issue. I followed your recommendation and solved the issue on my side by installing CDO from source following this gist: https://gist.github.com/jeffbyrnes/e56d294c216fbd30fd2fd32e576db81c

from cdo-bindings.

Related Issues (20)

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.