Skip to content

Commit

Permalink
Update BGC
Browse files Browse the repository at this point in the history
Update interfaces and bgc settings consistent with new version of Icepack BGC.
  • Loading branch information
apcraig committed Aug 9, 2024
1 parent 2771786 commit 2e371d4
Show file tree
Hide file tree
Showing 30 changed files with 582 additions and 759 deletions.
2 changes: 1 addition & 1 deletion cicecore/cicedyn/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ subroutine construct_filename(ncfile,suffix,ns)

! Check whether the filename is already in use.
! Same filename in multiple history streams leads to files being overwritten (not good).
! The current filename convention means we just have to check latest filename,
! The current filename convention means we just have to check latest filename,
! not all filenames ever generated because of use of current model date/time in filename.

! write(nu_diag,'(2a,i2,1x,a)') subname, 'debug ncfile= ',ns,trim(ncfile)
Expand Down
3 changes: 1 addition & 2 deletions cicecore/cicedyn/dynamics/ice_dyn_eap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ subroutine eap (dt)
do ij = 1, icellT(iblk)
i = indxTi(ij, iblk)
j = indxTj(ij, iblk)
call icepack_ice_strength(ncat=ncat, &
aice = aice (i,j, iblk), &
call icepack_ice_strength(aice = aice (i,j, iblk), &
vice = vice (i,j, iblk), &
aice0 = aice0 (i,j, iblk), &
aicen = aicen (i,j,:,iblk), &
Expand Down
6 changes: 2 additions & 4 deletions cicecore/cicedyn/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ subroutine evp (dt)
do ij = 1, icellT(iblk)
i = indxTi(ij, iblk)
j = indxTj(ij, iblk)
call icepack_ice_strength(ncat = ncat, &
aice = aice (i,j, iblk), &
call icepack_ice_strength(aice = aice (i,j, iblk), &
vice = vice (i,j, iblk), &
aice0 = aice0 (i,j, iblk), &
aicen = aicen (i,j,:,iblk), &
Expand Down Expand Up @@ -595,8 +594,7 @@ subroutine evp (dt)
do ij = 1, icellT(iblk)
i = indxTi(ij, iblk)
j = indxTj(ij, iblk)
call icepack_ice_strength(ncat = ncat, &
aice = aice (i,j, iblk), &
call icepack_ice_strength(aice = aice (i,j, iblk), &
vice = vice (i,j, iblk), &
aice0 = aice0 (i,j, iblk), &
aicen = aicen (i,j,:,iblk), &
Expand Down
13 changes: 6 additions & 7 deletions cicecore/cicedyn/dynamics/ice_dyn_vp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,12 @@ subroutine implicit_solver (dt)
do ij = 1, icellT(iblk)
i = indxTi(ij, iblk)
j = indxTj(ij, iblk)
call icepack_ice_strength (ncat, &
aice (i,j, iblk), &
vice (i,j, iblk), &
aice0 (i,j, iblk), &
aicen (i,j,:,iblk), &
vicen (i,j,:,iblk), &
strength(i,j, iblk))
call icepack_ice_strength (aice = aice (i,j, iblk), &
vice = vice (i,j, iblk), &
aice0 = aice0 (i,j, iblk), &
aicen = aicen (i,j,:,iblk), &
vicen = vicen (i,j,:,iblk), &
strength = strength(i,j, iblk))
enddo ! ij

enddo ! iblk
Expand Down
3 changes: 1 addition & 2 deletions cicecore/cicedyn/dynamics/ice_transport_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1739,8 +1739,7 @@ subroutine work_to_state (nx_block, ny_block, &
i = indxi(ij)
j = indxj(ij)

call icepack_compute_tracers(ntrcr = ntrcr, &
trcr_depend = trcr_depend(:), &
call icepack_compute_tracers(trcr_depend = trcr_depend(:), &
atrcrn = work (ij,narrays+1:narrays+ntrcr), &
aicen = aicen(i,j,n), &
vicen = vicen(i,j,n), &
Expand Down
15 changes: 8 additions & 7 deletions cicecore/cicedyn/general/ice_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5396,9 +5396,10 @@ subroutine get_wave_spec
if (wave_spec) then
! get hardwired frequency bin info and a dummy wave spectrum profile
! the latter is used if wave_spec_type == profile
call icepack_init_wave(nfreq, &
wave_spectrum_profile, &
wavefreq, dwavefreq)
call icepack_init_wave(nfreq = nfreq, &
wave_spectrum_profile = wave_spectrum_profile, &
wavefreq = wavefreq, &
dwavefreq = dwavefreq)

! read more realistic data from a file
if ((trim(wave_spec_type) == 'constant').OR.(trim(wave_spec_type) == 'random')) then
Expand Down Expand Up @@ -5481,10 +5482,10 @@ subroutine wave_spec_data
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

call icepack_init_wave(nfreq, &
wave_spectrum_profile, &
wavefreq, dwavefreq)

call icepack_init_wave(nfreq = nfreq, &
wave_spectrum_profile = wave_spectrum_profile, &
wavefreq = wavefreq, &
dwavefreq = dwavefreq)

!spec_file = trim(ocn_data_dir)//'/'//trim(wave_spec_file)
spec_file = trim(wave_spec_file)
Expand Down
5 changes: 1 addition & 4 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3021,8 +3021,7 @@ subroutine init_state
enddo

if (tmask(i,j,iblk)) &
call icepack_aggregate(ncat = ncat, &
aicen = aicen(i,j,:,iblk), &
call icepack_aggregate(aicen = aicen(i,j,:,iblk), &
trcrn = trcrn(i,j,:,:,iblk), &
vicen = vicen(i,j,:,iblk), &
vsnon = vsnon(i,j,:,iblk), &
Expand All @@ -3031,7 +3030,6 @@ subroutine init_state
vice = vice (i,j, iblk), &
vsno = vsno (i,j, iblk), &
aice0 = aice0(i,j, iblk), &
ntrcr = ntrcr, &
trcr_depend = trcr_depend(:), &
trcr_base = trcr_base(:,:), &
n_trcr_strata = n_trcr_strata(:), &
Expand Down Expand Up @@ -3510,7 +3508,6 @@ subroutine set_state_var (nx_block, ny_block, &
Sprofile = salinz(i,j,:), &
Tprofile = Tmltz(i,j,:), &
Tsfc = Tsfc, &
nilyr = nilyr, nslyr = nslyr, &
qin = qin(:), qsn = qsn(:))

! surface temperature
Expand Down
Loading

0 comments on commit 2e371d4

Please sign in to comment.