Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/provenance paul nadine #1022

Closed
wants to merge 136 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
4b91cb4
clean up the awicm1 runscript directory and adds a daily-restart func…
mandresm Jun 27, 2023
d6271eb
Bump version: 6.21.19 → 6.21.20
Jun 27, 2023
255445d
Merge pull request #984 from esm-tools/fix/awicm1_runscripts
mandresm Jun 27, 2023
8785775
Update sbatch_flags.rst
pgierz Jun 29, 2023
20bb23e
Merge pull request #986 from esm-tools/additioal_flags_docs
mandresm Jun 29, 2023
57823cd
adding awicm3 v3.1.1
JanStreffing Jul 4, 2023
44e6d74
remove fesom2 warning for missing restart files with the old now 99.9…
JanStreffing Jul 5, 2023
af585bc
Merge branch 'release' into fix/fesom_rst_warning
mandresm Jul 6, 2023
086c127
add TODO comment to the change
mandresm Jul 6, 2023
074b211
Bump version: 6.21.20 → 6.21.21
Jul 6, 2023
3a11dec
Merge pull request #992 from esm-tools/fix/fesom_rst_warning
mandresm Jul 6, 2023
24fcbdf
fix oasis restart for awicm3 when branching off an experiment but loa…
mandresm Jul 7, 2023
594fc49
Bump version: 6.21.21 → 6.21.22
Jul 7, 2023
ce08f9d
Merge pull request #994 from esm-tools/fix/oasis_branchoff_awicm3
mandresm Jul 7, 2023
cb6ca92
using same defaults for minor versions
JanStreffing Jul 10, 2023
a04e63f
runscript for v3.1.1
JanStreffing Jul 10, 2023
f67065c
fix multiple bugs in the oasis coupling field restarts
mandresm Jul 11, 2023
c6e7ebc
Merge branch 'release' into feat/awicm3.1.1
JanStreffing Jul 11, 2023
fc3bf10
need to set this for some reason
JanStreffing Jul 11, 2023
fcde5b7
using version and major_version instead of wildcards
JanStreffing Jul 12, 2023
43d2d06
adding awicm3.1.2 where the orbital forcing double radiation call bug…
JanStreffing Jul 12, 2023
b23b564
Update awicm3-v3.1.1-levante-TCO95L91-CORE2.yaml
JanStreffing Jul 12, 2023
322dd48
adding coupling and runscripts
JanStreffing Jul 12, 2023
9f3a60d
Update awicm3.yaml
JanStreffing Jul 12, 2023
fb3f2dc
fix another issue with the oasis restarts
mandresm Jul 12, 2023
3238de5
fix the standard branchoff for oasis3mct
mandresm Jul 12, 2023
9641e2d
Update src/esm_runscripts/oasis.py
mandresm Jul 12, 2023
05969a3
Update src/esm_runscripts/oasis.py
mandresm Jul 13, 2023
9a6404c
Update src/esm_runscripts/oasis.py
mandresm Jul 13, 2023
7c4020a
Bump version: 6.21.22 → 6.21.23
Jul 13, 2023
15f3b99
Merge pull request #996 from esm-tools/fix/oasis_branchoff_and_restarts
mandresm Jul 13, 2023
dca6839
Merge remote-tracking branch 'origin/release' into feat/awicm3.1.1
mandresm Jul 13, 2023
9df3a6e
Bump version: 6.21.23 → 6.22.0
Jul 13, 2023
3eb5677
Merge pull request #991 from esm-tools/feat/awicm3.1.1
mandresm Jul 13, 2023
be0b9ea
Merge branch 'release' into feat/awicm3.1.2
mandresm Jul 13, 2023
b509593
Bump version: 6.22.0 → 6.23.0
Jul 13, 2023
f8d6c84
Merge pull request #997 from esm-tools/feat/awicm3.1.2
mandresm Jul 13, 2023
22b8898
First attempt to catch wrong syntax in add_namelist_changes block.
nwieters Jul 24, 2023
1b19e3c
Add one more exception for syntax error in add_namelist_changes and c…
nwieters Jul 25, 2023
0e31bd0
docs for venv
mandresm Jul 26, 2023
a52d6b2
improvement of the docs for venvs
mandresm Jul 26, 2023
2e609d5
Update docs/esm_runscripts.rst
mandresm Jul 26, 2023
f08f62d
Update docs/esm_runscripts.rst
mandresm Jul 26, 2023
acd449d
Update docs/esm_runscripts.rst
mandresm Jul 26, 2023
ba00c0b
Update docs/esm_runscripts.rst
mandresm Jul 26, 2023
19c7d58
sugestion from @nwieters
mandresm Jul 26, 2023
743fce6
t Merge branch 'docs/run_with_virtual_env' of https://github.com/esm-…
mandresm Jul 26, 2023
329bf9f
Implementing review suggestions.
nwieters Jul 26, 2023
03cd54a
Removed obsolet line.
nwieters Jul 26, 2023
dd223e2
Added exception if runscript does not exists in requested folder.
nwieters Jul 26, 2023
ddd93a7
fix problem introduced by 970
mandresm Jul 27, 2023
d3541fc
fix another problem with the docs 1
mandresm Jul 27, 2023
e27838b
fix another problem with the docs 2
mandresm Jul 27, 2023
c2c9329
fix another problem with the docs 3
mandresm Jul 27, 2023
e0b0190
fix another problem with the docs 4
mandresm Jul 27, 2023
51b9b14
Merge branch 'docs/fix_problems_introduced_by_970' into docs/run_with…
mandresm Jul 27, 2023
2063fac
add warning about conda
mandresm Jul 27, 2023
4ccf5e0
add highlight of esm_runscripts
mandresm Jul 27, 2023
b25c9fd
correct grammar
mandresm Jul 27, 2023
beeefe1
Changed docstrings in namelists.py
nwieters Jul 27, 2023
d9b84fe
Update configs/components/echam/echam.yaml
mandresm Jul 27, 2023
9e85b8e
Update configs/components/echam/echam.yaml
mandresm Jul 27, 2023
c0cb33b
Bump version: 6.23.0 → 6.23.1
Jul 27, 2023
77e10b1
Merge pull request #1005 from esm-tools/1004-catch-when-users-try-to-…
nwieters Jul 27, 2023
eda7167
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
2a8dc70
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
338ceb7
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
8afa9b0
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
1b23f65
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
9109f0f
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
25c8370
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
7b3e43b
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
037af33
Update src/esm_runscripts/namelists.py
nwieters Jul 27, 2023
4403a56
Removed unnecessary spaces.
nwieters Jul 27, 2023
6e6d4c9
Merge pull request #1006 from esm-tools/docs/fix_problems_introduced_…
mandresm Jul 27, 2023
f00b026
Merge branch 'release' into 1001-catch-when-users-does-add_namelist_c…
nwieters Jul 27, 2023
865e49e
Bump version: 6.23.1 → 6.23.2
Jul 27, 2023
9f8ff2a
Merge pull request #1002 from esm-tools/1001-catch-when-users-does-ad…
nwieters Jul 27, 2023
f7fd219
Merge pull request #1003 from esm-tools/docs/run_with_virtual_env
mandresm Jul 28, 2023
677235d
fix issue #1009
mandresm Jul 31, 2023
bc25803
Bump version: 6.23.2 → 6.23.3
Aug 1, 2023
de36112
Merge pull request #1012 from esm-tools/fix/resolve_symlinks
mandresm Aug 2, 2023
2fbd302
add correct forcing files for greenhouse hist and MAC-SP
mandresm Aug 4, 2023
6ce1f95
Fix in set_provenance.
nwieters Aug 7, 2023
2f1aec7
Added unit tests for provenance.
nwieters Aug 7, 2023
b0bc75e
Small bugfix in set_proevance.
nwieters Aug 7, 2023
ca8efd7
Added requirement for ruamel.yaml to setup.py.
nwieters Aug 8, 2023
248d222
Fixed one unit test for provenance.
nwieters Aug 8, 2023
c72511e
Added github wirkspace env variable to test_provenance.
nwieters Aug 8, 2023
e0aef1d
Added GITHUB_WORKSPACE env var to provenance unit test.
nwieters Aug 8, 2023
c5a7576
Added abs path to provenance unit tests.
nwieters Aug 8, 2023
27484d9
Deleted some stupid stuff in provenance unit tests.
nwieters Aug 8, 2023
059c669
Set env var USER in provenance unit tests.
nwieters Aug 8, 2023
89ed762
Temporarily commented out a failing provenance unit test (test 9).
nwieters Aug 8, 2023
7bfb453
Bump version: 6.23.3 → 6.23.4
Aug 9, 2023
6d780e1
Merge pull request #1016 from esm-tools/fix/echam_hist
mandresm Aug 9, 2023
70a3c83
Add possibility to set env variable GITHUB_WORKSPACE for running prov…
nwieters Aug 9, 2023
e46988a
Created seperate class for WrapperWithProvenance_int and WrapperWithP…
nwieters Aug 9, 2023
6af1587
Fixed alignment.
nwieters Aug 9, 2023
64d7760
add provenance object which is a subclass of list for which each elem…
mandresm Aug 9, 2023
3d461df
remove pickling from esm_master that breaks the provenance
mandresm Aug 10, 2023
e7d4411
remove ESM_MASTER_PICKLE variable
mandresm Aug 10, 2023
53f0456
Added review suggestions.
nwieters Aug 10, 2023
159e314
Removed old stuff.
nwieters Aug 10, 2023
2879b60
Merge pull request #1020 from esm-tools/feat/provenance_rm_pickle_fro…
mandresm Aug 10, 2023
eb827a6
Added review suggestions.
nwieters Aug 10, 2023
d8305ef
Small bugfix in set_provenance.
nwieters Aug 10, 2023
4f3cfb1
Removed print statements.
nwieters Aug 10, 2023
3260495
fix test 9
mandresm Aug 10, 2023
94c0466
Fix assertion for Test 9 in test_provenance.py.
nwieters Aug 10, 2023
661e5ae
add testing dependecies
mandresm Aug 10, 2023
afa8d8c
remove failing doc test which needs to be rewritten anyway in another PR
mandresm Aug 10, 2023
4e59e57
Merge remote-tracking branch 'origin/feat/provenance_variables_with_p…
mandresm Aug 10, 2023
cd430bf
Merge branch 'release' into fix_and_tests_provenance_variables_with_prov
mandresm Aug 10, 2023
d6e86e6
Merge pull request #1018 from esm-tools/fix_and_tests_provenance_vari…
nwieters Aug 11, 2023
bc5fc96
Merge pull request #1010 from esm-tools/feat/provenance_variables_wit…
mandresm Aug 11, 2023
f7b7821
Merge branch 'feat/provenance' into feat/provenance_paul
nwieters Aug 11, 2023
3575f9d
Merge branch 'feat/provenance' into feat/provenance_history
mandresm Aug 11, 2023
e23248e
First attempt for a provenence yaml representer.
nwieters Aug 14, 2023
0c12c45
we don't use travis CI or gitlab, kill the extra files right away
pgierz Aug 22, 2023
7efa308
removes compiled pdf and windows-only makefile from docs folder, we d…
pgierz Aug 22, 2023
0e535e1
fix provenance history and all the existing pytests
mandresm Nov 20, 2023
b2f369f
add custom __setitem__ also to ListWithProvenance, tests for keep_pro…
mandresm Nov 20, 2023
8055ee1
add better naming for keep_provenance functions, add exception for pr…
mandresm Nov 20, 2023
b0dde43
fix a bug in the keep_provenance_in_setitem
mandresm Nov 20, 2023
791c3a0
remove deepcopies that were unnecessary and slowing down the code. Ad…
mandresm Nov 30, 2023
ef7abe3
update method tracks provenance history in DictWithProvenance
mandresm Jan 4, 2024
1546f77
fix indentation mistake
mandresm Jan 4, 2024
891e88e
fixed a bug with WrapperWithProvenance.__new__ method that was preven…
mandresm Feb 28, 2024
8c96918
improve docstrings of the provenance
mandresm Feb 28, 2024
25922e9
turn the local wrapper classes into globals and avoid creating a clas…
mandresm Mar 1, 2024
ad47c94
clean up the finished_config from provenance before yaml dumping and …
mandresm Mar 8, 2024
12c96e6
complete the docstrings for provenance
mandresm Mar 8, 2024
aacb997
correct docstrings in provenance tests
mandresm Mar 8, 2024
3f21e52
Merge pull request #1021 from esm-tools/feat/provenance_history
mandresm Mar 8, 2024
a7863e3
Merge branch 'feat/provenance' into feat/provenance_paul_nadine
mandresm Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true
fail_on_warning: false

