Skip to content

profsea-climate: Build custom models! #48

Draft
Greg Munday (gregrmunday) wants to merge 38 commits intoprofsea-climatefrom
profsea-climate-v2
Draft

profsea-climate: Build custom models! #48
Greg Munday (gregrmunday) wants to merge 38 commits intoprofsea-climatefrom
profsea-climate-v2

Conversation

@gregrmunday
Copy link
Copy Markdown
Collaborator

Taking inspiration from SpeedyWeather.jl and Milan Klöwer (@milankl), this PR will restructure ProFSea so that users can build a particular model configuration as they choose using a simple Python script.

The gist is to disentangle each model component in the current code so that it can be used independently. Then, a user can put together a simple Python script where they import each model component they want to use, build their own configuration (or use an existing one) and compute projections.

For developers, this is extremely helpful because model component updates or additions are completely isolated to a specific file or block of code, making PRs much more easy to manage.


No science changes in this code, just code structure. Hemant Khatri (@hmkhatri) and I will produce PR's to be merged into this branch, ensuring each model component change is tested against results from the current structure. Eventually, we'll merge this branch into the 'main' profsea-climate branch.

Example look at how someone would use ProFSea after this update:

from components.core.emulator import Global
from components.global.antarctica import AntarcticaISMIP6, AntarcticaDynAR5
from components.global.glaciers import GlacierMIP2
from components.global.greenland import GreenlandAR6

# User builds their specific model configuration
my_slr_components = {
    "glacier": GlacierMIP2(),
    "greenland": GreenlandAR6(palmer_method=True),
    # User can easily swap out AR5 dynamics for ISMIP6 here
    "antarctica": AntarcticaISMIP6(wais_path="...", eais_path="..."), 
}

# Initialize the emulator with these components
model = GlobalEmulator(
    components=my_slr_components,
    end_yr=2100,
    nt=100,
    nm=1000
)

# Run the projection
projections = model.run(scenario="ssp585", T_change=temp_data, OHC_change=ohc_data)

@hmkhatri Hemant Khatri (hmkhatri) marked this pull request as draft April 13, 2026 15:10
Greg Munday (gregrmunday) and others added 28 commits April 13, 2026 16:12
`profsea-climate-`v2`: Add Greenland
`profsea-climate-`v2`: landwater AR6 component
`profsea-climate-v2`: Add Global model save method
`profsea-climate-v2`: Add AR5 Antarctica components
`profsea-climate-v2`: Add AR5 Greenland components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants