Skip to content

Commit

Permalink
Add patch to CICE mask check.
Browse files Browse the repository at this point in the history
  • Loading branch information
micaeljtoliveira committed Sep 18, 2023
1 parent 059b7b2 commit 18e4f38
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions CICE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 21 additions & 0 deletions CICE/patches/ice_mesh_mod.F90.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 18e4f38

Please sign in to comment.