diff --git a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90 b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90 index 7d29fc4cc..92df8dad8 100644 --- a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90 @@ -152,11 +152,26 @@ subroutine ice_write_hist (ns) if (history_format == 'cdf1') then iflag = nf90_clobber elseif (history_format == 'cdf2') then +#ifdef NO_CDF2 + call abort_ice(subname//' ERROR: history_format cdf2 not available ', & + file=__FILE__, line=__LINE__) +#else iflag = ior(nf90_clobber,nf90_64bit_offset) +#endif elseif (history_format == 'cdf5') then +#ifdef NO_CDF5 + call abort_ice(subname//' ERROR: history_format cdf5 not available ', & + file=__FILE__, line=__LINE__) +#else iflag = ior(nf90_clobber,nf90_64bit_data) +#endif elseif (history_format == 'hdf5') then +#ifdef NO_HDF5 + call abort_ice(subname//' ERROR: history_format hdf5 not available ', & + file=__FILE__, line=__LINE__) +#else iflag = ior(nf90_clobber,nf90_netcdf4) +#endif else call abort_ice(subname//' ERROR: history_format not allowed for '//trim(history_format), & file=__FILE__, line=__LINE__) @@ -1192,6 +1207,12 @@ subroutine ice_hist_field_def(ncid, hfield, lprecision, dimids, ns) status = nf90_def_var(ncid, hfield%vname, lprecision, dimids, varid) call ice_check_nc(status, subname//' ERROR: defining var '//trim(hfield%vname),file=__FILE__,line=__LINE__) +#ifdef NO_HDF5 + if (history_format=='hdf5') then + call abort_ice(subname//' ERROR: history_format hdf5 not available ', & + file=__FILE__, line=__LINE__) + endif +#else if (history_format=='hdf5' .and. size(dimids)>1) then if (dimids(1)==imtid .and. dimids(2)==jmtid) then chunks(1)=history_chunksize(1) @@ -1208,6 +1229,7 @@ subroutine ice_hist_field_def(ncid, hfield, lprecision, dimids, ns) status = nf90_def_var_deflate(ncid, varid, shuffle=0, deflate=1, deflate_level=history_deflate) call ice_check_nc(status, subname//' ERROR deflating var '//trim(hfield%vname), file=__FILE__, line=__LINE__) endif +#endif ! add attributes status = nf90_put_att(ncid,varid,'units', hfield%vunit) @@ -1335,6 +1357,12 @@ subroutine ice_hist_coord_def(ncid, coord, lprecision, dimids, varid) status = nf90_def_var(ncid, coord%short_name, lprecision, dimids, varid) call ice_check_nc(status, subname//' ERROR: defining coord '//coord%short_name,file=__FILE__,line=__LINE__) +#ifdef NO_HDF5 + if (history_format=='hdf5') then + call abort_ice(subname//' ERROR: history_format hdf5 not available ', & + file=__FILE__, line=__LINE__) + endif +#else if (history_format=='hdf5' .and. size(dimids)>1) then if (dimids(1)==imtid .and. dimids(2)==jmtid) then chunks(1)=history_chunksize(1) @@ -1351,6 +1379,7 @@ subroutine ice_hist_coord_def(ncid, coord, lprecision, dimids, varid) status=nf90_def_var_deflate(ncid, varid, shuffle=0, deflate=1, deflate_level=history_deflate) call ice_check_nc(status, subname//' ERROR deflating var '//trim(coord%short_name), file=__FILE__, line=__LINE__) endif +#endif status = nf90_put_att(ncid,varid,'long_name',trim(coord%long_name)) call ice_check_nc(status, subname// ' ERROR: defining long_name for '//coord%short_name, & diff --git a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 index e9be45481..9bf3b1d8a 100644 --- a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 @@ -221,11 +221,26 @@ subroutine init_restart_write(filename_spec) if (restart_format == 'cdf1') then iflag = nf90_clobber elseif (restart_format == 'cdf2') then +#ifdef NO_CDF2 + call abort_ice(subname//' ERROR: restart_format cdf2 not available ', & + file=__FILE__, line=__LINE__) +#else iflag = ior(nf90_clobber,nf90_64bit_offset) +#endif elseif (restart_format == 'cdf5') then +#ifdef NO_CDF5 + call abort_ice(subname//' ERROR: restart_format cdf5 not available ', & + file=__FILE__, line=__LINE__) +#else iflag = ior(nf90_clobber,nf90_64bit_data) +#endif elseif (restart_format == 'hdf5') then +#ifdef NO_HDF5 + call abort_ice(subname//' ERROR: restart_format hdf5 not available ', & + file=__FILE__, line=__LINE__) +#else iflag = ior(nf90_clobber,nf90_netcdf4) +#endif else call abort_ice(subname//' ERROR: restart_format not allowed for '//trim(restart_format), & file=__FILE__, line=__LINE__) @@ -894,6 +909,12 @@ subroutine define_rest_field(ncid, vname, dims) status = nf90_def_var(ncid,trim(vname),nf90_double,dims,varid) call ice_check_nc(status, subname//' ERROR: def var '//trim(vname), file=__FILE__, line=__LINE__) +#ifdef NO_HDF5 + if (restart_format=='hdf5') then + call abort_ice(subname//' ERROR: restart_format hdf5 not available ', & + file=__FILE__, line=__LINE__) + endif +#else if (restart_format=='hdf5' .and. size(dims)>1) then if (dims(1)==dimid_ni .and. dims(2)==dimid_nj) then chunks(1)=restart_chunksize(1) @@ -910,6 +931,7 @@ subroutine define_rest_field(ncid, vname, dims) status=nf90_def_var_deflate(ncid, varid, shuffle=0, deflate=1, deflate_level=restart_deflate) call ice_check_nc(status, subname//' ERROR deflating var '//trim(vname), file=__FILE__, line=__LINE__) endif +#endif #else call abort_ice(subname//' ERROR: USE_NETCDF cpp not defined', & diff --git a/configuration/scripts/machines/Macros.compy_intel b/configuration/scripts/machines/Macros.compy_intel index 604337f59..eabdbc00a 100644 --- a/configuration/scripts/machines/Macros.compy_intel +++ b/configuration/scripts/machines/Macros.compy_intel @@ -3,7 +3,7 @@ #============================================================================== CPP := fpp -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_HDF5 ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 diff --git a/configuration/scripts/machines/Macros.gaffney_gnu b/configuration/scripts/machines/Macros.gaffney_gnu index 4ae235bc9..4d4c53971 100644 --- a/configuration/scripts/machines/Macros.gaffney_gnu +++ b/configuration/scripts/machines/Macros.gaffney_gnu @@ -3,7 +3,7 @@ #============================================================================== CPP := ftn -E -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_CDF5 ${ICE_CPPDEFS} CFLAGS := -c FIXEDFLAGS := -ffixed-line-length-132 diff --git a/configuration/scripts/machines/Macros.gaffney_intel b/configuration/scripts/machines/Macros.gaffney_intel index 7eccd36da..03c3c3251 100644 --- a/configuration/scripts/machines/Macros.gaffney_intel +++ b/configuration/scripts/machines/Macros.gaffney_intel @@ -3,7 +3,7 @@ #============================================================================== CPP := fpp -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_CDF5 ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 diff --git a/configuration/scripts/machines/Macros.koehr_intel b/configuration/scripts/machines/Macros.koehr_intel index aee4b31a8..cd593e33b 100644 --- a/configuration/scripts/machines/Macros.koehr_intel +++ b/configuration/scripts/machines/Macros.koehr_intel @@ -3,7 +3,7 @@ #============================================================================== CPP := fpp -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_CDF5 ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 diff --git a/configuration/scripts/machines/Macros.mustang_intel18 b/configuration/scripts/machines/Macros.mustang_intel18 index 28c1c1964..03a2b8891 100644 --- a/configuration/scripts/machines/Macros.mustang_intel18 +++ b/configuration/scripts/machines/Macros.mustang_intel18 @@ -3,7 +3,7 @@ #============================================================================== CPP := fpp -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_CDF5 ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 diff --git a/configuration/scripts/machines/Macros.mustang_intel19 b/configuration/scripts/machines/Macros.mustang_intel19 index 28c1c1964..03a2b8891 100644 --- a/configuration/scripts/machines/Macros.mustang_intel19 +++ b/configuration/scripts/machines/Macros.mustang_intel19 @@ -3,7 +3,7 @@ #============================================================================== CPP := fpp -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_CDF5 ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 diff --git a/configuration/scripts/machines/Macros.mustang_intel20 b/configuration/scripts/machines/Macros.mustang_intel20 index 28c1c1964..03a2b8891 100644 --- a/configuration/scripts/machines/Macros.mustang_intel20 +++ b/configuration/scripts/machines/Macros.mustang_intel20 @@ -3,7 +3,7 @@ #============================================================================== CPP := fpp -CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CPPDEFS := -DFORTRANUNDERSCORE -DNO_CDF5 ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 diff --git a/configuration/scripts/machines/env.hera_intel b/configuration/scripts/machines/env.hera_intel index 6698c0c2c..9bab973b6 100644 --- a/configuration/scripts/machines/env.hera_intel +++ b/configuration/scripts/machines/env.hera_intel @@ -10,8 +10,9 @@ if ("$inp" != "-nomodules") then source /etc/profile.d/modules.csh #module list module purge -module load intel/18.0.5.274 -module load impi/2018.0.4 +module load gnu/13.2.0 +module load intel/2023.2.0 +module load impi/2023.2.0 module load netcdf/4.7.0 #module list @@ -23,7 +24,7 @@ setenv OMP_STACKSIZE 64M setenv ICE_MACHINE_MACHNAME hera setenv ICE_MACHINE_MACHINFO "Cray CS500 Intel SkyLake 2.4GHz, Infiniband HDR" setenv ICE_MACHINE_ENVNAME intel -setenv ICE_MACHINE_ENVINFO "ifort 18.0.5 20180823, intelmpi/2018.0.4, netcdf/4.7.0" +setenv ICE_MACHINE_ENVINFO "icc/ifort 2021.10.0 20230609, intelmpi/2023.2.0, netcdf/4.7.0" setenv ICE_MACHINE_MAKE gmake setenv ICE_MACHINE_WKDIR $HOME/scratch/CICE_RUNS setenv ICE_MACHINE_INPUTDATA /home/Anthony.Craig/scratch/CICE_INPUTDATA diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 405e64dc1..8e7b154db 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -33,7 +33,10 @@ can be found in :ref:`cicecpps`. The following CPPs are available. "ESMF_INTERFACE", "Turns on ESMF support in a subset of driver code. Also USE_ESMF_LIB and USE_ESMF_METADATA" "FORTRANUNDERSCORE", "Used in ice_shr_reprosum86.c to support Fortran-C interfaces. This should generally be turned on at all times. There are other CPPs (FORTRANDOUBULEUNDERSCORE, FORTRANCAPS, etc) in ice_shr_reprosum.c that are generally not used in CICE but could be useful if problems arise in the Fortran-C interfaces" "GPTL", "Turns on GPTL initialization if needed for PIO" + "NO_CDF2", "Turns off support for netcdf cdf2 (nf90_64bit_offset)" + "NO_CDF5", "Turns off support for netcdf cdf5 (nf90_64bit_data)" "NO_F2003", "Turns off some Fortran 2003 features" + "NO_HDF2", "Turns off support for netcdf hdf5 (netcdf4 including chunking and compression)" "NO_I8", "Converts integer*8 to integer*4. This could have adverse affects for certain algorithms including the ddpdd implementation associated with the ``bfbflag``" "NO_R16", "Converts real*16 to real*8. This could have adverse affects for certain algorithms including the lsum16 implementation associated with the ``bfbflag``" "NO_SNICARHC", "Does not compile hardcoded (HC) 5 band snicar tables tables needed by ``shortwave=dEdd_snicar_ad``. May reduce compile time." diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index 4f349c264..91909082c 100644 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -1220,7 +1220,10 @@ and (https://github.com/NCAR/ParallelIO). netCDF requires CICE compilation with a netCDF library built externally. PIO requires CICE compilation with a PIO and netCDF library built externally. Both netCDF and PIO can be built with many options which may require additional libraries -such as MPI, hdf5, or pnetCDF. +such as MPI, hdf5, or pnetCDF. There are CPPs that will deprecate cdf2, +cdf5, and hdf5 support should the netcdf library be built without those features. +Those CPPs are ``NO_CDF2``, ``NO_CDF5``, and ``NO_HDF5``. Those can be added +to the Macros machine file explicity when needed. .. _history: diff --git a/doc/source/user_guide/ug_running.rst b/doc/source/user_guide/ug_running.rst index 9337b3c47..7ac37f16e 100644 --- a/doc/source/user_guide/ug_running.rst +++ b/doc/source/user_guide/ug_running.rst @@ -49,6 +49,7 @@ The Consortium has tested the following compilers at some point, - Intel ifort 2021.6.0 - Intel ifort 2021.8.0 - Intel ifort 2021.9.0 +- Intel ifort 2021.10.0 - Intel ifort 2022.2.1 - PGI 16.10.0 - PGI 19.9-0 @@ -86,6 +87,7 @@ The Consortium has tested the following MPI implementations and versions, - MPICH 8.1.14 - MPICH 8.1.21 - MPICH 8.1.25 +- MPICH 8.1.26 - Intel MPI 18.0.1 - Intel MPI 18.0.4 - Intel MPI 2019 Update 6