Stormsurge simulation problem

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
dinh

Stormsurge simulation problem

#1 Unread post by dinh »

Dear all,

I'm a newbie to ROMS and Linux.
I'm currently studying the stormsurge in Mikawa-bay, Japan, by using ROMS for simulation.

I have used ROMSTOOLS to make a grid file.
But the bathymetric data in ROMSTOOLS (from etopo2.nc) is not precise,so I replaced it by my bathymetric data, and created the new masking data.The precision is 0.005 degree in both longitude and latitude.By the way, I'm using MATLAB to handle netcdf file.
And forcing data (wind speed, pressure, ...) are taken from "Research Institute for Sustainable Humanosphere" (hourly data).
My target is typhoon Melor in 2009. Because it made landfall in Mikawa
bay on October 8, so I have used data from 5th to 9th (repeat "5th 09:00:00" 48 times for model spin-up, and next running from "5th 09:00:00" to "9th 08:00:00" ).

I'm setting dt=2s, with NTIMES=259200.
But my application get the error at time-steps 141589.
Here is error message :

Code: Select all

141589     3 06:39:38  8.030257E-05  3.982043E+03  3.982043E+03  8.600362E+10
           (086,051,1)  2.977083E-05  1.364391E-05  1.429876E-03  8.554934E-02
forrtl: error (65): floating invalid
Image              PC        Routine            Line        Source             
oceanG             08162348  rho_eos_mod_mp_rh         363  rho_eos.f90
oceanG             08159190  rho_eos_mod_mp_rh          86  rho_eos.f90
oceanG             0814C172  main3d_                   155  main3d.f90
oceanG             0804C0CC  ocean_control_mod         164  ocean_control.f90
oceanG             0804B860  MAIN__                    108  master.f90
oceanG             0804B514  Unknown               Unknown  Unknown
libc.so.6          003E6CE6  Unknown               Unknown  Unknown
oceanG             0804B421  Unknown               Unknown  Unknown

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 134
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
I don't know how to fix this problem.
Anyone could help me?
And I'm sorry for the lack of understanding.

Thank you very much.

PS:I attached my .h and .in files here.
Attachments
bathymetry.jpg
ocean_stormsurge.in
(31.83 KiB) Downloaded 367 times
stormsurge.h
(1.47 KiB) Downloaded 422 times

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Stormsurge simulation problem

#2 Unread post by arango »

Check your initial conditions for temperature and salinity at every level to see if you have a bad value like an NaN, Inf, or a very large number. The model is blowing up in the equation of state for seawater when computing density. This computation involves polynomial expansions of various powers, square roots, and so on. You are getting an invalid floating point operation. The equation of state is only valid for a physical range of values of salinity and temperature.

dinh

Re: Stormsurge simulation problem

#3 Unread post by dinh »

Thank you very much for your quick reply,Arango.

I was setting initial conditions for temperature and salinity equivalent at every level(20 Celsius for temperature, and 35 PSU for salinity). Is it OK for my application?

I want to ask one more. Although the application got the error at time steps 141589, it ran more than halfway to completion. But the result is very strange. The free-surface (zeta) has changed very little, just only about 1 or 2 cm. The observation value is about 2 or 3 m, exceedingly different with the ROMS value.
Was something wrong with my setting?

Could you please give me some advice?
I'm very sorry to bother you many times while you are busy.

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

Re: Stormsurge simulation problem

#4 Unread post by jivica »

It is hard to debug your application from the info you gave.
If you can put your grid file and forcing so I can grab it (when got time)
and see what is going on.
Ivica

dinh

Re: Stormsurge simulation problem

#5 Unread post by dinh »

Ivica,
Thank you very much.It's a tremendous help.

These are my input files:
*Grid file : Stormsurge_grd_1121.nc
*Initial file : Stormsurge_ini_1121.nc
*Forcing file : Stormsurge_blk_1121.nc
Because size is so big that i can not attached them here.
I uploaded in Dropbox.

Code: Select all

https://www.dropbox.com/s/19k79qm1f4xsvl7/Stormsurge_grd_1121.nc
https://www.dropbox.com/s/digobq8vhgfeikf/Stormsurge_blk_1121.nc
https://www.dropbox.com/s/ve3kdw8jz8ecjdq/Stormsurge_ini_1121.nc

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

Re: Stormsurge simulation problem

#6 Unread post by jivica »

