Skip to content

profsea-climate: Add new Antarctic component#28

Open
Greg Munday (gregrmunday) wants to merge 24 commits intoprofsea-climatefrom
gm/add_AIS_emulator
Open

profsea-climate: Add new Antarctic component#28
Greg Munday (gregrmunday) wants to merge 24 commits intoprofsea-climatefrom
gm/add_AIS_emulator

Conversation

@gregrmunday
Copy link
Copy Markdown
Collaborator

I've been working on an Antarctic ice-sheet emulation of ISMIP6 2300 simulations which responds more realistically to overshoot and idealised temperature forcings.

Addresses #27

I've added the component here but it still needs to be worked into the main emulator code!

@gregrmunday
Copy link
Copy Markdown
Collaborator Author

A look at how it behaves over a crazy ramp up ramp way down forcing:

Screenshot 2025-12-05 at 09 18 58

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Jennifer Weeks (@mo-jenniferweeks) I've uploaded the AIS emulator fitting notebook here - I'm still changing some things around in it and it might be a bit messy at the moment!

I'm working on fitting the emulator with the 19 common IS models across all scenarios as opposed to 43 across half of the scenarios to see how it compares!

@gregrmunday
Copy link
Copy Markdown
Collaborator Author

Greg Munday (gregrmunday) commented Dec 5, 2025

WIP comparison between AR5 emulator and ISMIP6 emulator:

Screenshot 2025-12-05 at 14 02 51 Screenshot 2025-12-05 at 14 02 33

Plumes are 66% likely range. At the moment it looks a fair bit less sensitive than the AIS emulator to warming, at least over this timescale - although the ramp up in SLE under higher emissions looks a lot more non-linear.

Next step is probably to compare this against AR6 and against the other emulators in SLEIP

@gregrmunday
Copy link
Copy Markdown
Collaborator Author

Comparing ISMIP6 emulation including only 14 of the contributing models, which submitted simulations over all 10 forcing scenarios.

Screenshot 2025-12-05 at 15 14 38

Seems to just lower the projection a bit, the spread is almost captured but this set of models happens to be biased towards a smaller response to temperature, and have a high proportion of long-timescale responses.

@hmkhatri
Copy link
Copy Markdown
Collaborator

It is interesting that ISMIP6 response is much smaller than AR5 (and possibly AR6). I think we should keep both options in the code - (1) standard AR5/AR6 (2) improved ISMIP. So, users can choose the algorithm they prefer. Of course, we will need references and some disclaimer about different methods and what causes these differences in projected sea level.

@gregrmunday
Copy link
Copy Markdown
Collaborator Author

It is interesting that ISMIP6 response is much smaller than AR5 (and possibly AR6). I think we should keep both options in the code - (1) standard AR5/AR6 (2) improved ISMIP. So, users can choose the algorithm they prefer. Of course, we will need references and some disclaimer about different methods and what causes these differences in projected sea level.

Hmm yes, I'm not totally satisfied with this to be honest. The parameterisation captures the range of the ISMIP6 ensemble well but it does underestimate the median by quite some bit, so I think still a bit of work required to find a better fit to the data!

@gregrmunday
Copy link
Copy Markdown
Collaborator Author

It is interesting that ISMIP6 response is much smaller than AR5 (and possibly AR6). I think we should keep both options in the code - (1) standard AR5/AR6 (2) improved ISMIP. So, users can choose the algorithm they prefer. Of course, we will need references and some disclaimer about different methods and what causes these differences in projected sea level.

But I agree that the user should be able to choose which parameterisation to go with. We can use whichever one we feel most confident in as the default, eventually.

@gregrmunday Greg Munday (gregrmunday) marked this pull request as draft December 9, 2025 13:20
@mo-jenniferweeks
Copy link
Copy Markdown
Collaborator

Jennifer Weeks (mo-jenniferweeks) commented Jan 16, 2026

Greg Munday (@gregrmunday) is it possible to compare with the Edwards ISMIP emulation too, even though it is to 2100 only?

@gregrmunday Greg Munday (gregrmunday) changed the title Add new Antarctic component profsea-climate: Add new Antarctic component Jan 16, 2026
@gregrmunday
Copy link
Copy Markdown
Collaborator Author

Greg Munday (@gregrmunday) is it possible to compare with the Edwards ISMIP emulation too, even though it is to 2100 only?

Good idea, I'll assume the data is available with their paper?

@gregrmunday Greg Munday (gregrmunday) marked this pull request as ready for review April 3, 2026 10:21
@gregrmunday
Copy link
Copy Markdown
Collaborator Author

Hemant Khatri (@hmkhatri) this is ready for review!

Lots of changes throughout this one:

  • Optimisation and refactor of the Global class
  • Added the ISMIP6Emulator to the Global class
  • Updated probabilistic_wrapper.py and fixed some bugs
  • Fixed bugs in, improved the performance of, and improved the usability of the Spatial class

I would like to think about making all the auxiliary data required to run ProFSea easily available in some shape or form. One approach would be like how we do it in SpeedyWeather, with a separate repo for data (call it something like ProFSeaAssets). I'm sure we could compress all the CMIP6 and GRD/GIA patterns small enough to do that.

