Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Sep 18, 2017

This merge fixes issues with the southern boundary transect extracted for MOC regions through a substantial rewrite. One significant change is that the edge sign is determined by the order of cells on an edge, not vertices (the latter of which may have caused issues with the previous approach). The logic has also been simplified.

@xylar xylar added the bug label Sep 18, 2017
@xylar xylar self-assigned this Sep 18, 2017
@xylar
Copy link
Collaborator Author

xylar commented Sep 18, 2017

@milenaveneziani, I'm still testing this but figured I'd do a PR so I can post the results of my testing here.

@xylar
Copy link
Collaborator Author

xylar commented Sep 18, 2017

@milenaveneziani, I was able to verify that the transect on the southern boundary had the expected sign for all of the following meshes:

oEC60to30v3_mesh.nc     oQU240v3_mesh.nc     oRRS30to10v3_mesh.nc
oEC60to30v3wLI_mesh.nc  oRRS18to6v3_mesh.nc

I'm not sure what the procedure will be for testing the MOC with this new transect. Presumably waiting until @vanroekel is back?

@xylar
Copy link
Collaborator Author

xylar commented Sep 18, 2017

This is intended to address #164.

@milenaveneziani
Copy link
Contributor

@xylar: this is great. I can test with the MOC postprocessing first, similarly to what I did before. I will try with the v0.43 tag on titan's login node.

@milenaveneziani
Copy link
Contributor

milenaveneziani commented Sep 19, 2017

sorry it took so long: titan is able to compute the high-res climos without ncclimo, but takes very long..
Unfortunately the results are not as I was hoping. The Atlantic MOC seems to have a sign that is more similar to what it should be, but the structure is far from being considered 'right'. Take a look:
mocatlantic_gmpas-iaf_orrs18to6v3_years0030-0030
You can compare this to the plot I was getting with the old transect, for the same run but a different year (11 instead of 30), which I posted in #164. I will now try computing the MOC for year 11 with the new transect, and then I will test things with the EC60to30 again.

@xylar
Copy link
Collaborator Author

xylar commented Sep 19, 2017

@milenaveneziani, okay. I'm disappointed that things still don't look "right" in your tests. I don't know how I can be more help unless you can put a set of files in my hands with which I can reproduce a case that looks "right" and another with my transect that doesn't. Is that something you can put together?

@milenaveneziani
Copy link
Contributor

Yes, I will do that. I will transfer 1 year of high-res data to NERSC, and then bring over the old transect file and the new one, for both the high-res and low-res cases.
I hope to put this together tonight.

And yes, I was disappointed too: I really thought things were solved. Something tells me that we are close though. At least we don't get the weird structure with flipped signs..

@milenaveneziani
Copy link
Contributor

milenaveneziani commented Sep 20, 2017

@xylar: you can find year 11 and 30 of Luke's high-res run here at nersc:
/scratch1/scratchdirs/milena/ACME_simulations/GMPAS-IAF_oRRS18to6v3/run/

A low-res run could be this one:
/scratch2/scratchdirs/golaz/ACME_simulations/20170313.beta1.A_WCYCL1850S.ne30_oECv3_ICG.edison/run

The newer MOC regions with transects mask files are these:

/global/project/projectdirs/acme/mpas_analysis/region_masks/MOCBasinRegionsWithTransects_oRRS18to6v3.170501.nc
/global/project/projectdirs/acme/mpas_analysis/region_masks/MOCBasinRegionsWithTransects_oEC60to30v3.170501.nc

The old ones are these:

/global/project/projectdirs/acme/mpas_analysis/region_masks/oRRS18to6v3.170111.SingleRegionAtlanticWTransportTransects_masks.nc
/global/project/projectdirs/acme/mpas_analysis/region_masks/oEC60to30v3_SingleRegionAtlanticWTransportTransects_masks.nc

At OLCF, I have completed the MOC for year 11 using the new mask file, and I am now computing the same but using the old mask file. I shall see the results of this tomorrow morning since it takes about 2 hours to compute the 1-year climatologies on titan's login node.

