c-------------------------------------------------------------- c TMI/1B11 data 98/06/24 Y.Suzuki@restec c c TMI/1B11 data input c c USAGE: c f_1b11rd '1B11_Input_File_Name' c c This program is FREEWARE, so there is NO SUPPORT. c-------------------------------------------------------------- #include "TKfortranDeclare.h" #include "IO.h" #include "IO_TMI.h" record /WRAPPER_HANDLE/ granuleHandleRead1B11 record /L1B_11_SWATHDATA/ read_L1B11_data record /DATE_STR/ beginDate record /TIME_STR/ beginTime record /DATE_STR/ endDate record /TIME_STR/ endTime integer status character*100 argv(2) character*50 granuleID, algorithmID, * algorithmVersion, toolkitVersion c Define input file names marg = iargc() if( marg .ne. 1 ) then write(6,*) * ' USAGE : f_1b11rd 1B11_InputFileName' stop end if call getarg( 1, argv(1) ) c Open input file write(6,*) 'Input File : ',argv(1) status = TKopen( argv(1), TK_L1B_11, TK_READ_ONLY, * granuleHandleRead1B11) if(status .ne. TK_SUCCESS) then write(6,*) ' TRMM input file open error' stop end if c check metadata status = TKreadMetadataInt(granuleHandleRead1B11, * TK_BEGIN_DATE, beginDate) status = TKreadMetadataInt(granuleHandleRead1B11, * TK_BEGIN_TIME, beginTime) status = TKreadMetadataInt(granuleHandleRead1B11, * TK_END_DATE, endDate) status = TKreadMetadataInt(granuleHandleRead1B11, * TK_END_TIME, endTime) write(6,'(1x,a,i4,a,i2,a,i2)') * ' beginDate = ',beginDate.tkyear,'/', * beginDate.tkmonth,'/', beginDate.tkday write(6,'(1x,a,i4,a,i2,a,i2)') * ' beginTime = ',beginTime.tkhour,':', * beginTime.tkminute,':', beginTime.tksecond write(6,'(1x,a,i4,a,i2,a,i2)') * ' endDate = ',endDate.tkyear,'/', * endDate.tkmonth,'/', endDate.tkday write(6,'(1x,a,i4,a,i2,a,i2)') * ' endTime = ',endTime.tkhour,':', * endTime.tkminute,':', endTime.tksecond status = TKreadMetadataInt(granuleHandleRead1B11, * TK_ORBIT_SIZE, iorbitSize) write(6,*) ' orbitSize = ', iorbitSize numberOfScan = iorbitSize c read scan by scan */ do 10 iScan=1,numberOfScan status = TKreadScan(granuleHandleRead1B11,read_L1B11_data) if( status .ne. TK_SUCCESS ) then write(6,*) ' Read Scan Error' else do 20 ih=1,208 write(6,600) iScan, numberOfScan, * read_L1B11_data.scanTime.year, * read_L1B11_data.scanTime.month, * read_L1B11_data.scanTime.dayOfMonth, * read_L1B11_data.scanTime.hour, * read_L1B11_data.scanTime.minute, * read_L1B11_data.scanTime.second, * ih, * read_L1B11_data.geolocation(1,ih), * read_L1B11_data.geolocation(2,ih) 600 format( ' scan : ',i5,'/',i5, * ' ScanTime : ',i4,'/',i2,'/',i2,i3,':',i2,':',i2, * ' IFOV : ',i3, * ' Lat,Lon : ',f9.3,',',f9.3) c lowResCh c Ch 1 : 10GHz Vertical c Ch 2 : 10GHz Horizontal c Ch 3 : 19GHz Vertical c Ch 4 : 19GHz Horizontal c Ch 5 : 21GHz Vertical c Ch 6 : 37GHz Vertical c Ch 7 : 37GHz Horizontal c highResCh c Ch 1 : 85GHz Vertical c Ch 2 : 85GHz Horizontal c Brightness temperature (K) if(mod(ih,2).eq.1) then il = (ih-1)/2+1 write(6,610) (read_L1B11_data.lowResCh(j,il),j=1,7), * (read_L1B11_data.highResCh(j,ih),j=1,2) 610 format( 9(1x,f8.3) ) else write(6,620) (read_L1B11_data.highResCh(j,ih),j=1,2) 620 format( 63x,2(1x,f8.3) ) end if 20 continue end if 10 continue c close TRMM data status = TKclose(granuleHandleRead1B11) stop end