In that case we could include some code to download it locally when a ProFSea user calls Spatial() the first time, then after that it's already local. This could be a good idea as not every ProFSea user will want to produce spatial projections, they may just want to quickly make some global ones in which case having to download the extra spatial-related data is a pain.

If we can compress the spatial data very small, then we could just include it in the repo, but this could be less ideal.

@hmkhatri
Copy link
Copy Markdown
Collaborator

Greg Munday (@gregrmunday) Thanks for the pull request. I will review it this week.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Greg Munday (@gregrmunday) Could you add some comments about the approach in antarctica.py ? This is the main part of the calculation and some notes would be useful

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For sure! Will upload in the next commit

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added this in the latest commit. I don't think we need to go into excessive detail here as it'll be detailed in the paper.

Copy link
Copy Markdown
Collaborator

@hmkhatri Hemant Khatri (hmkhatri) left a comment

Choose a reason for hiding this comment

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

Greg Munday (@gregrmunday) thanks for the pull request. I have made some suggestions. Could you please look into those?

Also, it would be useful to add an option (wherever possible) to choose from different available methods for calculating a component. It provides more clarity to a user on what exactly is running behind ProFSea.

See issue #38

self.random_sample = random_sample
self.T_percentile_95 = T_percentile_95
self.OHC_percentile_95 = OHC_percentile_95
self.cum_emissions_total = cum_emissions_total
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I suggest retaining this. If we want to use AR5 method for icesheets, then we would need cumulative emissions.
Similar to glaciermip: bool | int = 2, could provide option to choose between ISMIP or AR5 method.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Alright I've kept this in. I agree we should come up with a nice way for users to choose how they want to build the model up with different components...

Comment on lines +214 to +218
if "antarctica" in self.active_components:
wais_path = Path(__file__).parent / "aux_data" / "wais_params.nc"
eais_path = Path(__file__).parent / "aux_data" / "eais_params.nc"
aispen_path = Path(__file__).parent / "aux_data" / "aispen_params.nc"
self.wais_model = AntarcticaISMIP6(wais_path)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is ActarcticaISMIP6 the only method for antractica component or is there an option to run with the older method? Better to retain both, in case one wants to run compare the two.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's not the only way, the user can specify antsmb and antdyn, although maybe this should be simplified with a general antarctica_ar5 component which models both.

self.scenario = scenario
self.T_change = np.asarray(T_change)
self.OHC_change = np.asarray(OHC_change)
self.cum_emissions_total = cum_emissions_total
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is no option to supply cum_emissions_total. Sugegst keeping this input for now.

def __init__(
self,
end_yr: int,
seed: int = 1234,
nt: int = 100,
nm: int = 1000,
tcv: float = 1.0,
glaciermip: bool | int = 2,
parallel: bool = True,
input_ensemble: bool = True,
output_percentiles: list | np.ndarray = None,
random_sample: bool = False,
T_percentile_95: np.ndarray = None,
OHC_percentile_95: np.ndarray = None,
palmer_method: bool = True,
active_components: list[str] = None,
) -> None:
self.end_yr = end_yr
self.nt = nt
self.nm = nm

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've re-added this

),
]
else:
raise KeyError("glaciermip must be 1 or 2")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems glaciermip = 3 is a valid option. I guess valid options for glaciermip input are False, 1, ,2 or 3. Is this correct?
Even if glaciermip is set to False, the else condition kicks in and computes its contribution.

else:
raise KeyError("glaciermip must be 1 or 2")
else:
glparm = [
dict(name="Marzeion", factor=4.96, exponent=0.685),
dict(name="Radic", factor=5.45, exponent=0.676),
dict(name="Slangen", factor=3.44, exponent=0.742),
dict(name="Giesen", factor=3.02, exponent=0.733),
]
cvgl = 0.20 # random methodological error
ngl = len(glparm) # number of glacier methods
r_per_model = self.nm // ngl
r_remainder = self.nm % ngl
r = self.rng.standard_normal(self.nm)

I am confused about which valid options are available for a user.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've removed the glaciermip3 option - I thought about including results from the latest glaciermip but I think this should be tackled in its own PR later down the line.

"Provide namelist of global projection components. "
"Currently allowed components are expansion, antdyn, "
"antsmb, glacier, greenland and landwater")
"antsmb, wais, eais, glacier, greenland and landwater")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Need some info on how antsmb, antdyn are different from wais, eais.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've update this error message to include more info!

self.components = {}
component_path = Path(components_dir) / f"{scenario}_global.nc"
ds_component = xr.load_dataset(component_path)
component_path = Path(components_dir)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this correct? Where is the filename of global.nc used?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You're right - this is poorly named, I think the user should provide the exact path to the file here.



def run_fair(baseline_start: int, baseline_end: int, scenarios: list) -> tuple[np.ndarray]:
def load_fair_forcing(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now sure about having load_fair_forcing function inside ProFSea. I suggest keeping ProFSea more general rather than tied to any specific climate emulator.

There is code for running FaIR as well here. I would suggest not to keep this in ProFSea. A user should run FaIR (or any other simple climate model) separately and supply inputs as needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think this is a fair point (no pun intended) but I do think it's super useful to have a script with FaIR baked in lying around somewhere in the repo, even if users don't need to rely on it all the time. We need to think a bit more carefully about what scripts are useful to provide along with the generally usable Global and Spatial objects, and where we should keep them.

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.

3 participants