Skip to content

Commit

Permalink
fixing how constants are called from icepack
Browse files Browse the repository at this point in the history
  • Loading branch information
duvivier committed Oct 8, 2018
1 parent c33a7a2 commit 7400070
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
13 changes: 7 additions & 6 deletions cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
module ice_history

use ice_kinds_mod
use ice_constants, only: c0, c1, c2, c100, c180, c360, p001, &
p25, p5, mps_to_cmpdy, kg_to_g, spval, rad_to_deg
use ice_constants, only: c0, c1, c2, c100, c360, c180, &
p001, p25, p5, mps_to_cmpdy, kg_to_g, spval
use ice_fileunits, only: nu_nml, nml_filename, nu_diag, &
get_fileunit, release_fileunit
use ice_exit, only: abort_ice
Expand Down Expand Up @@ -81,7 +81,7 @@ subroutine init_hist (dt)

! local variables

real (kind=dbl_kind) :: rhofresh, Tffresh, secday
real (kind=dbl_kind) :: rhofresh, Tffresh, secday, rad_to_deg
logical (kind=log_kind) :: formdrag
logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_pond, tr_aero, tr_brine
logical (kind=log_kind) :: skl_bgc, solve_zsal, solve_zbgc, z_tracers
Expand All @@ -96,7 +96,7 @@ subroutine init_hist (dt)
!-----------------------------------------------------------------

call icepack_query_parameters(rhofresh_out=rhofresh, Tffresh_out=Tffresh, &
secday_out=secday)
secday_out=secday, rad_to_deg_out=rad_to_deg)
call icepack_query_parameters(formdrag_out=formdrag, skl_bgc_out=skl_bgc, &
solve_zsal_out=solve_zsal, solve_zbgc_out=solve_zbgc, z_tracers_out=z_tracers)
call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, &
Expand Down Expand Up @@ -1722,7 +1722,7 @@ subroutine accum_hist (dt)
real (kind=dbl_kind), dimension (nx_block,ny_block,ncat_hist) :: &
ravgipn, worka3

real (kind=dbl_kind) :: awtvdr, awtidr, awtvdf, awtidf, puny, secday
real (kind=dbl_kind) :: awtvdr, awtidr, awtvdf, awtidf, puny, secday, rad_to_deg
real (kind=dbl_kind) :: Tffresh, rhoi, rhos, rhow, ice_ref_salinity
real (kind=dbl_kind) :: rho_ice, rho_ocn, Tice, Sbr, phi, rhob, dfresh, dfsalt
logical (kind=log_kind) :: formdrag, skl_bgc
Expand All @@ -1736,7 +1736,8 @@ subroutine accum_hist (dt)
character(len=*), parameter :: subname = '(accum_hist)'

call icepack_query_parameters(awtvdr_out=awtvdr, awtidr_out=awtidr, &
awtvdf_out=awtvdf, awtidf_out=awtidf, puny_out=puny, secday_out=secday)
awtvdf_out=awtvdf, awtidf_out=awtidf, puny_out=puny, secday_out=secday, &
rad_to_deg_out=rad_to_deg)
call icepack_query_parameters(Tffresh_out=Tffresh, rhoi_out=rhoi, rhos_out=rhos, &
rhow_out=rhow, ice_ref_salinity_out=ice_ref_salinity)
call icepack_query_parameters(formdrag_out=formdrag, skl_bgc_out=skl_bgc, ktherm_out=ktherm)
Expand Down
6 changes: 2 additions & 4 deletions cicecore/shared/ice_constants.F90
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ module ice_constants
p027 = p055*p5, &
eps04 = 1.0e-4_dbl_kind, &
eps13 = 1.0e-13_dbl_kind, &
eps16 = 1.0e-16_dbl_kind, &
pi = 3.14159265358979323846_dbl_kind
eps16 = 1.0e-16_dbl_kind

!-----------------------------------------------------------------
! location of fields for staggered grids
Expand Down Expand Up @@ -121,8 +120,7 @@ module ice_constants
m_to_cm = 100._dbl_kind ,&! meters to cm
m2_to_km2 = 1.e-6_dbl_kind ,&! m^2 to km^2
kg_to_g = 1000._dbl_kind ,&! kilograms to grams
mps_to_cmpdy = 8.64e6_dbl_kind ,&! m per s to cm per day
rad_to_deg = 180.0_dbl_kind/pi ! radians to degrees
mps_to_cmpdy = 8.64e6_dbl_kind ! m per s to cm per day

!=======================================================================

Expand Down

0 comments on commit 7400070

Please sign in to comment.