Back to home page

MITgcm

 
 

    


File indexing completed on 2022-08-15 05:09:19 UTC

view on githubraw file Latest commit cf705a6c on 2022-08-14 22:40:32 UTC
8f7d13d0c9 Jean*0001 #include "ECCO_OPTIONS.h"
5001c65f45 Patr*0002 
3ad0d94cb0 Patr*0003       subroutine cost_averagesinit( mythid )
5001c65f45 Patr*0004 
                0005 c     ==================================================================
3ad0d94cb0 Patr*0006 c     SUBROUTINE cost_averagesinit
5001c65f45 Patr*0007 c     ==================================================================
                0008 c
                0009 c     o Set average fields for temperature, salinity, surface pressure,
                0010 c       and averaging counters to zero. The average fields are declared
                0011 c       in the header file ecco_cost.h.
                0012 c
                0013 c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
                0014 c
                0015 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000
                0016 c
                0017 c              - Restructured the code in order to create a package
                0018 c                for the MITgcmUV.
                0019 c
                0020 c     ==================================================================
3ad0d94cb0 Patr*0021 c     SUBROUTINE cost_averagesinit
5001c65f45 Patr*0022 c     ==================================================================
                0023 
                0024       implicit none
                0025 
                0026 c     == global variables ==
                0027 
                0028 #include "EEPARAMS.h"
                0029 #include "SIZE.h"
cf705a6c8e Mart*0030 #include "ECCO_SIZE.h"
                0031 #include "ECCO.h"
5001c65f45 Patr*0032 
                0033 c     == routine arguments ==
                0034 
                0035       integer mythid
                0036 
                0037 c     == local variables ==
                0038 
                0039       integer bi,bj
                0040       integer jmin,jmax
                0041       integer imin,imax
cf705a6c8e Mart*0042 #ifdef ALLOW_GENCOST_CONTRIBUTION
6b47d550f4 Mart*0043       integer i,j,k,kk
                0044 #endif
5001c65f45 Patr*0045 
                0046 c     == end of interface ==
                0047 
                0048 c--   Set the loop ranges.
                0049       jmin = 1
                0050       jmax = sny
                0051       imin = 1
                0052       imax = snx
                0053 
6b47d550f4 Mart*0054       do bj = mybylo(mythid), mybyhi(mythid)
                0055         do bi = mybxlo(mythid), mybxhi(mythid)
5001c65f45 Patr*0056 
8c157ed454 Patr*0057 #ifdef ALLOW_GENCOST_CONTRIBUTION
                0058           do  k=1,NGENCOST
                0059             do j = jmin,jmax
                0060               do i = imin,imax
                0061                 gencost_barfld(i,j,bi,bj,k) = 0. _d 0
                0062                 gencost_modfld(i,j,bi,bj,k) = 0. _d 0
                0063               enddo
                0064             enddo
49484c0542 Gael*0065             gencost_dummy(k) = 0. _d 0
8c157ed454 Patr*0066           enddo
5cce2b5d76 Gael*0067 #ifdef ALLOW_GENCOST3D
                0068           do  kk=1,NGENCOST3D
                0069             do j = jmin,jmax
                0070               do i = imin,imax
                0071                 do k = 1,nr
                0072                 gencost_bar3d(i,j,k,bi,bj,kk) = 0. _d 0
                0073                 gencost_mod3d(i,j,k,bi,bj,kk) = 0. _d 0
                0074                 enddo
                0075               enddo
                0076             enddo
                0077           enddo
6b47d550f4 Mart*0078 #endif /* ALLOW_GENCOST3D */
                0079 #endif /* ALLOW_GENCOST_CONTRIBUTION */
8c157ed454 Patr*0080 
5001c65f45 Patr*0081         enddo
                0082       enddo
                0083 
                0084       return
                0085       end