Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:32 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
5ed655852f Jean*0001 #include "COST_OPTIONS.h"
1e7adfddf9 Patr*0002 
                0003       subroutine cost_state_final( myThid )
                0004 C     /==========================================================\
                0005 C     | subroutine cost_state_final                              |
                0006 C     | o This routine assigns final T,S to cost function        |
                0007 C     \==========================================================/
                0008        implicit none
                0009 
                0010 C     == Global variables ===
                0011 #include "SIZE.h"
                0012 #include "EEPARAMS.h"
                0013 #include "PARAMS.h"
                0014 #include "GRID.h"
                0015 #include "DYNVARS.h"
                0016 
                0017 #include "cost.h"
                0018 
                0019 C     ======== Routine arguments ======================
                0020 C     myThid - Thread number for this instance of the routine.
                0021       integer myThid
                0022 
                0023 #ifdef ALLOW_COST_STATE_FINAL
                0024 C     ========= Local variables =========================
                0025       integer i, j, k
                0026       integer bi, bj
                0027 
                0028       DO bj=myByLo(myThid),myByHi(myThid)
                0029        DO bi=myBxLo(myThid),myBxHi(myThid)
f8659cb5d2 Patr*0030         DO j=1,sNy
                0031          DO i=1,sNx
                0032           DO k=1,nr
                0033            objf_state_final(i,j,bi,bj,0*Nr+k) = theta(i,j,k,bi,bj)
                0034            objf_state_final(i,j,bi,bj,1*Nr+k) = salt(i,j,k,bi,bj)
                0035            objf_state_final(i,j,bi,bj,2*Nr+k) = uvel(i,j,k,bi,bj)
                0036            objf_state_final(i,j,bi,bj,3*Nr+k) = vvel(i,j,k,bi,bj)
1e7adfddf9 Patr*0037           END DO
f8659cb5d2 Patr*0038           objf_state_final(i,j,bi,bj,4*Nr+1) = etan(i,j,bi,bj)
1e7adfddf9 Patr*0039          END DO
f8659cb5d2 Patr*0040         END DO
1e7adfddf9 Patr*0041        END DO
                0042       END DO
                0043 
a8da18f773 Patr*0044 cph      fc = objf_state_final(45,4,1,1,1)
12ffad7671 Jean*0045 cph      _GLOBAL_SUM_RL( fc , myThid )
b8c0a52acd Patr*0046 cph      print *, 'fc for admtlm test at 83,33 : ', fc
1e7adfddf9 Patr*0047 
                0048 #endif
951926fb9b Jean*0049 
1e7adfddf9 Patr*0050       end