Skip to content

Commit

Permalink
Merge pull request #4 from apcraig/ifsd3
Browse files Browse the repository at this point in the history
Minor clean up
  • Loading branch information
lettie-roach authored Feb 19, 2020
2 parents 2ce5dc2 + f32a21f commit a8711fb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
12 changes: 6 additions & 6 deletions columnphysics/icepack_fsd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ module icepack_fsd
floe_area_binwidth ! floe area bin width (m^2)

integer(kind=int_kind), dimension(:,:), allocatable, public :: &
iweld ! floe size categories that can combine
! during welding (dimensionless)
iweld ! floe size categories that can combine
! during welding (dimensionless)

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

Expand Down Expand Up @@ -819,9 +819,9 @@ subroutine wave_dep_growth (nfsd, local_wave_spec, &

real (kind=dbl_kind), dimension(:), intent(in) :: &
local_wave_spec ! ocean surface wave spectrum as a function of frequency
! power spectral density of surface elevation, E(f) (units m^2 s)
! dimension set in ice_forcing
! power spectral density of surface elevation, E(f) (units m^2 s)
! dimension set in ice_forcing

real(kind=dbl_kind), dimension(:), intent(in) :: &
wavefreq, & ! wave frequencies (s^-1)
dwavefreq ! wave frequency bin widths (s^-1)
Expand All @@ -832,7 +832,7 @@ subroutine wave_dep_growth (nfsd, local_wave_spec, &
! local variables
real (kind=dbl_kind), parameter :: &
tensile_param = 0.167_dbl_kind ! tensile mode parameter (kg m^-1 s^-2)
! value from Roach, Smith & Dean (2018)
! value from Roach, Smith & Dean (2018)

real (kind=dbl_kind) :: &
w_amp, & ! wave amplitude (m)
Expand Down
16 changes: 6 additions & 10 deletions columnphysics/icepack_wavefracspec.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ subroutine icepack_init_wave(nfreq, &

real(kind=dbl_kind), dimension(:), intent(out) :: &
wave_spectrum_profile, & ! ocean surface wave spectrum as a function of frequency
! power spectral density of surface elevation, E(f) (units m^2 s)
! power spectral density of surface elevation, E(f) (units m^2 s)
wavefreq, & ! wave frequencies (s^-1)
dwavefreq ! wave frequency bin widths (s^-1)

Expand Down Expand Up @@ -167,7 +167,6 @@ function get_dafsd_wave(nfsd, afsd_init, fracture_hist, frac) &
if (SUM(d_afsd(:)) > puny) then
write(warnstr,*) subname, 'area not conserved, waves'
call icepack_warnings_add(warnstr)
if (icepack_warnings_aborted(subname)) return
endif

WHERE (ABS(d_afsd).lt.puny) d_afsd = c0
Expand Down Expand Up @@ -216,7 +215,7 @@ subroutine icepack_step_wavefracture(wave_spec_type, &

real (kind=dbl_kind), dimension(:), intent(in) :: &
wave_spectrum ! ocean surface wave spectrum as a function of frequency
! power spectral density of surface elevation, E(f) (units m^2 s)
! power spectral density of surface elevation, E(f) (units m^2 s)

real (kind=dbl_kind), dimension(:,:), intent(inout) :: &
trcrn ! tracer array
Expand Down Expand Up @@ -318,9 +317,8 @@ subroutine icepack_step_wavefracture(wave_spec_type, &
! check in case wave fracture struggles to converge
if (nsubt>100) then
write(warnstr,*) subname, &
'warning: step_wavefracture struggling to converge'
'warning: step_wavefracture struggling to converge'
call icepack_warnings_add(warnstr)
if (icepack_warnings_aborted(subname)) return
endif


Expand Down Expand Up @@ -371,7 +369,7 @@ subroutine icepack_step_wavefracture(wave_spec_type, &
! update trcrn
trcrn(nt_fsd:nt_fsd+nfsd-1,n) = afsd_tmp/SUM(afsd_tmp)
call icepack_cleanup_fsd (ncat, nfsd, trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
if (icepack_warnings_aborted(subname)) return
if (icepack_warnings_aborted(subname)) return

! for diagnostics
d_afsdn_wave(:,n) = afsd_tmp(:) - afsd_init(:)
Expand Down Expand Up @@ -456,10 +454,9 @@ subroutine wave_frac(nfsd, nfreq, wave_spec_type, &
real (kind=dbl_kind), dimension(nfsd) :: &
frachistogram, & ! histogram
prev_frac_local ! previous histogram

character(len=*),parameter :: &
subname='(wave_frac)'

character(len=*),parameter :: &
subname='(wave_frac)'


if (trim(wave_spec_type).eq.'random') then
Expand Down Expand Up @@ -555,7 +552,6 @@ subroutine wave_frac(nfsd, nfreq, wave_spec_type, &
write(warnstr,*) subname, &
'warning: wave_frac struggling to converge'
call icepack_warnings_add(warnstr)
if (icepack_warnings_aborted(subname)) return
endif

! save histogram for next iteration
Expand Down
2 changes: 1 addition & 1 deletion configuration/driver/icedrv_init_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@ subroutine init_zbgc
nt_bgc_DMS = 0
nt_bgc_PON = 0
nt_bgc_hum = 0
nt_zbgc_frac = 0

!-----------------------------------------------------------------
! Define array parameters
Expand Down Expand Up @@ -1700,7 +1701,6 @@ subroutine init_zbgc
endif ! tr_zaero

!echmod keep trcr indices etc here but move zbgc_frac_init, zbgc_init_frac, tau_ret, tau_rel to icepack
nt_zbgc_frac = 0
if (nbtrcr > 0) then
nt_zbgc_frac = ntrcr + 1
ntrcr = ntrcr + nbtrcr
Expand Down

0 comments on commit a8711fb

Please sign in to comment.