Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1014c93
Begin adding single dataset capability
mkstratos Apr 23, 2026
27c2816
Fix issue with undefined defaults
mkstratos Apr 23, 2026
9f81531
Bump version number
mkstratos Apr 23, 2026
99b734b
Update version for new features
mkstratos Apr 23, 2026
34f103e
Enable single dataset plotting
mkstratos Jun 22, 2026
c2ec9df
Add new config flags for figure DPI and file extension
mkstratos Jun 22, 2026
002b262
Add new snow module for snow cover / storage analysis
mkstratos Jun 22, 2026
0fe292b
Update template and gen-cfg with new snow cover/storage fields
mkstratos Jun 22, 2026
42ec7d4
Resolve version conflict
mkstratos Jun 22, 2026
2675b7a
Add new dataset config sections
mkstratos Jun 22, 2026
d9d49e7
Handle climos when start/end month not Jan-Dec
mkstratos Jul 6, 2026
a7ab53f
Update action versions
mkstratos Mar 31, 2026
9faaed4
Remove unused code
mkstratos Jul 27, 2026
fc6e3f2
Add more documentation
mkstratos Jul 27, 2026
99718f3
Add documentation and type hints
mkstratos Jul 28, 2026
1aa727f
Update style for docs, fix linking issues
mkstratos Aug 3, 2026
ac67b03
Fix reference config key name
mkstratos Aug 17, 2026
672b8a8
Add test for running livv on generated output
mkstratos Aug 17, 2026
a1ab968
Allow graceful failure if one analysis fails
mkstratos Aug 17, 2026
6f96cd4
Update workflow versions
mkstratos Aug 17, 2026
ce64ff9
Fix newlines
mkstratos Aug 17, 2026
f933459
Rename simple test description config to desc to match real config
mkstratos Aug 24, 2026
3d86e4e
Convert trend units from yr^-1/yr to yr^-2
mkstratos Aug 24, 2026
ca1c303
Improve apperance of single-panel time series plots
mkstratos Sep 14, 2026
ab7b858
Add min/max to corner labels on gridded plots
mkstratos Sep 14, 2026
523e84f
Add test for climo file non-Jan start
mkstratos Sep 14, 2026
a5e146f
Fix formatting
mkstratos Sep 14, 2026
2684b76
Use "snow" common for snow props, add model years to metadata
mkstratos Sep 15, 2026
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
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: 3.14

- name: Set up Pixi ${{ matrix.python-version }}
uses: prefix-dev/setup-pixi@v0.9.4
uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.62.2
pixi-version: v0.76.2
# Project environment caching uses pixi.lock as the cache key input.
# If you don't commit a lockfile, disable caching to avoid ENOENT.
# cache: ${{ hashFiles('pixi.lock') != '' }}
Expand All @@ -33,7 +33,7 @@ jobs:
--config pyproject.toml

- name: Push API documentation to Github Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
timeout-minutes: 2
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Set up python
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: 3.13
python-version: 3.14
- name: Runs pre-commit
run: |
pip install pre-commit
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.4
uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.62.2
pixi-version: v0.76.2
environments: buildenv

- name: Build release distributions
Expand All @@ -34,7 +34,7 @@ jobs:
pixi run -e buildenv python -m build

- name: Upload distributions
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: release-dists
path: dist/
Expand All @@ -60,7 +60,7 @@ jobs:

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: release-dists
path: dist/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
pixi-env: py314dev

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up Pixi ${{ matrix.python-version }}
uses: prefix-dev/setup-pixi@v0.9.4
with:
Expand Down
161 changes: 157 additions & 4 deletions config/zppy_template_r05.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ common: &common
Case ID: [{{ case_id }}]
Climatology years: [1980-2020]
Model: [E3SM-ELM]
{% endraw %}
Model years: [{{ year1 }} - {{ year2 }}]
{% raw %}
climo: {{ dir_native }}/{{ case_id }}_{clim}_{sea_s}_{sea_e}_climo.nc
latlon: &climo_ann_file
{{ dir_native }}/{{ case_id }}_ANN_{sea_s}_{sea_e}_climo.nc
Expand All @@ -18,11 +21,11 @@ common: &common
topov: topo
landfracv: landfrac
img_height: 300
{% endraw %}
{% endraw %}
# These come from zppy
year_s: {{ year1 }}
year_e: {{ year2 }}
{% raw %}
{% raw %}

common_smb: &common_smb
smbv: QICE
Expand All @@ -36,6 +39,13 @@ common_smb: &common_smb
- {{ livvproj_dir }}/smb/smb_icecores.bib
- {{ livvproj_dir }}/livvkit.bib

