Update to v2.0.0-alpha.1 #63
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: GIS Coarse Mesh Generation | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - compass/landice/mesh.py | |
| - compass/landice/tests/greenland/mesh.py | |
| - .github/workflows/gis_coarse_meshgen.yml | |
| # Allow manual triggering of the workflow | |
| workflow_dispatch: | |
| jobs: | |
| gis-coarse-meshgen: | |
| name: GIS Coarse Mesh Generation | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Cache pixi packages | |
| uses: actions/cache@v5 | |
| env: | |
| # Increase this value to reset cache if deploy inputs have not changed in the workflow | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: | | |
| ~/.cache/rattler/cache | |
| ~/.pixi/bin | |
| key: ${{ runner.os }}-3.14-pixi-${{ env.CACHE_NUMBER }}-${{ hashFiles('deploy.py', 'deploy/**', 'pyproject.toml') }} | |
| - name: Install compass | |
| run: | | |
| git config --global url."https://github.com/".insteadOf "git@github.com:" | |
| ./deploy.py \ | |
| --mache-fork xylar/mache --mache-branch add-target-software-cli-flags \ | |
| --no-spack \ | |
| --python 3.14 \ | |
| --recreate | |
| load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1) | |
| if [ -z "$load_script" ]; then | |
| echo "ERROR: no generated Compass load script found" >&2 | |
| exit 1 | |
| fi | |
| source "$load_script" | |
| - name: Setup and run step | |
| run: | | |
| load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1) | |
| source "$load_script" | |
| # create top level working directory | |
| root=$PWD | |
| # download the input GIS coarse mesh | |
| tarball=gis4kmSubSampled_01302025.tgz | |
| url=https://web.lcrc.anl.gov/public/e3sm/mpas_standalonedata/mpas-albany-landice/ | |
| wget ${url}/${tarball} | |
| tar xf ${tarball} | |
| # create the config file describing the system | |
| cat << EOF > system.cfg | |
| # This file contains some common config options you might want to set | |
| # The paths section describes paths to databases and shared compass environments | |
| [paths] | |
| database_root = | |
| # The parallel section describes options related to running tests in parallel | |
| [parallel] | |
| # parallel system of execution: slurm or single_node | |
| system = single_node | |
| # whether to use mpirun or srun to run the model | |
| parallel_executable = mpirun | |
| # cores per node on the machine, detected automatically by default | |
| cores_per_node = 4 | |
| [mesh] | |
| #run quicker - gis takes 20mins on 128 perlmutter cores | |
| min_spac = 10.e3 | |
| [greenland] | |
| nprocs = 4 | |
| data_path = $root/gis4kmSubSampled_01302025 | |
| measures_filename = greenland_vel_mosaic500_extrap_stride8.nc | |
| bedmachine_filename = BedMachineGreenland-v5_edits_floodFill_extrap_stride25.nc | |
| EOF | |
| # setup the greenland mesh generation test case | |
| testDir=$root/gis_mesh_gen | |
| compass setup -w $testDir -t landice/greenland/mesh_gen -f system.cfg | |
| # run the test case | |
| cd $testDir | |
| compass run |