weird problem with forcing file

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
jsouza
Posts: 31
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

weird problem with forcing file

#1 Unread post by jsouza »

Hi all;

I am having a weird problem when trying to read wind stress into the model. Have done it several times, but this is the first I have this "error".
ROMS seams to be reading my input files, but gives me zero values of wind stress over the domain.
For example, in the log file it writes:

GET_2DFLD - surface u-momentum stress, t = 4020 00:00:00
(Rec=0004, Index=1, File: NCEP_wind_2011_2015.nc)
(Tmin= 4019.2500 Tmax= 5489.0000)
(Min = 1.00000000E+35 Max = -1.00000000E+35)

Note the max and min values make no sense, although my input files look OK.
I masked out the land in the input file using the attribute missing_value (may be the problem?). Wind stress grid (lat/lon) looks OK and is slightly larger than the model domain.
Does anyone knows what am I missing?

Cheers

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

Re: weird problem with forcing file

#2 Unread post by kate »

ROMS is looking for the "_FillValue" attribute, not "missing_value".

jsouza
Posts: 31
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#3 Unread post by jsouza »

Thank you Kate.

I changed it in the files, but am still getting the same error though.

jsouza
Posts: 31
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#4 Unread post by jsouza »

I am still having problems with the forcing files.
Taking the Uwind as an example, even though all the values in my files are between -20<Uwind<20 ROMS says the min and max values to be:
Min= 1e+35 Max= -1e+35.
There are no Nan's in my files.

I tried to externally interpolate the forcing files to the model grid, but still get the same error.
Please, any tips would be highly appreciate!

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

Re: weird problem with forcing file

#5 Unread post by kate »

ROMS isn't wont to lie about things like this. How have you checked your files to be sure all is in range? My tools of choice are ncview, ncdump -h, a Python script for finding min/max values and the i,j,k point at which they occur (which you can then double-check with ncview).

Beyond that, it's debugger time. :twisted:

jsouza
Posts: 31
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#6 Unread post by jsouza »

I just loaded in MatLab and checked for Nan, max and min values.
Well, I am going to run the debug now...

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

Re: weird problem with forcing file

#7 Unread post by kate »

If you have some sort of special value that Matlab respects but ROMS does not, then Matlab won't help you find the problem.

jsouza
Posts: 31
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#8 Unread post by jsouza »

ncview doesn't show any problems either...

colberg
Posts: 13
Joined: Mon Feb 16, 2004 4:54 pm
Location: CSIRO

Re: weird problem with forcing file

#9 Unread post by colberg »

Have you checked that the coordinates in your forcing file are sorted from low to high values (i.e. increasing) ?

User avatar
jivica
Posts: 169
Joined: Mon May 05, 2003 2:41 pm
Location: The University of Western Australia, Perth, Australia
Contact:

Re: weird problem with forcing file

#10 Unread post by jivica »

This is because of your meteo data are flipped up-down, and lower left coordinate is not correct. You have to make sure that lower left coordinate is (1,1), because of search/interpolate algorithm within ROMS.
Easy to check this is to make your lat coords (or lon, depending where you model and switched) flipud (or lr), as well, as your meteo data within matlab/python and save.

Ivica

jsouza
Posts: 31
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#11 Unread post by jsouza »

It works!
Thank you Ivica!

Post Reply