Skip to content

Commit 1469512

Browse files
committed
Document more variables as recommended in the code review
1 parent 7f28c6f commit 1469512

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tools/mksurfdata_esmf/src/mkagfirepkmonthMod.F90

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ subroutine mkagfirepkmon(file_mesh_i, file_data_i, mesh_o, pioid_o, rc)
5757
integer :: k
5858
integer :: ni,no
5959
integer :: ns_i, ns_o
60-
integer , allocatable :: mask_i(:) ! TODO: What is this?
61-
real(r4), allocatable :: rmask_i(:) ! TODO: What is this?
62-
real(r8), allocatable :: frac_o(:) ! TODO: What is this?
60+
integer , allocatable :: mask_i(:) ! input grid: mesh file landmask
61+
real(r4), allocatable :: rmask_i(:) ! input grid: raw dataset landmask
62+
real(r8), allocatable :: frac_o(:) ! output grid: agricultural fire peak month
6363
integer , allocatable :: idata_i(:) ! input grid: agricultural fire peak month
6464
integer , allocatable :: agfirepkmon_o(:) ! agricultural fire peak month
6565
real(r4), pointer :: dataptr(:)
@@ -182,7 +182,7 @@ subroutine mkagfirepkmon(file_mesh_i, file_data_i, mesh_o, pioid_o, rc)
182182

183183
! Output diagnostics comparing global area of each peak month on input and output grids
184184
call output_diagnostics_index(mesh_i, mesh_o, mask_i, frac_o, &
185-
1, 13, idata_i, agfirepkmon_o, 'peak fire month', ndiag, rc)
185+
min_valid, max_valid, idata_i, agfirepkmon_o, 'peak fire month', ndiag, rc)
186186
if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort()
187187

188188
! Release memory
@@ -209,10 +209,10 @@ end subroutine mkagfirepkmon
209209
subroutine get_dominant_indices(dynamicMaskList, dynamicSrcMaskValue, dynamicDstMaskValue, rc)
210210

211211
! input/output arguments
212-
type(ESMF_DynamicMaskElementR4R8R4) , pointer :: dynamicMaskList(:) ! TODO: What is this?
213-
real(ESMF_KIND_R4) , intent(in), optional :: dynamicSrcMaskValue ! TODO: What is this?
214-
real(ESMF_KIND_R4) , intent(in), optional :: dynamicDstMaskValue ! TODO: What is this?
215-
integer , intent(out) :: rc ! TODO: What is this?
212+
type(ESMF_DynamicMaskElementR4R8R4) , pointer :: dynamicMaskList(:)
213+
real(ESMF_KIND_R4) , intent(in), optional :: dynamicSrcMaskValue ! Source (i.e. input) grid mask
214+
real(ESMF_KIND_R4) , intent(in), optional :: dynamicDstMaskValue ! Destination (i.e. output) grid mask
215+
integer , intent(out) :: rc ! error status
216216

217217
! local variables
218218
integer :: ni, no, n
@@ -224,7 +224,6 @@ subroutine get_dominant_indices(dynamicMaskList, dynamicSrcMaskValue, dynamicDst
224224
rc = ESMF_SUCCESS
225225

226226
if (associated(dynamicMaskList)) then
227-
! TODO: Can parts of this loop and/or its subloops be broken out into separate functions/subroutines to facilitate testing?
228227
do no = 1, size(dynamicMaskList)
229228
hasdata = .false.
230229
wts_o(:) = 0.d0

0 commit comments

Comments
 (0)