From 18e4f385f3b47d6a75b20b1a40e2cfa239eb92cb Mon Sep 17 00:00:00 2001 From: Micael Oliveira Date: Mon, 18 Sep 2023 10:17:20 +1000 Subject: [PATCH] Add patch to CICE mask check. --- CICE/CMakeLists.txt | 1 + CICE/patches/ice_mesh_mod.F90.patch | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 CICE/patches/ice_mesh_mod.F90.patch 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/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