Skip to content

Commit

Permalink
Merge pull request #2022 from johnpaulalex/remove_unused
Browse files Browse the repository at this point in the history
Delete unused hist_add_subscript method (no references in the CTSM repo)
  • Loading branch information
ekluzek authored Jan 15, 2025
2 parents 680833a + 0d44483 commit 6fddf3c
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions src/main/histFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module histFileMod
public :: hist_addfld1d ! Add a 1d single-level field to the list of all history fields
public :: hist_addfld2d ! Add a 2d multi-level field to the list of all history fields
public :: hist_addfld_decomp ! Add a 1d/2d field based on patch or column data
public :: hist_add_subscript ! Add a 2d subscript dimension


public :: hist_printflds ! Print summary of list of all history fields
public :: htapes_fieldlist ! Finalize history file field lists, intersecting allhistfldlist with
Expand Down Expand Up @@ -196,10 +196,6 @@ module histFileMod
! is 255. But this can't be increased until all hard
! coded values throughout the i/o stack are updated.
integer, parameter :: max_chars = 199 ! max chars for char variables
integer, parameter :: max_subs = 100 ! max number of subscripts
integer :: num_subs = 0 ! actual number of subscripts
character(len=32) :: subs_name(max_subs) ! name of subscript
integer :: subs_dim(max_subs) ! dimension of subscript

! type2d value for a field without a level dimension. This value is important for the
! following reasons (as of 2023-08-21):
Expand Down Expand Up @@ -2490,9 +2486,6 @@ subroutine htape_create (t, histrest)
! (although on the history file it will go 1:(nec+1) rather than 0:nec)
call ncd_defdim(lnfid, 'elevclas' , maxpatch_glc + 1, dimid)

do n = 1,num_subs
call ncd_defdim(lnfid, subs_name(n), subs_dim(n), dimid)
end do
call ncd_defdim(lnfid, 'string_length', hist_dim_name_length, strlen_dimid)
call ncd_defdim(lnfid, 'scale_type_string_length', scale_type_strlen, dimid)
call ncd_defdim( lnfid, 'levdcmp', nlevdecomp_full, dimid)
Expand Down Expand Up @@ -5940,31 +5933,6 @@ integer function next_history_pointer_index ()

end function next_history_pointer_index

!-----------------------------------------------------------------------
subroutine hist_add_subscript(name, dim)
!
! !DESCRIPTION:
! Add a history variable to the output history tape.
!
! !ARGUMENTS:
character(len=*), intent(in) :: name ! name of subscript
integer , intent(in) :: dim ! dimension of subscript
!
! !LOCAL VARIABLES:
character(len=*),parameter :: subname = 'hist_add_subscript'
!-----------------------------------------------------------------------

num_subs = num_subs + 1
if (num_subs > max_subs) then
write(iulog,*) trim(subname),' ERROR: ',&
' num_subs = ',num_subs,' greater than max_subs= ',max_subs
call endrun(msg=errMsg(sourcefile, __LINE__))
endif
subs_name(num_subs) = name
subs_dim(num_subs) = dim

end subroutine hist_add_subscript

!-----------------------------------------------------------------------

subroutine strip_null(str)
Expand Down

0 comments on commit 6fddf3c

Please sign in to comment.