"ECCODES ERROR : concept: no match for paramId=201031" when using flex_extract to prepare era5

It was my first run of Flex_extract using the the provided case “Control_EA5”, and the routine always stopped by:

ECCODES ERROR : concept: no match for paramId=201031
ECCODES ERROR : concept: input handle edition=2, centre=ecmf
ECCODES ERROR : concept: input handle dataset=era
ECCODES ERROR : Please check the Parameter Database ‘Parameter Database
Traceback (most recent call last):
File “/home/flsun/workdisk/flexpart-wrf/flex_extract/Run/…/Source/Python/submit.py”, line 268, in
main()
File “/home/flsun/workdisk/flexpart-wrf/flex_extract/Run/…/Source/Python/submit.py”, line 109, in main
prepare_flexpart(ppid, c)
File “/home/flsun/workdisk/flexpart-wrf/flex_extract/Source/Python/Mods/prepare_flexpart.py”, line 169, in prepare_flexpart
flexpart.create(inputfiles, c)
File “/home/flsun/workdisk/flexpart-wrf/flex_extract/Source/Python/Classes/EcFlexpart.py”, line 1655, in create
codes_set(gid, ‘paramId’, 201031)
File “/home/flsun/miniforge3/envs/flexwrfoutput/lib/python3.11/site-packages/gribapi/gribapi.py”, line 2123, in grib_set
grib_set_long(msgid, key, value)
File “/home/flsun/miniforge3/envs/flexwrfoutput/lib/python3.11/site-packages/gribapi/gribapi.py”, line 989, in grib_set_long
GRIB_CHECK(lib.grib_set_long(h, key.encode(ENC), value))
File “/home/flsun/miniforge3/envs/flexwrfoutput/lib/python3.11/site-packages/gribapi/gribapi.py”, line 226, in GRIB_CHECK
errors.raise_grib_error(errid)
File “/home/flsun/miniforge3/envs/flexwrfoutput/lib/python3.11/site-packages/gribapi/errors.py”, line 381, in raise_grib_error
raise ERROR_MAPerrid
gribapi.errors.ConceptNoMatchError: Concept no match

The ID 201031 is for specific cloud water content, whose grib edition 2 info has a message “This representation is for ECMWF internal use only and should not be used operationally” . I have no idea of this, only a public account.

Hi,
the parameters available from ERA5 are:

Thanks
Michela

Thank you Michela,
Perhaps it’s the usage problem of flex_extract. The error occurred at the following codes that try to get scwc by summing CLWC and CIWC and write it to a grib2 file.

elif paramId == 246 or paramId == 247: # CLWC, CIWC
    # sum cloud liquid water and ice
       if scwc is None:
               scwc = codes_get_values(gid)
       else:
               scwc += codes_get_values(gid)
               codes_set_values(gid, scwc)
               codes_set(gid, 'paramId', 201031)
               codes_write(gid, fdict['22'])
               scwc = None

I’ll try it and update later.

The EcCodes has definition files of local concepts for both ecmf and era5. In this case, the ecmf def file has the “201031” block while era5 has not. My practice is to copy ecmf definition to era5’s, which solves the problem for the moment.