Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update orography code for low-res grids #1012

Draft
wants to merge 71 commits into
base: develop
Choose a base branch
from

Conversation

GeorgeGayno-NOAA
Copy link
Collaborator

@GeorgeGayno-NOAA GeorgeGayno-NOAA commented Jan 13, 2025

DESCRIPTION OF CHANGES:

Low-resolution grids are defined as C24/C18/C12.

1 - Updates to the orography code:

  • read_global_orog and read_global_mask - A check was added to ensure the i/j-dimensions of the global data match the dimensions passed in as arguments.
  • qc_orog_by_ramp was updated to read the j-dimension of the RAMP data from the file itself, instead of being declared in the routine. This made writing a unit test easier.
  • makemt2 - variable "maxsum" is now calculated dynamically instead of being hardwired. The hardwired value was not large enough for grids coarser than C48.
  • make_mask - variable "maxsum" is not used and was removed.
  • remove_isolated_pts - This routine was originally written for the global gaussian grid. Some of the logic did not work for FV3 tiles. To fix, the check along the "east/west" tile edges was removed. Also removed was logic that was (I believe) used for reduced gaussian grids (where the number of 'i' points decreased toward the poles).
  • All I/O routines were updated to use the F90 NetCDF routines.
  • Minor corrections to the Doxygen for a few routines.

2 - New unit tests for the following routines/functions:

  • find_nearest_pole_points
  • find_poles
  • get_index
  • get_lat_angle
  • get_lon_angle
  • get_xnsum
  • get_xnsum2
  • get_xnsum3
  • inside_a_polygon
  • latlon2xyz
  • minmax
  • qc_orog_by_ramp
  • read_global_mask
  • read_global_orog
  • read_mask
  • read_mdl_dims
  • read_mdl_grid_file
  • remove_isolated_pts
  • transpose_mask
  • transpose_orog

TESTS CONDUCTED:

  • Compile branch on all Tier 1 machines using Intel (Orion, Jet, Hera, Hercules and WCOSS2).
  • Compile branch on Hera using GNU.
  • Compile branch in 'Debug' mode on WCOSS2. Done on Cactus using 64d26a4. There were no warnings.
  • Run unit tests locally on any Tier 1 machine using both Intel and GNU. Done on Cactus (Intel) using 64d26a4. All tests passed.
  • Run grid_gen consistency tests locally on all Tier 1 machines. Done on Hercules, Jet, Cactus and Orion using 64d26a4. All tests passed as expected.
  • Compile with Doxygen. Done on Cactus using 64d26a4. The orog.fd code had no warnings.

Describe any additional tests performed.

  • Using 64d26a4, a C12 global uniform test was created on Hercules using ./driver_scripts/driver.hercules.sh

DEPENDENCIES:

None.

DOCUMENTATION:

Doxygen successfully created. See above.

ISSUE

Fixes #1000.

RELATED ISSUES

ufs-community/ufs-weather-model#2508

GeorgeGayno-NOAA and others added 30 commits November 21, 2024 20:17
George Gayno and others added 29 commits January 3, 2025 14:25
Add check to ensure grid dimensions of the orog file are correct.

Fixes ufs-community#1000.
data from the file. This will make unit testing easier.
Also, update the routine to use the f90 netcdf routines.

Fixes ufs-community#1000.
9-degrees for the coarsest atmospheric resolutions.

Fixes ufs-community#1000.
@GeorgeGayno-NOAA GeorgeGayno-NOAA self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create very low resolution grids
1 participant