ESCOMP / CAM

Community Atmosphere Model
71 stars 133 forks source link

Possible modification to RRTMG-P for ~80km top model #1063

Open PeterHjortLauritzen opened 3 weeks ago

PeterHjortLauritzen commented 3 weeks ago

What happened?

See issue presented at CAM7 meeting (slide 18) by @JulioTBacmeister :

https://docs.google.com/presentation/d/1U51QGheey-l6AyDh-YgQ6rkd8ASClmaLv20C2XZBi-A/edit#slide=id.g2e748601ada_0_6

What are the steps to reproduce the bug?

Ask @JulioTBacmeister

What CAM tag were you using?

cam6_3_160

What machine were you running CAM on?

CISL machine (e.g. cheyenne)

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Any CAM SE can do this

Extra info

Don't know who is going to submit PR at this point in time

brianpm commented 2 weeks ago

The radiative calculation in RRTMG and RRTMGP is not technically valid for p < 1Pa. As discussed in the CAM7 meeting, since this error is occurring within the sponge layer, we probably don't need a "good" calculation, just something. I saw this in the RRTMGP code:

  !
  ! RRTMGP won't run with pressure less than its minimum. The top level in the RFMIP file
  !   is set to 10^-3 Pa. Here we pretend the layer is just a bit less deep.
  !   This introduces an error but shows input sanitizing.
  !
  if(top_at_1) then
    p_lev(:,1,:) = k_dist%get_press_min() + epsilon(k_dist%get_press_min())
  else
    p_lev(:,nlay+1,:) &
                 = k_dist%get_press_min() + epsilon(k_dist%get_press_min())
  end if

from ./examples/rfmip-clear-sky/rrtmgp_rfmip_lw.F90.

I wonder if this is the approach we should take? But there'll have to be some logic to figure out whether its a WACCM type of simulation with lots of levels where RRTMG(P) should not be running versus a "MT" simulation where we seem to want to run RRTMG(P) in the sponge layer.

PeterHjortLauritzen commented 2 weeks ago

@tilmes, @dan800, @fvitt, Nick P., Hanli: will this code change be acceptable to WACCM and WACCM-x applications?

JulioTBacmeister commented 2 weeks ago

I think there must be some logic in the build already, since an 'MT' configuration doesn't build the non-LTE radiation schemes. By extension the same logic could say RRTMGP has to run all the way to the model top - whatever it is in MT.

fvitt commented 2 weeks ago

The logic is in src/physics/waccm/radheat.F90. The merge region for waccm heating and cam radiation heating is between 50 and 5 Pa. RRTMG above that should not affect waccm.