Tips when creating a new grid

When using VRM_Editor: 

On mac: use 3-button scroll mouse to zoom in on map; use arrow keys to move map

On windows (via SSH terminal on Casper): scroll mouse to zoom in on map; however, arrow keys do not work for some reason.
Instead, use: 
Left → Insert; Right → Page Up; Up → Print Screen; Down → Page Down

Best Practices and Tips:

  • Refinement regions whose boundaries are aligned with spectral element grid lines tend to behave better numerically.
  • Regions that “look” good – have a uniform/symmetric appearance – tend to behave better numerically.
  • Convex regions tend to behave better numerically compared to regions that have concave edges.
  • In general, LOWCONN should be used instead of CUBIT.
  • Always use some amount of SPRING smoothing.
  • When creating a high resolution refined region (e.g., ne240) try to have each halo (successive resolutions) be several cells wide on all sides of the domain.
  • When making a small refined region you might want to start with ne60 grid (instead of ne30).
  • In the polygon editor of VRM Editor, the number of vertices can not be increased more than 8. When making a large refined region try using multiple polygons in VRM Editor to get edges that follow the SE grid lines.
  • To smooth edges in VRM Editor, adjust lon shift and x-shift by small amounts (0.1 deg).
  • If you are having trouble with a grid, e.g. it needs large sub-cycling settings, then there is likely a problem with your grid. In the long run, you are better off iterating with variations/adjustments to your grid to get better performance. 
  • You may want to save refinement map frequently, because the VRM editor sometimes crashes. When there is a crash, you can restart your work from the saving point. 


Q1. In VRM_Editor, although I make my polygon to exactly match the guide grid lines, when I make the regional refinement map, it doesn’t follow the grid lines. What is the reason?

A1. This is because the refinement map has a resolution of 720x360 lat/lon grid in the current VRM editor. The VRM editor is using a 720x360 map to make it interactive to use. So there will be limitations on how well it can adhere to curvy lines on small scales. You don’t have to strictly force your regional refinement map to follow grid lines, instead, we recommend you try to do a 5-day test run with your best grid even if it has some distortion. 


Troubleshooting

Error 1. gen_domains

../../../configure --macros-format Makefile --mpilib mpi-serial

ERROR: Invalid compiler vendor given in COMPILER environment variable: ifort

→ This error occurred when I used the default ifort version on Cheyenne as of 7-Nov-2020, I could solve the problem by changing ifort version from 19.0.5 to 18.0.5 (see “Compile CESM prerequisite programs in CESM tools” in Patrick’s PDF document (VRM_Grids_For_CAMSE.pdf))

module load intel/18.0.5


Error 2. Build Gen_ControlVolumes Program

(base) -bash-4.2$ make
gfortran -c -I/glade/u/apps/dav/opt/netcdf/4.7.3/intel/19.0.5/include -g  SE_ControlVolume_mod.F90
f951: Fatal Error: Reading module ??netcdf?? at line 1 column 2: Unexpected EOF
compilation terminated.
make: *** [SE_ControlVolume_mod.o] Error 1

→ Should set NCAR library variables again after you load gnu module “module load gnu/9.1.0”

export LIB_NETCDF=$NCAR_LDFLAGS_NETCDF

export INC_NETCDF=$NCAR_INC_NETCDF


Error 3. There is a 80 character limit in GridPath variable, although the Gen_ControlVolumes program is using 240 character for the GridPath variable. This seems to be caused by nf90_open subroutine in NetCDF library, which uses character length of 80. To solve this problem, you can simply reduce the GridPath length below 80 characters (in input_nl). 

./Gen_ControlVolumes.exe input_nl
 
Gen_ControlVolumes.exe Reading namlist values from: input_nl                                                                                                                                                                                                                                       
 
  OPENING: namelist file = input_nl
  np=           4
  npts=           4

============================================
        Testing Gaussian Quadrature...

          points              weights
============================================
          1 -0.86113631159405257       0.34785484513745374    
          2 -0.33998104358485626       0.65214515486254643    
          3  0.33998104358485626       0.65214515486254643    
          4  0.86113631159405257       0.34785484513745374    
============================================
sum of Gaussian weights=   2.0000000000000004    
============================================

============================================
      Testing Gauss-Lobatto Quadrature...

          points              weights
============================================
          1  -1.0000000000000000       0.16666666666666666    
          2 -0.44721359549995793       0.83333333333333337    
          3  0.44721359549995793       0.83333333333333337    
          4   1.0000000000000000       0.16666666666666666    
============================================
sum of Gauss-Lobatto weights=   2.0000000000000000    
============================================
Opening Mesh File:/glade/p/nsc/nacd0023/VRM_tools/For_MUSICA_as_of_20201022/VRM_Files/ne0np4.KORUSKORUS01.ne30x8_EXODUS.nc
  PFC: max_elements_attached_to_node =           8           8
  PFC: max_corner_elem =           5           5
mesh_mod.F90:         157 : No such file or directory
Terminating program due to netcdf error while obtaining mesh information, please see message in standard output


Error 4. While running gen_CLMsrfdata

gridmap_map_read) * file name                  : /glade/p/nsc/nacd0023/VRM_Files//ne0np4.KORUS01.ne30x8/maps_clm//map_0.25x0.25_MODIS_to_ne0np4.KORUS01.ne30x8_nomask_aave_da_c201109.nc
* matrix dimensions rows x cols :     1036800  x       57917
* number of non-zero elements:       570509
(gridmap_map_read)  ERROR: frac_src out of bounds
max =    1.05450415506562       min =   0.000000000000000E+000
abort: ERROR in mksurfdata_map: 34304

It might be caused by that your new grid has some defects in terms of following grid lines and distortion of the halo region. You may need to redesign your map. 

Still have questions?

Visit the DiscussCESM forum (bulletin board) to search for answers related to your questions, or ask a new question:



  • No labels