Map file analysis

The page documents a python utility to analyze E3SM map files. It checks the the key properties that can be examined by NCO (ncks --checkmaps), and several additional properties, including consistency with the land/ocean fractions induced by the flux maps. It’s currently setup to examine all mapping files from a working E3SM case by parsing the XML files after running ./case.setup. It produces a latex file, which can then be processed into a PDF report.

The report starts with one page for each unique grid, with some mesh size metrics, a plot of the grid and a plot of the analytic test function (spherical harmonic Y16,32) used to compute map file errors. The report then gives one page for each unique map file, with map algorithm statistics (min and max weights, row sums (consistency) and column sums (conservation)) as well as the L2 and max errors for mapping our test function. For non-global maps (i.e. ocean->atmsphere), the errors are given over the full range of the map (including coastal regions with partial land/ocean fractions) and over the subdomain of 100% land or ocean points (where the maps usually perform better). The map file pages list the important characteristics that should be checked for each map including metrics for conservation, consistency and monotonicity. For ocean maps, plots are included to verify the above properties hold over ocean points and remain well behaved in coastal regions.

This was a 2023 summer intern project (Dallin Seyfrield ( BYU ), Drew Sukova (Purdue), @Mark Taylor ). Funded by the E3SM ECP project. For code and instructions on how to run, see the README file in: https://github.com/E3SM-Project/PreAndPostProcessingScripts/tree/master/regridding/map_file_analysis

 

Some highlights:

  • Found the root cause of the “speckling” problem in the ne256 trigrid setup reported here: https://acme-climate.atlassian.net/wiki/spaces/NGDNA/pages/3597565953 This problem is due to the land->atmosphere state map being inconsistent with the land franction on the atmosphere grid. In particular, the map does not provide data in a few grids points where the land fraction is .30. At such a point, the atmosphere field is 30% land + 70% ocean, and since land will send no data, this results in temperature at a single point being consistently 30% too low. This is reported in the metric for “land frac consistency error” given in the page for the lnd2atm state map.

  • Uses the python “holoviews” package which can directly plot unstructured grid data (by shading each polygon cell) manytimes faster than matplotlib’s ‘polycollection’ approach.

  • The E3SM v3 trigrid setups have a small (but larger than expected) discrepancy between the land fraction computed from ocn->atm (computed from ocn2atm map) and ocn->lnd->atm (computed from domain.lnd + lnd2atm map). The metric for this is the “land frac consistency error” given in the page for the lnd2atm flux map. @Andrew Bradley identified a likely source of this error, which is the default fminval=.001 in gen_domain. Land cells with a land fraction less than fminval are removed (land mask=0). For tri-grid we may want to consider lowering fminval, so that there are more land points and thus more likely that the lnd->atm map will provide data on all partial land atmopshere cells.

 

Grid

Report

Notes

Grid

Report

Notes

ne30pg2_EC30to60E2r2

 

E3SM v2 LR

ne30pg2_r05_oECv3

 

E3SM v2 LR trigrid (experimental)

ne30pg2_r05_IcoswISC30E3r5

 

E3SM v3 LR

northamericax4v1pg2_r025_IcoswISC30E3r5

 

E3SM v3 NA-RRM

ne120pg2_r025_RRSwISC6to18E3r4

 

E3SM v3 HR

ne256pg2_r0125_oRRS18to6v3

 

Identifies problem with LND->ATM state map responsible for speckling issues

ne1024pg2_oRRS18to6v3

 

Showcase holoviews ability to plot unstructured UHR data. Requires 34GB of memory and takes about 20min on an Anvil node to produce all the plots.