Skip to content

Bug in datm_datamode_clmncep_mod preventing using diffuse & direct SW streams #425

Description

@adrifoster

A bug is currently in datm_datamode_clmncep_mod: datm_datamode_clmncep_advance on line 329. The array assignment for Faxa_swdn(:) = strm_Faxa_swdn(:) occurs whether strm_Faxa_swdn has been associated or not (and it's not if you try to use direct & diffuse rather than total)

    ! Direct copies of stream fields
    Sa_tbot(:) = strm_Sa_tbot(:)
    Faxa_swdn(:) = strm_Faxa_swdn(:)
    if (associated(strm_Sa_topo)) then
       Sa_topo(:) = strm_Sa_topo(:)
    else
       Sa_topo(:) = SHR_CONST_SPVAL
    end if

a fix could be to add an associates check (we already check that SOMETHING related to _swdn must be associated earlier)

    if (associated(strm_Faxa_swdn)) then
      Faxa_swdn(:) = strm_Faxa_swdn(:)
    end if

but I'm not sure if this is what we want to do. @mvertens @billsacks @ekluzek @swensosc

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions