Possibly incorrect rho representation in PUMAS downstream diagnostics
- Dominant language
- Fortran
- Stars
- 11
- Forks
- 24
- Avg merge
- 5h 25m
- Merged PRs (30d)
- 1
Description
During the review of CCPPized PUMAS, https://github.com/ESCOMP/atmospheric_physics/pull/357, @nusbaume originally wrote:
> There might be a science bug here, in that the rho is calculated using the dry air gas constant and regular temperature (but the full pressure), and is then being used to convert the value of various mass number concentration variables (like ncic), which is with respect to the mass of moist air and condensed water. I obviously wouldn't worry about fixing it here, but might be worth opening an issue so that we can double-check it in the future?
>
> Also pinging @PeterHjortLauritzen in case I am totally wrong here.
Jesse originally referred to the post-interstitial CCPP code, which is adapted from CAM:
https://github.com/ESCOMP/CAM/blob/5f582d41d2a109a5eb5369e0c8b7975d8e2ea4c4/src/physics/cam7/micro_pumas_cam.F90#L3055-L3061
```fortran
! Calculate rho (on subcolumns if turned on) for size distribution
! parameter calculations and average it if needed
!
! State instead of state_loc to preserve answers for MG1 (and in any
! case, it is unlikely to make much difference).
rho(:ncol,top_lev:) = state%pmid(:ncol,top_lev:) / &
(rair*state%t(:ncol,top_lev:))
...
do k = top_lev, pver
!$acc data copyin (mg_liq_props,icwmrst_grid(:ngrdcol,k),rho_grid(:ngrdcol,k)) &
!$acc copy (ncic_grid(:ngrdcol,k)) &
!$acc copyout (mu_grid(:ngrdcol,k),lambdac_grid(:ngrdcol,k))
call size_dist_param_liq(mg_liq_props, icwmrst_grid(:ngrdcol,k), &
ncic_grid(:ngrdcol,k), rho_grid(:ngrdcol,k), &
mu_grid(:ngrdcol,k), lambdac_grid(:ngrdcol,k), ngrdcol)
!$acc end data
end do
```
This `rho` is used consistently with the `rho` defined internally in PUMAS
https://github.com/ESCOMP/PUMAS/blob/3e6bb5463436931d2af6aad419ee408a49723c67/micro_pumas_v1.F90#L1309-L1313
Personally, I am not sure if we should keep the `rho`s consistent between PUMAS and the downstream interstitials. If yes, then a PUMAS change is almost surely above-roundoff answer changing for CAM7. If no, then what are the impacts of such inconsistency?
If a change is suggested, it would have to be coordinated among all the models that use PUMAS so the downstream diagnostics code is consistent.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.