weird problem with forcing file

General scientific issues regarding ROMS

Moderators: arango, robertson

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

weird problem with forcing file

#1 Post by jsouza » Thu May 14, 2015 10:37 pm

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: 3759
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: weird problem with forcing file

#2 Post by kate » Thu May 14, 2015 10:57 pm

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

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

Re: weird problem with forcing file

#3 Post by jsouza » Fri May 15, 2015 1:39 am

Thank you Kate.

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

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

Re: weird problem with forcing file

#4 Post by jsouza » Fri Jun 26, 2015 8:56 pm

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: 3759
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: weird problem with forcing file

#5 Post by kate » Fri Jun 26, 2015 9:13 pm

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: 25
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#6 Post by jsouza » Fri Jun 26, 2015 9:27 pm

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: 3759
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: weird problem with forcing file

#7 Post by kate » Fri Jun 26, 2015 9:53 pm

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: 25
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#8 Post by jsouza » Fri Jun 26, 2015 10:12 pm

ncview doesn't show any problems either...

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

Re: weird problem with forcing file

#9 Post by colberg » Sat Jun 27, 2015 5:47 am

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

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

Re: weird problem with forcing file

#10 Post by jivica » Sat Jun 27, 2015 2:15 pm

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: 25
Joined: Tue Apr 10, 2012 10:55 pm
Location: Metocean Solutions

Re: weird problem with forcing file

#11 Post by jsouza » Mon Jun 29, 2015 5:39 pm

It works!
Thank you Ivica!

Post Reply