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 CO2 run (v14.1) #1805
Comments
Thanks for writing @lfeng89089. I think the problem is that you cannot mix level-centered and level-edged diagnostics in the same diagnostic collection, as the netCDF COARDS convention requires that there be only one vertical dimension per file. Ww would recommend that you create a new collection just for the .....
SatDiagnEdge.template: '%y4%m2%d2_%h2%n2z.nc4',
SatDiagnEdge.format: 'CFIO',
SatDiagnEdge.frequency: 00000001 000000
SatDiagnEdge.duration: 00000001 000000
SatDiagnEdge.hrrange: 11.98 15.02
SatDiagnEdge.mode: 'time-averaged'
SatDiagnEdge.fields: 'SatDiagnPEdge ', and this should fix the issue. |
Hi Bob,
Many thanks
But the run still crashed with memory error even I only include CO2 as output for SatDiagn. Below is the error message:
```console
Creating file for SatDiagn; reference = 20190201 000000
with filename = OutputDir/GEOSChem.SatDiagn.20190201_0000z.nc4
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
geos_v14 0000000000D0264A Unknown Unknown Unknown
libpthread-2.31.s 00007ED67AFB7420 Unknown Unknown Unknown
geos_v14 0000000000760279 history_netcdf_mo 858 history_netcdf_mod.F90
geos_v14 0000000000744375 history_mod_mp_hi 3064 history_mod.F90
geos_v14 00000000004070E7 MAIN__ 2006 main.F90
geos_v14 0000000000405D22 Unknown Unknown Unknown
libc-2.31.so 00007ED67ADD5083 __libc_start_main Unknown Unknown
geos_v14 0000000000405C2E Unknown Unknown Unknown
```
Many thanks.
|
Thanks for the error message. The error is happening at line 858 of !------------------------------------------------------------------
! 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. ! <=== line where error happens
Item%nUpdates = 1.0
ENDIF Did you add Probably what is happening is that SatDiagn.template: '%y4%m2%d2_%h2%n2z.nc4',
SatDiagn.format: 'CFIO',
SatDiagn.frequency: 00000001 000000
SatDiagn.duration: 00000001 000000
SatDiagn.hrrange: 11.98 15.02
SatDiagn.mode: 'time-averaged'
SatDiagn.fields: 'SatDiagnConc_CO2 '
'SatDiagnCount ' We can put in a bug fix that would halt the run if you have any of the SatDiagn diagnostics selected in HISTORY.rc, but not SatDiagnCount. That would stop the run right away instead of letting a long simulation go on and then dying when you get to the time to write out diagnostics. This can be added to either 14.2.1 or 14.3.0, which are the next versions in line. |
Also @lfeng89089, I realize the documentation can also be improved as well. We can work on that too. |
@lfeng89089, I think I've found the root cause. In !------------------------------------------------------------------------
! Set a single logical for SatDiagn output
!------------------------------------------------------------------------
State_Diag%Archive_SatDiagn = ( &
State_Diag%Archive_SatDiagnColEmis .or. &
State_Diag%Archive_SatDiagnSurfFlux .or. &
State_Diag%Archive_SatDiagnOH .or. &
State_Diag%Archive_SatDiagnRH .or. &
State_Diag%Archive_SatDiagnAirDen .or. &
State_Diag%Archive_SatDiagnBoxHeight .or. &
State_Diag%Archive_SatDiagnPEdge .or. &
State_Diag%Archive_SatDiagnTROPP .or. &
State_Diag%Archive_SatDiagnPBLHeight .or. &
State_Diag%Archive_SatDiagnPBLTop .or. &
State_Diag%Archive_SatDiagnTAir .or. &
State_Diag%Archive_SatDiagnGWETROOT .or. &
State_Diag%Archive_SatDiagnGWETTOP .or. &
State_Diag%Archive_SatDiagnPARDR .or. &
State_Diag%Archive_SatDiagnPARDF .or. &
State_Diag%Archive_SatDiagnPRECTOT .or. &
State_Diag%Archive_SatDiagnSLP .or. &
State_Diag%Archive_SatDiagnSPHU .or. &
State_Diag%Archive_SatDiagnTS .or. &
State_Diag%Archive_SatDiagnPBLTOPL .or. &
State_Diag%Archive_SatDiagnMODISLAI .or. &
State_Diag%Archive_SatDiagnWetLossLS .or. &
State_Diag%Archive_SatDiagnWetLossConv .or. &
State_Diag%Archive_SatDiagnJval .or. &
State_Diag%Archive_SatDiagnJvalO3O1D .or. &
State_Diag%Archive_SatDiagnJvalO3O3P .or. &
State_Diag%Archive_SatDiagnDryDep .or. &
State_Diag%Archive_SatDiagnDryDepVel .or. &
State_Diag%Archive_SatDiagnOHreactivity )
!------------------------------------------------------------------------
! Satellite diagnostic: Counter
!------------------------------------------------------------------------
IF ( State_Diag%Archive_SatDiagn ) THEN
! Array to contain the satellite diagnostic weights
ALLOCATE( State_Diag%SatDiagnCount( State_Grid%NX, &
State_Grid%NY, &
State_Grid%NZ ), STAT=RC )
CALL GC_CheckVar( 'State_Diag%DiagnCount', 0, RC )
IF ( RC /= GC_SUCCESS ) RETURN
State_Diag%SatDiagnCount = 0.0_f4
State_Diag%Archive_SatDiagnCount = .TRUE.
ENDIF This should make sure that the Try adding State_Diag%Archive_SatDiagn = ( &
State_Diag%ArchiveSatDiagnConc .or. & <=== add this line here
State_Diag%Archive_SatDiagnColEmis .or. &
... etc ... and then see if you can run without getting the error. We will try to fix this (and maybe add an error trap for this condition) in an upcoming version. |
We can now close out this issue as PR #1808 has been merged into the GEOS-Chem 14.2.1 devlopment stream. |
Hi Bob, But after modifying the two files according to your instructions, it still can't run. Below is the new error message: Looking forward to your reply. Many thanks! |
Thanks for writing @Kexin828. If you could please open a new issue, this will help us to track the problem more efficiently. |
Thank you for your reply. |
Though this issue was closed by the contributor, there is another point we should be careful about. I just followed the steps above to solve the same problem I also encountered. After I added a new line |
In my tests for v14.1 CO2 simulation, all runs go smoothly when SatDiagn is off. However when I turn on SatDiagn, various problems appears. Here is one example setting for HISTORY.rc :
The simulation will crash at end of first day with segmentation error:
if I also included Pressure Edge to to the collection
SatDiagnPEdge
, I got an error message to complain ' no OH field included in the simulation '
I am not sure whether other people have met similar problem..
The text was updated successfully, but these errors were encountered: