Skip to content

Generating Stretched Input Grids

Miguel R Zuniga edited this page May 20, 2022 · 1 revision

Instructions for generating stretched input grids.

A stretched grid generation is not much different from regular cubed-sphere grid generation.

The cubed-sphere grid is a projection of a cube onto the surface of a sphere represented as six adjoining grid faces which seamlessly cover the whole globe.

There are only a few additional arguments added to the already available make_hgrid program in order to accomplish this task.

Initially, to start a grid generation user must set the Schmidt transformation to create a stretched grid, which is a set of linearly independent vectors into a set of orthonormal vectors that span the same space spanned by the original set.

Instructions For Remapping A Diagnostic Regional History File:

Case: Cubed-Sphere stretched grid stretched by a factor of 1.5 centered at (97.50W,36.50N) Nest parent tile 6 refinement ratio of 3x nest halo test of three grid cells parent tile supergrid indices for the nest SW corner (97,347) and NE corner (1440,1066) resulting grid is 2016x1080 (4032x2160 supergrid)

Diagnostic regional grid bounding box (determined by looking at the output file): 272.698E,45.086N 288.957E,42.088N 272.305E,42.064N 288.072E,39.366N

Remapped diagnostic regional grid bounding box (area of interestt): 288.750E,45.000N 272.750E,45.000N 288.750E,42.250N 272.750E,42.250N

Requirement: Diagnostic regional grid file output by diagnostic manager Limitation: Conserve order-1 is only supported remapping for this grid type

Make your horizontal model native grid file, in this case a stretched global w/ nest : make_hgrid --grid_type gnomonic_ed --nlon 1536 --grid_name C768_grid
--do_schmidt --stretch_factor 1.5 --target_lon -97.5 --target_lat 36.5
--nest_grid --parent_tile 6 --refine_ratio 3 --istart_nest 97 --jstart_nest 347
--iend_nest 1440 --jend_nest 1066 --halo 3 --great_circle_algorithm

Make the solo mosaic for the native grid: make_solo_mosaic --num_tiles 7 --dir . --mosaic C768_mosaic
--tile_file C768_grid.tile1.nc,C768_grid.tile2.nc,C768_grid.tile3.nc,
C768_grid.tile4.nc,C768_grid.tile5.nc,C768_grid.tile6.nc,C768_grid.tile7.nc

Create a regional mosaic using the diagnostic regional grid info output by the diag_manager: make_regional_mosaic --global_mosaic C768_mosaic.nc
--regional_file

Create a remap weight using fregrid for bounding box listed above with 1/32-nd degree spacing for the regional output: fregrid --input_mosaic regional_mosaic.nc --nlon 512 --nlat 88
--remap_file
--lonBegin 275.75 --lonEnd 288.75 --latBegin 42.25 --latEnd 45.00

Remap the data in the regional history output to the remap bounding box listed above: fregrid --input_mosaic regional_mosaic.nc --nlon 512 --nlat 88
--remap_file
--input_file
--output_file
--scalar_field
--lonBegin 275.75 --lonEnd 288.75 --latBegin 42.25 --latEnd 45.0

Instructions For Remapping A Nested Domain:

Make your horizontal model native grid file, in this case a stretched nest (1.5 factor and 3x refinement): make_hgrid --grid_type gnomonic_ed --nlon 1536 --grid_name C768_grid
--do_schmidt --stretch_factor 1.5 --target_lon -97.5 --target_lat 36.5
--nest_grid --parent_tile 6 --refine_ratio 3 --istart_nest 97 --jstart_nest 347
--iend_nest 1440 --jend_nest 1066 --halo 3 --great_circle_algorithm

Make the solo mosaic for the native grid: make_solo_mosaic --num_tiles 7 --dir . --mosaic C768_mosaic
--tile_file C768_grid.tile1.nc,C768_grid.tile2.nc,C768_grid.tile3.nc,
C768_grid.tile4.nc,C768_grid.tile5.nc,C768_grid.tile6.nc,C768_grid.tile7.nc

Make the solo mosaic for the nested tile grid: make_solo_mosaic --num_tiles 1 --dir . --mosaic C768_nested_mosaic
--tile_file C768_grid.tile7.nc

Create a remap weight using fregrid for bounding box listed above with 1/32-nd degree spacing for the regional output: fregrid --input_mosaic regional_mosaic.nc --nlon 512 --nlat 88
--remap_file
--lonBegin 275.75 --lonEnd 288.75 --latBegin 42.25 --latEnd 45.00

Remap the data in the regional history output to the remap bounding box listed above: fregrid --input_mosaic regional_mosaic.nc --nlon 512 --nlat 88
--remap_file
--input_file
--output_file
--scalar_field
--lonBegin 275.75 --lonEnd 288.75 --latBegin 42.25 --latEnd 45.0