contrailcirrus / pycontrails

Python library for modeling contrails and other aviation climate impacts
https://py.contrails.org/
Apache License 2.0
59 stars 18 forks source link

Remove duplicate of potential vorticity parameter #264

Closed jsmretschnig closed 2 weeks ago

jsmretschnig commented 2 weeks ago

ACCF.met_variables included the same parameter twice: pv (potential_vorticity)

jsmretschnig commented 2 weeks ago

Also: the grib1_id for relative_humidity (r) should be 52 instead of None. See here: NCEP Grib v1 Code Table Can't find it in the code though. The unit seems correct (%), but it's not consistent with ACCF.met_variables, there it says 1.

To reproduce the issue: try to download ERA5 data with ACCF.met_variables as parameter

zebengberg commented 2 weeks ago

Also: the grib1_id for relative_humidity (r) should be 52 instead of None. See here: NCEP Grib v1 Code Table Can't find it in the code though. The unit seems correct (%), but it's not consistent with ACCF.met_variables, there it says 1.

To reproduce the issue: try to download ERA5 data with ACCF.met_variables as parameter

Thanks @jsmretschnig ! This is certainly confusing.

pycontrails has two different RelativeHumidity variables:

Can you confirm that ACCFs expect the first flavor of RH? If so, I'll figure out how to fix this.

jsmretschnig commented 1 week ago

So apparently CLIMaCCF is fine with both options: https://github.com/dlr-pa/climaccf/blob/907c5f0cc84db8be675337d6a213c8706b024409/climaccf/weather_store.py#L277

And uses this parameter https://codes.ecmwf.int/grib/param-db/157