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

noresm3_0_001_cam6_4_070: Update noresm branch from ESCOMP #197

Merged
merged 35 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
20ee5ea
ESCOMP tag: cam6_4_042
nusbaume Oct 22, 2024
ec44ac9
ESCOMP tag: cam6_4_043
brian-eaton Oct 25, 2024
3db758c
ESCOMP tag: cam6_4_044
peverwhee Nov 5, 2024
720ffec
ESCOMP tag: cam6_4_045
mwaxmonsky Nov 7, 2024
7274fe4
ESCOMP tag: cam6_4_046
nusbaume Nov 8, 2024
5b903a4
ESCOMP tag: cam6_4_047
peverwhee Nov 19, 2024
63625f2
ESCOMP tag: cam6_4_048
peverwhee Dec 20, 2024
f6bb98c
ESCOMP tag: cam6_4_049
peverwhee Dec 31, 2024
2886c10
ESCOMP tag: cam6_4_050
jimmielin Dec 31, 2024
8635cf1
ESCOMP tag: cam6_4_051
fvitt Jan 2, 2025
3c5ebc6
ESCOMP tag: cam6_4_052
nusbaume Jan 6, 2025
75f58f6
ESCOMP tag: cam6_4_053
fvitt Jan 7, 2025
bf8a289
ESCOMP tag: cam6_4_054
nusbaume Jan 9, 2025
b15f7a9
ESCOMP tag: cam6_4_055
brian-eaton Jan 13, 2025
c184f2b
ESCOMP tag: cam6_4_056
fvitt Jan 17, 2025
a9d3bfe
ESCOMP tag: cam6_4_057
nusbaume Jan 29, 2025
7afe6a8
ESCOMP tag: cam6_4_058
nusbaume Feb 4, 2025
ba9b7d6
ESCOMP tag: cam6_4_059
cacraigucar Feb 4, 2025
fe5b5d0
ESCOMP tag: cam6_4_060
cacraigucar Feb 5, 2025
5511d06
ESCOMP tag: cam6_4_061
cacraigucar Feb 6, 2025
e8bc6f6
ESCOMP tag: cam6_4_062
cacraigucar Feb 7, 2025
c9a01ed
ESCOMP tag: cam6_4_063
cacraigucar Feb 10, 2025
36d0ee4
ESCOMP tag: cam6_4_064
nusbaume Feb 10, 2025
98638a1
ESCOMP tag: cam6_4_065
cacraigucar Feb 11, 2025
2e3ca56
ESCOMP tag: cam6_4_066
fvitt Feb 14, 2025
6548bdd
ESCOMP tag: cam6_4_067
brian-eaton Feb 15, 2025
8918fa7
ESCOMP tag: cam6_4_068
brian-eaton Feb 19, 2025
79c2266
ESCOMP tag: cam6_4_069
peverwhee Feb 20, 2025
6a55abe
ESCOMP tag: cam6_4_070
nusbaume Feb 21, 2025
4db8688
Incorporate ESCOMP updates from cam6_4_041 to cam6_4_070
Feb 23, 2025
759d723
Update Oslo Aero to new tag
Mar 11, 2025
2f24b98
update submodule tags
mvdebolskiy Mar 20, 2025
0270dae
update submodules
mvdebolskiy Mar 20, 2025
a232493
fix clm hash
mvdebolskiy Mar 20, 2025
d6ac382
fix cism tag
mvdebolskiy Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .github/workflows/fleximod_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: pull_request

jobs:
fleximod-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# oldest supported and latest supported
python-version: ["3.7", "3.x"]
steps:
- id: checkout-CESM
uses: actions/checkout@v4
- id: run-fleximod
run: |
$GITHUB_WORKSPACE/bin/git-fleximod --optional update
echo
echo "Update complete, checking status"
echo
$GITHUB_WORKSPACE/bin/git-fleximod test
- id: check-cleanliness
run: |
echo
echo "Checking if git fleximod matches expected externals"
echo
git diff --exit-code
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
68 changes: 34 additions & 34 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,14 @@
[submodule "atmos_phys"]
path = src/atmos_phys
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = atmos_phys0_05_001
fxtag = atmos_phys0_08_000
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics

