pernak18 / g-point-reduction

Jupyter Notebook evolution of RRTMGP g-point reduction (AKA k-distribution optimization) that started with Menno's [k-distribution-opt](https://github.com/MennoVeerman/k-distribution-opt) repo
0 stars 0 forks source link

end-to-end run with Eli #30

Closed pernak18 closed 8 months ago

pernak18 commented 10 months ago

get eli running the notebook on his own, with his own definitions of the cost function

pernak18 commented 10 months ago

eli has gotten to iteration 94, where we hit the delta-cost cutoff of 0.1 that triggers our modified reduction. he can execute a couple cells that setup the modified reduction, but eventually he gets:

--------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Input In [14], in <cell line: 1>()
----> 1 dCostMod, coObjMod = MODRED.costModInit(coObj, kBandDict)
      2 with open(costModPickle, 'wb') as fp: pickle.dump(coObjMod, fp)

File /pscratch/sd/e/emlawer/eli_g-point-reduction/modified_reduction.py:91, in costModInit(coObj0, bandKObjMod, scaleWeight, diagnostics)
     89 coObjMod.cost0[comp] = cost0[:-1]
     90 coObjMod.dCost0[comp] = coObj0.dCost0[comp][:-1]
---> 91 coObjMod.costComps[comp] = coObj0.costComps[comp][:-1]
     92 coObjMod.dCostComps[comp] = coObj0.dCostComps[comp][:-1]
     93 coObjMod.costComp0[comp] = coObj0.costComp0[comp]

KeyError: 'flux_net'
pernak18 commented 8 months ago

eli has been able to proceed to iteration 96. i think the problem at 94 was some mislabeling of a pickle file in an effort to get things to work.

and i forgot the last cell in the notebook was intended to replace all the individual cells of the modified reduction, so i should have just run that cell instead of everything leading up to it