README document for the APHRO_ME_0804
(Last updated
1.
Introduction
A suite of precipitation
products are being constructed by the Asian Precipitation – Highly-Resolved
Observational Data Integration Towards Evaluation of
the Water Resources (APHRODITEfs water resources)
project in collaboration of Research Institute for Humanity and Nature and
Meteorological Research Institute of Japan Meteorological Agency.
The
followings are included in the current data set (version 0804).
1) The
2) The
3) The Russian Analysis
This document describes
the data file structure for the Middle East Analysis
(APHRO_ME_0804).
2.
General Information
2.1
The Products:
We release the two kinds of resolution data
of the APHRO_ME_0804; Basic Product, 0.5 degree (Type-B), and General Product,
0.25 degree, (Type-G). The gridded fields of
daily precipitation are defined by interpolating rain-gauge observations
from meteorological and hydrological stations over the region. We define daily
precipitation climatology, interpolate daily ratio to the climatology on 0.05
degree grid resolution, and multiply each gridded
ratio to each grid climatology value day by day. Then we
re-grid the 0.05 degree analysis to 0.5 degree grid and 0.25 degree grid.
Number of gauges in each 0.5 (0.25) degree grid box shows reliability for the
daily precipitation fields. Please refer to 5. References for
technical details on how the gauge-based analyses are defined.
2.2
Spatial Coverage
Coverage : 25.0E -
60.0E; 25.0N - 45.0N
Resolution : 0.5 degree
latitude / longitude (Type-B) and 0.25 degree latitude /longitude
(Type-G)
2.3
Time
Coverage :
Resolution : Daily;
2.4
Units
Precipitation : mm/day
Gauge Number : Number of Gauges (written
in actual number)
2.5
Missing Code
Precipitation : -99.9
Gauge number : None
3.
Data Files and Their Structure
The Product is stored in
yearly files;
3.1
Denotation
ME0804DP_X_yyyy
ME :
Region
0804:
Product Version
DP: Daily precipitation
X
: Resolution (B for
Type-B, G for Type-G)
yyyy
: year number, e.g. 1979, 1980,
... 2001;
3.2
Yearly File Structure
-
The yearly data files are written in the
format of PLAIN DIRECT ACCESS BINARY data files.
-
Each yearly file contains daily fields for
365 (366 for leap years) days. These daily fields are arranged
according to Julian calendar.
-
For each day, there are two fields (data
arrays) holding information on precipitation and gauge number. The array
for the precipitation amounts comes first, followed by that for the
gauge number.
-
Each field is a data array of 70 (in
east-west direction) x 40 (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 [25.25E; 25.25N], the
second at [25.75E;25.25N].... the 70th at
[59.75E,25.25N], the 71st at [25.25E;25.75N]... (in
the case of Type-B).
-
Each data element (for both precipitation
and gauge number) is written in 4-byte floating actual number.
-
The actual number is written in
eLITTLE_ENDIANf byte order. You need to switch the byte order to big_endian if you are working with a work station other
than a linux machine.
-
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 70
elements x 40 lines x 2 fields x 365 days = 8,176,000 bytes for a non-leap
year, and 8,198,400 bytes for a leap year (Type-B).
3.3 Sample of GrADS Control
Files
-
Each data file needs *.ctl file to handle with the GrADS
software (http://www.iges.org/grads/).
For example, copy the sample script (3.3.1) to a new file named
ME0804DP_B_2002.ctl. Then open this file after the ggah
prompt. (e.g. ga > open
-
In case of operating other years, the following
two lines should be rewritten.
DSET :Rewrite input file name
TDEF :Rewrite 366 in leap year and 365 for others.
Set four numbers of year at input file name.
-
You may define only one control file to operate the whole period of the
same type (resolution) data as shown in 3.3.2.
-
To operate the 0.25 degree grid data (Type G), see the sample control file
shown in 3.3.3.
3.3.1 0.5-degree (Type B)
DSET ^ME0804DP_B_1979
TITLE ME Precipitation B
UNDEF -99.9
OPTIONS little_endian
XDEF 70 LINEAR 25.25 0.5
YDEF 40 LINEAR 25.25 0.5
ZDEF 1
LINEAR 1 1
TDEF 365 LINEAR jan1979 1dy
VARS 2
precip 0 0 box averaged precipitation
nobs 0 0 number of obs
ENDVARS
3.3.2 0.5-degree (Type B) sample control file with
goption templateh
DSET ^ME0804DP_B_.%y4
TITLE ME Precipitation B
UNDEF -99.9
OPTIONS little_endian
template
XDEF 70 LINEAR 25.25 0.5
YDEF 40 LINEAR 25.25 0.5
ZDEF 1
LINEAR 1 1
TDEF 9000 LINEAR jan1979 1dy
VARS 2
precip 0 0 box averaged precipitation
nobs 0 0 number of obs
ENDVARS
3.3.3 0.25-degree (Type G)
DSET ^ME0804DP_G_1979
*
UNDEF -99.9
OPTIONS little_endian
TITLE Daily Precipitation
Analysis
*
XDEF 140 LINEAR 25.125 0.25
YDEF 80
LINEAR 25.125 0.25
ZDEF 1
LEVELS
1
TDEF 365 LINEAR
*
VARS
2
precip 1 00 daily
precipitation analysis (mm/day)
nobs
1 00 number of gauges in a 0.25 grid box
ENDVARS
4.
Sample Program in Fortran90
- The
order that bytes are written in little-endian.
-
Set year variables, i4year.
-
Build and Run freely.
!==========================================
!
!
read_data_ME.F90
!
! Sample program source code to read
! 0.5- and 0.25-degree files
!==========================================
program main
implicit none
!=====================================
!
Set year and grid size
!=====================================
integer(4) :: i4Year = 2001 !year of input data
integer(4) :: nx50 = 70 !x-grid mesh size of 0.50degree for
output file
integer(4) :: ny50 = 40 !y-grid mesh size of 0.50degree for
output file
integer(4) :: nx25 = 140 !x-grid mesh size of 0.25degree for
output file
integer(4) :: ny25 = 80 !y-grid mesh size of 0.25degree for
output file
!-----------------------------
!
local
!-----------------------------
character(100) :: c100Fln_i50
character(100) :: c100Fln_i25
character(100) :: dir = './'
integer :: nn
integer :: kinp12, kinp11
integer :: kday, nday
integer(4) :: nrec
!-----------------------------
!
input data field of one day
!-----------------------------
real(4), allocatable :: rain50(:,:)
real(4), allocatable :: samp50(:,:)
real(4), allocatable :: rain25(:,:)
real(4), allocatable :: samp25(:,:)
allocate(rain50(nx50, ny50))
allocate(samp50(nx50, ny50))
allocate(rain25(nx25, ny25))
allocate(samp25(nx25, ny25))
!-----------------------------
!
File open
!-----------------------------
write(c100Fln_i50, &
& fmt="(a,'/ME0804DP_B_',i4.4)") trim(dir),
i4Year
write(c100Fln_i25, &
& fmt="(a,'/ME0804DP_G_',i4.4)")
trim(dir), i4Year
inquire(iolength = nrec ) rain50
open(50, file = c100Fln_i50, form = 'unformatted', access =
'direct', &
& recl = nrec, convert = 'little_endian' )
inquire(iolength = nrec ) rain25
open(70, file = c100Fln_i25, form = 'unformatted', access =
'direct', &
& recl = nrec, convert = 'little_endian' )
!-----------------------------
!check leap year
!-----------------------------
call cond_leapyear(i4Year, nn)
if(nn == 0) then
nday = 365
else
nday = 366
end if
!------------------------------------
!
roop of day
!------------------------------------
do kday = 1, nday
!-------------------------
! calculate
position in file
!-------------------------
kinp11 = (kday - 1) * 2 + 1
kinp12 = (kday - 1) * 2 + 2
!-------------------------
! read
0.5-degree data
!-------------------------
read(50,
rec = kinp11) rain50(:,:)
read(50,
rec = kinp12) samp50(:,:)
!-------------------------
! read
0.25-degree data
!-------------------------
read(70,
rec = kinp11) rain25(:,:)
read(70,
rec = kinp12) samp25(:,:)
!=====================================
! If necessary, ADD
SOME ANALYSIS HERE
!=====================================
write(6,*) kday, rain50(30,30), samp50(30,30), rain25(80,80),
samp25(80,80)
end do !kday
deallocate(rain50)
deallocate(samp50)
deallocate(rain25)
deallocate(samp25)
close(50)
close(70)
end program main
!==========================================
! check leap or
non-leap
!==========================================
!<return>
! leap year(366) -> return 1
! non-leap year(365) -> return 0
subroutine cond_leapyear(year, nflg_leapyear)
implicit none
integer, intent(in)
:: year
integer, intent(out) :: nflg_leapyear
!------------------------------------
if( (mod(year, 4)==0 .and. mod(year,100)/=0 ) &
.or.
mod(year,400)==0 ) then
nflg_leapyear
= 1
else
nflg_leapyear
= 0
end if
return
end subroutine cond_leapyear
5.
References
Please check our gresearch activitiesh page
(http://www.chikyu.ac.jp/precip/research/index.html) when you write/publish papers
in order to know the most updated information of our reference papers for
algorithms and products.
For
Yatagai, A., P. Xie
and P. Alpert (2008): Development of a daily gridded
precipitation data set for the
6.
Contacts
Please contact APHRODITE
project (led by Dr. Akiyo Yatagai of RIHN) for
further questions regarding this product.
APHRODITEfs Water Resource project
precinfo@chikyu.ac.jp
http://www.chikyu.ac.jp/precip/index.html
Dr. Akiyo Yatagai
Research Institute for
Humanity and Nature
457-4 Motoyama,
Kamigamo, Kita-ku,
Tel :
+81-75-707-2204 (direct)
Fax :
+81-75-707-2506