Skip to content. | Skip to navigation

Personal tools
You are here: GES DISC Home guides Legacy Guides aux_files dao_read_1.f

dao_read_1.f

C**************************************** C C This program will read the DAO sfcprog data file. It C can be easily modified to read other files which contain C other Single Layer records. C C written by Daniel Ziskin ziskin@daac.gsfc.nasa.gov C**************************************** C Each record is a 91x144 grid INTEGER ILAT, ILON PARAMETER (ILAT=91) PARAMETER (ILON=144) C There are nine fields in this file REAL*4 PHIS(ILON,ILAT), ALBD(ILON,ILAT), GWET(ILON,ILAT) REAL*4 PS_PTOP(ILON,ILAT), GTMP(ILON,ILAT), SLB(ILON,ILAT) REAL*4 LWI(ILON,ILAT), UBAR(ILON,ILAT), VBAR(ILON,ILAT) C 31 days in March and readings 4 times per day INTEGER NDAYS,NHRS PARAMETER (NDAYS=31) PARAMETER (NHRS=4) INTEGER IDAY, IHR, LUN, I, J, K DATA LUN /21/ CHARACTER*80 FILENAME FILENAME="e0054A.prs.sfcprog.b850301.e850331" C This OPEN statement was written for an SGI computer. C It was not tested on any other platform and may fail. OPEN(UNIT=LUN, STATUS='OLD', + FILE=FILENAME, ACCESS='SEQUENTIAL',FORM='UNFORMATTED') C************ THESE LOOPS READ THE WHOLE FILE ********** C DO 80 IDAY=1,NDAYS C DO 70 IHR=1,NHRS C READ(UNIT=LUN)PHIS C READ(UNIT=LUN)ALBD C READ(UNIT=LUN)GWET C READ(UNIT=LUN)PS_PTOP C READ(UNIT=LUN)GTMP C READ(UNIT=LUN)SLP C READ(UNIT=LUN)LWI C READ(UNIT=LUN)UBAR C READ(UNIT=LUN)VBAR C 70 CONTINUE C 80 CONTINUE C************This Loop was used to read a sample record C DO 60 I=1,6 C READ(UNIT=LUN)PHIS C 60 CONTINUE CLOSE(LUN) C************This Loop was used to write a sample record C OPEN(UNIT=LUN,FILE='SLP.85030100') C DO 100 J=1,ILAT C WRITE(LUN,*)(PHIS(K,J),K=1,ILON) C 100 CONTINUE C CLOSE(LUN) STOP END
Document Actions
NASA Logo - nasa.gov
NASA Privacy Policy and Important Notices
Last updated: Jul 21, 2010 11:32 AM ET
Top