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

updates for geostationary output part 1 #2528

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

bena-nasa
Copy link
Collaborator

@bena-nasa bena-nasa commented Jan 12, 2024

@amdasilva requested that History be able to output geostationary data. This can be described via rectilinear grid with some missing points. We can trivially extend the XY grid factory (which was as generic factory for arbitrary creation of rectilinear grids from a file) for this.
For part 1 this PR will assume the user has converted them to a form that the XY grid factory understands
I tested by obtaining the coordintes (lats and Lons on the sphere) for GOES-16 here
https://www.star.nesdis.noaa.gov/atmospheric-composition-training/satellite_data_goes_imager_projection.php
and converting to the form needed by XY factory (dimensions must be Xdim and Ydim, and will have lons(Xdim,Ydim), lats(Xdim,Ydim)).

The new features are thus

  1. The xy grid factory now tests if any points are missing, if so it adds a mask to the ESMF grid and masks at the appropriate points
  2. A few new MAPL constants were defined to be the masking parameters
  3. The MAPL wrapper to ESMF regridders was updated so that it checks if the destination grid has a mask. If so it adds the dstMaskValues argument to the restore. For now limited to linear regrid, could be extended to other methods. I also now set the value of the destination field to MAPL_UNDEF rather than 0 before the ESMF regrid method is called on the destination field to be regridded. In this way any points that are masked out are MAPL_UNDEF, rather than 0, probably for plotting.

From here @metdyn can extend the grid factory to support the input format @amdasilva showed us if required that requires converting from raw satellite angle inputs via some geometry to lats and Lons on the sphere which is what we really need.

Finally here's a picture so show that this does work, the heights regridded to goes-16 view using the coordinates I obtained from the link earlier in the PR

Screenshot 2024-01-11 at 5 21 07 PM

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)

Checklist:

  • I have tested this change with a run of GEOSgcm (if non-trivial)
  • I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
  • I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

@bena-nasa bena-nasa requested a review from a team as a code owner January 12, 2024 18:58
@bena-nasa bena-nasa added 🎁 New Feature This is a new feature 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. labels Jan 12, 2024
@bena-nasa bena-nasa requested a review from tclune January 12, 2024 18:59
@metdyn
Copy link
Contributor

metdyn commented Jan 12, 2024

Thank you, @bena-nasa, for your work! The code is working with the lambert_grid on the Mac and I am proceeding based on your PR.

base/MAPL_XYGridFactory.F90 Outdated Show resolved Hide resolved
base/MAPL_XYGridFactory.F90 Outdated Show resolved Hide resolved
Copy link
Collaborator

@tclune tclune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice implementation and description.

A couple of small "suggested changes", and a bigger "something to think about".

bena-nasa and others added 2 commits January 16, 2024 09:19
Co-authored-by: Tom Clune <thomas.l.clune@nasa.gov>
Co-authored-by: Tom Clune <thomas.l.clune@nasa.gov>
@tclune tclune self-requested a review January 16, 2024 21:57
@bena-nasa bena-nasa requested a review from tclune January 17, 2024 16:59
@tclune tclune changed the title updates for geostitionary output part 1 updates for geostationary output part 1 Jan 17, 2024
@bena-nasa bena-nasa merged commit eb778a2 into develop Jan 17, 2024
29 checks passed
@bena-nasa bena-nasa deleted the feature/bmauer/geostationary_output_part1 branch January 17, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🎁 New Feature This is a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants