Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed Aug 30, 2024
1 parent 74ca45a commit 673b043
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions payu/models/cesm_cmeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _setup_checks(self):
nthreads = int(self.runconfig.get("PELAYOUT_attributes", f"{realm}_nthreads"))
rootpe = int(self.runconfig.get("PELAYOUT_attributes", f"{realm}_rootpe"))
pestride = int(self.runconfig.get("PELAYOUT_attributes", f"{realm}_pestride"))
npes = (ntasks-1)*nthreads*pestride #count to the last process, starting at 0
npes = (ntasks-1)*nthreads*pestride # count to the last process, starting at 0
if (rootpe + npes) > cpucount:
raise ValueError(
f"Insufficient cpus for the {realm} pelayout in {NUOPC_CONFIG}"
Expand All @@ -204,7 +204,7 @@ def _setup_checks(self):
# check iolayout
if realm == "cpl":
comp = "MED" # med and cpl names are both used in runconfig
else :
else:
comp = realm.upper()
if comp in self.runconfig.get_component_list():
io_section = f"{comp}_modelio"
Expand All @@ -218,9 +218,9 @@ def _setup_checks(self):
)

match nc_type:
case "netcdf" :
case "netcdf":
break
case "netcdf4p" | "pnetcdf" :
case "netcdf4p" | "pnetcdf":
if self.runconfig.get(io_section, "pio_async_interface") == ".false." :
niotasks = int(self.runconfig.get(io_section, "pio_numiotasks"))
iostride = int(self.runconfig.get(io_section, "pio_stride"))
Expand All @@ -235,7 +235,7 @@ def _setup_checks(self):
f"netcdf4c in {io_section} of {NUOPC_CONFIG} is deprecated, "
"use netcdf4p"
)
case _ :
case _:
raise ValueError(
f"The iotype for {io_section} in {NUOPC_CONFIG} is "
'invalid, valid options are "netcdf", "pnetcdf" and "netcdf4p"'
Expand Down Expand Up @@ -364,7 +364,7 @@ def get(self, section, variable, value=None):
return self.contents[span[0]:span[1]]
else:
return value

def get_component_list(self, value=None):
"""
Get the `component_list`
Expand Down

0 comments on commit 673b043

Please sign in to comment.