Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Thompson MP tracer count in GFS PBL generic pre/post run methods #880

Closed
rmontuoro opened this issue Mar 15, 2022 · 6 comments · Fixed by #883
Closed

Incorrect Thompson MP tracer count in GFS PBL generic pre/post run methods #880

rmontuoro opened this issue Mar 15, 2022 · 6 comments · Fixed by #883
Labels
bug CCPP v6 Needed for CCPP v6 public release

Comments

@rmontuoro
Copy link
Contributor

Description

The total number of tracers in Thompson microphysics is incorrectly returned by set_aerosol_tracer_index():

elseif (imp_physics == imp_physics_thompson) then
! Thompson
if(ltaerosol) then
kk = 10
else
kk = 7
endif

which is used in GFS_PBL_generic_pre_run() and GFS_PBL_generic_post_run() if PBL mixing is enabled for atmospheric tracers (trans_aero = (trans_trac .and. cplchm) = .true.).

The proper number may be found in noaa-emc/fv3atm/ccpp/data/GFS_typedef.F90:

    if (Model%imp_physics == Model%imp_physics_thompson) then
      if (Model%ltaerosol) then
        Interstitial%nvdiff = 12
      else
        Interstitial%nvdiff = 9
      endif

This bug affects prototype 8b as it features both Thompson MP and prognostic aerosols.

@rmontuoro rmontuoro added the bug label Mar 15, 2022
rmontuoro added a commit to rmontuoro/ccpp-physics that referenced this issue Mar 15, 2022
in the PBL for Thompson microphysics scheme when coupling
with prognostic aerosols (NCAR#880).
@ligiabernardet ligiabernardet added the CCPP v6 Needed for CCPP v6 public release label Mar 15, 2022
@ligiabernardet
Copy link
Collaborator

Does it affects uncoupled suites that is ice- and water-friendly aerosols, such as RRFS v1?

@rmontuoro
Copy link
Contributor Author

set_aerosol_tracer_index() is only called when trans_trac=.true. and cplchm=.true. (i.e., trans_aero=.true.):

if (trans_aero) then
call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
errmsg, errflg)
if (errflg /= 0) return
!
k1 = kk
do n=ntchs,ntchm+ntchs-1
k1 = k1 + 1
do k=1,levs
do i=1,im
vdftra(i,k,k1) = qgrs(i,k,n)
enddo
enddo
enddo
endif

I don't expect this bug to have an impact on coupled/uncoupled configurations that do not include UFS-Aerosols.

I would suggest refactoring microphysics-related code that includes assumptions on the number and location of microphysics tracers throughout CCPP physics suites.

@lisa-bengtsson
Copy link
Collaborator

Would it be possible to add attributes to the tracers in the field_table to easier keep track whether a tracer should be vertically diffused in physics, advected in the dycore, etc?

@climbfuji
Copy link
Collaborator

Would it be possible to add attributes to the tracers in the field_table to easier keep track whether a tracer should be vertically diffused in physics, advected in the dycore, etc?

There is a new capability in capgen.py (the supposed-to-be successor of the current code generator ccpp_prebuild.py that contains constituent information, including whether something is supposed to be vertically diffused, horizontally advected, ... - making a similar change in ccpp_prebuild.py only makes sense if the transition to capgen.py is delayed significantly or won't happen (I don't know the answer to these questions).

@lisa-bengtsson
Copy link
Collaborator

Thanks Dom, I think such an approach would be very valuable, then these hard coded values could be replaced by values generated directly after reading the field table.

@gthompsnWRF
Copy link
Collaborator

Here are my 2 cents on the topic based on WRF experience. I believe that any bulk microphysics scheme's rain and graupel species should not be vertically diffused with PBL mixing coefficients as they should fall too fast to be affected by "diffusion" whereas the variables of: cloud ice (mass and number?), cloud water (mass and number?), and aerosol variables should certainly have consistent mixing that is done for water vapor. It might be fair to say that snow is questionable since it has a fallspeed near 1 m/s, maybe it isn't necessary similar to rain/graupel.

mzhangw added a commit to mzhangw/ccpp-physics that referenced this issue Mar 30, 2022
…v6_scidoc

* 'main' of https://github.com/NCAR/ccpp-physics:
  fix the missing value of fv in vege_flux
  Revert "Lsm upgrades mynn for p8c"
  put a upper/lower limit on cwpc
  Driver update, opt_trs=4 over vegetation, and z0hover bare soil etc.
  modify a table of cwp parameter
  modify a table of cwp parameter
  modify a table of cwp parameter
  modify a table of cwp parameter
  revert back to shdfac in gvfun calculation due to occasional model crash
  tuning cd/lm parameter
  tuning cd/lm parameter
  Noah MP non-glacier changes for MYNN
  Noah MP glacier changes for MYNN
  Noah MP driver and meta changes for MYNN
  modify the eddy diffusivity for heat at the top of the canopy
  replace shdfac by fveg for zvfun
  Properly set the total number of species to be diffused in the PBL for Thompson microphysics scheme when coupling with prognostic aerosols (NCAR#880).
  further refinement of the impact of vegetation on zvfun
  correct the condition to avoid a divide by zero exception
  add Chunxi Zhang to CODEOWNERS
  revert the df1 change due to some negative impact on surface temperature
  to avoid exception floating point
  simplify the code with internal function maxval
  replace fveg by lai/laimax to be used for dependent
  to read new hig-res ice climatology data
  correct the reference height
  gvf impact on thermal conductivity limited to the first soil layer
  add some groundwater mods from ncar code
  add some clean up to energy
  fix missing czil1 in vege_flux
  move trs options to sfcdif3
  change fveg to shdfac in sfcdif3 vege call
  add sfcdif3 as a separate subroutine
  add canopy heat storage and gvf impact on thermal conductivity
  minor formatting
  update scm_sfc_flux_spec scheme to set some variables needed by non-surface physics
  canopy height dependant czil
  change czil
  set up option for thermal roughness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CCPP v6 Needed for CCPP v6 public release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants