Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

OBSGRID.exe fails after a few seconds

Alpha_su

New member
Hello!

I am using obsgrid.exe to combine my WPS output (i.e., met_em*.nc files) with observation datasets of ds046.1 and ds035.1. My research domain covers entire China, with a spatial resolution of 27km. I want to improve the accuracy of meteorological parameters, so I tried to use the OBSGRID.exe tool. I followed the user guide (OBSGRID/ObsNudgingGuide.pdf at master · wrf-model/OBSGRID) to compile and run the tool. However, when I finally ran the obsgrid.exe, the program failed after a few seconds with the following segmentation error:
----------------------------------------------------------------------------
Time period #00227 is for date 2019-01-29_18:00:00
Time period #00228 is for date 2019-01-29_21:00:00
Time period #00229 is for date 2019-01-30_00:00:00

Time Loop Processing, date = 2019-01-01_12:00:00


#########################################################################
Setting radius of influence for Cressman scheme
The radius of influence of each scan is set to:
20, 14, 10, 7,
#########################################################################

Setting up LAMBERT CONFORMAL map...
Computed cone factor: 0.539
Computed pole (x,y) = 93.514 488.799

Setting up LAMBERT CONFORMAL map...
Computed cone factor: 0.539
Computed pole (x,y) = 94.014 489.299

Using ./OBS:2019-01-01_12 as obs input file


Number of observations successfully ingested: 2420.
Number of empty observations discarded: 456.
Number of observations discarded outside of domain: 45141.

Of the 2420 observations reported, 184 of them are duplicates, leaving 2236 merged locations
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libpthread-2.27.s 0000153831016980 Unknown Unknown Unknown
obsgrid.exe 0000000000463B40 Unknown Unknown Unknown
obsgrid.exe 0000000000468024 Unknown Unknown Unknown
obsgrid.exe 00000000004123C6 Unknown Unknown Unknown
obsgrid.exe 000000000041E554 Unknown Unknown Unknown
obsgrid.exe 000000000040C3BD Unknown Unknown Unknown
libc-2.27.so 0000153830C34C87 __libc_start_main Unknown Unknown
obsgrid.exe 000000000040C2BA Unknown Unknown Unknown
I have searched the forum and found similar errors, but could not find a suitable solution. I have also run the command "ulimit -s unlimited", but the error remains.

The attach file is the namelist.oa file. Other input files (e.g., met_em*.nc and OBS*) can be found here example input files. I guess this problem may be a result of substantial amount of obs from ds046.1 dataset (please refer to the image below, which is output by ./util/station.ncl within OBSGRID package). If so, is there any tool which can be used to decrease the density of the observations?

Any suggestion will be appreciated!

Su Yi
stat_distribution.png
 

Attachments

  • configure.oa.txt
    1.7 KB · Views: 13
I had the same issue. Can confirm that the fix provided in the post referenced above worked. For reference, the fix requires wrapping the conditional starting on line 3159 with the following conditional statement: "if (associated(next)) then".

This issue became apparent to me trying to input a sounding to obsgrid. To try to isolate the problem, I cut the sounding down to only a a few data records, which still resulted in the same segfault error. I then cut the sounding down to a single data record which again resulted in the same error. Finally, with still only using one data record for the sounding, I switched the "sounding" logical in the header record from "T" to "F", which allowed the program to run with no errors. This is obviously not a proper workaround for the problem, but provided purely for debugging purposes for the future, in case the fix in the above post turns out not to be a complete fix of the issue.

This seems to be a legitimate bug that would be worthwhile to address in the future. Although obsgrid hasn't been updated in a long time, there are still plently of people in the community using it for OA and WRF observation nudging purposes.
 
I had the same issue. Can confirm that the fix provided in the post referenced above worked. For reference, the fix requires wrapping the conditional starting on line 3159 with the following conditional statement: "if (associated(next)) then".

This issue became apparent to me trying to input a sounding to obsgrid. To try to isolate the problem, I cut the sounding down to only a a few data records, which still resulted in the same segfault error. I then cut the sounding down to a single data record which again resulted in the same error. Finally, with still only using one data record for the sounding, I switched the "sounding" logical in the header record from "T" to "F", which allowed the program to run with no errors. This is obviously not a proper workaround for the problem, but provided purely for debugging purposes for the future, in case the fix in the above post turns out not to be a complete fix of the issue.

This seems to be a legitimate bug that would be worthwhile to address in the future. Although obsgrid hasn't been updated in a long time, there are still plently of people in the community using it for OA and WRF observation nudging purposes.
Thank you for sharing your solution.
i also found that this segmentation error could also be resolved by re-compiling the OBSGRID program with the gcc compiler (i used ifort during my first blog in June). I followed the compiling procedures shared by Jamal Uddin Khan on this site. No segmentation error appeared with the gcc OBSGRID.

SU Yi
 
I had the same issue. Can confirm that the fix provided in the post referenced above worked. For reference, the fix requires wrapping the conditional starting on line 3159 with the following conditional statement: "if (associated(next)) then".

This issue became apparent to me trying to input a sounding to obsgrid. To try to isolate the problem, I cut the sounding down to only a a few data records, which still resulted in the same segfault error. I then cut the sounding down to a single data record which again resulted in the same error. Finally, with still only using one data record for the sounding, I switched the "sounding" logical in the header record from "T" to "F", which allowed the program to run with no errors. This is obviously not a proper workaround for the problem, but provided purely for debugging purposes for the future, in case the fix in the above post turns out not to be a complete fix of the issue.

This seems to be a legitimate bug that would be worthwhile to address in the future. Although obsgrid hasn't been updated in a long time, there are still plently of people in the community using it for OA and WRF observation nudging purposes.
Thanks for sharing your experience and confirming that the fix works. Your detailed debugging process, including the workaround with the "sounding" logical, adds valuable context for others facing this issue. Addressing this bug is definitely important, especially given the continued use of obsgrid in the community. Hopefully, this helps others and prompts further updates to maintain the tool's reliability.
 
Top