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

Add scaling of DIB and DISMF by running mean of removed Antarctic ice runoff #109

Closed

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Aug 8, 2024

This merge adds a capability by which data iceberg (DIB) freshwater fluxes and data ice-shelf melt fluxes (DISMF) can be scaled by the running mean of the the amount of ice (solid) runoff coming from Antarctica (which is removed from the system by MPAS-Ocean).

This merge includes:

  • A capability in MPAS-Ocean to compute daily averages of the area integrated removed ice runoff
  • A capability in MPAS-Ocean to compute the running mean of these daily means over a given period of time (currently 20 years = 7300 days)
  • A capability to pass this running mean through the coupler (via the field rmean_rmv_ice_runoff in the infodata datastructure) from MPAS-Ocean to MPAS-Seaice
  • A requirement that the the total annual mean DIB and DISMF fluxes be computed and stored in the DIB and DISMF input files (fulfilled by Add area integrated annual mean to data iceberg and ice-shelf flux files MPAS-Dev/compass#836). These files are currently only available for the IcoswISC30E3r5 mesh.
  • Capabilities to compute a scale factor between the annual mean total data freshwater flux and the running mean of the removed ice runoff in both MPAS-Ocean and MPAS-Seaice
  • A capability to scale landIceFreshwaterFlux and landIceHeatFlux in MPAS-Ocean by the scale factor
  • A capability to scale bergFreshwaterFlux and bergLatentHeatFlux in MPAS-Seaice by the scale factor

The capability is described in more detail in this design document
https://acme-climate.atlassian.net/wiki/spaces/PSC/pages/4210098268/Design+Document+Data+iceberg+and+ice-shelf+melt+flux+patterns+for+E3SM+runs

@xylar
Copy link
Collaborator Author

xylar commented Aug 8, 2024

I've clearly got some debugging to do on restarts:
dib_dismf_14mo

@xylar xylar force-pushed the ocn/add-balance-dismf-dib branch from 5f30604 to 835e6ff Compare August 9, 2024 13:32
@xylar
Copy link
Collaborator Author

xylar commented Aug 9, 2024

The history part of the running mean is working. Here is a Hovmoller plot of the history (time on the x axis and retained history of total removed runoff on the y axis):
hovmoller_history
This is a 1-year running mean, so there are 366 entries. As expected, the history fills up for the first year and then begins to cycle for subsequent years.

The resulting running mean, computed offline is correct (in blue) and matches the value computed online in the code (orange) except for the restart glitches.
running_mean_zoom

@xylar
Copy link
Collaborator Author

xylar commented Aug 9, 2024

I have also fixed the restart problem (which was also an alarm problem). I will post once the test I'm running has completed.

@xylar
Copy link
Collaborator Author

xylar commented Aug 9, 2024

Here is the result of a 12-day run with daily restarts and a 6-day running mean. There are no longer glitches at each restart interval.

Scaled DIB and DISMF:
dib_dismf_12day

Here is the Hovmoller plot of the history of total removed runoff, similar to above but for 12 days (x axis) and a 6-day running-mean interval (y axis).
hovmoller_hist_12day

Now that restarts are working, I'll redo the 5-year run.

xylar added 5 commits August 9, 2024 10:16
Read in areaIntegAnnMeanDataIcebergIceShelfFreshwaterFlux from
these files
Most of the support is in place, just not the coupling between
MPAS-Ocean and MPAS-Seaice to pass `runningMeanRemovedIceRunoff`
@xylar xylar force-pushed the ocn/add-balance-dismf-dib branch from 835e6ff to 0822b88 Compare August 9, 2024 15:16
@xylar xylar force-pushed the ocn/add-balance-dismf-dib branch from 4a24977 to 71b309e Compare August 9, 2024 16:11
@xylar
Copy link
Collaborator Author

xylar commented Aug 9, 2024

My new test:

ERS_P1280.ne30pg2_r05_IcoswISC30E3r5.CRYO1850-DISMF.chrysalis_intel.mpaso-scaled_dib_dismf

passes!!!

xylar added 3 commits August 10, 2024 04:39
Since the alarm rings at the end of a daily interval, we need
to accumulate the removed runoff before, not after, we reset
the daily accumulation.
This is necessary becasue we want to update before streams get
written.
We want this to be a valid entry that contributes to the running
mean.
@xylar xylar marked this pull request as ready for review August 10, 2024 16:05
@xylar xylar requested review from cbegeman and jonbob August 12, 2024 09:08
@xylar
Copy link
Collaborator Author

xylar commented Aug 12, 2024

I ran 2 10-year B-cases, one with WCYCL1850 and one with CRYO1850_DISMF and with these scalings turned on. See analysis here:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/mpas_analysis/
In particular, the main vs. control is here:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/mpas_analysis/20240810.scaled_dib_dismf_vs_wcycl/yrs5-10/

Most changes look like ensemble-level variability to me. The exceptions are the Antarctic sea floor temperature and salinity:
image
image
particularly in the Amundsen and Bellingshausen Sea regions, and corresponding transects and Hovmoller plots:
image
image
image

@xylar
Copy link
Collaborator Author

xylar commented Aug 12, 2024

@cbegeman and @jonbob, if you could have a look at both the analysis output and the code, and let me know if you have concerns, I'd very much appreciate it. The design doc linked above may be helpful.

@xylar
Copy link
Collaborator Author

xylar commented Aug 12, 2024

@cbegeman, it would also be helpful if we talk about next steps. At the very lease, it would make sense to run a longer simulation to make sure the balance approach is actually working as expected. I think that probably would involve a WCYCL spin-up but with E3SM-Project#6413 turned on (checking with @chloewhicker to make sure we just need to set setting use_firn_percolation_and_compaction = .true.) and a corresponding spin-up that also has this feature turned on.

Also, I am seeing imbalances in the conservation check but I think those are expected because we only expect balance at quasi-steady state, not throughout the simulation:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/mpas_analysis/20240810.scaled_dib_dismf_vs_wcycl/yrs5-10/ocean/index.html#timeseries
What do you think?

@xylar
Copy link
Collaborator Author

xylar commented Aug 12, 2024

Oh, we also need E3SM-Project#6501

@chloewhicker
Copy link

I don't have a spin up with use_firn_percolation_and_compaction = .true., I do have one with the deep snowpack, which also property routes the excess snow/water/ice mass. Please let me know if you want that or if you need a short spin up. Although, you should be able to run from a branch and change use_firn_percolation_and_compaction = .true.

@xylar
Copy link
Collaborator Author

xylar commented Aug 13, 2024

@chloewhicker, the thing I wanted to check with you about is just if setting:

use_firn_percolation_and_compaction = .true.

is sufficient to get your new approach to ice runoff, the one we had discussed this spring. I'm planning to do both the "control" spin-up with your ice runoff feature turned on and the other spin-up with both your ice runoff and this feature to redistribute that runoff with the data iceberg and ice-shelf melt patterns.

@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

@cbegeman, could you take a look at the latest conservation check results and let me know what you think?
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/mpas_analysis/20240925.scaled_dib_dismf_vs_wcycl/conservation/ocean/index.html#timeseries

There are still regular spikes at restarts in energy, and occasional spikes in salinity. These should be investigated but my intuition would be that they aren't because of these changes. I can run a 10-year DIB-DISMF run to make sure if you would like that before we move this to E3SM. Importantly, compared to the previous run on 8-10-24, the new run on 9-25-24 doesn't show the land-ice fluxes dropping to zero at each restart in the conservation check.

Here is the full analysis comparing the scaled DIB-DISMF to WCYCL (with the default 1-year running mean for the conservation check analysis):
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/mpas_analysis/20240925.scaled_dib_dismf_vs_wcycl/yrs5-10/ocean/index.html

@cbegeman
Copy link
Collaborator

@xylar Can you run just the conservation time series task without any time averaging for your scaled run?

@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

@cbegeman, that's what's in the first link. Unless you want it without the WCYCL comparison?

@cbegeman
Copy link
Collaborator

Oh, I missed that. Perfect!

I'm happy with what you're currently showing. I still think the error is reasonable because the individual land ice mass flux terms are O(1e7)-O(1e8) Gt/yr and the mass anomaly due to land ice fluxes is O(1e3) Gt/yr. I think that level of error is acceptable.

I think we can move this to E3SM.

Copy link
Collaborator

@cbegeman cbegeman left a comment

Choose a reason for hiding this comment

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

Approving on the basis of visual inspection of the code and the level of error shown in Xylar's tests (magnitude of the mass change due to land ice fluxes compared with the magnitude of individual land flux terms).

@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

Thanks very much @cbegeman! I'm excited to see this moving along!

@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

@jonbob, do you have any concerns about me moving over to E3SM with this?

@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

(I will, of course, rebase to address the conflict.)

@jonbob
Copy link
Collaborator

jonbob commented Oct 17, 2024

@xylar -- I think it's ready. Thanks!

@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

Closing in favor of E3SM-Project#6696

@xylar xylar closed this Oct 17, 2024
@xylar
Copy link
Collaborator Author

xylar commented Oct 17, 2024

(Note that the E3SM branch name has been changed to more accurately reflect the scope of the work.)

@xylar xylar deleted the ocn/add-balance-dismf-dib branch October 17, 2024 19:03
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.

4 participants