1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MDSIO_OPTIONS.h" |
5 |
|
6 |
subroutine MDS_SEG4toRS( j,bi,bj,k,nNz, seg, copyTo, arr ) |
7 |
C IN: |
8 |
C j,bi,bj,k integer - indices to array "arr" |
9 |
C nNz integer - K dimension of array "arr" |
10 |
C seg Real*4 - 1-D vector of length sNx |
11 |
C OUT: |
12 |
C arr _RS - model tiled array |
13 |
C |
14 |
C Created: 03/20/99 adcroft@mit.edu |
15 |
|
16 |
implicit none |
17 |
C Global variables / common blocks |
18 |
#include "SIZE.h" |
19 |
|
20 |
C Arguments |
21 |
integer j,bi,bj,k,nNz |
22 |
_RS arr(1-oLx:sNx+oLx,1-oLy:sNy+oLy,nNz,nSx,nSy) |
23 |
logical copyTo |
24 |
Real*4 seg(sNx) |
25 |
C Local |
26 |
integer ii |
27 |
C ------------------------------------------------------------------ |
28 |
if (copyTo) then |
29 |
do ii=1,sNx |
30 |
arr(ii,j,k,bi,bj)=seg(ii) |
31 |
enddo |
32 |
else |
33 |
do ii=1,sNx |
34 |
seg(ii)=arr(ii,j,k,bi,bj) |
35 |
enddo |
36 |
endif |
37 |
C ------------------------------------------------------------------ |
38 |
return |
39 |
end |