common_snow: &common_snow
cmap: YlGnBu
cmap_diff: BrBG
units: mm
References:
- {{ livvproj_dir }}/livvkit.bib

common_energy: &common_energy
desc: Surface energy balance component {component}{comment} from {data_var_names}
references:
Expand All @@ -46,6 +56,15 @@ common_energy: &common_energy
cmap: plasma
cmap_diff: RdBu_r

common_elm: &common_elm
dataset_names: { model: ELM }
timeseries_dirs:
model: "{{ dir_ts_native }}"
ts_file_patterns:
model: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
masks:
model: /global/cfs/cdirs/e3sm/diagnostics/livvkit_data/grids/msk_{icesheet}_rcm_r05.nc

common_racmo: &common_racmo
clim_years:
dset_a: { year_s: 1980, year_e: 2020 }
Expand All @@ -57,8 +76,8 @@ common_racmo: &common_racmo
model: "{{ dir_ts_native }}"
dset_a: "{{ racmo_root_dir }}/ts"
ts_file_patterns:
model: "{_var}_{year_s}01_{year_e}12.nc"
dset_a: "{_var}_{icesheet}_{year_s}01_{year_e}12.nc"
model: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
dset_a: "{_var}_{icesheet}_{year_s:04d}01_{year_e:04d}12.nc"
masks:
dset_a: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_rcm.nc
model: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_rcm.nc
Expand All @@ -73,6 +92,12 @@ common_era5: &common_era5
dset_a: { year_s: 1979, year_e: 2019}
in_dirs: {dset_a: {{ e3sm_diags_data_dir }}/observations/Atm/climatology/ERA5}
file_patterns: {dset_a: 'ERA5_{season}_{sea_s}_{sea_e}_climo.nc'}
timeseries_dirs:
model: "{{ dir_ts_native }}"
dset_a: "{{ e3sm_diags_data_dir }}/observations/Atm/time-series/ERA5"
ts_file_patterns:
model: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
dset_a: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
masks:
dset_a: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_remap_era5.traave.nc
model_remap: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_remap_era5.traave.nc
Expand All @@ -82,6 +107,12 @@ common_merra: &common_merra
climo_remap: {{ dir_merra2 }}/{{ case_id }}_{clim}_{sea_s}_{sea_e}_climo.nc
in_dirs: {dset_a: {{ e3sm_diags_data_dir }}/observations/Atm/climatology/MERRA2}
file_patterns: {dset_a: 'MERRA2_{season}_{sea_s}_{sea_e}_climo.nc'}
timeseries_dirs:
model: "{{ dir_ts_native }}"
dset_a: "{{ e3sm_diags_data_dir }}/observations/Atm/time-series/MERRA2"
ts_file_patterns:
model: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
dset_a: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
masks:
dset_a: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_remap_merra2.traave.nc
model_remap: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_remap_merra2.traave.nc
Expand All @@ -100,6 +131,12 @@ common_ceres: &common_ceres
scales: { model: 1, dset_a: 1 }
clim_years:
dset_a: { year_s: 2001, year_e: 2018 }
timeseries_dirs:
model: "{{ dir_ts_native }}"
dset_a: "{{ e3sm_diags_data_dir }}/observations/Atm/time-series/ceres_ebaf_surface_v4.1"
ts_file_patterns:
model: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
dset_a: "{_var}_{year_s:04d}01_{year_e:04d}12.nc"
in_dirs:
dset_a: {{ e3sm_diags_data_dir }}/observations/Atm/climatology/ceres_ebaf_surface_v4.1
file_patterns:
Expand All @@ -109,6 +146,18 @@ common_ceres: &common_ceres
model_remap: {{ livvproj_dir }}/grids/msk_{icesheet}_r025_remap_cmip6.traave.nc
model_native: {{ livvproj_dir }}/grids/msk_{icesheet}_rcm_r05.nc

common_modis: &common_modis
climo_remap: {{ dir_native }}/{{ case_id }}_{clim}_{sea_s}_{sea_e}_climo.nc
dataset_names: {model: 'ELM', dset_a: MODIS/Terra}
scales: {model: 100, dset_a: 1}
clim_years:
dset_a: { year_s: 2001, year_e: 2025}
in_dirs: {dset_a: /global/cfs/cdirs/e3sm/zender/mod10cm/rgr/}
file_patterns: {dset_a: 'mod10cm_{season}_{sea_s}_{sea_e}_climo.nc'}
masks:
dset_a: /global/cfs/cdirs/e3sm/diagnostics/livvkit_data/grids/msk_{icesheet}_rcm_r05.nc
model: /global/cfs/cdirs/e3sm/diagnostics/livvkit_data/grids/msk_{icesheet}_rcm_r05.nc

