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

Possible addition of Brine plume parameterization #116

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions components/elm/src/biogeochem/AllocationMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp

if (stem_leaf(ivt(p)) < 0._r8) then
if (stem_leaf(ivt(p)) == -1._r8) then
f3 = (2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4
f3 = max((2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4_r8, 0.2_r8)
else
f3 = max((-1.0_r8*stem_leaf(ivt(p))*2.7_r8)/(1.0_r8+exp(-0.004_r8*(annsum_npp(p) - &
300.0_r8))) - 0.4_r8, 0.2_r8)
Expand Down Expand Up @@ -2118,7 +2118,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &

if (stem_leaf(ivt(p)) < 0._r8) then
if (stem_leaf(ivt(p)) == -1._r8) then
f3 = (2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4
f3 = max((2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4_r8, 0.2_r8)
else
f3 = max((-1.0_r8*stem_leaf(ivt(p))*2.7_r8)/(1.0_r8+exp(-0.004_r8*(annsum_npp(p) - &
300.0_r8))) - 0.4_r8, 0.2_r8)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
config_am_globalstats_enable = .false.
config_adaptive_timestep = .true.
config_adaptive_timestep_force_interval = '0000-00-01_00:00:00'
7 changes: 7 additions & 0 deletions components/mpas-albany-landice/driver/glc_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,13 @@ end subroutine xml_stream_get_attributes
call check_clocks_sync(domain % clock, Eclock, err_tmp)
ierr = ior(ierr,err_tmp)

! Reset the alarm for checking for force setting of the adaptive timestep interval
if (mpas_is_alarm_ringing(domain % clock, 'adaptiveTimestepForceInterval', ierr=err_tmp)) then
ierr = ior(ierr, err_tmp)
call mpas_reset_clock_alarm(domain % clock, 'adaptiveTimestepForceInterval', ierr=err_tmp)
ierr = ior(ierr, err_tmp)
endif
ierr = ior(ierr, err_tmp)

!-----------------------------------------------------------------------
!
Expand Down
10 changes: 10 additions & 0 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,16 @@
possible_values=".true. or .false."
/>
</nml_record>
<nml_record name="brine_rejection" mode="forward">
<nml_option name="config_use_brine_rejection_parameterization" type="logical" default_value=".true."
description="if true use brine rejection parameterization of Nguyen et al 2009"
possible_values=".true. or .false."
/>
<nml_option name="config_brine_param_n" type="integer" default_value="5"
description="power in the parameterization for distribution of the salinity flux"
possible_values='small integers (0-5)'
/>
</nml_record>
<nml_record name="cvmix" mode="forward">
<nml_option name="config_use_cvmix" type="logical" default_value=".true."
description="If true, use the Community Vertical MIXing routines to compute vertical diffusivity and viscosity"
Expand Down
2 changes: 1 addition & 1 deletion components/mpas-ocean/src/shared/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ mpas_ocn_tracer_hmix_redi.o: mpas_ocn_constants.o mpas_ocn_config.o

mpas_ocn_high_freq_thickness_hmix_del2.o: mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_mesh.o

mpas_ocn_tracer_nonlocalflux.o: mpas_ocn_constants.o mpas_ocn_config.o
mpas_ocn_tracer_nonlocalflux.o: mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_diagnostics_variables.o mpas_ocn_mesh.o

mpas_ocn_tracer_short_wave_absorption.o: mpas_ocn_tracer_short_wave_absorption_jerlov.o mpas_ocn_tracer_short_wave_absorption_variable.o mpas_ocn_constants.o mpas_ocn_config.o

Expand Down
32 changes: 17 additions & 15 deletions components/mpas-ocean/src/shared/mpas_ocn_surface_bulk_forcing.F
Original file line number Diff line number Diff line change
Expand Up @@ -668,22 +668,24 @@ subroutine ocn_surface_bulk_forcing_active_tracers(meshPool, forcingPool, tracer
- (snowFlux(iCell) + iceRunoffFlux(iCell)) &
* latent_heat_fusion_mks) * hflux_factor

! Negative seaIceSalinityFlux is an extraction of salt from the ocean
! So, we negate seaIceSalinityFlux when determining how much salt this flux needs.
requiredSalt = - seaIceSalinityFlux(iCell) * sflux_factor * dt / layerThickness(minLevelCell(iCell), iCell)
allowedSalt = min( 4.0_RKIND, tracerGroup(index_salinity_flux, minLevelCell(iCell), iCell) )

if ( allowedSalt < requiredSalt ) then
tracersSurfaceFluxRemoved(index_salinity_flux, iCell) = tracersSurfaceFluxRemoved(index_salinity_flux, iCell) &
+ ( 1 - allowedSalt / requiredSalt ) * seaIceSalinityFlux(iCell) &
* sflux_factor

tracersSurfaceFlux(index_salinity_flux, iCell) = tracersSurfaceFlux(index_salinity_flux, iCell) &
+ ( allowedSalt / requiredSalt ) * seaIceSalinityFlux(iCell) &
* sflux_factor
else
tracersSurfaceFlux(index_salinity_flux, iCell) = tracersSurfaceFlux(index_salinity_flux, iCell) &
if (.not. config_use_brine_rejection_parameterization) then
! Negative seaIceSalinityFlux is an extraction of salt from the ocean
! So, we negate seaIceSalinityFlux when determining how much salt this flux needs.
requiredSalt = - seaIceSalinityFlux(iCell) * sflux_factor * dt / layerThickness(minLevelCell(iCell), iCell)
allowedSalt = min( 4.0_RKIND, tracerGroup(index_salinity_flux, minLevelCell(iCell), iCell) )

if ( allowedSalt < requiredSalt ) then
tracersSurfaceFluxRemoved(index_salinity_flux, iCell) = tracersSurfaceFluxRemoved(index_salinity_flux, iCell) &
+ ( 1 - allowedSalt / requiredSalt ) * seaIceSalinityFlux(iCell) &
* sflux_factor

tracersSurfaceFlux(index_salinity_flux, iCell) = tracersSurfaceFlux(index_salinity_flux, iCell) &
+ ( allowedSalt / requiredSalt ) * seaIceSalinityFlux(iCell) &
* sflux_factor
else
tracersSurfaceFlux(index_salinity_flux, iCell) = tracersSurfaceFlux(index_salinity_flux, iCell) &
+ seaIceSalinityFlux(iCell) * sflux_factor
end if
end if
end do
!$omp end do
Expand Down
Loading