Data Distribution Centre
Help Site map

Climate Baseline File Format

Nomenclature

The files have been given an eight letter prefix and three letter suffix to make them compatible with all computers and media, thus the filename structure is:

cxxxyyyy.dat

An example, therefore, is "cpre1120.dat": which contains mean monthly 1911-1920 precipitation.

yyyy = Timeslice

e.g. 6190 = 1961-1990; 0110=1901-1910; etc.

xxx= Variable Code

Variable

Units

cld

dtr

frs

pre

rad

wet

tmp

tmx

tmn

vap

wnd

Cloud Cover

Diurnal Temperature Range

Ground-frost Frequency

Precipitation

Radiation

Wet Day Frequency

Mean Temperature

Maximum Temperature

Minimum Temperaure

Vapour Pressure

Wind

Percent

Deg. C * 10

Days *10

(millimetres/day) *10

W/sq.metre

Days *10

Deg. C * 10

Deg. C * 10

Deg. C * 10

hPa * 10

(metre/sec) * 10

 

Data Format

The files containing the observed climate data are in ASCII format with one file per year per variable. The first and second lines of the file contain information on the grid size, for example:

grd_sz xmin ymin xmax ymax n_cols n_rows n_months missing
0.5 0.25 -89.75 359.75 89.75 720 360 12 -9999

This is followed by 12 monthly grids that are n_cols by n_rows in size. Each record contains n_cols (=720) columns longitude values, format 720i5, starting at xmin (= 0.25 deg East) and ending at xmax (=0.25 deg West) The first record starts at January, ymax (=89.75 deg North) and the last record is the row for December, ymin (=-89.75 deg South). Co-ordinates represent the centre of each grid cell. Missing values (Antarctica, oceans and major inland water bodies) are assigned integer values of -9999.

To read in one year of data the following program should work:

 program rd_ascii
 !
 ! f90 program to read in an integer ascii grid with
 ! variable dimensions into a global grid (720x360x12)
 !
 parameter :: n_cols=720
 parameter :: n_rows=360
 integer, dimension (n_cols,n_rows,12) :: grid
 character(len=72) :: infl
 character(len=20) :: fmt
 !
 call getarg(1,infl)
 !
 if(infl.eq.' ')then
 write(*,*) 'Enter ascii grid file name'
 read(*,'(a72)')infl
 end if
 !
 open(1,file=infl,status='old')
 read(1,*)
 read(1,*)xmin,ymin,xmax,ymax,ncols,nrows,nmonths,missing
 grid=missing
 fmt='( i5)'
 write(fmt(2:4),'(i3)')n_cols
 do im=1,nmonths
 do lat=1,n_rows
 read(1,fmt)(grid(lon,lat,im),lon=1,n_cols)
 enddo
 enddo
 !
 end program rd_ascii
 

Page last modified: 16 May 2011

 

NCAS, British Atmospheric Data Centre NERC NCAS

BADC disclaimer

DECC - Department of Energy and Climate Change