Project

General

Profile

Temp File Handling with Python Bindings

Added by Anthony D'Agostino over 9 years ago

Hi Folks,

After upgrading to Python 2.7.8 and CDO 1.6.3 on a Mac, I no longer am able to run consecutive operators on temp files. This code works fine:
fn = "TRMM_L3_Precip.cdf"
julOnly = cdo.selmon("Jun", input = fn)

but adding
julFA = cdo.fldavg(input = julOnly)

generates the following error message: cdo fldavg: Open failed on >/var/folders/tl/3sdxh9rj0zd88dbwzj8bfjgc0000gn/T/cdoPyioNE3B<
No such file or directory

It seems to not be a permissions issue since the initial "julOnly" object is not throwing an error. This hadn't been an issue before my upgrades - any recommended solutions?

Thanks in advance for your help.

Best,
Anthony


Replies (5)

RE: Temp File Handling with Python Bindings - Added by Anthony D'Agostino over 9 years ago

Issue resolved: month must take on integer value, not string.

RE: Temp File Handling with Python Bindings - Added by Ralf Mueller over 9 years ago

didn't the selmon call throw an error?

RE: Temp File Handling with Python Bindings - Added by Anthony D'Agostino over 9 years ago

It doesn't. Here's the output in debug mode for illustration:

CALL:cdo selmon,Jan TRMM_L3_Precip.cdf /var/folders/tl/3sdxh9rj0zd88dbwzj8bfjgc0000gn/T/cdoPytabbLO
  1. DEBUG =====================================================================
    RETURNCODE:0

RE: Temp File Handling with Python Bindings - Added by Ralf Mueller over 9 years ago

do you use the latest version of the python bindings?

RE: Temp File Handling with Python Bindings - Added by Anthony D'Agostino over 9 years ago

Yes - version 1.2.3 through a pip upgrade.

    (1-5/5)