Skip to content

Wrong units of ncal, not converted from tendency til concentration #288

Description

@Ovewh

What happened?

The "NCAL" diagnostic gets wrong units, since it is missing a conversion from kg /s to #/m-3. This bug also impact other diagnostics which is based on NCAL, e.g. CCN_B

What are the steps to reproduce the bug?

Found the bug from examining the code.

What CAM-Nor tag were you using?

noresm_develop

What machine were you running CAM (or NorESM) on?

Betzy

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Yes

Extra info

The bug can be seen here

Currently:

do k=1,nlev
     do i=1,mgncol
        if (qc(i,k) >= qsmall) then
           nc(i,k) = max(nc(i,k) + npccn(i,k)*deltat, 0._r8)
           ncal(i,k) = npccn(i,k)
        else
           ncal(i,k) = 0._r8
        end if

        if (t(i,k) < icenuct) then
           ncai(i,k) = naai(i,k)*deltat*rho(i,k)
        else
           ncai(i,k) = 0._r8
        end if

Should be, same as for ice:

do k=1,nlev
     do i=1,mgncol
        if (qc(i,k) >= qsmall) then
           nc(i,k) = max(nc(i,k) + npccn(i,k)*deltat, 0._r8)
           ncal(i,k) = npccn(i,k)*deltat*rho(i,k)
        else
           ncal(i,k) = 0._r8
        end if

        if (t(i,k) < icenuct) then
           ncai(i,k) = naai(i,k)*deltat*rho(i,k)
        else
           ncai(i,k) = 0._r8
        end if

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions