File indexing completed on 2023-09-21 05:10:48 UTC
view on githubraw file Latest commit 96b00645 on 2023-09-20 15:15:14 UTC
96b006450c dngo*0001 #include "STREAMICE_OPTIONS.h"
0002 #ifdef ALLOW_AUTODIFF
0003 # include "AUTODIFF_OPTIONS.h"
0004 #endif
0005 #ifdef ALLOW_COST
0006 # include "COST_OPTIONS.h"
0007 #endif
0008
0009 subroutine streamice_cost_accum ( myIter, myThid )
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 IMPLICIT NONE
0020
0021
0022 #include "SIZE.h"
0023 #include "EEPARAMS.h"
0024 #include "PARAMS.h"
0025 #include "DYNVARS.h"
0026 #include "GRID.h"
0027 #ifdef ALLOW_STREAMICE
0028 # include "STREAMICE.h"
0029 #endif
0030
0031 #ifdef ALLOW_COST
0032 # include "cost.h"
0033 #endif
0034 #ifdef ALLOW_AUTODIFF_TAMC
0035 # include "tamc.h"
0036 #endif
0037
0038
0039
0040 integer myIter, myThid
0041
0042 #ifdef ALLOW_COST
0043
0044 _RL thetaRef, HAF
0045
0046 integer i, j, k, bi, bj
0047 integer ig, jg
0048 integer itlo,ithi
0049 integer jtlo,jthi
0050 integer il
0051 integer itime
0052 INTEGER ILNBLNK
0053 EXTERNAL ILNBLNK
0054
0055 jtlo = myByLo(myThid)
0056 jthi = myByHi(myThid)
0057 itlo = myBxLo(myThid)
0058 ithi = myBxHi(myThid)
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073 do bj = jtlo,jthi
0074 do bi = itlo,ithi
0075 do j=1,sNy
0076 do i=1,sNx
0077
0078 if (streamice_cost_mask(i,j,bi,bj).eq.1.0) THEN
0079 cost_func1_streamice (bi,bj) =
0080 & cost_func1_streamice (bi,bj) + 0.0
0081 endif
0082
0083 end do
0084 end do
0085 end do
0086 end do
0087
0088 #ifdef ALLOW_STREAMICE_TC_COST
0089 IF ( STREAMICE_do_timedep_cost ) THEN
0090 CALL STREAMICE_COST_REG_ACCUM (myIter, myThid)
0091 DO itime = 1,streamiceMaxCostLevel
0092 IF (myIter==streamice_surf_cost_timesteps(itime)) THEN
0093 CALL STREAMICE_COST_SURF_ACCUM (myIter, myThid)
0094 ENDIF
0095 IF (myIter==streamice_vel_cost_timesteps(itime)) THEN
0096 CALL STREAMICE_COST_VEL_ACCUM (myIter, myThid)
0097 ENDIF
0098 ENDDO
0099 ENDIF
0100 #endif
0101
0102 #endif
0103
0104 RETURN
0105 END