Skip to content

cam history always chooses first averaging flag when using duplicate fields #1149

Description

@peverwhee

What happened?

If, in user_nl_cam you're trying to do something like:

fincl2='Q:I', 'Q:A'

in the hopes that you'll get an h1i and h1a file, both with 'Q', it won't work!

You'll get whichever flag you specify first. So, in this case, you'd just get an h1i with 'Q'

What are the steps to reproduce the bug?

Run CAM with the user_nl_cam described above. Be sure your nhtfrq /= 1 for the test, since that overrides everything to "I" anyway.

What CAM tag were you using?

cam6_4_032

What machine were you running CAM on?

CGD machine (e.g. izumi)

What compiler were you using?

GNU

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Any CAM SE can do this

Extra info

Not sure exactly, but this seems like the problem area (in fldlst)

      listentry => masterlinkedlist
      do while(associated(listentry))
        mastername = listentry%field%name

        call list_index (fwrtpr(1,t), mastername, ffld)
        if (ffld > 0) then
          prec_wrt = getflag(fwrtpr(ffld,t))
        else
          prec_wrt = ' '
        end if

        call list_index (fincl(1,t), mastername, ffld)

        if (ffld > 0) then
          avgflag = getflag (fincl(ffld,t))
          call inifld (t, listentry, avgflag,  prec_wrt)
        else if ((.not. empty_htapes) .or. (is_initfile(file_index=t))) then
          call list_index (fexcl(1,t), mastername, ffld)
          if (ffld == 0 .and. listentry%actflag(t)) then
            call inifld (t, listentry, ' ', prec_wrt)
          else
            listentry%actflag(t) = .false.
          end if
        else
          listentry%actflag(t) = .false.
        end if
        listentry=>listentry%next_entry

      end do

Metadata

Metadata

Assignees

Labels

CoupledEval3bugSomething isn't working correctly

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions