[Thread Prev][Thread Next][Index]
Re: ASCII data with repeating header
Hi Barry,
If your goal is simply to skip over all of the embedded
header lines, then you likely need only specify a multi-line
FORTRAN format to Ferret. Something like
yes? FILE/FORMAT="(/4(6E12.5/))"/COLUMNS=24/...
You may need to experiment to get the FORTRAN format
(especially the line skips) just right, but this is the idea
...
- steve
==============================================
Barry Baker wrote:
> Hello Ferret Users,Sorry to bother you again. I am trying
> to read an ASCII file that contains tmax from the CCC
> CGCM1 GCM. The file structure was written with the
> following FORTRAN code.DO 10 I=1,N where the time step is
> monthly for each year of the run (190001 -
> 210012)WRITE(1,6000) (HEADER(I),I=1,8) - header
> information at the beginning of each month6000 FORMAT(1X,
> A4, I10, 1X, A4,
> 5I10) WRITE(1,6100)(F(I,J),I=1,LONG),J=1,LAT)6100
> FORMAT(1P6E12.5)10 endThe data structure is similar to
> this obviously abbreviated example (long = 24, lat = 8,
> and monthly time steps from 1900 through 2100): GRID
> 190001 PCP 1 24 8
> 0 2
> 6.39497e-01 3.20529e-01 3.25487e-01 3.16142e-01
> 5.08789e-01 2.94294e-01
> 1.47330e-01 2.86701e-01 4.88426e-01 4.12039e-01
> 3.78783e-01 1.52737e+00
> 2.24926e+00 3.43242e+00 3.58947e+00 5.55704e+00
> 7.47205e+00 7.45774e+00
> 5.17427e+00 1.51672e+00 1.49524e+00 1.38906e+00
> 9.73125e-01 9.23517e-01GRID 190002 PCP
> 1 24 8 0 2
> 6.39497e-01 3.20529e-01 3.25487e-01 3.16142e-01
> 5.08789e-01 2.94294e-01
> 1.47330e-01 2.86701e-01 4.88426e-01 4.12039e-01
> 3.78783e-01 1.52737e+00
> 2.24926e+00 3.43242e+00 3.58947e+00 5.55704e+00
> 7.47205e+00 7.45774e+00
> 5.17427e+00 1.51672e+00 1.49524e+00 1.38906e+00
> 9.73125e-01 9.23517e-01: : : : GRID 210012
> PCP 1 24 8 0 2
> 6.39497e-01 3.20529e-01 3.25487e-01 3.16142e-01
> 5.08789e-01 2.94294e-01
> 1.47330e-01 2.86701e-01 4.88426e-01 4.12039e-01
> 3.78783e-01 1.52737e+00
> 2.24926e+00 3.43242e+00 3.58947e+00 5.55704e+00
> 7.47205e+00 7.45774e+00
> 5.17427e+00 1.51672e+00 1.49524e+00 1.38906e+00
> 9.73125e-01 9.23517e-01Thanks to Steve Hankin, I've
> written a JNL script that will read the first block but I
> cannot get past this point and am unsure how to handle the
> t axis. cancel data/all
> cancel variables/all
> define axis/x=1:24:1 long
> define axis/y=1:8:1 lat
> ! define axis/t="15-jan-1900":"15-dec-2100":1 tmnth
> define grid/x=long/y=lat tstgrd
>
> ile/format="(6E12.5)"/grid=tstgrd/var=tmax/columns=24/skip=1
> E:\Projects\ClimData\IPCC\CGCM1\ccc1a.txtI would be very
> grateful if you could help me get past this
> point.Cheers,Barry
> __________________________
>
> Barry Baker, Ph.D.
> Global Climate Change Initiative
> The Nature Conservancy
> 2060 Broadway, Suite 230
> Boulder, CO USA 80302
> Tel: 1 (303) 541-0322
> http://nature.org
>
> You cannot win, you cannot break even, and you cannot get
> out of the game!C.P. Snow
>
--
| NOAA/PMEL | ph. (206)
526-6080
Steve Hankin | 7600 Sand Point Way NE | FAX (206)
526-6744
| Seattle, WA 98115-0070 |
hankin@pmel.noaa.gov
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement