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
Error while using contact.m : Unrecognized field name "contact".
Error while using contact.m : Unrecognized field name "contact".
- Attachments
-
- grid_sundaD_9kmkopel_batnas.nc
- parent grid
- (2.12 MiB) Downloaded 192 times
-
- grid_sundaD_3kmkopel_batnas.nc
- child grid
- (8.56 MiB) Downloaded 190 times
Re: Error while using contact.m : Unrecognized field name "contact".
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);
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);
Re: Error while using contact.m : Unrecognized field name "contact".
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.
Best regards.