[submodule "camnor_phys"]
path = src/physics/camnor_phys
url = https://github.com/NorESMhub/CAM-Nor-physics
fxtag = camnor_noresm_v0.0.6
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/NorESMhub/CAM-Nor-physics

[submodule "carma"]
path = src/physics/carma/base
url = https://github.com/ESCOMP/CARMA_base.git
fxtag = carma4_01
fxtag = carma4_09
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CARMA_base.git

Expand Down Expand Up @@ -84,7 +77,7 @@
[submodule "oslo_aero"]
path = src/chemistry/oslo_aero
url = https://github.com/NorESMhub/OSLO_AERO
fxtag = oslo_aero_2_5a08d
fxtag = oslo_aero_3_0a001
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/NorESMhub/OSLO_AERO.git

Expand Down Expand Up @@ -156,6 +149,24 @@
fxrequired = AlwaysOptional
fxDONOTUSEurl = https://github.com/MPAS-Dev/MPAS-Model.git

#-----------------------------
# Tools
#-----------------------------

[submodule "AeroTab"]
path = tools/AeroTab
url = https://github.com/NorESMhub/AeroTab
fxtag = aerotab1_00_000
fxrequired = AlwaysOptional
fxDONOTUSEurl = https://github.com/NorESMhub/AeroTab

[submodule "CUPiD"]
path = tools/CUPiD
url = https://github.com/NCAR/CUPiD.git
fxtag = v0.1.4
fxrequired = AlwaysOptional
fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git

#-----------------------------
# CESM libraries
#-----------------------------
Expand All @@ -167,28 +178,17 @@ fxtag = pio2_6_2
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NCAR/ParallelIO

[submodule "mct"]
path = libraries/mct
url = https://github.com/MCSclimate/MCT
fxtag = MCT_2.11.0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/MCSclimate/MCT

#-----------------------------
# Configuration/CCS
#-----------------------------

[submodule "ccs_config"]
path = ccs_config
url = https://github.com/NorESMhub/ccs_config_noresm.git
fxtag = ccs_config_noresm0.0.38
fxtag = ccs_config_noresm0.0.44
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NorESMhub/ccs_config_noresm.git

[submodule "cime"]
path = cime
url = https://github.com/NorESMhub/cime.git
fxtag = cime6.1.28_noresm_v0
fxtag = cime6.1.73_noresm_v0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NorESMhub/cime.git

Expand All @@ -199,7 +199,7 @@ fxDONOTUSEurl = https://github.com/NorESMhub/cime.git
[submodule "share"]
path = share
url = https://github.com/NorESMHub/NorESM_share
fxtag = share1.1.2_noresm_v0
fxtag = share1.1.9_noresm_v0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NorESMHub/NorESM_share

Expand All @@ -209,42 +209,42 @@ fxDONOTUSEurl = https://github.com/NorESMHub/NorESM_share

