-
Notifications
You must be signed in to change notification settings - Fork 170
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
SatDiagn problems in gcclassic fullchemistry run (v14.1) #2017
Comments
Thanks for raising this issue @Kexin828. The run died at line 828 of !---------------------------------------------------------------------
! For instantaneous diagnostic quantities:
! (1) Copy the Item's data array to the 4-byte or 8-byte local array
! (2) Zero the Item's data array
! (3) Zero the Item's update counter
!
! For time-averaged diagnostic quantities:
! (1) Divide the Item's data array by the number diagnostic updates
! (2) Copy the Item's data array to the 4-byte or 8-byte local array
! (3) Zero the Item's data array
! (4) Zero the Item's update counter
!---------------------------------------------------------------------
SELECT CASE( Item%SpaceDim )
!------------------------------------------------------------------
! 3-D data
!------------------------------------------------------------------
CASE( 3 )
! Get dimensions of data
Dim1 = SIZE( Item%Data_3d, 1 )
Dim2 = SIZE( Item%Data_3d, 2 )
Dim3 = SIZE( Item%Data_3d, 3 )
! Get average for satellite diagnostic:
IF ( Container%name == 'SatDiagn' ) THEN
Item%Data_3d = Item%Data_3d / State_Diag%SatDiagnCount
Item%nUpdates = 1.0
ENDIF It may be that State_Diag%SatDiagnCount is zero, and that this caused a div-by-zero error. Maybe there is a grid box where there are no matching observations. Perhaps what we should do here is to fill |
@Kexin828: try this: ! Get average for satellite diagnostic:
IF ( Container%name == 'SatDiagn' ) THEN
IF ( State_Diag%SatDiagnCount > 0 ) THEN
Item%Data_3d = Item%Data_3d / State_Diag%SatDiagnCount
ELSE
Item%Data_3d = UNDEFINED
ENDIF
Item%nUpdates = 1.0
ENDIF where |
Thank you very much! I have solved this problem. |
Thanks @Kexin828. I will leave this issue open to remind us to make this fix in an upcoming version. |
Just a note - this issue has cropped up again (in GC 14.1.0). I'm trying to use SatDiagn within the carbon cycle simulation. However, the proposed fix seems not to quite work for me, because I get the following error:
I think this implies that SatDiagnCount is somehow not a single number value? I'm unclear why this would be happening, but it might point to something wrong with my original configuration of the Satellite Diagnostic or it might be an issue with using SatDiagn in the carbon mod sim. |
Thanks @JFBrewer. I'll take a look into this. We also haven't yet implemented the workaround described above so I'll do that as well. |
@JFBrewer: I think I've found the issue. The !------------------------------------------------------------------
! 3-D data
!------------------------------------------------------------------
CASE( 3 )
! Get dimensions of data
Dim1 = SIZE( Item%Data_3d, 1 )
Dim2 = SIZE( Item%Data_3d, 2 )
Dim3 = SIZE( Item%Data_3d, 3 )
! Get average for satellite diagnostic:
IF ( INDEX( Container%name, 'SatDiagn' ) > 0 ) THEN
WHERE( State_Diag%SatDiagnCount > 0 )
Item%Data_3d = Item%Data_3d / State_Diag%SatDiagnCount
ELSEWHERE
Item%Data_3d = UNDEFINED
ENDWHERE
Item%nUpdates = 1.0
ENDIF |
In my code, this did change the nature of the error, but I'm still getting a segfault for an |
I'm wondering if there's more to this error than meets the eye? In particular, when I ask SatDiagn to return just the following diagnostics:
it gets all the way to the previously specified error and then dies, claiming that SatDiagnCount is 0 for some reason. However, the moment I add additional diagnostic outputs that don't depend on species concentrations (e.g., SatDiagnRH or SatDiagnTAir), the simulation errors out in the very first timestep, with the following errors in diagnostics_mod.F90:
Clearly this is a deeper problem, given that it's come up before, but it makes me wonder if, in my specific case, we could have two separate but overlapping errors:
Anyway, I'm still not sure what is going on but I figured I'd drop the results of my sleuthing so far in here just in case that's helpful. |
This should now be fixed by PR #2369, which is currently in testing. |
We can now close this issue, as PR #2369 has been merged into the GEOS-Chem "no-diff-to-benchmark" development stream. This fix is on track to ship with 14.4.2. |
Name:Zhang Kexin
Institution:Tsinghua university
Hi Bob,
In my tests for v14.1 fullchemistry simulation, I meet problems as follow:
After reading your answer to 'SatDiagn problems in gcclassic CO2 run (v14.1) #1805', I made a revision.
But after modifying the two files according to your instructions, it still can't run. Below is the new error message:
I am not sure whether other people have met similar problem.Looking forward to your reply. Many thanks!
The text was updated successfully, but these errors were encountered: