Opened 10 years ago

Last modified 10 years ago

#638 closed upgrade

IMPORTANT: Changed the default values in contact.m — at Initial Version

Reported by: arango Owned by: arango
Priority: major Milestone: Matlab Processing Scripts
Component: Matlab Version: 3.7
Keywords: Cc:

Description

  • Changed the default input argument values in the Matlab script contact.m. This script is used to compute contact points data needed in nesting applications. It also generates the Nesting Grids Connectivity NetCDF file NGCNAME for ROMS.

The script contact.m has several input arguments:

[S, G] = contact  (Gnames, Cname, Lmask, MaskInterp, Lplot)

see WikiROMS for more information.

The MaskInterp switch is now changed to false by default. It is used in refinement applications to compute the land/sea masks at U- and V-points. If false, the U- and V-mask are computed from the interpolated RHO-mask using script uvp_masks. Otherwise if true, it is interpolated from the coarser grid. This is done in internal function refine_coordinates (around line 813 in contact.m):

R.mask_rho = interp2(XrC', YrC', G(dg).mask_rho', XrF, YrF, 'nearest'); 
 
if (MaskInterp), 
  R.mask_psi = interp2(XpC', YpC', G(dg).mask_psi', XpF, YpF, 'nearest'); 
  R.mask_u   = interp2(XuC', YuC', G(dg).mask_u'  , XuF, YuF, 'nearest'); 
  R.mask_v   = interp2(XvC', YvC', G(dg).mask_v'  , XvF, YvF, 'nearest'); 
else 
  [umask, vmask, pmask] = uvp_masks(R.mask_rho); 
  R.mask_psi = pmask; 
  R.mask_u   = umask; 
  R.mask_v   = vmask; 
end

Notice that only the finer grid mask at RHO-points is interpolated from the coarse grid. The other masks are computed using uvp_masks for consistency. Of coarse, this is only relevant when there are land/sea mask features in any of the refinement grid physical boundaries and/or contact regions.

This is very important, and the users need to check the masks in the nesting contact regions... See new script check_nest_mask.m described below.

In addition, the input argument for the Lplot switch is turned off (false) by default. There are a lot of plots that slow down the computations and are very tricky to check. It require expertise in ROMS nesting strategies to check for correctness. There are still few simpler plots that are still processed. The user does not have control on them.

  • grid/check_nest_masks.m: Checks land/sea masks in nesting contact regions. In particular, it can be used to examine the nesting grids connectivity when there are land/sea mask features in the contact regions. A plotting section is provided as a guideline. Users may need to adapt it for their particular application.

Change History (0)

Note: See TracTickets for help on using tickets.