GEUS-SICE / pySICE

Python and Fortran scripts behind the SICE toolchain for albedo retrieval.
GNU General Public License v2.0
5 stars 1 forks source link

Different result when calculating ratm in optimized version #10

Closed BaptisteVandecrux closed 2 years ago

BaptisteVandecrux commented 2 years ago

https://github.com/GEUS-SICE/pySICE/blob/448a886b8533ad6fa8c3d37f830376ba13611b1c/misc/sice_lib_optim.py#L830-L847

Gives a different ratm than

    a_s = (.18016,  -0.18229,  0.15535,     -0.14223)
    bs = (.58331,  -0.50662,  -0.09012,        0.0207)
    cs = (0.21475,   -0.1,  0.13639,            -0.21948)
    als = (0.16775, -0.06969,  0.08093,     -0.08903)
    bets = (1.09188,  0.08994,  0.49647,   -0.75218)

    a_cst =     a_s[0]  + a_s[1]*g**1 + a_s[2]*g**2 + a_s[3]*g**3
    b_cst =     bs[0]   + bs[1]*g**1 + bs[2]*g**2 + bs[3]*g**3
    c_cst =     cs[0]   + cs[1]*g**1 + cs[2]*g**2 + cs[3]*g**3
    al_cst=     als[0]  + als[1]*g**1 + als[2]*g**2 + als[3]*g**3
    bet_cst=    bets[0] + bets[1]*g**1 + bets[2]*g**2 + bets[3]*g**3        

    ratm = tau*(a_cst*np.exp(-tau/al_cst)+b_cst*np.exp(-tau/bet_cst)+c_cst)
BaptisteVandecrux commented 2 years ago

solved by 96de0d0d8cc79d2dcbfbda57b138aa65415d101e