70 |
end |
end |
71 |
|
|
72 |
subroutine getsice(iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2, |
subroutine getsice(iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2, |
73 |
. nSx,nSy,nPx,nPy,bi,bj,biglobal,bjglobal,nymd,nhms,sice) |
. nSx,nSy,nPx,nPy,bi,bj,biglobal,bjglobal,nymd,nhms,sice) |
74 |
C************************************************************************ |
C************************************************************************ |
75 |
C |
C |
76 |
C!ROUTINE: GETSICE |
C!ROUTINE: GETSICE |
112 |
C-------------------------------------------------------------------------- |
C-------------------------------------------------------------------------- |
113 |
|
|
114 |
implicit none |
implicit none |
115 |
#include "CPP_OPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
116 |
|
|
117 |
integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx,nSy |
integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx,nSy |
118 |
integer bi,bj,biglobal.bjglobal,nymd,nhms |
integer nPx,nPy,bi,bj,biglobal,bjglobal,nymd,nhms |
119 |
|
|
120 |
_RL sice(idim1:idim2,jdim1:jdim2,nSx,nSy) |
_RL sice(idim1:idim2,jdim1:jdim2,nSx,nSy) |
121 |
|
|
125 |
|
|
126 |
character*8 cname |
character*8 cname |
127 |
character*80 cdscrip |
character*80 cdscrip |
128 |
_RL fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef |
real fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef |
129 |
logical first, found, error |
logical first, found, error |
130 |
integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybd |
integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybc |
131 |
integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec |
integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec |
132 |
integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod |
integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod |
133 |
|
|
134 |
_RL sicebc1(im2,jm2,nPx,nPy),sicebc2(im2,jm2,nPx,nPy) |
real sicebc1(im2,jm2,nPx,nPy),sicebc2(im2,jm2,nPx,nPy) |
135 |
|
|
136 |
C--------- Variable Initialization --------------------------------- |
C--------- Variable Initialization --------------------------------- |
137 |
|
|
138 |
data first /.true./ |
data first /.true./ |
139 |
data error /.false./ |
data error /.false./ |
140 |
|
|
141 |
|
save |
142 |
|
|
143 |
c save header info |
c save header info |
144 |
save imbc,jmbc,npxbc,npybc,lat0,lon0,ndatebc,undef,nymdbc,nhmsbc |
c save imbc,jmbc,npxbc,npybc,lat0,lon0,ndatebc,undef,nymdbc,nhmsbc |
145 |
save nymdbc1, nymdbc2, nhmsbc1, nhmsbc2 |
c save nymdbc1, nymdbc2, nhmsbc1, nhmsbc2 |
146 |
save first |
c save first |
147 |
save sicebc1, sicebc2 |
c save sicebc1, sicebc2 |
148 |
|
|
149 |
c this only works for between 1950-2050 |
c this only works for between 1950-2050 |
150 |
if (nymd .lt. 500101) then |
if (nymd .lt. 500101) then |
359 |
C-------------------------------------------------------------------------- |
C-------------------------------------------------------------------------- |
360 |
|
|
361 |
implicit none |
implicit none |
362 |
#include "CPP_OPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
363 |
|
|
364 |
integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx,nSy |
integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx,nSy |
365 |
integer bi,bj,biglobal.bjglobal,nymd,nhms |
integer nPx,nPy,bi,bj,biglobal,bjglobal,nymd,nhms |
366 |
|
|
367 |
_RL sst(idim1:idim2,jdim1:jdim2,nSx,nSy) |
_RL sst(idim1:idim2,jdim1:jdim2,nSx,nSy) |
368 |
|
|
372 |
|
|
373 |
character*8 cname |
character*8 cname |
374 |
character*80 cdscrip |
character*80 cdscrip |
375 |
_RL fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef |
real fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef |
376 |
logical first, found, error |
logical first, found, error |
377 |
integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybd |
integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybc |
378 |
integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec |
integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec |
379 |
integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod |
integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod |
380 |
|
|
381 |
_RL sstbc1(im2,jm2,nPx,nPy),sstbc2(im2,jm2,nPx,nPy) |
real sstbc1(im2,jm2,nPx,nPy),sstbc2(im2,jm2,nPx,nPy) |
382 |
|
|
383 |
C--------- Variable Initialization --------------------------------- |
C--------- Variable Initialization --------------------------------- |
384 |
|
|
386 |
data error /.false./ |
data error /.false./ |
387 |
|
|
388 |
c save header info |
c save header info |
389 |
save imbc,jmbc,npxbc,npybc,lat0,lon0,ndatebc,undef,nymdbc,nhmsbc |
c save imbc,jmbc,npxbc,npybc,lat0,lon0,ndatebc,undef,nymdbc,nhmsbc |
390 |
save nymdbc1, nymdbc2, nhmsbc1, nhmsbc2 |
c save nymdbc1, nymdbc2, nhmsbc1, nhmsbc2 |
391 |
save first |
c save first |
392 |
save sstbc1, sstbc2 |
c save sstbc1, sstbc2 |
393 |
|
|
394 |
c this only works for between 1950-2050 |
c this only works for between 1950-2050 |
395 |
if (nymd .lt. 500101) then |
if (nymd .lt. 500101) then |
421 |
|
|
422 |
close(iunit) |
close(iunit) |
423 |
open (iunit,form='unformatted',access='direct', |
open (iunit,form='unformatted',access='direct', |
424 |
. recl=im2*jm2nPx*nPy*4) |
. recl=im2*jm2*nPx*nPy*4) |
425 |
nrec = 1 |
nrec = 1 |
426 |
call bcheader (iunit, ndmax, nrec, |
call bcheader (iunit, ndmax, nrec, |
427 |
. cname, cdscrip, imbc, jmbc, npxbc, npybc, lat0, lon0, |
. cname, cdscrip, imbc, jmbc, npxbc, npybc, lat0, lon0, |
456 |
C if climatology, fill dates for data with current model year |
C if climatology, fill dates for data with current model year |
457 |
if (iyearbc.eq.0) then |
if (iyearbc.eq.0) then |
458 |
write(6,*) |
write(6,*) |
459 |
write(6,*) 'Climatological Dataset is being used.' |
write(6,*)'Climatological Dataset is being used.' |
460 |
write(6,*) 'Current model year will be used to fill Header Dates' |
write(6,*)'Current model year is used to fill Header Dates' |
461 |
do n = 2, ndatebc-1 |
do n = 2, ndatebc-1 |
462 |
nymdbc(n) = nymdbc(n) +(nymdmod/10000)*10000 |
nymdbc(n) = nymdbc(n) +(nymdmod/10000)*10000 |
463 |
enddo |
enddo |
484 |
1000 format(3(2x,i3,':',i8,2x,i8)) |
1000 format(3(2x,i3,':',i8,2x,i8)) |
485 |
enddo |
enddo |
486 |
write(6,1000) (nn,nymdbc(nn),nhmsbc(nn),nn=ndby3*3+1,ndatebc) |
write(6,1000) (nn,nymdbc(nn),nhmsbc(nn),nn=ndby3*3+1,ndatebc) |
487 |
endif ! End error Check |
endif |
488 |
|
|
489 |
if( error ) call my_exit (101) |
if( error ) call my_exit (101) |
490 |
|
|
491 |
endif ! New Year Info Check |
endif |
492 |
|
|
493 |
C---------- Read SST data if necessary ------------------------------- |
C---------- Read SST data if necessary ------------------------------- |
494 |
|
|
568 |
C |
C |
569 |
C-------------------------------------------------------------------------- |
C-------------------------------------------------------------------------- |
570 |
implicit none |
implicit none |
571 |
#include "CPP_OPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
572 |
|
|
573 |
integer iunit,im,jm,nPx,nPy,nrec1,nrec2 |
integer iunit,im,jm,nPx,nPy,nrec1,nrec2 |
574 |
|
|
575 |
_RL field1(im,jm) |
real field1(im,jm,nPx,nPy) |
576 |
_RL field2(im,jm) |
real field2(im,jm,nPx,nPy) |
577 |
|
|
578 |
integer i,j,n1,n2 |
integer i,j,n1,n2 |
579 |
real*4 f1(im,jm,nPx,nPy), f1(im,jm,nPx,nPy) |
real*4 f1(im,jm,nPx,nPy), f2(im,jm,nPx,nPy) |
580 |
|
|
581 |
C--------- Read file ----------------------------------------------- |
C--------- Read file ----------------------------------------------- |
582 |
read(iunit,rec=nrec1) f1 |
read(iunit,rec=nrec1) f1 |
625 |
C |
C |
626 |
C-------------------------------------------------------------------------- |
C-------------------------------------------------------------------------- |
627 |
implicit none |
implicit none |
628 |
#include "CPP_OPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
629 |
|
|
630 |
integer iunit, ndmax, nrec |
integer iunit, ndmax, nrec |
631 |
|
|
632 |
character*8 cname |
character*8 cname |
633 |
character*80 cdscrip |
character*80 cdscrip |
634 |
integer im,jm,npx,npy,ndatebc,nymdbc(ndmax),nhmsbc(ndmax) |
integer im,jm,npx,npy,ndatebc,nymdbc(ndmax),nhmsbc(ndmax) |
635 |
_RL lat0,lon0,undef |
real lat0,lon0,undef |
636 |
logical error |
logical error |
637 |
|
|
638 |
integer i,n |
integer i,n |
639 |
integer*4 im_32,jm_32,npx_32,npy_32 |
integer*4 im_32,jm_32,npx_32,npy_32 |
640 |
integer*4 ndatebc_32(ndmax),nhmsbc_32(ndmax) |
integer*4 ndatebc_32,nhmsbc_32(ndmax),nymdbc_32(ndmax) |
641 |
real*4 lat0_32,lon0_32,undef_32 |
real*4 lat0_32,lon0_32,undef_32 |
642 |
|
|
643 |
C--------- Read file ----------------------------------------------- |
C--------- Read file ----------------------------------------------- |