Help with creating contact file for composite nesting model?

Propose new capabilities for ROMS algorithms

Moderators: arango, robertson

Post Reply
Message
Author
bwang
Posts: 1
Joined: Tue Apr 26, 2022 3:45 am
Location: Dalhousie University

Help with creating contact file for composite nesting model?

#1 Unread post by bwang »

Hi, everyone.

I am building a composite nesting model with increased resolution in the northwest corner (highlighted in red) but I have some problems creating the contact file with contact.m.
Picture1.png
Picture1.png (106.78 KiB) Viewed 23744 times
In a very basic test, I divided the model domain into a left and right grid with grid_extract.m and the contact file was created successfully with contact.m. Note that the left and right grid had same model resolution in this case. With this, I established that the scripts work in principle.
Picture2.png
Picture2.png (93.93 KiB) Viewed 23744 times
I then divided the model domain into an upper left and right grid (see below) with grid_extract.m to get a more sensible set-up. The two sub-grids had same resolution. In this case, when I ran contact.m I got this error:
Picture3.png
Picture3.png (94.98 KiB) Viewed 23744 times
Summary of Contact Regions Processed:

Grid 01: nesting_grid_left_upper.nc
Grid 02: nesting_grid_right.nc

Contact Donor Receiver
Region Grid Grid

01 01 02
02 02 01

Dot indexing is not supported for variables of this type.

Error in contact (line 345)
Ndatum = Ndatum + length(S.contact(cr).point.Irg_rho)


The error was because the two sub-grids had different sizes along the overlapping boundary. However, looking at the example of the US east coast on the ROMS wiki (https://www.myroms.org/wiki/Nested_Grid ... East_Coast), e.g. the blue and red grids shown below, this should work.
Picture4.png

I used the scripts grid_extract.m and contact.m from the ROMS MATLAB toolbox (https://www.myroms.org/svn/src/matlab) downloaded in May 2023.

Any comments or suggestions would be greatly appreciated!

Post Reply