Project

General

Profile

cdo ofile not recognised

Added by Ciara O'Hara about 10 years ago

HI all,

I have written a script to generate fldmean output files for a series of years. The fldmean operator works when I run it outside the script, and it produces an output file that is recognised as a NetCDF file, but when I run the same lines of code within the script, an output file is created that looks correct, but, within linux terminal a search for it returns nothing, and ferret does not recognise it. Ferret returns various errors at different times, all of which, when I googled it, means that something is preventing ferret from recognising and opening the NetCDF file. cdo itself can operate on the files it created, but nothing else can. Can anyone tell me why this is? I don't want to have to do every file seperately!

The script is:

#!/bin/bash
i="1961"
while [ $i != 2011 ]
do
cdo fldmean /home/.../avgTemp_$i.nc /home/.../yrfldmean_$i.nc
i=$[$i+1]
echo $i
done
~

Thanks in advance

Ciara


Replies (5)

RE: cdo ofile not recognised - Added by Ciara O'Hara about 10 years ago

I have also tried outputting cdf files, but that doesn't work either. Ferret's error message is: **ERROR: unknown data set: invalid data set number for SET DATA/EZ

Ciara

RE: cdo ofile not recognised - Added by Jaison-Thomas Ambadan about 10 years ago

CDO fully support only the CLASSIC NetCDF files (time,lev,lat,lon dimensions with corresponding attributes). Try recreating the NetCDF (cdo output) using "ncdump" and "ncgen", and then try again with "Ferret"

ncdump cdo_ouput_file.nc > mydat.dat
ncgen -o new_file.nc mydat.dat

If ferret still can't recognize the "new_file.nc", then I do not think it's a CDO problem. Nevertheless, it may be helpful if you could upload one of your input file and the output of "cdo -V"

Cheers,
J

RE: cdo ofile not recognised - Added by Ciara O'Hara about 10 years ago

Thanks Jaison, I'll try that.

THe result of cdo -V is:

Climate Data Operators version 1.5.5 (http://code.zmaw.de/projects/cdo)
Compiler: gcc -std=gnu99 -g -O2 -pthread
version: gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
with: PTHREADS NC4 Z PROJ.4
Compiled: by ewhelan on eddy (x86_64-unknown-linux-gnu) Jun 19 2012 09:22:56
CDI library version : 1.5.5 of Jun 19 2012 09:22:51
CGRIBEX library version : 1.5.2 of May 11 2012 14:32:49
GRIB_API library version : 1.9.16
netCDF library version : 4.1.3 of Oct 10 2011 09:19:17 $
HDF5 library version : 1.8.7
SERVICE library version : 1.3.0 of Jun 19 2012 09:22:39
EXTRA library version : 1.3.0 of Jun 19 2012 09:22:35
IEG library version : 1.3.0 of Jun 19 2012 09:22:37
FILE library version : 1.8.0 of Jun 19 2012 09:22:35

I don't know about uplaoding an input file, it's just that it's not my data, I'm just working on it.

I got 'Ferret' to read the data twice using use "home/cohara/TempData/cdo_output/yrfldmean_1961.cdf", but now that has stopped working (though I am using the same file), and is giving an error: **TMAP ERR: non-existent or not on line

I know this isn't the place for 'Ferret' issues, but I'm getting the problem on two computers with ferret and having the same problems.

RE: cdo ofile not recognised - Added by Jaison-Thomas Ambadan about 10 years ago

You are using an old/ancient version of CDO! I highly recommend updating the CDO to latest release/current version.

RE: cdo ofile not recognised - Added by Ciara O'Hara about 10 years ago

Ah yes, unfortunately I have no control over the cdo version. I have it working now anyway, thanks!

    (1-5/5)