Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Action (1) has to be performed by either:

    A) HOMME template run and ncl scripts if the mesh is uniform (NE=4, NE=10, etc.). An example of a template run is in ACME HOMME test suite. The run does not need a mesh file, it only uses NE parameter. Once the template run generates an *.nc file, use it in scripts HOMME2META.ncl and HOMME2SCRIP.ncl to get files *_latlon.nc and *_scrip.nc . The ncl scripts are in ACME/components/homme/test/template/ .

    The only difference between template runs and usual HOMME runs is in which variables are recorded in output *nc files. Output variables are controlled by an input *nl file that HOMME takes in. In the template *nl file in HOMME test suite these vars are listed for output: 

    output_varnames1='phys_area','area','corners','hypervis','cv_lat','cv_lon','phys_lat','phys_lon','phys_cv_lat','phys_cv_lon'

    Note that soon 'phys_area' which is used for FVM transport in HOMME, will be removed from the code.

    Template runs need only 1 time step.

    B) A Matlab script if HOMME mesh is a refined mesh (NE=0). How to create a refined HOMME mesh is not a topic of this page. Refer to SquadGen utility as one of tools. Once a *.g file is created, the Matlab script creates a dual grid in *_scrip.nc file and latlon information in *_latlon.nc . The Matlab script is now checked out to ACME git repository ACME-Climate/PreAndPostProcessingScripts/spectral_elements_grid_utilities . The script that creates both files is dualgridgenerate.m . A script that performs some verification checks on the resulting mesh is geometric_statistics_twisting_center_location.m .

    Note that route A) won’t work with locally refined meshes since HOMME template runs do not handle such grids. Technically, route B) works for uniform meshes if they are recorded in *.g file. However, due to recent changes in HOMME for consistency of elements’ areas, one should be careful to use the same consistency method in HOMME during a simulation as in Matlab when constructing dual meshes. To keep it short, B) is not recommended for uniform meshes. 

    C) Action 1 and 2 can be done by Tempest Remap. Details will be added later.

  2. Action (2) maps HOMME grid from/to another grid (SCRIP file), records mappings in _aave*nc and _bilin*nc files, and is done by an (A) ESMF utility or (B) ncremap, see comment by Charlie Zender below. Most recent scripts for this action are in https://github.com/mt5555/remap-ncl/ , the script is makemap.sh . If, for example, another grid is an ocean grid, then one should add ‘ --src_regional -i ‘ to the command line of the ESMF utility (as said in makemap.sh ) since ocean grids do not cover the whole globe. To create mapping files atmosphere->ocean, one can run a batch script with a command line similar to

    ./remap-ncl/makemap.sh conusx4v1np4b_scrip.nc ocean.RRS.15-5km_scrip_150722.nc map_conusx4v1np4b_to_oRRS15to5

    It takes approx. 20 min on skybridge for these particular files and 32 cores. To change number of cores, modify makemap.job . An attempt to run the script in other direction, ocean→atmosphere, did not work. It also seems unnecessary because the next step takes only files from atmosphere->ocean iterationTo create mapping files ocean→atmosphere, add '--dst_regional -i' in makemap.job.

    By Charlie Zender:

    Action (2) can be performed by ncremap (documentation) which, among other capabilities, uses ESMF or Tempest to generate mapfiles between *_scrip.nc and *.g grids. One benefit of ncremap is the improved provenance retained in the metadata of the generated maps. In theory, the following two ncremap calls could replace makemap.sh:

    ncremap -w esmf -a conserve -s conusx4v1np4b_scrip.nc -g ocean.RRS.15-5km_scrip_150722.nc -m map_conusx4v1np4b_to_oRRS15to5_aave.nc
    ncremap -w esmf -a bilinear -s conusx4v1np4b_scrip.nc -g ocean.RRS.15-5km_scrip_150722.nc -m map_conusx4v1np4b_to_oRRS15to5_bilin.nc

    (and dash-w tempest without any dash-a option would use Tempest for the maps). However, no one to my knowledge has yet used ncremap for the intermediate step (i.e., step 2) of making domain files (in contrast to end-product mapfiles, which is well-tested). I would be interested in any feedback from those who make domain files on the efficacy of using ncremap.

  3. Action (3) uses gen_domain utility from ACME/CESM. There are instructions to build it in ACME/cime/tools/mapping/gen_domain_files/README (ignore INSTALL, there is a typo). After gen_domain is built, the command is, for example,
    mpiexec -n 1 ~/ACME/cime/tools/mapping/gen_domain_files/gen_domain -m map_oRRS15to5_to_conusx4v1np4b_aave.nc -o oRRS15to5 -l ne0np4_conus_x4v1_lowcon

    For domain files, one should find proper aliases (in our example aliases are oRRS15to5 and ne0np4_conus_x4v1_lowcon) for atmosphere and the other grid in ACME/cime/scripts/Tools/config_grid.xml . The resulting files are

    domain.lnd.ne0np4_conus_x4v1_lowcon_oRRS15to5.160808.nc

    domain.ocn.ne0np4_conus_x4v1_lowcon_oRRS15to5.160808.nc

    domain.ocn.oRRS15to5.160808.nc

...