EarthSciML / EarthSciMLBase.jl

Basic functionality for EarthSciML system
MIT License
3 stars 0 forks source link

Couldn't have two species in one model equal to the same species in the other model. #69

Open jialinl6 opened 1 month ago

jialinl6 commented 1 month ago
function EarthSciMLBase.couple2(c::GasChem.SuperFastCoupler, e::EarthSciData.NEI2016MonthlyEmisCoupler)
    c, e = c.sys, e.sys
    @parameters uconv, MW_SO2
    operator_compose(convert(ODESystem, c), e, Dict(
            c.SO2 => e.SULF => uconv / MW_SO2,
            c.SO2 => e.SO2 =>  uconv / MW_SO2, ))
end

For example, in this coupled system, only the latter equation is kept. This only creates SuperFast₊NEI2016MonthlyEmis_SO2(t) and no SuperFast₊NEI2016MonthlyEmis_SULF(t). We want c.SO2 = (e.SULF + e.SO2)*uconv/MW_SO2