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

Bugfix for snow grain aging, snow tracer updates and snow surface layer #314

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/core_seaice/column/ice_algae.F90
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ subroutine zbio (dt, nblyr, &
fbio_snoice, fbio_atmice,&
PP_net, ice_bio_net,&
snow_bio_net, grow_alg, &
grow_net, totalChla)
grow_net, totalChla, &
nslyr)

if (write_flux_diag) then
if (aicen > c0) then
Expand Down
6 changes: 3 additions & 3 deletions src/core_seaice/column/ice_snow.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module ice_snow

real (kind=dbl_kind), parameter, public :: &
S_r = 0.033_dbl_kind, & ! irreducible saturation (Anderson 1976)
S_wet= 4.22e-5_dbl_kind ! (um^3/s) wet metamorphism parameters
S_wet= 0.422_dbl_kind ! (um^3/s) wet metamorphism parameters

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

Expand Down Expand Up @@ -843,7 +843,7 @@ end subroutine snow_dry_metamorph

subroutine snow_wet_metamorph (dt, dr_wet, rsnw, smice, smliq)

use ice_constants_colpkg, only: c0, c1, c4, pi
use ice_constants_colpkg, only: c0, c1, c4, pi, p1, c100
!
! Liquid water redistribution: Apply the grain growth function from:
! Brun, E. (1989), Investigation of wet-snow metamorphism in respect of
Expand Down Expand Up @@ -872,7 +872,7 @@ subroutine snow_wet_metamorph (dt, dr_wet, rsnw, smice, smliq)
dr_wet = c0
fliq = c1
if (smice + smliq > c0 .and. rsnw > c0) then
fliq = smliq/(smice + smliq)
fliq = min(smliq/(smice + smliq),p1)*c100
dr_wet = S_wet * fliq**3*dt/(c4*pi*rsnw**2)
endif

Expand Down
6 changes: 4 additions & 2 deletions src/core_seaice/column/ice_zbgc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ subroutine merge_bgc_fluxes (dt, nblyr, &
zbgc_snow, zbgc_atm, &
PP_net, ice_bio_net,&
snow_bio_net, grow_alg, &
grow_net, totalChla)
grow_net, totalChla, &
nslyr)

use ice_constants_colpkg, only: c1, c0, p5, secday, puny
use ice_colpkg_shared, only: solve_zbgc, max_nbtrcr, hs_ssl, R_C2N, &
Expand All @@ -550,6 +551,7 @@ subroutine merge_bgc_fluxes (dt, nblyr, &

integer (kind=int_kind), intent(in) :: &
nblyr, &
nslyr, & ! number of snow layers
n_algae, & !
ntrcr, & ! number of tracers
nbtrcr ! number of biology tracer tracers
Expand Down Expand Up @@ -625,7 +627,7 @@ subroutine merge_bgc_fluxes (dt, nblyr, &
!-----------------------------------------------------------------
! Merge fluxes
!-----------------------------------------------------------------
dvssl = min(p5*vsnon, hs_ssl*aicen) ! snow surface layer
dvssl = min(p5*vsnon/real(nslyr,kind=dbl_kind), hs_ssl*aicen) ! snow surface layer
dvint = vsnon - dvssl ! snow interior
snow_bio_net(mm) = snow_bio_net(mm) &
+ trcrn(bio_index(mm)+nblyr+1)*dvssl &
Expand Down
21 changes: 1 addition & 20 deletions src/core_seaice/shared/mpas_seaice_column.F
Original file line number Diff line number Diff line change
Expand Up @@ -614,18 +614,7 @@ subroutine init_column_snow_tracers(domain)

call MPAS_pool_get_array(tracers, "snowGrainRadius", snowGrainRadius, 1)

snowGrainRadius(:,:,:) = 0.0_RKIND

do iCell = 1, nCellsSolve

do iCategory = 1, nCategories
if (snowVolumeCategory(1,iCategory,iCell) .gt. 0.0_RKIND) then
do iSnowLayer = 1, nSnowLayers
snowGrainRadius(iSnowLayer,iCategory,iCell) = config_fallen_snow_radius
enddo
endif
enddo
enddo
snowGrainRadius(:,:,:) = config_fallen_snow_radius

endif ! config_do_restart_snow_grain_radius
endif ! config_use_snow_grain_radius
Expand Down Expand Up @@ -2534,10 +2523,6 @@ subroutine column_snow(domain)
abortFlag = .false.
abortMessage = ""

! set the category tracer array
call set_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)

call colpkg_clear_warnings()
call colpkg_step_snow (&
config_dt, &
Expand Down Expand Up @@ -2581,10 +2566,6 @@ subroutine column_snow(domain)

call column_write_warnings(abortFlag)

! get category tracer array
call get_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)

enddo !iCell

deallocate(effectiveSnowDensityCategory)
Expand Down