MeteoFrance lam OMM: improve test code

This commit is contained in:
Shahram Najm 2018-05-10 12:12:44 +01:00
parent b7a91f20b4
commit aa6f393037
4 changed files with 22 additions and 10 deletions

View File

@ -717,11 +717,14 @@ int main (int argc, char * argv[])
char f[128];
FILE * fp;
size_t size;
char * buffer;
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);
}

View File

@ -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

View File

@ -920,11 +920,14 @@ int main (int argc, char * argv[])
char f[128];
FILE * fp;
size_t size;
char * buffer;
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);
}

View File

@ -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