Skip to content

Beljaars drag uses provisional winds but does not write back to model state #413

Description

@jimmielin

In the review of #396, @cacraigucar originally wrote:

Just pointing out this comment section. Typically we wouldn't allow something like this in the committed mainstream code. Should we perhaps open an issue to capture this? Since the CESM3 release is upcoming, "FIXME" comments should probably not be in the code base (even though the original code had it). Thoughts?

In reference to this code in beljaars_drag_interstitials::beljaars_add_updated_residual_stress_run, which may or may not need future work (it is a science question that is answer-changing):

    do i = 1, ncol
      ! Add vertically-integrated Beljaars drag to residual stress
      ! these are calculated using provisionally-updated winds.
      !
      ! A previous FIXME (predating CAM6) in beljaars_drag notes:
      ! "uses 'state' u and v. Should updated u and v's be used?"
      !
      ! It may be possible to write back these provisionally updated taubljx/y
      ! to the model state instead of a local variable (and pbuf in former CAM)
      ! but it would introduce answer changes, so moving that FIXME to here for now.
      taubljx(i) = 0._kind_phys
      taubljy(i) = 0._kind_phys
      do k = 1, pver
        taubljx(i) = taubljx(i) + (1._kind_phys/gravit)*dragblj(i, k)*u1(i, k)*p%del(i, k)
        taubljy(i) = taubljy(i) + (1._kind_phys/gravit)*dragblj(i, k)*v1(i, k)*p%del(i, k)
      end do
    end do

    tauresx(:ncol) = tauresx(:ncol) + taubljx(:ncol)
    tauresy(:ncol) = tauresy(:ncol) + taubljy(:ncol)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions