Skip to content

Commit

Permalink
Added N2, O2, and Argon caculated for WACCM temperature and pressure.
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-drews committed Oct 15, 2024
1 parent b3f3aff commit f72653a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/acom_music_box/tools/waccmToMusicBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ def readWACCM(waccmMusicaDict, latitude, longitude,
return (musicaDict)


# Add molecular Nitrogen, Oxygen, and Argon to dictionary.
# varValues = already read from WACCM, contains (name, concentration, units)
# return varValues with N2, O2, and Ar added
def addStandardGases(varValues):
varValues["N2"] = ("N2", 0.78084, "mol/mol") # standard fraction by volume
varValues["O2"] = ("O2", 0.20946, "mol/mol")
varValues["Ar"] = ("Ar", 0.00934, "mol/mol")

return(varValues)


# set up indexes for the tuple
musicaIndex = 0
valueIndex = 1
Expand Down Expand Up @@ -433,6 +444,9 @@ def main():
lat, lon, when, waccmDir, waccmFilename)
logger.info(f"Original WACCM varValues = {varValues}")

# add molecular Nitrogen, Oxygen, and Argon
varValues = addStandardGases(varValues)

# Perform any conversions needed, or derive variables.
varValues = convertWaccm(varValues)
logger.info(f"Converted WACCM varValues = {varValues}")
Expand Down

0 comments on commit f72653a

Please sign in to comment.