DeepDA is a data assimilation framework for paleoclimate projects focusing on deep time.
This project is under active development.
Mingsong Li
Peking University
Email: msli {at} pku.edu.cn
Sept 18, 2024
Configuration parameters for running a data assimilation reconstruction using cGENIE priors.
Defines almost all parameters.
Jupyter notebook.
Main function.
Users must adjust the code for their own projects.
- DeepDA_psm.py
Functions useful for proxy system models
- DeepDA_tools.py
Miscellaneous functions
- LMR_DA.py
DA core code borrowed from the LMR project by G. J. Hakim, with additional code by L. Madaus
- modules_nc.py
Functions useful for working with the prior data
-
deepda_pyenv.yml
python environment dependencies
-
cGENIEGrid.csv
grid definition for cGENIE
-
cGENIEGridBound.csv
grid definition for cGENIE
-
oceanmask_p0055c_Atlantic.csv
Grid mask definition for the Atlantic in cGENIE
-
petmproxy3slices_v0.1.csv
proxy database
-
PETMTEX_baysparSettings_v0.2.csv
Tolerance settings for BAYSPAR
- A directory for saving outputs*
utilities for analyzing the outputs
- CESMreadNC4R18O.ipynb
Reads d18Osw from CESM simulation netCDF files
- correct_cgenie_biogem_2d.ipynb
Generates surface fields for cGENIE biogem_2d.nc file
- correct_cgenie_carb_ohm_cal.ipynb
Selects bottom water calcite saturation fields ('carb_ohm_cal_ben') using user-defined bathymetry
Updates cGENIE output files for sedgem (fields_sedgem_2d.nc)
- correct_cgenie_sed_caco3_13c.ipynb
Corrects the cGENIE sed_CaCO3_13C field
- ReadcGENIEresViaName.ipynb
Reads cGENIE .res files by name
- ReadDASummaryXlsxPlot-prePETM_SST.ipynb
Reads the wrk folder and writes *.summary.xlsx; extracts warming and cooling data for all variables
- ReadDASummaryXlsxPlot-SST.ipynb
Same as above, but for different SST-related data
- ReadDASummaryXlsxPlot.ipynb
Reads the wrk folder and writes *.summary.xlsx; extracts warming and cooling data for all variables
- DeepDA_verify_proxyunit-jobs.ipynb
Verifies DA outputs by reading proxy, prior, and posterior data from DA output files and config files.
Calculates statistics (corrcoef and CE) and saves outputs.
- DeepDA_verify_proxyunit-testR.ipynb
Similar functionality as above for verifying DA outputs.
../../ML.petm/
ML.petm029.ID.1/ # folder, exp 1
ML.petm029.ID.2/ # folder, exp 2
ML.petm029.ID.3/ # folder, exp 3
...
ML.petm029.ID.n/ # folder, exp n
Each experiment folder contains:
ML.petm029.ID.1/
archive/
atchem/
biogem/
ecogem/
...
rokgem/
sedgem/
Refer to the cGENIE.muffin Earth system model for more details on the model structure.
conda create --name deepda
Activate the environment:
conda activate deepda
To deactivate, use:
conda deactivate
git clone https://github.com/mingsongli/deepDA.git
cd misc
conda env update --file deepda_pyenv.yml
cd ../..
git clone https://github.com/mingsongli/bayfox.git
git clone https://github.com/mingsongli/baysparpy.git
git clone https://github.com/mingsongli/BAYMAG.git
Note: Some adjustments were made for the DA project, and the original code may not work as expected.
cd baysparpy
python setup.py install
cd ../bayfox
python setup.py install
cd ../baymagpy
python setup.py install
Read more about python setup.py
Navigate to the deepDA
folder:
cd ../deepDA
Run jupyterlab
:
jupyter lab
Revise settings in DeepDA_config.yml
accordingly.
Open DeepDA_allMC.ipynb
to start the notebook.
Adjust the code as needed for your project.
Click the triangle button to execute the notebook.
The output will be saved in the user-defined directory.
Good luck!
See
/misc/deepda_pyenv.yml
/misc/lmr_py3EnvCondaList.docx
Use the
correct_xxx.ipynb
scripts in the utils/
folder for minor corrections.