cape.pylch.cntl: Main Loci/CHEM run matrix controller

This module provides the Cntl class that is specific to pylch, the CAPE interface to Loci/CHEM.

class cape.pylch.cntl.Cntl(fname=None)
GetProjectRootName(j: int = 0) str

Get the project root name

This is taken directly from the main JSON file

Call:
>>> name = cntl.GetProjectName(j=0)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

j: int

Phase number

Outputs:
name: str

Project root name

Versions:
  • 2024-10-17 @ddalle: v1.0

PrepareCase(i: int)

Prepare case for running if necessary

Call:
>>> cntl.PrepareCase(i)
Inputs:
cntl: cape.pylava.cntl.Cntl

Instance of control class containing relevant parameters

i: int

Index of case to analyze

Versions:
  • 2024-06-12 @sneuhoff: v1.0

PrepareVarsFile(i: int)

Prepare the run YAML file for each phase of one case

Call:
>>> cntl.PrepareRunYAML(i)
Inputs:
cntl: Cntl

CAPE run matrix control instance

i: int

Case index

Versions:
  • 2024-10-10 @ddalle: v1.0

PrepareVarsFileFlightConditions(i: int)

Prepare the flight conditions in a Loci/CHEM .vars file

Call:
>>> cntl.PrepareVarsFileFlightConditions(i)
Inputs:
cntl: Cntl

CAPE run matrix control instance

i: int

Case index

Versions:
  • 2024-10-10 @ddalle: v1.0

ReadMapBC(j: int = 0, q: bool = True)

Read the FUN3D boundary condition map

Call:
>>> cntl.ReadMapBC(q=True)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

q: {True} | False

Whether or not to read to MapBC, else MapBC0

Versions:
  • 2016-03-30 @ddalle: v1.0 (pyfun)

  • 2024-10-17 @ddalle: v1.0

ReadVarsFile(j: int = 0, q: bool = True)

Read the {project}.vars file

Call:
>>> cntl.ReadVarsFile(j=0, q=True)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

j: int

Phase number

q: bool

Whether or not to read to VarsFile, else VarsFile0

Versions:
  • 2024-10-17 @ddalle: v1.0

init_post()

Do __init__() actions specific to pylch

Call:
>>> cntl.init_post()
Inputs:
cntl: cape.cfdx.cntl.Cntl

CAPE run matrix control instance

Versions:
  • 2024-10-17 @ddalle: v1.0