# Build documentation with MkDocs
#mkdocs:
Expand Down
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

25 changes: 7 additions & 18 deletions configs/components/echam/echam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,13 @@ metadata:
Authors: Bjorn Stevens ([email protected]) among others at MPI-Met
Publications:
'Atmosphericcomponent of the MPI-M earth system model: ECHAM6 <https://doi.org/10.1002/jame.20015>'
License: >
License:
Please make sure you have a license to use ECHAM. Otherwise downloading ECHAM will already fail.
To use the repository on any of these locations:

* gitlab.dkrz.de/modular_esm/echam.git
* gitlab.awi.de/paleodyn/models/echam.git

please register for the MPI-ESM user forum at:

https://code.mpimet.mpg.de/projects/mpi-esm-license

To use the repository on either gitlab.dkrz.de/modular_esm/echam6.git or gitlab.awi.de/paleodyn/models/echam6.git,
please register for the MPI-ESM user forum at https://code.mpimet.mpg.de/projects/mpi-esm-license
and send a screenshot of yourself logged in to the forum to either [email protected], [email protected],
or [email protected].

Note also that you can otherwise ignore the instructions on that page, just the registiration and login screen shot
is important for us.

Have fun using ECHAM! :-)
or [email protected]. Note also that you can otherwise ignore the instructions on that page, just the registration
and login screen shot is the relevant part for obtaining the license.

