-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from anthofflab/create-pull-request/patch
[AUTO] Format files using DocumentFormat
- Loading branch information
Showing
22 changed files
with
346 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
@defcomp damages begin | ||
DAMFRAC = Variable(index=[time]) # Damages (fraction of gross output) | ||
|
||
TATM = Parameter(index=[time]) # Increase temperature of atmosphere (degrees C from 1900) | ||
YGROSS = Parameter(index=[time]) # Gross world product GROSS of abatement and damages (trillions 2005 USD per year) | ||
a1 = Parameter() # Damage intercept | ||
a2 = Parameter() # Damage quadratic term | ||
a3 = Parameter() # Damage exponent | ||
TotSLR = Parameter(index=[time]) # Path of total SLR | ||
b1 = Parameter() # Coefficient on SLR | ||
b2 = Parameter() # Coefficient on quadratic SLR term | ||
b3 = Parameter() # SLR exponent | ||
TATM = Parameter(index=[time]) # Increase temperature of atmosphere (degrees C from 1900) | ||
YGROSS = Parameter(index=[time]) # Gross world product GROSS of abatement and damages (trillions 2005 USD per year) | ||
a1 = Parameter() # Damage intercept | ||
a2 = Parameter() # Damage quadratic term | ||
a3 = Parameter() # Damage exponent | ||
|
||
TotSLR = Parameter(index=[time]) # Path of total SLR | ||
b1 = Parameter() # Coefficient on SLR | ||
b2 = Parameter() # Coefficient on quadratic SLR term | ||
b3 = Parameter() # SLR exponent | ||
|
||
function run_timestep(p, v, d, t) | ||
# Define function for DAMFRAC | ||
v.DAMFRAC[t] = p.a1 * p.TATM[t] + p.a2 * p.TATM[t]^p.a3 + p.b1 * p.TotSLR[t] + p.b2 * p.TotSLR[t]^p.b3 | ||
v.DAMFRAC[t] = p.a1 * p.TATM[t] + p.a2 * p.TATM[t]^p.a3 + p.b1 * p.TotSLR[t] + p.b2 * p.TotSLR[t]^p.b3 | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
@defcomp emissions begin | ||
CCA = Variable(index=[time]) # Cumulative indiustrial emissions | ||
E = Variable(index=[time]) # Total CO2 emissions (GtC per year) | ||
EIND = Variable(index=[time]) # Industrial emissions (GtC per year) | ||
CCA = Variable(index=[time]) # Cumulative indiustrial emissions | ||
E = Variable(index=[time]) # Total CO2 emissions (GtC per year) | ||
EIND = Variable(index=[time]) # Industrial emissions (GtC per year) | ||
|
||
etree = Parameter(index=[time]) # Emissions from deforestation | ||
MIU = Parameter(index=[time]) # Emission control rate GHGs | ||
sigma = Parameter(index=[time]) # CO2-equivalent-emissions output ratio | ||
YGROSS = Parameter(index=[time]) # Gross world product GROSS of abatement and damages (trillions 2005 USD per year) | ||
etree = Parameter(index=[time]) # Emissions from deforestation | ||
MIU = Parameter(index=[time]) # Emission control rate GHGs | ||
sigma = Parameter(index=[time]) # CO2-equivalent-emissions output ratio | ||
YGROSS = Parameter(index=[time]) # Gross world product GROSS of abatement and damages (trillions 2005 USD per year) | ||
|
||
function run_timestep(p, v, d, t) | ||
# Define function for EIND | ||
v.EIND[t] = p.sigma[t] * p.YGROSS[t] * (1 - p.MIU[t]) | ||
|
||
# Define function for E | ||
v.E[t] = v.EIND[t] + p.etree[t] | ||
|
||
# Define function for CCA | ||
if is_first(t) | ||
v.CCA[t] = v.EIND[t] * 10 | ||
v.CCA[t] = v.EIND[t] * 10 | ||
else | ||
v.CCA[t] = v.CCA[t - 1] + v.EIND[t] * 10 | ||
v.CCA[t] = v.CCA[t-1] + v.EIND[t] * 10 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.