cdi warning when calculate monthly mean value

peha6430

New member
I encountered the following issue while working with output files from the WRF-Chem model. I want to calculate the daily and monthly averages of PM2.5 using the output files with a 6-hour resolution. Therefore, I used the following bash command:

```bash
for file in wrfout_d01_2023-01-??_00:00:00; do
cdo timmean $file ${file}_monmean.nc;
done
```

However, I received the following error message:

```
cdi warning (cdf_set_var): Inconsistent variable definition for XLAT!
cdi warning (cdf_set_var): Inconsistent variable definition for XLONG!
cdi warning (cdf_set_var): Inconsistent variable definition for XLAT_U!
cdi warning (cdf_set_var): Inconsistent variable definition for XLONG_U!
cdi warning (cdf_set_var): Inconsistent variable definition for XLAT_V!
cdi warning (cdf_set_var): Inconsistent variable definition for XLONG_V!
cdi warning (cdf_check_variables): Unsupported data type (char/string), skipped variable Times!
cdi warning (cdfInqContents): Coordinates variable XTIME can't be assigned!
Killed
```

It seems there are some issues with the coordinate and reference system. Can anyone help me resolve this problem?
 
ALthough wrfout files are in netCDF format, they don't follow the CF-conventions, and I am suspicious that you cannot directly apply CDO to process wrfout data.

Please take a look at the document here. I guess you will need to make WRF data consistent with CF before using CDO.

I am not an CDO expert, and may not be 100% right. Please keep me updated if you find a solution for this issue, just in case other users may have the same problem. Thanks in advance.
 
Back
Top