diff --git a/sorc/chgres_cube.fd/search_util.f90 b/sorc/chgres_cube.fd/search_util.f90 index 6239b8c9c..816a20a47 100644 --- a/sorc/chgres_cube.fd/search_util.f90 +++ b/sorc/chgres_cube.fd/search_util.f90 @@ -1,7 +1,7 @@ !> @file !! @brief Replace undefined surface values. !! -!! @author gayno NCEP/EMC +!! @author George Gayno NCEP/EMC !! !! Replace undefined values with a valid value. This can !! happen for an isolated lake or island that is unresolved by @@ -15,18 +15,18 @@ module search_util contains -!> @brief Replace undefined surface values. -!! +!! Replace undefined surface values. !! Replace undefined values on the model grid with a valid value at !! a nearby neighbor. Undefined values are typically associated !! with isolated islands where there is no source data. -!! !! Routine searches a neighborhood with a radius of 100 grid points. !! If no valid value is found, a default value is used. -!! -!! @note This routine works for one tile of a cubed sphere grid. It +!! This routine works for one tile of a cubed sphere grid. It !! does not consider valid values at adjacent faces. That is a !! future upgrade. +!! @param terrain_land - 2D field of terrain height points. +!! @param soilt_climo - 2D field of soil type points. + subroutine search (field, mask, idim, jdim, tile, field_num, latitude, terrain_land, soilt_climo) use mpi @@ -34,6 +34,7 @@ subroutine search (field, mask, idim, jdim, tile, field_num, latitude, terrain_l implicit none + integer, intent(in) :: idim, jdim, tile, field_num integer(esmf_kind_i8), intent(in) :: mask(idim,jdim) @@ -168,19 +169,19 @@ subroutine search (field, mask, idim, jdim, tile, field_num, latitude, terrain_l repl_default = repl_default + 1 endif elseif (field_num == 7 .and. PRESENT(terrain_land)) then - ! Terrain heights for isolated landice points never get a correct value, so replace - ! with terrain height from the input grid interpolated to the target grid + ! Terrain heights for isolated landice points never get a correct value, so replace + ! with terrain height from the input grid interpolated to the target grid field(i,j) = terrain_land(i,j) repl_default = repl_default + 1 elseif (field_num == 224 .and. PRESENT(soilt_climo)) then - ! When using input soil type fields instead of climatological data on the + ! When using input soil type fields instead of climatological data on the ! target grid, isolated land locations that exist in the target grid but ! not the input grid don't receiving proper soil type information, so replace ! with climatological values field(i,j) = soilt_climo(i,j) repl_default = repl_default + 1 else - field(i,j) = default_value ! Search failed. Use default value. + field(i,j) = default_value !< Search failed. Use default value. repl_default = repl_default + 1 endif @@ -198,6 +199,10 @@ subroutine search (field, mask, idim, jdim, tile, field_num, latitude, terrain_l end subroutine search +!> set sst values based on latitude +!! @author George Gayno NCEP/EMC +!! @param latitude - latitude input +!! @param sst - sst guess value to be set subroutine sst_guess(latitude, sst) use esmf diff --git a/sorc/sfc_climo_gen.fd/interp.F90 b/sorc/sfc_climo_gen.fd/interp.F90 index f1822f03b..4afe5a0be 100644 --- a/sorc/sfc_climo_gen.fd/interp.F90 +++ b/sorc/sfc_climo_gen.fd/interp.F90 @@ -1,8 +1,8 @@ !> @file -!! @author gayno @date 2018 +!! @brief Read the input source data and interpolate it to the +!! model grid. !! -!! Read the input source data and interpolate it to the -!! model grid. +!! @author gayno @date 2018 !! !! @param[in] input_flle filename of input source data. !! @param[in] localpet this mpi task @@ -259,30 +259,17 @@ subroutine interp(localpet, method, input_file) end subroutine interp - subroutine adjust_for_landice(field, vegt, idim, jdim, field_ch) +!> Ensure consistent fields at land ice points +!! Land ice is vegetation type 15 (variable landice). +!! @author George Gayno NCEP/EMC +!! Usage: call adjust_for_landice(field, vegt, idim, jdim, field_ch) +!! output is Model field +!! @param field - Model field before adjustments for land ice. +!! @param field_ch - Field name. +!! @param i/jdim - i/j dimension of model tile. +!! @param vegt - Vegetation type on the model tile. -!----------------------------------------------------------------------- -! subroutine documentation block -! -! Subroutine: adjust for landice -! prgmmr: gayno org: w/np2 date: 2018 -! -! Abstract: Ensure consistent fields at land ice points. -! Land ice is vegetation type 15 (variable landice). -! -! Usage: call adjust_for_landice(field, vegt, idim, jdim, field_ch) -! -! input argument list: -! field Model field before adjustments for -! land ice. -! field_ch Field name -! i/jdim i/j dimension of model tile. -! vegt Vegetation type on the model tile -! -! output argument list: -! field Model field after adjustments for -! land ice. -!----------------------------------------------------------------------- + subroutine adjust_for_landice(field, vegt, idim, jdim, field_ch) use esmf use mpi