You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subroutine Lagrangian_to_Eulerian expects the array dtdt (or dtdt_m internally) to be allocated: fv_mapz.F90, around line 200:
real, intent(inout):: dtdt(is:ie,js:je,km)
In fv_dynamics.F90, however, this array is only allocated under certain conditions:
if ( idiag%id_mdt > 0 .and. (.not. do_adiabatic_init) ) then
allocate ( dtdt_m(is:ie,js:je,npz) )
...
This can go very wrong and lead to model crashes or data corruption (luckily, it hasn't on the platforms and for the compilers we have been using so far; but we have seen similar cases leading to model crashes in the physics). A simple solution is to always allocate the array or make it an automatic array so that it gets allocated only once and only reset every time. Or make the variable declaration in Lagrangian_to_Eulerian an assumed-size declaration, in which case passing an unallocated object should be allowed:
real, intent(inout):: dtdt(:,:,:)
This affects the non-CCPP option only. For CCPP the corresponding array is a member of the CCPP_interstitial data type and is always allocated.
The text was updated successfully, but these errors were encountered:
No, this is still an issue and needs to be addressed. The solution, however, will be easy now that we can remove the IPD related code - as soon as that is done and only the CCPP version remains, the array will always be allocated.
This affects the non-CCPP option only.
Subroutine
Lagrangian_to_Eulerian
expects the array dtdt (or dtdt_m internally) to be allocated:fv_mapz.F90
, around line 200:In
fv_dynamics.F90
, however, this array is only allocated under certain conditions:This can go very wrong and lead to model crashes or data corruption (luckily, it hasn't on the platforms and for the compilers we have been using so far; but we have seen similar cases leading to model crashes in the physics). A simple solution is to always allocate the array or make it an automatic array so that it gets allocated only once and only reset every time. Or make the variable declaration in
Lagrangian_to_Eulerian
an assumed-size declaration, in which case passing an unallocated object should be allowed:This affects the non-CCPP option only. For CCPP the corresponding array is a member of the CCPP_interstitial data type and is always allocated.
The text was updated successfully, but these errors were encountered: