Documentation

This commit is contained in:
Shahram Najm 2018-01-15 13:45:31 +00:00
parent 94492491be
commit b2548e4a39
2 changed files with 8 additions and 7 deletions

View File

@ -1706,9 +1706,10 @@ int codes_copy_key(grib_handle* h1,grib_handle* h2,const char* key,int type)
size_t len1,len;
int err=0;
if ( type != GRIB_TYPE_DOUBLE &&
type != GRIB_TYPE_LONG &&
type != GRIB_TYPE_STRING ) {
if ( type != GRIB_TYPE_DOUBLE &&
type != GRIB_TYPE_LONG &&
type != GRIB_TYPE_STRING )
{
err=grib_get_native_type(h1,key,&type);
if (err) return err;
}
@ -1721,7 +1722,7 @@ int codes_copy_key(grib_handle* h1,grib_handle* h2,const char* key,int type)
if (len1==1) {
err=grib_get_double(h1,key,&d);
if (err) return err;
grib_context_log(h1->context,GRIB_LOG_DEBUG,"codes_copy_key: %s=%g\n",key,d);
grib_context_log(h1->context,GRIB_LOG_DEBUG,"codes_copy_key double: %s=%g\n",key,d);
err=grib_set_double(h2,key,d);
return err;
} else {
@ -1737,7 +1738,7 @@ int codes_copy_key(grib_handle* h1,grib_handle* h2,const char* key,int type)
if (len1==1) {
err=grib_get_long(h1,key,&l);
if (err) return err;
grib_context_log(h1->context,GRIB_LOG_DEBUG,"codes_copy_key: %s=%ld\n",key,l);
grib_context_log(h1->context,GRIB_LOG_DEBUG,"codes_copy_key long: %s=%ld\n",key,l);
err=grib_set_long(h2,key,l);
return err;
} else {
@ -1755,7 +1756,7 @@ int codes_copy_key(grib_handle* h1,grib_handle* h2,const char* key,int type)
s=(char*)grib_context_malloc_clear(h1->context,len);
err=grib_get_string(h1,key,s,&len);
if (err) return err;
grib_context_log(h1->context,GRIB_LOG_DEBUG,"codes_copy_key: %s=%s\n",key,s);
grib_context_log(h1->context,GRIB_LOG_DEBUG,"codes_copy_key str: %s=%s\n",key,s);
err=grib_set_string(h2,key,s,&len);
grib_context_free(h1->context,s);
return err;

View File

@ -66,7 +66,7 @@ Since some values can not be set to missing you can get an error for those keys.
\endverbatim\n
-# It's possible to produce a grib edition 2 file from a grib edition 1 just changing the edition number with grib_set.
At this stage of development all the geography parameters, level and time information is correctly translated, for the product
definition extra set calls must be done. To do this properly, \ref grib_filter is suggested. \n
definition extra 'set' calls must be done. To do this properly, use the tool grib_filter.\n
\verbatim
grib_set -s edition=2 ../data/reduced_gaussian_pressure_level.grib1
\endverbatim\n