diff --git a/cice.setup b/cice.setup index 0e574f803..a855020c5 100755 --- a/cice.setup +++ b/cice.setup @@ -1173,7 +1173,7 @@ cp ${rundir}/compile/*.{gcno,gcda} ${testname_base}/codecov_output/ EOF cat >> ${tsdir}/report_lcov.csh << EOF -lcov --gcov-tool gcov -c -d ${rundir}/compile -o ${testname_base}/lcov.info +lcov --gcov-tool gcov -c --rc geninfo_unexecuted_blocks=1 -d ${rundir}/compile -o ${testname_base}/lcov.info if (-s ${testname_base}/lcov.info) then set lcovalist = "\${lcovalist} -a ${testname_base}/lcov.info" endif diff --git a/cicecore/cicedyn/general/ice_flux.F90 b/cicecore/cicedyn/general/ice_flux.F90 index f1c6c3be6..6378db6eb 100644 --- a/cicecore/cicedyn/general/ice_flux.F90 +++ b/cicecore/cicedyn/general/ice_flux.F90 @@ -1209,7 +1209,7 @@ subroutine scale_fluxes (nx_block, ny_block, & real (kind=dbl_kind) :: & ar, & ! 1/aice stefan_boltzmann, & - Tffresh + Tffresh, puny integer (kind=int_kind) :: & i, j ! horizontal indices @@ -1217,7 +1217,7 @@ subroutine scale_fluxes (nx_block, ny_block, & character(len=*), parameter :: subname = '(scale_fluxes)' call icepack_query_parameters(stefan_boltzmann_out=stefan_boltzmann, & - Tffresh_out=Tffresh) + Tffresh_out=Tffresh, puny_out=puny) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & file=__FILE__, line=__LINE__) @@ -1231,6 +1231,9 @@ subroutine scale_fluxes (nx_block, ny_block, & fsens (i,j) = fsens (i,j) * ar flat (i,j) = flat (i,j) * ar fswabs (i,j) = fswabs (i,j) * ar + ! Special case where aice_init was zero and aice > 0. + if (flwout(i,j) > -puny) & + flwout (i,j) = -stefan_boltzmann *(Tf(i,j) + Tffresh)**4 flwout (i,j) = flwout (i,j) * ar evap (i,j) = evap (i,j) * ar Tref (i,j) = Tref (i,j) * ar diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 5cbaedcb6..91293db42 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -1267,7 +1267,7 @@ subroutine input_data endif abort_list = trim(abort_list)//":1" endif - + if (history_format /= 'cdf1' .and. & history_format /= 'cdf2' .and. & history_format /= 'cdf5' .and. & diff --git a/cicecore/cicedyn/infrastructure/ice_grid.F90 b/cicecore/cicedyn/infrastructure/ice_grid.F90 index 53082aeaf..a1dee3e33 100644 --- a/cicecore/cicedyn/infrastructure/ice_grid.F90 +++ b/cicecore/cicedyn/infrastructure/ice_grid.F90 @@ -351,12 +351,12 @@ subroutine init_grid1 trim(grid_type) == 'regional' ) then if (trim(grid_format) == 'nc') then - + fieldname='ulat' call ice_open_nc(grid_file,fid_grid) call ice_read_global_nc(fid_grid,1,fieldname,work_g1,.true.) call ice_close_nc(fid_grid) - + ! mask variable name might be kmt or mask, check both call ice_open_nc(kmt_file,fid_kmt) #ifdef USE_NETCDF @@ -364,7 +364,7 @@ subroutine init_grid1 status = nf90_inq_varid(fid_kmt, 'kmt', varid) if (status == nf90_noerr) then mask_fieldname = 'kmt' - else + else status = nf90_inq_varid(fid_kmt, 'mask', varid) call ice_check_nc(status, subname//' ERROR: does '//trim(kmt_file)//& ' contain "kmt" or "mask" variable?', file=__FILE__, line=__LINE__) @@ -671,7 +671,7 @@ subroutine init_grid2 enddo enddo !$OMP END PARALLEL DO - endif + endif if (trim(grid_type) == 'regional' .and. & (.not. (l_readCenter))) then @@ -799,7 +799,7 @@ subroutine kmtmask enddo enddo !$OMP END PARALLEL DO - + if (my_task == master_task) then close (nu_kmt) endif @@ -888,14 +888,14 @@ subroutine kmtmask_nc i, j, iblk, & ilo,ihi,jlo,jhi, & ! beginning and end of physical domain fid_kmt ! file id for netCDF kmt file - + logical (kind=log_kind) :: diag real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks) :: & work1 type (block) :: & - this_block ! block information for current block + this_block ! block information for current block character(len=*), parameter :: subname = '(kmtmask_nc)' @@ -905,7 +905,7 @@ subroutine kmtmask_nc kmt(:,:,:) = c0 call ice_open_nc(kmt_file,fid_kmt) - + call ice_read_nc(fid_kmt,1,mask_fieldname,kmt,diag, & field_loc=field_loc_center, & field_type=field_type_scalar) @@ -968,7 +968,7 @@ subroutine popgrid_nc work_g1 integer(kind=int_kind) :: & - varid, status + varid, status character(len=*), parameter :: subname = '(popgrid_nc)' @@ -981,7 +981,7 @@ subroutine popgrid_nc call ice_open_nc(grid_file,fid_grid) diag = .true. ! write diagnostic info - + !----------------------------------------------------------------- ! lat, lon, angle !----------------------------------------------------------------- diff --git a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 index d4a43a3a9..8ced569a5 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 @@ -1030,7 +1030,9 @@ subroutine ModelAdvance(gcomp, rc) character(char_len_long) :: restart_date character(char_len_long) :: restart_filename logical :: isPresent, isSet +#ifndef CESMCOUPLED logical :: write_restartfh +#endif character(len=*),parameter :: subname=trim(modName)//':(ModelAdvance) ' character(char_len_long) :: msgString !-------------------------------- @@ -1301,10 +1303,12 @@ subroutine ModelSetRunClock(gcomp, rc) character(len=256) :: stop_option ! Stop option units integer :: stop_n ! Number until stop interval integer :: stop_ymd ! Stop date (YYYYMMDD) - integer :: dtime type(ESMF_ALARM) :: stop_alarm character(len=128) :: name integer :: alarmcount +#ifndef CESMCOUPLED + integer :: dtime +#endif character(len=*),parameter :: subname=trim(modName)//':(ModelSetRunClock) ' !-------------------------------- diff --git a/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 b/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 index f27c34fdd..7113fa915 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 @@ -6,7 +6,7 @@ module ice_prescribed_mod ! prescribed. Air/ice fluxes are computed to get surface temperature, ! Ice/ocean fluxes are set to zero, and ice dynamics are not calculated. ! Regridding and data cycling capabilities are included. - + ! Note (8/8/2024): This code is dependent on CDEPS (to input ice data). ! In the interests of cleaner code, drivers/nuopc/cmeps now is too. ! If problematic, please see https://github.com/CICE-Consortium/CICE/pull/964 for alternatives. @@ -215,7 +215,7 @@ subroutine ice_prescribed_init(gcomp, clock, mesh, rc) ! If need initial cice values for coupling call ice_prescribed_run(idate, msec) #endif - + end if ! end of if prescribed ice mode end subroutine ice_prescribed_init diff --git a/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 b/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 index 94a2f8b23..0a3a72840 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 @@ -926,7 +926,7 @@ subroutine alarmInit( clock, alarm, option, & if (chkerr(rc,__LINE__,u_FILE_u)) return call ESMF_ClockGetAlarm(clock, alarmname="alarm_stop", alarm=alarm, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call ESMF_AlarmGet(alarm, ringTime=NextAlarm, rc=rc) + call ESMF_AlarmGet(alarm, ringTime=NextAlarm, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return case default diff --git a/configuration/scripts/machines/Macros.derecho_gnu b/configuration/scripts/machines/Macros.derecho_gnu index e42e06f06..2a4e62424 100644 --- a/configuration/scripts/machines/Macros.derecho_gnu +++ b/configuration/scripts/machines/Macros.derecho_gnu @@ -11,20 +11,16 @@ FREEFLAGS := -ffree-form FFLAGS := -fconvert=big-endian -fbacktrace -ffree-line-length-none -fallow-argument-mismatch FFLAGS_NOOPT:= -O0 -ifeq ($(ICE_BLDDEBUG), true) - FFLAGS += -O0 -g -fcheck=bounds -finit-real=nan -fimplicit-none -ffpe-trap=invalid,zero,overflow --std f2008 -# FFLAGS += -O0 -g -fcheck=all -finit-real=snan -fimplicit-none -ffpe-trap=invalid,zero,overflow - CFLAGS += -O0 -endif - ifeq ($(ICE_COVERAGE), true) FFLAGS += -O0 -g -fprofile-arcs -ftest-coverage CFLAGS += -O0 -g -coverage LDFLAGS += -g -ftest-coverage -fprofile-arcs -endif - -ifneq ($(ICE_BLDDEBUG), true) -ifneq ($(ICE_COVERAGE), true) +else +ifeq ($(ICE_BLDDEBUG), true) + FFLAGS += -O0 -g -fcheck=bounds -finit-real=nan -fimplicit-none -ffpe-trap=invalid,zero,overflow --std f2008 +# FFLAGS += -O0 -g -fcheck=all -finit-real=snan -fimplicit-none -ffpe-trap=invalid,zero,overflow + CFLAGS += -O0 +else FFLAGS += -O2 CFLAGS += -O2 endif diff --git a/configuration/scripts/machines/env.derecho_gnu b/configuration/scripts/machines/env.derecho_gnu index 5c4ca46f0..330509636 100644 --- a/configuration/scripts/machines/env.derecho_gnu +++ b/configuration/scripts/machines/env.derecho_gnu @@ -10,30 +10,30 @@ if ("$inp" != "-nomodules") then source ${MODULESHOME}/init/csh module --force purge -module load ncarenv/23.06 +module load ncarenv/24.12 +module reset module load craype -module load gcc/12.2.0 +module load gcc/12.4.0 module load ncarcompilers -module load cray-mpich/8.1.25 +module load cray-mpich/8.1.29 module load netcdf/4.9.2 -#module load hdf5/1.12.2 -#module load netcdf-mpi/4.9.2 - -module load cray-libsci/23.02.1.1 +module load cray-libsci/24.03.0 if ($?ICE_IOTYPE) then if ($ICE_IOTYPE =~ pio*) then module unload netcdf module load netcdf-mpi/4.9.2 - module load parallel-netcdf/1.12.3 + module load parallel-netcdf/1.14.0 if ($ICE_IOTYPE == "pio1") then module load parallelio/1.10.1 else - module load parallelio/2.6.2 + module load parallelio/2.6.3 endif endif endif +module load lcov + if ($?ICE_BFBTYPE) then if ($ICE_BFBTYPE =~ qcchk*) then module load conda @@ -61,7 +61,7 @@ setenv OMP_STACKSIZE 64M setenv ICE_MACHINE_MACHNAME derecho setenv ICE_MACHINE_MACHINFO "HPE Cray EX Milan Slingshot 11" setenv ICE_MACHINE_ENVNAME gnu -setenv ICE_MACHINE_ENVINFO "gcc 12.2.0 20220819, cray-mpich 8.1.25, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.2" +setenv ICE_MACHINE_ENVINFO "gcc 12.4.0, cray-mpich 8.1.29, netcdf4.9.2, pnetcdf1.14.0, pio1.10.1, pio2.6.3" setenv ICE_MACHINE_MAKE gmake setenv ICE_MACHINE_WKDIR /glade/derecho/scratch/$user/CICE_RUNS setenv ICE_MACHINE_INPUTDATA /glade/campaign/cesm/development/pcwg diff --git a/configuration/scripts/machines/env.perlmutter_cray b/configuration/scripts/machines/env.perlmutter_cray index 04ee3ce94..e1a9b9e14 100644 --- a/configuration/scripts/machines/env.perlmutter_cray +++ b/configuration/scripts/machines/env.perlmutter_cray @@ -18,16 +18,16 @@ source ${MODULESHOME}/init/csh module load cpu module load PrgEnv-cray module unload cce -module load cce/15.0.1 +module load cce/17.0.0 module unload cray-mpich -module load cray-mpich/8.1.25 +module load cray-mpich/8.1.28 module unload cray-netcdf module unload cray-hdf5 -module load cray-hdf5/1.12.2.3 -module load cray-netcdf/4.9.0.3 +module load cray-hdf5/1.12.2.9 +module load cray-netcdf/4.9.0.9 -setenv NETCDF_PATH ${NETCDF_DIR} +#setenv NETCDF_PATH ${NETCDF_DIR} limit coredumpsize unlimited limit stacksize unlimited setenv OMP_STACKSIZE 128M @@ -38,7 +38,7 @@ endif setenv ICE_MACHINE_MACHNAME perlmutter setenv ICE_MACHINE_MACHINFO "HPE Cray EX AMD EPYC 7763 Milan, Slingshot-11 Interconnect" setenv ICE_MACHINE_ENVNAME cray -setenv ICE_MACHINE_ENVINFO "Cray clang/Fortran 15.0.1, cray-mpich/8.1.25, netcdf/4.9.0.3" +setenv ICE_MACHINE_ENVINFO "Cray clang/Fortran 17.0.0, cray-mpich/8.1.28, netcdf/4.9.0.9" setenv ICE_MACHINE_MAKE gmake setenv ICE_MACHINE_WKDIR $SCRATCH/CICE_RUNS setenv ICE_MACHINE_INPUTDATA /global/cfs/cdirs/e3sm/tcraig/cice-consortium diff --git a/configuration/scripts/machines/env.perlmutter_gnu b/configuration/scripts/machines/env.perlmutter_gnu index 42e510e55..8f4ce910c 100644 --- a/configuration/scripts/machines/env.perlmutter_gnu +++ b/configuration/scripts/machines/env.perlmutter_gnu @@ -15,19 +15,21 @@ source ${MODULESHOME}/init/csh #module unload PrgEnv-intel #module unload PrgEnv-nvidia #module unload gpu +module unload darshan module load cpu -module load PrgEnv-gnu +module load PrgEnv-gnu/8.5.0 module unload gcc -module load gcc/11.2.0 +module unload gcc-native +module load gcc-native/12.3 module unload cray-mpich -module load cray-mpich/8.1.25 +module load cray-mpich/8.1.28 module unload cray-netcdf module unload cray-hdf5 -module load cray-hdf5/1.12.2.3 -module load cray-netcdf/4.9.0.3 +module load cray-hdf5/1.12.2.9 +module load cray-netcdf/4.9.0.9 -setenv NETCDF_PATH ${NETCDF_DIR} +#setenv NETCDF_PATH ${NETCDF_DIR} limit coredumpsize unlimited limit stacksize unlimited setenv OMP_STACKSIZE 128M @@ -38,7 +40,7 @@ endif setenv ICE_MACHINE_MACHNAME perlmutter setenv ICE_MACHINE_MACHINFO "HPE Cray EX AMD EPYC 7763 Milan, Slingshot-11 Interconnect" setenv ICE_MACHINE_ENVNAME gnu -setenv ICE_MACHINE_ENVINFO "gnu c/fortran 11.2.0 20210728, cray-mpich/8.1.25, netcdf/4.9.0.3" +setenv ICE_MACHINE_ENVINFO "gnu c/fortran 12.3.0, cray-mpich/8.1.28, netcdf/4.9.0.9" setenv ICE_MACHINE_MAKE gmake setenv ICE_MACHINE_WKDIR $SCRATCH/CICE_RUNS setenv ICE_MACHINE_INPUTDATA /global/cfs/cdirs/e3sm/tcraig/cice-consortium diff --git a/configuration/scripts/machines/env.perlmutter_intel b/configuration/scripts/machines/env.perlmutter_intel index 7ecdc0f96..32b022d9a 100644 --- a/configuration/scripts/machines/env.perlmutter_intel +++ b/configuration/scripts/machines/env.perlmutter_intel @@ -16,18 +16,18 @@ source ${MODULESHOME}/init/csh #module unload PrgEnv-nvidia #module unload gpu module load cpu -module load PrgEnv-intel +module load PrgEnv-intel/8.5.0 module unload intel -module load intel/2023.1.0 +module load intel/2023.2.0 module unload cray-mpich -module load cray-mpich/8.1.25 +module load cray-mpich/8.1.28 module unload cray-netcdf module unload cray-hdf5 -module load cray-hdf5/1.12.2.3 -module load cray-netcdf/4.9.0.3 +module load cray-hdf5/1.12.2.9 +module load cray-netcdf/4.9.0.9 -setenv NETCDF_PATH ${NETCDF_DIR} +#setenv NETCDF_PATH ${NETCDF_DIR} limit coredumpsize unlimited limit stacksize unlimited setenv OMP_STACKSIZE 128M @@ -38,7 +38,7 @@ endif setenv ICE_MACHINE_MACHNAME perlmutter setenv ICE_MACHINE_MACHINFO "HPE Cray EX AMD EPYC 7763 Milan, Slingshot-11 Interconnect" setenv ICE_MACHINE_ENVNAME intel -setenv ICE_MACHINE_ENVINFO "ifort 2021.9.0 20230302, Intel oneAPI DPC++/C++ 2023.1.0 (2023.1.0.20230320), cray-mpich/8.1.25, netcdf/4.9.0.3" +setenv ICE_MACHINE_ENVINFO "ifort 2021.10.0 20230609, Intel oneAPI DPC++/C++ Compiler 2023.2.0 (2023.2.0.20230622)), cray-mpich/8.1.28, netcdf/4.9.0.9" setenv ICE_MACHINE_MAKE gmake setenv ICE_MACHINE_WKDIR $SCRATCH/CICE_RUNS setenv ICE_MACHINE_INPUTDATA /global/cfs/cdirs/e3sm/tcraig/cice-consortium diff --git a/configuration/scripts/tests/cice.lcov.csh b/configuration/scripts/tests/cice.lcov.csh index 5772833d1..39e16aa45 100644 --- a/configuration/scripts/tests/cice.lcov.csh +++ b/configuration/scripts/tests/cice.lcov.csh @@ -14,7 +14,7 @@ cp -p -r ${lcovhtmldir} ${lcovrepo}/ cd ${lcovrepo} set covp0 = `grep message coverage.json | cut -d : -f 2 | cut -d \" -f 2 | cut -d % -f 1` -set covp = `grep -i headerCovTableEntry ${lcovhtmldir}/index.html | grep % | head -1 | cut -d \> -f 2 | cut -d % -f 1` +set covp = `grep -i headerCovTableEntry ${lcovhtmldir}/index.html | grep % | head -1 | cut -d \> -f 2 | cut -d \& -f 1` set covpi = `echo $covp | cut -d . -f 1` set lcovhtmlname = "${covpi}%:${report_name}" diff --git a/icepack b/icepack index 379252056..43ead5638 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 3792520561cf9419082ef41f9f0dffd03edf2e43 +Subproject commit 43ead56380bf11ecad66f165dcd736ed0c278763