Skip to content

Commit 14adb2a

Browse files
Updates for new routine name.
Fixes ufs-community#709.
1 parent 209f0b1 commit 14adb2a

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

sorc/sfc_climo_gen.fd/driver.F90

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ program driver
8282
call define_source_grid(localpet, npets, input_vegetation_type_file)
8383
if (fract_vegsoil_type) then
8484
print*,'- WILL OUTPUT VEGETATION TYPE FRACTION.'
85-
call interp2(localpet, input_vegetation_type_file)
85+
call interp_frac_cats(localpet, input_vegetation_type_file)
8686
else
8787
print*,'- WILL OUTPUT DOMINATE VEGETATION TYPE.'
8888
method=ESMF_REGRIDMETHOD_NEAREST_STOD
@@ -144,7 +144,7 @@ program driver
144144
call define_source_grid(localpet, npets, input_soil_type_file)
145145
if (fract_vegsoil_type) then
146146
print*,'- WILL OUTPUT SOIL TYPE FRACTION.'
147-
call interp2(localpet, input_soil_type_file)
147+
call interp_frac_cats(localpet, input_soil_type_file)
148148
else
149149
print*,'- WILL OUTPUT DOMINATE SOIL TYPE.'
150150
method=ESMF_REGRIDMETHOD_NEAREST_STOD

sorc/sfc_climo_gen.fd/interp_frac_cats.F90

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
!> @file
2-
!! @brief Read the input source data and interpolate it to the
3-
!! model grid.
4-
!! @author George Gayno @date 2018
2+
!! @brief Read the input cateogorical source data and
3+
!! interpolate it to the model grid.
4+
!! @author George Gayno @date 2022
55

66
!> Read the input source data and interpolate it to the
7-
!! model grid.
7+
!! model grid. Outputs the percentage of each category
8+
!! within a model grid box and the dominate category.
89
!!
910
!! @param[in] localpet this mpi task
1011
!! @param[in] input_file filename of input source data.
11-
!! @author George Gayno @date 2018
12-
subroutine interp2(localpet, input_file)
12+
!! @author George Gayno @date 2022
13+
subroutine interp_frac_cats(localpet, input_file)
1314

1415
use esmf
1516
use netcdf
@@ -26,11 +27,12 @@ subroutine interp2(localpet, input_file)
2627

2728
character(len=*), intent(in) :: input_file
2829

29-
integer :: rc, localpet
30-
integer :: i, j, tile, ncid, status
30+
integer, intent(in) :: localpet
31+
32+
integer :: i, j, tile, ncid, status, rc
3133
integer :: varid, water_category
3234
integer :: isrctermprocessing
33-
integer :: category, num_categories
35+
integer :: category, num_categories
3436

3537
integer(esmf_kind_i4), allocatable :: mask_mdl_one_tile(:,:)
3638
integer(esmf_kind_i4), pointer :: unmapped_ptr(:)
@@ -44,12 +46,11 @@ subroutine interp2(localpet, input_file)
4446
real(esmf_kind_r4), allocatable :: lon_mdl_one_tile(:,:)
4547
real(esmf_kind_r4), allocatable :: land_frac_mdl_one_tile(:,:)
4648

47-
type(esmf_regridmethod_flag) :: method
49+
type(esmf_regridmethod_flag) :: method
4850
type(esmf_field) :: data_field_src
4951
type(esmf_field) :: data_field_mdl
5052
type(esmf_routehandle) :: regrid_data
5153
type(esmf_polemethod_flag) :: pole
52-
5354

5455
if (localpet == 0) then
5556
allocate(data_src_global(i_src,j_src))
@@ -264,4 +265,4 @@ subroutine interp2(localpet, input_file)
264265

265266
call mpi_barrier(mpi_comm_world, rc)
266267

267-
end subroutine interp2
268+
end subroutine interp_frac_cats

0 commit comments

Comments
 (0)