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 postprocessed MOC to match analysis member #886

Merged
merged 6 commits into from
Sep 22, 2022

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Sep 7, 2022

To match changes made in E3SM in E3SM-Project/E3SM#5170, this merge changes the transport computation into the southern boundary of an MOC region to work from the bottom up rather than the top down.

This merge also adds the submesoscale velocity to the postprocessed MOC computation.

Finally, we also add the full AMOC to the time-series output for debugging and follow-up analysis. No plots are made of these fields.

@xylar xylar self-assigned this Sep 7, 2022
@xylar
Copy link
Collaborator Author

xylar commented Sep 7, 2022

@vanroekel and @milenaveneziani, could you point me to a simulation where you have computed the MOC using the change in E3SM-Project/E3SM#5170? I would like to compute the MOC with postprocessing for the same simulation and make sure the results are the same, at least to the precision we would expect.

mocTop[0, range(1, nz + 1)] = transportZ.cumsum()
mocTop[0, nz-1:-1:-1] = - transportZ[nz-1:-1:-1].cumsum()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@vanroekel and @milenaveneziani, could you double check that this makes the same change as in E3SM-Project/E3SM#5170 (once that gets its indexing fixed)?

The bottom entry of mocTop is purposefully left as all zeros. Then, we sum up (nz-1:-1:-1, meaning from index nz-1 to index 0 in steps of -1, keeping in mind that python has a "stop" index that is beyond the last index, rather than equal to the last index, making things unnecessarily confusing) from the bottom to the top.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@xylar I compared this form to that in the E3SM PR (with fixed indexing) in a python script I have. the two methods were exactly the same. so this looks good to me.

Copy link
Collaborator

@vanroekel vanroekel left a comment

Choose a reason for hiding this comment

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

approving by visual inspection and testing against the form in E3SM-Project/E3SM#5170

mocTop[0, range(1, nz + 1)] = transportZ.cumsum()
mocTop[0, nz-1:-1:-1] = - transportZ[nz-1:-1:-1].cumsum()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@xylar I compared this form to that in the E3SM PR (with fixed indexing) in a python script I have. the two methods were exactly the same. so this looks good to me.

@xylar
Copy link
Collaborator Author

xylar commented Sep 8, 2022

@vanroekel, once you have the additional 10 years you mentioned in E3SM-Project/E3SM#5170 (comment), I'll run the post-processed MOC on that simulation using this branch and we can compare. Hopefully, the last 10 years look identical or close enough. And we will have a corrected version of the previous 700ish years.

@vanroekel
Copy link
Collaborator

@xylar the new 10 years are here on anvil --

/lcrc/group/e3sm/ac.vanroekel/E3SM_simulations/20220715.submeso.piControl.ne30pg2_EC30to60E2r2.chrysalis/run

the new data is years 831-840

@xylar
Copy link
Collaborator Author

xylar commented Sep 8, 2022

Thanks @vanroekel!

@xylar xylar marked this pull request as ready for review September 8, 2022 17:42
To match changes made in E3SM in
E3SM-Project/E3SM#5170, this merge changes
the transport computation into the southern boundary of an MOC
region to work from the bottom up rather than the top down.
@xylar
Copy link
Collaborator Author

xylar commented Sep 9, 2022

Here are the results of running MPAS-Analysis on Luke's run above from this branch with the MOC analysis member:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xylar/analysis/submeso.piControl.ne30pg2_EC30to60E2r2/moc_am/yrs831-840/ocean/index.html
and here are the same with the post-processing script:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xylar/analysis/submeso.piControl.ne30pg2_EC30to60E2r2/moc_postproc/yrs831-840/ocean/index.html

AM:
image

Post processing:
image

They are similar but there are nontrivial differences. @vanroekel and @milenaveneziani, is this close enough or do you want me to investigate further? Or do we want to rely primarily on the AM anyways and understanding the subtlties of the post-processing tool aren't worth the effort as long as it's pretty close?

@xylar
Copy link
Collaborator Author

xylar commented Sep 9, 2022

These diferences are a little concerning to me.

AM:
image

Post processed:
image

@vanroekel
Copy link
Collaborator

@xylar I agree that the time series differences are bigger than I'm comfortable with. I'll try take another look.

@xylar
Copy link
Collaborator Author

xylar commented Sep 9, 2022

@vanroekel, I'll look into it further. I think the first thing to establish is if the difference is in the southern transect or not. We're not currently storing the time series of the southern transect in the analysis so I'll have to think about how to do this in the simplest way.

@vanroekel
Copy link
Collaborator

vanroekel commented Sep 9, 2022

Sounds good @xylar let me know if I can help. But one quick thought though. In your post processing AMOC calculation are you including the submesoscale eddy velocity? This would be normalMLEvelocity and vertMLEvelocityTop. This could potentially explain some of the difference

I ask as the AM does include that impact for this simulation.

@pep8speaks
Copy link

pep8speaks commented Sep 9, 2022

Hello @xylar! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-09-09 22:06:32 UTC

@xylar xylar force-pushed the update_moc_calc branch 2 times, most recently from 2c25d47 to 87af017 Compare September 9, 2022 20:39
Instead of just writing out the max AMOC value at RAPID, write
out the full AMOC time series.
Similar to the previous commit but for the AM rather than the
postprocessed AMOC.
@xylar
Copy link
Collaborator Author

xylar commented Sep 9, 2022

@vanroekel, oh, thank goodness. I missed your message from earlier. No, the postprocessing script doesn't know abut the MLE terms so we definitely need to add those.

I'm also seeing a weird shift in latitude between the AM and postprocessed versions of the MOC. I'll check to see if that's just a mistake on my side.

@xylar
Copy link
Collaborator Author

xylar commented Sep 9, 2022

@vanroekel, I don't appear to be able to compute the full offline MOC because we're missing the 2 MLE velocity fields in timeSeriesStatsMonthly.

@xylar xylar changed the title Compute MOC south. transport from bottom up Update postprocessed MOC to match analysis member Sep 9, 2022
@xylar xylar marked this pull request as draft September 9, 2022 22:50
When computing the transport through the southern boundary,
use the time-averaged layer thickness (averaged from cell
centers to edges), rather than the reference z-level thickness.
@xylar
Copy link
Collaborator Author

xylar commented Sep 15, 2022

@xylar xylar marked this pull request as ready for review September 15, 2022 22:22
@xylar
Copy link
Collaborator Author

xylar commented Sep 15, 2022

@milenaveneziani, this is now ready to review when you have a chance.

Copy link
Collaborator

@milenaveneziani milenaveneziani left a comment

Choose a reason for hiding this comment

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

@xylar: I went through the code and things look good to me!

@xylar
Copy link
Collaborator Author

xylar commented Sep 21, 2022

Great, I'll merge as soon as E3SM-Project/E3SM#5170 is on master (perhaps tomorrow?).

This is the correct value in the MPAS-Ocean code
@xylar xylar merged commit 1b9d63b into MPAS-Dev:develop Sep 22, 2022
@xylar xylar deleted the update_moc_calc branch September 22, 2022 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants