Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5e132db
Update pyproject.toml
alperaltuntas Jul 7, 2025
127d75c
Update submodules
manishvenu Jul 9, 2025
1893527
Update Python
manishvenu Jul 9, 2025
5f02609
Create CONTRIBUTING.md
alperaltuntas Jul 24, 2025
8325a3b
Update mom6_bathy commit
manishvenu Aug 21, 2025
c4a2e8d
update cesm tag in ci test (#16)
alperaltuntas Oct 3, 2025
52cea7e
Update m6b (#17)
manishvenu Oct 7, 2025
6ae49ac
NTasks & Timestep Changes suggested by Mike (#18)
manishvenu Oct 10, 2025
70401f4
Bug
manishvenu Oct 10, 2025
2818e98
add libxml2 dependency (#24)
alperaltuntas Nov 13, 2025
2ef79c2
Fix case generation for standard MOM6 grids. (#23)
alperaltuntas Nov 13, 2025
5e32798
improvements in _retrieve_domains_and_resolutions
alperaltuntas Nov 15, 2025
79280c5
Add custom runoff grid
alperaltuntas Nov 17, 2025
b459514
Bump m6b
manishvenu Nov 18, 2025
d0e5700
Merge branch 'main' of https://github.com/ESMCI/visualCaseGen
manishvenu Nov 18, 2025
3d9ba82
bump m6b
manishvenu Nov 19, 2025
dfc1fae
introduce an initialization module
alperaltuntas Nov 22, 2025
9937cc6
Merge remote-tracking branch 'altuntas/add_custom_rof_grid' into rof_…
alperaltuntas Nov 22, 2025
eee8995
improve _process_domain_constraints and update relational constraints
alperaltuntas Nov 23, 2025
509de14
add relational constraints for runoff grid
alperaltuntas Nov 23, 2025
11f46c3
add valid options property to ConfigVar
alperaltuntas Nov 23, 2025
1bf3850
allow all guarded child stages' guards to be false.
alperaltuntas Dec 4, 2025
e32a9b2
introduce retrieve_maps and get_mesh_path mehods in CIME_interface
alperaltuntas Dec 4, 2025
6be5ccf
Introduce runoff to ocean mapping stage
alperaltuntas Dec 4, 2025
1abff01
specify xesmf version in environment.yml
alperaltuntas Dec 4, 2025
713c856
Merge branch 'main' into rof_mapping_fixes
alperaltuntas Dec 4, 2025
c44cf05
relax not_compset constraint for default grids
alperaltuntas Dec 4, 2025
7bdd9b4
update test_custom_mom6_grid.py for new rof mapping stage
alperaltuntas Dec 4, 2025
ae3b880
add rof to ocn mapping tests
alperaltuntas Dec 8, 2025
662b8e9
update mom6 version for latest mapping changes
alperaltuntas Dec 8, 2025
34a9c1b
fix rof map test
alperaltuntas Dec 8, 2025
466b55a
Merge pull request #26 from ESMCI/rof_mapping_fixes
alperaltuntas Dec 11, 2025
db9316b
Add is_default parameter to function call
alperaltuntas Dec 12, 2025
c362f49
Minor fixes in runoff ocn mapping (#28)
alperaltuntas Dec 15, 2025
4bb1834
Replace ccs_config edits with xmlchange (#20)
manishvenu Jan 13, 2026
7974208
bump mom6_bathy version
manishvenu Feb 18, 2026
ca1d5f3
Bump m6b (#30)
manishvenu Feb 19, 2026
04b14cc
Add DOI badge to README
alperaltuntas Mar 20, 2026
856c480
Rename git module
manishvenu Mar 26, 2026
4774fba
Revert "Rename git module"
manishvenu Mar 26, 2026
254ab70
Update Python Version and change mom6_bathy to mom6_forge (#37)
manishvenu Apr 2, 2026
aee5f90
Update to CESM3 beta08 and address incompability issues (#38)
alperaltuntas Apr 6, 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
14 changes: 11 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ on:

jobs:
ci_tests:
name: visualCaseGen CI tests
name: visualCaseGen CI tests (Python ${{ matrix.python-version }})
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
defaults:
run:
shell: bash -el {0}
steps:

- name: Configure Git Identity
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
- name: Install xmllint
run: sudo apt-get install -y libxml2-utils
- name: Checkout VisualCaseGen to temp folder
Expand All @@ -29,7 +36,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: alperaltuntas/CESM
ref: cesm3_0_beta03_gui
ref: cesm3_0_beta08_gui
path: CESM
#submodules: recursive

Expand All @@ -53,6 +60,7 @@ jobs:
- name: Create visualCaseGen conda env
run: |
cd CESM/visualCaseGen/
sed -i "s/python>=3.11.10/python=${{ matrix.python-version }}.*/" environment.yml
conda env create --file environment.yml
conda activate visualCaseGen

Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "external/mom6_bathy"]
path = external/mom6_bathy
url = https://github.com/NCAR/mom6_bathy.git
[submodule "external/mom6_forge"]
path = external/mom6_forge
url = https://github.com/NCAR/mom6_forge.git
[submodule "external/ipyfilechooser"]
path = external/ipyfilechooser
url = https://github.com/alperaltuntas/ipyfilechooser.git
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing to visualCaseGen

Thank you for your interest in contributing to visualCaseGen!

We welcome contributions that fix bugs, introduce new features, and enhance the usability, robustness, or performance of the tool. Here's how you can get involved:

## Getting Started

Fork the repository and clone your fork.

Follow the instructions in the visualCaseGen documentation to set up your local visualCaseGen environment: https://esmci.github.io/visualCaseGen/

Create a new branch for your feature or bugfix.

## What You Can Contribute

- Bug fixes and issue resolutions
- Enhancements to the GUI or core functionality
- Improved documentation or examples
- Code cleanup and test coverage

## Guidelines

- Follow the existing code style and structure.
- Include clear commit messages.
- Test your changes before submitting.
- Add tests if you introduce new features.
- Open a Pull Request with a short summary of your changes.
- If addressing an open issue, mention it in your PR (e.g., Closes #42).

## Reporting Issues

Please use the GitHub Issues page to report bugs or suggest features. When reporting:

- Include the version of visualCaseGen you used and details about your system environment.
- Provide clear steps to reproduce the issue.
- Include screenshots or logs if helpful.
5 changes: 5 additions & 0 deletions ProConPy/config_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ def update_options_validities(self):

return validities_changed

@property
def valid_options(self):
"""Returns the list of valid options for this variable."""
return [opt for opt in self._options if self._options_validities.get(opt, False)]

def _refresh_widget_options(self):
"""Refresh the widget options list based on information in the current self._options_validities."""

Expand Down
46 changes: 27 additions & 19 deletions ProConPy/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def _proceed(self):
return

# Display the child stage and its siblings by appending them to the current stage's widget
if self.has_children():
if self.has_children() and next_stage.is_descendant_of(self):
self._widget.add_child_stages(first_child=next_stage)

# Proceed the csp solver before enabling the next stage
Expand All @@ -378,20 +378,24 @@ def get_next(self, full_dfs=False):
The next stage to visit, if found. Otherwise, None.
"""

if self.has_children():
return self._get_child_to_enable(full_dfs)
elif self._right is not None:
# First try to get a child stage to enable
if (child_to_enable := self._get_child_to_enable(full_dfs)) is not None:
return child_to_enable

# No child stage to enable. Try to get the right sibling.
if self._right is not None:
return self._right
else: # Backtrack
ancestor = self._parent
while ancestor is not None:
if ancestor._right is not None and (
full_dfs or not ancestor.has_condition()
):
return ancestor._right
else:
ancestor = ancestor._parent
return None

# No child or right sibling. Backtrack to find the next stage.
ancestor = self._parent
while ancestor is not None:
if ancestor._right is not None and (
full_dfs or not ancestor.has_condition()
):
return ancestor._right
else:
ancestor = ancestor._parent
return None

def _get_child_to_enable(self, full_dfs):
"""Determine the child stage to activate.
Expand All @@ -401,6 +405,9 @@ def _get_child_to_enable(self, full_dfs):
full_dfs : bool
If True, visit all the stages in the stage tree. Otherwise, skip stages whose guards
are not satisfied."""

if self.has_children() is False:
return None

child_to_activate = None

Expand All @@ -412,18 +419,19 @@ def _get_child_to_enable(self, full_dfs):
child_to_activate is None
), "Only one child stage can be activated at a time."
child_to_activate = child

if child_to_activate is None:
# No child guard's condition is satisfied.
# Let the caller handle this case (by backtracking).
return None
else:
# If children are not guards, the first child is activated.
# Note the remaining children will be activated in sequence by their siblings.
child_to_activate = self._children[0]

# If the child to activate is a Guard, return it's first child
if child_to_activate.has_condition():
return child_to_activate._children[0]

assert (
child_to_activate is not None
), "At least one child stage must be activated."
child_to_activate = child_to_activate._children[0]

return child_to_activate

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![DOI](https://joss.theoj.org/papers/10.21105/joss.09130/status.svg)](https://doi.org/10.21105/joss.09130)

# visualCaseGen

Welcome to **visualCaseGen**, an intuitive graphical user interface (GUI) designed to simplify the workflow of creating Community Earth System Model v.3 (CESM3) cases. With visualCaseGen, users can effortlessly explore and define component sets (compsets), select or customize grid resolutions, and prepare their CESM cases, all through an interactive and user-friendly platform that runs on Jupyter notebooks.
Expand Down
12 changes: 6 additions & 6 deletions docs/grid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@ Ocean Grid
For the ocean grid, if MOM6 is selected as the ocean model, you can either select a standard
ocean grid or create a new MOM6 grid. When creating a new MOM6 grid, you'll specify parameters
such as grid extent and resolution, after which you'll be directed to a separate notebook that
uses the `mom6_bathy` tool to generate the new grid and bathymetry.
uses the `mom6_forge` tool to generate the new grid and bathymetry.

If using a standard ocean grid, select one from the list compatible with your chosen compset
and atmosphere grid. If creating a new MOM6 grid, complete the required parameters, then proceed
to launch the `mom6_bathy` tool for final customization.
to launch the `mom6_forge` tool for final customization.

.. image:: assets/Stage2_6.png

After specifying all ocean grid parameters, click `Launch mom6_bathy`. This will open an
After specifying all ocean grid parameters, click `Launch mom6_forge`. This will open an
auto-generated Jupyter notebook where you can fine-tune the ocean grid, topography, and vertical grid.
You can then generate the corresponding MOM6 input files, which will be saved under `ocnice` subdirectory
within the directory you specified earlier for saving the new grid files.
For more details on mom6_bathy, refer to its documentation: https://ncar.github.io/mom6_bathy/
For more details on mom6_forge, refer to its documentation: https://ncar.github.io/mom6_forge/

.. note:: If the `mom6_bathy` notebook doesn't open automatically, make sure that your browser allows
.. note:: If the `mom6_forge` notebook doesn't open automatically, make sure that your browser allows
pop-ups from visualCaseGen. If the notebook still doesn't open, you can manually launch it by
navigating to the `mom6_bathy_notebooks/` directory in your visualCaseGen installation and opening
navigating to the `mom6_forge_notebooks/` directory in your visualCaseGen installation and opening
the notebook corresponding to your custom grid.

Ocean Initial conditions
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Installation
======================================

visualCaseGen is presently bundled with a CESM distribution (fork) based on cesm3_0_beta06. The following
visualCaseGen is presently bundled with a CESM distribution (fork) based on cesm3_0_beta08. The following
instructions guide you through obtaining and installing this specific CESM distribution with visualCaseGen.

Prerequisite
Expand Down Expand Up @@ -31,8 +31,8 @@ CESM may take some time.

.. code-block:: bash

git clone https://github.com/alperaltuntas/cesm.git -b cesm3_0_beta06_gui cesm3_0_beta06_gui
cd cesm3_0_beta06_gui
git clone https://github.com/alperaltuntas/cesm.git -b cesm3_0_beta08_gui cesm3_0_beta08_gui
cd cesm3_0_beta08_gui
./bin/git-fleximod update

This will download the required CESM version, including visualCaseGen.
Expand Down
2 changes: 1 addition & 1 deletion docs/open.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ To access the GUI on a remote machine, set up SSH tunneling with port forwarding
.. code-block:: bash

conda activate visualCaseGen
cd [PATH_TO_visualCaseGen] # e.g., ~/cesm3_0_beta03_gui/visualCaseGen
cd [PATH_TO_visualCaseGen] # e.g., ~/cesm3_0_beta08_gui/visualCaseGen
jupyter-lab GUI.ipynb --no-browser

If the above steps are successful, the command line will display a URL that you can copy and paste into your web browser
Expand Down
18 changes: 9 additions & 9 deletions docs/ridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,31 +126,31 @@ assign a unique name to your custom ocean grid.

.. image:: assets/ridge7.png

After specifying all ocean grid parameters, click the green **Launch mom6_bathy** button. This will open an auto-generated
After specifying all ocean grid parameters, click the green **Launch mom6_forge** button. This will open an auto-generated
Jupyter notebook where you can further customize the ocean bathymetry and generate all necessary grid input files.

The mom6_bathy tool
The mom6_forge tool
~~~~~~~~~~~~~~~~~~~

.. important:: If the `mom6_bathy` notebook doesn't open automatically, make sure that your browser allows
.. important:: If the `mom6_forge` notebook doesn't open automatically, make sure that your browser allows
pop-ups from visualCaseGen. If the notebook still doesn't open, you can manually launch it by
navigating to the `mom6_bathy_notebooks/` directory in your visualCaseGen installation and opening
navigating to the `mom6_forge_notebooks/` directory in your visualCaseGen installation and opening
the notebook corresponding to your custom grid.

Once the auto-generated `mom6_bathy` notebook is open, you will see a series of cells that guide you through
Once the auto-generated `mom6_forge` notebook is open, you will see a series of cells that guide you through
the process of creating your custom ocean bathymetry. Before proceeding, make sure that the appropriate
kernel is selected in the top right corner of the notebook. Then, execute the first two cells to import
the necessary libraries and to instantiate the `Grid` object. Notice that the `Grid` object is initialized
with the parameters you specified in visualCaseGen.

.. image:: assets/ridge8.png

The third section of mom6_bathy is where a custom bathymetry may be defined. The default option is to produce
The third section of mom6_forge is where a custom bathymetry may be defined. The default option is to produce
a flat ocean bottom of depth 2000m. We are going to instead generate an ocean that
resembles the ridge world case of `Wu et al (2021) <https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2021GL093966>`_ ,
which has a depth 4000m with some sinusoidal fluctuations, a land ridge of width 1 degree longitude and
the furthest poleward 10 degrees latitude at the poles set to land. We will specify this analytically with python
code within mom6_bathy.
code within mom6_forge.

First, instantiate the topo object by running the cell below. Note that the `min_depth` parameter, which
is set to 10.0m by default determines the minimum bathymetric depth for a cell to be considered ocean.
Expand Down Expand Up @@ -199,7 +199,7 @@ You can plot the bathymetry to see the results by running the cell below:
Vertical Grid
~~~~~~~~~~~~~

Next, you will need to set up the vertical grid. In the `mom6_bathy` notebook,
Next, you will need to set up the vertical grid. In the `mom6_forge` notebook,
a default vertical grid is provided, which consists of 20 layers, and a ratio of 10,
which means that the thicknesses of layers gradually increase with depth, and the thickness
of the bottom layer is 10 times thicker than the top layer.
Expand All @@ -222,7 +222,7 @@ vertical grid files (needed by MOM6), CICE grid file (needed by the sea ice mode
(needed by the CESM coupler).

.. warning:: The paths specified in the cell below are for illustrative purposes only. Do not modify the paths
in your auto-generated `mom6_bathy` notebook. The paths are unique to the user's system and should not be changed,
in your auto-generated `mom6_forge` notebook. The paths are unique to the user's system and should not be changed,
since doing so will prevent visualCaseGen from confirming that the grid files have been successfully generated
and will prevent configuring CESM accurately.

Expand Down
6 changes: 3 additions & 3 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Commonly Encountered Issues
right corner of the welcome dialog to see if any error messages are displayed. If so, submit an issue on the
visualCaseGen GitHub repository with the error messages.

- **mom6_bathy notebook doesn't open automatically:** If the `mom6_bathy` notebook doesn't open automatically,
- **mom6_forge notebook doesn't open automatically:** If the `mom6_forge` notebook doesn't open automatically,
make sure that your browser allows
pop-ups from visualCaseGen. If the notebook still doesn't open, you can manually launch it by
navigating to the `mom6_bathy_notebooks/` directory in your visualCaseGen installation and opening
navigating to the `mom6_forge_notebooks/` directory in your visualCaseGen installation and opening
the notebook corresponding to your custom grid.

- **The mom6_bathy interactive point-and-click feature is not working on JupyterHub.**
- **The mom6_forge interactive point-and-click feature is not working on JupyterHub.**
If you are experiencing issues with interactive features, such as point-and-click highlighting of individual
cells, you may need to (re)install the ipympl extension. Steps to (re)install the ipympl extension: (1) Open
JupyterHub. (2) Locate the *Extension Manager* tab on the left sidebar: Look for an icon that resembles a puzzle
Expand Down
7 changes: 4 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ channels:
- anaconda

dependencies:
- python>=3.11.10,<3.12
#- xesmf
- python>=3.11.10,<3.13.0
- libxml2>=2.13,<2.16
- xesmf>=0.8.10,<0.10.0
- pip
- pip:
- -e ./external/mom6_bathy/
- -e ./external/mom6_forge/
- -e ./external/ipyfilechooser/
- -e ./ # visualCaseGen
2 changes: 1 addition & 1 deletion external/ipyfilechooser
1 change: 0 additions & 1 deletion external/mom6_bathy
Submodule mom6_bathy deleted from c8156d
1 change: 1 addition & 0 deletions external/mom6_forge
Submodule mom6_forge added at e4f665
2 changes: 1 addition & 1 deletion internal/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This subdirectory is internally used by visualCaseGen to exchange information with mom6_bathy and other tools. Manually interfering with files in this directory may disrupt any active visualCaseGen session.
This subdirectory is internally used by visualCaseGen to exchange information with mom6_forge and other tools. Manually interfering with files in this directory may disrupt any active visualCaseGen session.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This directory is for storing mom6_bathy notebooks generated by visualCaseGen.
This directory is for storing mom6_forge notebooks generated by visualCaseGen.
When you are done with a notebook, you may manually remove or store it for documentation purposes.
Loading
Loading