profsea-climate: Add new Antarctic component#28
profsea-climate: Add new Antarctic component#28Greg Munday (gregrmunday) wants to merge 24 commits intoprofsea-climatefrom
profsea-climate: Add new Antarctic component#28Conversation
profsea/notebooks/ais_fitting.ipynb
Outdated
There was a problem hiding this comment.
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!
|
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! |
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. |
|
Greg Munday (@gregrmunday) is it possible to compare with the Edwards ISMIP emulation too, even though it is to 2100 only? |
profsea-climate: Add new Antarctic component
Good idea, I'll assume the data is available with their paper? |
|
Hemant Khatri (@hmkhatri) this is ready for review! Lots of changes throughout this one:
I would like to think about making all the auxiliary data required to run In that case we could include some code to download it locally when a If we can compress the spatial data very small, then we could just include it in the repo, but this could be less ideal. |
|
Greg Munday (@gregrmunday) Thanks for the pull request. I will review it this week. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
For sure! Will upload in the next commit
There was a problem hiding this comment.
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.
Hemant Khatri (hmkhatri)
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
There is no option to supply cum_emissions_total. Sugegst keeping this input for now.
ProFSea-tool/profsea/emulator/gmslr.py
Lines 135 to 155 in dd7ef43
There was a problem hiding this comment.
I've re-added this
| ), | ||
| ] | ||
| else: | ||
| raise KeyError("glaciermip must be 1 or 2") |
There was a problem hiding this comment.
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.
ProFSea-tool/profsea/emulator/gmslr.py
Lines 600 to 615 in dd7ef43
I am confused about which valid options are available for a user.
There was a problem hiding this comment.
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.
profsea/emulator/spatial.py
Outdated
| "Provide namelist of global projection components. " | ||
| "Currently allowed components are expansion, antdyn, " | ||
| "antsmb, glacier, greenland and landwater") | ||
| "antsmb, wais, eais, glacier, greenland and landwater") |
There was a problem hiding this comment.
Need some info on how antsmb, antdyn are different from wais, eais.
There was a problem hiding this comment.
I've update this error message to include more info!
profsea/emulator/spatial.py
Outdated
| self.components = {} | ||
| component_path = Path(components_dir) / f"{scenario}_global.nc" | ||
| ds_component = xr.load_dataset(component_path) | ||
| component_path = Path(components_dir) |
There was a problem hiding this comment.
Is this correct? Where is the filename of global.nc used?
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.




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!