Explicitly call A2D2C to restagger and reorient winds #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
fv_A2D2C()
(restagger to C-grid and reorient for CS)fv_computeMassFluxes()
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) tofv_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