Skip to content

Conversation

@irenavankova
Copy link
Collaborator

@irenavankova irenavankova commented Aug 25, 2025

Small changes to time series:

-Moved map inset on time series to lower left corner so that it doesn't hide the time series
-Changed units GT to Gt for melt flux
-Masked out ice-shelf cavities for calculating regional profiles and tasks depending on those, like Hovmoller. The reason for that is coordinate distortion in the cavities which can be an issue for interpreting layer averaged quantities.

Mpas-analysis for melt rate timeseries:

https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.vankova/analysis/Sv2p1/diff_melt/SSP3-ENS/clim_2015-2100_ts_2015-2100/html/ocean/index.html

for Hovmoller:

This is with changes:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.vankova/analysis/Sv2p1/hov12/SSP3-ENS/clim_2015-2100_ts_2015-2100/html/ocean/index.html#ocnreghovs_antarcticregions&gid=9&pid=4
This is prior to changes:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.dcomeau/E3SMv2_1/v2_1.SORRM.ssp370_ensmean/yrs2081-2100_bt/ocean/index.html#ocnreghovs_antarcticregions&gid=135&pid=4

Checklist

  • User's Guide has been updated
  • If this PR adds a new analysis task, it has also been added to the user's guide
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Testing comment in the PR documents testing used to verify the changes

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

A few suggested changes but this looks great over all!

I'll need to test it on the test suite before I approve it for merging.

Comment on lines 352 to 354
landIceFraction = dsMesh.landIceFraction
landIceFraction = xr.where(landIceFraction > 0, 1, landIceFraction)
landIceFraction = -1*(landIceFraction-1)
Copy link
Collaborator

@xylar xylar Aug 25, 2025

Choose a reason for hiding this comment

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

Suggested change
landIceFraction = dsMesh.landIceFraction
landIceFraction = xr.where(landIceFraction > 0, 1, landIceFraction)
landIceFraction = -1*(landIceFraction-1)
openOceanMask = xr.where(dsMesh.landIceMask > 0, 0, 1)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this would be simpler and make more sense (at least to me). (And then openOceanMask gets used below.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want to use landIceMask rather than landIceFraction > 0 but that could be a point of discussion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, if the variable is available that is fine - I had tried first with landIceFloatingMask but that variable wasn't available for some reason, so I went with landIceFraction following the melt rate example

Copy link
Collaborator

Choose a reason for hiding this comment

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

cellMask = numpy.logical_and(cellMask, landIceMask == 0)

It seems like either landIceFraction or landIceMask would work so it doesn't matter too much. landIceFloatingFraction should also work but I don't think that would be the right thing if it differs from landIceFraction -- if grounded ice is present, we want to exclude it, too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

landIceMask seems like the right choice to me


var = dsLocal[variableName].where(vertDepthMask)
var_mpas = dsLocal[variableName]
var_mpas_masked = var_mpas*landIceFraction
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
var_mpas_masked = var_mpas*landIceFraction
var_mpas_masked = var_mpas*openOceanMask

@xylar
Copy link
Collaborator

xylar commented Aug 28, 2025

Testing

I ran the test suite after making my suggested change above. Things appear to have worked just fine:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/analysis_testing/chrysalis/no_inset/

@xylar xylar self-assigned this Aug 28, 2025
@xylar xylar added the clean up label Aug 28, 2025
@xylar
Copy link
Collaborator

xylar commented Sep 12, 2025

@irenavankova, if you want to make my 2 suggested changes, I think this can go in.

@irenavankova
Copy link
Collaborator Author

@xylar so turns out there is something odd going on at the shelf plots, both in what I had originally and with your corrections. It is especially clear in the salinity and density plots (Darin was the one to notice it actually).
Original:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.dcomeau/E3SMv2_1/v2_1.SORRM.ssp370_ensmean/yrs2081-2100_bt/ocean/index.html#ocnreghovs_antarcticregions&gid=137&pid=2
This pull requst:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.vankova/analysis/Sv2p1/hov12/SSP3-ENS/clim_2015-2100_ts_2015-2100/html/ocean/index.html#AntarcticRegions&gid=10&pid=2

@xylar
Copy link
Collaborator

xylar commented Sep 27, 2025

Thanks for pointing those out. I'll take a look but this may point to needing a better solution to the z coordinate.

@cbegeman
Copy link
Collaborator

@irenavankova @xylar Seems like you two have it covered but ping me if you need help with this.

@xylar
Copy link
Collaborator

xylar commented Oct 1, 2025

@irenavankova, I see what the issue is and I have a fix. I'll test it and then push it to your branch.

The problem is that we are multiplying the field in the numerator by the open ocean mask but we are not including the mask in the denominator, the totalArea. This means we multiply by a smaller area than we divide by and fields get reduced by a constant fraction (the total open ocean area / total ocean area including cavities). We don't really see that in temperature because the bounds include zero but we really see it in salinity and density because the fields are suddenly out of bounds.

@xylar
Copy link
Collaborator

xylar commented Oct 1, 2025

The 240km mesh I use for the test suite isn't great for making sure this is fixed but I don't see any signs of trouble:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/xasaydavis/analysis_testing/chrysalis/no_inset/main_py3.13/ocean/index.html#ocnreghovs_antarcticregions

image image

@xylar
Copy link
Collaborator

xylar commented Oct 1, 2025

I reran @irenavankova's analysis from above with my fix. It looks good now:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/xasaydavis/analysis_testing/mask_hov/SSP3-ENS/clim_2015-2100_ts_2015-2100/ocean/index.html

image image

This ensures that both the area-weighted field (numerator) and
the total area (denominator) include the same masking.
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

This now looks good to me and I think it's ready to merge!

@xylar xylar merged commit 796ff0e into MPAS-Dev:develop Oct 1, 2025
4 checks passed
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.

3 participants