MPAS-Dev/MPAS-Model

Name of Thompson MP lookup tables should reflect single or double precision build

Opened this issue · 0 comments

Regardless of the requested precision when building MPAS, when the build_tables executable generates data, the file names are:

MP_THOMPSON_freezeH2O_DATA.DBL
MP_THOMPSON_QIautQS_DATA.DBL
MP_THOMPSON_QRacrQG_DATA.DBL
MP_THOMPSON_QRacrQS_DATA.DBL

I was trying to figure out how to generate the single precision data. But the ".DBL" extension does not identify the precision of the look-up tables.

There is a Makefile macro, PRECISION, in the top-level Makefile.

The src/core_atmosphere/Makefile has a target, utilities, that drops into the utils directory to build the executables.

Perhaps a CPP flag could be added to the build of the build_tables executable. If PRECISION=single, then the suffix could be "SNGL" (or non-existent). If the default double precision is selected, then the suffix would still be "DBL".

Mods would be required where these files are input into MPAS:
./src/core_atmosphere/physics/physics_wrf/module_mp_thompson.F
./src/core_atmosphere/physics/mpas_atmphys_control.F

Obviously, this is not a front-burner item. If the use of CPP flags would be acceptable inside the Fortran files, I could do this. Perhaps this would be a version 8 item?