Skip to content

Commit

Permalink
Fix some merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig authored and dabail10 committed Oct 25, 2024
1 parent e3422e7 commit f20010d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 66 deletions.
1 change: 1 addition & 0 deletions columnphysics/icepack_mechred.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,7 @@ subroutine icepack_step_ridge(dt, ndtd, &
first_ice, fzsal, &
flux_bio, closing, &
Tf, &
rdpnd, &
docleanup, dorebin)

real (kind=dbl_kind), intent(in) :: &
Expand Down
63 changes: 4 additions & 59 deletions columnphysics/icepack_therm_itd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,8 @@ subroutine linear_itd (hin_max, trcr_depend, &
aicen, trcrn, &
vicen, vsnon, &
aice, aice0, &
<<<<<<< HEAD
fpond, Tf, &
mipnd)
=======
fpond, Tf )
>>>>>>> origin/main

real (kind=dbl_kind), dimension(0:ncat), intent(in) :: &
hin_max ! category boundaries (m)
Expand Down Expand Up @@ -889,12 +885,8 @@ subroutine lateral_melt (dt, fpond, &
aicen, vicen, &
vsnon, trcrn, &
flux_bio, d_afsd_latm,&
<<<<<<< HEAD
floe_rad_c, floe_binwidth, &
mipnd)
=======
floe_rad_c, floe_binwidth)
>>>>>>> origin/main

real (kind=dbl_kind), intent(in) :: &
dt ! time step (s)
Expand Down Expand Up @@ -956,15 +948,8 @@ subroutine lateral_melt (dt, fpond, &
real (kind=dbl_kind), dimension (ncat) :: &
aicen_init, & ! initial area fraction
vicen_init, & ! volume per unit area of ice (m)
<<<<<<< HEAD
vsnon_init, & ! volume per unit area of snow (m)
G_radialn ! rate of lateral melt (m/s)
=======
vsnon_init, & ! initial volume of snow (m)
G_radialn , & ! rate of lateral melt (m/s)
delta_an , & ! change in the ITD
rsiden ! delta_an/aicen
>>>>>>> origin/main

real (kind=dbl_kind), dimension (:,:), allocatable :: &
afsdn , & ! floe size distribution tracer
Expand Down Expand Up @@ -997,17 +982,8 @@ subroutine lateral_melt (dt, fpond, &
dfsalt = c0
dvssl = c0
dvint = c0
<<<<<<< HEAD
vicen_init(:) = vicen(:)
vsnon_init(:) = vsnon(:)
=======
bin1_arealoss = c0
tmp = c0
vicen_init = vicen(:)
G_radialn = c0
delta_an = c0
rsiden = c0
>>>>>>> origin/main

if (tr_fsd) then
call icepack_cleanup_fsd (trcrn(nt_fsd:nt_fsd+nfsd-1,:))
Expand Down Expand Up @@ -1082,16 +1058,7 @@ subroutine lateral_melt (dt, fpond, &
d_afsd_tmp(:) = c0
nsubt = 0

<<<<<<< HEAD
DO WHILE (elapsed_t.lt.dt)
=======
! state variables
vicen_init(n) = vicen(n)
vsnon_init(n) = vsnon(n)
aicen(n) = aicen(n) * (c1 - rsiden(n))
vicen(n) = vicen(n) * (c1 - rsiden(n))
vsnon(n) = vsnon(n) * (c1 - rsiden(n))
>>>>>>> origin/main

nsubt = nsubt + 1
if (nsubt.gt.100) then
Expand Down Expand Up @@ -1126,7 +1093,7 @@ subroutine lateral_melt (dt, fpond, &
end do

! timestep required for this
subdt = get_subdt_fsd(nfsd, afsd_tmp(:), d_afsd_tmp(:))
subdt = get_subdt_fsd(afsd_tmp(:), d_afsd_tmp(:))
subdt = MIN(subdt, dt)

! update fsd and elapsed time
Expand All @@ -1135,13 +1102,7 @@ subroutine lateral_melt (dt, fpond, &

END DO

<<<<<<< HEAD
afsdn(:,n) = afsd_tmp(:)
=======
! timestep required for this
subdt = get_subdt_fsd(afsd_tmp(:), d_afsd_tmp(:))
subdt = MIN(subdt, dt)
>>>>>>> origin/main

end if ! aicen
end if ! rside > 0, otherwise do nothing
Expand Down Expand Up @@ -1204,29 +1165,17 @@ subroutine lateral_melt (dt, fpond, &

if (z_tracers) &
call lateral_melt_bgc(dt, &
<<<<<<< HEAD
ncat, nblyr, &
rsiden(1), vicen_init, & !echmod: use rsiden !CMB this should be sent rsiden
trcrn, &
flux_bio, nbtrcr)
=======
rsiden, vicen_init, &
trcrn, flux_bio)
>>>>>>> origin/main
rsiden, vicen_init, &
trcrn, flux_bio)
if (icepack_warnings_aborted(subname)) return


if (tr_fsd) then

trcrn(nt_fsd:nt_fsd+nfsd-1,:) = afsdn

<<<<<<< HEAD
call icepack_cleanup_fsd (ncat, nfsd, trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
call icepack_cleanup_fsd ( trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
if (icepack_warnings_aborted(subname)) return
=======
call icepack_cleanup_fsd (trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
if (icepack_warnings_aborted(subname)) return
>>>>>>> origin/main

! diagnostics
do k = 1, nfsd
Expand Down Expand Up @@ -2207,12 +2156,8 @@ subroutine icepack_step_therm2(dt, hin_max, &
vsnon, trcrn, &
flux_bio, &
d_afsd_latm, &
<<<<<<< HEAD
floe_rad_c,floe_binwidth, &
mipnd)
=======
floe_rad_c,floe_binwidth)
>>>>>>> origin/main
if (icepack_warnings_aborted(subname)) return

! Floe welding during freezing conditions
Expand Down
12 changes: 5 additions & 7 deletions columnphysics/icepack_wavefracspec_alt.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module icepack_wavefracspec_alt
use icepack_kinds
use icepack_parameters, only: p01, p5, c0, c1, c2, c3, c4, c10
use icepack_parameters, only: bignum, puny, gravit, pi, rhow, rhoi
use icepack_tracers, only: nt_fsd
use icepack_tracers, only: nt_fsd, ncat, nfsd
use icepack_warnings, only: warnstr, icepack_warnings_add, icepack_warnings_aborted
use icepack_fsd

Expand Down Expand Up @@ -46,7 +46,7 @@ module icepack_wavefracspec_alt
! 2024 Lettie Roach, Columbia/NASA GISS - updates for new scheme
!
subroutine icepack_step_wavefracture_alt(wave_spec_type, &
dt, ncat, nfsd, &
dt, &
nfreq, &
aice, vice, aicen, &
floe_rad_l, floe_rad_c, &
Expand All @@ -58,9 +58,7 @@ subroutine icepack_step_wavefracture_alt(wave_spec_type, &
wave_spec_type ! type of wave spectrum forcing

integer (kind=int_kind), intent(in) :: &
nfreq, & ! number of wave frequency categories
ncat, & ! number of thickness categories
nfsd ! number of floe size categories
nfreq ! number of wave frequency categories

real (kind=dbl_kind), intent(in) :: &
dt, & ! time step
Expand Down Expand Up @@ -140,7 +138,7 @@ subroutine icepack_step_wavefracture_alt(wave_spec_type, &
END DO
if (MAXVAL(fracture_hist) > puny) then
! protect against small numerical errors
call icepack_cleanup_fsd (ncat, nfsd, trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
call icepack_cleanup_fsd ( trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
if (icepack_warnings_aborted(subname)) return

DO n = 1, ncat
Expand All @@ -167,7 +165,7 @@ subroutine icepack_step_wavefracture_alt(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,:) )
call icepack_cleanup_fsd ( trcrn(nt_fsd:nt_fsd+nfsd-1,:) )
if (icepack_warnings_aborted(subname)) return

! for diagnostics
Expand Down

0 comments on commit f20010d

Please sign in to comment.