diff --git a/CICE/CMakeLists.txt b/CICE/CMakeLists.txt index 77b073e..16f2c8a 100644 --- a/CICE/CMakeLists.txt +++ b/CICE/CMakeLists.txt @@ -31,6 +31,7 @@ endif() add_fortran_library(cice mod STATIC ${lib_src_files}) target_compile_definitions(cice PUBLIC "${_cice_defs}") target_link_libraries(cice PUBLIC share cdeps_common esmf) +add_patched_source(cice CICE/cicecore/drivers/nuopc/cmeps/ice_mesh_mod.F90) if(CICE_IO MATCHES "^(NetCDF|PIO)$") target_link_libraries(cice PUBLIC NetCDF::NetCDF_Fortran) diff --git a/CICE/cice_files.cmake b/CICE/cice_files.cmake index e631e30..b95b1a6 100644 --- a/CICE/cice_files.cmake +++ b/CICE/cice_files.cmake @@ -148,5 +148,4 @@ list(APPEND cice_nuopc_cmeps_driver_files CICE/cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90 CICE/cicecore/drivers/nuopc/cmeps/ice_scam.F90 CICE/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 - CICE/cicecore/drivers/nuopc/cmeps/ice_mesh_mod.F90 ) diff --git a/CICE/patches/ice_mesh_mod.F90.patch b/CICE/patches/ice_mesh_mod.F90.patch new file mode 100644 index 0000000..932d6fa --- /dev/null +++ b/CICE/patches/ice_mesh_mod.F90.patch @@ -0,0 +1,21 @@ +--- ice_mesh_mod.F90.old 2023-08-28 08:55:07.881394000 +1000 ++++ ice_mesh_mod.F90.new 2023-09-18 10:11:53.058232000 +1000 +@@ -668,13 +668,13 @@ + n=0 + do iblk = 1, nblocks + this_block = get_block(blocks_ice(iblk),iblk) ++ ilo = this_block%ilo ++ ihi = this_block%ihi ++ jlo = this_block%jlo ++ jhi = this_block%jhi + do j = jlo, jhi +- jlo = this_block%jlo +- jhi = this_block%jhi + do i = ilo, ihi +- ilo = this_block%ilo +- ihi = this_block%ihi +- n = n+1 ++ n = n + 1 + mask_internal = nint(hm(i,j,iblk),kind=dbl_kind) + mask_file = model_mask(n) + if (mask_internal /= mask_file) then