Skip to content

Commit

Permalink
Remove dt from extract_surface_state
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Aug 3, 2018
1 parent 05d6c80 commit be0e7a8
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ subroutine step_MOM(forces, fluxes, sfc_state, Time_start, time_interval, CS, &
endif

if (showCallTree) call callTree_waypoint("calling extract_surface_state (step_MOM)")
call extract_surface_state(CS, sfc_state, dt_therm)
call extract_surface_state(CS, sfc_state)

! Do diagnostics that only occur at the end of a complete forcing step.
if (cycle_end) then
Expand Down Expand Up @@ -2631,12 +2631,11 @@ end subroutine adjust_ssh_for_p_atm
!> This subroutine sets the surface (return) properties of the ocean
!! model by setting the appropriate fields in sfc_state. Unused fields
!! are set to NULL or are unallocated.
subroutine extract_surface_state(CS, sfc_state, dt)
subroutine extract_surface_state(CS, sfc_state)
type(MOM_control_struct), pointer :: CS !< Master MOM control structure
type(surface), intent(inout) :: sfc_state !< transparent ocean surface state
!! structure shared with the calling routine
!! data in this structure is intent out.
real, optional, intent(in) :: dt !< Thermodynamic time step, in s.

! local
real :: hu, hv
Expand Down Expand Up @@ -2818,13 +2817,11 @@ subroutine extract_surface_state(CS, sfc_state, dt)
if (G%mask2dT(i,j)>0.) then
! calculate freezing pot. temp. @ surface
call calculate_TFreeze(sfc_state%SSS(i,j), 0.0, T_freeze, CS%tv%eqn_of_state)
if (present(dt)) then
! time accumulated melt_potential, in W/m^2
sfc_state%melt_potential(i,j) = sfc_state%melt_potential(i,j) + (CS%tv%C_p * CS%GV%Rho0 * &
(sfc_state%SST(i,j) - T_freeze) * CS%Hmix)/dt
else
! time accumulated melt_potential, in W/m^2
sfc_state%melt_potential(i,j) = sfc_state%melt_potential(i,j) + (CS%tv%C_p * CS%GV%Rho0 * &
(sfc_state%SST(i,j) - T_freeze) * CS%Hmix)
else
sfc_state%melt_potential(i,j) = 0.0
endif
endif! G%mask2dT
enddo ; enddo
endif
Expand Down

0 comments on commit be0e7a8

Please sign in to comment.