Hi Martin,
You still need the /COLUMNS qualifier, which describes the
organization of the data in the file. The /GRID= qualifier
describes the shape of the grid that PyFerret or Ferret will use
to interpret the data once it's read in, acting very much like the
RESHAPE function.
This data has all 10368 values in one record, so PyFerret needs
that information.
yes? define axis/x=-180:180:2.5/edges/unit=degrees_east xd
yes? define axis/y=-90:90:2.5/edges/unit=degrees_north yd
yes? define grid/x=xd/y=yd gxy
yes? set data/ez/col=10368/var=cline/grid=gxy cf_01.txt
yes? shade cline
Without /COLUMNS=10368, only the first value of the first (and
only) record would be read.
-Ansley
On 7/22/2019 1:11 PM, Martin Schmidt
wrote:
Hi
all,
the attached data file is complemented by a description, which
allows to put the data onto a lat/lon grid.
Here is the definition of the grid. wc -w shows the correctness of
the grid size.
yes? define axis/x=-180:180:2.5/edges/unit=degrees_east xd
yes? define axis/y=-90:90:2.5/edges/unit=degrees_north yd
yes? define grid/x=xd/y=yd gxy
yes? let gd = x[gx=gxy]+y[gy=gxy]
Now we read the data onto a line:
yes? set data/ez/col=10368/var=cline lcf_01.txt
and reshape to the grid
yes? let cloud = reshape(cline,gd)
shade cloud shows a "good looking" plot of global cloud cover.
However, set data/ez offers the /grid attribute. So the following
may work:
yes? set data/ez/var=cline/grid=gxy cf_01.txt
yes? sh data
1> lcf_01.txt (default)
name title I J K
L
CLINE cline 1:144 1:72
... ...
Looks good! However:
shade cline gives a strange plot and
yes? sh data
1> lcf_01.txt (default)
name title I J K
L
CLINE cline 1:144 1:1 ...
...
Playing with the format and adding /del=delimited and so on does
not resolve the problem.
Do I something wrong or is this a bug in pyferret 7.4 and 7.5?
Best regards,
Martin
--
Ansley Manke
NOAA/PMEL Science Data Integration Group
7600 Sand Point Way NE
206-526-6246