/[MITgcm]/MITgcm/pkg/fizhi/update_ocean_exports.F
ViewVC logotype

Diff of /MITgcm/pkg/fizhi/update_ocean_exports.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11 by molod, Mon Jul 19 22:06:59 2004 UTC revision 1.16 by molod, Fri Feb 25 18:35:30 2005 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "FIZHI_OPTIONS.h"
5         subroutine update_ocean_exports (myTime, myIter, myThid)         subroutine update_ocean_exports (myTime, myIter, myThid)
6  c----------------------------------------------------------------------  c----------------------------------------------------------------------
7  c  Subroutine update_ocean_exports - 'Wrapper' routine to update  c  Subroutine update_ocean_exports - 'Wrapper' routine to update
# Line 11  c Call:  getsst  (Return the current sst Line 12  c Call:  getsst  (Return the current sst
12  c        getsice (Return the current sea ice field-read data if needed)  c        getsice (Return the current sea ice field-read data if needed)
13  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
14         implicit none         implicit none
 #include "CPP_OPTIONS.h"  
15  #include "SIZE.h"  #include "SIZE.h"
16  #include "GRID.h"  #include "GRID.h"
17  #include "fizhi_ocean_coms.h"  #include "fizhi_ocean_coms.h"
18  #include "EEPARAMS.h"  #include "EEPARAMS.h"
19  #include "chronos.h"  #include "chronos.h"
20    
21         integer myTime, myIter, myThid         integer myIter, myThid
22           _RL myTime
23    
24         integer i, j, bi, bj, biglobal, bjglobal         integer i, j, bi, bj, biglobal, bjglobal
25         integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2         integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2
# Line 112  C Line 113  C
113  C--------------------------------------------------------------------------  C--------------------------------------------------------------------------
114    
115        implicit none        implicit none
 #include "CPP_EEOPTIONS.h"  
