NCAR / Topo

NCAR Global Model Topography Generation Software for Unstructured Grids
26 stars 17 forks source link

bug fix for variable resolution configurations #2

Closed adamrher closed 4 years ago

adamrher commented 4 years ago

I noticed a bug in my implementation of the regional refinement enhancements in branch TopoCESM2. In particular, the refinement factor should have the limiter applied to it before being called by the topography smoother. The refinement factor is instead going through the limiter step after the topography smoother is called. This means that the smoother isn't calling the correct refinement factor, which is a bug.

This bug has been fixed in a forked-off branch TopoCESM2.2 in my git repo:

https://github.com/adamrher/Topo/tree/TopoCESM2.2

I also updated the experiment_settings.make file by grouping the three (3) supported variable resolution grids (ARCTIC, ARCTICGRIS & CONUS) together under the sub-header "functionally supported vr-grids." I also had switch the ARCTIC & CONUS settings to default to including anisotropic gravity wave fields, as req'd by CAM6 physics.

adamrher commented 4 years ago

I have committed this bug fix to the TopoCESM2 branch.

Results of regression tests. Difference in PHIS/g for the ne30np4 grid, in the new and old code:

(0) grab TopoCESM2/cube_to_target/output/ne30np4_nc3000_Co060_Fi001_MulG_PF_NoAniso.nc (0) min PHIS -24.23356686848158 (0) max PHIS 5179.656154892847 (0) grab TopoCESM2.old/cube_to_target/output/ne30np4_nc3000_Co060_Fi001_MulG_PF_NoAniso.nc (0) min PHIS -24.23356686848158 (0) max PHIS 5179.656154892847 (0) max vardiff: 0 (0) min vardiff: 0

The difference is 0. The difference in PHIS/g for the CONUS grid in the new and old code:

(0) grab TopoCESM2/cube_to_target/output/CONUS_30_x8_nc3000_Co060_Fi001_MulG_PF_RR_NoAniso.nc (0) min PHIS -35.61457158102279 (0) max PHIS 5183.399968736427 (0) grab TopoCESM2.old/cube_to_target/output/conus_30_x8_nc3000_Co060_Fi001_MulG_PF_RR_NoAniso.nc (0) min PHIS -35.93959645340484 (0) max PHIS 5184.739753376725 (0) max vardiff: 196.1098708142952 (0) min vardiff: -272.9694828563322

This bug fix changes variable resolution PHIS/g on the order of a few hundred meters. This is about what was expected.