1. Introduction A suite of precipitation products are being constructed for the Yellow River Project to quantitatively describe the spatial distribution and temporal variations of the hydrological processes over East Asia. These include: 1) The Base Product A gauge-based analysis of daily precipitation on a 0.5 degree latitude / longitude grid over the entire East Asia for an extended time period; 2) The Derived Product A gauge-based analysis of daily precipitation on a 0.1 degree latitude / longitude grid over the Yellow River Basin covering the same time period as and in quantitative agreement with the Base Product; and 3) The Daily Precipitation Climatology A gauge-based analysis of daily precipitation climatology on a 0.05 degree latitude / longitude grid over the entire East Asia. This was produced as an intermediate product for 1) and 2); This document describes the data file structure for the Derived Product. Please read the references for technical details on how the gauge-based analyses are defined. 2. General Information 2.1 The Derived Product The 'Derived Product' is composed of gridded fields of daily precipitation and number of gauges on a 0.1 degree latitude / longitude grid over the Yellow River Basin; The gridded fields of daily precipitation are defined by interpolating gauge observations from meteorological and hydrological stations over the region (see references for details); Number of gauges in each 0.1 degree grid box is also included as a quality measure for the daily precipitation fields; 2.2 Spatial Coverage and Resolution Coverage : 95.0E - 123.0E; 32.0N - 43.0N; Resolution : 0.1 degree latitude / longitude; 2.3 Time Period and Resolution Coverage : January 1, 1978 - December 31, 1997; Resolution : Daily; 2.4 Units Precipitation : 0.1 mm/day Gauge Number : Number of Gauges (written in real number) 2.5 Missing Code Precipitation : -999.0 gauge number : N/A 3. Data Files and Their Structure The Derived Product is stored in yearly files; 3.1 Yearly File Name EA_ANAL_DLY_PRCP_V0409D.lnx.yyyy V0409: Product Version; D : Derived Product; yyyy : 4-digital year number, e.g. 1978, 1979, ... 1997; 3.2 Yearly File Structure The yearly data files are written as PLAIN DIRECT ACCESS BINARY data files; Each yearly file contains daily fields for 365 (366 for leap years) days. These daily fields are arranged in the order of Julian Day; For each day, there are two fields (data arrays) holding information for precipitation and gauge number, respectively. The array for the precipitation amounts comes first, followed by that for the gauge number; Each field is a data array of 280 (in east-west direction) x 110 (in North-South direction) elements. The data array goes from WEST to EAST and then from SOUTH to NORTH. The first element is for grid box at the Southwest corner centered at [95.05E; 32.05N], the second at [95.15E;32.05N].... the 280th at [122.95E,32.05N], the 281st at [95.05E;32.15N]...; Each data element (for both precipitation and gauge number) is written in 4-byte floating real number; THE REAL NUMBER IS WRITTEN IN 'LITTLE_ENDIAN' BYTE ORDER. YOU NEED TO SWAP THE BYTE ORDER TO 'BIG_ENDIAN' IF YOU ARE WORKING WITH A WORK STATION. SEE PART 4.1 OF THIS DOCUMENT FOR A SAMPLE PROGRAM TO SWAP THE BYTE ORDER; There is not any 'space', 'end of record', or 'end of file' marks in between. The size of a yearly file is 4 byte x 280 elements x 110 lines x 2 fields x 365 days = 89,936,000 bytes for a non-leap year, and 90,182,400 bytes for a leap year; 3.3 Sample GrADS Control File DSET ^EA_ANAL_DLY_PRCP_V0409D.lnx.1997 * UNDEF -999.0 * OPTIONS little_endian * TITLE YR Gauge-Based Analysis [Derived Product] * XDEF 280 LINEAR 95.05 0.1 * YDEF 110 LINEAR 32.05 0.1 * ZDEF 01 LEVELS 1 * TDEF 365 LINEAR 01JAN1997 1dy * VARS 2 anal 1 00 daily precipitation analysis [0.1mm/day] nobs 1 00 number of gauges in a grid box ENDVARS 4. Sample Fortran 77 Programs 4.1 Swapping Byte Order c ################################################################# c program : swap_byte.sgi.f c objective : this program will run on a workstation c such as sgi to swap the byte order c c You need to type in the target year here: c paramater ( kyear_target = 1997 ) c character cyear*4, cfile10*32, cfile50*32, # cinp*1120, cout*1120 c c 1. to open input and output files c write (cyear,1951) kyear_target 1951 format (i4) write (6,*) 'started swapping for year :', kyear_target c cfile10 ( 1:32) = 'EA_ANAL_DLY_PRCP_V0409D.lnx.yyyy' cfile10 (29:32) = cyear (1:4) cfile50 ( 1:32) = 'EA_ANAL_DLY_PRCP_V0409D.sgi.yyyy' cfile50 (29:32) = cyear (1:4) c open (unit=10, # file=cfile10, # access='direct', recl=280) open (unit=50, # file=cfile50, # access='direct', recl=280) write (6,*) ' finished openning files !!' c c 2. to swap c c 2.1 to determine the number of days in a year m004 = mod (kyear_target, 4) m100 = mod (kyear_target,100) m400 = mod (kyear_target,400) kleap = 0 if (m004.eq.0) then kleap = 1 if (m100.eq.0) then kleap = 0 if (m400.eq.0) then kleap = 1 end if end if end if if (kleap.eq.0) then nday = 365 else nday = 366 end if c c 2.2 to swap and output do 2002 kday = 1, nday do 2002 kpar = 1, 2 do 2002 klin = 1, 110 krec = (kday-1)*2*110 + (kpar-1)*110 + klin read (10,rec=krec) cinp do 2001 kpix = 1, 280 k1 = (kpix-1)*4 + 1 k2 = (kpix-1)*4 + 2 k3 = (kpix-1)*4 + 3 k4 = (kpix-1)*4 + 4 cout (k1:k1) = cinp (k4:k4) cout (k2:k2) = cinp (k3:k3) cout (k3:k3) = cinp (k2:k2) cout (k4:k4) = cinp (k1:k1) 2001 continue write (50,rec=krec) cout 2002 continue c write (6,*) ' finished swapping !!' c write (6,*) 'finished !!' c stop end c################################################################### 4.2 Reading Data c ################################################################# c program : read_data.f c objective : this program is to read the yearly data files; c c You need to choose the type of machine: c kmachine = 1 for PC; 2 for workstation c parameter ( kmachine = 1 ) c c You need to choose the target year: c paramater ( kyear_target = 1997 ) c character cyear*4, cfile10*32 dimension rain (280,110), gnum (280,110) c c 1. to open the yearly data file c write (cyear,1951) kyear_target 1951 format (i4) write (6,*) 'started reading data for year :', kyear_target c if (kmachine.eq.1) then cfile10 ( 1:32) = 'EA_ANAL_DLY_PRCP_V0409D.lnx.yyyy' cfile10 (29:32) = cyear (1:4) open (unit=10, # file=cfile10, # access='direct', recl=280*110*4) else if (kmachine.eq.2) then cfile10 ( 1:32) = 'EA_ANAL_DLY_PRCP_V0409D.sgi.yyyy' cfile10 (29:32) = cyear (1:4) open (unit=10, # file=cfile10, # access='direct', recl=280*110) else write (6,*) 'Wrong Choice of Machine !!' end if write (6,*) ' finished openning files !!' c c 2. to read the data c c 2.1 to determine the number of days in a year m004 = mod (kyear_target, 4) m100 = mod (kyear_target,100) m400 = mod (kyear_target,400) kleap = 0 if (m004.eq.0) then kleap = 1 if (m100.eq.0) then kleap = 0 if (m400.eq.0) then kleap = 1 end if end if end if if (kleap.eq.0) then nday = 365 else nday = 366 end if c c 2.2 to read and add in stuff you like do 2001 kday = 1, nday write (6,*) ' started reading for day :', kday kinp1 = (kday-1)*2 + 1 kinp2 = kinp1 + 1 read (10,rec=kinp1) rain read (20,rec=kinp2) gnum write (6,*) ' finished reading :', rain (140,55), # gnum (140,55) 2001 continue c stop end c ################################################################# 5. References Xie, P., A. Yatagai, M. Chen, T. Hayasaka, Y. Fukushima, C. Liu and S. Yang, 2007: A Gauge-Based Analysis of Daily Precipitation over East Asia, J. Hydrometeor., 8, 607-627. 6. Contacts Please contact Drs. Pingping Xie or Akiyo Yatagai for further questions regarding this product. Dr. Pingping Xie NOAA / Climate Prediction Center 5200 Auth Road, #605 Camp Springs, MD 20746 U.S.A. Tel. : +1(301)763-8000, #7572 Fax : +1(301)763-8125 E-Mail: Pingping.Xie@noaa.gov Dr. Akiyo Yatagai Research Institute for Humanity and Nature 457-4 Motoyama, Kamigamo, Kita-ku, Kyoto 603-8047, Japan Tel : +81-75-707-2204 (direct) Fax : +81-75-707-2506 E-Mail: akiyo@chikyu.ac.jp