Python Interface to MAPL: Difference between revisions
No edit summary |
|||
Line 9: | Line 9: | ||
In this example, the very top root component is implemented entirely in a shared library. | In this example, the very top root component is implemented entirely in a shared library. | ||
"""" | """" | ||
The GEOSgcm application written in python, starting from a | The GEOSgcm application written in python, starting from a | ||
Root Component implemented in Fortran. | Root Component implemented in Fortran. | ||
""" | """ | ||
import MAPL | import MAPL | ||
if __name == "__main__": | if __name == "__main__": | ||
# Instantiate the root component | # Instantiate the root component | ||
# ------------------------------ | # ------------------------------ | ||
gcs = MAPL.GridComp(lib='/some/path/libGEOSana.so') | |||
# Instantiate MAPL, using a "Fortran" as a root component | # Instantiate MAPL, using a "Fortran" as a root component | ||
# ------------------------------------------------------- | # ------------------------------------------------------- | ||
mapl = MAPL(root=gcs) | |||
# Run the cap | # Run the cap | ||
# ----------- | # ----------- | ||
mapl.go() |