1 |
#include "EXF_OPTIONS.h" |
#include "EXF_OPTIONS.h" |
|
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
|
C Flux Coupler using C |
|
|
C Bilinear interpolation of forcing fields C |
|
|
C C |
|
|
C B. Cheng (12/2002) C |
|
|
C C |
|
|
C added Bicubic (bnc 1/2003) C |
|
|
C C |
|
|
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
2 |
|
|
3 |
SUBROUTINE exf_interp_read( |
SUBROUTINE exf_interp_read( |
4 |
I infile, |
I infile, filePrec, |
|
I filePrec, |
|
5 |
O arrayin, |
O arrayin, |
6 |
I irecord, xG, yG, |
I irecord, nx_in, ny_in, mythid) |
|
I lon_0, lon_inc, |
|
|
I lat_0, lat_inc, |
|
|
I nx_in, ny_in, method, mythid) |
|
7 |
|
|
8 |
implicit none |
implicit none |
9 |
|
|
11 |
C filePrec = file precicision (currently not used, assumes real*4) |
C filePrec = file precicision (currently not used, assumes real*4) |
12 |
C arrout = output arrays (different for each processor) |
C arrout = output arrays (different for each processor) |
13 |
C irecord = record number in global file |
C irecord = record number in global file |
|
C xG,yG = coordinates for output grid |
|
|
C lon_0, lat_0 = lon and lat of sw corner of global input grid |
|
|
C lon_inc = scalar x-grid increment |
|
|
C lat_inc = vector y-grid increments |
|
14 |
C nx_in, ny_in = input x-grid and y-grid size |
C nx_in, ny_in = input x-grid and y-grid size |
|
C method = 1 for bilinear 2 for bicubic |
|
15 |
C mythid = thread id |
C mythid = thread id |
|
C |
|
16 |
|
|
17 |
#include "SIZE.h" |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
35 |
character*(*) infile |
character*(*) infile |
36 |
integer filePrec, irecord, nx_in, ny_in |
integer filePrec, irecord, nx_in, ny_in |
37 |
real*4 arrayin(-1:nx_in+2 , -1:ny_in+2) |
real*4 arrayin(-1:nx_in+2 , -1:ny_in+2) |
38 |
_RS xG (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
integer mythid |
|
_RS yG (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
|
|
_RL lon_0, lon_inc |
|
|
_RL lat_0, lat_inc(ny_in-1) |
|
|
integer method, mythid |
|
39 |
|
|
40 |
C Functions |
C Functions |
41 |
integer MDS_RECLEN |
integer MDS_RECLEN |
124 |
call MDS_BYTESWAPR4((nx_in+4)*(ny_in+4), arrayin ) |
call MDS_BYTESWAPR4((nx_in+4)*(ny_in+4), arrayin ) |
125 |
#endif /* _BYTESWAPIO */ |
#endif /* _BYTESWAPIO */ |
126 |
|
|
|
|
|
127 |
END |
END |