Skip to content

Clean-up tracer_data: increment_string use in incr_filename #474

@jimmielin

Description

@jimmielin

Issue Type

Code Clean-up

Issue Description

During review of #441, @fvitt originally wrote:

I don't think we actually use this feature in cam. This was left over from the old MOZART chemical transport model. Not sure that increment_string needs to migrated to CAM-SIMA.

For the increment_string function added to support this block of code:

if ((.not. present(filenames_list)) .or. (len_trim(filenames_list) == 0)) then
!-----------------------------------------------------------------------
! ... ccm type filename
!-----------------------------------------------------------------------
pos = len_trim(filename)
fn_new = filename(:pos)
if (masterproc) write (iulog, *) sub//': old filename = ', trim(fn_new)
if (fn_new(pos - 2:) == '.nc') then
pos = pos - 3
end if
istat = increment_string(fn_new(:pos), 1)
if (istat /= 0) then
write (iulog, *) sub//': increment_string returned ', istat
write (iulog, *) ' while trying to decrement ', trim(fn_new)
call endrun(sub//': increment_string failure')
end if

That appears to be unused in CAM-SIMA (and CAM).

This feature could be removed, and if increment_string has no other purpose now or in the future, it can also be removed from CAM-SIMA entirely.

Will this change answers?

No

Will you be implementing this yourself?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    code clean-upMade code simpler, better, and/or easier to read.
    No fields configured for Code Health.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions