| highegg 2007-04-26, 8:04 am |
| On Apr 25, 11:31 pm, smurray444 <smurray...@gmail.com> wrote:
> Hi there,
>
> I have a global dataset (text file) where for every 105 values
> (currently formatted as a continuous string), the 1st represents
> longitude, the 2nd = latitude, the 3rd is a 'spinup' value which can
> be ignored, and the 4th to 105th values are hydrological runoff values
> for the years 1901 to 2002.
>
> I've been trying to create a table where longitude values are listed
> along the top row (x-axis) and latitude values are listed in the far
> left column (y-axis), with the corresponding runoff values for each
> year located in a given grid - therefore there will be 102 grids
> created (one for each year). The longitude values are currently not
> ordered and will need to be sorted (low to high) into position along
> the x-axis.
>
> This would result in a table of data values (6509 in each dimension)
> which represents global point values at a resolution of 1.5-degrees...
> I want to perform a linear interpolation to change the resolution of
> this data to 5-minutes. This will require 18 new values to be created
> above, below and to both sides of each existing data value in the
> current table (except in instances where a value is not surrounded by
> four values, eg. at the edges of the table, where only values
> available should be used).
>
> I'm new to Fortran, so if anyone has any helpful tips, advice, or
> could create some Fortran code to achieve this, then I'd be very
> grateful.
>
> Many thanks for your time,
> smurray444
If I understand your problem correctly, the 1.5deg resulotion having
6509 values, then a 5min resolution means 18*6508+1 = 117145 values.
Assuming 4 bytes per number, your 102 grids would then need
4*102*117145**2 = 5.6 terabytes of data.
Are you sure you need this? Interpolation in grid is a fast task -
can't you just interpolate on demand?
Jaroslav
|