2024-07-08
To access links or follow on your own device these slides can be found at:
jackatkinson.net/slides
Except where otherwise noted, these presentation materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License.
Vectors and icons by SVG Repo under CC0(1.0) or FontAwesome under SIL OFL 1.1
To paraphrase Easterbrook (2023) a parameterisation is:
“A mini-model reducing a complex set of equations or processes to represent what is hapenning within each grid cell.”
Microphysics by Sisi Chen Public Domain
Globe grid with box by Caltech under Fair use
To paraphrase Easterbrook (2023) a parameterisation is:
“a mini-model reducing a complex set of equations or processes to represent what is hapenning within each grid cell.”
Microphysics by Sisi Chen Public Domain
Globe grid with box by Caltech under Fair use
To paraphrase Easterbrook (2023) a parameterisation is:
“Each handles a different process to be tested on its own before coupling back to the dynamic core.”
To paraphrase Easterbrook (2023) a parameterisation is:
“regularly updated or replaced as modellers improve their understanding and find better methods.”
Paper published with equations
Simple standalone test written
Plot of online deployment in a GCM
Missing key details
RSE Unicorn designed by Cristin Merritt.
Parameterisations are often written tightly into models1
As a result parameterisations are often (re)-implemented for specific models.
Challenges:
Gravity waves by NASA/JPL - Public Domain
Deep convection by Hussein Kefel - Creative Commons
A software library developed at ICCS to tackle this X-VESRI1 challenge.
Provides an interface from Fortran to ML models saved in PyTorch
Available from :
github.com/Cambridge-ICCS/FTorch
use ftorch
implicit none
real, dimension(5), target :: in_data, out_data ! Fortran data structures
type(torch_tensor), dimension(1) :: input_tensors, output_tensors ! Set up Torch data structures
type(torch_model) :: torch_net
integer, dimension(1) :: tensor_layout = [1]
in_data = ... ! Prepare data in Fortran
! Create Torch input/output tensors from the Fortran arrays
call torch_tensor_from_array(input_tensors(1), in_data, tensor_layout, torch_kCPU)
call torch_tensor_from_array(output_tensors(1), out_data, tensor_layout, torch_kCPU)
call torch_model_load(torch_net, 'path/to/saved/model.pt') ! Load ML model
call torch_model_forward(torch_net, input_tensors, output_tensors) ! Infer
call further_code(out_data) ! Use output data in Fortran immediately
! Cleanup
call torch_tensor_array_delete(input_tensors)
call torch_tensor_array_delete(output_tensors)
call torch_model_delete(torch_net)
Current topics:
torch.autograd
1.
If you are interested or have feature requests/contributions please:
The parameterisation:
The coupling:
We should operate a principle of separation between physical model and net.
Concatenation
Normalisation
The alternative is re-writing code to perform this in the physical model
“a mini-model reducing a complex set of equations or processes to represent what is hapenning within each grid cell.”
“Each handles a different process to be tested on its own before coupling back to the dynamic core.”
“regularly updated or replaced as modellers improve their understanding and find better methods.”
“a mini-model reducing complex behaviour representing what is hapenning within each grid cell.”
“Each handles a different process to be tested on its own before coupling back to the dynamic core.”
“regularly updated or replaced as modellers improve their understanding and find better methods.”
“a mini-model reducing complex behaviour representing what is hapenning within each grid cell.”
“architectured and trained in isolation or in situ, to be (ported and) coupled back to a dynamic core.”
“regularly updated or replaced as modellers improve their understanding and find better methods.”1
Considered software design will speed up development and portability helping explore generalisation and stability, and further science.
ICCS Research Software Engineers:
Previous Members:
FTorch:
MiMA
CESM
Get in touch:
The ICCS received support from
These slides, and others, available at jackatkinson.net/slides