IPAT-S Tutorial IPAT-S home

Adding Comments to the Script

Adding comments to a script can increase its clarity considerably. They make it easier for someone else to understand the script and for the original authors to update it later. Comments have been added to the &$147;Tut2.ips” script that is available with the sample scripts distributed with IPAT-S:

base year 2002
scenario year 2012

# US Census Bureau pop projection categories
dimension Population 'Low', 'Medium', 'High'

summvar Emissions{Population}, Pop{Population}
ratio EmissionIntensity, GDPperCap

# Emissions given by an index relative to the base year
Emissions.by = 100

# US Census Bureau population projections
# http://www.census.gov (Accessed 7 Dec 2002)
Pop{Population = 'Low'} = 278.8, 294.1
Pop{Population = 'Medium'} = 280.3, 304.8
Pop{Population = 'High'} = 282.1, 318.9

# Bush Administration emission reduction target is
# 18% decrease in intensity over next 10 years
# (from Feb 2002)
EmissionIntensity = incr[-18%]

# This is key input: GDP per cap growth rate
GDPperCap = growth(<2.0%>)

chain Pop >> GDPperCap * EmissionIntensity -> Emissions

report Emissions as "Emissions (2002 = 100)"



In IPAT Studio, the comments are color-coded, to make them easier to see:

Color coding in the GUI

Next Previous Index