OMS-NetZero / FAIR-pro

Finite Amplitude Impulse-Response simple climate-carbon-cycle model repository with more functions for users who are comfortable with Python
Apache License 2.0
3 stars 0 forks source link

Carbon cycle tuning #10

Open znicholls opened 6 years ago

znicholls commented 6 years ago

write a method, tune_carbon_cycle, that:

example of using scipy.optimize.curve_fit

from scipy.optimize import curve_fit
a = curve_fit(PD100_atune,
yearsad,
fit,
p0 = [0.2173,0.2240,0.2824,0.2763,1.134083,0.523307],
bounds = ([0.0,0.0,0.0,0.0,0.1,0.1],[1.0,1.0,1.0,1.0,10.0,10.0]))[0]

MAGICC's forcing formula in the Fortran code to confirm that it's the same as FAIR's

DAT_CO2_RF%DATGLOBE(NEXT_YEAR_IDX) = CORE_DELQ2XCO2 /DLOG(2.0D0) * & DLOG(DAT_CO2_CONC%DATGLOBE(NEXT_YEAR_IDX) / DAT_CO2_CONC%PREIND_DATGLOBE)

MAGICC Default RCP values C_0: 279.51ppmv F_2X: 3.71 W/m^2

znicholls commented 6 years ago

Slight complication is that if you want to get the feedbacks right you need to define what everything else is doing. For now I think there are a few options:

znicholls commented 6 years ago

@Myles @richardcode @njleach This is now written and working I believe. Have a look at the last commit of the oo-develop branch