Closed jsmretschnig closed 2 weeks ago
@jsmretschnig You can control the horizontal resolution of the output by specifying the resolution of the source
parameter. For example, you could use something along these lines:
source = MetDataset.from_coords(longitude=[2, 3, 4], latitude=[1, 2, 3], level=[220, 250], time="2024-10-10")
accf = ACCF(pl, sl)
out = accf.eval(source)
I also changed ACCF.eval
in the way you're suggesting -- see 2e09aefb3c2a7eebe850b99628e32ebb38c8e417
Description
CLIMaCCF has a horizontal_resolution parameter which allows to reduce the horizontal resolution to i 0.25 x i 0.25 with i being [1,2,3,...]. That means that aCCFs can be computed with lower resolution than their meteorological input data. However, pycontrails always matches the config parameter with the met data (see https://github.com/contrailcirrus/pycontrails/blob/aa3256c109b860bd386690b993ad461af9fac421/pycontrails/models/accf.py#L234-L245).
Details
Steps to Reproduce
ERA5 reanalysis data is given in 0.25 x 0.25. But I want to compute aCCFs in 0.5 x 0.5.
Alternatively: If I remove the above mentioned lines in the code, there is no matching any longer, and I get this:
The values are correct, but the mapping doesn't apply any longer.
Additional Notes
Informed @Abolfazl-Simorgh as well.