﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
376	Wring COSMIC IDs	Dave Offiler	Dave Offiler	"Santi reported a problem converting some COSMIC files to BUFR, for which the satellite ID goes AWOL. Josep traced this to:
{{{
Hi all,

Ok, I got it.

In         ropp_io/bufr/convertcodes.f90

The list of names LEOlist
says that the shortnames of COSMIC are   CO01 to CO06      (note the letter O, not the number 0, so two letters+two digits).
UCAR, however, uses C001 to C006 (one letter+three digits).

This list ends being forwarded to the namelist
$BUFR_TABLES/roppbufrcodes.nl

So this namelist file should also be edited or regenerated.

If LEOlist is corrected as above, then the LEO is identified, and its standard number is written to the BUFR file.


Josep
}}}

The 2-letter/2-digit IDs have been in use from the beginning, so I'm not sure why this had not been found long ago. It wouldn't have been caught by the standard ''make test'' because the test and pre-generated reference BUFR files (and hence the decoded file) would have both had 'missing data' for this parameter, so would pass the automated ''diff'' test.

The problem is easily confirmed by running ''ucar2ropp'' on the test file ''ropp_io/data/ucar_test.nc''. The satellite ID code is extracted from the ''fileStamp'' parameter. On inspection with ''ncdump'' the code is '''C006'''; this value is copied into the ROPP netCDF file as parameter ''leo_id''. Then when running ''ropp2bufr'' this code will not be matched, and an '''unknown''' BUFR code substituted. This can be confirmed using the ''decbufr'' tool. Editing the namelist file to the correct code allows the encoder to match '''C006''' and to map this to BUFR code value '''745''' which ''decbufr'' maps back to '''COSMIC-6'''.

The solution simply is to change the satellite (text) ID in both the code (optional) and namelist to the 1-letter/3-digit form used by UCAR/CDAAC. Santi has modified his local namelist file and this has cured his problem. Both files need to be corrected for the release version of ROPP-8."	defect	closed	normal	8.0	ropp_io	7.1	fixed	BUFR, satellite ID, code	
