CICE-Consortium / CICE

Development repository for the CICE sea-ice model
Other
57 stars 131 forks source link

Fix for ice_mesh_mod with grid variables removed #929

Closed dabail10 closed 8 months ago

dabail10 commented 8 months ago

For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium, please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers

PR checklist

DeniseWorthen commented 8 months ago

@dabail10 Would you be willing to combine this with a small change on our side? This is needed because NCO requires that warnings not be suppressed, and there is a single warning generated from CICE

CICE-interface/CICE/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90(21): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.   [RC]                                                                                                                           
  subroutine ice_prescribed_init(clock, mesh, rc)

This change resolves that warning and I added the use only statements for ESMF.

diff --git a/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 b/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90
index 0a11ee6e..b46f22ff 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