clima / climacalibrate.jl Goto Github PK
View Code? Open in Web Editor NEWCalibration pipeline for ClimaAtmos.jl
License: Apache License 2.0
Calibration pipeline for ClimaAtmos.jl
License: Apache License 2.0
The available slurm resource control we provide is restrictive and doesn't provide the capability we need. We should just pass slurm_args
as a tuple and splat them into the sbatch script.
This will mainly be useful for single-column experiments, where the precompilation time is a significant proportion of the overall model runtime.
Since this package will be used for other component models than Atmos, we should rename it to reflect this. This will be straightforward because the package is not registered.
The simplest name would be CalibrateModel.jl. Ollie also suggested ClimaCalibrate
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
Set up the basic framework for the repo, github actions, the future Julia package, and project tomls.
We should upgrade sooner rather than later, before more 1.8.5 infrastructure is added.
We need to wait for Atmos to update first.
Could I be a kill-joy here are suggest the name CalibrateClimaAtmos
because I expect folks may use this repo as somewhat of a template in future for calibration pipelines too; so starting a naming convention that scales would be a good idea.
Also i hate it ;)
Once ClimaAtmos#2341 is finalized and merged, we can add full GPU support.
This will just require setting proper sbatch
arguments for the driver, pipeline.sh
. We could do this quickly by adding an additional GPU driver, but I would rather have a unified interface.
I am planning on doing this by introducing a proper command line interface, which will also allow a simpler interface for running experiments.
We will need to :
This addresses the following issue of the O3.1.1 Milestone:
a_m
and a_b
params)pipeline.jl
runs without bash scripts and was here for debugging. As part of a separate PR, we can generalize it, so a similar script can be used by other lightweight models. For the heavyweight models, we may be able to wrap the bash / SLURM script execution into Julia's pipeline functions, so we can call the scripts from the model repos.There is no real mechanism to handle failures in the pipeline (particularly in forward model runs).
FailureHandler
from EnsembleKalmanProcesses will be used in order to fill the model output with NaNs and properly perform the update step with missing values.
See SampleSuccGauss for more info.
Derecho uses PBS instead of slurm, so we will need to create a new job controller with the same funcitonality as the slurm controller.
Given the new atmosphere component release - can we relax this version requirement?
This might be a bit confusing, separate into 2 functions?
We don't export anything, we should export useful methods/types:
An initial list:
The goal is to have calibration scripts for EDMF in ClimaAtmos.jl. This is an equivalent of https://github.com/CliMA/CalibrateEDMF.jl for the standalone EDMF repository.
Cost/Risk: The initial cost and risk are minimal. We will be mostly porting over and adapting the scripts from CalibrateEDMF.jl
Benefits: We need a calibration pipeline for EDMF in the ClimaAtmos model. The EDMF code is being refactored. It would be extremely helpful to be able to calibrate the refactored code to see if we can recover the current model results.
(@ the personnel required/requested to implement the software solution)
(Describe the main components of the software solution)
(Describe the inputs to the software solution)
(A preliminary list of PRs and a preliminary timeline of PRs, milestones, and key results)
hdf5
output from CA (instead of TC.jl
netCDF stats files).(Your best estimate of the date this software solution will be completed)
Likely need to set JULIA_CPU_TARGET: 'broadwell;skylake'
ERROR: Unable to find compatible target in system image.
Stacktrace:
[1] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base ./loading.jl:1052
[2] _tryrequire_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String)
@ Base ./loading.jl:1442
[3] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1816
[4] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1660
[5] macro expansion
@ ./loading.jl:1648 [inlined]
[6] macro expansion
@ ./lock.jl:267 [inlined]
[7] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1611
PRs such as this one in ClimaAtmos.jl need to call EKP directly for use due to newer features/uses as they do not exist in ClimaCalibrate.jl
CliMA/ClimaAtmos.jl#3223 (comment)
Add interfaces to EKP Observation/ObservationSeries objects and minibatch calls into CAL.
At present one can't interface at all with EKP, the idea being that everything is called within ClimaCalibrate objects.
CAL.initialize()
import ClimaCalibrate as CAL
import EnsembleKalmanProcesses as EKP
CAL.initialize(
ensemble_size,
observations,
prior,
output_dir,
process = EKP.Inversion(); # <- need EKP
scheduler = EKP.DefaultScheduler(eki_timestep), # <- ...
localization = EKP.Localizers.SECNice() # <- ...
# abc = EKP.xyz() <- ...
)
Can we allow users to configure their own EKP and then pass this into the ClimaCalibrate
wrapper?
i.e. should our guiding principle be that ClimaCalibrate
should not depend on the EKP configuration in order to work
For example, in your e.g. ClimaAtmos script
import EnsembleKalmanProcesses as EKP
initial_ensemble = EKP.construct_initial_ensemble(rng_ekp, prior, ensemble_size)
ekp_obj = EnsembleKalmanProcess(
intial_ensemble,
observation,
process = EKP.Inversion();
scheduler = EKP.DefaultScheduler(eki_timestep),
localization = EKP.Localizers.SECNice(),
)
Then we can pass this into ClimaCalibrate
so that it doesn't need to know anything about the EKP configuration
import ClimaCalibrate as CAL
CAL.initialize(ekp_obj, output_dir, prior) #
where we have added a new initialize which
function initialize(ekp_obj, output_dir, prior)
save_eki_state(eki, output_dir, 0, prior)
return eki
end
CES causes issues with precompilation due to its use of Conda and PyCall. I plan to remove these dependencies in the source package, but a quick fix is to only conditionally load CES.
We will implement a pipeline to calibrate on the moist held-suarez experiment in ClimaAtmos. We will calibrate on the horizontal temperature gradient.
Once this is complete, we will generalize to a pipeline that can handle other cases.
Primary risk is developer time, but this will save us a lot of time for manual calibration in the long run.
Currently the EKP.update_ensemble!(
has a return value too which is triggered by early termination (see here) due to adaptive timesteppers
Allow a return value
terminate = EKP.update_ensemble!(
and then use !isnothing(terminate)
to break the update loop
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.