Re: filemane is undefined?

From: Don Murray <Don.Murray_at_nyahnyahspammersnyahnyah>
Date: Sun Sep 18 2011 - 05:58:10 MDT

Hi Ugo-

Your checks to define filename all fail so filename never gets set. The
last one should be:

   if ((systemdate.ge.24).or.(systemdate.lt.06)) then
     filename = url + "gfs_master_18z"
   end if

(.or. instead of .and.)

Don

On 9/18/11 1:46 AM, ugo merlini wrote:
>
> ;----------------------------------------------------------------------
> ; This example shows how to read geographic data
> ; from Natural Earth shapefiles
> ; and plot them as polylines and polygons.
> ;----------------------------------------------------------------------
> ; This particular example plots data for Switzerland.
> ;----------------------------------------------------------------------
> ; Download the shapefiles from http://www.naturalearthdata.com/
> ; Unzip to a directory
> ;----------------------------------------------------------------------
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>
> begin
>
>
> ;******************
> ; read gfs data *
> ;******************
>
> url = "http://nomad1.ncep.noaa.gov:9090/dods/gfs_master/gfs" +
> systemfunc("date +%Y%m%d") + "/"
> systemdate = systemfunc("date +%H")
>
> if ((systemdate.ge.06).and.(systemdate.lt.12)) then
> filename = url + "gfs_master_00z"
> end if
> if ((systemdate.ge.12).and.(systemdate.lt.18)) then
> filename = url + "gfs_master_00z"
> end if
> if ((systemdate.ge.18).and.(systemdate.lt.24)) then
> filename = url + "gfs_master_00z"
> end if
> if ((systemdate.ge.24).and.(systemdate.lt.06)) then
> filename = url + "gfs_master_18z"
> end if

-- 
Don Murray
NOAA/ESRL/PSD and CIRES
303-497-3596
http://www.esrl.noaa.gov/psd/people/don.murray/
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Sep 18 07:58:16 2011

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2011 - 17:12:44 MDT