Next: Dependence on vertical TM
Up: Scripts and programs for
Previous: Script tozone and program
Subsections
The fortran programs use the tmtools package for interpolation and file I/O.
This contains the following subroutines:
- writetmdata(kout,iyear,nx,ny,nz,ntr,ntim,fname,
xlabelx,zdata) writes the output file.
The input arguments are:
- kout: file unit
- iyear: base year for data (yyyy)
- nx,ny,nz: spatial dimension in longitude, latitude, vertical (in general im,jm,lm)
- ntr: number of species (ntr)
- ntim: number of timesteps (1=annual,4=seasonal,12=monthly)
- fname: filenname
- xlabelx: header
- zdata: data array with dimensions (nx,ny,nz,ntr,ntim)
- subroutine fractions(fx,fy,dxyp1,dxyp2,mx,my):
calculate fractions fx, fy that gridcells nx,ny overlap with im,jm.
- subroutine fractions2(fx,fy,dxyp1,dxyp2,mx,my):
calculate fractions fx, fy that gridcells nx,ny overlap with im,jm.
For Olsson data.
- subroutine fill(z1,mx,my,fx,fy,dxyp1,dxyp2,z2):
fill target grid with overlapping fractions.
- subroutine geomtry(nx2,ny2,dxyp,ytop):
calculates the surface area of the grid cells of the target model, TM.
- subroutine linear(x,y,n,x0,y0,m):
Linear interpolation from one vector to another.
The arguments are:
- x: the array of x-values, locations where the function is given (input)
- y: the array of y-values, values of the function (input)
- n: the no. of x and y values, dimension of x and y (input)
- x0: the x-locations where values are to be calculated by interpolation (input)
- y0: the interpolated values (output)
- m: no of values to interpolate, dimension of x0 and y0 (input)
- subroutine muherm(x,y,n,x0,y0,m):
Hermite cubic interpolation from one vector to another.
The arguments are:
- x: the array of x-values, locations where the function is given (input)
- y: the array of y-values, values of the function (input)
- n: the no. of x and y values, dimension of x and y (input)
- x0: the x-locations where values are to be calculated by interpolation (input)
- y0: the interpolated values (output)
- m: no of values to interpolate, dimension of x0 and y0 (input)
The fortran programs use the hdf f90 package for file I/O in HDF format.
This contains the following subroutines:
- IO_WRITE4D_32(sd_id,im,labim,jm,labjm,lm,lablm,nt,labnt,data,name)
- IO_WRITE3D_32(sd_id,im,labim,jm,labjm,lm,lablm,data,name)
- IO_WRITE3D_32d(sd_id,im,labim,jm,labjm,lm,lablm,data,name,idate)
- IO_WRITE2D_32(sd_id,im,labim,jm,labjm,data,name)
- IO_WRITE2D_I16(sd_id,im,jm,data,name)
- IO_WRITE2D_32d(sd_id,im,labim,jm,labjm,data,name,idate)
- IO_READ4D_32(sd_id,im,jm,lm,nt,data,name,ifail)
- IO_READ3D_32(sd_id,im,jm,lm,data,name,ifail)
- IO_READ2D_32(sd_id,im,jm,data,name,ifail)
- IO_READ2D_32f(sd_id,im,jm,data,number,name,ifail)
- IO_READ2D_I16(sd_id,im,jm,data,name)
There is also an include file hdf.i which is a Fortran header file for HDF routines
Next: Dependence on vertical TM
Up: Scripts and programs for
Previous: Script tozone and program
Peter van Velthoven
2003-10-27