This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Harry:
The COMINGSOON/BLKDATA protocol is automatically used in ldmsend.c
when the product is bigger than DBUFMAX. See send_fd_info().
Another example is in server/ldmclnt.c. The top level entry point is
's_csbd()'.
The issue is what one is calling a product.
Are the individual "products within a volume" useful independently.
(The individual GRIB files within a model run are.) If so, then what you
are doing make sense. Otherwise, I would wonder.
Another option besides using ldmsend is
to assemble the whole product in a local queue, and
let the ldm worry about shipping it using COMINGSOON/BLKDATA
as appropriate.
Call pqe_new() to allocate space in the queue.
As each piece is available, add it to the product in progress by
'memcpy()'ing it into the storage returned by pqe_new(). If there is
a problem along the way, call pqe_discard(). Otherwise, call pqe_insert()
to commit.
The examples of use of the pqe_xxx functions are in
server/svc.c:{comingsoon_5_svc(), blkdata_5_svc()}
Since there is so much ldm protocol stuff going on there, it is probably
clearer to use the paragraph above and the pq.3 man pages.
Hope this helps.
-glenn