Write in $OUTPUT_Z_LOWRIS_DIR/MP_coeff the MP coefficients.
- Parametri
-
[in] | dbz | - DBZ object with MP coefficients |
Definizione alla linea 450 del file assets.cpp.
Referenzia radarelab::File::open().
452 const char* dirname = getenv(
"OUTPUT_Z_LOWRIS_DIR");
453 if (!dirname)
throw runtime_error(
"OUTPUT_Z_LOWRIS_DIR is not set");
454 string fname(dirname);
455 fname +=
"/MP_coeff";
456 File out(logging_category);
457 out.open(fname,
"wb",
"MP coefficients");
459 unsigned char MP_coeff[2];
460 MP_coeff[0]=(
unsigned char)(dbz.aMP/10);
461 MP_coeff[1]=(
unsigned char)(dbz.bMP*10);
463 fwrite(MP_coeff,
sizeof(MP_coeff), 1, out);
Open a file taking its name from a given env variable.