mirror of https://github.com/ecmwf/eccodes.git
MeteoFrance lam OMM: improve test code
This commit is contained in:
parent
b7a91f20b4
commit
aa6f393037
|
@ -717,11 +717,14 @@ int main (int argc, char * argv[])
|
|||
char f[128];
|
||||
FILE * fp;
|
||||
size_t size;
|
||||
char * buffer;
|
||||
sprintf (f, "lam_bf_%s.grib", grids[igrid]);
|
||||
const void * buffer = NULL;
|
||||
sprintf (f, "lam_bf_%s.grib", grids[igrid]);
|
||||
fp = fopen (f, "w");
|
||||
GRIB_CHECK (grib_get_message (h, &buffer, &size), 0);
|
||||
fwrite (buffer, 1, size, fp);
|
||||
if (fwrite (buffer, 1, size, fp) != size) {
|
||||
perror(f);
|
||||
return 1;
|
||||
}
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,5 +10,8 @@
|
|||
|
||||
. ./include.sh
|
||||
|
||||
exec $test_dir/lam_bf
|
||||
#xterm -e gdb $test_dir/lam_bf
|
||||
${test_dir}/lam_bf
|
||||
|
||||
${tools_dir}/grib_dump -O lam_bf_lambert_bf.grib
|
||||
${tools_dir}/grib_dump -O lam_bf_mercator_bf.grib
|
||||
${tools_dir}/grib_dump -O lam_bf_polar_stereographic_bf.grib
|
||||
|
|
|
@ -920,11 +920,14 @@ int main (int argc, char * argv[])
|
|||
char f[128];
|
||||
FILE * fp;
|
||||
size_t size;
|
||||
char * buffer;
|
||||
sprintf (f, "lam_gp_%s.grib", grids[igrid]);
|
||||
const void * buffer = NULL;
|
||||
sprintf (f, "lam_gp_%s.grib", grids[igrid]);
|
||||
fp = fopen (f, "w");
|
||||
GRIB_CHECK (grib_get_message (h, &buffer, &size), 0);
|
||||
fwrite (buffer, 1, size, fp);
|
||||
if (fwrite (buffer, 1, size, fp) != size) {
|
||||
perror(f);
|
||||
return 1;
|
||||
}
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,5 +10,8 @@
|
|||
|
||||
. ./include.sh
|
||||
|
||||
exec $test_dir/lam_gp
|
||||
#xterm -e gdb $test_dir/lam_gp
|
||||
${test_dir}/lam_gp
|
||||
|
||||
${tools_dir}/grib_dump -O lam_gp_lambert_lam.grib
|
||||
${tools_dir}/grib_dump -O lam_gp_mercator_lam.grib
|
||||
${tools_dir}/grib_dump -O lam_gp_polar_stereographic_lam.grib
|
||||
|
|
Loading…
Reference in New Issue