Open widmka opened 3 months ago
This seems like a problem with our code, not with your input. We have some logic on the previous line to figure out whether wrap_longitude
should be True
or False
, but only one of those values is accepted by the MetDataArray constructor....
I'm not sure exactly how you're using pycontrails, but if you're creating a MetDataset and then using it to run CoCiP you should be able to avoid this issue by setting (That won't help, since wrap_longitude=True
when you create the MetDataset. That way the longitude will already be wrapped by the time CoCiP gets to this line of code.da
is created from CoCiP output and not necessarily on the same grid as your met data.) Yes, I think setting copy=wrap_longitude
as a quick fix will work, though it's possible you might see some performance degradation. I'll work on a patch on our end too, though. Thanks for bringing the issue to our attention!
Description I am running into ValueError: Set 'copy=True' when using 'wrap_longitude=True' at https://github.com/contrailcirrus/pycontrails/blob/67b0c8425c3fb4078b8001bbdd9844f2048463d3/pycontrails/models/cocip/radiative_forcing.py#L1106 ,since copy=False... Is this intended and does it indicate a problem with my input? Or could I set copy=wrap_longitude as a quick fix?
Details