All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.finmath.climate.models.dice.submodels.ForcingFunction Maven / Gradle / Ivy

Go to download

finmath lib is a Mathematical Finance Library in Java. It provides algorithms and methodologies related to mathematical finance.

There is a newer version: 6.0.19
Show newest version
package net.finmath.climate.models.dice.submodels;

import java.util.function.BiFunction;

/**
 * The function that maps CarbonConcentration (in GtC) and external forcing (in W/m^2) to forcing (in W/m^2).
 *
 * @author Christian Fries
 */
public class ForcingFunction implements BiFunction {

	private final double carbonConcentrationBase = 580;
	private final double forcingPerCarbonDoubling = 3.6813/5;			// Parameter in original model was per 5 year

	@Override
	public Double apply(CarbonConcentration3DScalar carbonConcentration, Double forcingExternal) {
		return forcingPerCarbonDoubling * Math.log(carbonConcentration.getExpectedCarbonConcentrationInAtmosphere() / carbonConcentrationBase ) / Math.log(2) + forcingExternal;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy