RadxPid not loading SPDB soundings

HI,

I want to use the soundings from the University of Wyoming when I run RadxPid. I’ve been following the steps specified here:
http://wiki.lrose.net/index.php/Storing_soundings_in_SPDB#Overview

All this seems to work, my SPDB files are properly generated, e.g.:
_latest_data_info.lock
_latest_data_info.stat
_latest_data_info
_latest_data_info.xml
_latest_data_info.buf
_lock
20220825.data
20220825.indx

I generated files for the entire month and then I changed the required fields in the PidParams configuration file:
PID_use_soundings_from_spdb = TRUE;
PID_sounding_spdb_url = /Users/bernat/ThunderT7/data/soundings/spdb/;
PID_sounding_location_name = “72240”;

And when I run RadxPid, this is what I get:
TempProfile::loadFromSpdb, url: /Users/bernat/ThunderT7/data/soundings/spdb/
ERROR - could not retrieve sounding
Moving back to search time: 2022/08/25 01:37:13
ERROR - getTempProfile()
No sounding, time: 2022/08/25 01:37:13
name: 72240

The path is good, the station ID as well and I have soundings at 2022/08/25 00:00:00 and 2022/08/25 12:00:00, why is RadxPid not able to retrieve the sounding data??
Thanks,

Bernat

Hi,

I’m sorry to hear you’ve been having issues with the Spdb soundings. Thank you for including the error message.

Can you run SpdbQuery on these files so we can try to diagnose the problem? That will output the Spdb data and some metadata.
Something like the following to output the first sounding at 00Z:
SpdbQuery -url /path/to/data/ -start "2022 08 24 18 00 00" -end "2022 08 25 06 00 00"

Thanks,
Jen

Thanks for your answer Jen. This is what I get:
SpdbQuery -url /Users/bernat/ThunderT7/data/soundings/spdb “2022 08 24 18 00 00” -end “2022 08 25 06 00 00”

url: /Users/bernat/ThunderT7/data/soundings/spdb
Prod label: Sounding Data
Prod id: 301
DataType: 0
N Chunks: 0

See below the first lines of:
SpdbQuery -url /Users/bernat/ThunderT7/data/soundings/spdb -start “2022 08 24 18 00 00” -end “2022 08 25 06 00 00”

==================================================
url: /Users/bernat/ThunderT7/data/soundings/spdb
Prod label: Sounding Data
Prod id: 301
DataType: 0
N Chunks: 1

Header for chunk —> 0 <—
data_type: 72240
data_type2: 0
valid_time: 2022/08/25 00:00:00
expire_time: 2022/08/26 00:00:00
write_time: 2022/11/02 20:10:20
len: 3368
current_compression: none
stored_compression: none

Data for sounding:
Sounding Product
launch time = 2022/08/25 00:00:00
number of points = 77
sourceId = 0
leadSecs = 0
spare int[0] = 0
spare int[1] = 0
lat = 30.116699
lon = -93.216698
alt = 5.000000
missing = -9999.000000
spare float[0] = 0.000000
spare float[1] = 0.000000
sourceName = default
sourceFmt = Unknown
siteName = 72240
Sounding Point 0
pressure = 1011.000000
altitude = 13.309640
u wind = 0.993938
v wind = 0.266325

Hmm, that all looks fine.

The only things that come to mind right now are 1) the temperature data are missing (the snippet you shared cut off right before temperature), 2) the site name being in the wrong format (string vs number), or 3) the search interval is too short. Could you share your parameter files, the spdb file, and a radar file with me? Then I could take a look on my own machine.

Jen

I made all the files available, including the CF-Radial and the whole SPDB data base available here:
https://web.meteo.mcgill.ca/~bernat/tmp/4jen/

Answers to your questions:

  1. The temperature is not missing
    https://web.meteo.mcgill.ca/~bernat/tmp/4jen/SpdbQuery.txt
  2. The site name is defined as string
    https://web.meteo.mcgill.ca/~bernat/tmp/4jen/PidParams
    PID_sounding_location_name = “72240”;
  3. We have sounding every 12h, the search interval is set to 1day,
    PID_sounding_search_time_margin_secs = 86400;
    https://web.meteo.mcgill.ca/~bernat/tmp/4jen/PidParams

Thanks for your help,
Bernat

I sent the problem to Mike and he found a bug, which will require a rebuild of LROSE, but included a temporary fix if you only have one sounding location. Please see below:

I found a bug in the radar library routine that reads in the Spdb data, when the station name is specified.

I have fixed that and checked it in, but getting that will require a rebuild.

However, since there is only one station in the spdb file, there is a quick fix.

In PidParams.txt, change:

PID_sounding_location_name = “72240”;

to

PID_sounding_location_name = “”;

and it should find the soundings, since it will take any station it finds.

Thank you! It worked!

I have one extra question, does LROSE have tools to convert NETCDF sounding files to the raw format (TTAA, TTBB) required to generate the SPDB database ?

Bernat

Great to hear!

I don’t believe those tools exist, but I can ask around. Regardless, it’s good to know that there is a need there. I think there is a desire to eventually move away from Spdb to something like NetCDF soundings, but I don’t know of any plans to do so yet.

One last question Jen. Do you know if RadxPid takes the closest sounding or interpolates the 2 nearest ones in time?

I think it takes the closest sounding, but I’ll double check with Mike.