Error while reading variable Uwind

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
justina0622
Posts: 23
Joined: Fri Jan 29, 2010 6:17 pm
Location: GSO URI

Error while reading variable Uwind

#1 Unread post by justina0622 »

Dear everyone,

I am trying to run the test of forcing by bulk formulas with the ROMS 3.5.. Here came the error:


REGRID - input gridded data does not contain model grid:

Gridded: LonMin = -81.0000 LonMax = -39.3750
LatMin = 29.7195 LatMax = 55.5136
Model: LonMin = 0.0000 LonMax = 0.0000
LatMin = 0.0000 LatMax = 0.0000

GET_2DFLD - error while reading variable: Uwind at TIME index = 12


It seems that the model did't read the grid successfully, since the the minimum and maximum of Lon and Lat are all 0. I did check very carefully to make sure I have gave the right directory of the grid. And there was no other errors indicating the grid was not right.

And I have tried to gave the Uwind data(Uwind.nc) both before interpolation and after interpolation, both are the similar errors.

I will appreciate very much if someone can give me some suggestions.

Best wishes, :)
Q
Qianqian@URI

justina0622
Posts: 23
Joined: Fri Jan 29, 2010 6:17 pm
Location: GSO URI

Re: Error while reading variable Uwind

#2 Unread post by justina0622 »

Dear Everyone,

I thought I have got the the reason. It was indeed the problem of my grid. I got the grid using easygrid, in which grid type is not spherical. So, I changed nc{'sperical'}(:)='F' to nc{'spherical'}(:)='T', and add the parameter of 'angle' in the grid. Then, the problem above is gone.

Best wishes,
Q
Qianqian@URI

Scarlett
Posts: 48
Joined: Tue Aug 04, 2015 4:42 pm
Location: Universidad del Mar (UMAR), Mexico
Contact:

Re: Error while reading variable Uwind

#3 Unread post by Scarlett »

Hi Justina:
I have a similar problem.... Could you tell me where do you edited c{'sperical'}(:)='F' to nc{'spherical'}(:)='T' ? please, in the seagrid window or in a roms' script?
-
Thanks in advance
-
Mar.Mo.

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

Re: Error while reading variable Uwind

#4 Unread post by kate »

This is the sort of thing I would do in a scripting language such as Python or Matlab or NCL or Ferret. It's good to develop some skills like editing NetCDF files in one of them. Ask around your friends to see which one they can help you get started in or look at online examples.

Scarlett
Posts: 48
Joined: Tue Aug 04, 2015 4:42 pm
Location: Universidad del Mar (UMAR), Mexico
Contact:

Re: Error while reading variable Uwind

#5 Unread post by Scarlett »

Dear Kate, thanks for you replay
My NetCDF grid file have the next description:
Variables:
spherical
Size: 1x1
Dimensions:
Datatype: int32
Attributes:
long_name ='grid type logical switćh'
flag_values=[0 1]
flag_meanings='Cartesian spherical'
Do I neet to change the flag_meanings 'Cartesian spherical' to only 'spherical' ? in the NetCDF file
-
Thanks in advance.
Mar.Mo.

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

Re: Error while reading variable Uwind

#6 Unread post by kate »

Once upon a time, spherical was a logical flag, true or false. Somebody's Netcdf interface worked better if spherical is an integer instead, so it was changed. The attributes are telling you that valid values are 0 and 1, with meanings Cartesian and spherical, respectively. You are showing us the metadata for the spherical variable, but not its value. You need to change the value to 1. If you only had to change the metadata, I would use the NCO package. For changing values, I turn to Python and the Python NetCDF4 package.

User avatar
wilkin
Posts: 920
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Error while reading variable Uwind

#7 Unread post by wilkin »

We need to know your value for spherical to know if that is that problem.

If you have the NCO tools http://nco.sourceforge.net/ (i.e. command line utilities ncks, ncap2 etc.) this is easily determined.

Show the value of spherical:

Code: Select all

ncks -v spherical grdfile.nc
Reset the value of spherical if it is not correct:

Code: Select all

ncap2 -s 'spherical=1' grdfile.nc newgrdfile.nc
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Scarlett
Posts: 48
Joined: Tue Aug 04, 2015 4:42 pm
Location: Universidad del Mar (UMAR), Mexico
Contact:

Re: Error while reading variable Uwind

#8 Unread post by Scarlett »

Hi!
So many thanks for your's answers, were so usefull to me.
My spherical value is 1, the problem was resolved when I did my grd.in file with a different seagrid2roms.m, which changed 'spherical=1' for 'spherical=T'.
-
Mar.Mo.

Post Reply