Skip to content

Commit

Permalink
modify name used for Bglen mask var
Browse files Browse the repository at this point in the history
  • Loading branch information
dngoldberg committed Jan 26, 2024
1 parent 005af54 commit 3190208
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pkg/streamice/STREAMICE.h
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ C REAL ARRAYS
& v_bdry_values_SI,
& STREAMICE_dummy_array,
& C_basal_friction, C_basal_fric_init,
& B_glen, B_glen_init, B_glen0
& B_glen, B_glen_init, Bglen_cost_mask

C Spit common block, because it lead to memory problem on some
C platform/compiler combinations (e.g. PowerBook with MacOS and
Expand Down Expand Up @@ -862,7 +862,7 @@ C _RL A_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL B_glen (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
#endif
_RL B_glen_init (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL B_glen0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL Bglen_cost_mask (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL streamice_sigma_coord (Nr)
_RL streamice_delsigma (Nr)

Expand Down
6 changes: 3 additions & 3 deletions pkg/streamice/streamice_cost_final.F
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,16 @@ subroutine streamice_cost_final( myThid )
h = H_streamice(i,j,bi,bj)
hf = -1.0 * i_r * R_low_si (i,j,bi,bj)

IF ((h-hf) .gt. 5. .AND. B_glen0(i,j,bi,bj).gt.0.0 .and.
IF ((h-hf) .gt. 5. .AND. Bglen_cost_mask(i,j,bi,bj).gt.0.0 .and.
& calc_prior_cost_bglen) then

tile_fc (bi,bj) = tile_fc (bi,bj) +
& streamice_wgt_prior_bglen * I_numcells *
& (B_glen(i,j,bi,bj)-B_glen0(i,j,bi,bj))**2
& (B_glen(i,j,bi,bj)-Bglen_cost_mask(i,j,bi,bj))**2

smooth_cost_prior (bi,bj) = smooth_cost_prior (bi,bj) +
& streamice_wgt_prior_bglen * I_numcells *
& (B_glen(i,j,bi,bj)-B_glen0(i,j,bi,bj))**2
& (B_glen(i,j,bi,bj)-Bglen_cost_mask(i,j,bi,bj))**2

ENDIF
endif
Expand Down
6 changes: 3 additions & 3 deletions pkg/streamice/streamice_cost_reg_accum.F
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,17 @@ subroutine streamice_cost_reg_accum ( myIter, myThid )
h = H_streamice(i,j,bi,bj)
hf = -1.0 * i_r * R_low_si (i,j,bi,bj)

IF ((h-hf) .gt. 5. .AND. B_glen0(i,j,bi,bj).gt.0.0 .and.
IF ((h-hf) .gt. 5. .AND. Bglen_cost_mask(i,j,bi,bj).gt.0.0 .and.
& calc_prior_cost_bglen) then

cost_func1_streamice(bi,bj) =
& cost_func1_streamice(bi,bj) +
& streamice_wgt_prior_bglen * gridtimfac *
& (B_glen(i,j,bi,bj)-B_glen0(i,j,bi,bj))**2
& (B_glen(i,j,bi,bj)-Bglen_cost_mask(i,j,bi,bj))**2
cost_prior_streamice(bi,bj) =
& cost_prior_streamice(bi,bj) +
& streamice_wgt_prior_bglen * gridtimfac *
& (B_glen(i,j,bi,bj)-B_glen0(i,j,bi,bj))**2
& (B_glen(i,j,bi,bj)-Bglen_cost_mask(i,j,bi,bj))**2

ENDIF

Expand Down
4 changes: 2 additions & 2 deletions pkg/streamice/streamice_init_fixed.F
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ SUBROUTINE STREAMICE_INIT_FIXED( myThid )
_BARRIER
C The 0 is the "iteration" argument. The ' ' is an empty suffix
CALL READ_FLD_XY_RS( STREAMICEBglenCostMaskFile, ' ',
& B_glen0, 0, myThid )
& Bglen_cost_mask, 0, myThid )
ELSE
WRITE(msgBuf,'(A)') 'BGLEN COST MASK - NOT IMPLENTED'
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
Expand All @@ -144,7 +144,7 @@ SUBROUTINE STREAMICE_INIT_FIXED( myThid )
DO bi = myBxLo(myThid), myBxHi(myThid)
DO j=1,sNy
DO i=1,sNx
b_glen0 (i,j,bi,bj) = 0.0
Bglen_cost_mask (i,j,bi,bj) = 0.0
ENDDO
ENDDO
ENDDO
Expand Down

0 comments on commit 3190208

Please sign in to comment.