I have looked at your files and there are many things you should reconsider;
you want to get storm surge but configure application to be nor full atmo driven nor only storm surge which is a bad idea. You want bulk flux but put constant swrad and lwrad through the whole simulation.
Make up your mind first, model can not be run like that.
Use analytical functions, they replace most you have made in your setup, i.e. no need for initial file if you have all momentum (u,v,ubar,vbar), zeta, == 0, T,S is constant....
You have to smooth bathymetry, think about open boundary ..etc.
From your forcing file I think you want to get effect of Proudman resonance, something like meteo-tsunami (abiki?)

I think you would get to the user level much faster if work with someone using ROMS already, to get you feeling, go to workshops, get some test cases, tutorials, be familiar with the code.. I am teaching numerical methods in oceanography and for my students I make semi-analytical ROMS test cases first, to get something they understand and can verify using paper and pencil ;)
Something similar is available on the ROMS web as test cases, run them first.

Many of us are working on our own projects and have no time to setup other's model applications, but we can help you with some advice, specific problem you bump on. Getting to the stage to run the model alone is painful and long way to pass, so be prepared to invest more time/nerves.

Good luck,
Ivica

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

Re: Stormsurge simulation problem

#7 Unread post by jivica »

Got some spare time and quickly fixed it;
so the steps were:
1) for your problem you can use 2D, no need to mess with 3D and is by far faster
stromsurge.h:

Code: Select all

/* Momemtun equation */
#define UV_VIS2
#define UV_ADV
#define UV_COR
#undef UV_QDRAG
#define UV_LDRAG
#define CURVGRID
#define AVERAGES
#define AVERAGES_FLUXES
 
/* options for pressure gradient algorithm */
#define ATM_PRESS

/* Model configuration */
#define MASKING
#define WET_DRY 

/* Options for analytical fields configuration */
#undef  ANA_SMFLUX
#define ANA_INITIAL
2) Do not use bulk flux just compute offline wind stress (i.e. I used Large and Pond algorithm JPO, 1981) can send you .m file if you want. You have to define surface momentum flux (see undef in .h) that way you do not have to define all variables for BULK FLUX ...
so forcing file is:
ncdump -h frc.nc

Code: Select all

netcdf frc {
dimensions:
	lon_coord = 181 ;
	lat_coord = 141 ;
	time = 144 ;
variables:
	double lat(lat_coord, lon_coord) ;
		lat:long_name = "Latitude" ;
		lat:units = "degrees_north" ;
	double lon(lat_coord, lon_coord) ;
		lon:long_name = "Longitude" ;
		lon:units = "degrees_east" ;
	double sms_time(time) ;
		sms_time:long_name = "wind time" ;
		sms_time:units = "seconds since 2000-01-01 00:00:00 GMT" ;
	double pair_time(time) ;
		pair_time:long_name = "air pressure time" ;
		pair_time:units = "seconds since 2000-01-01 00:00:00 GMT" ;
	float sustr(time, lat_coord, lon_coord) ;
		sustr:long_name = "surface stress u-wind component" ;
		sustr:units = "m2/s2" ;
		sustr:time = "sms_time" ;
		sustr:coordinates = "lon lat" ;
	float svstr(time, lat_coord, lon_coord) ;
		svstr:long_name = "surface stress v-wind component" ;
		svstr:units = "m2/s2" ;
		svstr:time = "sms_time" ;
		svstr:coordinates = "lon lat" ;
	float Pair(time, lat_coord, lon_coord) ;
		Pair:long_name = "surface air pressure" ;
		Pair:units = "millibar" ;
		Pair:time = "pair_time" ;
		Pair:coordinates = "lon lat" ;

// global attributes:
		:type = "ROMS forcing file" ;
		:title = "Storm surge Test Model" ;
		:data = "2013-Oct-22" ;
		:NCO = "4.3.2" ;
}
3) I did gentle smoothing of bathymetry, dirty quick way; i.e. find land higher than 20m (negative values) and put them == -20 i.e. in matlab: bad=find(depth<-20); depth(bad)=-20; That way you do not care about mountains, just expected region that could be flooded. Then I smooth modified bathy to get some decent rx0 ..

If you are still stuck, send me the email and I'll put those files on the server so you can download and replicate..

Cheers,
Ivica

dinh

Re: Stormsurge simulation problem

#8 Unread post by dinh »

Dear Dr.Ivica,

Thank you very much for all your great advice and support. I feel so lucky.

At first, I will try your advice by using 2D-model, and make a new forcing file, bathymetry file.

If it isn't getting better, I will contact you.

Thank you very much.

Post Reply