c************************************************************* c PR_3A25 data check c c Listing 3A25 metadata and rainfall(mm/hr) for grid1 c c Usage: % f_3a25rd '3A25_File_Name' c c c 24.JUN.1998. Programmed by M.KACHI@EORC c This program is FREEWARE, so there is NO SUPPORT. c************************************************************* program main #include "TKfortranDeclare.h" #include "IO.h" #include "IO_PR.h" record /L3A_25_GRID/ L3A25Grid record /WRAPPER_HANDLE/ granuleHandle3A25 record /DATE_STR/ beginDate record /TIME_STR/ beginTime record /DATE_STR/ endDate record /TIME_STR/ endTime c Constants parameter (idim=72, jdim=16, kdim=6) c Variables integer status character*100 argv c Begin c Define input file name marg = iargc() if( marg .ne. 1 ) then write(6,*) ' USAGE: 3A25_out 3A25_InputFileName' stop end if call getarg( 1, argv ) c Open input file write(6,*) 'Input File : ', argv status = TKopen( argv, TK_L3A_25, TK_READ_ONLY, $ granuleHandle3A25) if(status .ne. TK_SUCCESS) then write(6,*) ' TRMM input file open error' stop end if c Check metadata status = TKreadMetadataInt(granuleHandle3A25, $ TK_BEGIN_DATE, beginDate) write(6,'(a,i4,a,i2,a,i2)') $ ' beginDate = ',beginDate.tkyear,'/', $ beginDate.tkmonth,'/', beginDate.tkday status = TKreadMetadataInt(granuleHandle3A25, $ TK_BEGIN_TIME, beginTime) write(6,'(a,i4,a,i2,a,i2)') $ ' beginTime(UTC) = ',beginTime.tkhour,':', $ beginTime.tkminute,':', beginTime.tksecond status = TKreadMetadataInt(granuleHandle3A25, $ TK_END_DATE, endDate) write(6,'(a,i4,a,i2,a,i2)') $ ' endDate = ',endDate.tkyear,'/', $ endDate.tkmonth,'/', endDate.tkday status = TKreadMetadataInt(granuleHandle3A25, $ TK_END_TIME, endTime) write(6,'(a,i4,a,i2,a,i2)') $ ' endTime(UTC) = ',endTime.tkhour,':', $ endTime.tkminute,':', endTime.tksecond c Read grid data status = TKreadGrid(granuleHandle3A25, L3A25Grid) if( status .ne. TK_SUCCESS ) then write(6,*) 'TK read error!' stop endif c Write hourly rainfall write(6,*) 'Lat=16 Lon=72 lev=1 rain=', $ L3A25Grid.grid1.rainMean1(16,72,1) c Close status = TKclose(granuleHandle3A25) c End stop end