[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #QJR-730252]: ISL: Close an IDV display window after capturing an image, or better, dispense with a display window altogether



> IDV supporters,
> â
> Iâm betting that the nature of your work means that youâre not spending 
> all of your âsheltering in placeâ time at home baking bread, streaming 
> movies, and playing with the kids (if any). :-)

Hi Dave,

We have been working from home for a little over a month now, it actually helps 
me to be more focused on some development tasks, and we will have the IDV 6.0 
version very soon. The
new development includes the zero longitudes subsetting, this is the longest 
delay feature and will be available soon.

> 
> Context:
> 
> Iâm running IDV v5.7 on an iMac that is running Mac OS X v10.14 (Mojave).
> 
> Objective Using IDV:
> 
> Iâve attached two files:
> 
> (1) an IDV bundle (GOES_W_IR.RemoteDataAccess.xidv); and
> 
> (2) an IDV ISL script (GOES_W_IR.RemoteDataAccess.isl) that runs the IDV 
> bundle.
> 
> The IDV bundle does this: Via a Ramadda server running on virga.sfsu.edu, it 
> reads a subset of a GOES-West full disk infrared satellite image in NetCDF 
> format (for 00Z April 13, 2020), which resides on virga, and creates a 
> display of the image. Not very complicated. (Sampling the data file at 
> resolutions higher than the default is problematic, but thatâs a different 
> issue.)
> 
> The ISL script does this: It loads the bundle described above, opens an IDV 
> window, creates the display in the window, and saves the display as a GIF 
> file. Thatâs it.
> 
> The Problem:
> 
> By messing around with the ISL script a bit, I managed to get it to create a 
> good GIF image from the IDV display. (Iâve attached a copy.)
> 
> To do this, I had to set the <isl> tagâs âoffscreenâ parameter to 
> âfalseâ. The default is âtrueâ, I think, but when âoffscreenâ is 
> set to âtrue", the image saved by the ISL script is, shall we say, not very 
> close to what Iâm trying to capture. (Iâve attached a copy to contrast 
> with the âgoodâ version. Note that this bad version includes some 
> satellite image in it, which previous attempts lackedâthe output in most 
> cases comprises only the skewed map background with the angled 3-D wireframe 
> box hovering above it.)
> 
> However, one consequence of setting âoffscreenâ to âtrueâ is that the 
> ISL script opens an IDV window and generates a display in it, before 
> capturing the display in the GIF image. I can perhaps live with this (weâll 
> see), but once the GIF image is created, the IDV display window remains open 
> and the script continues running, although itâs task is completed. The 
> script terminates only when I close the window manually.
> 
> So, my question. How can I either:
> 
> (1) Tell the ISL script, after it saves the GIF image of the display, to (a) 
> close the IDV window that it opened, and (b) terminate itself ?

I downloaded your bundle and script. It took too long to load the bundle, I 
guess your RAMADDA server is on a slow network. So I created a
bundle locally using the UNIDATA server, but attached to your script. It worked 
as expected. When the offscreen is set to true, the following
command in the xterm:

$./runIDV /Users/yuanho/downloads/GOES_W_IR.RemoteDataAccess.isl

will generate the image in your folder and you will not see any IDV window 
popup. You will get the message in your xterm like:

Tue Apr 14 10:32:01 MDT 2020: Writing 
image:/Users/yuanho/downloads/20041300_gwir.gif


If you want to produce those images in the cron job script, you don't have the 
x display environment, you need to use the xvnc or xvbf to create
the display environment. 


let me know if you need help with setting xvfb.

Yuian
> 
> or
> 
> (2) Tell the ISL script to create a successful display and capture it in an 
> acceptable GIF image without opening an IDV window at all (i.e., when the 
> <isl> tag parameter âoffscreenâ is set to âtrueâ)?
> 
> Side Notes:
> 
> â Eventually I want to define a pqact.conf entry that launches an incidence 
> of "runIDV ISLscriptâ upon receipt of a satellite image, so it creates a 
> GIF image (for a Web server) automatically. I suspect that solution (2) above 
> will be necessary for that, since I bet that the script wonât be able to 
> open an IDV window on the server when launched that way.
> 
> â The attached ISL script, âGOES_W_IR.RemoteDataAccess.islâ, specifies 
> full paths to the IDV script that it invokes in the ISL <image> tag 
> (âGOES_W_IR.RemoteDataAccess.xidv") and to the GIF output file specified 
> using the ISL <image> tag (â20041300_gwir.gifâ). If you want to test the 
> script yourself, youâll need to edit those two paths appropriately.
> 
> 
> Regards to all of you,
> 
> â Dave
> 
> 
> The desired output, a GIF image of a GOES-West infrared satellite display. 
> The attached ISL script and xidv bundle create this when the âoffscreenâ 
> parameter of the <isl> tag in the ISL script is set to âfalseâ.
> 
> 
> Not the desired output, a screwed up GIF image of a messed up GOES-West 
> infrared satellite display. The attached ISL script and xidv bundle create 
> this when the âoffscreenâ parameter of the <isl> tag in the ISL script is 
> set to âtrueâ.
> 
> 
> 
> 
> 
> 
> 


Ticket Details
===================
Ticket ID: QJR-730252
Department: Support IDV
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.