From 29c7bcf839bc3ce48e4d6128d6f29ba73839222e Mon Sep 17 00:00:00 2001 From: Denise Worthen Date: Mon, 15 Apr 2024 17:05:45 -0400 Subject: [PATCH] remove compiler warnings for CICE; fix missing j-loop index (#75) (#944) * fix dummy arguments w/o values * fix missing j-loop in export 4d Resolve compiler warning arising from ice_prescribed_mod due to the intent(out) variable RC not being given an explicit value. This is an operational requirement for NOAA. Fix bug arising from missing j-loop index in ice_import_export --- cicecore/drivers/nuopc/cmeps/ice_import_export.F90 | 8 +++++--- cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 b/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 index 2c7da8d0b..47abb0373 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 @@ -1773,9 +1773,11 @@ subroutine state_setexport_4d(state, fldname, input, index, lmask, ifrac, ungrid end do end do else - do i = ilo, ihi - n = n+1 - dataPtr1d(n) = input(i,j,index,iblk) + do j = jlo, jhi + do i = ilo, ihi + n = n+1 + dataPtr1d(n) = input(i,j,index,iblk) + end do end do end if end do diff --git a/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 b/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 index 0a11ee6ea..b46f22ff7 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 @@ -7,7 +7,8 @@ module ice_prescribed_mod ! Ice/ocean fluxes are set to zero, and ice dynamics are not calculated. ! Regridding and data cycling capabilities are included. - use ESMF + use ESMF, only : ESMF_Clock, ESMF_Mesh, ESMF_SUCCESS, ESMF_FAILURE + use ESMF, only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT #ifndef CESMCOUPLED @@ -23,6 +24,7 @@ subroutine ice_prescribed_init(clock, mesh, rc) type(ESMF_Mesh) , intent(in) :: mesh integer , intent(out) :: rc ! do nothing + rc = ESMF_SUCCESS end subroutine ice_prescribed_init #else