[GRASS-user] r3.in.ascii Read an ASCII file with several layers

Hi all list,

I’m trying to read an ASCII file with several layers

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.

The data is Mean temperature dowload of

http://www.ipcc-data.org/obs/observed_fileformat.html#df

I tried with

r3.in.ascii input=ctmp8190.dat output=temp nv=-9999 type=default
precision=default compression=default tiledimension=default

with this header

north: 89.75
south: -89.75
east: 359.75
west: 0.25
top: 12
bottom: 0
rows: 360
cols: 720
levels: 12

And then I used r3.to.rast -r input=temp output=tempe_glo

My problem is the answer maps are rotated 180 degrees on the axis X (attached example)

I have never worked with this kind of file, and I’m not sure about the header configuration.

Somebody can help me, about what is my wrong…

Thank you for your help.

Jhon Ortiz Trujillo
Bogotá - Colombia


Charlas más divertidas con el nuevo Windows Live Messenger

(attachments)

global_temp.png