common_racmo_gis: &common_racmo_gis
climo_remap: {{ dir_racmo_gis }}/{{ case_id }}_{clim}_{sea_s}_{sea_e}_climo.nc
icesheet: gis
Expand Down Expand Up @@ -303,6 +352,61 @@ common_racmo_cmb_vars: &common_racmo_cmb_vars
mask_weight: true
units: mm w. e. yr^-1

common_snow_storage_vars: &common_snow_storage_vars
- title: Snow Depth (liquid water)
model: H2OSNO
sign: 1
scales: {model: 1}
units: "mm"
ac_axis: 0
cmin: 0.0
cmax: 25000
cmap: YlGnBu
cmin_d: -8000
cmax_d: 8000
- title: Snow ice
model: SNOWICE
sign: 1
scales: {model: 1}
units: "mm"
ac_axis: 0
cmin: 0.0
cmax: 25000
cmap: YlGnBu
cmin_d: -8000
cmax_d: 8000
- title: Snow liquid water
model: SNOWLIQ
sign: 1
scales: {model: 1}
ac_axis: 1
units: "mm"
cmin: 0.0
# cmax: 80
cmap: YlGnBu
cmin_d: -10
cmax_d: 10
- title: Surface water runoff
model: QH2OSFC
sign: 1
scales: {model: 365 * 24 * 3600}
units: "mm w. e. yr^-1"
cmin: 0.0
cmap: YlGnBu
ac_axis: 0

common_snow_cover_vars: &common_snow_cover_vars
- title: Snow cover
model: FSNO
dset_a: Snow_Cover_Monthly_CMG
sign: 1
ac_contrib_sign: { model: 1, dset_a: 1 }
scales: {model: 100, dset_a: 1}
units: "%"
cmin: 0
cmax: 100
cmap: YlGnBu

common_racmo_energy_vars: &common_racmo_energy_vars
- title: Surface temperature
dset_a: tas
Expand Down Expand Up @@ -646,6 +750,30 @@ Surface_Mass_Balance_GIS:
desc: "{component} component of SMB from {data_var_names}"
{% endif %}

{% if snow %}
Snow_Storage_GIS:
module: /global/homes/m/mek/livvext/livvext/snow/snow.py
data_vars: *common_snow_storage_vars
icesheet: gis
<<: [*common, *common_snow, *common_elm]
scales:
{ model: 1, }
primary_var: H2OSNO
desc: "{component} component of snow storage from {data_var_names}"

Snow_Cover_GIS:
module: /global/homes/m/mek/livvext/livvext/snow/snow.py
data_vars: *common_snow_cover_vars
icesheet: gis
<<: [*common, *common_snow, *common_modis]
scales:
{ model: 100, dset_a: 1}
primary_var: FSNO
desc: "{component} snow cover from {data_var_names}"
references:
- /global/cfs/cdirs/e3sm/diagnostics/livvkit_data/livvkit.bib
{% endif %}

{% if energy_racmo %}
Energy_Balance_RACMO_GIS:
module: {{ livvext_root }}/energy/energy.py
Expand Down Expand Up @@ -706,6 +834,31 @@ Surface_Mass_Balance_AIS:
desc: "{component} component of SMB from {data_var_names}"
{% endif %}

{% if snow %}
Snow_Storage_AIS:
module: /global/homes/m/mek/livvext/livvext/snow/snow.py
data_vars: *common_snow_storage_vars
icesheet: ais
<<: [*common, *common_snow, *common_elm]
scales:
{ model: 1, }
primary_var: H2OSNO
desc: "{component} component of snow storage from {data_var_names}"

Snow_Cover_AIS:
module: /global/homes/m/mek/livvext/livvext/snow/snow.py
data_vars: *common_snow_cover_vars
icesheet: gis
<<: [*common, *common_snow, *common_modis]
scales:
{ model: 100, dset_a: 1}
primary_var: FSNO
desc: "{component} snow storage from {data_var_names}"
icesheet: ais
references:
- /global/cfs/cdirs/e3sm/diagnostics/livvkit_data/livvkit.bib
{% endif %}

{% if energy_racmo %}
Energy_Balance_RACMO_AIS:
module: {{ livvext_root }}/energy/energy.py
Expand Down
2 changes: 1 addition & 1 deletion livvext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
Storage for global variables. These are set upon startup in the options module
"""

__version_info__ = (1, 1, 2)
__version_info__ = (1, 2, 0)
__version__ = ".".join(str(vi) for vi in __version_info__)
Loading