[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



> (C) However, when I run the same command-line Bourne shell script in a 
> Terminal window from my own Mac laptop while logged remotely onto account 
> “ldm” on virga, the same script (called "GOES_W_IR.xvfb.sh”) fails as follows:
> 

If you failed when you logging remotely with a different user account, I would 
think that is a permission issue, could you do the 'sudo' runIDV in 'ldm' 
account? 

Yuan
> ———————————
> ldm_virga% GOES_W_IR.xvfb.sh 20041503 -keep
> 
> ********************************************************
> Attempting to create GOES-West IR image for 03Z April 15, 2020
> Running runIDV GOES_W_IR.isl, at time 20041503.
> Running runIDV GOES_W_IR.isl  with DISPLAY virga:99
> loadDataSource
> 3D [dev] 1.6.0-pre12-daily-experimental daily
> 
> Error loading bundle: /usr/local/unidata/scripts_isl/GOES_W_IR.xidv
> java.lang.NoClassDefFoundError: Could not initialize class 
> visad.java3d.VisADCanvasJ3D
> at visad.java3d.DisplayImplJ3D.initialize(DisplayImplJ3D.java:420)
> at visad.java3d.DisplayImplJ3D.<init>(DisplayImplJ3D.java:304)
> at visad.java3d.DisplayImplJ3D.<init>(DisplayImplJ3D.java:291)
> at 
> ucar.unidata.view.geoloc.MapProjectionDisplayJ3D.<init>(MapProjectionDisplayJ3D.java:202)
> at 
> ucar.unidata.view.geoloc.MapProjectionDisplay.getInstance(MapProjectionDisplay.java:405)
> at 
> ucar.unidata.view.geoloc.MapProjectionDisplay.getInstance(MapProjectionDisplay.java:374)
> at 
> ucar.unidata.idv.MapViewManager.doMakeDisplayMaster(MapViewManager.java:495)
> at ucar.unidata.idv.ViewManager.getMaster(ViewManager.java:5346)
> at ucar.unidata.idv.ViewManager.captureIslImage(ViewManager.java:6284)
> at ucar.unidata.idv.ui.ImageGenerator.captureImage(ImageGenerator.java:4476)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processTagImage(ImageGenerator.java:3139)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at ucar.unidata.idv.ui.ImageGenerator.processNode(ImageGenerator.java:1066)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processChildren(ImageGenerator.java:1126)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processTagGroup(ImageGenerator.java:2945)
> at ucar.unidata.idv.ui.ImageGenerator.processTagIsl(ImageGenerator.java:2892)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at ucar.unidata.idv.ui.ImageGenerator.processNode(ImageGenerator.java:1066)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processScriptFile(ImageGenerator.java:965)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processScriptFile(ImageGenerator.java:889)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processScriptFile(ImageGenerator.java:876)
> at 
> ucar.unidata.idv.ui.ImageGenerator.processScriptFiles(ImageGenerator.java:860)
> at ucar.unidata.idv.ArgsManager$1.run(ArgsManager.java:407)
> at ucar.unidata.idv.ArgsManager.runInitRunnables(ArgsManager.java:454)
> at ucar.unidata.idv.ArgsManager.access$000(ArgsManager.java:73)
> at ucar.unidata.idv.ArgsManager$3.run(ArgsManager.java:433)
> at ucar.unidata.util.Misc$3.run(Misc.java:1243)
> An error occurred:java.lang.NoClassDefFoundError: Could not initialize class 
> visad.java3d.VisADCanvasJ3D
> 
> File 20041503_gwir.gif not created.
> ———————————
> 
> (D) The same script also fails on virga (after runIDV begins loading the 
> bundle, or after the bundle has been loaded) when it is triggered  by the LDM 
> in a pqact action when a GOES-17 full disk IR image arrives. In that case, 
> the only diagnostic output that I have captured from runIDV is the following:
> 
> Tue Apr 14 21:11:38 PDT 2020: Loading bundle: 
> /usr/local/unidata/scripts_isl/GOES_W_IR.xidv
> 
> (There are no further messages that I’ve figured out how to capture.)
> 
> In case you’re in a position to examine them for shortcomings, I’ve attached 
> a the following files to this message:
> 
> (1) Bourne shell script “GOES_W_IR.xvfb.sh", which runs Xvfb, sets the value 
> of the DISPLAY environment variable, and runs "runIDV GOES_W_IR.isl” to 
> create a GIF image of an IDV display (along with a bunch of other steps to 
> set up these actions).
> 
> (2) ISL script “GOES_W_IR.isl", which is the sole argument for runIDV. This 
> ISL script in turn loads and executes the following IDV bundle:
> 
> (3) IDV bundle “GOES_W_IR.xidv".
> 
> (The commands that run Xvfb and set the DISPLAY variable appear near the 
> beginning of script GOES_W_IR.xvfb.sh.)
> 
> I wonder what I’m missing? It is a show-stopper for me if I can’t get IDV ISL 
> scripts to run headlessly on virga.
> 
> — Dave
> 
> By the way, the output should comprise a GIF image that looks like this:
> 
> 
> 
> 
> 
> 
> ***************************************************************
> * Dr. Dave Dempsey, Prof. Emeritus  |       ^    ___    \|/   *
> * Dept. of Earth & Climate Sciences |  )   ^   /||_||\ —-0—-  *
> * San Francisco State University    | )  )    / ||_|| \ /|\   *
> * 1600 Holloway Ave.                |  )  )  /  ||_||  \      *
> * San Francisco, CA   94132         |  )  ) /   ||_||   \  ^  *
> *                                   | )  )  )   ||_||    \    *
> * Cell:   (415) 802-5548            |  )  )  )~~||~||~~~~~\~~ *
> * Email:  address@hidden          | )  )  )  ) ~  ~ ~ ~ ~ ~ *
> ***************************************************************
> 
> 
> > On Apr 14, 2020, at 10:05 AM, Unidata IDV Support <address@hidden> wrote:
> >
> >> 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.
> >
> >
> 
> 
> 
> 
> 
> 


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.