Difference between revisions of "Lake Jersey Refinement Example AB"

From WikiROMS
Jump to navigationJump to search
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="title">Lake Jersey Nesting Refinement Example</div>__NOTOC__
<div class="title">Lake Jersey Nesting Refinement Examples</div>__NOTOC__


<!-- Edit Template:Refinement_Exe_TOC to modify this Table of Contents-->
<!-- Edit Template:Refinement_Exe_TOC to modify this Table of Contents-->
Line 5: Line 5:


<div style="clear: both"></div>
<div style="clear: both"></div>
==Description==
==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 [[Options#LAKE_JERSEY|LAKE_JERSEY]] and [[Options#NESTING|NESTING]]. The nesting algorithms in ROMS are two-way by default.  The option [[Options#ONE_WAY|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.
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 [[Options#LAKE_JERSEY|LAKE_JERSEY]] and [[Options#NESTING|NESTING]]. The nesting algorithms in ROMS are two-way by default.  The option [[Options#ONE_WAY|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 nesting layers because two different time-step sizes are required in [[ocean_lake_jersey_nested_2g_ab.in]]:
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 <span class="forestGreen">ocean_lake_jersey_nested_2g_ab.in</span>:




Line 20: Line 21:
* Time-stepping parameters.<div class="box">      [[Variables#ntimes|NTIMES]] == 1440      4320    ! Number of time steps<br />          [[Variables#dt|DT]] == 120.0d0  40.0d0  ! Time-step size (seconds)<br />    [[Variables#ndtfast|NDTFAST]] == 30        30      ! Number of barotropic steps</div>
* Time-stepping parameters.<div class="box">      [[Variables#ntimes|NTIMES]] == 1440      4320    ! Number of time steps<br />          [[Variables#dt|DT]] == 120.0d0  40.0d0  ! Time-step size (seconds)<br />    [[Variables#ndtfast|NDTFAST]] == 30        30      ! Number of barotropic steps</div>


* Input NetCDF file names, [1:Ngrids] values are expected. The order of the grids are extremely important in nesting applications.<div class="box">    [[Variables#GRD|GRDNAME]] == ../Data/lake_jersey_grd_a.nc      \<br />                ../Data/lake_jersey_grd_b.nc <br /><br />    [[Variables#INI|ININAME]] == ../Data/lake_jersey_ini_a.nc      \<br />                ../Data/lake_jersey_ini_b.nc <br /></div>
* Input NetCDF file names, [1:[[Variables#Ngrids|Ngrids]]] values are expected. The order of the grids are extremely important in nesting applications.<div class="box">    [[Variables#GRD|GRDNAME]] == ../Data/lake_jersey_grd_a.nc      \<br />                ../Data/lake_jersey_grd_b.nc <br /><br />    [[Variables#INI|ININAME]] == ../Data/lake_jersey_ini_a.nc      \<br />                ../Data/lake_jersey_ini_b.nc <br /></div>


* Nesting grids connectivity data: contact points information. This NetCDF file is special and complex. It is currently generated using the script [[contact.m|matlab/grid/contact.m]] from the Matlab repository.<div class="box">    [[Variables#NGCname|NGCNAME]] =  ../Data/lake_jersey_ngc_2g_ab.nc</div>
* Nesting grids connectivity data: contact points information. This NetCDF file is special and complex. It is currently generated using the script [[contact.m|matlab/grid/contact.m]] from the Matlab repository.<div class="box">    [[Variables#NGCname|NGCNAME]] =  ../Data/lake_jersey_ngc_2g_ab.nc</div>


* 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.<div class="box">  [[Variables#LBC|LBC(isFsur)]] ==  Clo    Clo    Clo    Clo \      ! free-surface,  Grid 1<br />                    Nes    Nes    Nes    Nes        ! free-surface,  Grid 2<br /><br />  [[Variables#LBC|LBC(isUbar)]] ==  Clo    Clo    Clo    Clo \      ! 2D U-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 2D U-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isVbar)]] ==  Clo    Clo    Clo    Clo \      ! 2D V-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 2D V-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isUvel)]] ==  Clo    Clo    Clo    Clo \      ! 3D U-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 3D U-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isVvel)]] ==  Clo    Clo    Clo    Clo \      ! 3D V-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 3D V-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isMtke)]] ==  Clo    Clo    Clo    Clo \      ! mixing TKE,    Grid 1<br />                    Nes    Nes    Nes    Nes        ! mixing TKE,    Grid 2<br /><br />  [[Variables#LBC|LBC(isTvar)]] ==  Clo    Clo    Clo    Clo \      ! temperature,  Grid 1<br />                    Clo    Clo    Clo    Clo \      ! salinity,      Grid 1<br />                    Nes    Nes    Nes    Nes \      ! temperature,  Grid 2<br />                    Nes    Nes    Nes    Nes        ! salinity,      Grid 2<br /></div>  
* 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.<div class="box">  [[Variables#LBC|LBC(isFsur)]] ==  Clo    Clo    Clo    Clo \      ! free-surface,  Grid 1<br />                    Nes    Nes    Nes    Nes        ! free-surface,  Grid 2<br /><br />  [[Variables#LBC|LBC(isUbar)]] ==  Clo    Clo    Clo    Clo \      ! 2D U-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 2D U-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isVbar)]] ==  Clo    Clo    Clo    Clo \      ! 2D V-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 2D V-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isUvel)]] ==  Clo    Clo    Clo    Clo \      ! 3D U-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 3D U-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isVvel)]] ==  Clo    Clo    Clo    Clo \      ! 3D V-momentum, Grid 1<br />                    Nes    Nes    Nes    Nes        ! 3D V-momentum, Grid 2<br /><br />  [[Variables#LBC|LBC(isMtke)]] ==  Clo    Clo    Clo    Clo \      ! mixing TKE,    Grid 1<br />                    Nes    Nes    Nes    Nes        ! mixing TKE,    Grid 2<br /><br />  [[Variables#LBC|LBC(isTvar)]] ==  Clo    Clo    Clo    Clo \      ! temperature,  Grid 1<br />                    Clo    Clo    Clo    Clo \      ! salinity,      Grid 1<br />                    Nes    Nes    Nes    Nes \      ! temperature,  Grid 2<br />                    Nes    Nes    Nes    Nes        ! salinity,      Grid 2<br /></div>  




Line 37: Line 38:
!ng
!ng
!Mesh<br />Size
!Mesh<br />Size
!Refinement<br />Factor(m)
!Refinement<br />Factor
!&Delta;x<br />&Delta;y
!&Delta;x<br />&Delta;y
!dt<br />(s)
!dt<br />(s)
|-
|-
|align="center" | A
|align="center" | '''a'''
|align="center" | 1
|align="center" | 1
|align="center" | 100x80
|align="center" | 100x80
|align="center" | <nowiki>-</nowiki>
|align="center" | <nowiki>-</nowiki>
|align="center" | 500
|align="center" | 500.0 m
|align="center" | 120
|align="center" | 120.0
|-
|-
|align="center" | B
|align="center" | '''b'''
|align="center" | 2
|align="center" | 2
|align="center" | 66x99
|align="center" | 66x99
|align="center" | 1:3 from A
|align="center" | 1:3 from '''a'''
|align="center" | 166.6
|align="center" | 166.6 m
|align="center" | 40
|align="center" | 40.0
|}
|}


Line 67: Line 68:
|-
|-
|align="center" | 1
|align="center" | 1
|align="center" | 1 (A)
|align="center" | 1 ('''a''')
|align="center" | 2 (B)
|align="center" | 2 ('''b''')
|-
|-
|align="center" | 2
|align="center" | 2
|align="center" | 2 (B)
|align="center" | 2 ('''b''')
|align="center" | 1 (A)
|align="center" | 1 ('''a''')
|}
|}


Line 82: Line 83:
  <span class="twilightBlue"> >>  Gnames = {'lake_jersey_grd_a.nc', 'lake_jersey_grd_b.nc'};<br \> >>  Cname  = 'lake_jersey_ngc_2g_ab.nc';<br \> >>  [S,G] = contact(Gnames, Cname);</span>
  <span class="twilightBlue"> >>  Gnames = {'lake_jersey_grd_a.nc', 'lake_jersey_grd_b.nc'};<br \> >>  Cname  = 'lake_jersey_ngc_2g_ab.nc';<br \> >>  [S,G] = contact(Gnames, Cname);</span>


This creates several figures with useful information. Users need to download the [[Grid_Processing_Scripts | grid processing scripts]] from ROMS Matlab repository.  This Matlab script is quite complex because the nested connective is not trivial and is done outside of ROMS for efficiency. See the following [[Nested_Grids|pages for detailed information and diagrams]].
This creates several figures with useful information. Users need to download the [[Grid_Processing_Scripts | 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 [[Nested_Grids|pages for detailed information and diagrams]].


==Results==
==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 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 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. <span class="orange">Click the figure to see a more detailed image. On the resulting page a link to the full resolution image is provided</span>.


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




<gallery widths=500px heights=350px perrow=2 caption="3-hour Averaged Vertically Integrated Relative Vorticity (1/s)">
<gallery widths=500px heights=350px perrow=2 caption="30-minute Averaged Vertically Integrated Relative Vorticity (1/s)">
Image:lake_jersey_rvorticity_bar_oneway_2g_ab.png|<center>One-way</center>
Image:lake_jersey_rvorticity_bar_oneway_2g_ab.png|<center>One-way</center>
Image:lake_jersey_rvorticity_bar_twoway_2g_ab.png|<center>Two-way</center>
Image:lake_jersey_rvorticity_bar_twoway_2g_ab.png|<center>Two-way</center>
</gallery>
</gallery>

Revision as of 14:48, 12 December 2014

Lake Jersey Nesting Refinement Examples

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 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 ocean_lake_jersey_nested_2g_ab.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/lake_jersey_grd_a.nc \
    ../Data/lake_jersey_grd_b.nc

    ININAME == ../Data/lake_jersey_ini_a.nc \
    ../Data/lake_jersey_ini_b.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_2g_ab.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 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
Size
Refinement
Factor
Δx
Δy
dt
(s)
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 = {'lake_jersey_grd_a.nc', 'lake_jersey_grd_b.nc'};
>> Cname = 'lake_jersey_ngc_2g_ab.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 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 = {'lake_jersey_grd_a.nc', 'lake_jersey_grd_b.nc'};
>> Anames = {'lake_jersey_avg_a.nc', 'lake_jersey_avg_b.nc'};
>> Hnames = {'lake_jersey_his_a.nc', 'lake_jersey_his_b.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.