SWAN needs BLOCK to pass variables to ROMS

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
CharlesJames
Posts: 43
Joined: Thu May 24, 2007 12:12 pm
Location: South Australian Research and Development Institute

SWAN needs BLOCK to pass variables to ROMS

#1 Unread post by CharlesJames »

I couldn't find any reference to this during a quick check of the forum so I though I'd mention it.

I'm running ROMS 3.6 rev 613 in coupled mode with SWAN and have encountered an unexpected behaviour with the swan.in file - if you don't have a BLOCK statement for a variable you want to export to ROMS the variable that gets passed has zero values - as if SWAN doesn't assign the exported variable the correct value if it doesn't process an output request. I ran into this with a realistic coupled model I'm running and verified the effect on the Inlet Test case - if you comment out the BLOCK command for HSIG - the corresponding variable in the ROMS netcdf file - Hwave is zero everywhere.

As far as I can tell from the SWAN documentation BLOCK is only required to write out variables, but obviously there is more to it than that, the existence of the BLOCK statement seems required for the output request to be processed. Even if I only set the variable to be written out once, at the end of a run, the variables still get passed at each coupling interval - no problem. You can see in the PRINT file that the output requests for all uncommented variables are being processed at every time step in SWAN even if no file is being written to.

This obviously has a profound effect on the evolution of the dynamic variables in the inlet_test case and could be a big problem with larger coupled models if the user chooses to comment out the BLOCK statements, like I did, in order to reduce the clutter of files in the working directory. The model will not fail, but unless the user checks the swan variables in their ocean_his.nc file they may not be aware that only zeros have been imported into the ROMS model and the SWAN model has been doing all that work for nothing!

Charles
Last edited by CharlesJames on Mon Sep 17, 2012 4:33 am, edited 1 time in total.

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

Re: SWAN needs BLOCK to pass variables to ROMS

#2 Unread post by jcwarner »

we have made a tremendous amount of advancements to the swan coupling, and it is distributed through a different portal. pls send me an email to
jcwarner@usgs.gov
and i can provide you access to our coawst code that has updated swan, vortex force, grid refinement, atm coupling etc.
-john

User avatar
CharlesJames
Posts: 43
Joined: Thu May 24, 2007 12:12 pm
Location: South Australian Research and Development Institute

Re: SWAN needs BLOCK to pass variables to ROMS

#3 Unread post by CharlesJames »

Thanks John,

I've sent you an e-mail and I would be interested in trying the coawst code; are there any plans to merge these advancements with the standard ROMS distribution. I still have a number of questions regarding the current coupling set-up but where is the best forum to raise them?

Charles

Post Reply