ROMS + SWAN with nesting : error on the child grid

Cool Findings and Plots

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

ROMS + SWAN with nesting : error on the child grid

#1 Post by Eugen » Thu Nov 22, 2018 8:33 pm

Dear ROMS users,

I run ROMS + SWAN in coupling using MCT library on two grids, one inside of another, in two way nesting.

I'm sure about the wave results on the coarse grid. However, the fine resolution grid does not behave on the way I expect it.

Here is a picture of the significant wave height on the coarse grid with superimposed resuls from the fine grid. I clearly see:

1) There is a masked area on the right boundary of the fine grid.
2) Also, the upper boundary seems to not function at all, even it is open

Could you tell please, from where does this error probably come from? Does it come from the wrong scrip interpolation? Or I defined something wrong in the swan.in ?

I tried to play with time steps, as well as several times checked grid dimensions in swan input files, verifying them with the Sandy test case, and still did not spot an error.

Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#2 Post by jcwarner » Thu Nov 22, 2018 9:58 pm

how long into the model run is this? it may take some time for information to propagate into the child.
this depends on the initial conditions. Also, do you have the same winds on both swan grids? you can use copy the parent wind grid to put on the child.
-john

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#3 Post by Eugen » Thu Nov 22, 2018 10:48 pm

Hi, John.

This is a snapshot after 11 hours.

But the model can go 30 days without explosion, just the results on the child grid have a little connection to the parent.

About winds: I use the same regular ECMWF grid with winds for both of my grids. I tried to run with having winds on both grids, and only on the parent - the results seem to be equally nonsense for the child grid.

If I have information "Map 1 weight < 0" while doing interpolation between grids with using the SCRIP library, does it mean, that something went wrong and weights don't have sense?

Could you have a look on my SCRIP log please?
Last edited by Eugen on Thu Nov 29, 2018 2:10 pm, edited 1 time in total.
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#4 Post by jcwarner » Thu Nov 22, 2018 10:51 pm

the winds should be important for the child.
can you send to me both of your swan input files?
jcwarner@usgs.gov

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#5 Post by Eugen » Thu Nov 22, 2018 11:04 pm

Thanks John,

Here they are:
Attachments
swan_ns_nest.in.txt
(2.33 KiB) Downloaded 54 times
swan_ns.in.txt
(4.89 KiB) Downloaded 55 times
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#6 Post by jcwarner » Thu Nov 22, 2018 11:56 pm

some things to try:
- run it with just swan with 2 grids, not coupled.
- do the currents in both grids look continuous?
- try to run the swan files with
INIT
in both of them. this will help the child grid to have some init conditions. if you run the swan without any init commands, it can take a long time for the grid to develop waves because the wave growth term has a function like hnew=hinit+hold*exp(A)
but if no waves are there to start with, it takes a while to grow them.

-j

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#7 Post by Eugen » Fri Nov 23, 2018 12:01 am

Thanks, John !

I'll try your suggestions and tell the result
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#8 Post by Eugen » Tue Nov 27, 2018 2:25 pm

Hi John,

1) I run SWAN grids without ROMS. No numerical errors and "zero" boundaries are found;

2) Currents are continuous, yes;

3) I've run the coupled system for one day and then have rerun with HOTFILEs. The error is still on both ROMS grids, while both SWAN grids look OK.

I suspect an interpolation error, when SWAN gives data to ROMS. But why? Sandy test-case, which I used as a reference, doesn't have it.
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#9 Post by jcwarner » Tue Nov 27, 2018 7:33 pm

I am not really clear on these results, and perhaps i was not very clear either.
1) if you just run swan by itself, do you get results on both the parent and child that are consistent and look correct?
2) currents continuous = good, roms refinement works.
3) roms+swan coupled: you say that with it coupled the waves on both swan parent and child are ok ? is that from swan mat files?
but the waves on both the parent and child in roms (from roms his files) are not ok?


-j

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#10 Post by Eugen » Tue Nov 27, 2018 10:05 pm

Dear John,

1) SWAN only (results after 5 days):


3) If I run the coupled system, after 4 days on the SWAN grids (.mat) the results look like this:


Probably due to ROMS results in netcdf look like this:


The blue straight line corresponds to the 'zero' area along the child grid boundary.
Colorbar = wave height in meters.
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#11 Post by jcwarner » Wed Nov 28, 2018 1:21 am

i cant see the images. can you upload png files?
-j

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#12 Post by Eugen » Wed Nov 28, 2018 9:33 am

Yes, sure
Attachments
Coupled system: ROMS results
Coupled system: ROMS results
Coupled system: SWAN results
Coupled system: SWAN results
Swan only
Swan only
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#13 Post by Eugen » Wed Nov 28, 2018 10:20 am

I compared indexes of child grid edge points compared to the corresponding parent grid cells in the scrip interpolation weight logs.

For Sandy hurricane it is:

ROMS starting i & j index of parent w.r.t child grid
23 27
ending i & j index of parent w.r.t child grid--
60 54

And ncdump says, that the coordinates of the Sandy nested grid are:
22 26
60 54

So, we should except the same behavior for my case.

The scrip interpolation weight log says:

SWAN starting i & j index of parent w.r.t child grid--
7 33
ending i & j index of parent w.r.t child grid--
35 56

But ncdump gives:
7 32
34 56

That means, that along the i-dimension everything should be shifted ! But why?
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#14 Post by jcwarner » Thu Nov 29, 2018 1:11 pm

swan with nesting by itself (no roms) does not need the scrip weights, so there is an issue with the swan child grid. Can you send to me the 2 *.bot and the 2 *.grd swan files (4 files)
jcwarner@usgs.gov
thanks
-j

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#15 Post by Eugen » Thu Nov 29, 2018 2:24 pm

Thanks, John,

I've sent you a message.

Did I mention that my ROMS grids have an angle of 120 degrees?
Can it be a reason, why the configuration works such bad?

SWAN does not read the southern nested boundary at all, and the western boundary it reads with a numerical error...
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#16 Post by Eugen » Thu Nov 29, 2018 6:36 pm

John,

I've decided to make an experiment.
I've turned both grids of the Sandy test-case on 180 degrees. Then, I've created .grd and .bot files and have run SWAN (without coupling with ROMS). And then I've compared it with the run on the normal (non-reversed) grid.

I've switched off the winds on the child grid to show clearer the information transfer between both grids.

Here are the results.

Neither Northern, neither Southern boundary seems to function properly in the "reversed run".

I do remember that SWAN does not like angles, but the parent grid runs normally, so I had decided to forget about this issue.

By far my grid is turned on 120 degrees, so I would expect the same kind of problem.

I'll turn my grid to something in between 0 and 90 degrees and tell you the results.
Attachments
Sandy: both grids are reversed on 180 degrees (SWAN only)
Sandy: both grids are reversed on 180 degrees (SWAN only)
Sandy: normal run (SWAN only)
Sandy: normal run (SWAN only)
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#17 Post by jcwarner » Fri Nov 30, 2018 3:24 am

So i can get this to work.
The grid files seem to be ok (2xbathy.bot and 2x coord.grd). They are ok.
Here are some changes i did to the INPUT files:
1) I did not have your wind file, so i commented out the wind commands and added
WIND 10. 0.
this puts a 10 m/s wind from north on both grids.
2) You had a 3600s time step for both child and parent. That is too long. I set them to be 900s for parent, and 150 for child. This worked a lot better.
3) for child grid you do not need a BC files. so comment out this line in the child INPUT
&BOUND SHAPESPEC JONSWAP MEAN DSPR DEGREES
4) in both INPUT files i added
& Restart name **********************************
INIT
This INIT command computes an initial Hsig in each grid, for the first time step based on the wind field.
5) the Output time step was not consistent with the model time. So i changed the HSIG outputs to be
BLOCK 'COMPGRID' NOHEADER 'NS_hsig.mat' LAY 4 HSIGN 1. OUTPUT 20060101.000000 1 HR
and
BLOCK 'COMPGRID' NOHEADER 'NS_nest_hsig.mat' LAY 4 HSIGN 1. OUTPUT 20060101.000000 1 HR

Give those a try for SWAN by itself (2 grids). That should help. here is an image after 24 hours for my constant wind, parent and child swan.:
swan_hisg.png

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#18 Post by Eugen » Fri Nov 30, 2018 10:14 am

Thanks a lot, John !

I'll try your suggestions and soon tell the results of the coupled run.
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#19 Post by Eugen » Fri Nov 30, 2018 5:08 pm

John,

The SWAN itself works fine now. But, coupled with ROMS, the nested grid gives a weird numerical error along the upper boundary.

It is not deadly anymore, but it is definitely a patch to be eliminated.

Could you guess please, why does it appear?
Attachments
Horrible_patches.png
Horrible_patches.png (29.7 KiB) Viewed 1897 times
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#20 Post by jcwarner » Sat Dec 01, 2018 2:09 am

if i had to guess, i would ask what the time steps are being used for roms.

User avatar
Eugen
Posts: 30
Joined: Wed Apr 06, 2016 4:36 pm
Location: University of Liege

Re: ROMS + SWAN with nesting : error on the child grid

#21 Post by Eugen » Sat Dec 01, 2018 6:42 pm

John,

Unfortunately, I didn't succeed to eliminate this error while playing with the ROMS time step, nor with the SWAN time step or with the coupling time step.

Could it be due to a mask mismatch? I made some significant changes in the mask inside of the domain (not in the contact point layer). But fields of any other variables, except of the wave ones, are perfectly fine and continuous. :?
Evgeny Ivanov

PhD Fellow,
MAST, University of Liege, Belgium

jcwarner
Posts: 813
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: ROMS + SWAN with nesting : error on the child grid

#22 Post by jcwarner » Sun Dec 02, 2018 3:39 pm

can send to me the scrip file you used to create the scrip weights?
and are the grids the same size for the parent roms/swan and the child roms/swan?
you need to make sure you enter the swan grid sizes correctly.
-j

Post Reply