Closed thomas-robinson closed 4 years ago
This is a poor programming choice as the behavior will be compiler dependent. Traditionally there has been nothing in the standard about implied loops and whether the extents are right hand defined or left hand defined. Regardless, the qtend array is explicity defined to have a length of 4, because is is supposed to contain only the water vapor + 3 condensate species as defined for AM3/AM4.
Does this need to be fixed for 2020.02 or can it wait for another release?
Hi, Tom, Rusty. S-J always encouraged explicit loops when doing an array assignment unless the assignment is to a single value.
Lucas
On Mon, Apr 27, 2020 at 2:17 PM bensonr notifications@github.com wrote:
This is a poor programming choice as the behavior will be compiler dependent. Traditionally there has been nothing in the standard about implied loops and whether the extents are right hand defined or left hand defined. Regardless, the qtend array is explicity defined to have a length of 4, because is is supposed to contain only the water vapor + 3 condensate species as defined for AM3/AM4.
Does this need to be fixed for 2020.02 or can it wait for another release?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/issues/34#issuecomment-620149618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMUQRVBVE5MZYEVMZN3AXQTROXDZXANCNFSM4MSAMBQA .
As this logic is purely for a diagnostic added by the physics team and only affects the GFDL driver, I will fix this change for the GNU compiler. Look for a coming PR for you to approve.
This can wait, but it is needed for running with gfortran
When I run AM4 with the gnu compiler on gaea (prod), I encounter an error with an invalid reference to memory. When running in debug mode, the following error occurs:
This happens on line 437 of driver/GFDL/atmosphere.F90
Are
qtend
andAtm(mygrid)%q
supposed to be the same size?