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

Explicitly call A2D2C to restagger and reorient winds #5

Merged
merged 2 commits into from
Dec 11, 2019

Conversation

LiamBindle
Copy link
Contributor

@LiamBindle LiamBindle commented Dec 11, 2019

Hi @lizziel.

I figured I'd make a PR for this rather than commit it to the main branch myself because I'm still getting familiar with Fortran and GCHP's internals.

Below is a summary of the changes I made:

  • Removed UC and VC ExtData imports from GEOSctmEnv_GridComp
  • Added ULL and VLL imports to GEOSctmEnv_GridComp (go to UA and VA variables)
  • Added temporary variables UC and VC. Their lifetime is
    1. Allocate
    2. Initialize to UA and VA (which are imported from ULL and VLL)
    3. inout arguments to fv_A2D2C() (restagger to C-grid and reorient for CS)
    4. Pass to fv_computeMassFluxes()
    5. Deallocate

To test this I ran a 48-hour C48 advection-only transport tracer simulation with prescribed 30 m/s eastward winds (everywhere) with a custom restart file (blobs of tracer like the 5-side of a dice). Here is the before and after.

It actually looks like this might also work for stretched-grid. Initially I assumed A2D2C() only worked for GMAO's cubed-sphere because the subroutine doesn't take any input arguments related to the grid. It looks like it makes some internal FV3 calls though, so I tried the test above on a stretched-grid and it appears to look ok (after). I emailed @bena-nasa earlier this week and asked about A2D2C + stretched-grid, so I guess it's probably best to wait to hear back about that before making any conclusion about the restaggering and reorienting for stretched grids.

I also renamed A2D2C() in GetWeights.F90 (in AdvCore_GridComp; this subroutine in not in a module) to fv_A2D2C() to avoid the name conflict with A2D2C in the abstract grid factory. There might be a better way to do this, but this was the minimum diff I could come up with.

Let me know if you have any concerns/questions.

Liam

@LiamBindle LiamBindle requested a review from lizziel December 11, 2019 15:47
@lizziel lizziel merged commit 9c25968 into dev/gchp_ctm_12.7 Dec 11, 2019
@lizziel
Copy link
Contributor

lizziel commented Dec 11, 2019

This looks good. Thanks @LiamBindle!

@LiamBindle LiamBindle deleted the fix/wind-rotation-and-staggering branch December 11, 2019 20:37
@lizziel lizziel mentioned this pull request Jun 29, 2023
4 tasks
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.

2 participants