54 |
integer ip,jp |
integer ip,jp |
55 |
integer i,j,k |
integer i,j,k |
56 |
integer ii,jj,kk |
integer ii,jj,kk |
|
integer il |
|
57 |
integer irec,iobcs,nrec_nl |
integer irec,iobcs,nrec_nl |
58 |
integer itlo,ithi |
integer itlo,ithi |
59 |
integer jtlo,jthi |
integer jtlo,jthi |
61 |
integer imin,imax |
integer imin,imax |
62 |
|
|
63 |
integer cbuffindex |
integer cbuffindex |
|
cgg( |
|
|
integer igg |
|
64 |
integer reclen, irectrue |
integer reclen, irectrue |
65 |
integer cunit2, cunit3 |
integer cunit2, cunit3 |
|
_RL gg |
|
|
character*(80) weightname |
|
66 |
character*(80) cfile2, cfile3 |
character*(80) cfile2, cfile3 |
67 |
cgg) |
|
68 |
real*4 cbuff ( nsx*npx*sny*nsy*npy ) |
real*4 cbuff ( nsx*npx*sny*nsy*npy ) |
69 |
real*4 globfldtmp2( nsx,npx,sny,nsy,npy ) |
real*4 globfldtmp2( nsx,npx,sny,nsy,npy ) |
70 |
real*4 globfldtmp3( nsx,npx,sny,nsy,npy ) |
real*4 globfldtmp3( nsx,npx,sny,nsy,npy ) |
72 |
_RL globfld3d ( snx,nsx,npx,sny,nsy,npy,nr ) |
_RL globfld3d ( snx,nsx,npx,sny,nsy,npy,nr ) |
73 |
_RL globmskyz ( nsx,npx,sny,nsy,npy,nr,nobcs ) |
_RL globmskyz ( nsx,npx,sny,nsy,npy,nr,nobcs ) |
74 |
#ifdef CTRL_PACK_PRECISE |
#ifdef CTRL_PACK_PRECISE |
75 |
|
integer il |
76 |
|
character*(80) weightname |
77 |
_RL weightfldyz( nsx,npx,sny,nsy,npy,nr,nobcs ) |
_RL weightfldyz( nsx,npx,sny,nsy,npy,nr,nobcs ) |
|
#endif |
|
78 |
|
|
79 |
c == external == |
c == external == |
80 |
|
|
81 |
integer ilnblnk |
integer ilnblnk |
82 |
external ilnblnk |
external ilnblnk |
83 |
|
#endif |
84 |
|
|
85 |
c == end of interface == |
c == end of interface == |
86 |
|
|
171 |
call MDSREADFIELD_YZ_GL( |
call MDSREADFIELD_YZ_GL( |
172 |
& weightname, ctrlprec, 'RL', |
& weightname, ctrlprec, 'RL', |
173 |
& Nr, weightfldyz(1,1,1,1,1,1,iobcs), iobcs, mythid) |
& Nr, weightfldyz(1,1,1,1,1,1,iobcs), iobcs, mythid) |
|
CGG One special exception: barotropic velocity should be nondimensionalized |
|
|
cgg differently. Probably introduce new variable. |
|
|
if (iobcs .eq. 3 .or. iobcs .eq. 4) then |
|
|
k = 1 |
|
|
do jp = 1,nPy |
|
|
do bj = jtlo,jthi |
|
|
do j = jmin,jmax |
|
|
do ip = 1,nPx |
|
|
do bi = itlo,ithi |
|
|
cph weightfldyz(bi,ip,j,bj,jp,k,iobcs) = wbaro |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
endif |
|
174 |
#endif |
#endif |
175 |
enddo |
enddo |
176 |
|
|
182 |
nrec_nl = int(ncvarrecs(ivartype)/Nx) |
nrec_nl = int(ncvarrecs(ivartype)/Nx) |
183 |
endif |
endif |
184 |
do irec = 1, nrec_nl |
do irec = 1, nrec_nl |
185 |
cgg do iobcs = 1, nobcs |
c Need to solve for what iobcs would have been. |
|
cgg Need to solve for what iobcs would have been. |
|
186 |
|
|
187 |
call MDSREADFIELD_3D_GL( fname, ctrlprec, 'RL', |
call MDSREADFIELD_3D_GL( fname, ctrlprec, 'RL', |
188 |
& nr, globfld3D, irec, mythid) |
& nr, globfld3D, irec, mythid) |
190 |
do i=1,snx |
do i=1,snx |
191 |
iobcs= mod((irec-1)*snx+i-1,nobcs)+1 |
iobcs= mod((irec-1)*snx+i-1,nobcs)+1 |
192 |
|
|
|
CGG One special exception: barotropic velocity should be nondimensionalized |
|
|
cgg differently. Probably introduce new variable. |
|
|
if (iobcs .eq. 3 .or. iobcs .eq. 4) then |
|
|
k = 1 |
|
|
do jp = 1,nPy |
|
|
do bj = jtlo,jthi |
|
|
do j = jmin,jmax |
|
|
do ip = 1,nPx |
|
|
do bi = itlo,ithi |
|
|
#ifdef NO_CONTROL_BAROTROPIC_VELOCITY |
|
|
if (.not. lxxadxx) then |
|
|
cgg Get rid of any sensitivity to barotropic velocity. |
|
|
globfld3d(i,bi,ip,j,bj,jp,k) = 0. |
|
|
endif |
|
|
#endif |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
endif |
|
|
|
|
193 |
write(cunit) ncvarindex(ivartype) |
write(cunit) ncvarindex(ivartype) |
194 |
write(cunit) 1 |
write(cunit) 1 |
195 |
write(cunit) 1 |
write(cunit) 1 |
254 |
c |
c |
255 |
c -- end of k loop -- |
c -- end of k loop -- |
256 |
enddo |
enddo |
|
c -- end of iobcs loop -- |
|
|
cgg enddo |
|
257 |
c -- end of i loop -- |
c -- end of i loop -- |
258 |
enddo |
enddo |
259 |
c -- end of irec loop -- |
c -- end of irec loop -- |
260 |
enddo |
enddo |
261 |
|
|
262 |
do irec = nrec_nl*nx+1, ncvarrecs(ivartype) |
do irec = nrec_nl*nx+1, ncvarrecs(ivartype) |
263 |
cgg do iobcs = 1, nobcs |
c Need to solve for what iobcs would have been. |
|
cgg Need to solve for what iobcs would have been. |
|
264 |
iobcs= mod(irec-1,nobcs)+1 |
iobcs= mod(irec-1,nobcs)+1 |
265 |
|
|
266 |
call MDSREADFIELD_YZ_GL( fname, ctrlprec, 'RL', |
call MDSREADFIELD_YZ_GL( fname, ctrlprec, 'RL', |
267 |
& nr, globfldyz, irec, mythid) |
& nr, globfldyz, irec, mythid) |
268 |
|
|
|
CGG One special exception: barotropic velocity should be nondimensionalized |
|
|
cgg differently. Probably introduce new variable. |
|
|
if (iobcs .eq. 3 .or. iobcs .eq. 4) then |
|
|
k = 1 |
|
|
do jp = 1,nPy |
|
|
do bj = jtlo,jthi |
|
|
do j = jmin,jmax |
|
|
do ip = 1,nPx |
|
|
do bi = itlo,ithi |
|
|
#ifdef NO_CONTROL_BAROTROPIC_VELOCITY |
|
|
if (.not. lxxadxx) then |
|
|
cgg Get rid of any sensitivity to barotropic velocity. |
|
|
globfldyz(bi,ip,j,bj,jp,k) = 0. |
|
|
endif |
|
|
#endif |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
enddo |
|
|
endif |
|
|
|
|
269 |
write(cunit) ncvarindex(ivartype) |
write(cunit) ncvarindex(ivartype) |
270 |
write(cunit) 1 |
write(cunit) 1 |
271 |
write(cunit) 1 |
write(cunit) 1 |
327 |
c |
c |
328 |
c -- end of k loop -- |
c -- end of k loop -- |
329 |
enddo |
enddo |
|
c -- end of iobcs loop -- |
|
|
cgg enddo |
|
330 |
c -- end of irec loop -- |
c -- end of irec loop -- |
331 |
enddo |
enddo |
332 |
|
|