mirror of https://github.com/ecmwf/eccodes.git
F90 codes_dump for GRIB and BUFR (debugging aid)
This commit is contained in:
parent
eabfbaec9e
commit
5d58da9af0
|
@ -34,9 +34,11 @@ character(len=9) :: typicalDate
|
|||
|
||||
do while (iret/=CODES_END_OF_FILE)
|
||||
|
||||
! For debugging
|
||||
call codes_dump(ibufr)
|
||||
|
||||
! get and print some keys form the BUFR header
|
||||
write(*,*) 'message: ',count
|
||||
call codes_dump(ibufr)
|
||||
|
||||
! we need to instruct ecCodes to expand all the descriptors
|
||||
! i.e. unpack the data values
|
||||
|
|
|
@ -39,7 +39,9 @@ program grib_get_keys
|
|||
|
||||
LOOP: DO WHILE (iret /= CODES_END_OF_FILE)
|
||||
|
||||
call grib_dump(igrib)
|
||||
! For debugging
|
||||
call grib_dump(igrib)
|
||||
|
||||
!check if the value of the key is MISSING
|
||||
is_missing=0;
|
||||
call codes_is_missing(igrib,'Ni',is_missing);
|
||||
|
|
|
@ -1590,13 +1590,28 @@ int grib_f_release(int* hid){
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
static void do_the_dump(grib_handle* h)
|
||||
{
|
||||
if (h->product_kind == PRODUCT_GRIB)
|
||||
{
|
||||
const int dump_flags = GRIB_DUMP_FLAG_VALUES
|
||||
| GRIB_DUMP_FLAG_READ_ONLY
|
||||
| GRIB_DUMP_FLAG_ALIASES
|
||||
| GRIB_DUMP_FLAG_TYPE;
|
||||
grib_dump_content(h,stdout,"debug", dump_flags, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
grib_dump_content(h,stdout,"wmo",0,NULL);
|
||||
}
|
||||
}
|
||||
int grib_f_dump_(int* gid){
|
||||
grib_handle *h = get_handle(*gid);
|
||||
|
||||
if(!h)
|
||||
return GRIB_INVALID_GRIB;
|
||||
else
|
||||
grib_dump_content(h,stdout,"wmo",0,NULL);
|
||||
do_the_dump(h);
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue