Changing fuel on fleet #84
-
For some weeks I am trying to change the fuel used on a fleet/list of flights from JetA to a SAFBlend. I have a fleet of e.g., 100 flights and would like to run Cocip on them once with JetA and once with a 100% SAFBlend. When I loop through each flight in the fleet, change the fuel and run Cocip on each flight individually, the overall contrail EF changes. This is not the case if I change the fuel for the entire fleet. In this case, the overal contrail EF of the JetA run to the SAFBlend run is identical. To reduce computational time, I am looking for a way to run Cocip on the entire fleet: def CoCiP_by_fuels(met, rad, flights_in, fuel):
return Fleet_out Note that also the fuel_name changes from Fleet to Fleet_out. I suppose I am missing something here, but after quite some reading I still can't find a fix. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I've been able to reproduce the bug you've found. Thanks for alerting us! I believe I've fixed the issue in f8d561b and c660f9c. This will be included when we release pycontrails 0.47 (hopefully later today). My hope is that the snippet you've included will work as you expect when you upgrade pycontrails. You can also specify the fuel type on each Flight instance up front, and the Fleet will automatically pick it up (so no need to monkey patch the instance after instantiation). |
Beta Was this translation helpful? Give feedback.
Hi @GunnarQuante - I will let @zebengberg confirm here, but the 0.47 release had a companion update in
pycontrails-bada
. Try pulling / installing the latest changes from here https://github.com/contrailcirrus/pycontrails-bada