Re: your mail

From: Ethan Alpert (ethan AT unknown)
Date: Fri Apr 09 1999 - 09:42:17 MDT


>
> Is it possible using LLU to make cell array like in example pgkex18 such
> as the cell arrays are divided by black lines?
> Michele

This kind of plot can be done very easily and quickly in NCL. Below is
a short script that demonstrates this capability. The data and output for this
script can be found at:

data:
        http://ngwww.ucar.edu/misc_images/data.nc
output:
        http://ngwww.ucar.edu/misc_images/raster_mode.jpg
script:
        http://ngwww.ucar.edu/misc_images/raster_mode.ncl
        
I think the following script will run with 4.1 for sure and perhaps 4.0.1

Wouldn't you rather write 30 lines of NCL than have to write
FORTRAN code to read your data, set up a cell array, set up a label bar
and then trick autograph into drawing tickmarks. ;)

By the way, adding a map to this script is really easy.

Anyhow use whatever you're comfortable with. I just wanted to let you know
there are options.

Cut below line. Save data.nc and raster_mode.ncl in the directory you want
to run and type:

ncl < raster_mode.ncl
--------------------------------------------------------------------------------
begin
;
; Read Data
; Here the data is a netCDF file but GRIB, HDF, and CRAY COS BLOCKED binary
; CCM files can be read with addfile.
;
; Functions for binary and ascii data are also included in NCL.
;
        a = addfile("./data.nc","r")
        T = a->T
;
; Set up data field with coordinate information
;
        data_field = create "data_field" scalarFieldClass defaultapp
                "sfDataArray" : T
                "sfXArray" : T&lon
                "sfYArray" : T&lat
        end create

;
; Create output NCGM file with blue-green-red colormap
;
        wks = create "wks" ncgmWorkstationClass defaultapp
                "wkColorMap" : "temp1"
                "wkMetaName" : "raster_mode.ncgm"
        end create
;
; Create a contour plot
; "cnRasterModeOn" indicates to the contourplot that it should draw
; discrete cells rather than interpolate areas
;

        contour_plot = create "contour_plot" contourPlotClass wks
                "cnScalarFieldData" : data_field
                "cnRasterModeOn" : True
                "cnLinesOn" : False
                "cnLineLabelsOn" : False
                "cnFillColors" : ispan(2,63,4)
                "pmTitleDisplayMode" : "ALWAYS"
                "tiMainString" : T@long_name
        end create

        draw(contour_plot)
        frame(wks)
end

        

        

        

        



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:40:36 MDT