Skip to content

Tidy up time calculation in ice_history_write #81

@anton-seaice

Description

@anton-seaice

At the moment, we calculate the the middle of history interval time as:

! set timestamp in middle of time interval
        if (histfreq(ns) == 'm' .or. histfreq(ns) == 'M') then
            if (month /= 1) then
                ltime=time/int(secday)-real(daymo(month-1))/2.0
            else
                ltime=time/int(secday)-real(daymo(12))/2.0
            endif
        else if(histfreq(ns) == 'd' .or. histfreq(ns) == 'D') then 
            ltime=time/int(secday) - 0.5
        else
            ltime=time/int(secday)
        endif

We can probably replace this with:

if (hist_avg) then
    ltime = p50*(time_beg(ns) + time_end(ns))
else
    ltime = time_end(ns)
endif()

in the ice_history_write.F90 files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions