Skip to content

Commit

Permalink
Merge pull request #86 from openmodels/cleanup
Browse files Browse the repository at this point in the history
Cleanup after all big merges
  • Loading branch information
jrising authored Aug 25, 2021
2 parents e107b5c + 09d5af5 commit ab274e2
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jlpkgbutler-ci-master-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.4', '1.5', '1.6']
julia-version: ['1.6']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
Expand Down Expand Up @@ -39,4 +39,4 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}


2 changes: 1 addition & 1 deletion .github/workflows/jlpkgbutler-ci-pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.4', '1.5', '1.6']
julia-version: ['1.6']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
Expand Down
12 changes: 1 addition & 11 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,5 @@ julia = "1.4"
[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Query = "0.12, 1.0"
julia = "1.4"
StatsBase = "0.32, 0.33"
ExcelReaders = "0.11"
Distributions = "0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
CSVFiles = "0.16, 1"
DataFrames = "0.19.1, 0.20, 0.21, 0.22, 1.0"
Mimi = "1.3"

[targets]
test = ["Test", "CSV", "Statistics"]
test = ["Test"]
6 changes: 1 addition & 5 deletions src/components/CO2forcing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
function run_timestep(p, v, d, t)

# eq.13 in Hope 2006
if p.c_CO2concentration[t] < p.c0_baseCO2conc
v.f_CO2forcing[t] = p.f0_CO2baseforcing
else
v.f_CO2forcing[t] = p.f0_CO2baseforcing + p.fslope_CO2forcingslope * log(p.c_CO2concentration[t] / p.c0_baseCO2conc)
end
v.f_CO2forcing[t] = p.f0_CO2baseforcing + p.fslope_CO2forcingslope * log(p.c_CO2concentration[t] / p.c0_baseCO2conc)
end
end
2 changes: 1 addition & 1 deletion src/components/ClimateTemperature.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
area = Parameter(index=[region], unit="km2")
y_year_0 = Parameter(unit="year")
y_year = Parameter(index=[time], unit="year")
area_e_eartharea = Parameter(unit="km^2", default=5.1e8)
area_e_eartharea = Parameter(unit="km2", default=5.1e8)
use_seaice = Parameter{Bool}()

# Initial temperature outputs
Expand Down
4 changes: 2 additions & 2 deletions src/components/TotalForcing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
exf_excessforcing = Parameter(index=[time], unit="W/m2")
fs_sulfateforcing = Parameter(index=[time, region], unit="W/m2")

area = Parameter(index=[region], unit="km^2")
area_e_eartharea = Parameter(unit="km^2", default=5.1e8)
area = Parameter(index=[region], unit="km2")
area_e_eartharea = Parameter(unit="km2", default=5.1e8)

# Total anthropogenic forcing
ft_totalforcing = Variable(index=[time], unit="W/m2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ end
y_year_0 = Parameter(unit="year")
y_year = Parameter(index=[time], unit="year")
y_year_ann = Parameter(index=[year], unit="year")
area_e_eartharea = Parameter(unit="km^2", default=5.1e8)
area_e_eartharea = Parameter(unit="km2", default=5.1e8)
use_seaice = Parameter{Bool}()

# Initial temperature outputs
Expand Down
2 changes: 1 addition & 1 deletion src/components/extensions/ClimateTemperature_annual.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end
y_year_0 = Parameter(unit="year")
y_year = Parameter(index=[time], unit="year")
y_year_ann = Parameter(index=[year], unit="year")
area_e_eartharea = Parameter(unit="km^2", default=5.1e8)
area_e_eartharea = Parameter(unit="km2", default=5.1e8)
use_seaice = Parameter{Bool}()

# Initial temperature outputs
Expand Down
14 changes: 7 additions & 7 deletions src/models/mcs_def.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function getsim()
mcs = @defsim begin

## NOTE: some assignment to global variables can probably be avoided now
## with new treatment of shared and unshared parameters, but this will
## with new treatment of shared and unshared parameters, but this will
## all work for now!

############################################################################
Expand All @@ -25,7 +25,7 @@ function getsim()
rv(RV_tcal_CalibrationTemp) = TriangularDist(2.5, 3.5, 3.)
MarketDamages.tcal_CalibrationTemp = RV_tcal_CalibrationTemp
NonMarketDamages.tcal_CalibrationTemp = RV_tcal_CalibrationTemp

# each component should have the same value for its q0propmult_cutbacksatnegativecostinfinalyear
# so we use an RV here because in the model this is not an explicitly
# shared parameter, then assign to components
Expand Down Expand Up @@ -103,7 +103,7 @@ function getsim()
NonMarketDamages.w_NonImpactsatCalibrationTemp = TriangularDist(.1, 1, .5)
NonMarketDamages.pow_NonMarketExponent = TriangularDist(1.5, 3, 2)
NonMarketDamages.ipow_NonMarketIncomeFxnExponent = TriangularDist(-.2, .2, 0)

# SLRDamages
SLRDamages.scal_calibrationSLR = TriangularDist(0.45, 0.55, .5)
# SLRDamages.iben_SLRInitialBenefit = TriangularDist(0, 0, 0) # only usable if lb <> ub
Expand All @@ -123,12 +123,12 @@ function getsim()
EquityWeighting.civvalue_civilizationvalue = TriangularDist(1e10, 1e11, 5e10)
EquityWeighting.ptp_timepreference = TriangularDist(0.1, 2, 1)
EquityWeighting.emuc_utilityconvexity = TriangularDist(0.5, 2, 1)

############################################################################
# Define random variables (RVs) - for SHARED parameters
############################################################################
# shared parameter linked to components: SLRDamages, Discontinuity (weights

# shared parameter linked to components: SLRDamages, Discontinuity (weights
# for market and nonmarket are non-stochastic and uniformly 1)
wincf_weightsfactor_sea["USA"] = TriangularDist(.6, 1, .8)
wincf_weightsfactor_sea["OECD"] = TriangularDist(.4, 1.2, .8)
Expand Down Expand Up @@ -185,7 +185,7 @@ function getsim()
learn_learningrate = TriangularDist(0.05, 0.35, 0.2)

# NOTE: the below can probably be resolved into unique, unshared parameters with the same name
# in the new Mimi paradigm of shared and unshared parameters, but for now this will
# in the new Mimi paradigm of shared and unshared parameters, but for now this will
# continue to work!

# MarketDamagesBurke
Expand Down

0 comments on commit ab274e2

Please sign in to comment.