[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
fxtag = cdeps1.0.51
url = https://github.com/NorESMHub/CDEPS.git
fxtag = cdeps1.0.70_noresm_v0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
fxDONOTUSEurl = https://github.com/NorESMHub/CDEPS.git

[submodule "cice6"]
path = components/cice
url = https://github.com/NorESMhub/NorESM_CICE
fxtag = cesm_cice6_5_0_20240702_noresm_v2
fxtag = cesm_cice6_5_0_20240702_noresm_v3
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NorESMhub/NorESM_CICE

[submodule "cism"]
path = components/cism
url = https://github.com/ESCOMP/CISM-wrapper
fxtag = cismwrap_2_2_001
url = https://github.com/NorESMhub/CISM-wrapper
fxtag = cismwrap_2_2_006_noresm_v0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
fxDONOTUSEurl = https://github.com/NorESMhub/CISM-wrapper

[submodule "clm"]
path = components/clm
url = https://github.com/NorESMhub/CTSM
fxtag = ctsm5.3.0-noresm_v0
fxtag = ctsm5.3.030-noresm_v0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NorESMhub/CTSM

[submodule "cmeps"]
path = components/cmeps
url = https://github.com/NorESMhub/CMEPS.git
fxtag = cmeps1.0.20_noresm_v0
fxtag = cmeps1.0.39_noresm_v0
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/NorESMhub/CMEPS.git

[submodule "mosart"]
path = components/mosart
url = https://github.com/ESCOMP/MOSART
fxtag = mosart1.1.02
fxtag = mosart1.1.08
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/MOSART
38 changes: 21 additions & 17 deletions .lib/git-fleximod/git_fleximod/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,31 @@
import argparse
from git_fleximod import utils

__version__ = "0.8.4"
__version__ = "0.9.4"

def find_root_dir(filename=".gitmodules"):
""" finds the highest directory in tree
which contains a file called filename """
d = Path.cwd()
root = Path(d.root)
dirlist = []
dl = d
while dl != root:
dirlist.append(dl)
dl = dl.parent
dirlist.append(root)
dirlist.reverse()

for dl in dirlist:
attempt = dl / filename
if attempt.is_file():
return str(dl)
return None

try:
root = utils.execute_subprocess(["git","rev-parse", "--show-toplevel"],
output_to_caller=True ).rstrip()
except:
d = Path.cwd()
root = Path(d.root)
dirlist = []
dl = d
while dl != root:
dirlist.append(dl)
dl = dl.parent
dirlist.append(root)
dirlist.reverse()

for dl in dirlist:
attempt = dl / filename
if attempt.is_file():
return str(dl)
return None
return Path(root)

def get_parser():
description = """
Expand Down
11 changes: 6 additions & 5 deletions .lib/git-fleximod/git_fleximod/git_fleximod.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master
# set the repository remote

logger.info("Setting remote origin in {}/{}".format(root_dir, path))
status = sprepo_git.git_operation("remote", "-v")
if url not in status:
_, remotelist = sprepo_git.git_operation("remote", "-v")
if url not in remotelist:
sprepo_git.git_operation("remote", "add", "origin", url)

topgit = os.path.join(gitroot, ".git")
Expand Down Expand Up @@ -181,6 +181,8 @@ def init_submodule_from_gitmodules(gitmodules, name, root_dir, logger):
url = gitmodules.get(name, "url")
assert path and url, f"Malformed .gitmodules file {path} {url}"
tag = gitmodules.get(name, "fxtag")
if not tag:
tag = gitmodules.get(name, "hash")
fxurl = gitmodules.get(name, "fxDONOTUSEurl")
fxsparse = gitmodules.get(name, "fxsparse")
fxrequired = gitmodules.get(name, "fxrequired")
Expand Down Expand Up @@ -213,7 +215,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False, depth=0):

def git_toplevelroot(root_dir, logger):
rgit = GitInterface(root_dir, logger)
superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree")
_, superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree")
return superroot

def submodules_update(gitmodules, root_dir, requiredlist, force):
Expand Down Expand Up @@ -250,7 +252,6 @@ def submodules_update(gitmodules, root_dir, requiredlist, force):
newrequiredlist = ["AlwaysRequired"]
if optional:
newrequiredlist.append("AlwaysOptional")

submodules_update(gitsubmodules, repodir, newrequiredlist, force=force)

def local_mods_output():
Expand Down Expand Up @@ -342,7 +343,7 @@ def main():
excludelist=excludelist,
)
if not gitmodules.sections():
sys.exit("No submodule components found")
sys.exit(f"No submodule components found, root_dir={root_dir}")
retval = 0
if action == "update":
submodules_update(gitmodules, root_dir, fxrequired, force)
Expand Down
7 changes: 5 additions & 2 deletions .lib/git-fleximod/git_fleximod/gitinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ def git_operation(self, operation, *args, **kwargs):
command = self._git_command(operation, *newargs)
if isinstance(command, list):
try:
return utils.execute_subprocess(command, output_to_caller=True)
status, output = utils.execute_subprocess(command, status_to_caller=True, output_to_caller=True)
return status, output.rstrip()
except Exception as e:
sys.exit(e)
else:
return command
return 0, command

def config_get_value(self, section, name):
if self._use_module:
Expand All @@ -81,6 +82,8 @@ def config_get_value(self, section, name):
def config_set_value(self, section, name, value):
if self._use_module:
with self.repo.config_writer() as writer:
if "." in section:
section = section.replace("."," \"")+'"'
writer.set_value(section, name, value)
writer.release() # Ensure changes are saved
else:
Expand Down
Loading