Skip to content

Commit

Permalink
Merge pull request #63 from COSIMA/fix_cice_mask_check
Browse files Browse the repository at this point in the history
Add patch to CICE mask check.
  • Loading branch information
micaeljtoliveira committed Sep 18, 2023
2 parents 059b7b2 + c8816d8 commit fdaa3a6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
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
1 change: 0 additions & 1 deletion CICE/cice_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
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 fdaa3a6

Please sign in to comment.