Closed kgerheiser closed 5 years ago
Assigned to @wmputman .
Kyle, how would this bug manifest itself in a simulation? The version of FV3 in GEOS-Chem High Performance (GCHP) may need the fix but I am uncertain of the priority without assessing impact. Do you have test results you could share?
I ran into this when running the GEOS-CTM at resolutions greater than C48. The code would just crash in offline_tracer_advection
with floating invalid
when using dpA to calculate PE because it was half-filled with NaNs.
It's the correct change, i don't test this case very often if ever since we most exclusively run GEOS with z_tracer = T so we always use the tracer_2d_1L routine above this.
This fix appears to correct the issue I was having in GEOS-Chem with this version of FV3 where concentrations were blowing up at our default dynamic timestep. I was getting around it by reducing the timestep but now this is no longer necessary. Thank you!!
I believe I found a bug in fv_tracer2d.F90 when filling the optional
dpA
in the subroutinetracer_2d
. A comparison is made to the globalnsplt
when it should be compared to the localksplt(k)
value. This leads todpA
not being fully filled ifksplt
for that level is less thannsplt
This: https://github.com/GEOS-ESM/GEOSgcm_GridComp/blob/f5fd1e30f4c6ee376c6f799b32cb71e606335dd4/GEOSagcm_GridComp/GEOSsuperdyn_GridComp/FVdycoreCubed_GridComp/fvdycore/model/fv_tracer2d.F90#L546
Should be:
because if
ksplt(k) == 1
for that level, andnsplt == 2
,it
will never be 2 because the outerif ( it .le. ksplt(k) )
will fail and therefore dpA won't be assigned.