Opened 10 years ago

Closed 10 years ago

#620 closed upgrade (Done)

IMPORTANT: Updated Matlab scripts for nesting

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

Description

Several Matlab scripts were updated for nesting applications:

  • grid/grid_connections.m: updated script to support more than one nested grid. The new logic is more robust. There were instances in the double loop logic:
    for dg=1:S.Ngrids,
      for rg=1:S.Ngrids,
        ...
      end
    end
    
    that do not lead to a valid contact region. The new logic is now generic and allows more than two grids.
  • grid/grids_structure.m: new function to compute a nested grids structure array, say G(:), containing all the grid variables associated with the application's horizontal and vertical grids. For example:
    G = grids_structure({'my_his_coarse.nc', 'my_his_fine1.nc', 'my_his_fine2.nc'});
    
  • grid/contact.m: added logic to process grids without the curvilinear metrics dndx and dmde. The curvilinear switch from the ROMS grid structure G (generated by get_roms_grid) is used process such non-curvilinear applications.
  • c_contact.m: corrected bug in the definition of output NetCDF variables: coincident, composite, mosaic, and refinement. They need to be of the size Ncontact instead of Ngrids.
  • fine2coarse.m: added logic to process grids without the curvilinear metrics dndx and dmde.
  • coarse2fine.m: added logic to process grids without the curvilinear metrics dndx and dmde. The interpolation of the bathymetry, h and hraw, is linear instead of natural to insure that the global integral of bathymetry is conserved.
  • grid/write_contact.m: corrected bug during the writing of NetCDF variables: coincident, composite, mosaic, and refinement. They need to be of the size Ncontact instead of Ngrids. The vertical intepolation variable switch is written as true, interpolation(:)=1.
  • grid/grid_metric.m: insure that dndx and dmde is zero in non-curvilinear applications.

Change History (1)

comment:1 by arango, 10 years ago

Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.