As a reminder you should check out v0.43 to do any test with the high-res data. Also, I have used maxChunkSize = 500 on titan. You can check out the config file I have used on titan here:
/global/homes/m/milena/MPAS-git-repositories/MPAS-Analysis/config.GMPAS-IAF_oRRS18to6v3

Hopefully all permissions are OK.

@xylar
Copy link
Collaborator Author

xylar commented Sep 21, 2017

@milenaveneziani, thanks very much for making these available. I'm busy packing for the US and probably won't have a chance to look at this until Monday or Tuesday. But it's on my radar...

@mark-petersen
Copy link
Collaborator

@milenaveneziani Just to update, I was able to test those four mask files, each with a single monthly average and using the simple old python script for a single time. The old and new masks produce completely different results. I have another meeting now, but will update more soon.

@xylar
Copy link
Collaborator Author

xylar commented Sep 21, 2017

That's both disappointing and also maybe progress... Can we plot the edge sign in Paraview for both masks and see if they are consistent with one another, at least where they overlap? Other than the edge sign, I just don't know what could be wrong.

xylar added 3 commits May 21, 2018 01:13
Only if the evtk package is not found do we use the old pyevtk
package.  The evtk package is being built from evtk source as
part of newer e3sm-unified packages and is on the e3sm channel.
pyevtk does not seem to reliably support python 3 and some
versions seem to have bugs in the setup script.
The latest netCDF4 package automatically masks all numpy arrays,
which doesn't play nicely with pyevtk.  To fix this,
set_auto_mask(False) has been used when opening NetCDF files.
@xylar xylar force-pushed the fix_moc_southern_boundary_extractor branch 2 times, most recently from 672ea9f to 81befe3 Compare May 22, 2018 12:52
@xylar xylar removed the don't merge label May 22, 2018
@xylar xylar changed the title Fix edge sign of first edge in boundary extractor Rewrite MOC southern boundary extractor May 22, 2018
@xylar
Copy link
Collaborator Author

xylar commented May 22, 2018

@milenaveneziani, I finally had time to get back to this. I believe a rewrite that I did earlier but didn't have a chance to fully test seems to be working. Here are Atlantic MOCs a very short time into runs at various resolutions:

QU240:
mocatlantic_gmpas-qu240_years0002-0005

QU240wLI:
mocatlantic_20180514 g oqu240wli edison_years0002-0008

EC60to30v3:
mocatlantic_20180129 deckv1b_picontrol ne30_oec edison_years0001-0003

EC60to30v3wLI:
mocatlantic_20180328 gmpas-iaf t62_oec60to30v3wli theta gm600_years0001-0003

For comparison, here's are plots with the previous southern ocean transect.

EC60to30v3:
mocatlantic_20180129 deckv1b_picontrol ne30_oec edison_years0001-0003

EC60to30v3wLI:
mocatlantic_20180328 gmpas-iaf t62_oec60to30v3wli theta gm600_years0001-0003

@xylar
Copy link
Collaborator Author

xylar commented May 22, 2018

Here's the Atlantic MOC with the old transect:
image

and new:

image

from a different set of years from 20180129.DECKv1b_piControl.ne30_oEC.edison

The other regional MOCs using the new analysis can be seen here:
http://portal.nersc.gov/project/acme/xylar/all_moc/20180129.DECKv1b_piControl.ne30_oEC.edison_0005_to_0010/ocean/index.html

@xylar
Copy link
Collaborator Author

xylar commented May 22, 2018

Interestingly, the time series changes noticeably between the analysis with the old transect:
image
image

and the new:

But this may be inevitable given the effect of relatively small changes in transport across the southern boundary on where the maximum occurs (and therefore its value).

@xylar
Copy link
Collaborator Author

xylar commented May 22, 2018

Here's the results from analyzing an RRS30to10 run:
years 5-10:
image

and 5-22:
image

Here's the rest of the MOC plots for that same set of analysis:
years 5-10

years 5-22

Here's the MOC over years 5-22 computed with the old transect :
image

@xylar
Copy link
Collaborator Author

xylar commented May 22, 2018

