From 5d30376f74c9676db6f7de9c58f4ddbb0539ef8e Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Wed, 1 Sep 2021 17:14:02 -0600 Subject: [PATCH 1/2] Revert "Make usrf condition in is_in_active_grid consistent with other checks" This reverts commit 3b899f4cc249a4e740e17458049cead4a71376cf. This didn't work: it resulted in the ice mask being 1 everywhere. See https://github.com/ESCOMP/CISM/issues/39#issuecomment-910863395 We'll fix this later (see https://github.com/ESCOMP/CISM/issues/41) --- libglad/glad_output_states.F90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libglad/glad_output_states.F90 b/libglad/glad_output_states.F90 index 181f6699..d54fbae9 100644 --- a/libglad/glad_output_states.F90 +++ b/libglad/glad_output_states.F90 @@ -119,13 +119,11 @@ logical function is_in_active_grid(geometry, i, j) ! TODO(wjs, 2015-03-18) Could the logic here be replaced by the use of some existing ! mask? For now I am simply re-implementing the logic that was in glint. - ! - ! (2021-08-31) See also comments in https://github.com/ESCOMP/CISM/issues/39 usrf = thk0 * geometry%usrf(i,j) - if (usrf >= 0.d0) then - ! points at or above sea level are assumed to be land or ice sheet + if (usrf > 0.d0) then + ! points not at sea level are assumed to be land or ice sheet is_in_active_grid = .true. else is_in_active_grid = .false. From f9ba23fdbd20c26059df1c0e517d6e67136d3a4a Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Wed, 1 Sep 2021 17:18:54 -0600 Subject: [PATCH 2/2] Add a comment --- libglad/glad_output_states.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libglad/glad_output_states.F90 b/libglad/glad_output_states.F90 index d54fbae9..45c31406 100644 --- a/libglad/glad_output_states.F90 +++ b/libglad/glad_output_states.F90 @@ -119,6 +119,8 @@ logical function is_in_active_grid(geometry, i, j) ! TODO(wjs, 2015-03-18) Could the logic here be replaced by the use of some existing ! mask? For now I am simply re-implementing the logic that was in glint. + ! + ! (2021-09-01) See also https://github.com/ESCOMP/CISM/issues/41 usrf = thk0 * geometry%usrf(i,j)