Problems reading climatological files

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
elbio
Posts: 10
Joined: Sun Jul 06, 2003 9:16 pm
Location: U National S, Argentina

Problems reading climatological files

#1 Unread post by elbio »

Hi:

I am having problems reading the climatological files (generated with
Roms_tools) using ROMS' version svn: $Id: Version 537. After compiling
with options

#define ZCLIMATOLOGY
#define M2CLIMATOLOGY
#define M3CLIMATOLOGY
#define TCLIMATOLOGY
#define ZCLM_NUDGING
#define M2CLM_NUDGING
#define M3CLM_NUDGING
#define TCLM_NUDGING

In run-time I've got:

GET_3DFLD - unable to find requested variable: temp_time
in input NetCDF file: roms_sa_clm_upw_low.nc

and the same for the temporal index variables v2d_time,
v3d_time, etc. It works for zeta_time.

I have checked the climatological file and these variables
are fine. It also works with ROMS older versions.

Has anyone experienced the same problem?.

Best regards,

elbio.

User avatar
susonic
Posts: 170
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

Re: Problems reading climatological files

#2 Unread post by susonic »

Hi,

Did you check out the variables in varinfo.dat file whether they matches
with the variables in your climatology file?
Joonho Lee

elbio
Posts: 10
Joined: Sun Jul 06, 2003 9:16 pm
Location: U National S, Argentina

Re: Problems reading climatological files

#3 Unread post by elbio »

Hi,

Thanks for your answer. Yes, I have checked the varinfo.dat
file. They have the same names.

Regards,

elbio.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Problems reading climatological files

#4 Unread post by kate »

If the varinfo value fails, ROMS will also check the time attribute on your fields, such as this:

Code: Select all

        double hice(ocean_time, eta_rho, xi_rho) ;
                hice:_FillValue = -1.e+34 ;
                hice:long_name = "ice thickness climatology" ;
                hice:units = "meter" ;
                hice:field = "hice, scalar, series" ;
                hice:time = "ocean_time" ;
I think I recently had your troubles, which led me to fix a problem I had when setting the time attribute using a C-based code (such as ncatted).

elbio
Posts: 10
Joined: Sun Jul 06, 2003 9:16 pm
Location: U National S, Argentina

Re: Problems reading climatological files

#5 Unread post by elbio »

Hi Kate:

I think that I do not understand the comment. I have
checked the climatological file and all time attributes
are well defined. Variables v3d_time, tclm_time, etc
have the same names and attributes as in varinfo.dat.
Do you mean that something could be missing in the climatological
file?. It is strange though, because the older version
reads the same file without problems.

Regards,

elbio.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Problems reading climatological files

#6 Unread post by kate »

ROMS knows what time variable to look for based on:

a) the value in the varinfo.dat file for each variable.

or

b) the variable pointed to by the time attribute for each variable.

Take my hice example. I can have ice_time set in the varinfo.dat file for the ice thickness, but that variable doesn't exist. ROMS will then move on to look for a time attribute on hice. Do you have time attributes on your variables in the CLM file? If not, you can add them with ncatted from the NCO package.

In the past, I would have a problem when adding attributes with ncatted in that it would add a null character that ROMS couldn't handle (it's not in the variable name for ocean_time). I would then have to have my varinfo.dat times all correct. Last week I thought my varinfo.dat was correct, but the read still failed because of the null in my time attribute. That's when I fixed the null thing. Now we need to get Hernan to test the case of not having a time attribute set.

elbio
Posts: 10
Joined: Sun Jul 06, 2003 9:16 pm
Location: U National S, Argentina

Re: Problems reading climatological files

#7 Unread post by elbio »

Hi Kate:

You were right. After adding the time attributes to
the variables in the CLM file the problem was solved.

Thanks for your advice.

Best regards,

elbio.

liyizhen837
Posts: 11
Joined: Tue Aug 21, 2007 5:44 pm
Location: North Carolina State University

Re: Problems reading climatological files

#8 Unread post by liyizhen837 »

I encountered the same problem when using ncatted. Where is the null value from Kate?

Yizhen

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Problems reading climatological files

#9 Unread post by kate »

In the C language, strings are always terminated with a null character. The problem is that Fortran doesn't know that and thinks that null is a meaningful part of the string. Where did it come from? ncatted was written in C.

liyizhen837
Posts: 11
Joined: Tue Aug 21, 2007 5:44 pm
Location: North Carolina State University

Re: Problems reading climatological files

#10 Unread post by liyizhen837 »

kate wrote:In the C language, strings are always terminated with a null character. The problem is that Fortran doesn't know that and thinks that null is a meaningful part of the string. Where did it come from? ncatted was written in C.
Thanks Kate.

Post Reply