/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_cost_surf_accum.F
ViewVC logotype

Diff of /MITgcm_contrib/dgoldberg/streamice/streamice_cost_surf_accum.F

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

revision 1.6 by dgoldberg, Thu Oct 4 15:40:16 2012 UTC revision 1.10 by dgoldberg, Thu Mar 7 15:23:19 2013 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4  #include "COST_OPTIONS.h"  #ifdef ALLOW_COST
5    # include "COST_OPTIONS.h"
6    #endif
7  #include "STREAMICE_OPTIONS.h"  #include "STREAMICE_OPTIONS.h"
8    
9    
# Line 27  C     == Global variables === Line 29  C     == Global variables ===
29  # include "STREAMICE.h"  # include "STREAMICE.h"
30  #endif  #endif
31    
32  #include "cost.h"  #ifdef ALLOW_COST
33    # include "cost.h"
34    #endif
35  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
36  # include "tamc.h"  # include "tamc.h"
37  #endif  #endif
# Line 57  C     == Local variables Line 61  C     == Local variables
61        ithi = mybxhi(mythid)        ithi = mybxhi(mythid)
62    
63        WRITE(suff,'(I10.10)') myIter        WRITE(suff,'(I10.10)') myIter
64        suff = suff(1:ILNBLNK(suff))//'.data'        suff = suff(1:ILNBLNK(suff))//'.bin'
65    
66        CALL READ_FLD_XY_RS( 'land_ice_surf.'//suff, ' ',        CALL READ_FLD_XY_RS( 'land_ice_surf.'//suff, ' ',
67       &      S_obs, 0, myThid )       &      S_obs, 0, myThid )
# Line 70  CADJ STORE surf_el_streamice  = comlev1, Line 74  CADJ STORE surf_el_streamice  = comlev1,
74  CADJ &     kind = isbyte  CADJ &     kind = isbyte
75  CADJ STORE H_streamice_prev  = comlev1, key = ikey_dynamics,  CADJ STORE H_streamice_prev  = comlev1, key = ikey_dynamics,
76  CADJ &     kind = isbyte  CADJ &     kind = isbyte
77    CADJ STORE H_streamice  = comlev1, key = ikey_dynamics,
78    CADJ &     kind = isbyte
79  #endif  #endif
80    
81  C--   Calculate cost function on tile of this instance  C--   Calculate cost function on tile of this instance
# Line 80  C--   Calculate cost function on tile of Line 86  C--   Calculate cost function on tile of
86    
87    
88  !             S_obs(i,j,bi,bj) = 0.0  !             S_obs(i,j,bi,bj) = 0.0
89                 if (streamice_cost_mask(i,j,bi,bj).eq.1.0) THEN
90               cost_func1_streamice (bi,bj) =                cost_func1_streamice (bi,bj) =
91       &       cost_func1_streamice (bi,bj) +       &        cost_func1_streamice (bi,bj) +
92       &       0.5 * (S_obs(i,j,bi,bj)-       &        streamice_wgt_surf * (S_obs(i,j,bi,bj)-
93       &              surf_el_streamice(i,j,bi,bj))**2 +       &               surf_el_streamice(i,j,bi,bj))**2 / Nx / Ny +
94       &       0.5 * (H_streamice(i,j,bi,bj)-       &        streamice_wgt_drift * (H_streamice(i,j,bi,bj)-
95       &              H_streamice_prev(i,j,bi,bj))**2       &               H_streamice_prev(i,j,bi,bj))**2 / Nx / Ny
96                 endif
97        
98    
99              end do              end do
100            end do            end do

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22