[Thread Prev][Thread Next][Index]

ASCII data with repeating header



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 month
6000 FORMAT(1X, A4, I10, 1X, A4, 5I10)
WRITE(1,6100)(F(I,J),I=1,LONG),J=1,LAT)
6100 FORMAT(1P6E12.5)
10 end
 
The 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-01
 
GRID    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-01
 
Thanks 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
file/format="(6E12.5)"/grid=tstgrd/var=tmax/columns=24/skip=1 E:\Projects\ClimData\IPCC\CGCM1\ccc1a.txt
 
I 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

 

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement