Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
6b03299
sima updates to get rrtmgp lw to generate caps
Jun 6, 2025
1f19dd0
latest atmos_phys tag
Jun 6, 2025
8ac539c
update atmos_phys submodule
Jun 6, 2025
bc961a0
cleanup; update atmos_phys hash
Jun 9, 2025
b9bdd6e
update git-fleximod
Jul 15, 2025
2a58a1e
latest atmos phys hash
Jul 15, 2025
084b8a4
merge to head of development
Jul 15, 2025
0b817f3
lw answers match cam for 2 timesteps using radiation
peverwhee Aug 7, 2025
a694713
use output variables for physics check
peverwhee Aug 8, 2025
c2a33d7
fix unit tests
peverwhee Aug 8, 2025
8b9df0a
update check_data to not error when variable is not found
peverwhee Aug 8, 2025
b4331de
merge in output variable checking
peverwhee Aug 8, 2025
50e5c2f
Merge remote-tracking branch 'origin/check-out-variables' into rrtmgp-lw
peverwhee Aug 8, 2025
2752030
update atmos phys submodule
peverwhee Aug 9, 2025
586a05f
Add 'var_subset_check' helper routine, with initial 'both present' ch…
nusbaume Aug 5, 2025
d7b4bbe
Add missing subroutine arguments.
nusbaume Aug 5, 2025
63a5cbb
Add check for correct 'start' size, along with new unit test.
nusbaume Aug 6, 2025
de58bea
Add missing 'count' entry to test.
nusbaume Aug 6, 2025
eaf9264
Add missing space to error message, a 'count' size check, and an asso…
nusbaume Aug 6, 2025
f01ec4d
Add check and test for ensuring that start elements are within range.
nusbaume Aug 8, 2025
098f4a0
Add missing Fortran character format.
nusbaume Aug 8, 2025
bd07e62
Add 'alloc_dims' output variable to ensure output variable is allocat…
nusbaume Aug 8, 2025
bf91195
Remove un-needed dimension index from allocate call.
nusbaume Aug 8, 2025
bc91c13
Add bounds checking for 'count' optional variable.
nusbaume Aug 8, 2025
58a4840
Fix syntax error.
nusbaume Aug 8, 2025
e9018c3
Add subsetting when shape(count) matches shape(var), including unit t…
nusbaume Aug 13, 2025
61389fd
Fix typo in subroutine call.
nusbaume Aug 13, 2025
ee4a3e9
Fix 'do_subset' syntax error.
nusbaume Aug 13, 2025
249f87a
Fix bad subroutine name.
nusbaume Aug 13, 2025
c47dbe6
Flip error message and error code check for subset read test.
nusbaume Aug 13, 2025
5175ea3
Add debugging output.
nusbaume Aug 13, 2025
a45e9d2
Cleanup debug output and modify start/count element range checks.
nusbaume Aug 13, 2025
53780e7
Add subsetting to 2-D integer interface, add unit test, fix bad unit …
nusbaume Aug 13, 2025
41fcd3d
Add 'singe value' subset test, and fix bad error message.
nusbaume Aug 13, 2025
640a440
remove extraneous sum calls.
nusbaume Aug 13, 2025
5c48075
Move non-subsetting rank check to 'var_subset_check', and add additio…
nusbaume Aug 14, 2025
d6fc649
Remove use of 'count' intrinsic to avoid name collision.
nusbaume Aug 14, 2025
de647be
Fix bad syntax in error message.
nusbaume Aug 14, 2025
3385d54
Add subsetting calls to all non-scalar get_var calls.
nusbaume Aug 14, 2025
76fc32a
Fix syntax error.
nusbaume Aug 14, 2025
ee27eb3
Adjust 'var_ndims' for charactervariables.
nusbaume Aug 14, 2025
0c85688
Remove extra space in expected error message.
nusbaume Aug 15, 2025
dbc7354
Change error message text, and add additional unit tests.
nusbaume Aug 15, 2025
ac6fce9
Fix use statements in pFUnit Fortran code.
nusbaume Aug 16, 2025
6f184f2
Move count bounds checking outside of output var check, and fix test …
nusbaume Aug 16, 2025
73b75a3
Comment out real var subsetting test.
nusbaume Aug 16, 2025
59775cc
Fix bad subsetting test, and partially uncomment 1D real subset test.
nusbaume Aug 16, 2025
5b331ba
Uncomment 'end subroutine' line.
nusbaume Aug 16, 2025
6402882
Remove comma from expected error message, and try reading press_ref v…
nusbaume Aug 16, 2025
ef23f22
Try 1D real subset test again.
nusbaume Aug 16, 2025
e829e94
Add 'pio_get_var' subsetting to remaining multi-dim get_var interfaces.
nusbaume Aug 18, 2025
2776f7c
Print out press_ref values and change order.
nusbaume Aug 18, 2025
574e71e
Change write statement to see if that fixes build issue?
nusbaume Aug 18, 2025
4add51e
Removed commented-out assert statement.
nusbaume Aug 18, 2025
dfa8143
Add back-in original 'assert' statement.
nusbaume Aug 18, 2025
23f6459
Formally declare expected values in real 1D subset test.
nusbaume Aug 18, 2025
72844d0
Add ability to reduce output variable dimensionality via subsetting. …
nusbaume Aug 19, 2025
a20f592
Make output variable 3D to see if that works.
nusbaume Aug 19, 2025
4f91699
Remove variable dimension reduction functionality (it doesn't appear …
nusbaume Aug 22, 2025
c2ff44c
Add error if user tries to subset a scalar variable, along with a rel…
nusbaume Aug 22, 2025
77d876d
Add character variable subsetting unit test.
nusbaume Aug 22, 2025
1625101
Fix character size assert check in subsetting test.
nusbaume Aug 22, 2025
da268b0
Fix syntax error in subset test.
nusbaume Aug 22, 2025
37f1dd5
Add debugging output.
nusbaume Aug 22, 2025
9cee38d
Try subsetting with character array length provided.
nusbaume Aug 22, 2025
1728712
Increase 'var_ndims' by one to avoid incorrect error.
nusbaume Aug 22, 2025
dc0e3dc
Fix unit test assert statements, and update remaining character get_v…
nusbaume Aug 22, 2025
ab49b90
Fix error message in unit test.
nusbaume Aug 22, 2025
0e5fb36
Remove fork/branch from Github Actions workflow.
nusbaume Aug 25, 2025
f65ec49
Remove leftover debugging code.
nusbaume Aug 25, 2025
44729bd
merge in pio subsetting
peverwhee Aug 26, 2025
3e6eeaa
update to dev tag
peverwhee Aug 26, 2025
2cfe297
Update registry for gw_drag (orographic at least, CAM4)
jimmielin Aug 27, 2025
5edf08a
Add host side support module for reading gravity wave ridge data.
jimmielin Aug 29, 2025
be2b7cc
Revise comment at head of module
jimmielin Aug 29, 2025
5b62e05
Update ridge input standard names
jimmielin Sep 10, 2025
cc60fb5
Misc fix: 3-D input field read with dycore enabled; cam_in/cam_out fr…
jimmielin Sep 11, 2025
db335b5
Update cime_config/testdefs/testlist_cam.xml
jimmielin Sep 12, 2025
573cf9a
Address review comments
jimmielin Sep 12, 2025
d347cf3
Updated to remove unused cam_in/cam_outs
jimmielin Sep 12, 2025
b572d80
Update git-fleximod to v1.0.2
nusbaume Sep 15, 2025
5a32d0d
Update externals to match cam6_4_115.
nusbaume Sep 15, 2025
f367b49
Add debugging output to git-fleximod.
nusbaume Sep 16, 2025
6cad15f
Print out git commands in fleximod.
nusbaume Sep 16, 2025
3eaaf02
Remove debugging code.
nusbaume Sep 16, 2025
fcf380c
Update fleximod test and gitmodules file to match new CAM code/submod…
nusbaume Sep 19, 2025
40cf4df
Add missed atmospheric_physics submodule update.
nusbaume Sep 19, 2025
45328ea
Update ccs_config submodule.
nusbaume Sep 23, 2025
e340186
commit latest host side changes
peverwhee Sep 23, 2025
5d404a9
merge in jesses externals updates
peverwhee Sep 23, 2025
a14e444
Add registry fields to read in pbuf fields to support GW CAM7.
jimmielin Sep 25, 2025
917addd
Fix ridge read; clubb pbuf input vars have _gw suffix
jimmielin Sep 25, 2025
e3c31cf
Merge branch 'development' into hplin/gw_drag
jimmielin Sep 29, 2025
4bc0bb9
Merge branch 'development' into hplin/gw_drag
jimmielin Sep 30, 2025
f9d9539
read coszrs from file; add dycore name to runtime_obj
peverwhee Oct 8, 2025
c114fe0
merge in development branch
peverwhee Oct 8, 2025
e5384b1
fix merge; add pbuf out fields to registry to be checked
peverwhee Oct 13, 2025
7e29457
update atmos phys hash
peverwhee Oct 13, 2025
b1993e9
fix runtime object setter; add rrtmgp snapshot test
peverwhee Oct 13, 2025
55f3b14
Merge branch 'development' into hplin/gw_drag
jimmielin Oct 13, 2025
6c04924
Update do_molec_diff standard name to do_molecular_diffusion
jimmielin Oct 13, 2025
d47bb6f
Remove TBD from GW names
jimmielin Oct 13, 2025
662630c
Merge branch 'development' into hplin/gw_drag
jimmielin Oct 13, 2025
679e11f
Fix closing tag in registry.xml due to bad git merge
jimmielin Oct 13, 2025
1984ac4
Calculate gw top taper in ref_pres to pass to scheme via metadata
jimmielin Oct 13, 2025
fa9acd0
remove redundant git-fleximod
peverwhee Oct 14, 2025
3dd5cad
remove correct git-fleximod this time
peverwhee Oct 14, 2025
f182739
code cleanup
peverwhee Oct 14, 2025
a5b6dac
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-lw
peverwhee Oct 14, 2025
92f7b76
remove final redundant git-fleximod files
peverwhee Oct 14, 2025
01133f1
Add gravity wave CAM4 and CAM7 SDF tests
jimmielin Oct 14, 2025
edf0bd7
Remove UVTPS outfields from snapshot gw tests as sima_state_diagnosti…
jimmielin Oct 14, 2025
0b21825
Provide frontgf, frontga from dycore (SE); remove from cam_runtime_op…
jimmielin Oct 15, 2025
f3aa434
Remove remnant gw_front(_igw) from runtime obj.
jimmielin Oct 15, 2025
4594f2c
Add bnd_topo to FCAM7 testmods; port vorticity code from CAM to SE dy…
jimmielin Oct 15, 2025
241994b
Fix port of vorticity code
jimmielin Oct 15, 2025
9310678
Move vorticity (vort4gw) to physics_state
jimmielin Oct 15, 2025
d73235f
Initialize vorticity in se dycore; registry initial_value for clubb f…
jimmielin Oct 15, 2025
efd8964
Merge remote-tracking branch 'hplin/hplin/fixes_fadiab' into rrtmgp-lw
peverwhee Oct 16, 2025
a1ce363
Port cam6_4_126: Fix frontogenesis bug (SE dycore only) from CAM
jimmielin Oct 16, 2025
c963e10
remove unused diagnostic field; add handling for parameters in registry
peverwhee Oct 20, 2025
42f912e
Change registry access protected to allocatable=parameter
jimmielin Oct 21, 2025
581148b
clean up registry
peverwhee Oct 21, 2025
1b4a5bb
add missing initial values to registry; removed unused fields
peverwhee Oct 23, 2025
99ec7a7
update atmos phys hash
peverwhee Oct 23, 2025
5d95cbf
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-lw
peverwhee Oct 23, 2025
c1de147
remove unnecessary reordering
peverwhee Oct 23, 2025
31c9290
remove code that is no longer necessary
peverwhee Oct 24, 2025
ff7da37
merge up; use latest atmos phys hash
peverwhee Oct 24, 2025
9098e4c
Bring in CAM4 physics test atmospheric_physics branch.
nusbaume Oct 24, 2025
05cf588
Add 'usermods_dirs' directories with needed aquaplanet user_nl_cpl ch…
nusbaume Oct 24, 2025
371ec95
Merge remote-tracking branch 'hplin/hplin/gw_drag' into cam4_aqua
nusbaume Oct 24, 2025
0f97bbd
Merge remote-tracking branch 'courtney/rrtmgp-lw' into cam4_aqua
nusbaume Oct 24, 2025
4a00f22
Add 'aquaplanet' config flag, remove un-used 'ocn' config option, and…
nusbaume Oct 27, 2025
5cd4a1d
Update 'physconst' namelist values for a CAM4 aquaplanet configuration.
nusbaume Oct 29, 2025
7fb46a0
Update ncar_ccpp submodule to bring in needed physics namelist mods f…
nusbaume Oct 29, 2025
10008b1
Address review comments
jimmielin Nov 3, 2025
7368353
Update src/physics/utils/gravity_wave_drag_ridge_read.F90
jimmielin Nov 3, 2025
4f57c9f
Update atmospheric_physics submodule to bring in new radiative consti…
nusbaume Nov 6, 2025
d428a56
Update atmospheric_physics submodule to fix source code bugs.
nusbaume Nov 6, 2025
575d319
Merge remote-tracking branch 'hplin/hplin/gw_drag' into cam4_aqua
nusbaume Nov 6, 2025
315456f
Fix bug found during QPC4 experiment.
nusbaume Nov 6, 2025
c890650
Merge remote-tracking branch 'hplin/hplin/gw_drag' into cam4_aqua
nusbaume Nov 7, 2025
467b911
Fix variable string length bug in PIO reader.
nusbaume Nov 7, 2025
d707796
Update atmos_phys external with RRTMGP register-phase fixes.
nusbaume Nov 11, 2025
66b786a
Fix bug in model grid initialization, and add temporary MPAS grid.
nusbaume Nov 12, 2025
e2f0447
Add nitrogen deposition namelist and code updates needed for proper s…
nusbaume Nov 13, 2025
0bb3cf4
Uncomment 'nextsw_cday' calls in the NUOPC cap.
nusbaume Nov 13, 2025
b23d19f
Skip consitutuents input read if variable not found on file and 'erro…
nusbaume Nov 14, 2025
d7bc6f0
Add constituents info to atm log file, and fix bad MPAS dyn_coupling …
nusbaume Nov 17, 2025
f25da30
Initial attempt at only using advected constituents in MPAS dycore.
nusbaume Nov 18, 2025
c260411
Only print constituents to log if root proc, and update atmos_phys ex…
nusbaume Nov 20, 2025
f0c69b2
Update atmos_phys submodule and fix bugs in order to properly set sur…
nusbaume Nov 24, 2025
701ad8f
Fix namelist bug, update PEs file, and modify physics_read for better…
nusbaume Nov 26, 2025
e2ea6f3
Replace stub CAM4 regression test with aquaplanet CAM4 test.
nusbaume Dec 1, 2025
1b0cf31
Remove leftover debugging code.
nusbaume Dec 1, 2025
c546193
Merge remote-tracking branch 'upstream/development' into cam4_aqua
nusbaume Dec 2, 2025
cc27c66
Fix bugs found after ESCOMP/CAM-SIMA gravity waves merge.
nusbaume Dec 2, 2025
55d2c0b
Update all namelist 'pg' versions to 2.0, and fix failing python unit…
nusbaume Dec 10, 2025
1f34f9e
Merge remote-tracking branch 'upstream/development' into cam4_aqua
nusbaume Jan 8, 2026
6ad4ee9
Update external submodules to match cam6_4_143.
nusbaume Jan 8, 2026
ec795b7
Remove old git-fleximod copy.
nusbaume Jan 8, 2026
92c3cd2
Squashed '.lib/git-fleximod/' content from commit 5796799
nusbaume Jan 8, 2026
da2dede
Merge commit '92c3cd25522756a66de038cae54de676c005acc4' as '.lib/git-…
nusbaume Jan 8, 2026
8500ae1
Remove 'components/cism' directory that is no longer needed.
nusbaume Jan 9, 2026
532f811
Fix bugs found during CCPP cap/namelist generation.
nusbaume Jan 9, 2026
6894fa6
Update atmospheric_physics hash to avoid CAM7 test failure.
nusbaume Jan 9, 2026
2f632fb
Update atmospheric_physics hash to use cleaned-up code and updated CA…
nusbaume Jan 9, 2026
53b40bb
Fix issues found while opening the PR.
nusbaume Jan 9, 2026
bd2160f
Update submodule and XML files based on initial reviewer comments.
nusbaume Jan 21, 2026
8258bf5
Update atmospheric_physics branch to use official repo.
nusbaume Jan 22, 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
24 changes: 9 additions & 15 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[submodule "ncar-physics"]
path = src/physics/ncar_ccpp
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = atmos_phys0_20_000
fxtag = b47246dedfa7c377ac2bfb060e2d465beb931f2a
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
[submodule "rrtmgp-data"]
Expand All @@ -32,33 +32,27 @@
[submodule "ccs_config"]
path = ccs_config
url = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config_cesm1.0.61
fxtag = ccs_config_cesm1.0.65
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
fxtag = cdeps1.0.80
fxtag = cdeps1.0.84
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
[submodule "cice"]
path = components/cice
url = https://github.com/ESCOMP/CESM_CICE
fxtag = cesm3_cice6_6_0_13
fxtag = cesm3_cice6_6_1_6
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE
[submodule "cime"]
path = cime
url = https://github.com/ESMCI/cime
fxtag = cime6.1.126
fxtag = cime6.1.145
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESMCI/cime
[submodule "cism"]
path = components/cism
url = https://github.com/ESCOMP/CISM-wrapper
fxtag = cismwrap_2_2_010
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
[submodule "clm"]
path = components/clm
url = https://github.com/ESCOMP/CTSM
Expand All @@ -68,7 +62,7 @@
[submodule "cmeps"]
path = components/cmeps
url = https://github.com/ESCOMP/CMEPS.git
fxtag = cmeps1.1.16
fxtag = cmeps1.1.24
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
[submodule "fms"]
Expand All @@ -80,7 +74,7 @@
[submodule "mizuRoute"]
path = components/mizuRoute
url = https://github.com/ESCOMP/mizuRoute
fxtag = v3.0.0
fxtag = v3.0.1
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
[submodule "mosart"]
Expand All @@ -104,12 +98,12 @@
[submodule "share"]
path = share
url = https://github.com/ESCOMP/CESM_share
fxtag = share1.1.9
fxtag = share1.1.16
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share
[submodule "tools/CUPiD"]
path = tools/CUPiD
url = https://github.com/NCAR/CUPiD.git
fxtag = v0.3.1
fxtag = v0.4.0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git
12 changes: 7 additions & 5 deletions .lib/git-fleximod/.github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# reference the matrixe python version here.
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'

# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
# from installing Poetry every time, which can be slow. Note the use of the Poetry version
Expand All @@ -29,7 +29,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-1.7.1
key: poetry-1.8.2

# Install Poetry. You could do this manually, or there are several actions that do this.
# `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
Expand All @@ -42,7 +42,7 @@ jobs:
# cache it.
- uses: snok/install-poetry@v1
with:
version: 1.7.1
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down Expand Up @@ -73,5 +73,7 @@ jobs:
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
poetry run pytest

poetry run pytest --doctest-modules
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
2 changes: 1 addition & 1 deletion .lib/git-fleximod/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: ^utils/.*$

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
6 changes: 3 additions & 3 deletions .lib/git-fleximod/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Examples of behaviors that contribute to a positive environment include:
* Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism
* Acknowledging the contributions of others
* Avoid personal attacks directed toward other participants
* Be mindful of your surroundings and of your fellow participants
* Be mindful of your surroundings and of your fellow participants
* Alert UCAR staff and suppliers/vendors if you notice a dangerous situation or someone in distress
* Respect the rules and policies of the project and venue

Expand All @@ -29,7 +29,7 @@ Examples of unacceptable behavior include, but are not limited to:
* Personal attacks directed at other guests, members, participants, etc.
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Alarming, intimidating, threatening, or hostile comments or conduct
* Inappropriate use of nudity and/or sexual images
* Inappropriate use of nudity and/or sexual images
* Threatening or stalking anyone, including a participant
* Other conduct which could reasonably be considered inappropriate in a professional setting

Expand Down Expand Up @@ -60,7 +60,7 @@ the [Attribution](#attribution) section.
## Reporting
Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as
outlined in the [Consequences](#consequences) section below.
However, making a report to a project administrator is not considered an 'official report' to UCAR.
However, making a report to a project administrator is not considered an 'official report' to UCAR.

Instances of unacceptable behavior may also be reported directly to UCAR pursuant to [UCAR's Harassment Reporting and Complaint
Procedure](https://www2.fin.ucar.edu/procedures/hr/harassment-reporting-and-complaint-procedure), or anonymously through [UCAR's
Expand Down
35 changes: 29 additions & 6 deletions .lib/git-fleximod/git_fleximod/cli.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from pathlib import Path
import argparse, os, sys
from git_fleximod import utils

__version__ = "1.0.3"
__version__ = "1.1.1"


class CustomArgumentParser(argparse.ArgumentParser):
def print_help(self, file=None):
Expand All @@ -17,13 +17,28 @@ def print_help(self, file=None):
for path in candidate_paths:
if os.path.exists(path):
with open(path) as f:
print( f.read(), file=file)
print(f.read(), file=file)
return
print( "README.md not found.", file=file)
print("README.md not found.", file=file)


def find_root_dir(filename=".gitmodules"):
""" finds the highest directory in tree
which contains a file called filename """
"""
Finds the highest directory in tree which contains a file called filename.

>>> import tempfile, os
>>> cwd = os.getcwd()
>>> with tempfile.TemporaryDirectory() as tmp:
... subdir = Path(tmp) / 'subdir'
... subdir.mkdir()
... f = Path(tmp) / '.gitmodules'
... _ = f.write_text('')
... os.chdir(subdir)
... result = find_root_dir('.gitmodules') == str(tmp)
... os.chdir(cwd)
... result
True
"""
d = Path.cwd()
root = Path(d.root)
dirlist = []
Expand All @@ -40,6 +55,7 @@ def find_root_dir(filename=".gitmodules"):
return str(dl)
return None


def get_parser():
description = """
%(prog)s manages checking out groups of gitsubmodules with additional support for Earth System Models
Expand Down Expand Up @@ -116,6 +132,13 @@ def get_parser():
"verbosity level each time.",
)

parser.add_argument(
"--no-mods-details",
action="store_true",
default=False,
help="Suppress details on local mods in status output.",
)

parser.add_argument(
"-V",
"--version",
Expand Down
Loading