Open xylar opened 3 months ago
@cbegeman, this is part of the design https://acme-climate.atlassian.net/wiki/spaces/PSC/pages/4210098268/Design+Document+Data+iceberg+and+ice-shelf+melt+flux+patterns+for+E3SM+spin-up+runs. Do you want to take a quick look at this, particularly the run()
method, to see if you notice any immediate problems?
In the meantime, i'll run this through the IcoswISC240 workflow to see what I get.
I ran the IcoswISC240 workflow through files_for_e3sm
. I was able to produce the expected "normalized" files. I verified by eye in paraview that the fluxes times areaCell
looked plausible (they are less than 1 and look like they could plausibly sum to something close to 1). More rigorous testing will, of course, be needed.
I also have the test print out the total fluxes before and after normalization:
total_dib_flux: 37077587.7
total_dismf_flux: 30060820.9
total_flux: 67138408.6
norm_total_dib_flux: 0.552
norm_total_dismf_flux: 0.448
norm_total_flux: 1.000
(Interesting to see that the calving flux is higher than the melt flux. I didn't remember that being the case in observations.)
@xylar I think this looks correct. I'm just wondering whether we will run into underflow issues on a grid-cell basis since I think we are dividing a flux with units kg m^-2 s^-1 by the total flux over 1 year and the whole domain. Have you looked at this? I could also be misunderstanding your approach.
I don't anticipate underflow issues but I also don't really know how we might avoid them. Do you have a suggestion?
@cbegeman, thinking about this a bit further, one solution that would likely avoid the underflow issue (if there is one) would be simply to precompute and store totalDataIcebergIceShelfFreshwaterFlux
in both the DIB and DISMF files. Then, we could simply multiply each field by the ratio of totalRemovedIceRunoffFlux/totalDataIcebergIceShelfFreshwaterFlux
in MPAS-Ocean and MPAS-Seaice. This has several advantages:
I will probably switch to that approach but want to see what you think first.
@cbegeman, thinking about this a bit further, one solution that would likely avoid the underflow issue (if there is one) would be simply to precompute and store totalDataIcebergIceShelfFreshwaterFlux in both the DIB and DISMF files. Then, we could simply multiply each field by the ratio of totalRemovedIceRunoffFlux/totalDataIcebergIceShelfFreshwaterFlux in MPAS-Ocean.
@xylar I like that solution.
I reran files_for_e3sm
with the new approach of just adding the totals to the datasets. With the modified formatting, I see:
total_dib_flux: 37077587.7
total_dismf_flux: 30060820.9
total_flux: 67138408.6
norm_total_dib_flux: 0.5522559813506136
norm_total_dismf_flux: 0.4477440186493862
norm_total_flux: 0.9999999999999998
1 - norm_total_flux: 2.220446049250313e-16
so things look good here, but we'll have to verify this in MPAS-Ocean and -Seaice.
I also verified that I see the new fields in the NetCDF output files:
...
double areaIntegAnnMeanDataIcebergFreshwaterFlux(Time) ;
areaIntegAnnMeanDataIcebergFreshwaterFlux:units = "kg s-1" ;
double areaIntegAnnMeanDataIceShelfFreshwaterFlux(Time) ;
areaIntegAnnMeanDataIceShelfFreshwaterFlux:units = "kg s-1" ;
double areaIntegAnnMeanDataIcebergIceShelfFreshwaterFlux(Time) ;
areaIntegAnnMeanDataIcebergIceShelfFreshwaterFlux:units = "kg s-1" ;
...
For the DIB file, we have to have 12 redundant copies along the Time
axis because:
@xylar I think this looks great. Thanks! Let me know if you want me to do any testing.
@cbegeman, I think this branch is probably in good shape and you don't need to test. Next steps would be to make new Icos DIB and DISMF files with this branch, and then to use those in testing the capability in E3SM. But that's a little way off still.
This appears to be working as expected in my E3SM branch in https://github.com/E3SM-Ocean-Discussion/E3SM/pull/109. I am almost a year into a test with scaling enabled: In blue is the original DISMF, in orange is the scaled version, in green is the original DIB and in red is the scaled version. These are area integrals of daily snapshots.
This is needed for an Antarctic balance approach in which all Antarctic solid runoff is converted into iceberg and ice-shelf melt with the patterns from the Merino et al. (2020) and Paolo et al. (2023) datasets.
Checklist
api.rst
) has any new or modified class, method and/or functions listedTesting
in this PR) any testing that was used to verify the changes