diff --git a/cicecore/cicedyn/infrastructure/ice_domain.F90 b/cicecore/cicedyn/infrastructure/ice_domain.F90 index 86d6a1939..93092fc7d 100644 --- a/cicecore/cicedyn/infrastructure/ice_domain.F90 +++ b/cicecore/cicedyn/infrastructure/ice_domain.F90 @@ -606,9 +606,9 @@ subroutine init_domain_distribution(KMTG,ULATG,grid_ice) work_per_block = 0 end where if (my_task == master_task) then - write(nu_diag,'(2a,4i9)') subname,' work_unit = ',work_unit, max_work_unit - write(nu_diag,'(2a,4i9)') subname,' nocn = ',minval(nocn),maxval(nocn),sum(nocn) - write(nu_diag,'(2a,4i9)') subname,' work_per_block = ',minval(work_per_block),maxval(work_per_block),sum(work_per_block) + write(nu_diag,'(2a,2i9)') subname,' work_unit = ',work_unit, max_work_unit + write(nu_diag,'(2a,3i16)') subname,' nocn = ',minval(nocn),maxval(nocn),sum(nocn) + write(nu_diag,'(2a,3i9)') subname,' work_per_block = ',minval(work_per_block),maxval(work_per_block),sum(work_per_block) endif deallocate(nocn) diff --git a/cicecore/cicedyn/infrastructure/ice_grid.F90 b/cicecore/cicedyn/infrastructure/ice_grid.F90 index eb2d22411..9aac92758 100644 --- a/cicecore/cicedyn/infrastructure/ice_grid.F90 +++ b/cicecore/cicedyn/infrastructure/ice_grid.F90 @@ -1616,8 +1616,8 @@ subroutine mom_corners_global(work_mom, G_U, G_T, G_E, G_N) select case (trim(ns_boundary_type)) case ('tripole') do i = 1, nx_global+1 - G_T(i,ny_global+1) = G_T(nx_global+1-i, ny_global) - G_E(i,ny_global+1) = G_E(nx_global+1-i, ny_global) + G_T(i,ny_global+1) = G_T(nx_global+2-i, ny_global) + G_E(i,ny_global+1) = G_E(nx_global+2-i, ny_global) enddo case ('cyclic') G_T(:,ny_global+1) = G_T(:,1) diff --git a/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 b/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 index 412b2cce5..ca59a9bb7 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_import_export.F90 @@ -1063,7 +1063,7 @@ subroutine ice_export( exportState, rc ) endif ! Create a temporary field - allocate(tempfld(nx_block,ny_block,nblocks)) + allocate(tempfld(nx_block,ny_block,max_blocks)) ! Fractions and mask call state_setexport(exportState, 'Si_ifrac', input=ailohi, rc=rc) diff --git a/configuration/scripts/cmake/CMakeLists.txt b/configuration/scripts/cmake/CMakeLists.txt index aaafbcb4e..64ba71d34 100644 --- a/configuration/scripts/cmake/CMakeLists.txt +++ b/configuration/scripts/cmake/CMakeLists.txt @@ -54,28 +54,28 @@ include(FortranLib) # Common compiler flags and definitions if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbacktrace -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbacktrace -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -g -grecord-gcc-switches") if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") endif() set(CMAKE_Fortran_FLAGS_RELEASE "-O") - set(CMAKE_Fortran_FLAGS_DEBUG "-g -Wall -Og -ffpe-trap=zero,overflow -fcheck=bounds") + set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Og -ffpe-trap=zero,overflow -fcheck=bounds") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model precise") - set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal") - set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model precise -g -grecord-gcc-switches") + set(CMAKE_Fortran_FLAGS_RELEASE "-O2") + set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check all -fpe0 -check noarg_temp_created") else() message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options") endif() if(CMAKE_C_COMPILER_ID MATCHES "GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -g -grecord-gcc-switches") set(CMAKE_C_FLAGS_RELEASE "-O") - set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds") + set(CMAKE_C_FLAGS_DEBUG "-Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds") elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -traceback -qno-opt-dynamic-align -fp-model precise -std=gnu99") - set(CMAKE_C_FLAGS_RELEASE "-O2 -debug minimal") - set(CMAKE_C_FLAGS_DEBUG "-O0 -g") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -traceback -qno-opt-dynamic-align -fp-model precise -std=gnu99 -g -grecord-gcc-switches") + set(CMAKE_C_FLAGS_RELEASE "-O2") + set(CMAKE_C_FLAGS_DEBUG "-O0") else() message(WARNING "C compiler with ID ${CMAKE_C_COMPILER_ID} will be used with CMake default options") endif() @@ -83,6 +83,7 @@ endif() if (CICE_ACCESS3) add_compile_definitions( CESMCOUPLED + NO_SNICARHC ) endif()