#4209 Support other units than metric when exporting input grid.

This commit is contained in:
Gaute Lindkvist 2019-03-22 10:37:40 +01:00
parent ed88147d53
commit 646d79ce57

View File

@ -331,7 +331,13 @@ bool RifEclipseInputFileTools::exportGrid(const QString& fileName,
return false;
}
ecl_grid_fprintf_grdecl(mainEclGrid, filePtr);
ert_ecl_unit_enum ecl_units = ECL_METRIC_UNITS;
if (eclipseCase->unitsType() == RiaEclipseUnitTools::UNITS_FIELD)
ecl_units = ECL_FIELD_UNITS;
else if (eclipseCase->unitsType() == RiaEclipseUnitTools::UNITS_LAB)
ecl_units = ECL_LAB_UNITS;
ecl_grid_fprintf_grdecl2(mainEclGrid, filePtr, ecl_units);
ecl_grid_free(mainEclGrid);
fclose(filePtr);