Lake Jersey Refinement Example ACDE

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

Description

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 complex refinement application with four grids: Coarse grid a, 1:5 refinement (c), and two telescoping refinements (d and e). The two telescoping grids (d and e) are ordered last in the list of input grids for solution. Notice that the two telescoping grids (d and e) are ordered last. There are six contact regions (cr) and four nesting layers because four different time-step sizes are required in ocean_lake_jersey_nested_4g_acde.in:


  • Number of nested grids.
    Ngrids = 4
  • Number of grid nesting layers. This parameter is used to allow refinement and composite grid combinations.
  • Time-stepping parameters.
    NTIMES == 1920 9600 5760 17280
    DT == 90.0d0 18.0d0 30.0d0 10.0d0
    NDTFAST == 30 30 30 30
  • Input NetCDF file names, [1:Ngrids] values are expected. The order of the grids are extremely important in nesting applications.
    GRDNAME == ../Data/lake_jersey_grd_a.nc \
    ../Data/lake_jersey_grd_c.nc \
    ../Data/lake_jersey_grd_d.nc \
    ../Data/lake_jersey_grd_e.nc

    ININAME == ../Data/lake_jersey_ini_a.nc \
    ../Data/lake_jersey_ini_c.nc \
    ../Data/lake_jersey_ini_d.nc \
    ../Data/lake_jersey_ini_e.nc
  • 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/lake_jersey_ngc_4g_acde.nc
  • 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 grids (c, d, and e), which are entirely enclosed by a coarser grid, have nested (Nes) lateral boundary conditions.
    LBC(isFsur) == Clo Clo Clo Clo \  ! free-surface, Grid 1
    Nes Nes Nes Nes \  ! free-surface, Grid 2
    Nes Nes Nes Nes \  ! free-surface, Grid 3
    Nes Nes Nes Nes  ! free-surface, Grid 4

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

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

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

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

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

    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
    Nes Nes Nes Nes \  ! temperature, Grid 3
    Nes Nes Nes Nes \  ! salinity, Grid 3
    Nes Nes Nes Nes \  ! temperature, Grid 4
    Nes Nes Nes Nes  ! salinity, Grid 4


The following tables summarize the nested grids information:


Grid Information
Grid ng Mesh
Size
Refinement
Factor
Δx
Δy
dt
(s)
a 1 100x80x8 - 500.0 m 90.0
c 2 120x130x8 1:5 from a 100.0 m 18.0
d 3 114x60x8 1:3 from a 166.6 m 30.0
e 4 132x60x8 1:3 from d 55.5 m 10.0


Contact Region Information
cr dg rg
1 1 (a) 2 (c)
2 1 (a) 3 (d)
3 2 (c) 1 (a)
4 3 (d) 1 (a)
5 3 (d) 4 (e)
6 4 (e) 3 (d)


Note Notice: In two-way nesting with a complex configuration, you need to check if the FINE2COARSE message in the standard output file is done at the correct time-step and in the right sequence. In this example, grid c completes 5 time-steps and then feedback to grid a, grid d exchanges information with grid c every 3 time-steps after grid c performs a single time-step. This is done 3 times in a row because the refinement ratio between grids c and d is 1:3. Then, grid c exchanges information with grid a. The standard output below has been colored for each nested grid to facilitate reading

   STEP   Day HH:MM:SS  KINETIC_ENRG   POTEN_ENRG    TOTAL_ENRG    NET_VOLUME  Grid
         C => (i,j,k)       Cu            Cv            Cw         Max Speed