116  #include "SIZE.h"  #include "SIZE.h"
117    
118        integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy        integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy
# Line 126  C Maximum number of dates in one year fo Line 126  C Maximum number of dates in one year fo
126    
127        character*8  cname        character*8  cname
128        character*80 cdscrip        character*80 cdscrip
129        real fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef        character*40 sicedata
130          _RL fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef
131        logical first, found, error        logical first, found, error
132        integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybc        integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybc
133        integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec        integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec
134        integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod        integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod
135    
136        real sicebc1(sNx,sNy,nSx*nPx,nSy*nPy)        _RL sicebc1(sNx,sNy,nSx*nPx,nSy*nPy)
137        real sicebc2(sNx,sNy,nSx*nPx,nSy*nPy)        _RL sicebc2(sNx,sNy,nSx*nPx,nSy*nPy)
138    
139  C--------- Variable Initialization ---------------------------------  C--------- Variable Initialization ---------------------------------
140    
# Line 155  c  this only works for between 1950-2050 Line 156  c  this only works for between 1950-2050
156          nymdmod = nymd          nymdmod = nymd
157        endif        endif
158    
159          sicedata='sice19232.weekly.clim'
160    
161  c  initialize so that first time through they have values for the check  c  initialize so that first time through they have values for the check
162  c  these vaules make the iyear .ne. iyearbc true anyways for  c  these vaules make the iyear .ne. iyearbc true anyways for
163  c  for the first time so first isnt checked below.  c  for the first time so first isnt checked below.
# Line 176  C---------- Read in Header file -------- Line 179  C---------- Read in Header file --------
179        if( iyear.ne.iyearbc ) then        if( iyear.ne.iyearbc ) then
180    
181         close(iunit)         close(iunit)
182         open (iunit,form='unformatted',access='direct',         open (iunit,file=sicedata,form='unformatted',access='direct',
183       .                                         recl=im2*jm2*nPgx*nPgy*4)       .                                         recl=im2*jm2*nPgx*nPgy*4)
184         nrec = 1         nrec = 1
185         call bcheader (iunit, ndmax, nrec,         call bcheader (iunit, ndmax, nrec,
# Line 359  C Line 362  C
362  C--------------------------------------------------------------------------  C--------------------------------------------------------------------------
363    
364        implicit none        implicit none
 #include "CPP_EEOPTIONS.h"  
365  #include "SIZE.h"  #include "SIZE.h"
366    
367        integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy        integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy
# Line 373  C Maximum number of dates in one year fo Line 375  C Maximum number of dates in one year fo
375    
376        character*8  cname        character*8  cname
377        character*80 cdscrip        character*80 cdscrip
378        real fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef        character*40 sstdata
379          _RL fac1, fac2, lat0, lon0, timebc1, timebc2, timemod, undef
380        logical first, found, error        logical first, found, error
381        integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybc        integer i,j,n,nn,iyear,iyearbc,nd,ndby3,imbc,jmbc,npxbc,npybc
382        integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec        integer ndatebc,nhmsbc(ndmax), nhmsbc1, nhmsbc2,nrec
383        integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod        integer nymdbc(ndmax),nymdbc1,nymdbc2,nymdmod
384    
385        real sstbc1(sNx,sNy,nSx*nPx,nSy*nPy)        _RL sstbc1(sNx,sNy,nSx*nPx,nSy*nPy)
386        real sstbc2(sNx,sNy,nSx*nPx,nSy*nPy)        _RL sstbc2(sNx,sNy,nSx*nPx,nSy*nPy)
387    
388  C--------- Variable Initialization ---------------------------------  C--------- Variable Initialization ---------------------------------
389    
# Line 402  c  this only works for between 1950-2050 Line 405  c  this only works for between 1950-2050
405          nymdmod = nymd          nymdmod = nymd
406        endif        endif
407    
408          sstdata='sst19232.weekly.clim'
409    
410  c  initialize so that first time through they have values for the check  c  initialize so that first time through they have values for the check
411  c  these vaules make the iyear .ne. iyearbc true anyways for  c  these vaules make the iyear .ne. iyearbc true anyways for
412  c  for the first time so first isnt checked below.  c  for the first time so first isnt checked below.
# Line 422  C---------- Read in Header file -------- Line 427  C---------- Read in Header file --------
427        if( iyear.ne.iyearbc ) then        if( iyear.ne.iyearbc ) then
428    
429         close(iunit)         close(iunit)
430         open (iunit,form='unformatted',access='direct',         open (iunit,file=sstdata,form='unformatted',access='direct',
431       .                                        recl=im2*jm2*nPgx*nPgy*4)       .                                        recl=im2*jm2*nPgx*nPgy*4)
432         nrec = 1         nrec = 1
433         call bcheader (iunit, ndmax, nrec,         call bcheader (iunit, ndmax, nrec,
# Line 570  C!      field2(im,jm,nPx,nPy)  data fiel Line 575  C!      field2(im,jm,nPx,nPy)  data fiel
575  C  C
576  C--------------------------------------------------------------------------  C--------------------------------------------------------------------------
577        implicit none        implicit none
 #include "CPP_EEOPTIONS.h"  
578    
579        integer iunit,im,jm,nPx,nPy,nrec1,nrec2        integer iunit,im,jm,nPx,nPy,nrec1,nrec2
580    
581        real  field1(im,jm,nPx,nPy)        _RL  field1(im,jm,nPx,nPy)
582        real  field2(im,jm,nPx,nPy)        _RL  field2(im,jm,nPx,nPy)
583    
584        integer i,j,n1,n2        integer i,j,n1,n2
585        real*4 f1(im,jm,nPx,nPy), f2(im,jm,nPx,nPy)        real*4 f1(im,jm,nPx,nPy), f2(im,jm,nPx,nPy)
# Line 586  C--------- Read file ------------------- Line 590  C--------- Read file -------------------
590    
591        do n2=1,nPy        do n2=1,nPy
592        do n1=1,nPx        do n1=1,nPx
593    #ifdef _BYTESWAPIO
594          call MDS_BYTESWAPR4( im*jm, f1(1,1,n1,n2))
595          call MDS_BYTESWAPR4( im*jm, f2(1,1,n1,n2))
596    #endif
597        do j=1,jm        do j=1,jm
598        do i=1,im        do i=1,im
599         field1(i,j,n1,n2) = f1(i,j,n1,n2)         field1(i,j,n1,n2) = f1(i,j,n1,n2)
# Line 627  C!      error         logical TRUE if da Line 635  C!      error         logical TRUE if da
635  C  C
636  C--------------------------------------------------------------------------  C--------------------------------------------------------------------------
637        implicit none        implicit none
 #include "CPP_EEOPTIONS.h"  
638    
639        integer iunit, ndmax, nrec        integer iunit, ndmax, nrec
640    
641        character*8  cname        character*8  cname
642        character*80 cdscrip        character*80 cdscrip
643        integer im,jm,npx,npy,ndatebc,nymdbc(ndmax),nhmsbc(ndmax)        integer im,jm,npx,npy,ndatebc,nymdbc(ndmax),nhmsbc(ndmax)
644        real lat0,lon0,undef        _RL lat0,lon0,undef
645        logical error        logical error
646    
647        integer i        integer i
# Line 648  C--------- Read file ------------------- Line 655  C--------- Read file -------------------
655       .     im_32, jm_32, npx_32, npy_32, lat0_32, lon0_32,       .     im_32, jm_32, npx_32, npy_32, lat0_32, lon0_32,
656       .     ndatebc_32, undef_32,       .     ndatebc_32, undef_32,
657       .     (nymdbc_32(i), nhmsbc_32(i), i=1,ndatebc_32)       .     (nymdbc_32(i), nhmsbc_32(i), i=1,ndatebc_32)
658    #ifdef _BYTESWAPIO
659          call MDS_BYTESWAPR4( 1, lat0_32)
660          call MDS_BYTESWAPR4( 1, lon0_32)
661          call MDS_BYTESWAPR4( 1, undef_32)
662    #endif
663    
664        im = im_32        im = im_32
665        jm = jm_32        jm = jm_32

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22