diff --git a/driver-mct/cime_config/config_component.xml b/driver-mct/cime_config/config_component.xml index 0229937eecd7..7c8e83fa700b 100644 --- a/driver-mct/cime_config/config_component.xml +++ b/driver-mct/cime_config/config_component.xml @@ -2629,7 +2629,7 @@ char - netcdf,pnetcdf,netcdf4p,netcdf4c,adios,default + netcdf,pnetcdf,netcdf4p,netcdf4c,adios,hdf5,default run_pio env_run.xml pio io type diff --git a/driver-moab/cime_config/config_component.xml b/driver-moab/cime_config/config_component.xml index e3d65462a546..95c53c1d828b 100644 --- a/driver-moab/cime_config/config_component.xml +++ b/driver-moab/cime_config/config_component.xml @@ -2480,7 +2480,7 @@ char - netcdf,pnetcdf,netcdf4p,netcdf4c,adios,default + netcdf,pnetcdf,netcdf4p,netcdf4c,adios,hdf5,default run_pio env_run.xml pio io type diff --git a/share/build/buildlib.spio b/share/build/buildlib.spio index 8f0c52d97a81..d65d55479361 100755 --- a/share/build/buildlib.spio +++ b/share/build/buildlib.spio @@ -132,8 +132,10 @@ def buildlib(bldroot, installpath, case): # elif which_h5dump is not None: # os.environ["HDF5"] = os.path.dirname(os.path.dirname(which_h5dump)) - if "WITH_HDF5_SCORPIO" in os.environ: - cmake_opts += "-DWITH_HDF5:BOOL=ON " + # Before E3SM upgrades scorpio submodule to 1.5.0 or higher, keep WITH_HDF5 + # CMake option OFF by default. + # if "HDF5_ROOT" in os.environ: + # cmake_opts += "-DWITH_HDF5:BOOL=ON " # Same deal with libz and szip if "ZLIB_ROOT" in os.environ: @@ -197,10 +199,12 @@ def buildlib(bldroot, installpath, case): netcdf4_string = "NetCDF_C_HAS_PARALLEL:BOOL=TRUE" adios_string = "WITH_ADIOS2:BOOL=ON" + hdf5_string = "WITH_HDF5:BOOL=ON" expect_string_found = False pnetcdf_found = False netcdf4_parallel_found = False adios_found = False + hdf5_found = False cache_file = open(os.path.join(pio_bld_dir,"CMakeCache.txt"), "r") for line in cache_file: @@ -212,6 +216,8 @@ def buildlib(bldroot, installpath, case): netcdf4_parallel_found = True if re.search(adios_string, line): adios_found = True + if re.search(hdf5_string, line): + hdf5_found = True if pio_version == 1: installed_lib = os.path.join(installpath, "lib", "libpio.a") @@ -268,6 +274,8 @@ def buildlib(bldroot, installpath, case): valid_values += ",netcdf4p,netcdf4c" if adios_found: valid_values += ",adios" + if hdf5_found: + valid_values += ",hdf5" _set_pio_valid_values(case, valid_values) diff --git a/share/util/shr_pio_mod.F90 b/share/util/shr_pio_mod.F90 index d69c3f5811be..ed7dfdaa2ed8 100644 --- a/share/util/shr_pio_mod.F90 +++ b/share/util/shr_pio_mod.F90 @@ -672,6 +672,8 @@ subroutine shr_pio_getiotypefromname(typename, iotype, defaulttype) #ifndef PIO1 else if ( typename .eq. 'ADIOS') then iotype = pio_iotype_adios + else if ( typename .eq. 'HDF5') then + iotype = pio_iotype_hdf5 #endif else if ( typename .eq. 'NOTHING') then iotype = defaulttype