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

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



> 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