NorESMhub / CAM

Community Atmosphere Model including CAM6-Nor branches
1 stars 20 forks source link

Bug in ice delimiter #110

Closed DirkOlivie closed 7 months ago

DirkOlivie commented 7 months ago

What happened?

There is an artificial limit on the number of ice particles.

What are the steps to reproduce the bug?

Run the standard NorESM2 code.

What CAM-Nor tag were you using?

cam_cesm2_1_rel_05-Nor_v1.0.5

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?

No

Extra info

The subroutine micro_mg_tend in the file src/NorESM/micro_mg2_0.F90 has to be changed :

The lines

!  if (do_cldice .and. nitend(i,k).gt.0._r8.and.ni(i,k)+nitend(i,k)*deltat.gt.nimax(i,k)) then
!    nitncons(i,k) = nitncons(i,k) + nitend(i,k)-max(0._r8,(nimax(i,k)-ni(i,k))/deltat) !AL
!     nitend(i,k)=max(0._r8,(nimax(i,k)-ni(i,k))/deltat)
!  end if

should be replaced by

!shofer---
! OS Also added the term from secondary ice formation (but we don't need that now)
if (nnucct(i,k)+nnuccc(i,k)+nnudep(i,k).gt.0._r8) then
!       nimax(i,k) = nimax(i,k)+(nnucct(i,k)+nnuccc(i,k)+nnudep(i,k)+SIP_RATE(i,k))*lcldm(i,k)*deltat   
        nimax(i,k) = nimax(i,k)+(nnucct(i,k)+nnuccc(i,k)+nnudep(i,k))*lcldm(i,k)*delta
end if

if (do_cldice.and.nitend(i,k).gt.0._r8.and.ni(i,k)+nitend(i,k)*deltat.gt.nimax(i,k)) then
        nitncons(i,k) = nitncons(i,k) + nitend(i,k)-max(0._r8,(nimax(i,k)-ni(i,k))/deltat)
        nitend(i,k)=max(0._r8,(nimax(i,k)-ni(i,k))/deltat)
end if
!shofer---
gold2718 commented 7 months ago

BTW, I assume line 1089 is supposed to be:

nimax(i,k) = nimax(i,k)+(nnucct(i,k)+nnuccc(i,k)+nnudep(i,k))*lcldm(i,k)*deltaT

correct?

DirkOlivie commented 7 months ago

Yes, you are right : there should be a "t".

gold2718 commented 7 months ago

Closed by #119