write#
- ams.io.json.write(system, outfile, skip_empty=True, overwrite=None, to_andes=False)[source]#
Write loaded AMS system data into an json file. If to_andes is True, only write models that are in ANDES, but the outfile might not be able to be read back into AMS.
Revise function
andes.io.json.write
to skip non-andes models.- Parameters:
- systemSystem
A loaded system with parameters
- outfilestr
Path to the output file
- skip_emptybool
Skip output of empty models (n = 0)
- overwritebool, optional
None to prompt for overwrite selection; True to overwrite; False to not overwrite
- to_andesbool, optional
Write to an ANDES system, where non-ANDES models are skipped
- Returns:
- bool
True if file written; False otherwise