standalone_model: True

Expand Down Expand Up @@ -405,11 +394,11 @@ choose_scenario:
aerofin_1850: piaerofin
aerofin_1851: piaerofin
ozone: ozone_hist_scenario
greenhouse: histgreenh
greenhouse: greenhouse_hist_scenario
volcir: histvolcir
volcsw: histvolcsw
swflux: histswflux
MAC-SP: MAC-SP
MAC-SP: MAC-SP_hist_scenario

cmip6hist:
scenario_type: cmip6
Expand Down
6 changes: 4 additions & 2 deletions configs/components/fesom/fesom-2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ restart_in_in_work:
fesom_bin_restart_info: fesom_bin_restart/*.info
fesom_bin_restart: fesom_bin_restart/np${nproc}/*
restart_in_sources:
oce_restart: fesom.${parent_date!syear}.oce.restart.nc
ice_restart: fesom.${parent_date!syear}.ice.restart.nc
# TODO: When cleaning up the FESOM yamls, remove the wildcard and make this file
# be dependent on the corresponding namelist option
oce_restart: fesom.${parent_date!syear}.o*e.restart.nc
ice_restart: fesom.${parent_date!syear}.i*e.restart.nc
par_oce_restart: fesom.${parent_date!syear}.oce.restart/*.nc
par_ice_restart: fesom.${parent_date!syear}.ice.restart/*.nc
fesom_raw_restart_info: fesom_raw_restart/*.info
Expand Down
20 changes: 20 additions & 0 deletions configs/components/oifs/oifs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ compile_infos:
- 43r3-master
- 43r3-awicm-3.0
- 43r3-awicm-3.1
- 43r3-awicm-3.1.1
- 43r3-awicm-3.1.2
- 43r3-awicm-frontiers-xios
- 43r3
- 40r1-foci
Expand Down Expand Up @@ -139,6 +141,24 @@ compile_infos:
install_bins: make/esm/oifs/bin/oifs
destination: oifs-43r3
with_xios: true
43r3-awicm-3.1.1:
requires:
- oasis3mct-4.0-awicm-3.1
branch: awicm-3.1.1
comp_command: "export OIFS_TOPLEVEL_DIR=${model_dir}; export OIFS_XIOS=enable ; export OIFS_XIOS_DIR=${model_dir}/../xios ; export OIFS_XIOS_INCLUDE=-I/${model_dir}/../xios/inc/; cd make; ../fcm/bin/fcm make -v -j8 -f oifs.fcm ; chmod -R ${source_code_permissions} .; mv esm/oifs/bin/master.exe esm/oifs/bin/oifs"
git-repository: https://gitlab.dkrz.de/ec-earth/oifs-43r3.git
install_bins: make/esm/oifs/bin/oifs
destination: oifs-43r3
with_xios: true
43r3-awicm-3.1.2:
requires:
- oasis3mct-4.0-awicm-3.1
branch: awicm-3.1.2
comp_command: "export OIFS_TOPLEVEL_DIR=${model_dir}; export OIFS_XIOS=enable ; export OIFS_XIOS_DIR=${model_dir}/../xios ; export OIFS_XIOS_INCLUDE=-I/${model_dir}/../xios/inc/; cd make; ../fcm/bin/fcm make -v -j8 -f oifs.fcm ; chmod -R ${source_code_permissions} .; mv esm/oifs/bin/master.exe esm/oifs/bin/oifs"
git-repository: https://gitlab.dkrz.de/ec-earth/oifs-43r3.git
install_bins: make/esm/oifs/bin/oifs
destination: oifs-43r3
with_xios: true
43r3-awicm-frontiers-xios:
requires:
- oasis3mct-4.0-awicm-frontiers
Expand Down
9 changes: 4 additions & 5 deletions configs/components/tux/tux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ clean_command: "rm -fr ${install_bins}"
comp_command: "display ${install_bins}"

metadata:
Institute: wiki
Description:
"Tux image"
Authors: "who knows"
Institute: ""
Description: ""
Authors: ""
Publications:
- "are you serious?"
- " "
License:
GPL
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
components:
- xios-2.5
- rnfmap-awicm-3.1
- oifs-43r3-awicm-3.1.1
- fesom-2.0-awicm-3.1
- oasis3mct-4.0-awicm-3.1
coupling_changes:
- sed -i '/COUPLENEMOECE = /s/.TRUE./.FALSE./g' oifs-43r3/src/ifs/module/yommcc.F90
- sed -i '/COUPLEFESOM2 = /s/.FALSE./.TRUE./g' oifs-43r3/src/ifs/module/yommcc.F90
- sed -i '/COUPLENEMOFOCI = /s/.TRUE./.FALSE./g' oifs-43r3/src/ifs/module/yommcc.F90

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
components:
- xios-2.5
- rnfmap-awicm-3.1
- oifs-43r3-awicm-3.1.2
- fesom-2.0-awicm-3.1
- oasis3mct-4.0-awicm-3.1
coupling_changes:
- sed -i '/COUPLENEMOECE = /s/.TRUE./.FALSE./g' oifs-43r3/src/ifs/module/yommcc.F90
- sed -i '/COUPLEFESOM2 = /s/.FALSE./.TRUE./g' oifs-43r3/src/ifs/module/yommcc.F90
- sed -i '/COUPLENEMOFOCI = /s/.TRUE./.FALSE./g' oifs-43r3/src/ifs/module/yommcc.F90

32 changes: 27 additions & 5 deletions configs/setups/awicm3/awicm3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,49 @@ general:
available_versions:
- 'v3.0'
- 'v3.1'
- 'v3.1.1'
- 'v3.1.2'
- 'master'
- 'frontiers-xios'
choose_version:
v3.0:
major_version: v3.0
couplings:
- fesom-2.0-awicm-3.0+oifs-43r3-awicm-3.0
v3.1:
major_version: v3.1
couplings:
- fesom-2.0-awicm-3.1+oifs-43r3-awicm-3.1+xios-2.5
add_include_models:
- xios
add_further_reading:
- xios/xios.env.yaml
v3.1.1:
major_version: v3.1
couplings:
- fesom-2.0-awicm-3.1+oifs-43r3-awicm-3.1.1+xios-2.5
add_include_models:
- xios
add_further_reading:
- xios/xios.env.yaml
v3.1.2:
major_version: v3.1
couplings:
- fesom-2.0-awicm-3.1+oifs-43r3-awicm-3.1.2+xios-2.5
add_include_models:
- xios
add_further_reading:
- xios/xios.env.yaml
master:
major_version: master
couplings:
- fesom-2.0-master+oifs-43r3-master
add_include_models:
- xios
add_further_reading:
- xios/xios.env.yaml
frontiers-xios:
major_version: frontiers-xios
couplings:
- fesom-2.0-frontiers+oifs-43r3-awicm-frontiers-xios+xios-2.5
add_include_models:
Expand Down Expand Up @@ -109,7 +131,7 @@ oifs:
rtables_dir: ${input_dir}/rtables/
forcing_dir: ${input_dir}/${version}/ifsdata/
ifsdata_dir: ${input_dir}/${version}/ifsdata/
choose_general.version:
choose_general.major_version:
"v3.0":
namelist_dir: ${general.esm_namelist_dir}/oifs/${version}/awicm3/v3.0
mip: "cmip6"
Expand Down Expand Up @@ -336,7 +358,7 @@ fesom:
oce_tra:
surf_relax_s: "${surf_relax_s}"

choose_general.version:
choose_general.major_version:
"v3.0":
namelist_dir: "${esm_namelist_dir}/fesom2/2.0/awicm3/v3.0/"
add_namelist_changes:
Expand Down Expand Up @@ -547,7 +569,7 @@ oasis3mct:
r2a_seq: 2

coupling_time_step: "${oasis3mct.time_step}"
choose_general.version:
choose_general.major_version:
'frontiers-xios':
mct_version: 4.0
input_dir: ${pool_dir}/cy${oifs.version}/${oifs.resolution}-${fesom.resolution}/
Expand Down Expand Up @@ -706,9 +728,9 @@ oasis3mct:
true:
lag: "${time_step}"
# If ini_restart_dir is not specified in the runscript and, therefore,
# it is not a branched off experiment add the /fesom.nproc/ to the
# it is not a branched off experiment adds the /fesom.nproc/ to the
# sources when the run_number is 1
load_restart_from_pool: "$(( '${input_dir}' == '${ini_restart_dir}' and ${general.run_number} == 1))"
load_restart_from_pool: "$(( os.path.realpath('${input_dir}') == os.path.realpath('${ini_restart_dir}') and ${general.run_number} == 1 ))"
choose_load_restart_from_pool:
true:
add_restart_in_sources:
Expand Down
69 changes: 67 additions & 2 deletions docs/esm_runscripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ This will enable the `pdb Python debugger <https://docs.python.org/3/library/pdb
Setting the file movement method for filetypes in the runscript
---------------------------------------------------------------

By default, `esm_runscripts` copies all files initially into the first ``run_``-folder, and from there to ``work``. After the run, outputs, logs, restarts etc. are copied
By default, ``esm_runscripts`` copies all files initially into the first ``run_``-folder, and from there to ``work``. After the run, outputs, logs, restarts etc. are copied
from ``work`` to ``run_``, and then moved from there to the overall experiment folder. We chose that as the default setting as it is the safest option, leaving the user
with everything belonging to the experiment in one folder. It is also the most disk space consuming, and it makes sense to link some files into the experiment rather
than copy them.

As an example, to configure `esm_runscripts` for an echam-experiment to link the forcing and inputs, one can add the following to the runscript yaml file:
As an example, to configure ``esm_runscripts`` for an echam-experiment to link the forcing and inputs, one can add the following to the runscript yaml file:

.. code-block:: yaml

Expand All @@ -352,3 +352,68 @@ As an example, to configure `esm_runscripts` for an echam-experiment to link the

Both ways to set the entries are doing the same thing. It is possible, as in the ``input`` case, to set the file movement method independently for each of the
directions; the setting ``all_directions`` is just a shortcut if the method is identical for all of them.

Running an experiment with a virtual environment
-----------------------------------------------

Running jobs can optionally be encapsulated into a virtual environment.

To use a virtual environment run ``esm_runscripts`` with the flag
``--contained-run`` or set ``use_venv`` within the ``general`` section of your
runscript to ``True``:

.. code-block:: yaml

general:
use_venv: True

This shields the run from changes made to the remainder of the ESM-Tool installation,
and it's strongly recommended for production runs.

.. warning::
Refrain from using this feature if you have installed ESM-Tools within a conda
environment. Conda enviroment installation is still in its testing phase and we
cannot evaluate yet which conflicts might arise from combining both the venv of
this feature and the environment from conda.

If you choose to use a virtual environment, a local installation will be created in the experiment tree at the begining of the first run into the folder named ``.venv_esmtools``. **That** installation will be used for the experiment. It will be installed at the root of your experiment and contains all the Python libraries used by ESM-Tools. The installation at the beginning of the experiment will induce a small overhead (~2-3 minutes).

For example, for a user ``miguel`` with a run with `expid` ``test`` ESM-Tools will be installed here::

/scratch/miguel/test/.venv_esmtools/lib/python3.10/site-packages/esm_tools

instead of::

/albedo/home/miguel/.local/lib/site-packages/esm_tools

The virtual environment installs by default the ``release`` branch, pulling it directly
from our GitHub repository. You can choose to override this default by specifying another
branch, adding to your runscript:

.. code-block:: yaml

general:
install_esm_tools_branch: '<your_branch_name>'

.. warning::
The branch **needs to exist on GitHub** as it is cloned form there, and **not from your
local folder**. If you made any changes in your local branch make sure they are pushed before
running ``esm_runscripts`` with a virtual environment, so that your changes are included in the
virtual environment installation.

You may also select to install esm_tools in `editable mode`, in which case
they will be installed in a folder ``src/esm_tools/`` in the root of
your experiment. Any changes made to the code in that folder **will** influence how
ESM-Tools behave. To create a virtual environment with ESM-Tools installed in
`editable` mode use:

.. code-block:: yaml

general:
install_<esm_package>_editable: true/false

.. note::
When using a virtual environment, config files and namelists will come of the
folder .venv_esmtools listed above and **not** from your user install directory.
You should make **all** changes to the namelists and config files via your user
runscript (:ref:`yaml:Changing Namelists`). This is recommended in all cases!!!
Binary file removed docs/esm_tools.pdf
Binary file not shown.
36 changes: 0 additions & 36 deletions docs/make.bat

This file was deleted.

Loading
Loading