From 1c2bc9943e76c9d9161e57d0b64237b3d5eb6c79 Mon Sep 17 00:00:00 2001 From: George Gayno Date: Fri, 17 Jan 2020 19:41:25 +0000 Subject: [PATCH] feature/chgres_cube_grib2_release This commit references #7. Simplify logic that sets ice column temperatures to the default value. The original logic was not working as intended. --- sorc/chgres_cube.fd/input_data.F90 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sorc/chgres_cube.fd/input_data.F90 b/sorc/chgres_cube.fd/input_data.F90 index 6b57b0c41..fcd22cff9 100644 --- a/sorc/chgres_cube.fd/input_data.F90 +++ b/sorc/chgres_cube.fd/input_data.F90 @@ -4417,7 +4417,7 @@ subroutine read_input_sfc_grib2_file(localpet) enddo enddo - slmsk_save = int(dummy2d,esmf_kind_i4) + slmsk_save = nint(dummy2d) deallocate(icec_save) endif @@ -4776,9 +4776,10 @@ subroutine read_input_sfc_grib2_file(localpet) call error_handler("IN FieldScatter", rc) !--------------------------------------------------------------------------------- -! At open water (slmsk==0), the soil temperature array is set to a filler value -! of SST. At sea/lake ice (slmsk==2) , it is ice column temperature. That field -! is not available in the GFS grib2 data, so use a default value. +! At open water (slmsk==0), the soil temperature array is not used and set +! to the filler value of SST. At lake/sea ice points (slmsk=2), the soil +! temperature array holds ice column temperature. That field is not available +! in GFS grib data, so set to a default value. !--------------------------------------------------------------------------------- if (localpet == 0) then @@ -4790,9 +4791,7 @@ subroutine read_input_sfc_grib2_file(localpet) do j = 1, j_input do i = 1, i_input if (slmsk_save(i,j) == 0_esmf_kind_i4 ) dummy3d(i,j,k) = tsk_save(i,j) - if (slmsk_save(i,j) == 2_esmf_kind_i4 .and. .not. (dummy3d(i,j,k) <= 0.0 .and. dummy3d(i,j,k) <1000.0)) then - dummy3d(i,j,k) = icet_default - endif + if (slmsk_save(i,j) == 2_esmf_kind_i4 ) dummy3d(i,j,k) = icet_default enddo enddo enddo