ufs-community / UFS_UTILS

Utilities for the NCEP models.
Other
21 stars 104 forks source link

Add option to build chgres_cube without nemsio and sigio input file support #925

Closed GeorgeGayno-NOAA closed 3 months ago

GeorgeGayno-NOAA commented 4 months ago

Add option to build chgres_cube without support for nemsio or sigio/sfcio input data.

It is suspected that most users only are interested in coldstarting recent cases (within the past few years). Also, users who run chgres_cube for simple cases on their own laptop don't require the option that uses GFS nemsio data as input, and the nemsio library can be burdensome to port.

This will be an option. The build will be modified in a way that nemsio and sigio data can still be used. However, the standard build will not support these data. After a period of six months or so, if users do not complain, then support for these older input data will be completely remove from chgres_cube.

GeorgeGayno-NOAA commented 4 months ago

@DusanJovic-NOAA - can you try my branch? To build without nemsio, do the following:

Turn off the load of nemsio in the build module:

--- a/modulefiles/build.hercules.intel.lua
+++ b/modulefiles/build.hercules.intel.lua
@@ -22,8 +22,8 @@ load(pathJoin("g2", g2_ver))
 ip_ver=os.getenv("ip_ver") or "4.3.0"
 load(pathJoin("ip", ip_ver))

-nemsio_ver=os.getenv("nemsio_ver") or "2.5.4"
-load(pathJoin("nemsio", nemsio_ver))
+--nemsio_ver=os.getenv("nemsio_ver") or "2.5.4"
+--load(pathJoin("nemsio", nemsio_ver))

Then turn off the build of gblevents, which is the other UFS_UTILS program that uses nemsio:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@ option(OROG_NETCDF_TOOLS "Enable building orog_netcdf_tools.fd" OFF)
 option(SFC_CLIMO_GEN "Enable building sfc_climo_gen.fd" ON)
 option(VCOORD_GEN "Enable building vcoord_gen.fd" ON)
 option(FVCOMTOOLS "Enable building fvcom_tools.fd" ON)
-option(GBLEVENTS "Enable building gblevents.fd" ON)
+option(GBLEVENTS "Enable building gblevents.fd" OFF)
 option(CPLD_GRIDGEN "Enable building cpld_gridgen.fd" ON)
 option(WEIGHT_GEN "Enable building weight_gen.fd" ON)

The result will be a chgres_cube that does not work for nemsio data.

DusanJovic-NOAA commented 4 months ago

I tested your branch (feature/chgres_simple) with on my desktop in simple-ufs build without the nemsio library and it works fine.