@milenaveneziani, @mark-petersen, @maltrud, @vanroekel

Can you think of ways I can further test these new southern boundary transects to gain confidence? I did a test where I computed the horizontal transport into each cell and computed that the resulting vertical velocity was super tiny (0.0004 m/s or something). I then summed the transport from individual cells and proved to myself that was equal to the transport computed over a whole boundary of the MOC region (not just the southern boundary). So I'm quite confident that I have the edge signs right (finally).

At a glance, all of the MOC plots look "not too crazy" to me in the sense that the MOC at the bottom of the ocean is not too far from zero and we're seeing similar values at EC60to30 resolution and higher between the old and new transects. However, we're seeing enough change that I want to make sure we're okay with this. It certainly won't help us explain why the AMOC is too weak, but it does seem to change a peak here and there in there in both the time series and the lat/depth plots.

@milenaveneziani
Copy link
Contributor

@xylar: @vanroekel noticed that the new transect file has the dimension StrLen equal to 1024 instead of the old 64. Is it the new MaskCreator tool that does this or is it the southern transect extractor?
I will try changing the dimension size for now and see if this solves the problem of the MOC AM.

@xylar
Copy link
Collaborator Author

xylar commented Sep 20, 2019

@milenaveneziani, the bigger number is likely necessary to handle the metadata that is included in the files. I would think the better approach would be to modify the MOC AM to handle the longer string length.

@milenaveneziani
Copy link
Contributor

I agree that it would be nice to leave 1024, but, as you mentioned in the MPAS-Model PR, we could temporary change it to 64 and raise an issue in MPAS-Model to change this in the framework.

xylar and others added 15 commits October 3, 2019 20:20
Add bare-bones docs with Read The Docs
In such cases, we need to cd to the location of setup.py before
finding package modules and scripts.
Fix conda package setup.py when called with a path
This was being done externally in scripts but it is easier to
include it in setup.py.  This also seems to be the only way to
do this within Read The Docs, which doesn't support custom install
scripts.
In conda package, copy directories within setup.py
Simple upgrade to python 3. Just print parenthesis and spacing.
Add some missing tests in conda recipe.

Remove redundant listing of a script in setup.py
This is needed only for Read The Docs, which won't allow a build
script.
Updates to the conda package for release of v0.0.4

Add SCRIP script to package
fix some tests
fix copying of scripts/code from outside of the package
update to v0.0.4
This commit allows the script to use input arguments for the radius
beyond which to cull and the fractional distance beyond which to cull.

Previously those were both hard-coded values, which complicated using
those methods within COMPASS.
…script

Update define_cullMask.py to allow more input

This merge allows the script to use input arguments for the radius
beyond which to cull and the fractional distance beyond which to cull.

Previously those were both hard-coded values, which complicated using
those methods within COMPASS.
@xylar xylar changed the title WIP: Rewrite MOC southern boundary extractor Rewrite MOC southern boundary extractor Nov 14, 2019
@xylar
Copy link
Collaborator Author

xylar commented Nov 14, 2019

I believe the remaining issue with 1024-character strings (instead of the expected 64) should be addressed by #275, followed by a release of MPAS-Tools and an update of the various COMPASS conda environments.

It now computes edge signs based on the order of cells on a given
edge rather than of vertices, which may fix the issue seen
previously.
This flag should not be used in nearly all standar cases.
@xylar
Copy link
Collaborator Author

xylar commented Dec 21, 2019

@milenaveneziani, can we go ahead and merge this very old PR? Presumably any remaining issues can be addressed later.

Copy link
Contributor

@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.

Sure.

xylar added a commit that referenced this pull request Dec 24, 2019
This merge fixes issues with the southern boundary transect extracted for MOC
regions through a substantial rewrite. One significant change is that the edge
sign is determined by the order of cells on an edge, not vertices (the latter
of which may have caused issues with the previous approach). The logic has also
been simplified.
@xylar xylar merged commit da04231 into MPAS-Dev:master Dec 24, 2019
@xylar xylar deleted the fix_moc_southern_boundary_extractor branch December 24, 2019 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.