Lake Jersey Refinement Example AB

From WikiROMS
Jump to: navigation, search
Lake Jersey Nesting Refinement Examples
Example Menu
  1. Introduction
  2. Lake Jersey AB
  4. Lake Jersey AC
  3. Lake Jersey AD
  5. Lake Jersey ABD
  7. Lake Jersey ADE
  6. Lake Jersey ABDC
  8. Lake Jersey ACDE


The Lake Jersey test case is primarily used to evaluate the nesting algorithms for the Refinement Grids Super-Class. It is activated with C-preprocessing options LAKE_JERSEY and NESTING. The nesting algorithms in ROMS are two-way by default. The option ONE_WAY can be used for just one-way exchange between donor (dg) and receiver (rg) grids. However, the one-way exchange has no effect whatsoever on the coarser donor grid because there is no feed back of information. Notice that due to its higher spatial and temporal resolutions, the finer grid is better resolving the physical phenomena at smaller scales.

This example is a simple refinement application with two grids: coarse (a) and fine (b). There are two contact regions (cr) and two nesting layers because two different time-step sizes are required in

  • Number of nested grids.
    Ngrids = 2
  • Number of grid nesting layers. This parameter is used to allow refinement and composite grid combinations.
  • Time-stepping parameters.
    NTIMES == 1440 4320  ! Number of time steps
    DT == 120.0d0 40.0d0  ! Time-step size (seconds)
    NDTFAST == 30 30  ! Number of barotropic steps
  • Input NetCDF file names, [1:Ngrids] values are expected. The order of the grids are extremely important in nesting applications.
    GRDNAME == ../Data/ \

    ININAME == ../Data/ \
  • Nesting grids connectivity data: contact points information. This NetCDF file is special and complex. It is currently generated using the script matlab/grid/contact.m from the Matlab repository.
    NGCNAME = ../Data/
  • Notice that since the coarse grid (a) is an enclosed basin, all lateral boundary conditions on that grid are set to closed (Clo) while the refined grid (b), which is entirely enclosed by the coarse grid, has nested (Nes) lateral boundary conditions.
    LBC(isFsur) == Clo Clo Clo Clo \  ! free-surface, Grid 1
    Nes Nes Nes Nes  ! free-surface, Grid 2

    LBC(isUbar) == Clo Clo Clo Clo \  ! 2D U-momentum, Grid 1
    Nes Nes Nes Nes  ! 2D U-momentum, Grid 2

    LBC(isVbar) == Clo Clo Clo Clo \  ! 2D V-momentum, Grid 1
    Nes Nes Nes Nes  ! 2D V-momentum, Grid 2

    LBC(isUvel) == Clo Clo Clo Clo \  ! 3D U-momentum, Grid 1
    Nes Nes Nes Nes  ! 3D U-momentum, Grid 2

    LBC(isVvel) == Clo Clo Clo Clo \  ! 3D V-momentum, Grid 1
    Nes Nes Nes Nes  ! 3D V-momentum, Grid 2

    LBC(isMtke) == Clo Clo Clo Clo \  ! mixing TKE, Grid 1
    Nes Nes Nes Nes  ! mixing TKE, Grid 2

    LBC(isTvar) == Clo Clo Clo Clo \  ! temperature, Grid 1
    Clo Clo Clo Clo \  ! salinity, Grid 1
    Nes Nes Nes Nes \  ! temperature, Grid 2
    Nes Nes Nes Nes  ! salinity, Grid 2

The following tables summarize the nested grids information:

Grid Information
Grid ng Mesh
a 1 100x80 - 500.0 m 120.0
b 2 66x99 1:3 from a 166.6 m 40.0

Contact Region Information
cr dg rg
1 1 (a) 2 (b)
2 2 (b) 1 (a)

The Nested Grids Connectivity (NGC) input NetCDF file is created in Matlab using the following commands:

 >>  Gnames = {'', ''};
>> Cname = '';
>> [S,G] = contact(Gnames, Cname);

This creates several figures with useful information. Users need to download the grid processing scripts from ROMS Matlab repository. This Matlab script is quite complex because the nested connectivity is not trivial and is done outside of ROMS for efficiency. See the following pages for detailed information and diagrams.


The plots below show the results after 2 days of simulation for one-way and two-way nesting configurations. They are plotted with Matlab using the script plot_nesting.m. The refined solution (grid b) is overlayed on top of the coarse grid (a). The color map is rendered using shading flat, meaning there is no interpolation between pixels in the color maps. Click the figure to see a more detailed image. On the resulting page a link to the full resolution image is provided.

The figures below were created in Matlab using the following commands:

 >>  Gnames = {'', ''};
>> Anames = {'', ''};
>> Hnames = {'', ''};
>> G = grids_structure (Hnames, Hnames);
>> F = plot_nesting (G, Hnames, 'temp', 97, 8, 1, true);
>> F = plot_nesting (G, Hnames, 'salt', 97, 8, 1, true);
>> F = plot_nesting (G, Hnames, 'zeta', 97, 8, 1, true);
>> F = plot_nesting (G, Anames, 'rvorticity_bar', 97, 8, 1, true);

Again, users need to download these scripts from the ROMS Matlab repository.