Skip to content

Commit

Permalink
Add present for dagedt and fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
dabail10 committed Mar 4, 2024
1 parent 0911854 commit e68dd14
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions cicecore/cicedyn/general/ice_step_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -828,26 +828,26 @@ subroutine update_state (dt, daidt, dvidt, dvsdt, dagedt, offset)
nt_strata = nt_strata(:,:), &
Tf = Tf(i,j,iblk))

if (present(offset)) then

!-----------------------------------------------------------------
! Compute thermodynamic area and volume tendencies.
!-----------------------------------------------------------------

if (present(daidt)) daidt(i,j,iblk) = (aice(i,j,iblk) - daidt(i,j,iblk)) / dt
if (present(dvidt)) dvidt(i,j,iblk) = (vice(i,j,iblk) - dvidt(i,j,iblk)) / dt
if (present(dvsdt)) dvsdt(i,j,iblk) = (vsno(i,j,iblk) - dvsdt(i,j,iblk)) / dt
if (tr_iage) then
if (offset > c0) then ! thermo
if (trcr(i,j,nt_iage,iblk) > c0) &
dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) &
- dagedt(i,j,iblk) - offset) / dt
else ! dynamics
dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) &
- dagedt(i,j,iblk)) / dt
endif
endif ! tr_iage
endif ! present(offset)
if (present(offset)) then

!-----------------------------------------------------------------
! Compute thermodynamic area and volume tendencies.
!-----------------------------------------------------------------

if (present(daidt)) daidt(i,j,iblk) = (aice(i,j,iblk) - daidt(i,j,iblk)) / dt
if (present(dvidt)) dvidt(i,j,iblk) = (vice(i,j,iblk) - dvidt(i,j,iblk)) / dt
if (present(dvsdt)) dvsdt(i,j,iblk) = (vsno(i,j,iblk) - dvsdt(i,j,iblk)) / dt
if (present(dagedt) .and. tr_iage) then
if (offset > c0) then ! thermo
if (trcr(i,j,nt_iage,iblk) > c0) &
dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) &
- dagedt(i,j,iblk) - offset) / dt
else ! dynamics
dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) &
- dagedt(i,j,iblk)) / dt
endif
endif ! tr_iage
endif ! present(offset)

enddo ! i
enddo ! j
Expand Down

0 comments on commit e68dd14

Please sign in to comment.