Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve_zsal bug fix and update zsal test option #549

Merged
merged 2 commits into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1561,11 +1561,11 @@ subroutine print_state(plabel,i,j,iblk)

real (kind=dbl_kind) :: &
eidebug, esdebug, &
qi, qs, Tsnow, &
qi, qs, Tsnow, si, &
rad_to_deg, puny, rhoi, lfresh, rhos, cp_ice

integer (kind=int_kind) :: n, k, nt_Tsfc, nt_qice, nt_qsno, nt_fsd, &
nt_isosno, nt_isoice
nt_isosno, nt_isoice, nt_sice

logical (kind=log_kind) :: tr_fsd, tr_iso

Expand All @@ -1576,7 +1576,7 @@ subroutine print_state(plabel,i,j,iblk)

call icepack_query_tracer_flags(tr_fsd_out=tr_fsd, tr_iso_out=tr_iso)
call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno, nt_fsd_out=nt_fsd, &
nt_qsno_out=nt_qsno, nt_sice_out=nt_sice, nt_fsd_out=nt_fsd, &
nt_isosno_out=nt_isosno, nt_isoice_out=nt_isoice)
call icepack_query_parameters( &
rad_to_deg_out=rad_to_deg, puny_out=puny, rhoi_out=rhoi, lfresh_out=lfresh, &
Expand Down Expand Up @@ -1621,7 +1621,6 @@ subroutine print_state(plabel,i,j,iblk)

enddo ! n


eidebug = c0
do n = 1,ncat
do k = 1,nilyr
Expand Down Expand Up @@ -1654,6 +1653,14 @@ subroutine print_state(plabel,i,j,iblk)
write(nu_diag,*) 'qsnow(i,j)',esdebug
write(nu_diag,*) ' '

do n = 1,ncat
do k = 1,nilyr
si = trcrn(i,j,nt_sice+k-1,n,iblk)
write(nu_diag,*) 'sice, cat ',n,' layer ',k, si
enddo
enddo
write(nu_diag,*) ' '

write(nu_diag,*) 'uvel(i,j)',uvel(i,j,iblk)
write(nu_diag,*) 'vvel(i,j)',vvel(i,j,iblk)

Expand Down
9 changes: 5 additions & 4 deletions cicecore/cicedynB/general/ice_step_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -550,22 +550,23 @@ subroutine step_therm2 (dt, iblk)

logical (kind=log_kind) :: &
tr_fsd, & ! floe size distribution tracers
z_tracers
z_tracers, & ! vertical biogeochemistry
solve_zsal ! zsalinity

type (block) :: &
this_block ! block information for current block

character(len=*), parameter :: subname = '(step_therm2)'

call icepack_query_parameters(z_tracers_out=z_tracers)
call icepack_query_parameters(z_tracers_out=z_tracers,solve_zsal_out=solve_zsal)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_query_tracer_flags(tr_fsd_out=tr_fsd)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

! tcraig, nltrcr used to be the number of zbgc tracers, but it's used as a zbgc flag in icepack
if (z_tracers) then
! nltrcr is only used as a zbgc flag in icepack (number of zbgc tracers > 0)
if (z_tracers .or. solve_zsal) then
nltrcr = 1
else
nltrcr = 0
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/standalone/cice/CICE_RunMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ subroutine coupling_prep (iblk)
Tref (:,:,iblk), Qref (:,:,iblk), &
fresh (:,:,iblk), fsalt (:,:,iblk), &
fhocn (:,:,iblk), &
fswthru (:,:,iblk), &
fswthru (:,:,iblk), &
fswthru_vdr (:,:,iblk), &
fswthru_vdf (:,:,iblk), &
fswthru_idr (:,:,iblk), &
Expand Down
17 changes: 9 additions & 8 deletions cicecore/drivers/standalone/cice/CICE_RunMod.F90_debug
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
plabeld = 'post step_therm2'
call debug_ice (iblk, plabeld)

endif
endif ! ktherm > 0

enddo ! iblk
!$OMP END PARALLEL DO
Expand Down Expand Up @@ -394,8 +394,8 @@
albpnd, albcnt, apeff_ai, fpond, fresh, l_mpond_fresh, &
alvdf_ai, alidf_ai, alvdr_ai, alidr_ai, fhocn_ai, &
fresh_ai, fsalt_ai, fsalt, &
fswthru_ai, fhocn, fswthru, scale_factor, snowfrac, &
fswthru_vdr, fswthru_vdf, fswthru_idr, fswthru_idf, &
fswthru_ai, fhocn, scale_factor, snowfrac, &
fswthru, fswthru_vdr, fswthru_vdf, fswthru_idr, fswthru_idf, &
swvdr, swidr, swvdf, swidf, Tf, Tair, Qa, strairxT, strairyT, &
fsens, flat, fswabs, flwout, evap, Tref, Qref, &
scale_fluxes, frzmlt_init, frzmlt
Expand Down Expand Up @@ -589,11 +589,12 @@
evap (:,:,iblk), &
Tref (:,:,iblk), Qref (:,:,iblk), &
fresh (:,:,iblk), fsalt (:,:,iblk), &
fhocn (:,:,iblk), fswthru (:,:,iblk), &
fswthru_vdr(:,:,iblk), &
fswthru_vdf(:,:,iblk), &
fswthru_idr(:,:,iblk), &
fswthru_idf(:,:,iblk), &
fhocn (:,:,iblk), &
fswthru (:,:,iblk), &
fswthru_vdr (:,:,iblk), &
fswthru_vdf (:,:,iblk), &
fswthru_idr (:,:,iblk), &
fswthru_idf (:,:,iblk), &
faero_ocn(:,:,:,iblk), &
alvdr (:,:,iblk), alidr (:,:,iblk), &
alvdf (:,:,iblk), alidf (:,:,iblk), &
Expand Down
1 change: 0 additions & 1 deletion configuration/scripts/options/set_nml.zsal
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ sw_redist = .true.
tfrz_option = 'linear_salt'
tr_brine = .true.
solve_zsal = .true.
z_tracers = .true.
ice_ic = 'default'
restart = .false.