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

[GEMPAK #VWZ-136850]: Creating an Ensemble Mean with GEMPAK



> Steve,
> 
> I found the logs files and here is the error I am getting:
> 
> [GEMPLT -101] NOPROC - Nonexistent executable.
> Error in message send = 22 itype, ichan, nwords,0,-1,3
> msgget: Permission denied.
> semget: Permission denied.

Greg,

If you are using the _gf version of a program, it shouldn't be trying to
exec gplt, or a device driver. 

Using gdplot2_gf with DEVICE=gf|outfile.gif|xsize;ysize eliminates all
instances of using gplt, and therefore you also don't have to run gpend
(which your script that you sent doesn't). The possibilities that come to my 
mind
not having see your Common.cshrc that you are sourcing is executing something, 
or
you aren't executing the same csh that you sent me.

Steve Chiswell
Unidata User Support


> 
> Ideas?
> 
> Greg
> 
> Unidata GEMPAK Support wrote:
> >> Steve,
> >>
> >> I am running Xvfb and do have the DISPLAY variable set in the csh gempak
> >> script. When I execute the php script through the browser, it acts as
> >> though the gempak program is not even called as the feedback from the
> >> server is almost instantaneous. I have included the simple php and csh
> >> scripts for you to take a look at.
> >>
> >> Any other ideas, or do you know someone doing this I may be able to 
> >> contact?
> >>
> >> Thanks,
> >>
> >> Greg
> >>
> >>
> >
> > Greg,
> >
> > I didn't find your PHP, but did see your csh.
> > In general, the web server is going to run as www, web or nobody user id, 
> > and so
> > will not be the same user as you are when you run the script interactively.
> > Your should also be careful that your Common.cshrc does not contain 
> > anything that
> > is dependent of the interactive session. Also be aware that you should 
> > migrate
> > any use of gdplot to gdplot2 since 5.11.1 will be the last release
> > to support gdplot, gdwind, gdstream and gdmap and gdcntr.
> >
> > Note that you specified DEVICE = gif|/tmp/test.gif.... even though this
> > is a gdplot2_gf program. Nominally the device will be gf but that shouldn't 
> > be
> > an issue. However, you should have your script cd to a working directory
> > where it will have priviledge to write its .nts files etc such as
> > cd /tmp/.web_work so you can create your test.gif in that directory.
> > I typically use a unique directory and outout file name using $$ in csh
> > so that I don't get multiple invocations stepping on themselves. You also
> > want to make sure that you haven't created a /tmp/test.gif as yourself when 
> > testing that the
> > nobody web user can't overwrite.
> >
> > You can look at your web logs to see if there is an error_logindication. 
> > Otherwise,
> > I'd redirect the gdplot2_gf output to a log file for debugging.
> >
> > Steve Chiswell
> > Unidata User Support
> >
> >
> >> Unidata GEMPAK Support wrote:
> >>
> >>>> Steve,
> >>>>
> >>>> One more question. I have been playing around with trying to build a web
> >>>> interface to my ensemble members using php. The php script calls a csh
> >>>> script that sources the Common.cshrc, then  generates the gif images
> >>>> from gdplot_gf based on user selections. When I run the php script from
> >>>> the command line, everything works fine and the image is generated. When
> >>>> I try it through the web browser, the image is not generated.
> >>>>
> >>>> Do you have any ideas what may be going on? Also, if you have experience
> >>>> with this, could you send me a snippet of code as an example on how to
> >>>> do this correctly?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Greg
> >>>>
> >>>>
> >>> Greg,
> >>>
> >>> I don't supply a Common.cshrc with my distribution, but rather have sites 
> >>> source a Gemenviron
> >>> file.
> >>>
> >>> At any rate, the gf device driver required an X server to connect to. 
> >>> When you run interactively, you
> >>> generally have a DISPLAY variable set for you in your environment, as 
> >>> well as some X magic cookies
> >>> for authentication.
> >>>
> >>> When you run from cron, or as a web user, you have to either:
> >>> 1) Use the gif device driver which does not require an X server to talk to
> >>> or,
> >>> 2) Provide a virtual X server, which is typically what I do using the 
> >>> Xvfb virtual frame
> >>> buffer program. This gives me a host that has a virtual screen in memory 
> >>> that all my hosts
> >>> can draw to (I use a host:1.0 screen connection). This DISPLAY must be 
> >>> defined in the environmental
> >>> variable in your script as well.
> >>>
> >>> Steve Chiswell
> >>> Unidata User SUpport
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> Unidata GEMPAK Support wrote:
> >>>>
> >>>>
> >>>>>> Steve,
> >>>>>>
> >>>>>> I have started using the ens_ functions and they work really well. I am
> >>>>>> having a problem though. When I run gdplot or gdcntr with the ens_
> >>>>>> functions manually to create a gif image, it works fine. But when I run
> >>>>>> those applications within a csh script, I do not get a gif image or
> >>>>>> anything...not even any error messages when I look at the log file. I 
> >>>>>> am
> >>>>>> trying to look at the ens_savg(tmpf@2%hght) with my local wrf runs with
> >>>>>> up to 7 members.
> >>>>>>
> >>>>>> Any ideas?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> Greg,
> >>>>>
> >>>>> When you run a script, or interactively to create output to a file, you 
> >>>>> have to make sure you are running "gpend"
> >>>>> so that the device driver knows when you are finished adding 
> >>>>> information to the plot window and write the output file.
> >>>>> Until you run gpend, you can still run other programs and create 
> >>>>> overlays etc.
> >>>>>
> >>>>> If you are using the GF device driver, you also have to ensure that 
> >>>>> your script can connect to an X server just
> >>>>> like your XW. If you are using the GIF device driver, then you do not 
> >>>>> need an X server.
> >>>>>
> >>>>> Steve Chiswell
> >>>>> Unidata User Support
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Greg
> >>>>>>
> >>>>>> Unidata GEMPAK Support wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> Greg,
> >>>>>>>
> >>>>>>> The ENS_ functions available in current GEMPAK releases allow you to
> >>>>>>> use individual input files to create an ensemble by enclosing
> >>>>>>> the list of files in the curly braces eg "{file1; file2; ...fileN}" 
> >>>>>>> in GDFILE.
> >>>>>>> Use ENS_SAVG() to create a mean, as describe in the "phelp gfunc"
> >>>>>>> help documentation for the ENS_ functions.
> >>>>>>>
> >>>>>>>
> >>>>>>> I have the start of a web page showing some ensemble computations at:
> >>>>>>> http://www.unidata.ucar.edu/software/gempak/examples/ensembles/
> >>>>>>>
> >>>>>>> The examples on the web page use the GEFS ensemble members, rather 
> >>>>>>> than
> >>>>>>> a list of individual modelnames in the "{}", but you
> >>>>>>> might find some examples useful.
> >>>>>>>
> >>>>>>> Steve Chiswell
> >>>>>>> Unidata User Support
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> Back in June I attended the COMAP symposium at UCAR in Boulder. While
> >>>>>>>> there, I was told that it is possible to create an ensemble of my 
> >>>>>>>> local
> >>>>>>>> WRF model runs using GEMPAK. If this indeed true, what gempak 
> >>>>>>>> programs
> >>>>>>>> would I need to use to create an ensemble mean from my various 
> >>>>>>>> members?
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>>
> >>>>>>>> Greg
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Greg Garrett
> >>>>>>>> Science and Operations Officer
> >>>>>>>> National Weather Service
> >>>>>>>> Jackson MS
> >>>>>>>> 601.939.2786
> >>>>>>>> address@hidden
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> Ticket Details
> >>>>>>> ===================
> >>>>>>> Ticket ID: VWZ-136850
> >>>>>>> Department: Support GEMPAK
> >>>>>>> Priority: Normal
> >>>>>>> Status: Closed
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> --
> >>>>>> Greg Garrett
> >>>>>> Science and Operations Officer
> >>>>>> National Weather Service
> >>>>>> Jackson MS
> >>>>>> 601.939.2786
> >>>>>> address@hidden
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> Ticket Details
> >>>>> ===================
> >>>>> Ticket ID: VWZ-136850
> >>>>> Department: Support GEMPAK
> >>>>> Priority: Normal
> >>>>> Status: Closed
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>> --
> >>>> Greg Garrett
> >>>> Science and Operations Officer
> >>>> National Weather Service
> >>>> Jackson MS
> >>>> 601.939.2786
> >>>> address@hidden
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: VWZ-136850
> >>> Department: Support GEMPAK
> >>> Priority: Normal
> >>> Status: Closed
> >>>
> >>>
> >>>
> >> --
> >> Greg Garrett
> >> Science and Operations Officer
> >> National Weather Service
> >> Jackson MS
> >> 601.939.2786
> >> address@hidden
> >>
> >>
> >> #!/bin/csh -x
> >>
> >> source /data/nawips/Common.cshrc
> >>
> >> setenv DISPLAY wrf-jan:1
> >>
> >> gdplot_gf << EOF
> >> GDFILE   = /data/nawips/gempak/data/grids/2007091212_wrf_d02_04.gem
> >> GDATTIM  = f03
> >> GLEVEL   = 2
> >> GVCORD   = hght
> >> PANEL    = 0
> >> SKIP     = 0
> >> SCALE    = 0
> >> GFUNC    = tmpf@2%hght
> >> CTYPE    = c/f
> >> CONTUR   = 7/4
> >> CINT     = 2
> >> LINE     = 3//2
> >> FINT     = 2
> >> FLINE    = 5-30
> >> HILO     =
> >> HLSYM    =
> >> CLRBAR   = 1
> >> GVECT    =
> >> WIND     =
> >> REFVEC   =
> >> TITLE    = 6/-2/~ test
> >> TEXT     = 1/33//hw
> >> CLEAR    = y
> >> GAREA    = DSET
> >> IJSKIP   =
> >> PROJ     =
> >> MAP      = 1
> >> MSCALE   = 0
> >> LATLON   =
> >> DEVICE   = gif|/tmp/test.gif|960;720
> >> STNPLT   = 5/1||localcities.tbl
> >> r
> >>
> >> ex
> >> EOF
> >>
> >> exit
> >>
> >>
> >>
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: VWZ-136850
> > Department: Support GEMPAK
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> --
> Greg Garrett
> Science and Operations Officer
> National Weather Service
> Jackson MS
> 601.939.2786
> address@hidden
> 
> 
> 


Ticket Details
===================
Ticket ID: VWZ-136850
Department: Support GEMPAK
Priority: Normal
Status: Closed