Error while using contact.m : Unrecognized field name "contact".

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
arief121
Posts: 6
Joined: Mon Mar 07, 2022 2:14 pm
Location: BMKG

Error while using contact.m : Unrecognized field name "contact".

#1 Unread post by arief121 »

Dear All, I have a query about using contact to create nest linking points.

Before, I used GridBuilder to make a parent and child grid. The following error showed up when I tried the contact.m script.

>> Gnames = {'grid_sundaD_9kmkopel_batnas.nc', 'grid_sundaD_3kmkopel_batnas.nc'};
>> Cname = 'sunda_contact.nc';
>> [S,G] = contact(Gnames, Cname);

Summary of Contact Regions Processed:

Grid 01: grid_sundaD_9kmkopel_batnas.nc
Grid 02: grid_sundaD_3kmkopel_batnas.nc

Contact Donor Receiver
Region Grid Grid

Unrecognized field name "contact".

Error in grid_connections (line 638)
dg = S.contact(cr).donor_grid;

Error in contact (line 312)
S = grid_connections(G, S);

But, the script worked perfectly and the contact.nc file was generated when I tested it on a other grid (for instance, the grid in the sandy project). I've also included the grid file I used to make the contact.m file.

Please provide your assistance to me. I appreciate you all.

Arief
Attachments
grid_sundaD_9kmkopel_batnas.nc
parent grid
(2.12 MiB) Downloaded 191 times
grid_sundaD_3kmkopel_batnas.nc
child grid
(8.56 MiB) Downloaded 189 times

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

Re: Error while using contact.m : Unrecognized field name "contact".

#2 Unread post by jcwarner »

when you made the child grid, did you use coarse2fine:

Istr=22; Iend=60; Jstr=26; Jend=54;
ref_ratio=3;
roms_child_grid='Sandy_roms_grid_ref3.nc';
F=coarse2fine('Sandy_roms_grid.nc','Sandy_roms_grid_ref3.nc', ...
ref_ratio,Istr,Iend,Jstr,Jend);

Dan_chan
Posts: 38
Joined: Wed Apr 17, 2019 2:37 am
Location: IAP, UCAS

Re: Error while using contact.m : Unrecognized field name "contact".

#3 Unread post by Dan_chan »

I faced this problem but forgot some details. Maybe you could try to use matlab tool to extract child grid. Or, try to run contact script lines by lines. The error may caused by lon-lat or xi-eta, the difference between these two types not recognized automatically.
Best regards. :D

Post Reply