0 0 00:00:00 0.000000E+00 8.810744E+01 8.810744E+01 3.600000E+10 01 (000,00,0) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 DEF_HIS - creating history file, Grid 01: lake_jersey_his_a.nc WRT_HIS - wrote history fields (Index=1,1) into time record = 0000001 01 DEF_AVG - creating average file, Grid 01: lake_jersey_avg_a.nc 0 0 00:00:00 0.000000E+00 8.832187E+01 8.832187E+01 2.808000E+09 02 (000,000,0) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 DEF_HIS - creating history file, Grid 02: lake_jersey_his_c.nc WRT_HIS - wrote history fields (Index=1,1) into time record = 0000001 02 DEF_AVG - creating average file, Grid 02: lake_jersey_avg_c.nc 1 0 00:00:18 2.305157E-08 8.832187E+01 8.832187E+01 2.808000E+09 02 (119,130,8) 1.337117E-04 1.265846E-07 0.000000E+00 7.433504E-04 2 0 00:00:36 9.146359E-08 8.832187E+01 8.832187E+01 2.808000E+09 02 (118,003,8) 2.449648E-04 4.541085E-07 1.022608E-04 1.361476E-03 3 0 00:00:54 2.054711E-07 8.832187E+01 8.832187E+01 2.808000E+09 02 (116,005,8) 3.545964E-04 9.588826E-07 8.745096E-05 1.979927E-03 4 0 00:01:12 3.652887E-07 8.832187E+01 8.832187E+01 2.808000E+09 02 (114,007,8) 4.645087E-04 1.661081E-06 7.173268E-05 2.598741E-03 FINE2COARSE - exchanging data between grids: dg = 02 and rg = 01 at cr = 03 0 0 00:00:00 0.000000E+00 8.832187E+01 8.832187E+01 3.420000E+09 03 (000,00,0) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 DEF_HIS - creating history file, Grid 03: lake_jersey_his_d.nc WRT_HIS - wrote history fields (Index=1,1) into time record = 0000001 03 DEF_AVG - creating average file, Grid 03: lake_jersey_avg_d.nc 0 0 00:00:00 0.000000E+00 8.832187E+01 8.832187E+01 4.400000E+08 04 (000,00,0) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 DEF_HIS - creating history file, Grid 04: lake_jersey_his_e.nc WRT_HIS - wrote history fields (Index=1,1) into time record = 0000001 04 DEF_AVG - creating average file, Grid 04: lake_jersey_avg_e.nc 1 0 00:00:10 6.959677E-09 8.832187E+01 8.832187E+01 4.400000E+08 04 (131,02,8) 6.798364E-05 1.615316E-08 0.000000E+00 3.777368E-04 2 0 00:00:20 2.777576E-08 8.832187E+01 8.832187E+01 4.400000E+08 04 (130,03,8) 1.279516E-04 1.109439E-07 3.042578E-05 7.177313E-04 FINE2COARSE - exchanging data between grids: dg = 04 and rg = 03 at cr = 06 1 0 00:00:30 6.273202E-08 8.832187E+01 8.832187E+01 3.420000E+09 03 (113,02,8) 2.039125E-04 1.453791E-07 0.000000E+00 1.132997E-03 3 0 00:00:30 6.246794E-08 8.832187E+01 8.832187E+01 4.400000E+08 04 (128,05,8) 1.885273E-04 2.644876E-07 2.399886E-05 1.057567E-03 4 0 00:00:40 1.116552E-07 8.832187E+01 8.832187E+01 4.400000E+08 04 (131,02,8) 2.514380E-04 1.283163E-06 2.472931E-05 1.400478E-03 5 0 00:00:50 1.749418E-07 8.832187E+01 8.832187E+01 4.400000E+08 04 (130,03,8) 3.147309E-04 1.620478E-06 5.724897E-05 1.749841E-03 FINE2COARSE - exchanging data between grids: dg = 04 and rg = 03 at cr = 06 2 0 00:01:00 2.514723E-07 8.832187E+01 8.832187E+01 3.420000E+09 03 (112,03,8) 3.847356E-04 9.983178E-07 9.152179E-05 2.158263E-03 6 0 00:01:00 2.522627E-07 8.832187E+01 8.832187E+01 4.400000E+08 04 (128,01,8) 3.772862E-04 1.692145E-06 4.848581E-05 2.102508E-03 7 0 00:01:10 3.447488E-07 8.832187E+01 8.832187E+01 4.400000E+08 04 (126,60,8) 4.403682E-04 3.378879E-06 4.192504E-05 2.446613E-03 8 0 00:01:20 4.514873E-07 8.832187E+01 8.832187E+01 4.400000E+08 04 (130,02,8) 5.016708E-04 3.203450E-06 5.328500E-05 2.788662E-03 FINE2COARSE - exchanging data between grids: dg = 04 and rg = 03 at cr = 06 FINE2COARSE - exchanging data between grids: dg = 03 and rg = 01 at cr = 04 1 0 00:01:30 4.998866E-07 8.810744E+01 8.810744E+01 3.600000E+10 01 (020,63,8) 5.528460E-04 1.941304E-05 0.000000E+00 3.148106E-03


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

 >>  Gnames = {'lake_jersey_grd_a.nc', 'lake_jersey_grd_c.nc', 'lake_jersey_grd_d.nc', 'lake_jersey_grd_e.nc'};
>> Cname = 'lake_jersey_ngc_4g_acde.nc';
>> [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.

Results

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 solutions (c, and d) are overlayed on top of the coarse grid (a) and e is a overlayed on top of d. 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 = {'lake_jersey_grd_a.nc', 'lake_jersey_grd_c.nc', 'lake_jersey_grd_d.nc', 'lake_jersey_grd_e.nc'};
>> Anames = {'lake_jersey_avg_a.nc', 'lake_jersey_avg_c.nc', 'lake_jersey_avg_d.nc', 'lake_jersey_avg_e.nc'};
>> Hnames = {'lake_jersey_his_a.nc', 'lake_jersey_his_c.nc', 'lake_jersey_his_d.nc', 'lake_jersey_his_e.nc'};
>>
>> 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.