diff --git a/cime_config/config_grids.xml b/cime_config/config_grids.xml
index b9ae00da0195..56a183886769 100755
--- a/cime_config/config_grids.xml
+++ b/cime_config/config_grids.xml
@@ -599,6 +599,16 @@
IcoswISC30E3r5
+
+ TL319
+ r05
+ IcoswISC30E3r5
+ r05
+ null
+ null
+ IcoswISC30E3r5
+
+
TL319
TL319
diff --git a/cime_config/machines/config_machines.xml b/cime_config/machines/config_machines.xml
index 486948892aaf..00087a00a7da 100644
--- a/cime_config/machines/config_machines.xml
+++ b/cime_config/machines/config_machines.xml
@@ -2622,6 +2622,7 @@
$SHELL{dirname $(dirname $(which nf-config))}
$SHELL{dirname $(dirname $(which pnetcdf_version))}
^lockedfile,individual
+ ^xpmem
128M
diff --git a/components/mpas-seaice/bld/build-namelist b/components/mpas-seaice/bld/build-namelist
index ca4a0c6c0323..3d7ce2c619f8 100755
--- a/components/mpas-seaice/bld/build-namelist
+++ b/components/mpas-seaice/bld/build-namelist
@@ -681,6 +681,7 @@ if ($ice_bgc eq 'ice_bgc') {
add_default($nl, 'config_use_humics', 'val'=>".true.");
add_default($nl, 'config_use_DON', 'val'=>".true.");
add_default($nl, 'config_use_iron', 'val'=>".true.");
+ add_default($nl, 'config_couple_biogeochemistry_fields');
} else {
add_default($nl, 'config_use_vertical_biochemistry', 'val'=>".false.");
add_default($nl, 'config_use_vertical_tracers', 'val'=>".false.");
@@ -694,11 +695,14 @@ if ($ice_bgc eq 'ice_bgc') {
add_default($nl, 'config_use_humics', 'val'=>".false.");
add_default($nl, 'config_use_DON', 'val'=>".false.");
add_default($nl, 'config_use_iron', 'val'=>".false.");
+ add_default($nl, 'config_couple_biogeochemistry_fields', 'val'=>".false.");
}
add_default($nl, 'config_use_chlorophyll');
add_default($nl, 'config_use_macromolecules');
add_default($nl, 'config_use_modal_aerosols');
add_default($nl, 'config_use_zaerosols');
+add_default($nl, 'config_use_atm_dust_file');
+add_default($nl, 'config_use_iron_solubility_file');
add_default($nl, 'config_skeletal_bgc_flux_type');
add_default($nl, 'config_scale_initial_vertical_bgc');
add_default($nl, 'config_biogrid_bottom_molecular_sublayer');
diff --git a/components/mpas-seaice/bld/build-namelist-section b/components/mpas-seaice/bld/build-namelist-section
index eac96b5a10b9..d2866ee4c813 100644
--- a/components/mpas-seaice/bld/build-namelist-section
+++ b/components/mpas-seaice/bld/build-namelist-section
@@ -193,6 +193,7 @@ add_default($nl, 'config_use_floe_size_distribution');
# Namelist group: biogeochemistry #
###################################
+add_default($nl, 'config_couple_biogeochemistry_fields');
add_default($nl, 'config_use_brine');
add_default($nl, 'config_use_vertical_zsalinity');
add_default($nl, 'config_use_vertical_biochemistry');
@@ -212,6 +213,8 @@ add_default($nl, 'config_use_DON');
add_default($nl, 'config_use_iron');
add_default($nl, 'config_use_modal_aerosols');
add_default($nl, 'config_use_zaerosols');
+add_default($nl, 'config_use_atm_dust_file');
+add_default($nl, 'config_use_iron_solubility_file');
add_default($nl, 'config_skeletal_bgc_flux_type');
add_default($nl, 'config_scale_initial_vertical_bgc');
add_default($nl, 'config_biogrid_bottom_molecular_sublayer');
diff --git a/components/mpas-seaice/bld/namelist_files/namelist_defaults_mpassi.xml b/components/mpas-seaice/bld/namelist_files/namelist_defaults_mpassi.xml
index 23f258f2a308..d840b317785e 100644
--- a/components/mpas-seaice/bld/namelist_files/namelist_defaults_mpassi.xml
+++ b/components/mpas-seaice/bld/namelist_files/namelist_defaults_mpassi.xml
@@ -80,7 +80,6 @@
75.0
85.0
75.0
-
70.0
70.0
85.0
@@ -95,7 +94,6 @@
-75.0
-85.0
-75.0
-
-60.0
-60.0
-85.0
@@ -219,6 +217,7 @@
false
+false
false
false
false
@@ -238,6 +237,8 @@
false
false
false
+false
+false
'Jin2006'
false
0.006
@@ -347,12 +348,12 @@
0.0
0.0
0.5
-0.0
-0.0
-0.0
-0.0
-0.0
-0.0
+-1.0
+-1.0
+-1.0
+-1.0
+-1.0
+-1.0
7.0
7.0
7.0
diff --git a/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml b/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml
index e0c69ba717f7..efbaef07cb9d 100644
--- a/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml
+++ b/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml
@@ -333,7 +333,7 @@ Default: Defined in namelist_defaults.xml
-Sea ice concentration at initialization.
+Sea ice fraction at initialization.
Valid values: A real number between 0.0 and 1.0 inclusive.
Default: Defined in namelist_defaults.xml
@@ -955,6 +955,14 @@ Default: Defined in namelist_defaults.xml
+
+Couple ocean and seaice biogeochemical fields
+
+Valid values: true or false
+Default: Defined in namelist_defaults.xml
+
+
Use the brine height tracer
@@ -1107,6 +1115,22 @@ Valid values: true or false
Default: Defined in namelist_defaults.xml
+
+Read atmospheric dust fluxes from a file
+
+Valid values: true or false
+Default: Defined in namelist_defaults.xml
+
+
+
+Read atmospheric dust-iron solubility from a file
+
+Valid values: true or false
+Default: Defined in namelist_defaults.xml
+
+
Determines the ocean-ice fluxes of biogeochemistry for the bottom1-layer model: in Jin2006, the piston velocity is a function of ice growth/melt rate, in default, the piston velocity is constant
diff --git a/components/mpas-seaice/cime_config/buildnml b/components/mpas-seaice/cime_config/buildnml
index feecb0c6987b..2b7ca33eba21 100755
--- a/components/mpas-seaice/cime_config/buildnml
+++ b/components/mpas-seaice/cime_config/buildnml
@@ -72,6 +72,7 @@ def buildnml(case, caseroot, compname):
decomp_prefix = ''
data_iceberg_file = ''
points_file = ''
+ dust_iron_file = ''
if ice_grid == 'oEC60to30v3':
decomp_date = '230424'
@@ -299,6 +300,7 @@ def buildnml(case, caseroot, compname):
decomp_date = '20231120'
decomp_prefix = 'partitions/mpas-seaice.graph.info.'
data_iceberg_file = 'Iceberg_Climatology_Merino.IcoswISC30E3r5.20231120.nc'
+ dust_iron_file = 'ecoForcingSurfaceMonthly+WetDryDustSolFrac.IcoswISC30E3r5.20240511.nc'
if ice_ic_mode == 'spunup':
if iceberg_mode == 'data':
grid_date = '20240207'
@@ -346,6 +348,8 @@ def buildnml(case, caseroot, compname):
input_list.write("points = {}/ice/mpas-seaice/{}/{}\n".format(din_loc_root, ice_mask, points_file))
if iceberg_mode == 'data':
input_list.write("data_iceberg = {}/ice/mpas-seaice/{}/{}\n".format(din_loc_root, ice_mask, data_iceberg_file))
+ if dust_iron_file != '':
+ input_list.write("dust_iron = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ice_mask, dust_iron_file))
#--------------------------------------------------------------------
# Invoke mpas build-namelist - output will go in $CASEBUILD/mpassiconf
@@ -587,10 +591,19 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append('')
+ if dust_iron_file != '':
+ lines.append('')
+ lines.append('')
+
lines.append('')
@@ -732,6 +745,15 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
lines.append('')
lines.append('')
lines.append(' domain % blocklist
@@ -1950,7 +1949,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
config_use_aerosols, &
config_use_modal_aerosols, &
config_use_zaerosols, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_couple_biogeochemistry_fields
character(len=strKIND), pointer :: &
config_column_physics_type, &
@@ -1998,7 +1998,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
oceanZAerosolConcField, &
atmosAerosolFluxField, &
atmosBlackCarbonFluxField, &
- atmosDustFluxField
+ atmosDustFluxField, &
+ atmosWetDustFluxField, &
+ atmosDryDustFluxField
real (kind=RKIND), dimension(:), pointer :: &
seaSurfaceTemperature, &
@@ -2044,7 +2046,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
oceanZAerosolConc, &
atmosAerosolFlux, &
atmosBlackCarbonFlux, &
- atmosDustFlux
+ atmosDustFlux, &
+ atmosWetDustFlux, &
+ atmosDryDustFlux
!-----------------------------------------------------------------------
!
@@ -2070,6 +2074,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_config(configs, "config_use_aerosols", config_use_aerosols)
call mpas_pool_get_config(configs, "config_use_modal_aerosols", config_use_modal_aerosols)
call mpas_pool_get_config(configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call mpas_pool_get_config(configs, "config_couple_biogeochemistry_fields", config_couple_biogeochemistry_fields)
+ call mpas_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols)
call mpas_pool_get_subpool(block_ptr % structs, 'mesh', meshPool)
call mpas_pool_get_subpool(block_ptr % structs, 'ocean_coupling', oceanCoupling)
@@ -2108,9 +2114,14 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_array(aerosols, "atmosAerosolFlux", atmosAerosolFlux)
endif
- if (config_use_column_biogeochemistry) then
- call mpas_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols)
- call mpas_pool_get_subpool(block_ptr % structs, 'biogeochemistry', biogeochemistry)
+ call mpas_pool_get_subpool(block_ptr % structs, 'biogeochemistry', biogeochemistry)
+ if (config_use_zaerosols) then
+ call mpas_pool_get_array(biogeochemistry, 'atmosBlackCarbonFlux', atmosBlackCarbonFlux)
+ call mpas_pool_get_array(biogeochemistry, 'atmosDustFlux', atmosDustFlux)
+ call mpas_pool_get_array(biogeochemistry, "atmosWetDustFlux", atmosWetDustFlux)
+ call mpas_pool_get_array(biogeochemistry, "atmosDryDustFlux", atmosDryDustFlux)
+ endif
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
call mpas_pool_get_array(biogeochemistry, 'oceanAlgaeConc', oceanAlgaeConc)
call mpas_pool_get_array(biogeochemistry, 'oceanDOCConc', oceanDOCConc)
@@ -2124,15 +2135,10 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_array(biogeochemistry, 'oceanHumicsConc', oceanHumicsConc)
call mpas_pool_get_array(biogeochemistry, 'oceanParticulateIronConc', oceanParticulateIronConc)
call mpas_pool_get_array(biogeochemistry, 'oceanDissolvedIronConc', oceanDissolvedIronConc)
- call mpas_pool_get_array(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConc)
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioAlgae', carbonToNitrogenRatioAlgae)
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioDON', carbonToNitrogenRatioDON)
call mpas_pool_get_array(biogeochemistry, 'DOCPoolFractions', DOCPoolFractions)
- if (config_use_zaerosols) then
- call mpas_pool_get_array(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFlux)
- call mpas_pool_get_array(biogeochemistry, "atmosDustFlux", atmosDustFlux)
- endif
endif
do i = 1, nCellsSolve
@@ -2224,8 +2230,67 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
endif
endif
+ ! set aerosols, if configured
+ if (config_use_zaerosols .or. config_use_column_biogeochemistry) then
+ call mpas_pool_get_array(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConc)
+ oceanZAerosolConc(1,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer1, n)
+ oceanZAerosolConc(2,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer2, n)
+ oceanZAerosolConc(3,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer3, n)
+ oceanZAerosolConc(4,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer4, n)
+ oceanZAerosolConc(5,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer5, n)
+ oceanZAerosolConc(6,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer6, n)
+ end if
+ if (config_use_zaerosols) then
+ if (config_use_modal_aerosols) then
+ atmosBlackCarbonFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_bcphodry, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_bcphidry, n)
+ atmosBlackCarbonFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_bcphiwet, n)
+ !combine wet and dry dust
+ atmosDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet1, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry1, n)
+ atmosDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet2, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry2, n)
+ atmosDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet3, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry3, n)
+ atmosDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet4, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry4, n)
+
+ atmosWetDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet1, n)
+ atmosWetDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet2, n)
+ atmosWetDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet3, n)
+ atmosWetDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet4, n)
+
+ atmosDryDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry1, n)
+ atmosDryDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry2, n)
+ atmosDryDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry3, n)
+ atmosDryDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry4, n)
+ else
+ atmosBlackCarbonFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_bcphodry, n)
+ atmosBlackCarbonFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_bcphidry, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_bcphiwet, n)
+ ! combine wet and dry dust
+ atmosDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet1, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry1, n)
+ atmosDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet2, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry2, n)
+ atmosDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet3, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry3, n)
+ atmosDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet4, n) &
+ + x2i_i % rAttr(index_x2i_Faxa_dstdry4, n)
+
+ atmosDryDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry1, n)
+ atmosDryDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry2, n)
+ atmosDryDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry3, n)
+ atmosDryDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstdry4, n)
+
+ atmosWetDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet1, n)
+ atmosWetDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet2, n)
+ atmosWetDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet3, n)
+ atmosWetDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet4, n)
+ endif
+ endif
! import biogeochemistry fields, if configured
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
oceanAlgaeConc(1,i) = x2i_i % rAttr(index_x2i_So_algae1, n)
oceanAlgaeConc(2,i) = x2i_i % rAttr(index_x2i_So_algae2, n)
oceanAlgaeConc(3,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_algae3, n)
@@ -2245,42 +2310,6 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
oceanParticulateIronConc(2,i) = x2i_i % rAttr(index_x2i_So_fep2, n)
oceanDissolvedIronConc(1,i) = x2i_i % rAttr(index_x2i_So_fed1, n)
oceanDissolvedIronConc(2,i) = x2i_i % rAttr(index_x2i_So_fed2, n)
- oceanZAerosolConc(1,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer1, n)
- oceanZAerosolConc(2,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer2, n)
- oceanZAerosolConc(3,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer3, n)
- oceanZAerosolConc(4,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer4, n)
- oceanZAerosolConc(5,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer5, n)
- oceanZAerosolConc(6,i) = 0.0_RKIND !x2i_i % rAttr(index_x2i_So_zaer6, n)
- ! set aerosols, if configured
- if (config_use_zaerosols) then
- if (config_use_modal_aerosols) then
- atmosBlackCarbonFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_bcphodry, n) &
- + x2i_i % rAttr(index_x2i_Faxa_bcphidry, n)
- atmosBlackCarbonFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_bcphiwet, n)
- ! combine wet and dry dust
- atmosDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet1, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry1, n)
- atmosDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet2, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry2, n)
- atmosDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet3, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry3, n)
- atmosDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet4, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry4, n)
- else
- atmosBlackCarbonFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_bcphodry, n)
- atmosBlackCarbonFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_bcphidry, n) &
- + x2i_i % rAttr(index_x2i_Faxa_bcphiwet, n)
- ! combine wet and dry dust
- atmosDustFlux(1,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet1, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry1, n)
- atmosDustFlux(2,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet2, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry2, n)
- atmosDustFlux(3,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet3, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry3, n)
- atmosDustFlux(4,i) = x2i_i % rAttr(index_x2i_Faxa_dstwet4, n) &
- + x2i_i % rAttr(index_x2i_Faxa_dstdry4, n)
- endif
- endif
endif
end do
@@ -2293,7 +2322,7 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
seaSurfaceTemperature(i) = seaSurfaceTemperature(i) - seaiceFreshWaterFreezingPoint
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
! convert from mmol C/m^3 to mmol N/m^3
oceanAlgaeConc(1,i) = oceanAlgaeConc(1,i) / carbonToNitrogenRatioAlgae(1)
oceanAlgaeConc(2,i) = oceanAlgaeConc(2,i) / carbonToNitrogenRatioAlgae(2)
@@ -2343,7 +2372,16 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_field(aerosols, "atmosAerosolFlux", atmosAerosolFluxField)
endif
- if (config_use_column_biogeochemistry) then
+ if (config_use_zaerosols .or. config_use_column_biogeochemistry) &
+ call mpas_pool_get_field(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConcField)
+
+ if (config_use_zaerosols) then
+ call mpas_pool_get_field(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFluxField)
+ call mpas_pool_get_field(biogeochemistry, "atmosDustFlux", atmosDustFluxField)
+ call mpas_pool_get_field(biogeochemistry, "atmosWetDustFlux", atmosWetDustFluxField)
+ call mpas_pool_get_field(biogeochemistry, "atmosDryDustFlux", atmosDryDustFluxField)
+ endif
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
call mpas_pool_get_subpool(domain % blocklist % structs, 'biogeochemistry', biogeochemistry)
call mpas_pool_get_field(biogeochemistry, 'oceanAlgaeConc', oceanAlgaeConcField)
@@ -2358,11 +2396,6 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_field(biogeochemistry, 'oceanHumicsConc', oceanHumicsConcField)
call mpas_pool_get_field(biogeochemistry, 'oceanParticulateIronConc', oceanParticulateIronConcField)
call mpas_pool_get_field(biogeochemistry, 'oceanDissolvedIronConc', oceanDissolvedIronConcField)
- call mpas_pool_get_field(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConcField)
- if (config_use_zaerosols) then
- call mpas_pool_get_field(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFluxField)
- call mpas_pool_get_field(biogeochemistry, "atmosDustFlux", atmosDustFluxField)
- endif
endif
call mpas_dmpar_exch_halo_field(seaSurfaceTemperatureField)
@@ -2393,8 +2426,16 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
if (config_use_aerosols) then
call mpas_dmpar_exch_halo_field(atmosAerosolFluxField)
endif
+ if (config_use_zaerosols .or. config_use_column_biogeochemistry) &
+ call mpas_dmpar_exch_halo_field(oceanZAerosolConcField)
- if (config_use_column_biogeochemistry) then
+ if (config_use_zaerosols) then
+ call mpas_dmpar_exch_halo_field(atmosBlackCarbonFluxField)
+ call mpas_dmpar_exch_halo_field(atmosDustFluxField)
+ call mpas_dmpar_exch_halo_field(atmosDryDustFluxField)
+ call mpas_dmpar_exch_halo_field(atmosWetDustFluxField)
+ endif
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
call mpas_dmpar_exch_halo_field(oceanAlgaeConcField)
call mpas_dmpar_exch_halo_field(oceanDOCConcField)
call mpas_dmpar_exch_halo_field(oceanDICConcField)
@@ -2407,11 +2448,6 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_dmpar_exch_halo_field(oceanHumicsConcField)
call mpas_dmpar_exch_halo_field(oceanParticulateIronConcField)
call mpas_dmpar_exch_halo_field(oceanDissolvedIronConcField)
- call mpas_dmpar_exch_halo_field(oceanZAerosolConcField)
- if (config_use_zaerosols) then
- call mpas_dmpar_exch_halo_field(atmosBlackCarbonFluxField)
- call mpas_dmpar_exch_halo_field(atmosDustFluxField)
- endif
endif
! REVISION HISTORY:
@@ -2486,6 +2522,8 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
config_rotate_cartesian_grid, &
config_use_topo_meltponds, &
config_use_column_biogeochemistry, &
+ config_use_zaerosols, &
+ config_couple_biogeochemistry_fields, &
config_use_column_shortwave, &
config_use_data_icebergs
@@ -2535,6 +2573,7 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
oceanDMSPpFlux, &
oceanDMSPdFlux, &
oceanHumicsFlux, &
+ oceanDustIronFlux, &
carbonToNitrogenRatioAlgae, &
carbonToNitrogenRatioDON
@@ -2557,7 +2596,9 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
configs => block_ptr % configs
call MPAS_pool_get_config(configs, "config_rotate_cartesian_grid", config_rotate_cartesian_grid)
call MPAS_pool_get_config(configs, "config_use_topo_meltponds", config_use_topo_meltponds)
+ call MPAS_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call mpas_pool_get_config(configs, "config_couple_biogeochemistry_fields", config_couple_biogeochemistry_fields)
call MPAS_pool_get_config(configs, "config_use_column_shortwave", config_use_column_shortwave)
call MPAS_pool_get_config(configs, "config_use_data_icebergs", config_use_data_icebergs)
@@ -2620,7 +2661,7 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
call MPAS_pool_get_array(icebergFluxes, "bergLatentHeatFlux", bergLatentHeatFlux)
endif
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
call mpas_pool_get_subpool(block_ptr % structs, 'biogeochemistry', biogeochemistry)
call mpas_pool_get_array(biogeochemistry, 'oceanAlgaeFlux', oceanAlgaeFlux)
@@ -2640,6 +2681,9 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioDON', carbonToNitrogenRatioDON)
endif
+ if (config_use_zaerosols .and. config_couple_biogeochemistry_fields) &
+ call mpas_pool_get_array(biogeochemistry, 'oceanDustIronFlux', oceanDustIronFlux)
+
do i = 1, nCellsSolve
n = n + 1
@@ -2741,7 +2785,7 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
i2x_i % rAttr(index_i2x_Fioi_tauy ,n) = tauyo
! export biogeochemistry fields, if configured
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
! convert from mmol N/m^3 to mmol C/m^3
i2x_i % rAttr(index_i2x_Fioi_algae1,n) = oceanAlgaeFlux(1,i) * carbonToNitrogenRatioAlgae(1)
i2x_i % rAttr(index_i2x_Fioi_algae2,n) = oceanAlgaeFlux(2,i) * carbonToNitrogenRatioAlgae(2)
@@ -2764,6 +2808,9 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
i2x_i % rAttr(index_i2x_Fioi_fed1 ,n) = oceanDissolvedIronFlux(1,i) / 1000._RKIND
i2x_i % rAttr(index_i2x_Fioi_fed2 ,n) = oceanDissolvedIronFlux(2,i) / 1000._RKIND
endif
+ ! export dust, if configured kg/m2/s of dust
+ if (config_use_zaerosols .and. config_couple_biogeochemistry_fields) &
+ i2x_i % rAttr(index_i2x_Fioi_dust1 ,n) = oceanDustIronFlux(i)
endif
enddo
@@ -3092,8 +3139,10 @@ subroutine ice_export_moab(EClock)
config_rotate_cartesian_grid, &
config_use_topo_meltponds, &
config_use_column_biogeochemistry, &
+ config_use_zaerosols, &
config_use_column_shortwave, &
- config_use_data_icebergs
+ config_use_data_icebergs, &
+ config_couple_biogeochemistry_fields
real(kind=RKIND), pointer :: &
sphere_radius
@@ -3141,6 +3190,7 @@ subroutine ice_export_moab(EClock)
oceanDMSPpFlux, &
oceanDMSPdFlux, &
oceanHumicsFlux, &
+ oceanDustIronFlux, &
carbonToNitrogenRatioAlgae, &
carbonToNitrogenRatioDON
@@ -3154,23 +3204,25 @@ subroutine ice_export_moab(EClock)
integer :: ent_type, ierr, cur_ice_stepno
character(len=32), parameter :: sub = 'ice_export_moab'
-
+
character(len=100) :: outfile, wopts, localmeshfile, lnum
character(CXX) :: tagname
- !-----------------------------------------------------------------------
+ !-----------------------------------------------------------------------
call shr_file_setLogUnit (iceLogUnit)
n = 0
i2x_im(: ,:) = 0.0_RKIND
block_ptr => domain % blocklist
do while(associated(block_ptr))
-
+
configs => block_ptr % configs
call MPAS_pool_get_config(configs, "config_rotate_cartesian_grid", config_rotate_cartesian_grid)
call MPAS_pool_get_config(configs, "config_use_topo_meltponds", config_use_topo_meltponds)
+ call MPAS_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call mpas_pool_get_config(configs, "config_couple_biogeochemistry_fields", config_couple_biogeochemistry_fields)
call MPAS_pool_get_config(configs, "config_use_column_shortwave", config_use_column_shortwave)
call MPAS_pool_get_config(configs, "config_use_data_icebergs", config_use_data_icebergs)
-
+
call MPAS_pool_get_subpool(block_ptr % structs, 'mesh', meshPool)
call MPAS_pool_get_subpool(block_ptr % structs, "tracers_aggregate", tracersAggregate)
call MPAS_pool_get_subpool(block_ptr % structs, "velocity_solver", velocitySolver)
@@ -3179,7 +3231,7 @@ subroutine ice_export_moab(EClock)
call MPAS_pool_get_subpool(block_ptr % structs, 'ocean_coupling', oceanCoupling)
call MPAS_pool_get_subpool(block_ptr % structs, "atmos_fluxes", atmosFluxes)
call MPAS_pool_get_subpool(block_ptr % structs, "ocean_fluxes", oceanFluxes)
-
+
call MPAS_pool_get_dimension(meshPool, 'nCellsSolve', nCellsSolve)
call MPAS_pool_get_config(meshPool, "sphere_radius", sphere_radius)
call MPAS_pool_get_array(meshPool, "latCell", latCell)
@@ -3187,7 +3239,7 @@ subroutine ice_export_moab(EClock)
call MPAS_pool_get_array(meshPool, "xCell", xCell)
call MPAS_pool_get_array(meshPool, "yCell", yCell)
call MPAS_pool_get_array(meshPool, "zCell", zCell)
-
+
call MPAS_pool_get_array(tracersAggregate, 'iceAreaCell', iceAreaCell)
call MPAS_pool_get_array(tracersAggregate, 'iceVolumeCell', iceVolumeCell)
call MPAS_pool_get_array(tracersAggregate, 'snowVolumeCell', snowVolumeCell)
@@ -3195,44 +3247,44 @@ subroutine ice_export_moab(EClock)
call MPAS_pool_get_array(tracersAggregate, 'pondLidThicknessCell', pondLidThicknessCell)
call MPAS_pool_get_array(tracersAggregate, 'pondAreaCell', pondAreaCell)
call MPAS_pool_get_array(tracersAggregate, 'surfaceTemperatureCell', surfaceTemperatureCell)
-
+
call MPAS_pool_get_array(velocitySolver, 'airStressCellU', airStressCellU)
call MPAS_pool_get_array(velocitySolver, 'airStressCellV', airStressCellV)
call MPAS_pool_get_array(velocitySolver, 'oceanStressCellU', oceanStressCellU)
call MPAS_pool_get_array(velocitySolver, 'oceanStressCellV', oceanStressCellV)
-
+
call MPAS_pool_get_array(shortwave, 'albedoVisibleDirectCell', albedoVisibleDirectCell)
call MPAS_pool_get_array(shortwave, 'albedoIRDirectCell', albedoIRDirectCell)
call MPAS_pool_get_array(shortwave, 'albedoVisibleDiffuseCell', albedoVisibleDiffuseCell)
call MPAS_pool_get_array(shortwave, 'albedoIRDiffuseCell', albedoIRDiffuseCell)
call MPAS_pool_get_array(shortwave, 'absorbedShortwaveFlux', absorbedShortwaveFlux)
-
+
call MPAS_pool_get_array(atmosCoupling, 'atmosReferenceSpeed10m', atmosReferenceSpeed10m)
call MPAS_pool_get_array(atmosCoupling, 'atmosReferenceTemperature2m', atmosReferenceTemperature2m)
call MPAS_pool_get_array(atmosCoupling, 'atmosReferenceHumidity2m', atmosReferenceHumidity2m)
-
+
call MPAS_pool_get_array(oceanCoupling, 'frazilMassAdjust', frazilMassAdjust)
-
+
call MPAS_pool_get_array(atmosFluxes, 'latentHeatFlux', latentHeatFlux)
call MPAS_pool_get_array(atmosFluxes, 'sensibleHeatFlux', sensibleHeatFlux)
call MPAS_pool_get_array(atmosFluxes, 'longwaveUp', longwaveUp)
call MPAS_pool_get_array(atmosFluxes, 'evaporativeWaterFlux', evaporativeWaterFlux)
-
+
call MPAS_pool_get_array(oceanFluxes, 'oceanHeatFlux', oceanHeatFlux)
call MPAS_pool_get_array(oceanFluxes, 'oceanShortwaveFlux', oceanShortwaveFlux)
call MPAS_pool_get_array(oceanFluxes, 'oceanFreshWaterFlux', oceanFreshWaterFlux)
call MPAS_pool_get_array(oceanFluxes, 'oceanSaltFlux', oceanSaltFlux)
-
+
if (config_use_data_icebergs) then
call MPAS_pool_get_subpool(block_ptr % structs, "berg_fluxes", icebergFluxes)
-
+
call MPAS_pool_get_array(icebergFluxes, "bergFreshwaterFlux", bergFreshwaterFlux)
call MPAS_pool_get_array(icebergFluxes, "bergLatentHeatFlux", bergLatentHeatFlux)
endif
-
- if (config_use_column_biogeochemistry) then
+
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
call mpas_pool_get_subpool(block_ptr % structs, 'biogeochemistry', biogeochemistry)
-
+
call mpas_pool_get_array(biogeochemistry, 'oceanAlgaeFlux', oceanAlgaeFlux)
call mpas_pool_get_array(biogeochemistry, 'oceanDOCFlux', oceanDOCFlux)
call mpas_pool_get_array(biogeochemistry, 'oceanDICFlux', oceanDICFlux)
@@ -3249,18 +3301,20 @@ subroutine ice_export_moab(EClock)
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioAlgae', carbonToNitrogenRatioAlgae)
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioDON', carbonToNitrogenRatioDON)
endif
-
+ if (config_use_zaerosols .and. config_couple_biogeochemistry_fields) &
+ call mpas_pool_get_array(biogeochemistry, 'oceanDustIronFlux', oceanDustIronFlux)
+
do i = 1, nCellsSolve
n = n + 1
-
+
! ice fraction
ailohi = min(iceAreaCell(i), 1.0_RKIND)
-
+
!TODO: CICE has a check for ailohi < 0
-
+
! surface temperature
Tsrf = seaiceFreshWaterFreezingPoint + surfaceTemperatureCell(i)
-
+
! basal pressure
if ( ailohi > 0.0_RKIND ) then
call basal_pressure(&
@@ -3272,7 +3326,7 @@ subroutine ice_export_moab(EClock)
pondAreaCell(i), &
config_use_topo_meltponds)
endif
-
+
! wind stress (on T-grid: convert to lat-lon)
call seaice_latlon_vector_rotation_backward(&
tauxa, &
@@ -3286,7 +3340,7 @@ subroutine ice_export_moab(EClock)
zCell(i), &
sphere_radius, &
config_rotate_cartesian_grid)
-
+
! ice/ocean stress (on POP T-grid: convert to lat-lon)
call seaice_latlon_vector_rotation_backward(&
tauxo, &
@@ -3300,25 +3354,25 @@ subroutine ice_export_moab(EClock)
zCell(i), &
sphere_radius, &
config_rotate_cartesian_grid)
-
- !-------states--------------------
+
+ !-------states--------------------
i2x_im(n, index_i2x_Si_ifrac) = ailohi
-
+
if (config_use_data_icebergs) then
i2x_im(n, index_i2x_Fioi_bergw) = bergFreshwaterFlux(i)
i2x_im(n, index_i2x_Fioi_bergh) = bergLatentHeatFlux(i)
endif
-
+
if ( ailohi > 0.0_RKIND ) then
-
- !-------states--------------------
+
+ !-------states--------------------
i2x_im(n, index_i2x_Si_t) = Tsrf
i2x_im(n, index_i2x_Si_bpress) = basalPressure
i2x_im(n, index_i2x_Si_u10) = atmosReferenceSpeed10m(i)
i2x_im(n, index_i2x_Si_tref) = atmosReferenceTemperature2m(i)
i2x_im(n, index_i2x_Si_qref) = atmosReferenceHumidity2m(i)
i2x_im(n, index_i2x_Si_snowh) = snowVolumeCell(i) / ailohi
-
+
!--- a/i fluxes computed by ice
i2x_im(n, index_i2x_Faii_taux) = tauxa
i2x_im(n, index_i2x_Faii_tauy) = tauya
@@ -3328,17 +3382,17 @@ subroutine ice_export_moab(EClock)
i2x_im(n, index_i2x_Faii_evap) = evaporativeWaterFlux(i)
i2x_im(n, index_i2x_Faii_swnet) = absorbedShortwaveFlux(i)
i2x_im(n, index_i2x_Faii_evap) = evaporativeWaterFlux(i)
-
+
if (config_use_column_shortwave) then
i2x_im(n, index_i2x_Si_avsdr) = albedoVisibleDirectCell(i)
i2x_im(n, index_i2x_Si_anidr) = albedoIRDirectCell(i)
i2x_im(n, index_i2x_Si_avsdf) = albedoVisibleDiffuseCell(i)
i2x_im(n, index_i2x_Si_anidf) = albedoIRDiffuseCell(i)
-
+
i2x_im(n, index_i2x_Faii_swnet) = absorbedShortwaveFlux(i)
endif
-
- ! i/o fluxes computed by ice, as well as additional freshwater and salt calculated at the last
+
+ ! i/o fluxes computed by ice, as well as additional freshwater and salt calculated at the last
! coupling import and needed to grow sea ice from frazil passed from the ocean model in the
! field frazilMassAdjust.
i2x_im(n, index_i2x_Fioi_melth) = oceanHeatFlux(i)
@@ -3347,9 +3401,9 @@ subroutine ice_export_moab(EClock)
i2x_im(n, index_i2x_Fioi_salt ) = oceanSaltFlux(i) + seaiceReferenceSalinity*0.001_RKIND*frazilMassAdjust(i)/ailohi
i2x_im(n, index_i2x_Fioi_taux ) = tauxo
i2x_im(n, index_i2x_Fioi_tauy ) = tauyo
-
+
! export biogeochemistry fields, if configured
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
! convert from mmol N/m^3 to mmol C/m^3
i2x_im(n, index_i2x_Fioi_algae1) = oceanAlgaeFlux(1,i) * carbonToNitrogenRatioAlgae(1)
i2x_im(n, index_i2x_Fioi_algae2) = oceanAlgaeFlux(2,i) * carbonToNitrogenRatioAlgae(2)
@@ -3372,9 +3426,12 @@ subroutine ice_export_moab(EClock)
i2x_im(n, index_i2x_Fioi_fed1 ) = oceanDissolvedIronFlux(1,i) / 1000._RKIND
i2x_im(n, index_i2x_Fioi_fed2 ) = oceanDissolvedIronFlux(2,i) / 1000._RKIND
endif
+ ! export dust, kg/m2/s
+ if (config_use_zaerosols .and. config_couple_biogeochemistry_fields) &
+ i2x_im(n, index_i2x_Fioi_dust1 ) = oceanDustIronFlux(i)
endif
enddo
-
+
block_ptr => block_ptr % next
enddo
@@ -3385,7 +3442,7 @@ subroutine ice_export_moab(EClock)
if ( ierr /= 0 ) then
write(iceLogUnit,*) 'Fail to set MOAB fields '
endif
-
+
call seq_timemgr_EClockGetData( EClock, stepno=cur_ice_stepno )
#ifdef MOABDEBUG
write(lnum,"(I0.2)")cur_ice_stepno
@@ -3564,7 +3621,9 @@ subroutine ice_import_moab(Eclock)!{{{
oceanZAerosolConcField, &
atmosAerosolFluxField, &
atmosBlackCarbonFluxField, &
- atmosDustFluxField
+ atmosDustFluxField, &
+ atmosWetDustFluxField, &
+ atmosDryDustFluxField
real (kind=RKIND), dimension(:), pointer :: &
seaSurfaceTemperature, &
@@ -3609,7 +3668,9 @@ subroutine ice_import_moab(Eclock)!{{{
oceanZAerosolConc, &
atmosAerosolFlux, &
atmosBlackCarbonFlux, &
- atmosDustFlux
+ atmosDustFlux, &
+ atmosWetDustFlux, &
+ atmosDryDustFlux
character(CXX) :: tagname
integer :: ierr, ent_type
integer :: cur_ice_stepno
@@ -3697,9 +3758,7 @@ subroutine ice_import_moab(Eclock)!{{{
endif
if (config_use_column_biogeochemistry) then
- call mpas_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols)
call mpas_pool_get_subpool(block_ptr % structs, 'biogeochemistry', biogeochemistry)
-
call mpas_pool_get_array(biogeochemistry, 'oceanAlgaeConc', oceanAlgaeConc)
call mpas_pool_get_array(biogeochemistry, 'oceanDOCConc', oceanDOCConc)
call mpas_pool_get_array(biogeochemistry, 'oceanDICConc', oceanDICConc)
@@ -3712,14 +3771,19 @@ subroutine ice_import_moab(Eclock)!{{{
call mpas_pool_get_array(biogeochemistry, 'oceanHumicsConc', oceanHumicsConc)
call mpas_pool_get_array(biogeochemistry, 'oceanParticulateIronConc', oceanParticulateIronConc)
call mpas_pool_get_array(biogeochemistry, 'oceanDissolvedIronConc', oceanDissolvedIronConc)
- call mpas_pool_get_array(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConc)
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioAlgae', carbonToNitrogenRatioAlgae)
call mpas_pool_get_array(biogeochemistry, 'carbonToNitrogenRatioDON', carbonToNitrogenRatioDON)
+ endif
+
+ call mpas_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols)
if (config_use_zaerosols) then
call mpas_pool_get_array(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFlux)
call mpas_pool_get_array(biogeochemistry, "atmosDustFlux", atmosDustFlux)
+ call mpas_pool_get_array(biogeochemistry, "atmosWetDustFlux", atmosWetDustFlux)
+ call mpas_pool_get_array(biogeochemistry, "atmosDryDustFlux", atmosDryDustFlux)
endif
- endif
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) &
+ call mpas_pool_get_array(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConc)
do i = 1, nCellsSolve
n = n + 1
@@ -3734,8 +3798,8 @@ subroutine ice_import_moab(Eclock)!{{{
seaSurfaceTiltV(i) = x2i_im(n,index_x2i_So_dhdy)
if (trim(config_ocean_surface_type) == "free") then ! free surface (MPAS-O)
-
- ! freezingMeltingPotential(i) is the ocean energy associated with frazil formation
+
+ ! freezingMeltingPotential(i) is the ocean energy associated with frazil formation
! when it is positive and frazilMassFlux is positive. Conversely, freezingMeltingPotential(i)
! is negative when there is the melting potential in which case frazilMassFlux is zero.
@@ -3744,7 +3808,7 @@ subroutine ice_import_moab(Eclock)!{{{
frazilMassFlux = x2i_im(n,index_x2i_Fioo_frazil)
! Now determine the sea ice mass associated with the frazil heat flux given when
- ! freezingMeltingPotential(i) is positive. This produces a revised mass flux, given
+ ! freezingMeltingPotential(i) is positive. This produces a revised mass flux, given
! in frazilMassFluxRev for the given sea surface salinity. The resulting difference
! is assigned to frazilMassAdjust(i) which is exported to the ocean in the subsequent
! coupling step as a freshwater and salt flux. This step is required to balance mass
@@ -3752,7 +3816,7 @@ subroutine ice_import_moab(Eclock)!{{{
call frazil_mass(freezingMeltingPotential(i), frazilMassFluxRev, seaSurfaceSalinity(i))
- frazilMassAdjust(i) = frazilMassFlux-frazilMassFluxRev
+ frazilMassAdjust(i) = frazilMassFlux-frazilMassFluxRev
else ! non-free surface (SOM)
@@ -3826,46 +3890,72 @@ subroutine ice_import_moab(Eclock)!{{{
oceanParticulateIronConc(2,i) = x2i_im(n,index_x2i_So_fep2)
oceanDissolvedIronConc(1,i) = x2i_im(n,index_x2i_So_fed1)
oceanDissolvedIronConc(2,i) = x2i_im(n,index_x2i_So_fed2)
+ endif
+ if (config_use_zaerosols .or. config_use_column_biogeochemistry) then
oceanZAerosolConc(1,i) = 0.0_RKIND
oceanZAerosolConc(2,i) = 0.0_RKIND
oceanZAerosolConc(3,i) = 0.0_RKIND
oceanZAerosolConc(4,i) = 0.0_RKIND
oceanZAerosolConc(5,i) = 0.0_RKIND
oceanZAerosolConc(6,i) = 0.0_RKIND
- ! set aerosols, if configured
- if (config_use_zaerosols) then
- if (config_use_modal_aerosols) then
- atmosBlackCarbonFlux(1,i) = x2i_im(n,index_x2i_Faxa_bcphodry) &
- + x2i_im(n,index_x2i_Faxa_bcphidry)
- atmosBlackCarbonFlux(2,i) = x2i_im(n,index_x2i_Faxa_bcphiwet)
- ! combine wet and dry dust
- atmosDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstwet1) &
- + x2i_im(n,index_x2i_Faxa_dstdry1)
- atmosDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstwet2) &
- + x2i_im(n,index_x2i_Faxa_dstdry2)
- atmosDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstwet3) &
- + x2i_im(n,index_x2i_Faxa_dstdry3)
- atmosDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstwet4) &
- + x2i_im(n,index_x2i_Faxa_dstdry4)
- else
- atmosBlackCarbonFlux(1,i) = x2i_im(n,index_x2i_Faxa_bcphodry)
- atmosBlackCarbonFlux(2,i) = x2i_im(n,index_x2i_Faxa_bcphidry) &
- + x2i_im(n,index_x2i_Faxa_bcphiwet)
- ! combine wet and dry dust
- atmosDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstwet1) &
- + x2i_im(n,index_x2i_Faxa_dstdry1)
- atmosDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstwet2) &
- + x2i_im(n,index_x2i_Faxa_dstdry2)
- atmosDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstwet3) &
- + x2i_im(n,index_x2i_Faxa_dstdry3)
- atmosDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstwet4) &
- + x2i_im(n,index_x2i_Faxa_dstdry4)
- endif
+ end if
+ ! set zaerosols, if configured
+ if (config_use_zaerosols) then
+ if (config_use_modal_aerosols) then
+ atmosBlackCarbonFlux(1,i) = x2i_im(n,index_x2i_Faxa_bcphodry) &
+ + x2i_im(n,index_x2i_Faxa_bcphidry)
+ atmosBlackCarbonFlux(2,i) = x2i_im(n,index_x2i_Faxa_bcphiwet)
+ ! combine wet and dry dust
+ atmosDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstwet1) &
+ + x2i_im(n,index_x2i_Faxa_dstdry1)
+ atmosDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstwet2) &
+ + x2i_im(n,index_x2i_Faxa_dstdry2)
+ atmosDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstwet3) &
+ + x2i_im(n,index_x2i_Faxa_dstdry3)
+ atmosDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstwet4) &
+ + x2i_im(n,index_x2i_Faxa_dstdry4)
+
+ ! wet dust
+ atmosWetDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstwet1)
+ atmosWetDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstwet2)
+ atmosWetDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstwet3)
+ atmosWetDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstwet4)
+
+ ! dry dust
+ atmosDryDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstdry1)
+ atmosDryDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstdry2)
+ atmosDryDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstdry3)
+ atmosDryDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstdry4)
+ else
+ atmosBlackCarbonFlux(1,i) = x2i_im(n,index_x2i_Faxa_bcphodry)
+ atmosBlackCarbonFlux(2,i) = x2i_im(n,index_x2i_Faxa_bcphidry) &
+ + x2i_im(n,index_x2i_Faxa_bcphiwet)
+ ! combine wet and dry dust
+ atmosDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstwet1) &
+ + x2i_im(n,index_x2i_Faxa_dstdry1)
+ atmosDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstwet2) &
+ + x2i_im(n,index_x2i_Faxa_dstdry2)
+ atmosDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstwet3) &
+ + x2i_im(n,index_x2i_Faxa_dstdry3)
+ atmosDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstwet4) &
+ + x2i_im(n,index_x2i_Faxa_dstdry4)
+
+ ! wet dust
+ atmosWetDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstwet1)
+ atmosWetDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstwet2)
+ atmosWetDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstwet3)
+ atmosWetDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstwet4)
+
+ ! dry dust
+ atmosDryDustFlux(1,i) = x2i_im(n,index_x2i_Faxa_dstdry1)
+ atmosDryDustFlux(2,i) = x2i_im(n,index_x2i_Faxa_dstdry2)
+ atmosDryDustFlux(3,i) = x2i_im(n,index_x2i_Faxa_dstdry3)
+ atmosDryDustFlux(4,i) = x2i_im(n,index_x2i_Faxa_dstdry4)
endif
endif
end do
-!-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
!
! unit conversions and any manipulation of coupled fields
!
@@ -3939,13 +4029,15 @@ subroutine ice_import_moab(Eclock)!{{{
call mpas_pool_get_field(biogeochemistry, 'oceanHumicsConc', oceanHumicsConcField)
call mpas_pool_get_field(biogeochemistry, 'oceanParticulateIronConc', oceanParticulateIronConcField)
call mpas_pool_get_field(biogeochemistry, 'oceanDissolvedIronConc', oceanDissolvedIronConcField)
+ endif
+ if (config_use_zaerosols .or. config_use_column_biogeochemistry) &
call mpas_pool_get_field(biogeochemistry, 'oceanZAerosolConc', oceanZAerosolConcField)
- if (config_use_zaerosols) then
- call mpas_pool_get_field(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFluxField)
- call mpas_pool_get_field(biogeochemistry, "atmosDustFlux", atmosDustFluxField)
- endif
+ if (config_use_zaerosols) then
+ call mpas_pool_get_field(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFluxField)
+ call mpas_pool_get_field(biogeochemistry, "atmosDustFlux", atmosDustFluxField)
+ call mpas_pool_get_field(biogeochemistry, "atmosWetDustFlux", atmosWetDustFluxField)
+ call mpas_pool_get_field(biogeochemistry, "atmosDryDustFlux", atmosDryDustFluxField)
endif
-
call mpas_dmpar_exch_halo_field(seaSurfaceTemperatureField)
call mpas_dmpar_exch_halo_field(seaSurfaceSalinityField)
call mpas_dmpar_exch_halo_field(seaFreezingTemperatureField)
@@ -3988,11 +4080,14 @@ subroutine ice_import_moab(Eclock)!{{{
call mpas_dmpar_exch_halo_field(oceanHumicsConcField)
call mpas_dmpar_exch_halo_field(oceanParticulateIronConcField)
call mpas_dmpar_exch_halo_field(oceanDissolvedIronConcField)
+ endif
+ if (config_use_zaerosols .or. config_use_column_biogeochemistry) &
call mpas_dmpar_exch_halo_field(oceanZAerosolConcField)
- if (config_use_zaerosols) then
+ if (config_use_zaerosols) then
call mpas_dmpar_exch_halo_field(atmosBlackCarbonFluxField)
call mpas_dmpar_exch_halo_field(atmosDustFluxField)
- endif
+ call mpas_dmpar_exch_halo_field(atmosWetDustFluxField)
+ call mpas_dmpar_exch_halo_field(atmosDryDustFluxField)
endif
! REVISION HISTORY:
diff --git a/components/mpas-seaice/src/Registry.xml b/components/mpas-seaice/src/Registry.xml
index 98caa61ef334..22c11fe28f27 100644
--- a/components/mpas-seaice/src/Registry.xml
+++ b/components/mpas-seaice/src/Registry.xml
@@ -790,7 +790,11 @@
/>
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5274,7 +5328,21 @@
/>
+
+
+
+
+
@@ -5302,7 +5394,7 @@
type="real"
dimensions="nZBGCTracers nCategories nCells Time"
units="mmol m-2 s-1"
- description="Tracers are ordered: diatom nitrogen, smallPlankton nitrogen, phaeocystis nitrogen, nitrate, polysaccarid carbon, lipid carbon, ammonium, silicate, DMSPp, DMSPd, DMS, Nonreactive nitrate, Protein nitrogen, dissolved iron in umol/m2/s, particulate iron in umol/m2/s, humic carbon, black carbon1 in mg/m2/s, black carbon2 in mg/m2/s, dust1 in mg/m2/s, dust2 in mg/m2/s, dust3 in mg/m2/s, dust4 in mg/m2/s"
+ description="Only bio tracers used in the order: diatom nitrogen, smallPlankton nitrogen, phaeocystis nitrogen, nitrate, polysaccarid carbon, lipid carbon, dissolved inorganic carbon,ammonium, silicate, DMSPp, DMSPd, DMS, Nonreactive nitrate, Protein nitrogen, dissolved iron in umol/m2/s, particulate iron in umol/m2/s, humic carbon, black carbon1 in kg/m2/s, black carbon2 in kg/m2/s, dust1 in kg/m2/s, dust2 in kg/m2/s, dust3 in kg/m2/s, dust4 in kg/m2/s"
icepack_name="flux_bion"
packages="pkgColumnBiogeochemistry;pkgColumnPackage"
/>
@@ -5310,130 +5402,305 @@
type="real"
dimensions="nZBGCTracers nCells Time"
units="mmol m-3"
- description="Tracers are ordered: diatom nitrogen, smallPlankton nitrogen, phaeocystis nitrogen, nitrate, polysaccarid carbon, lipid carbon, ammonium, silicate, DMSPp, DMSPd, DMS, Nonreactive nitrate, Protein nitrogen, dissolved iron in umol/m3, particulate iron in umol/m3, humic carbon, black carbon1 in mg/m3, black carbon2 in mg/m3,dust1 in mg/m3, dust2 in mg/m3, dust3 in mg/m3, dust4 in mg/m3"
+ description="All possible bio tracers in order: maxAlgaeType, nitrate, maxDOCType, maxDICType, chl (maxAlgaeType), ammonium, silicate, DMSPp, DMSPd, DMS, Nonreactive nitrate, maxDONType, dFe (maxFeType, umol/m3), pFe (maxFeType, umol/m3), maxBCType (kg/m3), maxDustType (kg/m3), humic carbon"
+ icepack_name="ocean_bio"
+ packages="pkgColumnBiogeochemistry;pkgColumnPackage"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\brief Compute MPAS-Seaice analysis member
+!> \author Nicole Jeffery
+!> \date 11 Mar 2024
+!> \details
+!> This routine conducts all computations to verify black carbon conservation
+!
+!-----------------------------------------------------------------------
+
+ subroutine black_carbon_conservation(domain, err)
+
+ type (domain_type), intent(inout) :: &
+ domain
+
+ integer, intent(out) :: &
+ err !< Output: error flag
+
+ type(block_type), pointer :: &
+ blockPtr
+
+ type(MPAS_pool_type), pointer :: &
+ conservationCheckBlackCarbonAMPool, &
+ conservationCheckAMPool, &
+ conservationCheckAreaAMPool
+
+ real(kind=RKIND), dimension(:), pointer :: &
+ initialBlackCarbon, &
+ finalBlackCarbon, &
+ blackCarbonChange, &
+ blackCarbonChangeFlux, &
+ netBlackCarbonFlux, &
+ absoluteBlackCarbonError, &
+ relativeBlackCarbonError, &
+ iceAreaCell, &
+ iceAreaCellInitial, &
+ accumAbsoluteBlackCarbonError, &
+ accumRelativeBlackCarbonError
+
+ real(kind=RKIND), dimension(:), pointer :: &
+ blackCarbonConsAtmBlackCarbonFlux, &
+ blackCarbonConsOceanBlackCarbonFlux, &
+ blackCarbonConsAtmBC1Flux, &
+ blackCarbonConsAtmBC2Flux
+
+ real(kind=RKIND), dimension(:), allocatable :: &
+ sumArray, &
+ sumArrayOut
+
+ type(MPAS_pool_type), pointer :: &
+ meshPool, &
+ tracersAggregatePool, &
+ biogeochemistryPool, &
+ icestatePool
+
+ real(kind=RKIND), dimension(:), pointer :: &
+ areaCell, &
+ totalAtmBlackCarbonFlux, &
+ totalOceanBlackCarbonFlux, &
+ oceanBlackCarbonFluxArea
+
+ real(kind=RKIND), dimension(:,:), pointer :: &
+ atmosBlackCarbonFlux
+
+ integer, dimension(:,:), pointer :: &
+ cellInHemisphere
+
+ real(kind=RKIND), pointer :: &
+ dt, &
+ earthArea
+
+ logical, pointer :: &
+ config_AM_conservationCheck_write_to_logfile
+
+ real(kind=RKIND) :: &
+ totalAtmBlackCarbonCell, &
+ totalAtmBC1Cell, &
+ totalAtmBC2Cell, &
+ totalOceanBlackCarbonCell
+
+ integer, pointer :: &
+ nCellsSolve, &
+ nHemispheres, &
+ nAccumulate
+
+ type (MPAS_Time_Type) :: &
+ currTime, &
+ startTime
+
+ integer :: &
+ iCell, &
+ iHemisphere, &
+ iSumPrev, &
+ ierr
+
+ integer :: &
+ nVars, &
+ nZBGC, &
+ nSums
+
+ real(kind=RKIND) :: &
+ fluxScale
+
+ character(len=strKIND) :: &
+ timeStr, &
+ timeStrStart
+
+ character(len=16) :: &
+ valStr
+
+ err = 0
+
+ call MPAS_pool_get_config(domain % configs, "config_dt", dt)
+ call MPAS_pool_get_config(domain % configs, "config_AM_conservationCheck_write_to_logfile", &
+ config_AM_conservationCheck_write_to_logfile)
+
+ !-------------------------------------------------------------
+ ! Net carbon flux to ice
+ !-------------------------------------------------------------
+
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nHemispheres", nHemispheres)
+
+ nVars = 4
+
+ nSums = nHemispheres * nVars
+
+ allocate(sumArray(nSums))
+ allocate(sumArrayOut(nSums))
+
+ sumArray = 0.0_RKIND
+
+ blockPtr => domain % blocklist
+ do while (associated(blockPtr))
+
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "nCellsSolve", nCellsSolve)
+
+ call MPAS_pool_get_subpool(blockPtr % structs, "mesh", meshPool)
+ call MPAS_pool_get_subpool(blockPtr % structs, "biogeochemistry", biogeochemistryPool)
+ call MPAS_pool_get_subpool(blockPtr % structs, "tracers_aggregate", tracersAggregatePool)
+ call MPAS_pool_get_subpool(blockPtr % structs, "icestate", icestatePool)
+ call MPAS_pool_get_subpool(blockPtr % structs, "conservationCheckAM", conservationCheckAMPool)
+
+
+ call MPAS_pool_get_array(tracersAggregatePool, "iceAreaCell", iceAreaCell)
+ call MPAS_pool_get_array(icestatePool, "iceAreaCellInitial", iceAreaCellInitial)
+ call MPAS_pool_get_array(meshPool, "areaCell", areaCell)
+ call MPAS_pool_get_array(biogeochemistryPool, "totalAtmBlackCarbonFlux", totalAtmBlackCarbonFlux)
+ call MPAS_pool_get_array(biogeochemistryPool, "totalOceanBlackCarbonFlux", totalOceanBlackCarbonFlux)
+ call MPAS_pool_get_array(biogeochemistryPool, "atmosBlackCarbonFlux", atmosBlackCarbonFlux)
+ call MPAS_pool_get_array(biogeochemistryPool, "oceanBlackCarbonFluxArea", oceanBlackCarbonFluxArea)
+ call MPAS_pool_get_array(conservationCheckAMPool, "cellInHemisphere", cellInHemisphere)
+
+ do iCell = 1, nCellsSolve
+
+ ! compute total black carbon flux to ocean from individual fluxes
+
+ nZBGC = 1
+ totalAtmBC1Cell = atmosBlackCarbonFlux(nZBGC,iCell) * areaCell(iCell)* &
+ iceAreaCellInitial(iCell)
+ nZBGC = nZBGC+1
+ totalAtmBC2Cell = atmosBlackCarbonFlux(nZBGC,iCell) * areaCell(iCell)* &
+ iceAreaCellInitial(iCell)
+ totalOceanBlackCarbonCell = oceanBlackCarbonFluxArea(iCell) * areaCell(iCell)
+ totalAtmBlackCarbonCell = totalAtmBC1Cell + totalAtmBC2Cell
+
+ do iHemisphere = 1, nHemispheres
+ iSumPrev = (iHemisphere-1) * nVars
+ if (cellInHemisphere(iHemisphere,iCell) == 1) then
+ sumArray(iSumPrev+1) = sumArray(iSumPrev+1) + totalAtmBlackCarbonCell
+ sumArray(iSumPrev+2) = sumArray(iSumPrev+2) + totalAtmBC1Cell
+ sumArray(iSumPrev+3) = sumArray(iSumPrev+3) + totalAtmBC2Cell
+ sumArray(iSumPrev+4) = sumArray(iSumPrev+4) + totalOceanBlackCarbonCell
+ endif
+ enddo ! iHemisphere
+
+ enddo ! iCell
+
+ blockPtr => blockPtr % next
+ enddo
+
+ ! perform the sums over processors
+ call MPAS_dmpar_sum_real_array(domain % dminfo, nSums, sumArray, sumArrayOut)
+
+ ! accumulate fluxes
+ call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckBlackCarbonAM", conservationCheckBlackCarbonAMPool)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsOceanBlackCarbonFlux", blackCarbonConsOceanBlackCarbonFlux)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsAtmBlackCarbonFlux", blackCarbonConsAtmBlackCarbonFlux)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsAtmBC1Flux", blackCarbonConsAtmBC1Flux)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsAtmBC2Flux", blackCarbonConsAtmBC2Flux)
+
+ do iHemisphere = 1, nHemispheres
+ iSumPrev = (iHemisphere-1) * nVars
+ blackCarbonConsAtmBlackCarbonFlux(iHemisphere) = blackCarbonConsAtmBlackCarbonFlux(iHemisphere) + sumArrayOut(iSumPrev+1)
+ blackCarbonConsAtmBC1Flux(iHemisphere) = blackCarbonConsAtmBC1Flux(iHemisphere) + sumArrayOut(iSumPrev+2)
+ blackCarbonConsAtmBC2Flux(iHemisphere) = blackCarbonConsAtmBC2Flux(iHemisphere) + sumArrayOut(iSumPrev+3)
+ blackCarbonConsOceanBlackCarbonFlux(iHemisphere) = blackCarbonConsOceanBlackCarbonFlux(iHemisphere) + sumArrayOut(iSumPrev+4)
+ enddo ! iHemisphere
+
+ ! cleanup
+ deallocate(sumArray)
+ deallocate(sumArrayOut)
+
+ !-------------------------------------------------------------
+ ! Black carbon conservation error
+ !-------------------------------------------------------------
+
+ if (MPAS_stream_mgr_ringing_alarms(domain % streamManager, "conservationCheckOutput", ierr=ierr)) then
+
+ ! convert fluxes to fluxes per m2 of whole earth and per second
+ call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckAM", conservationCheckAMPool)
+ call MPAS_pool_get_array(conservationCheckAMPool, "nAccumulate", nAccumulate)
+ call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckAreaAM", conservationCheckAreaAMPool)
+ call MPAS_pool_get_array(conservationCheckAreaAMPool, "earthArea", earthArea)
+ fluxScale = 1.0_RKIND / (earthArea * real(nAccumulate))
+
+ ! get initial black carbon content
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "initialBlackCarbon", initialBlackCarbon)
+
+ ! get final black carbon content
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "finalBlackCarbon", finalBlackCarbon)
+ call compute_total_black_carbon(domain, finalBlackCarbon)
+
+ ! compute the black carbon content change
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonChange", blackCarbonChange)
+ blackCarbonChange(:) = finalBlackCarbon(:) - initialBlackCarbon(:)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonChangeFlux", blackCarbonChangeFlux)
+ blackCarbonChangeFlux(:) = blackCarbonChange(:) * (fluxScale / dt)
+
+ ! calculate the final net black carbon flux to the ice
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "netBlackCarbonFlux", netBlackCarbonFlux)
+ netBlackCarbonFlux(:) = blackCarbonConsAtmBlackCarbonFlux(:) &
+ - blackCarbonConsOceanBlackCarbonFlux(:)
+
+ ! absolute error
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "absoluteBlackCarbonError", absoluteBlackCarbonError)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "accumAbsoluteBlackCarbonError", accumAbsoluteBlackCarbonError)
+ absoluteBlackCarbonError(:) = netBlackCarbonFlux(:) * dt - blackCarbonChange(:)
+
+ ! rescale fluxes
+ blackCarbonConsOceanBlackCarbonFlux(:) = blackCarbonConsOceanBlackCarbonFlux(:) * fluxScale
+ blackCarbonConsAtmBlackCarbonFlux(:) = blackCarbonConsAtmBlackCarbonFlux(:) * fluxScale
+ blackCarbonConsAtmBC1Flux(:) = blackCarbonConsAtmBC1Flux(:) * fluxScale
+ blackCarbonConsAtmBC2Flux(:) = blackCarbonConsAtmBC2Flux(:) * fluxScale
+ netBlackCarbonFlux(:) = netBlackCarbonFlux(:) * fluxScale
+
+ ! compute the final black carbon error
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "relativeBlackCarbonError", relativeBlackCarbonError)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "accumRelativeBlackCarbonError", accumRelativeBlackCarbonError)
+ do iHemisphere = 1, nHemispheres
+ if (abs(finalBlackCarbon(iHemisphere)) > 0.0) then
+ relativeBlackCarbonError(iHemisphere) = absoluteBlackCarbonError(iHemisphere) / finalBlackCarbon(iHemisphere)
+ else
+ relativeBlackCarbonError(iHemisphere) = 0.0_RKIND
+ endif
+ enddo ! iHemisphere
+
+ startTime = mpas_get_clock_time(domain % clock, MPAS_START_TIME, ierr=ierr)
+ currTime = mpas_get_clock_time(domain % clock, MPAS_NOW, ierr=ierr)
+
+ call MPAS_get_time(currTime, dateTimeString=timeStr, ierr=ierr)
+ call MPAS_get_time(startTime, dateTimeString=timeStrStart, ierr=ierr)
+
+ if (trim(timeStr) /= trim(timeStrStart)) then
+ accumRelativeBlackCarbonError(:) = accumRelativeBlackCarbonError(:) + relativeBlackCarbonError(:)
+ accumAbsoluteBlackCarbonError(:) = accumAbsoluteBlackCarbonError(:) + absoluteBlackCarbonError(:)
+ !-------------------------------------------------------------
+ ! Output to log file
+ !-------------------------------------------------------------
+
+ if (config_AM_conservationCheck_write_to_logfile) then
+
+ call mpas_log_write('-----------------------------------------------------------------------------')
+ call mpas_log_write(' Black carbon conservation check')
+ call mpas_log_write(' ')
+ call mpas_log_write(' Initial black carbon (kg) = '//trim(hemisphere_format(initialBlackCarbon)))
+ call mpas_log_write(' Final black carbon (kg) = '//trim(hemisphere_format(finalBlackCarbon)))
+ call mpas_log_write(' Black carbon change (kg) = '//trim(hemisphere_format(blackCarbonChange)))
+ call mpas_log_write(' Black carbon change flux (kg/m2s) = '//trim(hemisphere_format(blackCarbonChangeFlux)))
+ call mpas_log_write(' ')
+ call mpas_log_write(' Ocean black carbon flux (kg/m2s) = '//trim(hemisphere_format(blackCarbonConsOceanBlackCarbonFlux)))
+ call mpas_log_write(' Atmos black carbon flux (kg/m2s) = '//trim(hemisphere_format(blackCarbonConsAtmBlackCarbonFlux)))
+ call mpas_log_write(' Net black carbon flux (kg/m2s) = '//trim(hemisphere_format(netBlackCarbonFlux)))
+ call mpas_log_write(' ')
+ call mpas_log_write(' Individual atmosphere black carbon fluxes :')
+ call mpas_log_write(' Atmos BC1 flux (kg/m2s) = '//trim(hemisphere_format(blackCarbonConsAtmBC1Flux)))
+ call mpas_log_write(' Atmos BC2 flux (kg/m2s) = '//trim(hemisphere_format(blackCarbonConsAtmBC2Flux)))
+ call mpas_log_write(' ')
+
+ call mpas_log_write(' Net black carbon change (kg) = '//trim(hemisphere_format((netBlackCarbonFlux * dt) / fluxScale)))
+ call mpas_log_write(' Net black carbon flux (kg/m2s) = '//trim(hemisphere_format(netBlackCarbonFlux)))
+ call mpas_log_write(' ')
+ call mpas_log_write(' Absolute black carbon error (kg) = '//trim(hemisphere_format(absoluteBlackCarbonError)))
+ call mpas_log_write(' Absolute BC error/s (kg/m2s) = '//trim(hemisphere_format((absoluteBlackCarbonError * fluxScale) / dt)))
+ call mpas_log_write(' Relative black carbon error = '//trim(hemisphere_format(relativeBlackCarbonError)))
+
+ call mpas_log_write(' ')
+ call mpas_log_write(' Total run accumulated error ')
+ call mpas_log_write(' Accum. abs black carbon error(kg) = '//trim(hemisphere_format(accumAbsoluteBlackCarbonError)))
+ call mpas_log_write(' Accum. rel black carbon error = '//trim(hemisphere_format(accumRelativeBlackCarbonError)))
+ endif
+ endif
+ endif
+
+ end subroutine black_carbon_conservation
+
!***********************************************************************
!
! routine compute_total_energy
@@ -2800,6 +3135,100 @@ subroutine compute_total_carbon(domain, totalCarbon)
end subroutine compute_total_carbon
+!***********************************************************************
+!
+! routine compute_total_black_carbon
+!
+!> \brief Compute total black carbon
+!> \author Nicole Jeffery
+!> \date 11 Mar 2024
+!> \details
+!> Calculate the total black carbon
+!
+!-----------------------------------------------------------------------
+
+ subroutine compute_total_black_carbon(domain, totalBlackCarbon)
+
+ type (domain_type), intent(inout) :: &
+ domain
+
+ real(kind=RKIND), dimension(:), intent(out) :: &
+ totalBlackCarbon
+
+ type(block_type), pointer :: &
+ blockPtr
+
+ type(MPAS_pool_type), pointer :: &
+ meshPool, &
+ biogeochemistryPool, &
+ conservationCheckAMPool
+
+ integer, pointer :: &
+ nCellsSolve, &
+ nHemispheres
+
+ real(kind=RKIND), dimension(:), pointer :: &
+ totalBlackCarbonContentCell, &
+ areaCell
+
+ integer, dimension(:,:), pointer :: &
+ cellInHemisphere
+
+ integer :: &
+ iCell, &
+ iHemisphere
+
+ real(kind=RKIND) :: &
+ blackCarbonCell
+
+ real(kind=RKIND), dimension(:), allocatable :: &
+ blackCarbon
+
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nHemispheres", nHemispheres)
+
+ allocate(blackCarbon(nHemispheres))
+ blackCarbon(:) = 0.0_RKIND
+
+ blockPtr => domain % blocklist
+ do while (associated(blockPtr))
+
+ call MPAS_pool_get_subpool(blockPtr % structs, "mesh", meshPool)
+ call MPAS_pool_get_subpool(blockPtr % structs, "biogeochemistry", biogeochemistryPool)
+ call MPAS_pool_get_subpool(blockPtr % structs, "conservationCheckAM", conservationCheckAMPool)
+
+ call MPAS_pool_get_dimension(blockPtr % dimensions, 'nCellsSolve', nCellsSolve)
+ call MPAS_pool_get_dimension(blockPtr % dimensions, 'nHemispheres', nHemispheres)
+
+ call MPAS_pool_get_array(meshPool, "areaCell", areaCell)
+ call MPAS_pool_get_array(biogeochemistryPool, "totalBlackCarbonContentCell", totalBlackCarbonContentCell)
+ call MPAS_pool_get_array(conservationCheckAMPool, "cellInHemisphere", cellInHemisphere)
+
+ call compute_black_carbon_cell(blockPtr,totalBlackCarbonContentCell)
+
+ do iCell = 1, nCellsSolve
+
+ ! black carbon mass (kg)
+ blackCarbonCell = totalBlackCarbonContentCell(iCell) * areaCell(iCell)
+
+ do iHemisphere = 1, nHemispheres
+ if (cellInHemisphere(iHemisphere,iCell) == 1) then
+ blackCarbon(iHemisphere) = blackCarbon(iHemisphere) + blackCarbonCell
+ endif
+ enddo ! iHemisphere
+
+ enddo ! iCell
+
+ blockPtr => blockPtr % next
+ enddo
+
+ ! sum across processors
+ call MPAS_dmpar_sum_real_array(domain % dminfo, nHemispheres, blackCarbon, totalBlackCarbon)
+
+ ! clean up
+ deallocate(blackCarbon)
+
+ end subroutine compute_total_black_carbon
+
!***********************************************************************
!
! compute_carbon_cell
@@ -3059,6 +3488,127 @@ subroutine compute_carbon_cell(blockPtr,totalCarbonContentCell)
end subroutine compute_carbon_cell
+!***********************************************************************
+!
+! compute_black_carbon_cell
+!
+!> \brief
+!> \author Nicole Jeffery, LANL
+!> \date 11 Mar 2024
+!> \details Calculate the total carbon concentration in the sea ice cell
+!> by summing the appropriate biogeochemical tracers in units of kg C
+!>
+!> Total black carbon = black carbon 1 + black carbon 2
+!
+!-----------------------------------------------------------------------
+
+ subroutine compute_black_carbon_cell(blockPtr,totalBlackCarbonContentCell)
+
+ real(kind=RKIND), dimension(:), intent(out) :: &
+ totalBlackCarbonContentCell
+
+ type(block_type), intent(in) :: &
+ blockPtr
+
+ logical, pointer :: &
+ config_use_zaerosols
+
+ integer, pointer :: &
+ nBioLayersP1, &
+ nBioLayersP3, &
+ nBioLayers, &
+ nzAerosols, &
+ maxBCType, &
+ TWO
+
+ type(MPAS_pool_type), pointer :: &
+ mesh, &
+ biogeochemistry, &
+ tracers_aggregate
+
+ real(kind=RKIND), dimension(:), pointer :: &
+ brineFractionCell, &
+ iceVolumeCell, &
+ snowVolumeCell
+
+ real(kind=RKIND), dimension(:,:), pointer :: &
+ verticalAerosolsConcCell
+
+ integer, pointer :: &
+ nCellsSolve, &
+ nSnowLayers
+
+ real(kind=RKIND), dimension(:), allocatable :: &
+ verticalGridSpace
+
+ real(kind=RKIND) :: &
+ snowleveltop, &
+ snowlevelint
+
+ integer :: &
+ iBioTracers, &
+ iBioCount, &
+ iBioData, &
+ iCell, &
+ nBC
+
+ call MPAS_pool_get_config(blockPtr % configs, "config_use_zaerosols",config_use_zaerosols)
+
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "nBioLayers", nBioLayers)
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "nBioLayersP1", nBioLayersP1)
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "nBioLayersP3", nBioLayersP3)
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "nzAerosols", nzAerosols)
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "maxBCType", maxBCType)
+ call MPAS_pool_get_dimension(blockPtr % dimensions, "TWO", TWO)
+
+ call MPAS_pool_get_subpool(blockPtr % structs, "tracers_aggregate", tracers_aggregate)
+ call MPAS_pool_get_subpool(blockPtr % structs, "mesh", mesh)
+ call MPAS_pool_get_subpool(blockPtr % structs, "biogeochemistry", biogeochemistry)
+
+ call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
+ call MPAS_pool_get_dimension(mesh, 'nSnowLayers', nSnowLayers)
+
+ call MPAS_pool_get_array(tracers_aggregate, "verticalAerosolsConcCell", verticalAerosolsConcCell)
+ call MPAS_pool_get_array(tracers_aggregate, "brineFractionCell", brineFractionCell)
+ call MPAS_pool_get_array(tracers_aggregate, "iceVolumeCell", iceVolumeCell)
+ call MPAS_pool_get_array(tracers_aggregate, "snowVolumeCell", snowVolumeCell)
+
+ allocate(verticalGridSpace(nBioLayersP1))
+
+ verticalGridSpace(:) = 1.0_RKIND/real(nBioLayers,kind=RKIND)
+ verticalGridSpace(1) = verticalGridSpace(1)/2.0_RKIND
+ verticalGridSpace(nBioLayersP1) = verticalGridSpace(1)
+
+ totalBlackCarbonContentCell(:) = 0.0_RKIND
+
+ if (config_use_zaerosols) then
+ nBC = min(nzAerosols,maxBCType)
+ do iCell = 1, nCellsSolve
+ iBioCount = 0
+
+ ! BC
+ snowleveltop = snowVolumeCell(iCell)/real(nSnowLayers,kind=RKIND)/2.0_RKIND
+ snowlevelint = snowVolumeCell(iCell) - snowleveltop
+ do iBioTracers = 1, nBC
+ iBioData = (iBioTracers-1)*nBioLayersP3
+ ! ice BC
+ do iBioCount = 1, nBioLayersP1
+ totalBlackCarbonContentCell(iCell) = totalBlackCarbonContentCell(iCell) + &
+ verticalAerosolsConcCell(iBioData + iBioCount,iCell) * verticalGridSpace(iBioCount) * &
+ iceVolumeCell(iCell) * brineFractionCell(iCell)
+ end do
+ ! snow BC
+ totalBlackCarbonContentCell(iCell) = totalBlackCarbonContentCell(iCell) + &
+ verticalAerosolsConcCell(iBioData+nBioLayersP1+1,iCell) * snowleveltop + &
+ verticalAerosolsConcCell(iBioData+nBioLayersP1+2,iCell) * snowlevelint
+ enddo
+ enddo
+ endif
+
+ deallocate(verticalGridSpace)
+
+ end subroutine compute_black_carbon_cell
+
!***********************************************************************
!
! routine reset_accumulated_variables
@@ -3082,7 +3632,8 @@ subroutine reset_accumulated_variables(domain)
conservationCheckEnergyAMPool, &
conservationCheckMassAMPool, &
conservationCheckSaltAMPool, &
- conservationCheckCarbonAMPool
+ conservationCheckCarbonAMPool, &
+ conservationCheckBlackCarbonAMPool
integer, pointer :: &
nAccumulate
@@ -3125,6 +3676,12 @@ subroutine reset_accumulated_variables(domain)
carbonConsHumicsFlux, &
carbonConsSemiLabileDOCFlux
+ real(kind=RKIND), dimension(:), pointer :: &
+ blackCarbonConsOceanBlackCarbonFlux, &
+ blackCarbonConsAtmBlackCarbonFlux, &
+ blackCarbonConsAtmBC1Flux, &
+ blackCarbonConsAtmBC2Flux
+
! number of accumulations
call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckAM", conservationCheckAMPool)
call MPAS_pool_get_array(conservationCheckAMPool, "nAccumulate", nAccumulate)
@@ -3209,6 +3766,19 @@ subroutine reset_accumulated_variables(domain)
carbonConsHumicsFlux(:) = 0.0_RKIND
carbonConsSemiLabileDOCFlux(:) = 0.0_RKIND
+ ! black carbon
+
+ call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckBlackCarbonAM", conservationCheckBlackCarbonAMPool)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsOceanBlackCarbonFlux", blackCarbonConsOceanBlackCarbonFlux)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsAtmBlackCarbonFlux", blackCarbonConsAtmBlackCarbonFlux)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsAtmBC1Flux", blackCarbonConsAtmBC1Flux)
+ call MPAS_pool_get_array(conservationCheckBlackCarbonAMPool, "blackCarbonConsAtmBC2Flux", blackCarbonConsAtmBC2Flux)
+
+ blackCarbonConsOceanBlackCarbonFlux(:) = 0.0_RKIND
+ blackCarbonConsAtmBlackCarbonFlux(:) = 0.0_RKIND
+ blackCarbonConsAtmBC1Flux(:) = 0.0_RKIND
+ blackCarbonConsAtmBC2Flux(:) = 0.0_RKIND
+
end subroutine reset_accumulated_variables
!***********************************************************************
diff --git a/components/mpas-seaice/src/build_options.mk b/components/mpas-seaice/src/build_options.mk
index 5f2bdcfe2771..0ef6fc91e5d7 100644
--- a/components/mpas-seaice/src/build_options.mk
+++ b/components/mpas-seaice/src/build_options.mk
@@ -3,7 +3,7 @@ ifeq "$(ROOT_DIR)" ""
endif
EXE_NAME=seaice_model
NAMELIST_SUFFIX=seaice
-FCINCLUDES += -I$(ROOT_DIR)/column -I$(ROOT_DIR)/shared -I$(ROOT_DIR)/analysis_members -I$(ROOT_DIR)/model_forward
+FCINCLUDES += -I$(ROOT_DIR)/icepack/columnphysics -I$(ROOT_DIR)/column -I$(ROOT_DIR)/shared -I$(ROOT_DIR)/analysis_members -I$(ROOT_DIR)/model_forward
override CPPFLAGS += -DCORE_SEAICE -DUSE_SNICARHC
ifneq "$(ESM)" ""
override CPPFLAGS += -Dcoupled -DCCSMCOUPLED
diff --git a/components/mpas-seaice/src/column/ice_aerosol.F90 b/components/mpas-seaice/src/column/ice_aerosol.F90
index c3e6a9d0bf27..a4a270713a80 100644
--- a/components/mpas-seaice/src/column/ice_aerosol.F90
+++ b/components/mpas-seaice/src/column/ice_aerosol.F90
@@ -580,17 +580,21 @@ subroutine update_snow_bgc (dt, nblyr, &
if (dzssl_new .lt. hs_ssl_min) then ! Put atm BC/dust flux directly into the sea ice
do k=1,nbtrcr
- flux_bio(k) = flux_bio(k) + &
+ flux_bio_o(k) = flux_bio(k)
+ if (hilyr .lt. hs_ssl_min) then
+ flux_bio(k) = flux_bio(k) + &
(trcrn(bio_index(k)+ nblyr+1)*dzssl+ &
trcrn(bio_index(k)+ nblyr+2)*dzint)/dt
- trcrn(bio_index(k) + nblyr+1) = c0
- trcrn(bio_index(k) + nblyr+2) = c0
- if (hilyr .lt. hs_ssl_min) then
flux_bio(k) = flux_bio(k) + flux_bio_atm(k)
else
+ zbgc_snow(k) = zbgc_snow(k) + &
+ (trcrn(bio_index(k)+ nblyr+1)*dzssl+ &
+ trcrn(bio_index(k)+ nblyr+2)*dzint)
zbgc_atm(k) = zbgc_atm(k) &
+ flux_bio_atm(k)*dt
end if
+ trcrn(bio_index(k) + nblyr+1) = c0
+ trcrn(bio_index(k) + nblyr+2) = c0
enddo
else
@@ -616,7 +620,7 @@ subroutine update_snow_bgc (dt, nblyr, &
end if
if (dzint <= puny) then
do k = 1,nbtrcr
- flux_bio(k) = flux_bio(k) + (aerosno(k,2) + aerosno(k,1))/dt
+ zbgc_snow(k) = zbgc_snow(k) + (aerosno(k,2) + aerosno(k,1))
aerosno(k,2) = c0
aerosno(k,1) = c0
end do
@@ -636,6 +640,7 @@ subroutine update_snow_bgc (dt, nblyr, &
dzssl = dzssl - dz + fsnow/rhos*dt
dzint = dzint + dz
end if
+
if (dzssl <= puny) then
do k = 1,nbtrcr
aerosno(k,2) = aerosno(k,2) + aerosno(k,1)
@@ -644,7 +649,7 @@ subroutine update_snow_bgc (dt, nblyr, &
end if
if (dzint <= puny) then
do k = 1,nbtrcr
- flux_bio(k) = flux_bio(k) + (aerosno(k,2) + aerosno(k,1))/dt
+ zbgc_snow(k) = zbgc_snow(k) + (aerosno(k,2) + aerosno(k,1))
aerosno(k,2) = c0
aerosno(k,1) = c0
end do
@@ -664,7 +669,7 @@ subroutine update_snow_bgc (dt, nblyr, &
sloss2 = kscavz(bio_index_o(k))*aerosno(k,2) &
*max(-dhs_melts-dzssl,c0)/dzint
aerosno(k,2) = max(c0,aerosno(k,2) - sloss2)
- flux_bio(k) = flux_bio(k) + (sloss1+sloss2)/dt ! all not scavenged ends in ocean
+ zbgc_snow(k) = zbgc_snow(k) + (sloss1+sloss2) ! all not scavenged ends in ice
enddo
! update snow thickness
@@ -795,6 +800,7 @@ subroutine update_snow_bgc (dt, nblyr, &
else if (aerotot(k) > c0) then
aero_cons(k) = aero_cons(k)/aerotot(k)
end if
+
if (aero_cons(k) > puny .or. zbgc_snow(k) + zbgc_atm(k) < c0) then
write(warning,*) 'Conservation failure: aerosols in snow'
call add_warning(warning)
diff --git a/components/mpas-seaice/src/column/ice_algae.F90 b/components/mpas-seaice/src/column/ice_algae.F90
index d235d988fa53..e65dbed667ec 100644
--- a/components/mpas-seaice/src/column/ice_algae.F90
+++ b/components/mpas-seaice/src/column/ice_algae.F90
@@ -304,7 +304,7 @@ subroutine zbio (dt, nblyr, &
carbonError = carbonInitial-carbonFlux*dt-carbonFinal
- if (abs(carbonError) > accuracy * maxval ((/carbonInitial, carbonFinal/))) then
+ if (abs(carbonError) > max(puny,accuracy * maxval ((/carbonInitial, carbonFinal/)))) then
write(warning,*) 'carbonError:', carbonError
call add_warning(warning)
write(warning,*) 'carbonInitial:', carbonInitial
@@ -315,6 +315,8 @@ subroutine zbio (dt, nblyr, &
call add_warning(warning)
write(warning,*) 'accuracy * maxval ((/carbonInitial, carbonFinal/:)', accuracy * maxval ((/carbonInitial, carbonFinal/))
call add_warning(warning)
+ write(warning,*) 'puny', puny
+ call add_warning(warning)
if (aicen > c0) then
hsnow_f = vsnon/aicen
write(warning,*) 'after z_biogeochemistry'
@@ -347,8 +349,12 @@ subroutine zbio (dt, nblyr, &
call add_warning(warning)
write(warning,*) Tot_BGC_i(mm) + flux_bio_atm(mm)*dt - flux_bion(mm)*dt
call add_warning(warning)
- !l_stop = .true.
- !stop_label = "carbon conservation in ice_algae.F90"
+ write(warning,*) 'hbri, hbri_old'
+ call add_warning(warning)
+ write(warning,*) hbri, hbri_old
+ call add_warning(warning)
+ l_stop = .true.
+ stop_label = "carbon conservation in ice_algae.F90"
enddo
endif
endif
@@ -1012,7 +1018,7 @@ subroutine z_biogeochemistry (n_cat, dt, &
! local parameters
real (kind=dbl_kind), parameter :: &
- accuracy = 1.0e-14_dbl_kind, &
+ accuracy = 1.0e-13_dbl_kind, & ! 1.0e-14_dbl_kind, &
r_c = 3.0e3_dbl_kind , & ! ice crystal radius (um)
r_bac= 4.7_dbl_kind , & ! diatom large radius (um)
r_alg= 10.0_dbl_kind , & ! diatom small radius (um)
@@ -1021,7 +1027,7 @@ subroutine z_biogeochemistry (n_cat, dt, &
Nquota_I = 0.0408_dbl_kind, & ! Intercept in N quota to cell volume fit
f_s = p1, & ! fracton of sites available for saturation
f_a = 0.3_dbl_kind, & !c1 , & ! fraction of collector available for attachment
- f_v = 0.7854 ! fraction of algal coverage on area availabel for attachment
+ f_v = 0.7854_dbl_kind ! fraction of algal coverage on area availabel for attachment
! 4(pi r^2)/(4r)^2 [Johnson et al, 1995, water res. research]
integer, parameter :: &
@@ -1058,7 +1064,7 @@ subroutine z_biogeochemistry (n_cat, dt, &
iphin_N(k) = iphin(k)
bphin_N(1) = bphi_min
- if (abs(trcrn(bio_index(m) + k-1)) < puny) then
+ if (abs(trcrn(bio_index(m) + k-1)) < accuracy) then
flux_bio(m) = flux_bio(m) + trcrn(bio_index(m) + k-1)* hbri_old * dz(k)/dt
trcrn(bio_index(m) + k-1) = c0
in_init_cons(k,m) = c0
@@ -1319,8 +1325,7 @@ subroutine z_biogeochemistry (n_cat, dt, &
trcrn(nt_zbgc_frac+mm-1) = zbgc_frac_init(mm)
if (sum_tot > c0) trcrn(nt_zbgc_frac+mm-1) = sum_new/sum_tot
- if (abs(sum_initial-sum_tot-flux_bio(mm)*dt + source(mm)) > accuracy*max(sum_initial,sum_tot) .or. &
-! if (abs(sum_new-sum_old) > accuracy*sum_old .or. &
+ if (abs(sum_initial-sum_tot-flux_bio(mm)*dt + source(mm)) > max(accuracy,accuracy*max(sum_initial,sum_tot)) .or. &
minval(biocons(:)) < c0 .or. minval(initcons_stationary(:)) < c0 &
.or. l_stop) then
write(warning,*)'zbgc FCT tracer solution failed,mm', mm
@@ -1406,15 +1411,24 @@ subroutine z_biogeochemistry (n_cat, dt, &
do m = 1,nbtrcr
do k = 1,nblyr+1 ! back to bulk quantity
bio_tmp = (biomat_brine(k,m) + react(k,m))*iphin_N(k)
- if (tr_bgc_C .and. m .eq. nlt_bgc_DIC(1) .and. bio_tmp < -puny) then ! satisfy DIC demands from ocean
- write(warning, *) 'DIC demand from ocean'
- call add_warning(warning)
- write(warning, *) 'm, nlt_bgc_DIC(1), bio_tmp, react(k,m):'
- call add_warning(warning)
- write(warning, *) m, nlt_bgc_DIC(1), bio_tmp, react(k,m)
- call add_warning(warning)
- flux_bio(m) = flux_bio(m) + bio_tmp*dz(k)*hbri_old/dt
+ if (tr_bgc_C .and. m .eq. nlt_bgc_DIC(1) .and. bio_tmp .le. -accuracy) then ! satisfy DIC demands from ocean
+ !uncomment for additional diagnostics
+ ! write(warning, *) 'DIC demand from ocean'
+ ! call add_warning(warning)
+ ! write(warning, *) 'm, nlt_bgc_DIC(1), bio_tmp, react(k,m):'
+ ! call add_warning(warning)
+ ! write(warning, *) m, nlt_bgc_DIC(1), bio_tmp, react(k,m)
+ ! call add_warning(warning)
+ ! write(warning,*)'flux_bio(m) Initial, hbri_old, dz(k)'
+ ! call add_warning(warning)
+ ! write(warning,*) flux_bio(m), hbri_old, dz(k)
+ ! call add_warning(warning)
+ flux_bio(m) = flux_bio(m) + bio_tmp*dz(k)*hbri/dt
bio_tmp = c0
+ ! write(warning,*) 'flux_bio(m)'
+ ! call add_warning(warning)
+ ! write(warning,*) flux_bio(m)
+ ! call add_warning(warning)
end if
if (m .eq. nlt_bgc_Nit) then
initcons_mobile(k) = max(c0,(biomat_brine(k,m)-nitrification(k) + &
@@ -1441,8 +1455,8 @@ subroutine z_biogeochemistry (n_cat, dt, &
call add_warning(warning)
l_stop = .true.
stop_label = 'C in algal_dyn not conserved'
- elseif (abs(bio_tmp) < puny) then
- flux_bio(m) = flux_bio(m) + bio_tmp*dz(k)*hbri_old/dt
+ elseif (abs(bio_tmp) < accuracy) then
+ flux_bio(m) = flux_bio(m) + bio_tmp*dz(k)*hbri/dt
bio_tmp = c0
elseif (bio_tmp > 1.0e8_dbl_kind) then
write(warning, *) 'very large bgc value'
@@ -2258,6 +2272,10 @@ subroutine algal_dyn (dt, &
write(warning, *) 'Conservation error!'
call add_warning(warning)
if (tr_bgc_DON) then
+ write(warning, *) 'Error bound = max(puny,maxval(abs(reactb(:)))*1.0e-13_dbl_kind)'
+ call add_warning(warning)
+ write(warning, *) max(puny,maxval(abs(reactb(:)))*1.0e-13_dbl_kind)
+ call add_warning(warning)
write(warning, *) 'dN,DONin(1), kn_bac(1),secday,dt,n_doc'
call add_warning(warning)
write(warning, *) dN, DONin(1),kn_bac(1),secday,dt,n_doc
@@ -2271,10 +2289,16 @@ subroutine algal_dyn (dt, &
call add_warning(warning)
write(warning, *) dN,secday,dt,n_doc
call add_warning(warning)
- write(warning, *) 'reactb(nlt_bgc_Nit),reactb(nlt_bgc_N(1)),reactb(nlt_bgc_N(2)'
+ write(warning, *) 'reactb(nlt_bgc_Nit),fr_resp'
call add_warning(warning)
- write(warning, *) reactb(nlt_bgc_Nit),reactb(nlt_bgc_N(1)),reactb(nlt_bgc_N(2))
+ write(warning, *) reactb(nlt_bgc_Nit),fr_resp
call add_warning(warning)
+ do k = 1,n_algae
+ write(warning, *) 'reactb(nlt_bgc_N(k)),fr_graze(k), grow_N(k), mort(k)'
+ call add_warning(warning)
+ write(warning, *) reactb(nlt_bgc_N(k)),fr_graze(k), grow_N(k), mort(k)
+ call add_warning(warning)
+ enddo
if (tr_bgc_Am) then
write(warning, *) 'reactb(nlt_bgc_Am),Am_r, Am_s'
call add_warning(warning)
@@ -2297,6 +2321,7 @@ subroutine algal_dyn (dt, &
write(warning, *) 'DOC_r,DOC_s'
call add_warning(warning)
write(warning, *) DOC_r(k),DOC_s(k)
+ call add_warning(warning)
end do
do k = 1,n_dic
write(warning, *) 'DICin'
@@ -2311,7 +2336,6 @@ subroutine algal_dyn (dt, &
call add_warning(warning)
write(warning, *) DIC_r(k),DIC_s(k)
end do
- call add_warning(warning)
write(warning, *) 'Zoo'
call add_warning(warning)
write(warning, *) Zoo
@@ -2850,8 +2874,8 @@ subroutine check_conservation_FCT &
C_low(k) = C_new(k)
enddo
- accuracy = 1.0e-14_dbl_kind*max(c1, C_init_tot, C_new_tot)
- fluxbio = (C_init_tot - C_new_tot + source)/dt
+ accuracy = 1.0e-11_dbl_kind*max(c1, C_init_tot, C_new_tot)
+ fluxbio = fluxbio + (C_init_tot - C_new_tot + source)/dt
diff_dt =C_new_tot - C_init_tot - (S_top+S_bot+L_bot*C_new(nblyr+1)+L_top*C_new(1))*dt
if (minval(C_low) < c0) then
@@ -2861,7 +2885,7 @@ subroutine check_conservation_FCT &
endif
if (abs(diff_dt) > accuracy ) then
- !l_stop = .true.
+ l_stop = .true.
write(warning,*) 'Conservation of zbgc low order solution failed: diff_dt:',&
diff_dt
call add_warning(warning)
diff --git a/components/mpas-seaice/src/column/ice_colpkg.F90 b/components/mpas-seaice/src/column/ice_colpkg.F90
index a8bf6bc2a73f..ac0435b1f842 100644
--- a/components/mpas-seaice/src/column/ice_colpkg.F90
+++ b/components/mpas-seaice/src/column/ice_colpkg.F90
@@ -2538,7 +2538,7 @@ subroutine colpkg_step_therm2 (dt, ncat, n_aero, nbtrcr, &
real (kind=dbl_kind), dimension(:,:), intent(inout) :: &
trcrn ! tracers
-
+
logical (kind=log_kind), dimension(:), intent(inout) :: &
first_ice ! true until ice forms
@@ -4594,6 +4594,7 @@ subroutine colpkg_init_parameters(&
real (kind=dbl_kind), intent(in) :: &
grid_oS_in , & ! for bottom flux (zsalinity)
l_skS_in ! 0.02 characteristic skeletal layer thickness (m) (zsalinity)
+
real (kind=dbl_kind), intent(in) :: &
ratio_Si2N_diatoms_in, & ! algal Si to N (mol/mol)
ratio_Si2N_sp_in , &
@@ -5458,7 +5459,8 @@ subroutine colpkg_biogeochemistry(dt, &
upNO, upNH, iDi, iki, zfswin, &
zsal_tot, darcy_V, grow_net, &
PP_net, hbri,dhbr_bot, dhbr_top, Zoo,&
- fbio_snoice, fbio_atmice, ocean_bio, &
+ fbio_snoice, fbio_atmice, &
+ ocean_bio, &
first_ice, fswpenln, bphi, bTiz, ice_bio_net, &
snow_bio_net, totalChla, fswthrun, Rayleigh_criteria, &
sice_rho, fzsal, fzsal_g, &
@@ -5815,7 +5817,7 @@ subroutine colpkg_biogeochemistry(dt, &
n_don, &
n_fed, n_fep, &
n_zaero, first_ice(n), &
- hin_old(n), ocean_bio(:), &
+ hin_old(n), ocean_bio(1:nbtrcr), &
bphi(:,n), iphin, &
iDi(:,n), sss, &
fswpenln(:,n), &
diff --git a/components/mpas-seaice/src/column/ice_therm_itd.F90 b/components/mpas-seaice/src/column/ice_therm_itd.F90
index 81930d017e49..22b9d3cd894a 100644
--- a/components/mpas-seaice/src/column/ice_therm_itd.F90
+++ b/components/mpas-seaice/src/column/ice_therm_itd.F90
@@ -553,7 +553,7 @@ subroutine linear_itd (ncat, hin_max, &
enddo
enddo
endif
-
+
call shift_ice (ntrcr, ncat, &
trcr_depend, &
trcr_base, &
@@ -913,7 +913,9 @@ subroutine lateral_melt (dt, ncat, &
dvint ! snow interior layer
real (kind=dbl_kind), dimension (ncat) :: &
- vicen_init ! volume per unit area of ice (m)
+ vicen_init, & ! initial volume per unit area of ice (m)
+ aicen_init, & ! initial area
+ vsnon_init ! initial volume of snow (m)
if (rside > c0) then ! grid cells with lateral melting.
@@ -944,6 +946,8 @@ subroutine lateral_melt (dt, ncat, &
! state variables
vicen_init(n) = vicen(n)
+ aicen_init(n) = aicen(n)
+ vsnon_init(n) = vsnon(n)
aicen(n) = aicen(n) * (c1 - rside)
vicen(n) = vicen(n) * (c1 - rside)
vsnon(n) = vsnon(n) * (c1 - rside)
@@ -980,8 +984,8 @@ subroutine lateral_melt (dt, ncat, &
!-----------------------------------------------------------------
if (z_tracers) then ! snow tracers
- dvssl = min(p5*vsnon(n)/real(nslyr,kind=dbl_kind), hs_ssl*aicen(n)) !snow surface layer
- dvint = vsnon(n)- dvssl !snow interior
+ dvssl = min(p5*vsnon_init(n)/real(nslyr,kind=dbl_kind), hs_ssl*aicen_init(n)) !snow surface layer
+ dvint = vsnon_init(n)- dvssl !snow interior
do k = 1, nbtrcr
flux_bio(k) = flux_bio(k) &
+ (trcrn(bio_index(k)+nblyr+1,n)*dvssl &
diff --git a/components/mpas-seaice/src/column/ice_warnings.F90 b/components/mpas-seaice/src/column/ice_warnings.F90
index a3424c176bb7..091c8b2be944 100644
--- a/components/mpas-seaice/src/column/ice_warnings.F90
+++ b/components/mpas-seaice/src/column/ice_warnings.F90
@@ -82,7 +82,7 @@ subroutine add_warning(warning)
deallocate(warningsTmp)
endif
-
+
endif
! increase warning number
diff --git a/components/mpas-seaice/src/column/ice_zbgc.F90 b/components/mpas-seaice/src/column/ice_zbgc.F90
index 1f1c6a7d9106..b537fa0140aa 100644
--- a/components/mpas-seaice/src/column/ice_zbgc.F90
+++ b/components/mpas-seaice/src/column/ice_zbgc.F90
@@ -11,6 +11,7 @@ module ice_zbgc
use ice_kinds_mod
use ice_zbgc_shared ! everything
+ use ice_warnings, only: add_warning
implicit none
@@ -109,7 +110,8 @@ subroutine add_new_ice_bgc (dt, nblyr, &
location , & ! 1 (add frazil to bottom), 0 (add frazil throughout)
n , & ! ice category index
k , & ! ice layer index
- m
+ m , &
+ nbiolayer
real (kind=dbl_kind) :: &
vbri1 , & ! starting volume of existing brine
@@ -119,12 +121,14 @@ subroutine add_new_ice_bgc (dt, nblyr, &
real (kind=dbl_kind) :: &
vsurp , & ! volume of new ice added to each cat
vtmp ! total volume of new and old ice
-
+
real (kind=dbl_kind), dimension (ncat) :: &
- vbrin ! trcrn(nt_fbri,n)*vicen(n)
+ vbrin , & ! trcrn(nt_fbri,n)*vicen(n)
+ brine_frac_init ! initial trcrn(nt_fbri,n)
real (kind=dbl_kind) :: &
- vice_new ! vicen_init + vsurp
+ vice_new , & ! vicen_init + vsurp
+ bio0new ! ocean_bio * zbgc_init_fac
real (kind=dbl_kind) :: &
Tmlts ! melting temperature (oC)
@@ -132,9 +136,8 @@ subroutine add_new_ice_bgc (dt, nblyr, &
character (len=char_len) :: &
fieldid ! field identifier
- real (kind=dbl_kind), dimension (nbtrcr) :: &
- total_bio_initial, & ! Initial column bio concentration (mmol/m2)
- total_bio_final ! final column bio concentration (mmol/m2)
+ character(len=char_len_long) :: &
+ warning
real (kind=dbl_kind), dimension (nblyr+1) :: &
zspace ! vertical grid spacing
@@ -152,19 +155,13 @@ subroutine add_new_ice_bgc (dt, nblyr, &
if (tr_brine) vbrin(n) = trcrn(nt_fbri,n)*vicen_init(n)
enddo
- do m = 1, nbtrcr
- total_bio_initial(m) = c0
- do n = 1, ncat
- do k = 1, nblyr+1
- total_bio_initial(m) = total_bio_initial(m) + vbrin(n) * zspace(k)*trcrn(bio_index(m)+k-1,n)
- enddo
- enddo
- enddo
-
call column_sum (ncat, vbrin, vbri_init)
vbri_init = vbri_init + vi0_init
+ do k = 1, nbtrcr
+ flux_bio(k) = flux_bio(k) - vi0_init/dt*ocean_bio(k)*zbgc_init_frac(k)
+ enddo
!-----------------------------------------------------------------
! Distribute bgc in new ice volume among all ice categories by
! increasing ice thickness, leaving ice area unchanged.
@@ -178,34 +175,27 @@ subroutine add_new_ice_bgc (dt, nblyr, &
vtmp = c0
do n = 1,ncat
-
- if (hsurp > c0) then
+ brine_frac_init(n) = c1
+ if (hsurp > c0) then ! add ice to all categories
vtmp = vbrin(n)
- vsurp = hsurp * aicen_init(n)
+ vsurp = hsurp * aicen_init(n)
vbrin(n) = vbrin(n) + vsurp
vice_new = vicen_init(n) + vsurp
- if (tr_brine .and. vicen(n) > c0) then
- trcrn(nt_fbri,n) = vbrin(n)/vicen(n)
+ if (tr_brine .and. vice_new > c0) then ! NJvicen(n) > c0) then
+ brine_frac_init(n) = trcrn(nt_fbri,n) !NJ
+ trcrn(nt_fbri,n) = vbrin(n)/vice_new !NJ vicen(n)
elseif (tr_brine .and. vicen(n) <= c0) then
trcrn(nt_fbri,n) = c1
endif
- if (nbtrcr > 0) then
- location = 1
- call adjust_tracer_profile(nbtrcr, dt, ntrcr, &
- aicen_init(n), &
- vbrin(n), &
- vice_new, &
- trcrn(:,n), &
- vtmp, &
- vsurp, sss, &
- nilyr, nblyr, &
- solve_zsal, bgrid, &
- cgrid, &
- ocean_bio, igrid, &
- location, &
- l_stop, stop_label)
+ if (nbtrcr > 0) then
+ do m = 1, nbtrcr
+ bio0new = ocean_bio(m)*zbgc_init_frac(m)
+ nbiolayer = nblyr+1
+ call update_vertical_bio_tracers(nbiolayer, trcrn(bio_index(m):bio_index(m) + nblyr,n), &
+ vtmp, vbrin(n), bio0new,zspace(:))
+ enddo !nbtrcr
if (l_stop) return
endif ! nbtrcr
endif ! hsurp > 0
@@ -214,36 +204,30 @@ subroutine add_new_ice_bgc (dt, nblyr, &
!-----------------------------------------------------------------
! Combine bgc in new ice grown in open water with category 1 ice.
!-----------------------------------------------------------------
-
+
if (vi0new > c0) then
- vbri1 = vbrin(1)
+ vbri1 = vbrin(1)
vbrin(1) = vbrin(1) + vi0new
if (tr_brine .and. vicen(1) > c0) then
trcrn(nt_fbri,1) = vbrin(1)/vicen(1)
elseif (tr_brine .and. vicen(1) <= c0) then
trcrn(nt_fbri,1) = c1
endif
-
+
! Diffuse_bio handles concentration changes from ice growth/melt
! ice area changes
! add salt throughout, location = 0
- if (nbtrcr > 0) then
- location = 0
- call adjust_tracer_profile(nbtrcr, dt, ntrcr, &
- aicen(1), &
- vbrin(1), &
- vicen(1), &
- trcrn(:,1), &
- vbri1, &
- vi0new, sss, &
- nilyr, nblyr, &
- solve_zsal, bgrid, &
- cgrid, &
- ocean_bio, igrid, &
- location, &
- l_stop, stop_label)
+ if (nbtrcr > 0 .and. vbrin(1) > c0) then
+ do m = 1, nbtrcr
+ bio0new = ocean_bio(m)*zbgc_init_frac(m)
+ do k = 1, nblyr+1
+ trcrn(bio_index(m) + k-1,1) = &
+ (trcrn(bio_index(m) + k-1,1)*vbri1 + bio0new * vi0new)/vbrin(1)
+ enddo
+ enddo
+
if (l_stop) return
if (solve_zsal .and. vsnon1 .le. c0) then
@@ -253,16 +237,6 @@ subroutine add_new_ice_bgc (dt, nblyr, &
endif ! nbtrcr > 0
endif ! vi0new > 0
- do m = 1, nbtrcr
- total_bio_final(m) = c0
- do n = 1, ncat
- do k = 1, nblyr+1
- total_bio_final(m) = total_bio_final(m) + trcrn(nt_fbri,n) * vicen(n) *zspace(k)*trcrn(bio_index(m)+k-1,n)
- enddo
- enddo
- flux_bio(m) = flux_bio(m) + (total_bio_initial(m) - total_bio_final(m))/dt
- enddo
-
if (tr_brine .and. l_conservation_check) then
call column_sum (ncat, vbrin, vbri_final)
@@ -320,10 +294,6 @@ subroutine lateral_melt_bgc (dt, &
! local variables
- real (kind=dbl_kind) :: &
- total_bio_initial, & ! initial column tracer concentration (mmol/m2)
- total_bio_final ! final column tracer concentration (mmol/m20
-
integer (kind=int_kind) :: &
k , & ! layer index
m , & !
@@ -332,9 +302,12 @@ subroutine lateral_melt_bgc (dt, &
real (kind=dbl_kind), dimension (nblyr+1) :: &
zspace ! vertical grid spacing
+ character(len=char_len_long) :: &
+ warning
+
zspace(:) = c1/real(nblyr,kind=dbl_kind)
- zspace(1) = p5*zspace(1)
- zspace(nblyr+1) = p5*zspace(nblyr+1)
+ zspace(1) = p5*zspace(2)
+ zspace(nblyr+1) = p5*zspace(nblyr)
if (solve_zsal) then
do n = 1, ncat
@@ -347,15 +320,13 @@ subroutine lateral_melt_bgc (dt, &
endif
do m = 1, nbtrcr
- total_bio_initial = c0
- total_bio_final = c0
do n = 1, ncat
do k = 1, nblyr+1
- total_bio_initial = total_bio_initial + trcrn(nt_fbri,n) * vicen_init(n) *zspace(k)*trcrn(bio_index(m)+k-1,n)
- total_bio_final = total_bio_final + trcrn(nt_fbri,n) * vicen(n) *zspace(k)*trcrn(bio_index(m)+k-1,n)
- enddo
+ flux_bio(m) = flux_bio(m) + trcrn(nt_fbri,n) &
+ * vicen_init(n)*zspace(k)*trcrn(bio_index(m)+k-1,n) &
+ * rside/dt
enddo
- flux_bio(m) = flux_bio(m) + (total_bio_initial - total_bio_final)/dt
+ enddo
enddo
end subroutine lateral_melt_bgc
@@ -462,7 +433,7 @@ subroutine adjust_tracer_profile (nbtrcr, dt, ntrcr, &
hbri_old = vtmp
if (solve_zsal) then
top_conc = sss * salt_loss
- do k = 1, nblyr
+ do k = 1, nblyr
S_stationary(k) = trcrn(nt_bgc_S+k-1)* hbri_old
enddo
call regrid_stationary (S_stationary, hbri_old, &
@@ -472,7 +443,7 @@ subroutine adjust_tracer_profile (nbtrcr, dt, ntrcr, &
bgrid(2:nblyr+1), fluxb,&
l_stop, stop_label)
if (l_stop) return
- do k = 1, nblyr
+ do k = 1, nblyr
trcrn(nt_bgc_S+k-1) = S_stationary(k)/hbri
trtmp0(nt_sice+k-1) = trcrn(nt_bgc_S+k-1)
enddo
@@ -480,7 +451,7 @@ subroutine adjust_tracer_profile (nbtrcr, dt, ntrcr, &
do m = 1, nbtrcr
top_conc = ocean_bio(m)*zbgc_init_frac(m)
- do k = 1, nblyr+1
+ do k = 1, nblyr+1
C_stationary(k) = trcrn(bio_index(m) + k-1)* hbri_old
enddo !k
call regrid_stationary (C_stationary, hbri_old, &
@@ -679,9 +650,9 @@ subroutine merge_bgc_fluxes (dt, nblyr, &
snow_bio_net(mm) = snow_bio_net(mm) &
+ trcrn(bio_index(mm)+nblyr+1)*dvssl &
+ trcrn(bio_index(mm)+nblyr+2)*dvint
- flux_bio (mm) = flux_bio (mm) + flux_bion (mm)*aice_init
- zbgc_snow (mm) = zbgc_snow(mm) + zbgc_snown(mm)*aice_init/dt
- zbgc_atm (mm) = zbgc_atm (mm) + zbgc_atmn (mm)*aice_init/dt
+ flux_bio (mm) = flux_bio (mm) + flux_bion (mm)*aicen
+ zbgc_snow (mm) = zbgc_snow(mm) + zbgc_snown(mm)*aicen/dt
+ zbgc_atm (mm) = zbgc_atm (mm) + zbgc_atmn (mm)*aicen/dt
enddo ! mm
! diagnostics : mean cell bio interface grid profiles
@@ -789,6 +760,95 @@ subroutine merge_bgc_fluxes_skl (ntrcr, &
enddo
end subroutine merge_bgc_fluxes_skl
+!=======================================================================
+!
+! Given some added new ice to the base of the existing ice, recalculate
+! vertical bio tracer so that new grid cells are all the same size.
+!
+! author: N. Jeffery, LANL
+!
+ subroutine update_vertical_bio_tracers(nbiolyr, trc, h1, h2, trc0, zspace)
+
+ use ice_constants_colpkg, only: c0, puny
+
+ integer (kind=int_kind), intent(in) :: &
+ nbiolyr ! number of bio layers nblyr+1
+
+ real (kind=dbl_kind), dimension(:), intent(inout) :: &
+ trc ! vertical tracer
+
+ real (kind=dbl_kind), intent(in) :: &
+ h1, & ! old thickness
+ h2, & ! new thickness
+ trc0 ! tracer value of added ice on ice bottom
+
+ real (kind=dbl_kind), dimension(nbiolyr), intent(in) :: &
+ zspace
+
+ ! local variables
+
+ real(kind=dbl_kind), dimension(nbiolyr) :: trc2 ! updated tracer temporary
+
+ ! vertical indices for old and new grid
+ integer :: k1, k2
+
+ real (kind=dbl_kind) :: &
+ z1a, z1b, & ! upper, lower boundary of old cell/added new ice at bottom
+ z2a, z2b, & ! upper, lower boundary of new cell
+ overlap , & ! overlap between old and new cell
+ rnilyr
+
+ !rnilyr = real(nilyr,dbl_kind)
+ z2a = c0
+ z2b = c0
+
+ if (h2 > puny) then
+ ! loop over new grid cells
+ do k2 = 1, nbiolyr
+
+ ! initialize new tracer
+ trc2(k2) = c0
+
+ ! calculate upper and lower boundary of new cell
+ z2a = z2b !((k2 - 1) * h2) * zspace(k2)+z2b ! / rnilyr
+ z2b = z2b + h2 * zspace(k2) !(k2 * h2) * zspace(k2)+z2a !/ rnilyr
+
+ z1a = c0
+ z1b = c0
+ ! loop over old grid cells
+ do k1 = 1, nbiolyr
+
+ ! calculate upper and lower boundary of old cell
+ z1a = z1b !((k1 - 1) * h1) * zspace(k1)+z1b !/ rnilyr
+ z1b = z1b + h1 * zspace(k1) !(k1 * h1) * zspace(k1)+z1a !/ rnilyr
+
+ ! calculate overlap between old and new cell
+ overlap = max(min(z1b, z2b) - max(z1a, z2a), c0)
+
+ ! aggregate old grid cell contribution to new cell
+ trc2(k2) = trc2(k2) + overlap * trc(k1)
+
+ enddo ! k1
+
+ ! calculate upper and lower boundary of added new ice at bottom
+ z1a = h1
+ z1b = h2
+
+ ! calculate overlap between added ice and new cell
+ overlap = max(min(z1b, z2b) - max(z1a, z2a), c0)
+ ! aggregate added ice contribution to new cell
+ trc2(k2) = trc2(k2) + overlap * trc0
+ ! renormalize new grid cell
+ trc2(k2) = trc2(k2)/zspace(k2)/h2 !(rnilyr * trc2(k2)) / h2
+
+ enddo ! k2
+ else
+ trc2 = trc
+ endif ! h2 > 0
+ ! update vertical tracer array with the adjusted tracer
+ trc = trc2
+
+ end subroutine update_vertical_bio_tracers
!=======================================================================
diff --git a/components/mpas-seaice/src/icepack b/components/mpas-seaice/src/icepack
index 8fad768ce400..31ce42217717 160000
--- a/components/mpas-seaice/src/icepack
+++ b/components/mpas-seaice/src/icepack
@@ -1 +1 @@
-Subproject commit 8fad768ce400536904f376376e91c698a82882ba
+Subproject commit 31ce42217717dbbde87b73129d7a4ff3d052455d
diff --git a/components/mpas-seaice/src/model_forward/mpas_seaice_core_interface.F b/components/mpas-seaice/src/model_forward/mpas_seaice_core_interface.F
index 7dcdd4c94f66..4b128d0c534d 100644
--- a/components/mpas-seaice/src/model_forward/mpas_seaice_core_interface.F
+++ b/components/mpas-seaice/src/model_forward/mpas_seaice_core_interface.F
@@ -315,12 +315,14 @@ subroutine setup_packages_column_physics(configPool, packagePool, ierr)!{{{
call MPAS_pool_get_config(configPool, "config_use_column_physics", config_use_column_physics)
call MPAS_pool_get_config(configPool, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(configPool, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_package(packagePool, "pkgColumnPackageActive", pkgColumnPackageActive)
call MPAS_pool_get_package(packagePool, "pkgColumnBiogeochemistryActive", pkgColumnBiogeochemistryActive)
pkgColumnPackageActive = config_use_column_physics
- pkgColumnBiogeochemistryActive = (config_use_column_biogeochemistry .and. config_use_column_physics)
+ pkgColumnBiogeochemistryActive = ((config_use_column_biogeochemistry .or. config_use_zaerosols) &
+ .and. config_use_column_physics)
!pkgColumnPackageActive = .true.
!pkgColumnBiogeochemistryActive = .true.
@@ -384,7 +386,6 @@ subroutine setup_packages_column_physics(configPool, packagePool, ierr)!{{{
call MPAS_pool_get_config(configPool, "config_use_humics", config_use_humics)
call MPAS_pool_get_config(configPool, "config_use_DON", config_use_DON)
call MPAS_pool_get_config(configPool, "config_use_iron", config_use_iron)
- call MPAS_pool_get_config(configPool, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(configPool, "config_use_effective_snow_density", config_use_effective_snow_density)
call MPAS_pool_get_config(configPool, "config_use_snow_grain_radius", config_use_snow_grain_radius)
@@ -494,8 +495,6 @@ subroutine setup_packages_column_physics(configPool, packagePool, ierr)!{{{
endif
if (.not. config_use_column_biogeochemistry .and. config_use_column_physics) then
- pkgTracerBrineActive = .false.
- pkgTracerMobileFractionActive = .false.
pkgTracerSkeletalAlgaeActive = .false.
pkgTracerSkeletalNitrateActive = .false.
pkgTracerSkeletalCarbonActive = .false.
@@ -516,7 +515,6 @@ subroutine setup_packages_column_physics(configPool, packagePool, ierr)!{{{
pkgTracerVerticalHumicsActive = .false.
pkgTracerVerticalDONActive = .false.
pkgTracerVerticalIronActive = .false.
- pkgTracerZAerosolsActive = .false.
pkgTracerZSalinityActive = .false.
endif
@@ -601,6 +599,9 @@ subroutine setup_packages_other(configPool, packagePool, ierr)!{{{
logical, pointer :: &
config_use_forcing, &
config_use_data_icebergs, &
+ config_use_zaerosols, &
+ config_use_iron_solubility_file, &
+ config_use_atm_dust_file, &
config_testing_system_test, &
config_use_snicar_ad, &
config_use_prescribed_ice, &
@@ -615,17 +616,28 @@ subroutine setup_packages_other(configPool, packagePool, ierr)!{{{
pkgPrescribedActive, &
pkgSpecialBoundariesActive
+ logical :: &
+ config_use_dust_file
+
ierr = 0
! pkgForcing
call MPAS_pool_get_config(configPool, "config_use_forcing", config_use_forcing)
call MPAS_pool_get_config(configPool, "config_use_data_icebergs", config_use_data_icebergs)
+ call MPAS_pool_get_config(configPool, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(configPool, "config_use_atm_dust_file", config_use_atm_dust_file)
+ call MPAS_pool_get_config(configPool, "config_use_iron_solubility_file", config_use_iron_solubility_file)
call MPAS_pool_get_package(packagePool, "pkgForcingActive", pkgForcingActive)
+ config_use_dust_file = .false.
+ if (config_use_zaerosols .and. (config_use_iron_solubility_file .or. &
+ config_use_atm_dust_file) ) config_use_dust_file = .true.
+
! see if we are using the forcing system
- if (config_use_forcing .or. config_use_data_icebergs) then
+ if (config_use_forcing .or. config_use_data_icebergs .or. &
+ config_use_dust_file) then
pkgForcingActive = .true.
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_column.F b/components/mpas-seaice/src/shared/mpas_seaice_column.F
index 7e102135f811..80a00a154d99 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_column.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_column.F
@@ -263,10 +263,12 @@ subroutine seaice_init_column_physics_package_variables(domain, clock)
config_do_restart, &
config_use_column_biogeochemistry, &
config_use_column_shortwave, &
- config_use_column_snow_tracers
+ config_use_column_snow_tracers, &
+ config_use_zaerosols
call MPAS_pool_get_config(domain % configs, "config_use_column_physics", config_use_column_physics)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
if (config_use_column_physics) then
@@ -280,7 +282,7 @@ subroutine seaice_init_column_physics_package_variables(domain, clock)
call init_column_thermodynamic_profiles(domain)
! initialize biogoechemistry profiles
- if (config_use_column_biogeochemistry) &
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) &
call init_column_biogeochemistry_profiles(domain, ciceTracerObject)
! history variables
@@ -1054,7 +1056,8 @@ subroutine seaice_column_predynamics_time_integration(domain, clock)
config_use_column_biogeochemistry, &
config_use_column_itd_thermodynamics, &
config_calc_surface_temperature, &
- config_use_vertical_tracers
+ config_use_vertical_tracers, &
+ config_use_zaerosols
real(kind=RKIND), pointer :: &
config_dt
@@ -1067,6 +1070,7 @@ subroutine seaice_column_predynamics_time_integration(domain, clock)
call MPAS_pool_get_config(domain % configs, "config_use_column_vertical_thermodynamics", &
config_use_column_vertical_thermodynamics)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(domain % configs, "config_use_column_itd_thermodynamics", config_use_column_itd_thermodynamics)
call MPAS_pool_get_config(domain % configs, "config_calc_surface_temperature", config_calc_surface_temperature)
call MPAS_pool_get_config(domain % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
@@ -1096,7 +1100,7 @@ subroutine seaice_column_predynamics_time_integration(domain, clock)
!-----------------------------------------------------------------
call mpas_timer_start("Column biogeochemistry")
- if (config_use_column_biogeochemistry) &
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) &
call column_biogeochemistry(domain)
call mpas_timer_stop("Column biogeochemistry")
@@ -2106,6 +2110,9 @@ subroutine column_itd_thermodynamics(domain, clock)
colpkg_step_therm2, &
colpkg_clear_warnings
+ use seaice_constants, only: &
+ seaicePuny
+
type(domain_type), intent(inout) :: domain
type(MPAS_clock_type), intent(in) :: clock
@@ -2133,7 +2140,8 @@ subroutine column_itd_thermodynamics(domain, clock)
logical, pointer :: &
config_update_ocean_fluxes, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
! dimensions
integer, pointer :: &
@@ -2197,13 +2205,13 @@ subroutine column_itd_thermodynamics(domain, clock)
iBioLayers
! test carbon conservation
- real(kind=RKIND), dimension(:), allocatable :: &
+ real(kind=RKIND), dimension(:,:), allocatable :: &
totalCarbonCatFinal, &
totalCarbonCatInitial, &
- oceanBioFluxesTemp, &
- verticalGridSpace
+ oceanBioFluxesTemp
- real(kind=RKIND) :: &
+ real(kind=RKIND), dimension(:), allocatable :: &
+ verticalGridSpace, &
oceanCarbonFlux, &
totalCarbonFinal, &
totalCarbonInitial, &
@@ -2254,6 +2262,7 @@ subroutine column_itd_thermodynamics(domain, clock)
call MPAS_pool_get_config(block % configs, "config_dt", config_dt)
call MPAS_pool_get_config(block % configs, "config_update_ocean_fluxes", config_update_ocean_fluxes)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
@@ -2311,11 +2320,22 @@ subroutine column_itd_thermodynamics(domain, clock)
! newly formed ice
allocate(newlyFormedIceLogical(nCategories))
allocate(oceanBioConcentrationsUsed(ciceTracerObject % nBioTracers))
- allocate(oceanBioFluxesTemp(ciceTracerObject % nBioTracers))
+ allocate(oceanBioFluxesTemp(ciceTracerObject % nBioTracers,nCellsSolve))
allocate(verticalGridSpace(nBioLayersP1))
if (checkCarbon) then
- allocate(totalCarbonCatFinal(nCategories))
- allocate(totalCarbonCatInitial(nCategories))
+ allocate(totalCarbonCatFinal(nCategories,nCellsSolve))
+ allocate(totalCarbonCatInitial(nCategories,nCellsSolve))
+ allocate(totalCarbonInitial(nCellsSolve))
+ allocate(totalCarbonFinal(nCellsSolve))
+ allocate(oceanCarbonFlux(nCellsSolve))
+ allocate(carbonError(nCellsSolve))
+ else
+ allocate(totalCarbonCatFinal(1,1))
+ allocate(totalCarbonCatInitial(1,1))
+ allocate(totalCarbonInitial(1))
+ allocate(totalCarbonFinal(1))
+ allocate(oceanCarbonFlux(1))
+ allocate(carbonError(1))
endif
verticalGridSpace(:) = 1.0_RKIND/real(nBioLayers,kind=RKIND)
@@ -2323,7 +2343,7 @@ subroutine column_itd_thermodynamics(domain, clock)
verticalGridSpace(nBioLayersP1) = verticalGridSpace(1)
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
! code abort
abortFlag = .false.
@@ -2331,8 +2351,10 @@ subroutine column_itd_thermodynamics(domain, clock)
anyAbort = .false.
!$omp parallel do default(shared) private(iCategory,iBioTracers,iBioData,&
- !$omp& totalCarbonInitial,abortMessage,oceanBioFluxesTemp,totalCarbonFinal,&
- !$omp& carbonError) firstprivate(newlyFormedIceLogical,oceanBioConcentrationsUsed) &
+ !$omp& totalCarbonInitial,totalCarbonCatInitial,totalCarbonCatFinal,&
+ !$omp& abortMessage,oceanBioFluxesTemp,totalCarbonFinal,&
+ !$omp& oceanCarbonFlux, carbonError) &
+ !$omp& firstprivate(newlyFormedIceLogical,oceanBioConcentrationsUsed) &
!$omp& reduction(.or.:abortFlag)
do iCell = 1, nCellsSolve
@@ -2352,14 +2374,14 @@ subroutine column_itd_thermodynamics(domain, clock)
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
if (checkCarbon) then
- totalCarbonInitial = 0.0_RKIND
- call seaice_total_carbon_content_category(block,totalCarbonCatInitial,iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
+ totalCarbonInitial(iCell) = 0.0_RKIND
+ call seaice_total_carbon_content_category(block,totalCarbonCatInitial(:,iCell),iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
do iCategory = 1,nCategories
- totalCarbonInitial = totalCarbonInitial + totalCarbonCatInitial(iCategory)*iceAreaCategory(1,iCategory,iCell)
+ totalCarbonInitial(iCell) = totalCarbonInitial(iCell) + totalCarbonCatInitial(iCategory,iCell)*iceAreaCategory(1,iCategory,iCell)
enddo
endif
- oceanBioFluxesTemp(:) = 0.0_RKIND
+ oceanBioFluxesTemp(:,iCell) = 0.0_RKIND
call colpkg_clear_warnings()
call colpkg_step_therm2(&
@@ -2402,7 +2424,7 @@ subroutine column_itd_thermodynamics(domain, clock)
oceanAerosolFlux(:,iCell), &
newlyFormedIceLogical(:), & !first_ice, intent(inout)
zSalinityFlux(iCell), &
- oceanBioFluxesTemp(:), &
+ oceanBioFluxesTemp(:,iCell), &
oceanBioConcentrationsUsed(:), & !ocean_bio, intent(in)
abortFlag, &
abortMessage, &
@@ -2411,7 +2433,7 @@ subroutine column_itd_thermodynamics(domain, clock)
dayOfYear)
do iBioTracers = 1, ciceTracerObject % nBioTracers
- oceanBioFluxes(iBioTracers,iCell) = oceanBioFluxes(iBioTracers,iCell) + oceanBioFluxesTemp(iBioTracers)
+ oceanBioFluxes(iBioTracers,iCell) = oceanBioFluxes(iBioTracers,iCell) + oceanBioFluxesTemp(iBioTracers,iCell)
enddo
call column_write_warnings(abortFlag)
@@ -2427,26 +2449,26 @@ subroutine column_itd_thermodynamics(domain, clock)
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
if (checkCarbon) then
- totalCarbonFinal = 0.0_RKIND
- call seaice_total_carbon_content_category(block,totalCarbonCatFinal,iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
- call seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux,oceanBioFluxesTemp,iCell)
+ totalCarbonFinal(iCell) = 0.0_RKIND
+ call seaice_total_carbon_content_category(block,totalCarbonCatFinal(:,iCell),iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
+ call seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux(iCell),oceanBioFluxesTemp(:,iCell),iCell)
do iCategory = 1,nCategories
- totalCarbonFinal = totalCarbonFinal + totalCarbonCatFinal(iCategory)*iceAreaCategory(1,iCategory,iCell)
+ totalCarbonFinal(iCell) = totalCarbonFinal(iCell) + totalCarbonCatFinal(iCategory,iCell)*iceAreaCategory(1,iCategory,iCell)
enddo
- carbonError = totalCarbonInitial - oceanCarbonFlux*config_dt - totalCarbonFinal
+ carbonError(iCell) = (totalCarbonFinal(iCell) - totalCarbonInitial(iCell))/config_dt + oceanCarbonFlux(iCell)
- if (abs(carbonError) > 1.0e-14_RKIND*MAXVAL((/totalCarbonInitial,totalCarbonFinal/))) then
+ if (abs(carbonError(iCell)) > max(seaicePuny,1.0e-14_RKIND*abs(oceanCarbonFlux(iCell)))) then
call mpas_log_write("column_step_therm2, carbon conservation error", messageType=MPAS_LOG_ERR)
call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
- call mpas_log_write("carbonError: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError/))
- call mpas_log_write("totalCarbonInitial: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonInitial/))
- call mpas_log_write("totalCarbonFinal: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonFinal/))
- call mpas_log_write("oceanCarbonFlux: $r", messageType=MPAS_LOG_ERR, realArgs=(/oceanCarbonFlux/))
+ call mpas_log_write("carbonError: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError(iCell)/))
+ call mpas_log_write("totalCarbonInitial: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonInitial(iCell)/))
+ call mpas_log_write("totalCarbonFinal: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonFinal(iCell)/))
+ call mpas_log_write("oceanCarbonFlux: $r", messageType=MPAS_LOG_ERR, realArgs=(/oceanCarbonFlux(iCell)/))
do iCategory = 1, nCategories
call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
- call mpas_log_write("totalCarbonCatFinal(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory)/))
- call mpas_log_write("totalCarbonCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory)/))
+ call mpas_log_write("totalCarbonCatFinal(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatInitial(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory,iCell)/))
enddo
endif
endif
@@ -2466,10 +2488,12 @@ subroutine column_itd_thermodynamics(domain, clock)
call seaice_critical_error_write_block(domain, block, anyAbort)
call seaice_check_critical_error(domain, anyAbort)
- if (checkCarbon) then
- deallocate(totalCarbonCatFinal)
- deallocate(totalCarbonCatInitial)
- endif
+ deallocate(totalCarbonCatFinal)
+ deallocate(totalCarbonCatInitial)
+ deallocate(totalCarbonInitial)
+ deallocate(totalCarbonFinal)
+ deallocate(oceanCarbonFlux)
+ deallocate(carbonError)
! newly formed ice
deallocate(newlyFormedIceLogical)
@@ -2658,7 +2682,8 @@ subroutine column_snow(domain)
logical, pointer :: &
config_use_effective_snow_density, &
config_use_snow_grain_radius, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), dimension(:,:,:), pointer :: &
snowIceMass, &
@@ -2749,6 +2774,7 @@ subroutine column_snow(domain)
call MPAS_pool_get_config(block % configs, "config_wind_compaction_factor", config_wind_compaction_factor)
call MPAS_pool_get_config(block % configs, "config_snow_redistribution_factor", config_snow_redistribution_factor)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_dimension(block % dimensions, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(block % dimensions, "nCategories", nCategories)
@@ -2792,7 +2818,7 @@ subroutine column_snow(domain)
call MPAS_pool_get_array(ocean_fluxes, "oceanHeatFlux", oceanHeatFlux)
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
! code abort
abortFlag = .false.
@@ -2924,7 +2950,8 @@ subroutine column_radiation(domain, clock, lInitialization)
config_use_shortwave_bioabsorption, &
config_use_brine, &
config_use_modal_aerosols, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
character(len=strKIND), pointer :: &
config_snow_redistribution_scheme
@@ -3061,6 +3088,7 @@ subroutine column_radiation(domain, clock, lInitialization)
call MPAS_pool_get_config(domain % configs, "config_use_shortwave_bioabsorption", config_use_shortwave_bioabsorption)
call MPAS_pool_get_config(domain % configs, "config_use_modal_aerosols",config_use_modal_aerosols)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry",config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols",config_use_zaerosols)
block => domain % blocklist
do while (associated(block))
@@ -3206,7 +3234,7 @@ subroutine column_radiation(domain, clock, lInitialization)
allocate(aerosolsArray(4*nAerosols,nCategories))
allocate(index_shortwaveAerosol(maxAerosolType))
- if (.not. config_use_column_biogeochemistry) then
+ if (.not. config_use_zaerosols) then
index_shortwaveAerosol(1:maxAerosolType) = 1
else
do iAerosol = 1, maxAerosolType
@@ -3215,7 +3243,7 @@ subroutine column_radiation(domain, clock, lInitialization)
endif
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
!$omp parallel do default(shared) firstprivate(aerosolsArray,index_shortwaveAerosol) &
!$omp& private(iCategory,iAerosol,lonCellColumn)
@@ -3362,6 +3390,9 @@ subroutine column_ridging(domain)
colpkg_step_ridge, &
colpkg_clear_warnings
+ use seaice_constants, only: &
+ seaicePuny
+
type(domain_type), intent(inout) :: domain
type(block_type), pointer :: block
@@ -3382,7 +3413,8 @@ subroutine column_ridging(domain)
! configs
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), pointer :: &
config_dt
@@ -3397,7 +3429,8 @@ subroutine column_ridging(domain)
nIceLayers, &
nSnowLayers, &
nAerosols, &
- nBioLayers
+ nBioLayers, &
+ nBioLayersP1
! variables
real(kind=RKIND), dimension(:), pointer :: &
@@ -3447,7 +3480,24 @@ subroutine column_ridging(domain)
! local
integer :: &
iCell, &
- iCategory
+ iCategory, &
+ iBioTracers, &
+ iBioData, &
+ iBioLayers
+
+ ! test carbon conservation
+ real(kind=RKIND), dimension(:,:), allocatable :: &
+ totalCarbonCatFinal, &
+ totalCarbonCatInitial, &
+ oceanBioFluxesTemp
+
+ real(kind=RKIND), dimension(:), allocatable :: &
+ verticalGridSpace, &
+ oceanCarbonFlux, &
+ totalCarbonFinal, &
+ totalCarbonInitial, &
+ carbonError, &
+ iceAreaCategoryInitial
logical, dimension(:), allocatable :: &
newlyFormedIceLogical
@@ -3455,12 +3505,15 @@ subroutine column_ridging(domain)
logical :: &
abortFlag, &
setGetPhysicsTracers, &
- setGetBGCTracers
+ setGetBGCTracers, &
+ checkCarbon
character(len=strKIND) :: &
abortMessage, &
abortLocation
+ checkCarbon = .false.
+
block => domain % blocklist
do while (associated(block))
@@ -3479,6 +3532,8 @@ subroutine column_ridging(domain)
call MPAS_pool_get_config(block % configs, "config_dynamics_subcycle_number", config_dynamics_subcycle_number)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(block % configs, "config_dt", config_dt)
call MPAS_pool_get_array(velocity_solver, "dynamicsTimeStep", dynamicsTimeStep)
@@ -3488,6 +3543,7 @@ subroutine column_ridging(domain)
call MPAS_pool_get_dimension(mesh, "nSnowLayers", nSnowLayers)
call MPAS_pool_get_dimension(mesh, "nAerosols", nAerosols)
call MPAS_pool_get_dimension(block % dimensions, "nBioLayers", nBioLayers)
+ call MPAS_pool_get_dimension(block % dimensions, "nBioLayersP1", nBioLayersP1)
call MPAS_pool_get_array(mesh, "indexToCellID", indexToCellID)
@@ -3534,8 +3590,32 @@ subroutine column_ridging(domain)
! newly formed ice
allocate(newlyFormedIceLogical(nCategories))
+ allocate(oceanBioFluxesTemp(ciceTracerObject % nBioTracers,nCellsSolve))
+ allocate(verticalGridSpace(nBioLayersP1))
+ if (checkCarbon) then
+ allocate(totalCarbonCatFinal(nCategories,nCellsSolve))
+ allocate(totalCarbonCatInitial(nCategories,nCellsSolve))
+ allocate(totalCarbonInitial(nCellsSolve))
+ allocate(totalCarbonFinal(nCellsSolve))
+ allocate(oceanCarbonFlux(nCellsSolve))
+ allocate(carbonError(nCellsSolve))
+ allocate(iceAreaCategoryInitial(nCategories))
+ else
+ allocate(totalCarbonCatFinal(1,1))
+ allocate(totalCarbonCatInitial(1,1))
+ allocate(totalCarbonInitial(1))
+ allocate(totalCarbonFinal(1))
+ allocate(oceanCarbonFlux(1))
+ allocate(carbonError(1))
+ allocate(iceAreaCategoryInitial(1))
+ endif
+
+ verticalGridSpace(:) = 1.0_RKIND/real(nBioLayers,kind=RKIND)
+ verticalGridSpace(1) = verticalGridSpace(2)/2.0_RKIND
+ verticalGridSpace(nBioLayersP1) = verticalGridSpace(1)
+
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
! code abort
abortFlag = .false.
@@ -3552,6 +3632,17 @@ subroutine column_ridging(domain)
call set_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
+ if (checkCarbon) then
+ totalCarbonInitial(iCell) = 0.0_RKIND
+ call seaice_total_carbon_content_category(block,totalCarbonCatInitial(:,iCell),iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
+ do iCategory = 1,nCategories
+ iceAreaCategoryInitial(iCategory) = iceAreaCategory(1,iCategory,iCell)
+ totalCarbonInitial(iCell) = totalCarbonInitial(iCell) + totalCarbonCatInitial(iCategory,iCell)*iceAreaCategory(1,iCategory,iCell)
+ enddo
+ endif
+
+ oceanBioFluxesTemp(:,iCell) = 0.0_RKIND
+
call colpkg_clear_warnings()
call colpkg_step_ridge(&
dynamicsTimeStep, &
@@ -3595,11 +3686,15 @@ subroutine column_ridging(domain)
oceanSaltFlux(iCell), &
newlyFormedIceLogical(:), &
zSalinityFlux(iCell), &
- oceanBioFluxes(:,iCell), &
+ oceanBioFluxesTemp(:,iCell), &
abortFlag, &
abortMessage)
call column_write_warnings(abortFlag)
+ do iBioTracers = 1, ciceTracerObject % nBioTracers
+ oceanBioFluxes(iBioTracers,iCell) = oceanBioFluxes(iBioTracers,iCell) + oceanBioFluxesTemp(iBioTracers,iCell)
+ enddo
+
! update
do iCategory = 1, nCategories
newlyFormedIce(iCategory,iCell) = 0
@@ -3610,6 +3705,35 @@ subroutine column_ridging(domain)
call get_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
+ if (checkCarbon) then
+ totalCarbonFinal(iCell) = 0.0_RKIND
+ call seaice_total_carbon_content_category(block,totalCarbonCatFinal(:,iCell),iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
+ call seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux(iCell),oceanBioFluxesTemp(:,iCell),iCell)
+ do iCategory = 1,nCategories
+ totalCarbonFinal(iCell) = totalCarbonFinal(iCell) + totalCarbonCatFinal(iCategory,iCell)*iceAreaCategory(1,iCategory,iCell)
+ enddo
+ carbonError(iCell) = (totalCarbonFinal(iCell) - totalCarbonInitial(iCell))/config_dt + oceanCarbonFlux(iCell)
+
+ if (abs(carbonError(iCell)) > max(10.0_RKIND*seaicePuny,1.0e-14_RKIND*abs(oceanCarbonFlux(iCell))) .and. &
+ MAXVAL(iceAreaCategory(1,:,iCell)) > seaicePuny .and. &
+ MAXVAL(iceAreaCategoryInitial(:)) > seaicePuny) then
+ call mpas_log_write("column_step_ridge, carbon conservation error", messageType=MPAS_LOG_ERR)
+ call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
+ call mpas_log_write("carbonError: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError(iCell)/))
+ call mpas_log_write("totalCarbonInitial: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonInitial(iCell)/))
+ call mpas_log_write("totalCarbonFinal: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonFinal(iCell)/))
+ call mpas_log_write("oceanCarbonFlux: $r", messageType=MPAS_LOG_ERR, realArgs=(/oceanCarbonFlux(iCell)/))
+
+ do iCategory = 1, nCategories
+ call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
+ call mpas_log_write("totalCarbonCatFinal(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatInitial(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategory(1,iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategory(1,iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategoryInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategoryInitial(iCategory)/))
+ enddo
+ endif
+ endif
+
! code abort
if (abortFlag) then
call mpas_log_write("column_ridging: "//trim(abortMessage) , messageType=MPAS_LOG_ERR)
@@ -3623,6 +3747,16 @@ subroutine column_ridging(domain)
call seaice_critical_error_write_block(domain, block, abortFlag)
call seaice_check_critical_error(domain, abortFlag)
+ deallocate(oceanBioFluxesTemp)
+ deallocate(verticalGridSpace)
+ deallocate(totalCarbonCatFinal)
+ deallocate(totalCarbonCatInitial)
+ deallocate(totalCarbonInitial)
+ deallocate(totalCarbonFinal)
+ deallocate(oceanCarbonFlux)
+ deallocate(carbonError)
+ deallocate(iceAreaCategoryInitial)
+
! newly formed ice
deallocate(newlyFormedIceLogical)
@@ -3747,6 +3881,7 @@ subroutine column_biogeochemistry(domain)
snowIceBioFluxes, &
atmosIceBioFluxes, &
oceanBioConcentrations, &
+ oceanBioConcentrationsInUse, &
totalVerticalBiologyIce, &
totalVerticalBiologySnow, &
penetratingShortwaveFlux, &
@@ -3811,7 +3946,7 @@ subroutine column_biogeochemistry(domain)
iBioLayers
! test carbon conservation
- real(kind=RKIND), dimension(:), allocatable :: &
+ real(kind=RKIND), dimension(:,:), allocatable :: &
totalCarbonCatFinal, &
totalCarbonCatInitial, &
totalCarbonCatFlux, &
@@ -3819,12 +3954,13 @@ subroutine column_biogeochemistry(domain)
brineHeightCatFinal
real(kind=RKIND), dimension(:), allocatable :: &
- oceanBioConcentrationsUsed, &
- iceCarbonInitialCategory, &
- iceCarbonFinalCategory, &
- iceCarbonFluxCategory, &
- iceBrineInitialCategory, &
- iceBrineFinalCategory
+ totalCarbonFinal, &
+ totalCarbonInitial, &
+ totalCarbonFlux, &
+ carbonError
+
+ real(kind=RKIND):: &
+ errorCheck
logical, dimension(:), allocatable :: &
newlyFormedIceLogical
@@ -3840,12 +3976,8 @@ subroutine column_biogeochemistry(domain)
abortMessage, &
abortLocation
- real(kind=RKIND) :: &
- carbonErrorCat, &
- carbonErrorColumnPackage
-
real(kind=RKIND), parameter :: &
- accuracy = 1.0e-14_RKIND
+ accuracy = 1.0e-13_RKIND
! test carbon conservation
checkCarbon = .false.
@@ -3920,6 +4052,7 @@ subroutine column_biogeochemistry(domain)
call MPAS_pool_get_array(biogeochemistry, "snowIceBioFluxes", snowIceBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "atmosIceBioFluxes", atmosIceBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "oceanBioConcentrations", oceanBioConcentrations)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBioConcentrationsInUse", oceanBioConcentrationsInUse)
call MPAS_pool_get_array(biogeochemistry, "totalVerticalBiologyIce", totalVerticalBiologyIce)
call MPAS_pool_get_array(biogeochemistry, "totalVerticalBiologySnow", totalVerticalBiologySnow)
call MPAS_pool_get_array(biogeochemistry, "zSalinityIceDensity", zSalinityIceDensity)
@@ -3983,28 +4116,58 @@ subroutine column_biogeochemistry(domain)
! newly formed ice
allocate(newlyFormedIceLogical(nCategories))
- allocate(oceanBioConcentrationsUsed(ciceTracerObject % nBioTracers))
- allocate(brineHeightCatInitial(nCategories))
+ allocate(brineHeightCatInitial(nCategories,nCellsSolve))
+ allocate(carbonError(nCellsSolve))
if (checkCarbon) then
- allocate(totalCarbonCatFinal(nCategories))
- allocate(totalCarbonCatInitial(nCategories))
- allocate(totalCarbonCatFlux(nCategories))
- allocate(brineHeightCatFinal(nCategories))
+ allocate(totalCarbonCatFinal(nCategories,nCellsSolve))
+ allocate(totalCarbonCatInitial(nCategories,nCellsSolve))
+ allocate(totalCarbonCatFlux(nCategories,nCellsSolve))
+ allocate(brineHeightCatFinal(nCategories,nCellsSolve))
+ allocate(totalCarbonFinal(nCellsSolve))
+ allocate(totalCarbonInitial(nCellsSolve))
+ allocate(totalCarbonFlux(nCellsSolve))
+ else
+ allocate(totalCarbonCatFinal(1,1))
+ allocate(totalCarbonCatInitial(1,1))
+ allocate(totalCarbonCatFlux(1,1))
+ allocate(brineHeightCatFinal(1,1))
+ allocate(totalCarbonFinal(1))
+ allocate(totalCarbonInitial(1))
+ allocate(totalCarbonFlux(1))
endif
+ brineHeightCatInitial(:,:) = 0.0_RKIND
+ carbonError(:) = 0.0_RKIND
+ totalCarbonCatFinal(:,:) = 0.0_RKIND
+ totalCarbonCatInitial(:,:) = 0.0_RKIND
+ totalCarbonCatFlux(:,:) = 0.0_RKIND
+ brineHeightCatFinal(:,:) = 0.0_RKIND
+ totalCarbonFinal(:) = 0.0_RKIND
+ totalCarbonInitial(:) = 0.0_RKIND
+ totalCarbonFlux(:) = 0.0_RKIND
+
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
! code abort
abortFlag = .false.
abortMessage = ""
+ atmosBioFluxes(:,:) = 0.0_RKIND
+ oceanBioConcentrationsInUse(:,:) = 0.0_RKIND
+
+ !$offomp parallel do default(shared) private(iCategory,iBioTracers,iAlgae, iBioLayers) &
+ !$offomp& firstprivate(atmosBioFluxes,atmosBlackCarbonFlux, &
+ !$offomp& totalCarbonCatInitial, totalCarbonCatFinal, &
+ !$offomp& totalCarbonInitial, totalCarbonFinal, totalCarbonFlux, &
+ !$offomp& atmosDustFlux, bioShortwaveFluxCell, newlyFormedIce)
+ !
do iCell = 1, nCellsSolve
! newly formed ice
do iCategory = 1, nCategories
newlyFormedIceLogical(iCategory) = (newlyFormedIce(iCategory,iCell) == 1)
- brineHeightCatInitial(iCategory) = brineFraction(1,iCategory,iCell) * &
+ brineHeightCatInitial(iCategory,iCell) = brineFraction(1,iCategory,iCell) * &
iceVolumeCategoryInitial(iCategory,iCell)/(iceAreaCategoryInitial(iCategory,iCell) + seaicePuny)
enddo ! iCategory
rayleighCriteria = (rayleighCriteriaReal(iCell) > 0.5_RKIND)
@@ -4041,7 +4204,6 @@ subroutine column_biogeochemistry(domain)
atmosDustFlux(iBioTracers,iCell) = 1.e-13_RKIND
enddo
#endif
- atmosBioFluxes(:,:) = 0.0_RKIND
if (config_use_zaerosols) then
indexj = ciceTracerObject % index_verticalAerosolsConcLayer(1)
do iBioTracers = 1, maxBCType
@@ -4054,14 +4216,20 @@ subroutine column_biogeochemistry(domain)
do iBioTracers = 1, ciceTracerObject % nBioTracers
iBioData = ciceTracerObject % index_LayerIndexToDataArray(iBioTracers)
- oceanBioConcentrationsUsed(iBioTracers) = oceanBioConcentrations(iBioData,iCell)
+ oceanBioConcentrationsInUse(iBioTracers,iCell) = oceanBioConcentrations(iBioData,iCell)
enddo ! iBioTracers
call set_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
- if (checkCarbon) call seaice_total_carbon_content_category(block,&
- totalCarbonCatInitial,iceAreaCategoryInitial,iceVolumeCategoryInitial,iCell)
+ if (checkCarbon) then
+ call seaice_total_carbon_content_category(block,&
+ totalCarbonCatInitial(:,iCell),iceAreaCategoryInitial(:,:),iceVolumeCategoryInitial(:,:),iCell)
+ totalCarbonInitial(iCell) = 0.0_RKIND
+ do iCategory = 1, nCategories
+ totalCarbonInitial(iCell) = totalCarbonInitial(iCell) + totalCarbonCatInitial(iCategory,iCell)*iceAreaCategoryInitial(iCategory,iCell)
+ enddo
+ endif
call colpkg_clear_warnings()
call colpkg_biogeochemistry(&
@@ -4083,7 +4251,7 @@ subroutine column_biogeochemistry(domain)
verticalNitrogenLosses(:,:,iCell), &
snowIceBioFluxes(:,iCell), &
atmosIceBioFluxes(:,iCell), &
- oceanBioConcentrationsUsed(:), &
+ oceanBioConcentrationsInUse(:,iCell), &
newlyFormedIceLogical(:), &
shortwaveLayerPenetration(:,:,iCell), &
bioPorosity(:,:,iCell), &
@@ -4148,35 +4316,43 @@ subroutine column_biogeochemistry(domain)
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
if (checkCarbon) then
- call seaice_total_carbon_content_category(block,totalCarbonCatFinal,iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
- call seaice_ocean_carbon_flux(block,totalCarbonCatFlux,oceanBioFluxesCategory(:,:,:),iCell)
- do iCategory = 1,nCategories
- brineHeightCatFinal(iCategory) = brineFraction(1,iCategory,iCell) * &
+ call seaice_total_carbon_content_category(block,totalCarbonCatFinal(:,iCell),iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
+ call seaice_ocean_carbon_flux(block,totalCarbonCatFlux(:,iCell),oceanBioFluxesCategory(:,:,:),iCell)
+ totalCarbonFinal(iCell) = 0.0_RKIND
+ totalCarbonFlux(iCell) = 0.0_RKIND
+ do iCategory = 1, nCategories
+ totalCarbonFinal(iCell) = totalCarbonFinal(iCell) + totalCarbonCatFinal(iCategory,iCell)*iceAreaCategory(1,iCategory,iCell)
+ totalCarbonFlux(iCell) = totalCarbonFlux(iCell) + totalCarbonCatFlux(iCategory,iCell) * iceAreaCategory(1,iCategory,iCell)
+ enddo
+ carbonError(iCell) = (totalCarbonFinal(iCell) - totalCarbonInitial(iCell))/config_dt + totalCarbonFlux(iCell)
+ errorCheck = MAX(accuracy,accuracy*abs(totalCarbonFlux(iCell)))
+
+ if (abs(carbonError(iCell)) > errorCheck) then
+ do iCategory = 1,nCategories
+ if (iceAreaCategory(1,iCategory,iCell) > seaicePuny) then
+ brineHeightCatFinal(iCategory,iCell) = brineFraction(1,iCategory,iCell) * &
iceVolumeCategory(1,iCategory,iCell)/(iceAreaCategory(1,iCategory,iCell) + seaicePuny)
- carbonErrorCat = totalCarbonCatInitial(iCategory) - totalCarbonCatFlux(iCategory)*config_dt - &
- totalCarbonCatFinal(iCategory)
- if (abs(carbonErrorCat) > accuracy*MAXVAL((/totalCarbonCatInitial(iCategory),totalCarbonCatFinal(iCategory)/))) then
-! abortFlag = .true.
-! abortMessage = "carbon conservation errror after column bgc"
- call mpas_log_write("column_biogeochemistry, carbon conservation error", messageType=MPAS_LOG_ERR)
- call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
- call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
- call mpas_log_write("carbonErrorCat: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonErrorCat/))
- call mpas_log_write("carbonErrorCat*iceAreaCategory: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonErrorCat*iceAreaCategory(1,iCategory,iCell)/))
- call mpas_log_write("totalCarbonCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatInitial(iCategory)/))
- call mpas_log_write("totalCarbonCatFinal(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory)/))
- call mpas_log_write("totalCarbonCatFlux(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFlux(iCategory)/))
- call mpas_log_write("brineHeightCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatInitial(iCategory)/))
- call mpas_log_write("brineHeightCatFinal(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatFinal(iCategory)/))
- endif
- enddo
- endif
+ call mpas_log_write("column_biogeochemistry, carbon conservation error", messageType=MPAS_LOG_ERR)
+ call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
+ call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
+ call mpas_log_write("carbonError: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError(iCell)/))
+ call mpas_log_write("carbonError*iceAreaCategory: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError(iCell)*iceAreaCategory(1,iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategory: $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategory(1,iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategoryInitial: $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategoryInitial(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatInitial(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatInitial(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatFinal(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatFlux(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFlux(iCategory,iCell)/))
+ call mpas_log_write("brineHeightCatInitial(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatInitial(iCategory,iCell)/))
+ call mpas_log_write("brineHeightCatFinal(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatFinal(iCategory,iCell)/))
+ endif
+ enddo
+ endif !carbonError
+ endif
! code abort
if (abortFlag) then
call mpas_log_write("column_biogeochemistry: "//trim(abortMessage) , messageType=MPAS_LOG_ERR)
call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
- exit
endif
totalSkeletalAlgae(iCell) = 0.0_RKIND
@@ -4209,16 +4385,17 @@ subroutine column_biogeochemistry(domain)
call seaice_critical_error_write_block(domain, block, abortFlag)
call seaice_check_critical_error(domain, abortFlag)
- if (checkCarbon) then
- deallocate(totalCarbonCatFinal)
- deallocate(totalCarbonCatInitial)
- deallocate(totalCarbonCatFlux)
- deallocate(brineHeightCatFinal)
- endif
+ deallocate(totalCarbonCatFinal)
+ deallocate(totalCarbonCatInitial)
+ deallocate(totalCarbonCatFlux)
+ deallocate(brineHeightCatFinal)
+ deallocate(totalCarbonFinal)
+ deallocate(totalCarbonInitial)
+ deallocate(totalCarbonFlux)
deallocate(brineHeightCatInitial)
deallocate(newlyFormedIceLogical)
- deallocate(oceanBioConcentrationsUsed)
+ deallocate(carbonError)
block => block % next
end do
@@ -4492,7 +4669,8 @@ subroutine seaice_column_aggregate(domain)
ocean_coupling
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), dimension(:), pointer :: &
iceAreaCell, &
@@ -4527,6 +4705,7 @@ subroutine seaice_column_aggregate(domain)
call MPAS_pool_get_subpool(block % structs, "ocean_coupling", ocean_coupling)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
@@ -4544,7 +4723,7 @@ subroutine seaice_column_aggregate(domain)
call MPAS_pool_get_array(ocean_coupling, "seaFreezingTemperature", seaFreezingTemperature)
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
do iCell = 1, nCellsSolve
@@ -4691,7 +4870,8 @@ subroutine seaice_column_coupling_prep(domain)
logical, pointer :: &
config_use_ocean_mixed_layer, &
config_include_pond_freshwater_feedback, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
type(MPAS_pool_type), pointer :: &
oceanCoupling, &
@@ -4742,7 +4922,17 @@ subroutine seaice_column_coupling_prep(domain)
oceanDMSPdFlux, &
oceanHumicsFlux, &
oceanDustIronFlux, &
- totalOceanCarbonFlux
+ oceanBlackCarbonFlux, &
+ totalOceanCarbonFlux, &
+ oceanNitrateFluxArea, &
+ oceanSilicateFluxArea, &
+ oceanAmmoniumFluxArea, &
+ oceanDMSFluxArea, &
+ oceanDMSPpFluxArea, &
+ oceanDMSPdFluxArea, &
+ oceanHumicsFluxArea, &
+ oceanDustIronFluxArea, &
+ oceanBlackCarbonFluxArea
real(kind=RKIND), dimension(:,:), pointer :: &
albedoVisibleDirectCategory, &
@@ -4759,7 +4949,13 @@ subroutine seaice_column_coupling_prep(domain)
oceanDICFlux, &
oceanDONFlux, &
oceanParticulateIronFlux, &
- oceanDissolvedIronFlux
+ oceanDissolvedIronFlux, &
+ oceanAlgaeFluxArea, &
+ oceanDOCFluxArea, &
+ oceanDICFluxArea, &
+ oceanDONFluxArea, &
+ oceanParticulateIronFluxArea, &
+ oceanDissolvedIronFluxArea
real(kind=RKIND), dimension(:,:,:), pointer :: &
iceAreaCategory
@@ -4802,6 +4998,7 @@ subroutine seaice_column_coupling_prep(domain)
call MPAS_pool_get_config(domain % configs, "config_dt", config_dt)
call MPAS_pool_get_config(domain % configs, "config_include_pond_freshwater_feedback", config_include_pond_freshwater_feedback)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_diatoms", config_ratio_C_to_N_diatoms)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_small_plankton", config_ratio_C_to_N_small_plankton)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_phaeocystis", config_ratio_C_to_N_phaeocystis)
@@ -4881,6 +5078,7 @@ subroutine seaice_column_coupling_prep(domain)
call MPAS_pool_get_array(biogeochemistry, "oceanDMSPdFlux", oceanDMSPdFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanHumicsFlux", oceanHumicsFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDustIronFlux", oceanDustIronFlux)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBlackCarbonFlux", oceanBlackCarbonFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanBioFluxes", oceanBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "oceanAlgaeFlux", oceanAlgaeFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDOCFlux", oceanDOCFlux)
@@ -4890,6 +5088,22 @@ subroutine seaice_column_coupling_prep(domain)
call MPAS_pool_get_array(biogeochemistry, "oceanDissolvedIronFlux", oceanDissolvedIronFlux)
call MPAS_pool_get_array(biogeochemistry, "totalOceanCarbonFlux", totalOceanCarbonFlux)
+ call MPAS_pool_get_array(biogeochemistry, "oceanNitrateFluxArea", oceanNitrateFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanSilicateFluxArea", oceanSilicateFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanAmmoniumFluxArea", oceanAmmoniumFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDMSFluxArea", oceanDMSFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDMSPpFluxArea", oceanDMSPpFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDMSPdFluxArea", oceanDMSPdFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanHumicsFluxArea", oceanHumicsFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDustIronFluxArea", oceanDustIronFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBlackCarbonFluxArea", oceanBlackCarbonFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanAlgaeFluxArea", oceanAlgaeFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDOCFluxArea", oceanDOCFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDICFluxArea", oceanDICFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDONFluxArea", oceanDONFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanParticulateIronFluxArea", oceanParticulateIronFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDissolvedIronFluxArea", oceanDissolvedIronFluxArea)
+
call MPAS_pool_get_dimension(mesh, "nZBGCTracers", nZBGCTracers)
call MPAS_pool_get_dimension(mesh, "maxAlgaeType", maxAlgaeType)
call MPAS_pool_get_dimension(mesh, "maxDOCType", maxDOCType)
@@ -4994,10 +5208,12 @@ subroutine seaice_column_coupling_prep(domain)
!-----------------------------------------------------------------
! Define ocean biogeochemical flux variables
!-----------------------------------------------------------------
- if (config_use_column_biogeochemistry) then
+
+ oceanBioFluxesAll(:) = 0.0_RKIND
+
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
totalOceanCarbonFlux(iCell) = 0.0_RKIND
- oceanBioFluxesAll(:) = 0.0_RKIND
oceanAlgaeFlux(:,iCell) = 0.0_RKIND
oceanDOCFlux(:,iCell) = 0.0_RKIND
oceanDICFlux(:,iCell) = 0.0_RKIND
@@ -5011,6 +5227,7 @@ subroutine seaice_column_coupling_prep(domain)
oceanDMSPdFlux(iCell) = 0.0_RKIND
oceanDMSFlux(iCell) = 0.0_RKIND
oceanDustIronFlux(iCell) = 0.0_RKIND
+ oceanBlackCarbonFlux(iCell) = 0.0_RKIND
oceanHumicsFlux(iCell) = 0.0_RKIND
do iBioTracers = 1, ciceTracerObject % nBioTracers
@@ -5023,6 +5240,7 @@ subroutine seaice_column_coupling_prep(domain)
do iBioTracers = 1, maxAlgaeType
iBioData = iBioData+1
oceanAlgaeFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanAlgaeFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanAlgaeFlux(iBioTracers,iCell) * ratio_C_to_N(iBioTracers)
enddo
@@ -5030,11 +5248,13 @@ subroutine seaice_column_coupling_prep(domain)
! Nitrate
iBioData = iBioData+1
oceanNitrateFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanNitrateFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! Polysaccharids and Lipids
do iBioTracers = 1, maxDOCType
iBioData = iBioData+1
oceanDOCFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDOCFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanDOCFlux(iBioTracers,iCell)
enddo
@@ -5043,6 +5263,7 @@ subroutine seaice_column_coupling_prep(domain)
do iBioTracers = 1, maxDICType
iBioData = iBioData+1
oceanDICFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDICFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanDICFlux(iBioTracers,iCell)
enddo
@@ -5053,22 +5274,27 @@ subroutine seaice_column_coupling_prep(domain)
! Ammonium
iBioData = iBioData+1
oceanAmmoniumFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanAmmoniumFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! Silicate
iBioData = iBioData+1
oceanSilicateFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanSilicateFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! DMSPp
iBioData = iBioData+1
oceanDMSPpFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanDMSPpFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! DMSPd
iBioData = iBioData+1
oceanDMSPdFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanDMSPdFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! DMS
iBioData = iBioData+1
oceanDMSFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanDMSFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! PON
iBioData = iBioData+1
@@ -5077,6 +5303,7 @@ subroutine seaice_column_coupling_prep(domain)
do iBioTracers = 1, maxDONType
iBioData = iBioData+1
oceanDONFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDONFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanDONFlux(iBioTracers,iCell) * config_ratio_C_to_N_proteins
enddo
@@ -5085,30 +5312,38 @@ subroutine seaice_column_coupling_prep(domain)
do iBioTracers = 1, maxIronType
iBioData = iBioData+1
oceanDissolvedIronFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDissolvedIronFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
enddo
! Particulate Iron
do iBioTracers = 1, maxIronType
iBioData = iBioData+1
oceanParticulateIronFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanParticulateIronFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
enddo
- ! Black Carbon (not saved)
- iBioData = iBioData + maxBCType
+ ! Black Carbon (combined; saved for conservation)
+ do iBioTracers = 1, maxBCType
+ iBioData = iBioData + 1
+ oceanBlackCarbonFlux(iCell) = oceanBlackCarbonFlux(iCell) + oceanBioFluxesAll(iBioData)
+ enddo
+ oceanBlackCarbonFluxArea(iCell) = oceanBlackCarbonFlux(iCell)
! Dust (combined)
do iBioTracers = 1, maxDustType
iBioData = iBioData+1
oceanDustIronFlux(iCell) = oceanDustIronFlux(iCell) + oceanBioFluxesAll(iBioData)
enddo
+ oceanDustIronFluxArea(iCell) = oceanDustIronFlux(iCell)
! Humics
iBioData = iBioData+1
oceanHumicsFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanHumicsFluxArea(iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanHumicsFlux(iCell)
- endif ! config_use_column_biogeochemistry
+ endif ! config_use_column_biogeochemistry .or. config_use_zaerosols
enddo ! iCell
@@ -5156,7 +5391,8 @@ subroutine seaice_column_scale_fluxes(domain)
mesh
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), dimension(:), pointer :: &
iceAreaCell, &
@@ -5216,6 +5452,7 @@ subroutine seaice_column_scale_fluxes(domain)
iBioTracers
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
block => domain % blocklist
do while (associated(block))
@@ -5308,6 +5545,9 @@ subroutine seaice_column_scale_fluxes(domain)
albedoVisibleDiffuseCell(iCell) = albedoVisibleDiffuseCell(iCell) * iceAreaInverse
albedoIRDiffuseCell(iCell) = albedoIRDiffuseCell(iCell) * iceAreaInverse
+ if (config_use_zaerosols) &
+ oceanDustIronFlux(iCell) = oceanDustIronFlux(iCell) * iceAreaInverse
+
if (config_use_column_biogeochemistry) then
oceanNitrateFlux(iCell) = oceanNitrateFlux(iCell) * iceAreaInverse
@@ -5317,7 +5557,6 @@ subroutine seaice_column_scale_fluxes(domain)
oceanDMSPdFlux(iCell) = oceanDMSPdFlux(iCell) * iceAreaInverse
oceanDMSFlux(iCell) = oceanDMSFlux(iCell) * iceAreaInverse
oceanHumicsFlux(iCell) = oceanHumicsFlux(iCell) * iceAreaInverse
- oceanDustIronFlux(iCell) = oceanDustIronFlux(iCell) * iceAreaInverse
do iBioTracers = 1, maxAlgaeType
oceanAlgaeFlux(iBioTracers,iCell) = oceanAlgaeFlux(iBioTracers,iCell) * iceAreaInverse
@@ -5360,6 +5599,9 @@ subroutine seaice_column_scale_fluxes(domain)
albedoVisibleDiffuseCell(iCell) = 0.0_RKIND
albedoIRDiffuseCell(iCell) = 0.0_RKIND
+ if (config_use_zaerosols) &
+ oceanDustIronFlux(iCell) = 0.0_RKIND
+
if (config_use_column_biogeochemistry) then
oceanNitrateFlux(iCell) = 0.0_RKIND
@@ -5369,7 +5611,6 @@ subroutine seaice_column_scale_fluxes(domain)
oceanDMSPdFlux(iCell) = 0.0_RKIND
oceanDMSFlux(iCell) = 0.0_RKIND
oceanHumicsFlux(iCell) = 0.0_RKIND
- oceanDustIronFlux(iCell) = 0.0_RKIND
oceanAlgaeFlux(:,iCell) = 0.0_RKIND
oceanDOCFlux(:,iCell) = 0.0_RKIND
oceanDICFlux(:,iCell) = 0.0_RKIND
@@ -6396,12 +6637,14 @@ subroutine init_column_tracer_object(domain, tracerObject)
nZBGCTracers
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nCategories", nCategories)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nZBGCTracers", nZBGCTracers)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
! get the number of CICE tracers in trcrn
call init_column_tracer_object_tracer_number(domain, tracerObject)
@@ -6425,7 +6668,7 @@ subroutine init_column_tracer_object(domain, tracerObject)
call init_column_tracer_object_ancestor_indices(domain, tracerObject)
! biogeochemistry
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
allocate(tracerObject % index_LayerIndexToDataArray(nZBGCTracers))
allocate(tracerObject % index_LayerIndexToBioIndex(nZBGCTracers))
@@ -6633,7 +6876,7 @@ subroutine init_column_tracer_object_tracer_number(domain, tracerObject)
! biogeochemistry
!-----------------------------------------------------------------------
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
! save tracer number without bio tracers counted
tracerObject % nTracersNotBio = tracerObject % nTracers
@@ -10273,11 +10516,11 @@ subroutine check_column_package_configs(domain)
endif
! check biogeochemistry flags:
- if (.not. config_use_column_biogeochemistry .and. (config_use_brine .or. config_use_vertical_zsalinity .or. &
- config_use_vertical_biochemistry .or. config_use_shortwave_bioabsorption .or. config_use_vertical_tracers .or. &
+ if (.not. config_use_column_biogeochemistry .and. (config_use_vertical_zsalinity .or. &
+ config_use_vertical_biochemistry .or. &
config_use_skeletal_biochemistry .or. config_use_nitrate .or. config_use_carbon .or. config_use_chlorophyll .or. &
config_use_ammonium .or. config_use_silicate .or. config_use_DMS .or. config_use_nonreactive .or. config_use_humics .or. &
- config_use_DON .or. config_use_iron .or. config_use_modal_aerosols .or. config_use_zaerosols)) then
+ config_use_DON .or. config_use_iron)) then
call mpas_log_write(&
"check_column_package_configs: config_use_column_biogeochemistry = false. "//&
"All biogeochemistry namelist flags must also be false", &
@@ -10301,10 +10544,20 @@ subroutine check_column_package_configs(domain)
messageType=MPAS_LOG_CRIT)
endif
- ! check that vertical bio tracers and not used with skeletal bio tracers
- if (config_use_vertical_tracers .and. config_use_skeletal_biochemistry) then
+ ! check that vertical bio tracers use brine height
+ if ((config_use_vertical_biochemistry .or. config_use_zaerosols) .and. &
+ (.not. config_use_brine .or. .not. config_use_vertical_tracers )) then
call mpas_log_write(&
- "check_column_package_configs: vertical bio tracers and skeletal bio tracers cannot both be true", &
+ "check_column_package_configs: vertical biochemistry and zaerosols require " //&
+ "config_use_brine and config_use_vertical_tracer = true", &
+ messageType=MPAS_LOG_CRIT)
+ endif
+
+ ! check that brine height is used with either aerosols or bgc
+ if (config_use_brine .and. &
+ (.not. config_use_column_biogeochemistry .and. .not. config_use_zaerosols)) then
+ call mpas_log_write(&
+ "check_column_package_configs: brine tracer must be used with vertical tracers - config_use_column_biogeochemistry and/or config_use_zaerosols equal to true", &
messageType=MPAS_LOG_CRIT)
endif
@@ -14805,11 +15058,13 @@ subroutine seaice_column_reinitialize_diagnostics_bgc(domain)
bioTracerShortwave
logical, pointer :: &
+ config_use_column_physics, &
config_use_column_biogeochemistry, &
config_use_column_shortwave, &
- config_use_column_physics, &
- config_use_vertical_biochemistry, &
- config_use_vertical_zsalinity
+ config_use_column_package, &
+ config_use_vertical_tracers, &
+ config_use_vertical_zsalinity, &
+ config_use_zaerosols
call MPAS_pool_get_config(domain % blocklist % configs, "config_use_column_physics", config_use_column_physics)
@@ -14820,15 +15075,16 @@ subroutine seaice_column_reinitialize_diagnostics_bgc(domain)
! biogeochemistry
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
- call MPAS_pool_get_config(block % configs, "config_use_vertical_biochemistry", config_use_vertical_biochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(block % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
call MPAS_pool_get_config(block % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity)
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistryPool)
call MPAS_pool_get_subpool(block % structs, "diagnostics_biogeochemistry", diagnostics_biogeochemistryPool)
- if (config_use_vertical_biochemistry) then
+ if (config_use_vertical_tracers) then
call MPAS_pool_get_array(biogeochemistryPool, "primaryProduction", primaryProduction)
call MPAS_pool_get_array(biogeochemistryPool, "totalChlorophyll", totalChlorophyll)
call MPAS_pool_get_array(biogeochemistryPool, "netSpecificAlgalGrowthRate", netSpecificAlgalGrowthRate)
@@ -14875,7 +15131,7 @@ subroutine seaice_column_reinitialize_diagnostics_bgc(domain)
call MPAS_pool_get_config(block % configs, "config_use_column_shortwave", config_use_column_shortwave)
- if (config_use_column_biogeochemistry .or. config_use_column_shortwave) then
+ if (config_use_column_biogeochemistry .or. config_use_column_shortwave .or. config_use_zaerosols) then
call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistryPool)
call MPAS_pool_get_array(biogeochemistryPool, "bioTracerShortwave", bioTracerShortwave)
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_constants.F b/components/mpas-seaice/src/shared/mpas_seaice_constants.F
index 8693a6ab624f..6a611f64d2cf 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_constants.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_constants.F
@@ -185,8 +185,10 @@ module seaice_constants
! biogeochemistry constants
real(kind=RKIND), public :: &
- skeletalLayerThickness = 0.03_RKIND ,&! (m) skeletal layer thickness
- gramsCarbonPerMolCarbon ! g carbon per mol carbon
+ skeletalLayerThickness = 0.03_RKIND , & ! (m) skeletal layer thickness
+ gramsCarbonPerMolCarbon = 12.0107_RKIND , & ! g carbon per mol carbon
+ microgramsPerKilograms = 1.0e9_RKIND , & ! kg to ug conversion
+ gramsIronPerMolIron = 55.845_RKIND ! g iron per mol iron
! ocean biogeochemistry ISPOL values
real(kind=RKIND), parameter, public :: &
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_forcing.F b/components/mpas-seaice/src/shared/mpas_seaice_forcing.F
index 064db418a844..ca0c4c5a962f 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_forcing.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_forcing.F
@@ -74,11 +74,17 @@ subroutine seaice_forcing_init(domain, clock)
logical, pointer :: &
config_use_forcing, &
config_use_data_icebergs, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols, &
+ config_use_atm_dust_file, &
+ config_use_iron_solubility_file
call MPAS_pool_get_config(domain % configs, "config_use_forcing", config_use_forcing)
call MPAS_pool_get_config(domain % configs, "config_use_data_icebergs", config_use_data_icebergs)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(domain % configs, "config_use_atm_dust_file", config_use_atm_dust_file)
+ call MPAS_pool_get_config(domain % configs, "config_use_iron_solubility_file", config_use_iron_solubility_file)
if (config_use_forcing) then
@@ -94,6 +100,10 @@ subroutine seaice_forcing_init(domain, clock)
endif
+ if (config_use_zaerosols .and. (config_use_iron_solubility_file .or. &
+ config_use_atm_dust_file) ) &
+ call init_atm_iron_bgc_forcing(domain, clock)
+
! init the data iceberg forcing
if (config_use_data_icebergs) call init_data_iceberg_forcing(domain, clock)
@@ -597,10 +607,16 @@ subroutine seaice_forcing_get(&
logical, pointer :: &
config_use_forcing, &
- config_use_data_icebergs
+ config_use_data_icebergs, &
+ config_use_zaerosols, &
+ config_use_atm_dust_file, &
+ config_use_iron_solubility_file
call MPAS_pool_get_config(domain % configs, "config_use_forcing", config_use_forcing)
call MPAS_pool_get_config(domain % configs, "config_use_data_icebergs", config_use_data_icebergs)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(domain % configs, "config_use_atm_dust_file", config_use_atm_dust_file)
+ call MPAS_pool_get_config(domain % configs, "config_use_iron_solubility_file", config_use_iron_solubility_file)
if (config_use_forcing) then
@@ -617,6 +633,14 @@ subroutine seaice_forcing_get(&
endif
+ if (config_use_zaerosols .and. (config_use_iron_solubility_file .or. &
+ config_use_atm_dust_file) ) &
+ call atmospheric_aerosols_forcing(&
+ streamManager, &
+ domain, &
+ simulationClock, &
+ firstTimeStep)
+
! data iceberg forcing
if (config_use_data_icebergs) then
@@ -657,7 +681,7 @@ subroutine atmospheric_forcing(&
config_dt
character(len=strKIND), pointer :: &
- config_atmospheric_forcing_type
+ config_atmospheric_forcing_type
! configurations
call mpas_pool_get_config(domain % configs, 'config_dt', config_dt)
@@ -724,6 +748,55 @@ subroutine atmospheric_forcing(&
end subroutine atmospheric_forcing
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! atmospheric_aerosols_forcing
+!
+!> \brief
+!> \author Nicole Jeffery, LANL
+!> \date
+!> \details: reads data file for dust fluxes and dust-iron solubility
+!>
+!
+!-----------------------------------------------------------------------
+
+ subroutine atmospheric_aerosols_forcing(&
+ streamManager, &
+ domain, &
+ simulationClock, &
+ firstTimeStep)
+
+ type (MPAS_streamManager_type), intent(inout) :: streamManager
+
+ type (domain_type) :: domain
+
+ type (MPAS_clock_type) :: simulationClock
+
+ logical, intent(in) :: &
+ firstTimeStep
+
+ type (block_type), pointer :: block
+
+ real(kind=RKIND), pointer :: &
+ config_dt
+
+ ! configurations
+ call mpas_pool_get_config(domain % configs, 'config_dt', config_dt)
+
+ call MPAS_forcing_get_forcing(seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', streamManager, config_dt)
+
+ block => domain % blocklist
+ do while (associated(block))
+
+ ! convert the input forcing variables to the coupling variables
+ call prepare_atmospheric_dust_coupling_variables(block)
+
+ block => block % next
+ end do
+
+ end subroutine atmospheric_aerosols_forcing
+
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
!
! prepare_atmospheric_coupling_variables_CORE
@@ -1044,6 +1117,74 @@ subroutine prepare_atmospheric_coupling_variables_ISPOL(block)
end subroutine prepare_atmospheric_coupling_variables_ISPOL
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! prepare_atmospheric_dust_coupling_variables
+!
+!> \brief
+!> \author Nicole Jeffery, LANL
+!> \date
+!> \details
+!> Defines the atm flux fields for dust if reading from a file
+!
+!-----------------------------------------------------------------------
+
+ subroutine prepare_atmospheric_dust_coupling_variables(block)
+
+ type (block_type), pointer :: block
+
+ type (mpas_pool_type), pointer :: &
+ mesh, &
+ atmosCoupling, &
+ atmosForcing, &
+ biogeochemistry
+
+ real(kind=RKIND), dimension(:,:), pointer :: &
+ atmosDustFlux, &
+ atmosWetDustFlux, &
+ atmosDryDustFlux
+
+ real(kind=RKIND), dimension(:), pointer :: &
+ dust_FLUZ_WET, &
+ dust_FLUZ_DRY
+
+ integer, pointer :: &
+ nCellsSolve, &
+ maxBCType, &
+ nzAerosols
+
+ integer :: &
+ iCell, &
+ iBioTracers, &
+ nDust
+
+ call MPAS_pool_get_subpool(block % structs, "mesh", mesh)
+ call MPAS_pool_get_subpool(block % structs, "atmos_forcing", atmosForcing)
+
+ call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
+
+ ! zaerosols
+
+ call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistry)
+ call MPAS_pool_get_dimension(mesh, "maxBCType", maxBCType)
+ call MPAS_pool_get_dimension(mesh, "nzAerosols", nzAerosols)
+ call MPAS_pool_get_array(biogeochemistry, "atmosDustFlux", atmosDustFlux)
+ call MPAS_pool_get_array(biogeochemistry, "atmosWetDustFlux", atmosWetDustFlux)
+ call MPAS_pool_get_array(biogeochemistry, "atmosDryDustFlux", atmosDryDustFlux)
+ call MPAS_pool_get_array(atmosForcing, "dust_FLUZ_WET", dust_FLUZ_WET)
+ call MPAS_pool_get_array(atmosForcing, "dust_FLUZ_DRY", dust_FLUZ_DRY)
+
+ nDust = MAX(1,nzAerosols - maxBCType)
+ do iCell = 1, nCellsSolve
+ do iBioTracers = maxBCType + 1, nzAerosols
+ atmosDustFlux(iBioTracers,iCell) = (dust_FLUZ_WET(iCell) + dust_FLUZ_DRY(iCell))/nDust
+ atmosWetDustFlux(iBioTracers,iCell) = dust_FLUZ_WET(iCell)/nDust
+ atmosDryDustFlux(iBiotracers,iCell) = dust_FLUZ_DRY(iCell)/nDust
+ enddo
+ end do
+
+ end subroutine prepare_atmospheric_dust_coupling_variables
+
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
!
! post_atmospheric_coupling
@@ -1675,6 +1816,122 @@ subroutine init_oceanic_bgc_forcing(domain)
end subroutine init_oceanic_bgc_forcing
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! init_atm_iron_bgc_forcing
+!
+!> \brief
+!> \author Nicole Jeffery, LANL
+!> \date 5th April 2024
+!> \details
+!> Uses monthly iron solubility maps from CAM6-MIMI (Yan Feng)
+! to convert dust to dissolved iron for bgc.
+!-----------------------------------------------------------------------
+
+ subroutine init_atm_iron_bgc_forcing(domain, clock)
+
+ type (domain_type) :: domain
+
+ type (MPAS_Clock_type) :: clock
+
+ logical, pointer :: &
+ config_do_restart
+
+ character(len=strKIND) :: &
+ forcingIntervalMonthly, &
+ forcingReferenceTimeMonthly
+
+ ! get forcing configuration options
+ call MPAS_pool_get_config(domain % configs, "config_do_restart", config_do_restart)
+
+ ! create the dust iron solubility forcing group
+
+ call MPAS_forcing_init_group(&
+ seaiceForcingGroups, &
+ "seaice_atm_bgc_forcing_monthly", &
+ domain, &
+ '0000-01-01_00:00:00', &
+ '0000-01-01_00:00:00', &
+ '0001-00-00_00:00:00', &
+ config_do_restart)
+
+ forcingIntervalMonthly = "00-01-00_00:00:00"
+ forcingReferenceTimeMonthly = "0001-01-15_00:00:00"
+
+ ! iron solubility fraction of wet dust iron
+ call MPAS_forcing_init_field(&
+ domain % streamManager, &
+ seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', &
+ 'IRON_Zolubility_wet', &
+ 'DustIronMonthlyForcing', &
+ 'atmos_forcing', &
+ 'IRON_Zolubility_wet', &
+ 'linear', &
+ forcingReferenceTimeMonthly, &
+ forcingIntervalMonthly)
+
+ ! iron solubility fraction of dry dust iron
+ call MPAS_forcing_init_field(&
+ domain % streamManager, &
+ seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', &
+ 'IRON_Zolubility_dry', &
+ 'DustIronMonthlyForcing', &
+ 'atmos_forcing', &
+ 'IRON_Zolubility_dry', &
+ 'linear', &
+ forcingReferenceTimeMonthly, &
+ forcingIntervalMonthly)
+
+ ! atmospheric wet dust flux
+ call MPAS_forcing_init_field(&
+ domain % streamManager, &
+ seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', &
+ 'dust_FLUZ_WET', &
+ 'DustIronMonthlyForcing', &
+ 'atmos_forcing', &
+ 'dust_FLUZ_WET', &
+ 'linear', &
+ forcingReferenceTimeMonthly, &
+ forcingIntervalMonthly)
+
+ ! atmospheric dry dust flux
+ call MPAS_forcing_init_field(&
+ domain % streamManager, &
+ seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', &
+ 'dust_FLUZ_DRY', &
+ 'DustIronMonthlyForcing', &
+ 'atmos_forcing', &
+ 'dust_FLUZ_DRY', &
+ 'linear', &
+ forcingReferenceTimeMonthly, &
+ forcingIntervalMonthly)
+
+ ! iron fraction in dust
+ call MPAS_forcing_init_field(&
+ domain % streamManager, &
+ seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', &
+ 'IRON_in_duzt_fraction', &
+ 'DustIronMonthlyForcing', &
+ 'atmos_forcing', &
+ 'IRON_in_duzt_fraction', &
+ 'linear', &
+ forcingReferenceTimeMonthly, &
+ forcingIntervalMonthly)
+
+ call MPAS_forcing_init_field_data(&
+ seaiceForcingGroups, &
+ 'seaice_atm_bgc_forcing_monthly', &
+ domain % streamManager, &
+ config_do_restart, &
+ .false.)
+
+ end subroutine init_atm_iron_bgc_forcing
+
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
!
! init_oceanic_forcing_ncar
@@ -3177,10 +3434,12 @@ subroutine reset_atmospheric_coupler_fluxes(domain)
real(kind=RKIND), dimension(:,:), pointer :: &
atmosBioFluxes, &
atmosBlackCarbonFlux, &
- atmosDustFlux
+ atmosDustFlux, &
+ atmosWetDustFlux, &
+ atmosDryDustFlux
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_zaerosols
block => domain % blocklist
do while (associated(block))
@@ -3219,20 +3478,24 @@ subroutine reset_atmospheric_coupler_fluxes(domain)
atmosReferenceTemperature2m = 0.0_RKIND
atmosReferenceHumidity2m = 0.0_RKIND
- ! biogeochemistry
- call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ ! zaerosols
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
- if (config_use_column_biogeochemistry) then
+ if (config_use_zaerosols) then
call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistry)
call MPAS_pool_get_array(biogeochemistry, "atmosBioFluxes", atmosBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFlux)
call MPAS_pool_get_array(biogeochemistry, "atmosDustFlux", atmosDustFlux)
+ call MPAS_pool_get_array(biogeochemistry, "atmosWetDustFlux", atmosWetDustFlux)
+ call MPAS_pool_get_array(biogeochemistry, "atmosDryDustFlux", atmosDryDustFlux)
atmosBioFluxes = 0.0_RKIND
atmosBlackCarbonFlux = 0.0_RKIND
atmosDustFlux = 0.0_RKIND
+ atmosWetDustFlux = 0.0_RKIND
+ atmosDryDustFlux = 0.0_RKIND
endif
@@ -3396,16 +3659,21 @@ subroutine seaice_forcing_write_restart_times(domain)
config_use_forcing, &
config_use_prescribed_ice, &
config_use_prescribed_ice_forcing, &
- config_use_data_icebergs
+ config_use_data_icebergs, &
+ config_use_atm_dust_file, &
+ config_use_iron_solubility_file
call MPAS_pool_get_config(domain % configs, "config_use_forcing", config_use_forcing)
call MPAS_pool_get_config(domain % configs, "config_use_prescribed_ice", config_use_prescribed_ice)
call MPAS_pool_get_config(domain % configs, "config_use_prescribed_ice_forcing", config_use_prescribed_ice_forcing)
call MPAS_pool_get_config(domain % configs, "config_use_data_icebergs", config_use_data_icebergs)
+ call MPAS_pool_get_config(domain % configs, "config_use_atm_dust_file", config_use_atm_dust_file)
+ call MPAS_pool_get_config(domain % configs, "config_use_iron_solubility_file", config_use_iron_solubility_file)
if (config_use_forcing .or. &
(config_use_prescribed_ice .and. config_use_prescribed_ice_forcing) .or. &
- config_use_data_icebergs) then
+ config_use_data_icebergs .or. &
+ config_use_atm_dust_file .or. config_use_iron_solubility_file) then
call MPAS_forcing_write_restart_times(seaiceForcingGroups)
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_icepack.F b/components/mpas-seaice/src/shared/mpas_seaice_icepack.F
index 9136ab1b56e3..c6386f2c1aa4 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_icepack.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_icepack.F
@@ -255,10 +255,12 @@ subroutine seaice_init_icepack_physics_package_variables(domain, clock)
config_do_restart, &
config_use_column_biogeochemistry, &
config_use_column_shortwave, &
- config_use_column_snow_tracers
+ config_use_column_snow_tracers, &
+ config_use_zaerosols
call MPAS_pool_get_config(domain % configs, "config_use_column_physics", config_use_column_physics)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
if (config_use_column_physics) then
@@ -272,7 +274,7 @@ subroutine seaice_init_icepack_physics_package_variables(domain, clock)
call init_column_thermodynamic_profiles(domain)
! initialize biogoechemistry profiles
- if (config_use_column_biogeochemistry) &
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) &
call init_column_biogeochemistry_profiles(domain, ciceTracerObject)
! history variables
@@ -338,7 +340,6 @@ subroutine init_column_itd(domain)
call MPAS_pool_get_array(initial, "categoryThicknessLimits", categoryThicknessLimits)
call icepack_init_itd(&
- nCategories, &
categoryThicknessLimits)
call seaice_icepack_write_warnings(icepack_warnings_aborted())
@@ -398,7 +399,6 @@ subroutine init_column_thermodynamic_profiles(domain)
allocate(initialSalinityProfileVertical(1:nIceLayers+1))
call icepack_init_thermo(&
- nIceLayers, &
initialSalinityProfileVertical)
call seaice_icepack_write_warnings(icepack_warnings_aborted())
@@ -862,8 +862,6 @@ subroutine init_column_thermodynamic_tracers(domain)
integer, pointer :: &
nCellsSolve, &
- nIceLayers, &
- nSnowLayers, &
nCategories
integer :: &
@@ -881,8 +879,6 @@ subroutine init_column_thermodynamic_tracers(domain)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
- call MPAS_pool_get_dimension(mesh, "nIceLayers", nIceLayers)
- call MPAS_pool_get_dimension(mesh, "nSnowLayers", nSnowLayers)
call MPAS_pool_get_array(atmos_coupling, "airTemperature", airTemperature)
@@ -904,8 +900,6 @@ subroutine init_column_thermodynamic_tracers(domain)
initialSalinityProfile(:,iCell), &
initialMeltingTemperatureProfile(:,iCell), &
surfaceTemperature(1,iCategory,iCell), &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy(:,iCategory,iCell), &
snowEnthalpy(:,iCategory,iCell))
@@ -1023,7 +1017,8 @@ subroutine seaice_icepack_predynamics_time_integration(domain, clock)
config_use_column_biogeochemistry, &
config_use_column_itd_thermodynamics, &
config_calc_surface_temperature, &
- config_use_vertical_tracers
+ config_use_vertical_tracers, &
+ config_use_zaerosols
real(kind=RKIND), pointer :: &
config_dt
@@ -1036,6 +1031,7 @@ subroutine seaice_icepack_predynamics_time_integration(domain, clock)
call MPAS_pool_get_config(domain % configs, "config_use_column_vertical_thermodynamics", &
config_use_column_vertical_thermodynamics)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(domain % configs, "config_use_column_itd_thermodynamics", config_use_column_itd_thermodynamics)
call MPAS_pool_get_config(domain % configs, "config_calc_surface_temperature", config_calc_surface_temperature)
call MPAS_pool_get_config(domain % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
@@ -1065,7 +1061,7 @@ subroutine seaice_icepack_predynamics_time_integration(domain, clock)
!-----------------------------------------------------------------
call mpas_timer_start("Column biogeochemistry")
- if (config_use_column_biogeochemistry) &
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) &
call column_biogeochemistry(domain)
call mpas_timer_stop("Column biogeochemistry")
@@ -1252,7 +1248,8 @@ end subroutine seaice_icepack_postdynamics_time_integration
subroutine column_vertical_thermodynamics(domain, clock)
use icepack_intfc, only: &
- icepack_step_therm1
+ icepack_step_therm1, &
+ icepack_warnings_clear
use seaice_constants, only: &
seaicePuny
@@ -1686,14 +1683,18 @@ subroutine column_vertical_thermodynamics(domain, clock)
endif
! code abort
- abortFlag = .false.
- abortMessage = ""
+ !abortFlag = .false.
+ !abortMessage = ""
- !$omp parallel do default(shared) private(iCategory,iAerosol,northernHemisphereMask,&
- !$omp& abortMessage) firstprivate(specificSnowAerosol,specificIceAerosol) &
- !$omp& reduction(.or.:abortFlag)
+ !$offomp parallel do default(shared) private(iCategory,iAerosol,northernHemisphereMask,&
+ !$offomp& abortMessage) firstprivate(specificSnowAerosol,specificIceAerosol)
+ !$offomp& reduction(.or.:abortFlag)
do iCell = 1, nCellsSolve
+ ! code abort
+ abortFlag = .false.
+ abortMessage = ""
+
! initial state values
iceAreaCellInitial(iCell) = iceAreaCell(iCell)
@@ -1733,11 +1734,9 @@ subroutine column_vertical_thermodynamics(domain, clock)
northernHemisphereMask = .false.
endif
+ call icepack_warnings_clear()
call icepack_step_therm1(&
dt=config_dt, &
- ncat=nCategories, &
- nilyr=nIceLayers, &
- nslyr=nSnowLayers, &
aicen_init=iceAreaCategoryInitial(:,iCell), &
vicen_init=iceVolumeCategoryInitial(:,iCell), &
vsnon_init=snowVolumeCategoryInitial(:,iCell), &
@@ -1867,6 +1866,7 @@ subroutine column_vertical_thermodynamics(domain, clock)
frz_onset=freezeOnset(iCell), &
yday=dayOfYear, &
prescribed_ice=config_use_prescribed_ice)
+
abortFlag = icepack_warnings_aborted()
call seaice_icepack_write_warnings(abortFlag)
@@ -2055,7 +2055,6 @@ subroutine column_vertical_thermodynamics(domain, clock)
enddo ! iCategory
endif
-
enddo ! iCell
! error-checking
@@ -2088,6 +2087,9 @@ subroutine column_itd_thermodynamics(domain, clock)
use icepack_intfc, only: &
icepack_step_therm2
+ use seaice_constants, only: &
+ seaicePuny
+
type(domain_type), intent(inout) :: domain
type(MPAS_clock_type), intent(in) :: clock
@@ -2117,7 +2119,8 @@ subroutine column_itd_thermodynamics(domain, clock)
logical, pointer :: &
config_update_ocean_fluxes, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
! dimensions
integer, pointer :: &
@@ -2149,9 +2152,6 @@ subroutine column_itd_thermodynamics(domain, clock)
oceanHeatFlux, &
freezeOnset, &
categoryThicknessLimits, &
- biologyGrid, &
- verticalGrid, &
- interfaceBiologyGrid, &
frazilGrowthDiagnostic
! frazilGrowthDiagnostic, &
! WaveFrequency, &
@@ -2166,6 +2166,7 @@ subroutine column_itd_thermodynamics(domain, clock)
oceanAerosolFlux, &
oceanBioFluxes, &
oceanBioConcentrations, &
+ oceanBioConcentrationsInUse, &
initialSalinityProfile
! WaveSpectra, &
! DFloeSizeNewIce, &
@@ -2194,21 +2195,8 @@ subroutine column_itd_thermodynamics(domain, clock)
iBioData, &
iBioLayers
- ! test carbon conservation
- real(kind=RKIND), dimension(:), allocatable :: &
- totalCarbonCatFinal, &
- totalCarbonCatInitial, &
- oceanBioFluxesTemp, &
- verticalGridSpace
-
- real(kind=RKIND) :: &
- oceanCarbonFlux, &
- totalCarbonFinal, &
- totalCarbonInitial, &
- carbonError
-
- real(kind=RKIND), dimension(:), allocatable :: &
- oceanBioConcentrationsUsed
+ real(kind=RKIND), dimension(:,:), allocatable :: &
+ oceanBioFluxesTemp
logical, dimension(:), allocatable :: &
newlyFormedIceLogical
@@ -2216,8 +2204,7 @@ subroutine column_itd_thermodynamics(domain, clock)
logical :: &
abortFlag, &
setGetPhysicsTracers, &
- setGetBGCTracers, &
- checkCarbon
+ setGetBGCTracers
character(len=strKIND) :: &
abortMessage, &
@@ -2229,8 +2216,6 @@ subroutine column_itd_thermodynamics(domain, clock)
! day of year
call get_day_of_year(clock, dayOfYear)
- checkCarbon = .false.
-
block => domain % blocklist
do while (associated(block))
@@ -2253,6 +2238,7 @@ subroutine column_itd_thermodynamics(domain, clock)
call MPAS_pool_get_config(block % configs, "config_dt", config_dt)
call MPAS_pool_get_config(block % configs, "config_update_ocean_fluxes", config_update_ocean_fluxes)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
@@ -2313,9 +2299,7 @@ subroutine column_itd_thermodynamics(domain, clock)
call MPAS_pool_get_array(biogeochemistry, "newlyFormedIce", newlyFormedIce)
call MPAS_pool_get_array(biogeochemistry, "oceanBioFluxes", oceanBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "oceanBioConcentrations", oceanBioConcentrations)
- call MPAS_pool_get_array(biogeochemistry, "biologyGrid", biologyGrid)
- call MPAS_pool_get_array(biogeochemistry, "verticalGrid", verticalGrid)
- call MPAS_pool_get_array(biogeochemistry, "interfaceBiologyGrid", interfaceBiologyGrid)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBioConcentrationsInUse", oceanBioConcentrationsInUse)
call MPAS_pool_get_array(initial, "initialSalinityProfile", initialSalinityProfile)
call MPAS_pool_get_array(initial, "categoryThicknessLimits", categoryThicknessLimits)
@@ -2324,29 +2308,21 @@ subroutine column_itd_thermodynamics(domain, clock)
! newly formed ice
allocate(newlyFormedIceLogical(nCategories))
- allocate(oceanBioConcentrationsUsed(ciceTracerObject % nBioTracers))
- allocate(oceanBioFluxesTemp(ciceTracerObject % nBioTracers))
- allocate(verticalGridSpace(nBioLayersP1))
- if (checkCarbon) then
- allocate(totalCarbonCatFinal(nCategories))
- allocate(totalCarbonCatInitial(nCategories))
- endif
-
- verticalGridSpace(:) = 1.0_RKIND/real(nBioLayers,kind=RKIND)
- verticalGridSpace(1) = verticalGridSpace(1)/2.0_RKIND
- verticalGridSpace(nBioLayersP1) = verticalGridSpace(1)
-
+ allocate(oceanBioFluxesTemp(ciceTracerObject % nBioTracers,nCellsSolve))
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
+ oceanBioConcentrationsInUse(:,:) = 0.0_RKIND
! code abort
abortFlag = .false.
abortMessage = ""
- !$omp parallel do default(shared) private(iCategory,iBioTracers,iBioData,&
- !$omp& totalCarbonInitial,abortMessage,oceanBioFluxesTemp,totalCarbonFinal,&
- !$omp& carbonError) firstprivate(newlyFormedIceLogical,oceanBioConcentrationsUsed) &
- !$omp& reduction(.or.:abortFlag)
+ !$offomp parallel do default(shared) private(iCategory,iBioTracers,iBioData,&
+ !$offomp& totalCarbonInitial,abortMessage,oceanBioFluxesTemp,totalCarbonFinal,&
+ !$offomp& totalCarbonCatInitial, totalCarbonCatFinal, &
+ !$offomp& oceanCarbonFlux, carbonError) &
+ !$offomp& firstprivate(newlyFormedIceLogical) &
+ !$offomp& reduction(.or.:abortFlag)
do iCell = 1, nCellsSolve
! newly formed ice
@@ -2357,22 +2333,14 @@ subroutine column_itd_thermodynamics(domain, clock)
! read the required ocean concentration fields into the allocated array
do iBioTracers = 1, ciceTracerObject % nBioTracers
iBioData = ciceTracerObject % index_LayerIndexToDataArray(iBioTracers)
- oceanBioConcentrationsUsed(iBioTracers) = oceanBioConcentrations(iBioData, iCell)
+ oceanBioConcentrationsInUse(iBioTracers, iCell) = oceanBioConcentrations(iBioData, iCell)
enddo ! iBioTracers
! set the category tracer array
call set_cice_tracer_array_category(block, ciceTracerObject,&
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
- if (checkCarbon) then
- totalCarbonInitial = 0.0_RKIND
- call seaice_total_carbon_content_category(block,totalCarbonCatInitial,iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
- do iCategory = 1,nCategories
- totalCarbonInitial = totalCarbonInitial + totalCarbonCatInitial(iCategory)*iceAreaCategory(1,iCategory,iCell)
- enddo
- endif
-
- oceanBioFluxesTemp(:) = 0.0_RKIND
+ oceanBioFluxesTemp(:,iCell) = 0.0_RKIND
! CICE calculates the Sig Wave Height from the wave spectrum as follows before step therm2:
! we will use the Sig Wave Height from WW3, but could use this for testing without WW3
@@ -2380,12 +2348,7 @@ subroutine column_itd_thermodynamics(domain, clock)
call icepack_step_therm2(&
dt=config_dt, &
- ncat=nCategories, &
- nltrcr=ciceTracerObject % nBioTracers, & ! CHECK/FIX for BGC
- nilyr=nIcelayers, &
- nslyr=nSnowLayers, &
hin_max=categoryThicknessLimits(:), &
- nblyr=nBioLayers, &
aicen=iceAreaCategory(1,:,iCell), &
vicen=iceVolumeCategory(1,:,iCell), &
vsnon=snowVolumeCategory(1,:,iCell), &
@@ -2412,13 +2375,10 @@ subroutine column_itd_thermodynamics(domain, clock)
fresh=oceanFreshWaterFlux(iCell), &
fsalt=oceanSaltFlux(iCell), &
fhocn=oceanHeatFlux(iCell), &
- bgrid=biologyGrid(:), &
- cgrid=verticalGrid(:), &
- igrid=interfaceBiologyGrid(:), &
faero_ocn=oceanAerosolFlux(:,iCell), &
first_ice=newlyFormedIceLogical(:), &
- flux_bio=oceanBioFluxesTemp(:), &
- ocean_bio=oceanBioConcentrationsUsed(:), &
+ flux_bio=oceanBioFluxesTemp(:,iCell), &
+ ocean_bio=oceanBioConcentrationsInUse(:,iCell), &
frazil_diag=frazilGrowthDiagnostic(iCell), &
frz_onset=freezeOnset(iCell), & ! optional
yday=dayOfYear) ! optional
@@ -2436,11 +2396,12 @@ subroutine column_itd_thermodynamics(domain, clock)
! d_afsd_newi=DFloeSizeNewIce(:,iCell), &
! d_afsd_latm=DFloeSizeLateralMelt(:,iCell), &
! d_afsd_weld=DFloeSizeWeld(:,iCell), &
-! floe_rad_c=FloeSizeBinCenter(:), &
+! floe_rad_c=FloeSizeBinCenter(:), &
! floe_binwidth=FloeSizeBinWidth(:))
- abortFlag = icepack_warnings_aborted()
- call seaice_icepack_write_warnings(abortFlag)
+ do iBioTracers = 1, ciceTracerObject % nBioTracers
+ oceanBioFluxes(iBioTracers,iCell) = oceanBioFluxes(iBioTracers,iCell) + oceanBioFluxesTemp(iBioTracers,iCell)
+ enddo
! update
do iCategory = 1, nCategories
@@ -2452,36 +2413,13 @@ subroutine column_itd_thermodynamics(domain, clock)
call get_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
- if (checkCarbon) then
- totalCarbonFinal = 0.0_RKIND
- call seaice_total_carbon_content_category(block,totalCarbonCatFinal,iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
- call seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux,oceanBioFluxesTemp,iCell)
- do iCategory = 1,nCategories
- totalCarbonFinal = totalCarbonFinal + totalCarbonCatFinal(iCategory)*iceAreaCategory(1,iCategory,iCell)
- enddo
- carbonError = totalCarbonInitial - oceanCarbonFlux*config_dt - totalCarbonFinal
-
- if (abs(carbonError) > 1.0e-14_RKIND*MAXVAL((/totalCarbonInitial,totalCarbonFinal/))) then
- call mpas_log_write("column_step_therm2, carbon conservation error", messageType=MPAS_LOG_ERR)
- call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
- call mpas_log_write("carbonError: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError/))
- call mpas_log_write("totalCarbonInitial: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonInitial/))
- call mpas_log_write("totalCarbonFinal: $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonFinal/))
- call mpas_log_write("oceanCarbonFlux: $r", messageType=MPAS_LOG_ERR, realArgs=(/oceanCarbonFlux/))
-
- do iCategory = 1, nCategories
- call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
- call mpas_log_write("totalCarbonCatFinal(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory)/))
- call mpas_log_write("totalCarbonCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory)/))
- enddo
- endif
- endif
-
+ abortFlag = icepack_warnings_aborted()
! cell-specific abort message
if (abortFlag) then
call mpas_log_write("column_itd_thermodynamics: "//trim(abortMessage) , messageType=MPAS_LOG_ERR)
call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
endif
+ call seaice_icepack_write_warnings(abortFlag)
enddo ! iCell
@@ -2489,16 +2427,9 @@ subroutine column_itd_thermodynamics(domain, clock)
call seaice_critical_error_write_block(domain, block, abortFlag)
call seaice_check_critical_error(domain, abortFlag)
- if (checkCarbon) then
- deallocate(totalCarbonCatFinal)
- deallocate(totalCarbonCatInitial)
- endif
-
! newly formed ice
deallocate(newlyFormedIceLogical)
- deallocate(oceanBioConcentrationsUsed)
deallocate(oceanBioFluxesTemp)
- deallocate(verticalGridSpace)
block => block % next
end do
@@ -2816,9 +2747,6 @@ subroutine column_snow(domain)
call icepack_step_snow (&
dt=config_dt, &
wind=windSpeed(iCell), &
- nilyr=nIceLayers, &
- nslyr=nSnowLayers, &
- ncat=nCategories, &
aice=iceAreaCell(iCell), &
aicen=iceAreaCategory(1,:,iCell), &
vicen=iceVolumeCategory(1,:,iCell), &
@@ -2915,7 +2843,8 @@ subroutine column_radiation(domain, clock, lInitialization)
config_use_shortwave_bioabsorption, &
config_use_brine, &
config_use_modal_aerosols, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
! dimensions
integer, pointer :: &
@@ -2938,9 +2867,7 @@ subroutine column_radiation(domain, clock, lInitialization)
shortwaveIRDirectDown, &
shortwaveIRDiffuseDown, &
solarZenithAngleCosine, &
- snowfallRate, &
- verticalShortwaveGrid, &
- verticalGrid
+ snowfallRate
real(kind=RKIND), dimension(:,:), pointer :: &
surfaceShortwaveFlux, &
@@ -2980,7 +2907,9 @@ subroutine column_radiation(domain, clock, lInitialization)
iceBodyAerosol, &
brineFraction, &
bioTracerShortwave, &
- snowGrainRadius
+ snowGrainRadius, &
+ verticalAerosolsConc, &
+ verticalAlgaeConc
real(kind=RKIND), pointer :: &
dayOfNextShortwaveCalculation ! needed for CESM like coupled simulations
@@ -3004,11 +2933,6 @@ subroutine column_radiation(domain, clock, lInitialization)
iAerosol, &
iBioTracers
- integer, dimension(:), allocatable :: &
- index_shortwaveAerosol, &
- index_verticalAerosolsConc, &
- index_algaeConc
-
real(kind=RKIND) :: &
dayOfYear, &
lonCellColumn
@@ -3035,6 +2959,7 @@ subroutine column_radiation(domain, clock, lInitialization)
call MPAS_pool_get_config(domain % configs, "config_use_shortwave_bioabsorption", config_use_shortwave_bioabsorption)
call MPAS_pool_get_config(domain % configs, "config_use_modal_aerosols",config_use_modal_aerosols)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry",config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols",config_use_zaerosols)
block => domain % blocklist
do while (associated(block))
@@ -3048,11 +2973,11 @@ subroutine column_radiation(domain, clock, lInitialization)
call MPAS_pool_get_config(block % configs, "config_dt", config_dt)
- call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
- call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
- call MPAS_pool_get_dimension(mesh, "nIceLayers", nIceLayers)
- call MPAS_pool_get_dimension(mesh, "nSnowLayers", nSnowLayers)
- call MPAS_pool_get_dimension(mesh, "nAerosols", nAerosols)
+ call MPAS_pool_get_dimension(block % dimensions, "nCellsSolve", nCellsSolve)
+ call MPAS_pool_get_dimension(block % dimensions, "nCategories", nCategories)
+ call MPAS_pool_get_dimension(block % dimensions, "nIceLayers", nIceLayers)
+ call MPAS_pool_get_dimension(block % dimensions, "nSnowLayers", nSnowLayers)
+ call MPAS_pool_get_dimension(block % dimensions, "nAerosols", nAerosols)
call MPAS_pool_get_dimension(block % dimensions, "nAlgae", nAlgae)
call MPAS_pool_get_dimension(block % dimensions, "nBioLayers", nBioLayers)
call MPAS_pool_get_dimension(block % dimensions, "nzAerosols", nzAerosols)
@@ -3075,6 +3000,8 @@ subroutine column_radiation(domain, clock, lInitialization)
call MPAS_pool_get_array(tracers, "iceBodyAerosol", iceBodyAerosol, 1)
call MPAS_pool_get_array(tracers, "brineFraction", brineFraction, 1)
call MPAS_pool_get_array(tracers, "snowGrainRadius", snowGrainRadius, 1)
+ call MPAS_pool_get_array(tracers, "verticalAlgaeConc", verticalAlgaeConc, 1)
+ call MPAS_pool_get_array(tracers, "verticalAerosolsConc", verticalAerosolsConc, 1)
call MPAS_pool_get_array(atmos_coupling, "shortwaveVisibleDirectDown", shortwaveVisibleDirectDown)
call MPAS_pool_get_array(atmos_coupling, "shortwaveVisibleDiffuseDown", shortwaveVisibleDiffuseDown)
@@ -3108,8 +3035,6 @@ subroutine column_radiation(domain, clock, lInitialization)
call MPAS_pool_get_array(ponds, "pondLidMeltFluxFraction", pondLidMeltFluxFraction)
call MPAS_pool_get_array(biogeochemistry, "bioTracerShortwave", bioTracerShortwave)
- call MPAS_pool_get_array(biogeochemistry, "verticalShortwaveGrid", verticalShortwaveGrid)
- call MPAS_pool_get_array(biogeochemistry, "verticalGrid", verticalGrid)
! calendar type
call MPAS_pool_get_config(block % configs, "config_calendar_type", config_calendar_type)
@@ -3122,32 +3047,16 @@ subroutine column_radiation(domain, clock, lInitialization)
! aerosols array
allocate(aerosolsArray(4*nAerosols,nCategories))
- allocate(index_shortwaveAerosol(maxAerosolType))
- allocate(index_verticalAerosolsConc(maxAerosolType))
- allocate(index_algaeConc(nAlgae))
- if (.not. config_use_column_biogeochemistry) then
- index_shortwaveAerosol(1:maxAerosolType) = 1
- index_verticalAerosolsConc(1:maxAerosolType) = 1
- index_algaeConc(1:nAlgae) = 1
- else
- do iAerosol = 1, maxAerosolType
- index_shortwaveAerosol(iAerosol) = ciceTracerObject % index_verticalAerosolsConcShortwave(iAerosol)
- index_verticalAerosolsConc(iAerosol) = ciceTracerObject % index_verticalAerosolsConc(iAerosol)
- enddo
- do iBioTracers = 1, nAlgae
- index_algaeConc(iBioTracers) = ciceTracerObject % index_algaeConc(iBioTracers)
- enddo
- endif
-
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
! snow grain radius array
allocate(snow_grain_radius(nSnowLayers,nCategories))
!$omp parallel do default(shared) &
- !$omp& firstprivate(aerosolsArray,index_shortwaveAerosol,snow_grain_radius) &
+ !$omp& firstprivate(aerosolsArray,snow_grain_radius) &
!$omp& private(iCategory,iAerosol,lonCellColumn,iSnowLayer)
+
do iCell = 1, nCellsSolve
! set aerosols array
@@ -3163,7 +3072,7 @@ subroutine column_radiation(domain, clock, lInitialization)
enddo ! iCategory
snow_grain_radius(:,:) = 0.0_RKIND
- if (config_use_snow_grain_radius) then
+ if (config_use_snow_grain_radius) then
do iCategory = 1, nCategories
do iSnowLayer = 1, nSnowLayers
snow_grain_radius(iSnowLayer, iCategory) = snowGrainRadius(iSnowLayer,iCategory,iCell)
@@ -3174,14 +3083,8 @@ subroutine column_radiation(domain, clock, lInitialization)
lonCellColumn = lonCell(iCell)
if (lonCellColumn > seaicePi) lonCellColumn = lonCellColumn - 2.0_RKIND * seaicePi
- ! set the category tracer array
- call set_cice_tracer_array_category(block, ciceTracerObject, &
- tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
-
call icepack_step_radiation(&
dt=config_dt, &
- swgrid=verticalShortwaveGrid(:), &
- igrid=verticalGrid(:), &
fbri=brineFraction(1,:,iCell), &
aicen=iceAreaCategory(1,:,iCell), &
vicen=iceVolumeCategory(1,:,iCell), &
@@ -3192,8 +3095,8 @@ subroutine column_radiation(domain, clock, lInitialization)
hpndn=pondDepth(1,:,iCell), &
ipndn=pondLidThickness(1,:,iCell), &
aeron=aerosolsArray, &
- bgcNn=tracerArrayCategory(index_algaeConc(:),:), &
- zaeron=tracerArrayCategory(index_verticalAerosolsConc(:),:), &
+ bgcNn=verticalAlgaeConc(:,:,iCell), &
+ zaeron=verticalAerosolsConc(:,:,iCell), &
trcrn_bgcsw=bioTracerShortwave(:,:,iCell), &
TLAT=latCell(iCell), &
TLON=lonCellColumn, &
@@ -3233,19 +3136,12 @@ subroutine column_radiation(domain, clock, lInitialization)
l_print_point=.false., &
initonly=lInitialization)
- ! set the category tracer array
- call get_cice_tracer_array_category(block, ciceTracerObject, &
- tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
-
enddo ! iCell
deallocate(snow_grain_radius)
! aerosols array
deallocate(aerosolsArray)
- deallocate(index_shortwaveAerosol)
- deallocate(index_verticalAerosolsConc)
- deallocate(index_algaeConc)
block => block % next
end do
@@ -3271,6 +3167,9 @@ subroutine column_ridging(domain)
use icepack_intfc, only: &
icepack_step_ridge
+ use seaice_constants, only: &
+ seaicePuny
+
type(domain_type), intent(inout) :: domain
type(block_type), pointer :: block
@@ -3291,7 +3190,8 @@ subroutine column_ridging(domain)
! configs
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), pointer :: &
config_dt
@@ -3302,11 +3202,7 @@ subroutine column_ridging(domain)
! dimensions
integer, pointer :: &
nCellsSolve, &
- nCategories, &
- nIceLayers, &
- nSnowLayers, &
- nAerosols, &
- nBioLayers
+ nCategories
! variables
real(kind=RKIND), dimension(:), pointer :: &
@@ -3355,7 +3251,13 @@ subroutine column_ridging(domain)
! local
integer :: &
iCell, &
- iCategory
+ iCategory, &
+ iBioTracers, &
+ iBioData, &
+ iBioLayers
+
+ real(kind=RKIND), dimension(:,:), allocatable :: &
+ oceanBioFluxesTemp
logical, dimension(:), allocatable :: &
newlyFormedIceLogical
@@ -3382,15 +3284,13 @@ subroutine column_ridging(domain)
call MPAS_pool_get_config(block % configs, "config_dynamics_subcycle_number", config_dynamics_subcycle_number)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(block % configs, "config_dt", config_dt)
call MPAS_pool_get_array(velocity_solver, "dynamicsTimeStep", dynamicsTimeStep)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
- call MPAS_pool_get_dimension(mesh, "nIceLayers", nIceLayers)
- call MPAS_pool_get_dimension(mesh, "nSnowLayers", nSnowLayers)
- call MPAS_pool_get_dimension(mesh, "nAerosols", nAerosols)
- call MPAS_pool_get_dimension(block % dimensions, "nBioLayers", nBioLayers)
call MPAS_pool_get_array(mesh, "indexToCellID", indexToCellID)
@@ -3437,7 +3337,9 @@ subroutine column_ridging(domain)
allocate(newlyFormedIceLogical(nCategories))
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
+
+ allocate(oceanBioFluxesTemp(ciceTracerObject % nBioTracers,nCellsSolve))
do iCell = 1, nCellsSolve
@@ -3450,13 +3352,11 @@ subroutine column_ridging(domain)
call set_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
+ oceanBioFluxesTemp(:,iCell) = 0.0_RKIND
+
call icepack_step_ridge(&
dt=dynamicsTimeStep, &
ndtd=config_dynamics_subcycle_number, &
- nilyr=nIceLayers, &
- nslyr=nSnowLayers, &
- nblyr=nBioLayers, &
- ncat=nCategories, &
hin_max=categoryThicknessLimits, & ! hin_max, dimension(0:ncat), intent(inout)
rdg_conv=ridgeConvergence(iCell), &
rdg_shear=ridgeShear(iCell), &
@@ -3476,7 +3376,6 @@ subroutine column_ridging(domain)
fpond=pondFreshWaterFlux(iCell), &
fresh=oceanFreshWaterFlux(iCell), &
fhocn=oceanHeatFlux(iCell), &
- n_aero=nAerosols, &
faero_ocn=oceanAerosolFlux(:,iCell), & ! DC no fiso_ocn argument
aparticn=ridgeParticipationFunction(:,iCell), &
krdgn=ratioRidgeThicknessToIce(:,iCell), &
@@ -3490,7 +3389,7 @@ subroutine column_ridging(domain)
aice=iceAreaCell(iCell), &
fsalt=oceanSaltFlux(iCell), &
first_ice=newlyFormedIceLogical(:), &
- flux_bio=oceanBioFluxes(:,iCell), & ! DC no closing argument
+ flux_bio=oceanBioFluxesTemp(:,iCell), &
Tf=seaFreezingTemperature(iCell))
! update
@@ -3499,16 +3398,20 @@ subroutine column_ridging(domain)
if (newlyFormedIceLogical(iCategory)) newlyFormedIce(iCategory,iCell) = 1
enddo ! iCategory
+ do iBioTracers = 1, ciceTracerObject % nBioTracers
+ oceanBioFluxes(iBioTracers,iCell) = oceanBioFluxes(iBioTracers,iCell) + oceanBioFluxesTemp(iBioTracers,iCell)
+ enddo
+
! get category tracer array
call get_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
+ call seaice_icepack_write_warnings(icepack_warnings_aborted())
enddo ! iCell
- call seaice_icepack_write_warnings(icepack_warnings_aborted())
-
! newly formed ice
deallocate(newlyFormedIceLogical)
+ deallocate(oceanBioFluxesTemp)
block => block % next
end do
@@ -3529,13 +3432,15 @@ end subroutine column_ridging
subroutine column_biogeochemistry(domain)
- use ice_colpkg, only: &
- colpkg_biogeochemistry, &
- colpkg_init_OceanConcArray, &
- colpkg_clear_warnings
+ use icepack_intfc, only: &
+ icepack_biogeochemistry, &
+ icepack_load_ocean_bio_array, &
+ icepack_warnings_clear
use seaice_constants, only: &
- seaicePuny
+ seaicePuny, &
+ microgramsPerKilograms, &
+ gramsIronPerMolIron
type(domain_type), intent(inout) :: domain
@@ -3551,6 +3456,7 @@ subroutine column_biogeochemistry(domain)
melt_growth_rates, &
ocean_coupling, &
atmos_coupling, &
+ atmos_forcing, &
initial
! configs
@@ -3562,29 +3468,17 @@ subroutine column_biogeochemistry(domain)
config_use_skeletal_biochemistry, &
config_use_column_biogeochemistry, &
config_use_zaerosols, &
- config_use_vertical_tracers
+ config_use_vertical_tracers, &
+ config_use_atm_dust_file, &
+ config_use_iron_solubility_file
! dimensions
integer, pointer :: &
nCellsSolve, &
nCategories, &
- nIceLayers, &
- nSnowLayers, &
nzAerosols, &
- nBioLayers, &
nBioLayersP1, &
nAlgae, &
- nDOC, &
- nDIC, &
- nDON, &
- nParticulateIron, &
- nDissolvedIron, &
- nZBGCTracers, &
- maxAlgaeType, &
- maxDOCType, &
- maxDICType, &
- maxDONType, &
- maxIronType, &
maxBCType, &
maxDustType, &
maxAerosolType
@@ -3592,24 +3486,15 @@ subroutine column_biogeochemistry(domain)
! variables
real(kind=RKIND), dimension(:), pointer :: &
- rayleighCriteriaReal, &
netNitrateUptake, &
netAmmoniumUptake, &
- totalVerticalSalinity, &
netSpecificAlgalGrowthRate, &
primaryProduction, &
netBrineHeight, &
- biologyGrid, &
- interfaceBiologyGrid, &
- interfaceGrid, &
- verticalGrid, &
seaSurfaceTemperature, &
seaSurfaceSalinity, &
seaFreezingTemperature, &
snowfallRate, &
- zSalinityFlux, & !echmod deprecate
- zSalinityGDFlux, & !echmod deprecate
- oceanMixedLayerDepth, &
totalSkeletalAlgae, &
oceanNitrateConc, &
oceanSilicateConc, &
@@ -3618,7 +3503,10 @@ subroutine column_biogeochemistry(domain)
oceanDMSPConc, &
oceanHumicsConc, &
openWaterArea, &
- totalChlorophyll
+ totalChlorophyll, &
+ IRON_Zolubility_wet, &
+ IRON_Zolubility_dry, &
+ IRON_in_duzt_fraction
real(kind=RKIND), dimension(:,:), pointer :: &
iceAreaCategoryInitial, &
@@ -3631,10 +3519,11 @@ subroutine column_biogeochemistry(domain)
snowIceBioFluxes, &
atmosIceBioFluxes, &
oceanBioConcentrations, &
+ oceanBioConcentrationsInUse, &
+ oceanBioToIceInUse, &
totalVerticalBiologyIce, &
totalVerticalBiologySnow, &
penetratingShortwaveFlux, &
- zSalinityIceDensity, & !echmod deprecate
basalIceMeltCategory, &
surfaceIceMeltCategory, &
congelationCategory, &
@@ -3644,6 +3533,8 @@ subroutine column_biogeochemistry(domain)
atmosBioFluxes, &
atmosBlackCarbonFlux, &
atmosDustFlux, &
+ atmosWetDustFlux, &
+ atmosDryDustFlux, &
oceanBioFluxes, &
oceanAlgaeConc, &
oceanDOCConc, &
@@ -3692,10 +3583,12 @@ subroutine column_biogeochemistry(domain)
iSnowCount, &
iIceCount, &
indexj, &
- iBioLayers
+ iBioLayers, &
+ iWarning, &
+ nWarnings
! test carbon conservation
- real(kind=RKIND), dimension(:), allocatable :: &
+ real(kind=RKIND), dimension(:,:), allocatable :: &
totalCarbonCatFinal, &
totalCarbonCatInitial, &
totalCarbonCatFlux, &
@@ -3703,19 +3596,18 @@ subroutine column_biogeochemistry(domain)
brineHeightCatFinal
real(kind=RKIND), dimension(:), allocatable :: &
- oceanBioConcentrationsUsed, &
- iceCarbonInitialCategory, &
- iceCarbonFinalCategory, &
- iceCarbonFluxCategory, &
- iceBrineInitialCategory, &
- iceBrineFinalCategory
+ totalCarbonFinal, &
+ totalCarbonInitial, &
+ totalCarbonFlux
+
+ real(kind=RKIND) :: &
+ errorCheck
logical, dimension(:), allocatable :: &
newlyFormedIceLogical
logical :: &
abortFlag, &
- rayleighCriteria, &
setGetPhysicsTracers, &
setGetBGCTracers, &
checkCarbon
@@ -3724,12 +3616,11 @@ subroutine column_biogeochemistry(domain)
abortMessage, &
abortLocation
- real(kind=RKIND) :: &
- carbonErrorCat, &
- carbonErrorColumnPackage
+ real(kind=RKIND), dimension(:), allocatable :: &
+ carbonError
real(kind=RKIND), parameter :: &
- accuracy = 1.0e-14_RKIND
+ accuracy = 1.0e-13_RKIND
! test carbon conservation
checkCarbon = .false.
@@ -3744,30 +3635,16 @@ subroutine column_biogeochemistry(domain)
call MPAS_pool_get_subpool(block % structs, "diagnostics_biogeochemistry", diagnostics_biogeochemistry)
call MPAS_pool_get_subpool(block % structs, "shortwave", shortwave)
call MPAS_pool_get_subpool(block % structs, "atmos_coupling", atmos_coupling)
+ call MPAS_pool_get_subpool(block % structs, "atmos_forcing", atmos_forcing)
call MPAS_pool_get_subpool(block % structs, "melt_growth_rates", melt_growth_rates)
call MPAS_pool_get_subpool(block % structs, "ocean_coupling", ocean_coupling)
call MPAS_pool_get_subpool(block % structs, "initial", initial)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
- call MPAS_pool_get_dimension(mesh, "nIceLayers", nIceLayers)
- call MPAS_pool_get_dimension(mesh, "nSnowLayers", nSnowLayers)
call MPAS_pool_get_dimension(mesh, "nzAerosols", nzAerosols)
- call MPAS_pool_get_dimension(mesh, "nBioLayers", nBioLayers)
call MPAS_pool_get_dimension(mesh, "nBioLayersP1", nBioLayersP1)
call MPAS_pool_get_dimension(mesh, "nAlgae", nAlgae)
- call MPAS_pool_get_dimension(mesh, "nDOC", nDOC)
- call MPAS_pool_get_dimension(mesh, "nDIC", nDIC)
- call MPAS_pool_get_dimension(mesh, "nDON", nDON)
- call MPAS_pool_get_dimension(mesh, "nParticulateIron", nParticulateIron)
- call MPAS_pool_get_dimension(mesh, "nDissolvedIron", nDissolvedIron)
- call MPAS_pool_get_dimension(mesh, "nZBGCTracers", nZBGCTracers)
- call MPAS_pool_get_dimension(mesh, "maxAlgaeType", maxAlgaeType)
- call MPAS_pool_get_dimension(mesh, "maxDOCType", maxDOCType)
- call MPAS_pool_get_dimension(mesh, "maxDICType", maxDICType)
- call MPAS_pool_get_dimension(mesh, "maxDONType", maxDONType)
- call MPAS_pool_get_dimension(mesh, "maxAerosolType", maxAerosolType)
- call MPAS_pool_get_dimension(mesh, "maxIronType", maxIronType)
call MPAS_pool_get_dimension(mesh, "maxBCType", maxBCType)
call MPAS_pool_get_dimension(mesh, "maxDustType", maxDustType)
@@ -3779,11 +3656,12 @@ subroutine column_biogeochemistry(domain)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
call MPAS_pool_get_config(block % configs, "config_use_zaerosols",config_use_zaerosols)
call MPAS_pool_get_config(block % configs, "config_use_vertical_tracers",config_use_vertical_tracers)
+ call MPAS_pool_get_config(block % configs, "config_use_atm_dust_file", config_use_atm_dust_file)
+ call MPAS_pool_get_config(block % configs, "config_use_iron_solubility_file", config_use_iron_solubility_file)
call MPAS_pool_get_array(biogeochemistry, "newlyFormedIce", newlyFormedIce)
call MPAS_pool_get_array(biogeochemistry, "netNitrateUptake", netNitrateUptake)
call MPAS_pool_get_array(biogeochemistry, "netAmmoniumUptake", netAmmoniumUptake)
- call MPAS_pool_get_array(biogeochemistry, "totalVerticalSalinity", totalVerticalSalinity)
call MPAS_pool_get_array(biogeochemistry, "totalChlorophyll", totalChlorophyll)
call MPAS_pool_get_array(biogeochemistry, "netSpecificAlgalGrowthRate", netSpecificAlgalGrowthRate)
call MPAS_pool_get_array(biogeochemistry, "primaryProduction", primaryProduction)
@@ -3791,11 +3669,6 @@ subroutine column_biogeochemistry(domain)
call MPAS_pool_get_array(biogeochemistry, "brineBottomChange", brineBottomChange)
call MPAS_pool_get_array(biogeochemistry, "brineTopChange", brineTopChange)
call MPAS_pool_get_array(biogeochemistry, "bioPorosity", bioPorosity)
- call MPAS_pool_get_array(biogeochemistry, "rayleighCriteriaReal", rayleighCriteriaReal)
- call MPAS_pool_get_array(biogeochemistry, "biologyGrid", biologyGrid)
- call MPAS_pool_get_array(biogeochemistry, "interfaceBiologyGrid", interfaceBiologyGrid)
- call MPAS_pool_get_array(biogeochemistry, "interfaceGrid", interfaceGrid)
- call MPAS_pool_get_array(biogeochemistry, "verticalGrid", verticalGrid)
call MPAS_pool_get_array(biogeochemistry, "bioDiffusivity", bioDiffusivity)
call MPAS_pool_get_array(biogeochemistry, "bioPermeability", bioPermeability)
call MPAS_pool_get_array(biogeochemistry, "bioShortwaveFlux", bioShortwaveFlux)
@@ -3804,14 +3677,15 @@ subroutine column_biogeochemistry(domain)
call MPAS_pool_get_array(biogeochemistry, "snowIceBioFluxes", snowIceBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "atmosIceBioFluxes", atmosIceBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "oceanBioConcentrations", oceanBioConcentrations)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBioConcentrationsInUse", oceanBioConcentrationsInUse)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBioToIceInUse", oceanBioToIceInUse)
call MPAS_pool_get_array(biogeochemistry, "totalVerticalBiologyIce", totalVerticalBiologyIce)
call MPAS_pool_get_array(biogeochemistry, "totalVerticalBiologySnow", totalVerticalBiologySnow)
- call MPAS_pool_get_array(biogeochemistry, "zSalinityIceDensity", zSalinityIceDensity) !echmod deprecate
- call MPAS_pool_get_array(biogeochemistry, "zSalinityFlux", zSalinityFlux) !echmod deprecate
- call MPAS_pool_get_array(biogeochemistry, "zSalinityGDFlux", zSalinityGDFlux) !echmod deprecate
call MPAS_pool_get_array(biogeochemistry, "atmosBioFluxes", atmosBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "atmosBlackCarbonFlux", atmosBlackCarbonFlux)
call MPAS_pool_get_array(biogeochemistry, "atmosDustFlux", atmosDustFlux)
+ call MPAS_pool_get_array(biogeochemistry, "atmosWetDustFlux", atmosWetDustFlux)
+ call MPAS_pool_get_array(biogeochemistry, "atmosDryDustFlux", atmosDryDustFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanBioFluxes", oceanBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "oceanBioFluxesCategory", oceanBioFluxesCategory)
call MPAS_pool_get_array(biogeochemistry, "verticalNitrogenLosses", verticalNitrogenLosses)
@@ -3838,10 +3712,13 @@ subroutine column_biogeochemistry(domain)
call MPAS_pool_get_array(ocean_coupling, "seaSurfaceTemperature", seaSurfaceTemperature)
call MPAS_pool_get_array(ocean_coupling, "seaSurfaceSalinity", seaSurfaceSalinity)
call MPAS_pool_get_array(ocean_coupling, "seaFreezingTemperature", seaFreezingTemperature)
- call MPAS_pool_get_array(ocean_coupling, "oceanMixedLayerDepth", oceanMixedLayerDepth)
call MPAS_pool_get_array(atmos_coupling, "snowfallRate", snowfallRate)
+ call MPAS_pool_get_array(atmos_forcing, "IRON_Zolubility_wet", IRON_Zolubility_wet)
+ call MPAS_pool_get_array(atmos_forcing, "IRON_Zolubility_dry", IRON_Zolubility_dry)
+ call MPAS_pool_get_array(atmos_forcing, "IRON_in_duzt_fraction", IRON_in_duzt_fraction)
+
call MPAS_pool_get_array(icestate, "iceAreaCategoryInitial", iceAreaCategoryInitial)
call MPAS_pool_get_array(icestate, "iceVolumeCategoryInitial", iceVolumeCategoryInitial)
call MPAS_pool_get_array(icestate, "snowVolumeCategoryInitial", snowVolumeCategoryInitial)
@@ -3867,65 +3744,89 @@ subroutine column_biogeochemistry(domain)
! newly formed ice
allocate(newlyFormedIceLogical(nCategories))
- allocate(oceanBioConcentrationsUsed(ciceTracerObject % nBioTracers))
- allocate(brineHeightCatInitial(nCategories))
+ allocate(brineHeightCatInitial(nCategories,nCellsSolve))
if (checkCarbon) then
- allocate(totalCarbonCatFinal(nCategories))
- allocate(totalCarbonCatInitial(nCategories))
- allocate(totalCarbonCatFlux(nCategories))
- allocate(brineHeightCatFinal(nCategories))
+ allocate(carbonError(nCellsSolve))
+ allocate(totalCarbonCatFinal(nCategories,nCellsSolve))
+ allocate(totalCarbonCatInitial(nCategories,nCellsSolve))
+ allocate(totalCarbonCatFlux(nCategories,nCellsSolve))
+ allocate(brineHeightCatFinal(nCategories,nCellsSolve))
+ allocate(totalCarbonFinal(nCellsSolve))
+ allocate(totalCarbonInitial(nCellsSolve))
+ allocate(totalCarbonFlux(nCellsSolve))
+ else
+ allocate(carbonError(1))
+ allocate(totalCarbonCatFinal(1,1))
+ allocate(totalCarbonCatInitial(1,1))
+ allocate(totalCarbonCatFlux(1,1))
+ allocate(brineHeightCatFinal(1,1))
+ allocate(totalCarbonFinal(1))
+ allocate(totalCarbonInitial(1))
+ allocate(totalCarbonFlux(1))
endif
- setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
-
- ! code abort
- abortFlag = .false.
- abortMessage = ""
+ brineHeightCatInitial(:,:) = 0.0_RKIND
+ carbonError(:) = 0.0_RKIND
+ totalCarbonCatFinal(:,:) = 0.0_RKIND
+ totalCarbonCatInitial(:,:) = 0.0_RKIND
+ totalCarbonCatFlux(:,:) = 0.0_RKIND
+ brineHeightCatFinal(:,:) = 0.0_RKIND
+ totalCarbonFinal(:) = 0.0_RKIND
+ totalCarbonInitial(:) = 0.0_RKIND
+ totalCarbonFlux(:) = 0.0_RKIND
+ setGetPhysicsTracers = .true.
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
+
+ atmosBioFluxes(:,:) = 0.0_RKIND
+ oceanBioConcentrationsInUse(:,:) = 0.0_RKIND
+ oceanBioToIceInUse(:,:) = 0.0_RKIND
+
+ !$offomp parallel do default(shared) private(iCategory,iBioTracers,iAlgae, iBioLayers) &
+ !$offomp& firstprivate(atmosBioFluxes,atmosBlackCarbonFlux, &
+ !$offomp& totalCarbonCatInitial, totalCarbonCatFinal, &
+ !$offomp& totalCarbonInitial, totalCarbonFinal, totalCarbonFlux, &
+ !$offomp& atmosDustFlux, bioShortwaveFluxCell, newlyFormedIce)
+ !
do iCell = 1, nCellsSolve
! newly formed ice
do iCategory = 1, nCategories
newlyFormedIceLogical(iCategory) = (newlyFormedIce(iCategory,iCell) == 1)
- brineHeightCatInitial(iCategory) = brineFraction(1,iCategory,iCell) * &
+ brineHeightCatInitial(iCategory,iCell) = brineFraction(1,iCategory,iCell) * &
iceVolumeCategoryInitial(iCategory,iCell)/(iceAreaCategoryInitial(iCategory,iCell) + seaicePuny)
enddo ! iCategory
- rayleighCriteria = (rayleighCriteriaReal(iCell) > 0.5_RKIND)
!update ocean concentrations fields and atmospheric fluxes into allocated array
+
#ifdef coupled
- call colpkg_init_OceanConcArray(&
- nZBGCTracers, &
- maxAlgaeType, &
- maxDONType, &
- maxDOCType, &
- maxDICType, &
- maxAerosolType, &
- maxIronType, &
- oceanNitrateConc(iCell), &
- oceanAmmoniumConc(iCell), &
- oceanSilicateConc(iCell),&
- oceanDMSPConc(iCell), &
- oceanDMSConc(iCell), &
- oceanAlgaeConc(:,iCell), &
- oceanDOCConc(:,iCell), &
- oceanDONConc(:,iCell), &
- oceanDICConc(:,iCell), &
- oceanDissolvedIronConc(:,iCell), &
- oceanParticulateIronConc(:,iCell), &
- oceanZAerosolConc(:,iCell), &
- oceanBioConcentrations(:,iCell), &
- oceanHumicsConc(iCell))
+ call icepack_load_ocean_bio_array(&
+ nit=oceanNitrateConc(iCell), &
+ amm=oceanAmmoniumConc(iCell), &
+ sil=oceanSilicateConc(iCell), &
+ dmsp=oceanDMSPConc(iCell), &
+ dms=oceanDMSConc(iCell), &
+ algalN=oceanAlgaeConc(:,iCell), &
+ doc=oceanDOCConc(:,iCell), &
+ don=oceanDONConc(:,iCell), &
+ dic=oceanDICConc(:,iCell), &
+ fed=oceanDissolvedIronConc(:,iCell), &
+ fep=oceanParticulateIronConc(:,iCell), &
+ zaeros=oceanZAerosolConc(:,iCell), &
+ ocean_bio_all=oceanBioConcentrations(:,iCell), &
+ hum=oceanHumicsConc(iCell))
#else
do iBioTracers = 1, maxBCType
atmosBlackCarbonFlux(iBioTracers,iCell) = 1.e-12_RKIND
enddo
- do iBioTracers = 1, maxDustType
- atmosDustFlux(iBioTracers,iCell) = 1.e-13_RKIND
- enddo
+ if (.not. config_use_atm_dust_file) then
+ do iBioTracers = 1, maxDustType
+ atmosDustFlux(iBioTracers,iCell) = 1.e-13_RKIND
+ atmosWetDustFlux(iBioTracers,iCell) = 1.e-13_RKIND * 0.5_RKIND
+ atmosDryDustFlux(iBioTracers,iCell) = 1.e-13_RKIND * 0.5_RKIND
+ enddo
+ endif
#endif
- atmosBioFluxes(:,:) = 0.0_RKIND
if (config_use_zaerosols) then
indexj = ciceTracerObject % index_verticalAerosolsConcLayer(1)
do iBioTracers = 1, maxBCType
@@ -3934,132 +3835,130 @@ subroutine column_biogeochemistry(domain)
do iBioTracers = maxBCType + 1, nzAerosols
atmosBioFluxes(indexj -1 + iBioTracers, iCell) = atmosDustFlux(iBioTracers-maxBCType,iCell)
enddo
+ indexj = ciceTracerObject % index_dissolvedIronConcLayer(1)
+ if (config_use_iron_solubility_file) then
+ atmosBioFluxes(indexj,iCell) = 0.0_RKIND
+ do iBioTracers = maxBCType + 1, nzAerosols
+ atmosBioFluxes(indexj,iCell) = atmosBioFluxes(indexj,iCell) + &
+ (atmosWetDustFlux(iBioTracers-maxBCType,iCell) * IRON_Zolubility_wet(iCell) + &
+ atmosDryDustFlux(iBioTracers-maxBCType,iCell) * IRON_Zolubility_dry(iCell) ) * &
+ IRON_in_duzt_fraction(iCell) * microgramsPerKilograms / gramsIronPerMolIron
+ end do
+ end if
endif
do iBioTracers = 1, ciceTracerObject % nBioTracers
iBioData = ciceTracerObject % index_LayerIndexToDataArray(iBioTracers)
- oceanBioConcentrationsUsed(iBioTracers) = oceanBioConcentrations(iBioData,iCell)
+ oceanBioConcentrationsInUse(iBioTracers,iCell) = oceanBioConcentrations(iBioData,iCell)
enddo ! iBioTracers
- abortFlag = .false.
-
call set_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
- if (checkCarbon) call seaice_total_carbon_content_category(block,&
- totalCarbonCatInitial,iceAreaCategoryInitial,iceVolumeCategoryInitial,iCell)
-
- call colpkg_clear_warnings()
- call colpkg_biogeochemistry(&
- config_dt, &
- ciceTracerObject % nTracers, &
- ciceTracerObject % nBioTracers, &
- netNitrateUptake(iCell), &
- netAmmoniumUptake(iCell), &
- bioDiffusivity(:,:,iCell), &
- bioPermeability(:,:,iCell), &
- bioShortwaveFlux(:,:,iCell), &
- totalVerticalSalinity(iCell), &
- darcyVelocityBio(:,iCell), &
- netSpecificAlgalGrowthRate(iCell), &
- primaryProduction(iCell), &
- netBrineHeight(iCell), &
- brineBottomChange(:,iCell), &
- brineTopChange(:,iCell), &
- verticalNitrogenLosses(:,:,iCell), &
- snowIceBioFluxes(:,iCell), &
- atmosIceBioFluxes(:,iCell), &
- oceanBioConcentrationsUsed(:), &
- newlyFormedIceLogical(:), &
- shortwaveLayerPenetration(:,:,iCell), &
- bioPorosity(:,:,iCell), &
- bioTemperature(:,:,iCell), &
- totalVerticalBiologyIce(:,iCell), &
- totalVerticalBiologySnow(:,iCell), &
- totalChlorophyll(iCell), &
- penetratingShortwaveFlux(:,iCell), &
- rayleighCriteria, &
- zSalinityIceDensity(:,iCell), & !echmod deprecate
- zSalinityFlux(iCell), & !echmod deprecate
- zSalinityGDFlux(iCell), & !echmod deprecate
- biologyGrid, &
- interfaceBiologyGrid, &
- interfaceGrid, &
- verticalGrid, &
- nBioLayers, &
- nIceLayers, &
- nSnowLayers, &
- nAlgae, &
- nzAerosols, &
- nCategories, &
- nDOC, &
- nDIC, &
- nDON, &
- nDissolvedIron, &
- nParticulateIron, &
- basalIceMeltCategory(:,iCell), &
- surfaceIceMeltCategory(:,iCell), &
- congelationCategory(:,iCell), &
- snowiceFormationCategory(:,iCell), &
- seaSurfaceTemperature(iCell), &
- seaSurfaceSalinity(iCell), &
- seaFreezingTemperature(iCell), &
- snowfallRate(iCell), &
- snowMeltCategory(:,iCell), &
- oceanMixedLayerDepth(iCell), &
- initialSalinityProfile(:,iCell), &
- iceThicknessCategoryInitial(:,iCell), &
- oceanBioFluxes(:,iCell), &
- atmosBioFluxes(:,iCell), &
- iceAreaCategoryInitial(:,iCell), &
- iceVolumeCategoryInitial(:,iCell), &
- iceAreaCategory(1,:,iCell), &
- iceVolumeCategory(1,:,iCell), &
- snowVolumeCategory(1,:,iCell), &
- openWaterArea(iCell), &
- tracerArrayCategory, &
- snowVolumeCategoryInitial(:,iCell), &
- config_use_skeletal_biochemistry, &
- maxAlgaeType, &
- nZBGCTracers, &
- oceanBioFluxesCategory(:,:,iCell), &
- bgridPorosityIceCell(:,iCell), &
- bgridSalinityIceCell(:,iCell), &
- bgridTemperatureIceCell(:,iCell), &
- abortFlag, &
- abortMessage)
- call column_write_warnings(abortFlag)
+ if (checkCarbon) then
+ call seaice_total_carbon_content_category(block,&
+ totalCarbonCatInitial(:,iCell),iceAreaCategoryInitial(:,:),iceVolumeCategoryInitial(:,:),iCell)
+ totalCarbonInitial(iCell) = 0.0_RKIND
+ do iCategory = 1, nCategories
+ totalCarbonInitial(iCell) = totalCarbonInitial(iCell) + totalCarbonCatInitial(iCategory,iCell)*iceAreaCategoryInitial(iCategory,iCell)
+ enddo
+ endif
+
+ ! code abort
+ abortFlag = .false.
+ abortMessage = ""
+
+ call icepack_warnings_clear()
+ call icepack_biogeochemistry(&
+ dt=config_dt, &
+ upNO=netNitrateUptake(iCell), &
+ upNH=netAmmoniumUptake(iCell), &
+ iDi=bioDiffusivity(:,:,iCell), &
+ iki=bioPermeability(:,:,iCell), &
+ zfswin=bioShortwaveFlux(:,:,iCell), &
+ darcy_V=darcyVelocityBio(:,iCell), &
+ grow_net=netSpecificAlgalGrowthRate(iCell), &
+ PP_net=primaryProduction(iCell), &
+ hbri=netBrineHeight(iCell), &
+ dhbr_bot=brineBottomChange(:,iCell), &
+ dhbr_top=brineTopChange(:,iCell), &
+ Zoo=verticalNitrogenLosses(:,:,iCell), &
+ fbio_snoice=snowIceBioFluxes(:,iCell), &
+ fbio_atmice=atmosIceBioFluxes(:,iCell), &
+ ocean_bio_dh=oceanBioToIceInUse(:,iCell), &
+ ocean_bio=oceanBioConcentrationsInUse(:,iCell), &
+ first_ice=newlyFormedIceLogical(:), &
+ fswpenln=shortwaveLayerPenetration(:,:,iCell), &
+ bphi=bioPorosity(:,:,iCell), &
+ bTiz=bioTemperature(:,:,iCell), &
+ ice_bio_net=totalVerticalBiologyIce(:,iCell), &
+ snow_bio_net=totalVerticalBiologySnow(:,iCell), &
+ totalChla=totalChlorophyll(iCell), &
+ fswthrun=penetratingShortwaveFlux(:,iCell), &
+ meltbn=basalIceMeltCategory(:,iCell), &
+ melttn=surfaceIceMeltCategory(:,iCell), &
+ congeln=congelationCategory(:,iCell), &
+ snoicen=snowiceFormationCategory(:,iCell), &
+ sst=seaSurfaceTemperature(iCell), &
+ sss=seaSurfaceSalinity(iCell), &
+ Tf=seaFreezingTemperature(iCell), &
+ fsnow=snowfallRate(iCell), &
+ meltsn=snowMeltCategory(:,iCell), &
+ hin_old=iceThicknessCategoryInitial(:,iCell), &
+ flux_bio=oceanBioFluxes(:,iCell), &
+ flux_bio_atm=atmosBioFluxes(:,iCell), &
+ aicen_init=iceAreaCategoryInitial(:,iCell), &
+ vicen_init=iceVolumeCategoryInitial(:,iCell), &
+ aicen=iceAreaCategory(1,:,iCell), &
+ vicen=iceVolumeCategory(1,:,iCell), &
+ vsnon=snowVolumeCategory(1,:,iCell), &
+ aice0=openWaterArea(iCell), &
+ trcrn=tracerArrayCategory, &
+ vsnon_init=snowVolumeCategoryInitial(:,iCell), &
+ flux_bion=oceanBioFluxesCategory(:,:,iCell), &
+ bioPorosityIceCell=bgridPorosityIceCell(:,iCell), &
+ bioSalinityIceCell=bgridSalinityIceCell(:,iCell), &
+ bioTemperatureIceCell=bgridTemperatureIceCell(:,iCell))
+
+ abortFlag = icepack_warnings_aborted()
call get_cice_tracer_array_category(block, ciceTracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
if (checkCarbon) then
- call seaice_total_carbon_content_category(block,totalCarbonCatFinal,iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
- call seaice_ocean_carbon_flux(block,totalCarbonCatFlux,oceanBioFluxesCategory(:,:,:),iCell)
- do iCategory = 1,nCategories
- brineHeightCatFinal(iCategory) = brineFraction(1,iCategory,iCell) * &
- iceVolumeCategory(1,iCategory,iCell)/(iceAreaCategory(1,iCategory,iCell) + seaicePuny)
- carbonErrorCat = totalCarbonCatInitial(iCategory) - totalCarbonCatFlux(iCategory)*config_dt - &
- totalCarbonCatFinal(iCategory)
- if (abs(carbonErrorCat) > accuracy*MAXVAL((/totalCarbonCatInitial(iCategory),totalCarbonCatFinal(iCategory)/))) then
-! abortFlag = .true.
-! abortMessage = "carbon conservation errror after column bgc"
- call mpas_log_write("column_biogeochemistry, carbon conservation error", messageType=MPAS_LOG_ERR)
- call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
- call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
- call mpas_log_write("carbonErrorCat: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonErrorCat/))
- call mpas_log_write("carbonErrorCat*iceAreaCategory: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonErrorCat*iceAreaCategory(1,iCategory,iCell)/))
- call mpas_log_write("totalCarbonCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatInitial(iCategory)/))
- call mpas_log_write("totalCarbonCatFinal(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory)/))
- call mpas_log_write("totalCarbonCatFlux(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFlux(iCategory)/))
- call mpas_log_write("brineHeightCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatInitial(iCategory)/))
- call mpas_log_write("brineHeightCatFinal(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatFinal(iCategory)/))
- endif
+ call seaice_total_carbon_content_category(block,totalCarbonCatFinal(:,iCell),iceAreaCategory(1,:,:),iceVolumeCategory(1,:,:),iCell)
+ call seaice_ocean_carbon_flux(block,totalCarbonCatFlux(:,iCell),oceanBioFluxesCategory(:,:,:),iCell)
+ totalCarbonFinal(iCell) = 0.0_RKIND
+ totalCarbonFlux(iCell) = 0.0_RKIND
+ do iCategory = 1, nCategories
+ totalCarbonFinal(iCell) = totalCarbonFinal(iCell) + totalCarbonCatFinal(iCategory,iCell)*iceAreaCategory(1,iCategory,iCell)
+ totalCarbonFlux(iCell) = totalCarbonFlux(iCell) + totalCarbonCatFlux(iCategory,iCell) * iceAreaCategory(1,iCategory,iCell)
enddo
- endif
-
- ! code abort
- if (abortFlag) exit
+ carbonError(iCell) = (totalCarbonFinal(iCell) - totalCarbonInitial(iCell))/config_dt +totalCarbonFlux(iCell)
+ errorCheck = max(accuracy,accuracy*abs(totalCarbonFlux(iCell)))
+
+ if (abs(carbonError(iCell)) > errorCheck) then
+ do iCategory = 1,nCategories
+ if (iceAreaCategory(1,iCategory,iCell) > seaicePuny) then
+ brineHeightCatFinal(iCategory,iCell) = brineFraction(1,iCategory,iCell) * &
+ iceVolumeCategory(1,iCategory,iCell)/(iceAreaCategory(1,iCategory,iCell) + seaicePuny)
+ call mpas_log_write("column_biogeochemistry, carbon conservation error", messageType=MPAS_LOG_ERR)
+ call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
+ call mpas_log_write("iCategory: $i", messageType=MPAS_LOG_ERR, intArgs=(/iCategory/))
+ call mpas_log_write("carbonError: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError(iCell)/))
+ call mpas_log_write("carbonError*iceAreaCategory: $r", messageType=MPAS_LOG_ERR, realArgs=(/carbonError(iCell)*iceAreaCategory(1,iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategory: $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategory(1,iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategoryInitial: $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategoryInitial(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatInitial(iCategory): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatInitial(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatFinal(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFinal(iCategory,iCell)/))
+ call mpas_log_write("totalCarbonCatFlux(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/totalCarbonCatFlux(iCategory,iCell)/))
+ call mpas_log_write("brineHeightCatInitial(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatInitial(iCategory,iCell)/))
+ call mpas_log_write("brineHeightCatFinal(iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/brineHeightCatFinal(iCategory,iCell)/))
+ call mpas_log_write("iceAreaCategory(1,iCategory,iCell): $r", messageType=MPAS_LOG_ERR, realArgs=(/iceAreaCategory(1,iCategory,iCell)/))
+ end if
+ enddo !categories
+ endif ! carbonError
+ endif ! checkCarbon
totalSkeletalAlgae(iCell) = 0.0_RKIND
bioShortwaveFluxCell(:,iCell) = 0.0_RKIND
@@ -4083,28 +3982,30 @@ subroutine column_biogeochemistry(domain)
if (newlyFormedIceLogical(iCategory)) newlyFormedIce(iCategory,iCell) = 1
enddo ! iCategory
- if (.not. rayleighCriteria) rayleighCriteriaReal(iCell) = 0.0_RKIND
+ ! code abort
+ if (abortFlag) then
+ call mpas_log_write("column_biogeochemistry: "//trim(abortMessage) , messageType=MPAS_LOG_ERR)
+ call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
+ endif
+
+ call seaice_icepack_write_warnings(abortFlag)
enddo ! iCell
- ! code abort
- if (abortFlag) then
- call mpas_log_write("column_biogeochemistry: "//trim(abortMessage) , messageType=MPAS_LOG_ERR)
- call mpas_log_write("iCell: $i", messageType=MPAS_LOG_ERR, intArgs=(/indexToCellID(iCell)/))
- endif
call seaice_critical_error_write_block(domain, block, abortFlag)
call seaice_check_critical_error(domain, abortFlag)
- if (checkCarbon) then
- deallocate(totalCarbonCatFinal)
- deallocate(totalCarbonCatInitial)
- deallocate(totalCarbonCatFlux)
- deallocate(brineHeightCatFinal)
- endif
+ deallocate(totalCarbonCatFinal)
+ deallocate(totalCarbonCatInitial)
+ deallocate(totalCarbonCatFlux)
+ deallocate(brineHeightCatFinal)
+ deallocate(totalCarbonFinal)
+ deallocate(totalCarbonInitial)
+ deallocate(totalCarbonFlux)
+ deallocate(carbonError)
deallocate(brineHeightCatInitial)
deallocate(newlyFormedIceLogical)
- deallocate(oceanBioConcentrationsUsed)
block => block % next
end do
@@ -4378,7 +4279,8 @@ subroutine seaice_icepack_aggregate(domain)
ocean_coupling
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), dimension(:), pointer :: &
iceAreaCell, &
@@ -4396,8 +4298,10 @@ subroutine seaice_icepack_aggregate(domain)
iCell
integer, pointer :: &
- nCellsSolve, &
- nCategories
+ nCellsSolve
+
+ integer, dimension(:), pointer :: &
+ indexToCellID
logical :: &
setGetPhysicsTracers, &
@@ -4413,9 +4317,10 @@ subroutine seaice_icepack_aggregate(domain)
call MPAS_pool_get_subpool(block % structs, "ocean_coupling", ocean_coupling)
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_dimension(mesh, "nCellsSolve", nCellsSolve)
- call MPAS_pool_get_dimension(mesh, "nCategories", nCategories)
+ call MPAS_pool_get_array(mesh, "indexToCellID", indexToCellID)
call MPAS_pool_get_array(tracers, "iceAreaCategory", iceAreaCategory, 1)
call MPAS_pool_get_array(tracers, "iceVolumeCategory", iceVolumeCategory, 1)
@@ -4430,7 +4335,7 @@ subroutine seaice_icepack_aggregate(domain)
call MPAS_pool_get_array(ocean_coupling, "seaFreezingTemperature", seaFreezingTemperature)
setGetPhysicsTracers = .true.
- setGetBGCTracers = config_use_column_biogeochemistry
+ setGetBGCTracers = (config_use_column_biogeochemistry .or. config_use_zaerosols)
do iCell = 1, nCellsSolve
@@ -4439,7 +4344,6 @@ subroutine seaice_icepack_aggregate(domain)
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
call icepack_aggregate( &
- nCategories, &
iceAreaCategory(1,:,iCell), &
tracerArrayCategory, & ! trcrn
iceVolumeCategory(1,:,iCell), &
@@ -4449,7 +4353,6 @@ subroutine seaice_icepack_aggregate(domain)
iceVolumeCell(iCell), &
snowVolumeCell(iCell), &
openWaterArea(iCell), &
- ciceTracerObject % nTracers, &
ciceTracerObject % parentIndex, & ! trcr_depend
ciceTracerObject % firstAncestorMask, & ! trcr_base
ciceTracerObject % ancestorNumber, & ! n_trcr_strata
@@ -4579,7 +4482,8 @@ subroutine seaice_icepack_coupling_prep(domain)
logical, pointer :: &
config_use_ocean_mixed_layer, &
config_include_pond_freshwater_feedback, &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
type(MPAS_pool_type), pointer :: &
oceanCoupling, &
@@ -4630,7 +4534,17 @@ subroutine seaice_icepack_coupling_prep(domain)
oceanDMSPdFlux, &
oceanHumicsFlux, &
oceanDustIronFlux, &
- totalOceanCarbonFlux
+ oceanBlackCarbonFlux, &
+ totalOceanCarbonFlux, &
+ oceanNitrateFluxArea, &
+ oceanSilicateFluxArea, &
+ oceanAmmoniumFluxArea, &
+ oceanDMSFluxArea, &
+ oceanDMSPpFluxArea, &
+ oceanDMSPdFluxArea, &
+ oceanHumicsFluxArea, &
+ oceanDustIronFluxArea, &
+ oceanBlackCarbonFluxArea
real(kind=RKIND), dimension(:,:), pointer :: &
albedoVisibleDirectCategory, &
@@ -4647,7 +4561,13 @@ subroutine seaice_icepack_coupling_prep(domain)
oceanDICFlux, &
oceanDONFlux, &
oceanParticulateIronFlux, &
- oceanDissolvedIronFlux
+ oceanDissolvedIronFlux, &
+ oceanAlgaeFluxArea, &
+ oceanDOCFluxArea, &
+ oceanDICFluxArea, &
+ oceanDONFluxArea, &
+ oceanParticulateIronFluxArea, &
+ oceanDissolvedIronFluxArea
real(kind=RKIND), dimension(:,:,:), pointer :: &
iceAreaCategory
@@ -4690,6 +4610,7 @@ subroutine seaice_icepack_coupling_prep(domain)
call MPAS_pool_get_config(domain % configs, "config_dt", config_dt)
call MPAS_pool_get_config(domain % configs, "config_include_pond_freshwater_feedback", config_include_pond_freshwater_feedback)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_diatoms", config_ratio_C_to_N_diatoms)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_small_plankton", config_ratio_C_to_N_small_plankton)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_phaeocystis", config_ratio_C_to_N_phaeocystis)
@@ -4769,6 +4690,7 @@ subroutine seaice_icepack_coupling_prep(domain)
call MPAS_pool_get_array(biogeochemistry, "oceanDMSPdFlux", oceanDMSPdFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanHumicsFlux", oceanHumicsFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDustIronFlux", oceanDustIronFlux)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBlackCarbonFlux", oceanBlackCarbonFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanBioFluxes", oceanBioFluxes)
call MPAS_pool_get_array(biogeochemistry, "oceanAlgaeFlux", oceanAlgaeFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDOCFlux", oceanDOCFlux)
@@ -4778,6 +4700,22 @@ subroutine seaice_icepack_coupling_prep(domain)
call MPAS_pool_get_array(biogeochemistry, "oceanDissolvedIronFlux", oceanDissolvedIronFlux)
call MPAS_pool_get_array(biogeochemistry, "totalOceanCarbonFlux", totalOceanCarbonFlux)
+ call MPAS_pool_get_array(biogeochemistry, "oceanNitrateFluxArea", oceanNitrateFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanSilicateFluxArea", oceanSilicateFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanAmmoniumFluxArea", oceanAmmoniumFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDMSFluxArea", oceanDMSFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDMSPpFluxArea", oceanDMSPpFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDMSPdFluxArea", oceanDMSPdFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanHumicsFluxArea", oceanHumicsFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDustIronFluxArea", oceanDustIronFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBlackCarbonFluxArea", oceanBlackCarbonFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanAlgaeFluxArea", oceanAlgaeFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDOCFluxArea", oceanDOCFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDICFluxArea", oceanDICFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDONFluxArea", oceanDONFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanParticulateIronFluxArea", oceanParticulateIronFluxArea)
+ call MPAS_pool_get_array(biogeochemistry, "oceanDissolvedIronFluxArea", oceanDissolvedIronFluxArea)
+
call MPAS_pool_get_dimension(mesh, "nZBGCTracers", nZBGCTracers)
call MPAS_pool_get_dimension(mesh, "maxAlgaeType", maxAlgaeType)
call MPAS_pool_get_dimension(mesh, "maxDOCType", maxDOCType)
@@ -4882,10 +4820,12 @@ subroutine seaice_icepack_coupling_prep(domain)
!-----------------------------------------------------------------
! Define ocean biogeochemical flux variables
!-----------------------------------------------------------------
- if (config_use_column_biogeochemistry) then
+
+ oceanBioFluxesAll(:) = 0.0_RKIND
+
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
totalOceanCarbonFlux(iCell) = 0.0_RKIND
- oceanBioFluxesAll(:) = 0.0_RKIND
oceanAlgaeFlux(:,iCell) = 0.0_RKIND
oceanDOCFlux(:,iCell) = 0.0_RKIND
oceanDICFlux(:,iCell) = 0.0_RKIND
@@ -4899,6 +4839,7 @@ subroutine seaice_icepack_coupling_prep(domain)
oceanDMSPdFlux(iCell) = 0.0_RKIND
oceanDMSFlux(iCell) = 0.0_RKIND
oceanDustIronFlux(iCell) = 0.0_RKIND
+ oceanBlackCarbonFlux(iCell) = 0.0_RKIND
oceanHumicsFlux(iCell) = 0.0_RKIND
do iBioTracers = 1, ciceTracerObject % nBioTracers
@@ -4911,6 +4852,7 @@ subroutine seaice_icepack_coupling_prep(domain)
do iBioTracers = 1, maxAlgaeType
iBioData = iBioData+1
oceanAlgaeFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanAlgaeFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanAlgaeFlux(iBioTracers,iCell) * ratio_C_to_N(iBioTracers)
enddo
@@ -4918,11 +4860,13 @@ subroutine seaice_icepack_coupling_prep(domain)
! Nitrate
iBioData = iBioData+1
oceanNitrateFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanNitrateFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! Polysaccharids and Lipids
do iBioTracers = 1, maxDOCType
iBioData = iBioData+1
oceanDOCFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDOCFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanDOCFlux(iBioTracers,iCell)
enddo
@@ -4931,6 +4875,7 @@ subroutine seaice_icepack_coupling_prep(domain)
do iBioTracers = 1, maxDICType
iBioData = iBioData+1
oceanDICFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDICFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanDICFlux(iBioTracers,iCell)
enddo
@@ -4941,22 +4886,27 @@ subroutine seaice_icepack_coupling_prep(domain)
! Ammonium
iBioData = iBioData+1
oceanAmmoniumFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanAmmoniumFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! Silicate
iBioData = iBioData+1
oceanSilicateFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanSilicateFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! DMSPp
iBioData = iBioData+1
oceanDMSPpFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanDMSPpFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! DMSPd
iBioData = iBioData+1
oceanDMSPdFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanDMSPdFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! DMS
iBioData = iBioData+1
oceanDMSFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanDMSFluxArea(iCell) = oceanBioFluxesAll(iBioData)
! PON
iBioData = iBioData+1
@@ -4965,6 +4915,7 @@ subroutine seaice_icepack_coupling_prep(domain)
do iBioTracers = 1, maxDONType
iBioData = iBioData+1
oceanDONFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDONFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
oceanDONFlux(iBioTracers,iCell) * config_ratio_C_to_N_proteins
enddo
@@ -4973,30 +4924,38 @@ subroutine seaice_icepack_coupling_prep(domain)
do iBioTracers = 1, maxIronType
iBioData = iBioData+1
oceanDissolvedIronFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanDissolvedIronFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
enddo
! Particulate Iron
do iBioTracers = 1, maxIronType
iBioData = iBioData+1
oceanParticulateIronFlux(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
+ oceanParticulateIronFluxArea(iBioTracers,iCell) = oceanBioFluxesAll(iBioData)
enddo
- ! Black Carbon (not saved)
- iBioData = iBioData + maxBCType
+ ! Black Carbon (combined; saved for conservation)
+ do iBioTracers = 1, maxBCType
+ iBioData = iBioData + 1
+ oceanBlackCarbonFlux(iCell) = oceanBlackCarbonFlux(iCell) + oceanBioFluxesAll(iBioData)
+ enddo
+ oceanBlackCarbonFluxArea(iCell) = oceanBlackCarbonFlux(iCell)
! Dust (combined)
do iBioTracers = 1, maxDustType
iBioData = iBioData+1
oceanDustIronFlux(iCell) = oceanDustIronFlux(iCell) + oceanBioFluxesAll(iBioData)
- enddo
+ enddo
+ oceanDustIronFluxArea(iCell) = oceanDustIronFlux(iCell)
! Humics
iBioData = iBioData+1
oceanHumicsFlux(iCell) = oceanBioFluxesAll(iBioData)
+ oceanHumicsFluxArea(iCell) = oceanBioFluxesAll(iBioData)
totalOceanCarbonFlux(iCell) = totalOceanCarbonFlux(iCell) + &
- oceanHumicsFlux(iCell)
+ oceanHumicsFlux(iCell)
- endif ! config_use_column_biogeochemistry
+ endif ! config_use_column_biogeochemistry .or. config_use_zaerosols
enddo ! iCell
@@ -5044,7 +5003,8 @@ subroutine seaice_column_scale_fluxes(domain)
mesh
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
real(kind=RKIND), dimension(:), pointer :: &
iceAreaCell, &
@@ -5075,6 +5035,7 @@ subroutine seaice_column_scale_fluxes(domain)
oceanDMSPpFlux, &
oceanDMSPdFlux, &
oceanHumicsFlux, &
+ oceanBlackCarbonFlux, &
oceanDustIronFlux
real(kind=RKIND), dimension(:,:), pointer :: &
@@ -5104,6 +5065,7 @@ subroutine seaice_column_scale_fluxes(domain)
iBioTracers
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
block => domain % blocklist
do while (associated(block))
@@ -5156,6 +5118,7 @@ subroutine seaice_column_scale_fluxes(domain)
call MPAS_pool_get_array(biogeochemistry, "oceanDMSPdFlux", oceanDMSPdFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanHumicsFlux", oceanHumicsFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDustIronFlux", oceanDustIronFlux)
+ call MPAS_pool_get_array(biogeochemistry, "oceanBlackCarbonFlux", oceanBlackCarbonFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanAlgaeFlux", oceanAlgaeFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDOCFlux", oceanDOCFlux)
call MPAS_pool_get_array(biogeochemistry, "oceanDICFlux", oceanDICFlux)
@@ -5196,6 +5159,11 @@ subroutine seaice_column_scale_fluxes(domain)
albedoVisibleDiffuseCell(iCell) = albedoVisibleDiffuseCell(iCell) * iceAreaInverse
albedoIRDiffuseCell(iCell) = albedoIRDiffuseCell(iCell) * iceAreaInverse
+ if (config_use_zaerosols) then
+ oceanDustIronFlux(iCell) = oceanDustIronFlux(iCell) * iceAreaInverse
+ oceanBlackCarbonFlux(iCell) = oceanBlackCarbonFlux(iCell) * iceAreaInverse
+ end if
+
if (config_use_column_biogeochemistry) then
oceanNitrateFlux(iCell) = oceanNitrateFlux(iCell) * iceAreaInverse
@@ -5205,7 +5173,6 @@ subroutine seaice_column_scale_fluxes(domain)
oceanDMSPdFlux(iCell) = oceanDMSPdFlux(iCell) * iceAreaInverse
oceanDMSFlux(iCell) = oceanDMSFlux(iCell) * iceAreaInverse
oceanHumicsFlux(iCell) = oceanHumicsFlux(iCell) * iceAreaInverse
- oceanDustIronFlux(iCell) = oceanDustIronFlux(iCell) * iceAreaInverse
do iBioTracers = 1, maxAlgaeType
oceanAlgaeFlux(iBioTracers,iCell) = oceanAlgaeFlux(iBioTracers,iCell) * iceAreaInverse
@@ -5248,6 +5215,11 @@ subroutine seaice_column_scale_fluxes(domain)
albedoVisibleDiffuseCell(iCell) = 0.0_RKIND
albedoIRDiffuseCell(iCell) = 0.0_RKIND
+ if (config_use_zaerosols) then
+ oceanDustIronFlux(iCell) = 0.0_RKIND
+ oceanBlackCarbonFlux(iCell) = 0.0_RKIND
+ end if
+
if (config_use_column_biogeochemistry) then
oceanNitrateFlux(iCell) = 0.0_RKIND
@@ -5257,7 +5229,6 @@ subroutine seaice_column_scale_fluxes(domain)
oceanDMSPdFlux(iCell) = 0.0_RKIND
oceanDMSFlux(iCell) = 0.0_RKIND
oceanHumicsFlux(iCell) = 0.0_RKIND
- oceanDustIronFlux(iCell) = 0.0_RKIND
oceanAlgaeFlux(:,iCell) = 0.0_RKIND
oceanDOCFlux(:,iCell) = 0.0_RKIND
oceanDICFlux(:,iCell) = 0.0_RKIND
@@ -5524,18 +5495,12 @@ subroutine seaice_icepack_init_trcr(&
initialSalinityProfile, &
initialMeltingTemperatureProfile, &
surfaceTemperature, &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy, &
snowEnthalpy)
use icepack_intfc, only: &
icepack_init_trcr
- integer, intent(in) :: &
- nIceLayers, & ! number of ice layers
- nSnowLayers ! number of snow layers
-
real(kind=RKIND), intent(in) :: &
airTemperature, & ! air temperature (C)
seaFreezingTemperature ! freezing temperature (C)
@@ -5556,8 +5521,6 @@ subroutine seaice_icepack_init_trcr(&
initialSalinityProfile, &
initialMeltingTemperatureProfile, &
surfaceTemperature, &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy, &
snowEnthalpy)
@@ -5581,21 +5544,11 @@ subroutine seaice_icepack_init_ocean_conc(&
oceanNitrateConc, &
oceanSilicateConc,&
oceanZAerosolConc, &
- maxDICType, &
- maxDONType, &
- maxIronType, &
- maxAerosolType, &
carbonToNitrogenRatioAlgae, &
carbonToNitrogenRatioDON)
- use ice_colpkg, only: &
- colpkg_init_ocean_conc
-
- integer, intent(in) :: &
- maxDICType, &
- maxDONType, &
- maxIronType, &
- maxAerosolType
+ use icepack_intfc, only: &
+ icepack_init_ocean_bio
real(kind=RKIND), intent(out):: &
oceanAmmoniumConc, & ! ammonium
@@ -5614,30 +5567,26 @@ subroutine seaice_icepack_init_ocean_conc(&
oceanParticulateIronConc, & ! Particulate Iron
oceanZAerosolConc ! BC and dust
- real(kind=RKIND), dimension(:), intent(inout), optional :: &
+ real(kind=RKIND), dimension(:), intent(out), optional :: &
carbonToNitrogenRatioAlgae, & ! carbon to nitrogen ratio for algae
carbonToNitrogenRatioDON ! nitrogen to carbon ratio for proteins
- call colpkg_init_ocean_conc(&
- oceanAmmoniumConc, &
- oceanDMSPConc, &
- oceanDMSConc, &
- oceanAlgaeConc, &
- oceanDOCConc, &
- oceanDICConc, &
- oceanDONConc, &
- oceanDissolvedIronConc, &
- oceanParticulateIronConc, &
- oceanHumicsConc, &
- oceanNitrateConc, &
- oceanSilicateConc,&
- oceanZAerosolConc, &
- maxDICType, &
- maxDONType, &
- maxIronType, &
- maxAerosolType, &
- carbonToNitrogenRatioAlgae, &
- carbonToNitrogenRatioDON)
+ call icepack_init_ocean_bio(&
+ amm=oceanAmmoniumConc, &
+ dmsp=oceanDMSPConc, &
+ dms=oceanDMSConc, &
+ algalN=oceanAlgaeConc(:), &
+ doc=oceanDOCConc(:), &
+ dic=oceanDICConc(:), &
+ don=oceanDONConc(:), &
+ fed=oceanDissolvedIronConc(:), &
+ fep=oceanParticulateIronConc(:), &
+ hum=oceanHumicsConc, &
+ nit=oceanNitrateConc, &
+ sil=oceanSilicateConc,&
+ zaeros=oceanZAerosolConc(:), &
+ CToN=carbonToNitrogenRatioAlgae(:), &
+ CToN_DON=carbonToNitrogenRatioDON(:))
end subroutine seaice_icepack_init_ocean_conc
@@ -5731,12 +5680,14 @@ subroutine init_column_tracer_object(domain, tracerObject)
nZBGCTracers
logical, pointer :: &
- config_use_column_biogeochemistry
+ config_use_column_biogeochemistry, &
+ config_use_zaerosols
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nCategories", nCategories)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nZBGCTracers", nZBGCTracers)
call MPAS_pool_get_config(domain % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
! get the number of CICE tracers in trcrn
call init_column_tracer_object_tracer_number(domain, tracerObject)
@@ -5760,7 +5711,7 @@ subroutine init_column_tracer_object(domain, tracerObject)
call init_column_tracer_object_ancestor_indices(domain, tracerObject)
! biogeochemistry
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
allocate(tracerObject % index_LayerIndexToDataArray(nZBGCTracers))
allocate(tracerObject % index_LayerIndexToBioIndex(nZBGCTracers))
@@ -5965,7 +5916,7 @@ subroutine init_column_tracer_object_tracer_number(domain, tracerObject)
! biogeochemistry
!-----------------------------------------------------------------------
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
! save tracer number without bio tracers counted
tracerObject % nTracersNotBio = tracerObject % nTracers
@@ -5982,6 +5933,7 @@ subroutine init_column_tracer_object_tracer_number(domain, tracerObject)
! tracerObject % nTracers = tracerObject % nTracers + nBioLayers
! tracerObject % nBioTracersLayer = tracerObject % nBioTracersLayer + 1
! endif
+
nMobileTracers = 0
! Skeletal Biogeochemistry
@@ -9172,7 +9124,6 @@ subroutine init_icepack_package_parameters(domain, tracerObject)
call init_icepack_package_tracer_indices(tracerObject)
! set the column parameters
- call init_column_package_configs(domain) !echmod - temporary until colpkg_constants are moved
call init_icepack_package_configs(domain)
end subroutine init_icepack_package_parameters
@@ -9591,11 +9542,13 @@ subroutine check_column_package_configs(domain)
endif
! check biogeochemistry flags:
- if (.not. config_use_column_biogeochemistry .and. (config_use_brine .or. &
- config_use_vertical_biochemistry .or. config_use_shortwave_bioabsorption .or. config_use_vertical_tracers .or. &
- config_use_skeletal_biochemistry .or. config_use_nitrate .or. config_use_carbon .or. config_use_chlorophyll .or. &
- config_use_ammonium .or. config_use_silicate .or. config_use_DMS .or. config_use_nonreactive .or. config_use_humics .or. &
- config_use_DON .or. config_use_iron .or. config_use_modal_aerosols .or. config_use_zaerosols)) then
+
+ if (.not. config_use_column_biogeochemistry .and. (config_use_vertical_biochemistry .or. &
+ config_use_skeletal_biochemistry .or. config_use_nitrate .or. config_use_carbon .or. &
+ config_use_chlorophyll .or. config_use_ammonium .or. config_use_silicate .or. &
+ config_use_DMS .or. config_use_nonreactive .or. config_use_humics .or. &
+ config_use_DON .or. config_use_iron)) then
+
call mpas_log_write(&
"check_column_package_configs: config_use_column_biogeochemistry = false. "//&
"All biogeochemistry namelist flags must also be false", &
@@ -9618,6 +9571,14 @@ subroutine check_column_package_configs(domain)
messageType=MPAS_LOG_CRIT)
endif
+ ! check that brine height is used with either aerosols or bgc
+ if (config_use_brine .and. &
+ (.not. config_use_column_biogeochemistry .and. .not. config_use_zaerosols)) then
+ call mpas_log_write(&
+ "check_column_package_configs: brine tracer must be used with vertical tracers - config_use_column_biogeochemistry and/or config_use_zaerosols equal to true", &
+ messageType=MPAS_LOG_CRIT)
+ endif
+
! check that the shortwave scheme and bioabsorption is consistent
if (config_use_shortwave_bioabsorption .and. .not. (trim(config_shortwave_type(1:4)) == "dEdd")) then
call mpas_log_write(&
@@ -9719,7 +9680,7 @@ subroutine init_icepack_package_tracer_flags(domain)
tr_pond_in = use_meltponds, &
tr_pond_lvl_in = config_use_level_meltponds, &
tr_pond_topo_in = config_use_topo_meltponds, &
- !tr_fsd_in = , &
+ !tr_fsd_in = config_use_floe_size_distribution, &
tr_aero_in = config_use_aerosols, &
!tr_iso_in = , &
tr_brine_in = config_use_brine, &
@@ -9768,13 +9729,27 @@ subroutine init_icepack_package_tracer_sizes(domain, tracerObject)
nIceLayers, &
nSnowLayers, &
nAerosols, &
- nBioLayers
+ nBioLayers, &
+ nAlgae, &
+ nDOC, &
+ nDIC, &
+ nDON, &
+ nParticulateIron, &
+ nDissolvedIron, &
+ nzAerosols
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nCategories", nCategories)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nIceLayers", nIceLayers)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nSnowLayers", nSnowLayers)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nBioLayers", nBioLayers)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nAerosols", nAerosols)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nzAerosols", nzAerosols)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nAlgae", nAlgae)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDOC", nDOC)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDIC", nDIC)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDON", nDON)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nParticulateIron", nParticulateIron)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDissolvedIron", nDissolvedIron)
call icepack_init_tracer_sizes(&
ncat_in = nCategories, &
@@ -9782,17 +9757,17 @@ subroutine init_icepack_package_tracer_sizes(domain, tracerObject)
nslyr_in = nSnowLayers, &
nblyr_in = nBioLayers, &
!nfsd_in = , &
- !n_algae_in = , &
- !n_DOC_in = , &
- n_aero_in = nAerosols, &
!n_iso_in = , &
- !n_DON_in = , &
- !n_DIC_in = , &
- !n_fed_in = , &
- !n_fep_in = , &
- !n_zaero_in = , &
+ !n_aero_in = nAerosols, &
+ n_algae_in = nAlgae, &
+ n_DOC_in = nDOC, &
+ n_DON_in = nDON, &
+ n_DIC_in = nDIC, &
+ n_fed_in = nDissolvedIron, &
+ n_fep_in = nParticulateIron, &
+ n_zaero_in = nzAerosols, &
ntrcr_in = tracerObject % nTracers, &
- !ntrcr_o_in = , &
+ ntrcr_o_in = tracerObject % nTracersNotBio, &
nbtrcr_in = tracerObject % nBioTracers, &
nbtrcr_sw_in = tracerObject % nBioTracersShortwave)
@@ -9888,203 +9863,84 @@ end subroutine init_icepack_package_tracer_indices
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
!
-! init_column_package_configs
+! init_icepack_package_configs
!
!> \brief
-!> \author Adrian K. Turner, LANL
-!> \date 2nd Feburary 2015
+!> \author Adrian K. Turner, Elizabeth Hunke, Darin Comeau, Nicole Jeffery, Andrew Roberts, Erin Thomas, Jon Wolfe, LANL, Anthony Craig, NOAA (cntr), David Bailey, NCAR
+!> \date 2022-2023
!> \details
!>
!
!-----------------------------------------------------------------------
- subroutine init_column_package_configs(domain) !colpkg routine - remove
-
- !use ice_colpkg_shared, only: &
- ! ktherm, &
- ! conduct, &
- ! fbot_xfer_type, &
- ! heat_capacity, &
- ! calc_Tsfc, &
- ! ustar_min, &
- ! a_rapid_mode, &
- ! Rac_rapid_mode, &
- ! aspect_rapid_mode, &
- ! dSdt_slow_mode, &
- ! phi_c_slow_mode, &
- ! phi_i_mushy, &
- ! shortwave, &
- ! albedo_type, &
- ! albicev, &
- ! albicei, &
- ! albsnowv, &
- ! albsnowi, &
- ! ahmax, &
- ! R_ice, &
- ! R_pnd, &
- ! R_snw, &
- ! dT_mlt, &
- ! rsnw_mlt, &
- ! kalg, &
- ! kstrength, &
- ! krdg_partic, &
- ! krdg_redist, &
- ! mu_rdg, &
- ! Cf, &
- ! atmbndy, &
- ! calc_strair, &
- ! formdrag, &
- ! highfreq, &
- ! natmiter, &
- ! oceanmixed_ice, &
- ! tfrz_option, &
- ! kitd, &
- ! kcatbound, &
- ! hs0, &
- ! frzpnd, &
- ! dpscale, &
- ! rfracmin, &
- ! rfracmax, &
- ! pndaspect, &
- ! hs1, &
- ! hp1
- ! bgc_flux_type, &
- ! z_tracers, &
- ! scale_bgc, &
- ! solve_zbgc, &
- ! dEdd_algae, &
- ! modal_aero, &
- ! skl_bgc, &
- ! solve_zsal, &
- ! grid_o, &
- ! l_sk, &
- ! grid_o_t, &
- ! initbio_frac, &
- ! frazil_scav, &
- ! grid_oS, &
- ! l_skS, &
- ! phi_snow, &
- ! ratio_Si2N_diatoms, &
- ! ratio_Si2N_sp , &
- ! ratio_Si2N_phaeo , &
- ! ratio_S2N_diatoms , &
- ! ratio_S2N_sp , &
- ! ratio_S2N_phaeo , &
- ! ratio_Fe2C_diatoms, &
- ! ratio_Fe2C_sp , &
- ! ratio_Fe2C_phaeo , &
- ! ratio_Fe2N_diatoms, &
- ! ratio_Fe2N_sp , &
- ! ratio_Fe2N_phaeo , &
- ! ratio_Fe2DON , &
- ! ratio_Fe2DOC_s , &
- ! ratio_Fe2DOC_l , &
- ! fr_resp , &
- ! tau_min , &
- ! tau_max , &
- ! algal_vel , &
- ! R_dFe2dust , &
- ! dustFe_sol , &
- ! chlabs_diatoms , &
- ! chlabs_sp , &
- ! chlabs_phaeo , &
- ! alpha2max_low_diatoms , &
- ! alpha2max_low_sp , &
- ! alpha2max_low_phaeo , &
- ! beta2max_diatoms , &
- ! beta2max_sp , &
- ! beta2max_phaeo , &
- ! mu_max_diatoms , &
- ! mu_max_sp , &
- ! mu_max_phaeo , &
- ! grow_Tdep_diatoms, &
- ! grow_Tdep_sp , &
- ! grow_Tdep_phaeo , &
- ! fr_graze_diatoms , &
- ! fr_graze_sp , &
- ! fr_graze_phaeo , &
- ! mort_pre_diatoms , &
- ! mort_pre_sp , &
- ! mort_pre_phaeo , &
- ! mort_Tdep_diatoms, &
- ! mort_Tdep_sp , &
- ! mort_Tdep_phaeo , &
- ! k_exude_diatoms , &
- ! k_exude_sp , &
- ! k_exude_phaeo , &
- ! K_Nit_diatoms , &
- ! K_Nit_sp , &
- ! K_Nit_phaeo , &
- ! K_Am_diatoms , &
- ! K_Am_sp , &
- ! K_Am_phaeo , &
- ! K_Sil_diatoms , &
- ! K_Sil_sp , &
- ! K_Sil_phaeo , &
- ! K_Fe_diatoms , &
- ! K_Fe_sp , &
- ! K_Fe_phaeo , &
- ! f_don_protein , &
- ! kn_bac_protein , &
- ! f_don_Am_protein , &
- ! f_doc_s , &
- ! f_doc_l , &
- ! f_exude_s , &
- ! f_exude_l , &
- ! k_bac_s , &
- ! k_bac_l , &
- ! T_max , &
- ! fsal , &
- ! op_dep_min , &
- ! fr_graze_s , &
- ! fr_graze_e , &
- ! fr_mort2min , &
- ! fr_dFe , &
- ! k_nitrif , &
- ! t_iron_conv , &
- ! max_loss , &
- ! max_dfe_doc1 , &
- ! fr_resp_s , &
- ! y_sk_DMS , &
- ! t_sk_conv , &
- ! t_sk_ox , &
- ! algaltype_diatoms , &
- ! algaltype_sp , &
- ! algaltype_phaeo , &
- ! nitratetype , &
- ! ammoniumtype , &
- ! silicatetype , &
- ! dmspptype , &
- ! dmspdtype , &
- ! humtype , &
- ! doctype_s , &
- ! doctype_l , &
- ! dontype_protein , &
- ! fedtype_1 , &
- ! feptype_1 , &
- ! zaerotype_bc1 , &
- ! zaerotype_bc2 , &
- ! zaerotype_dust1 , &
- ! zaerotype_dust2 , &
- ! zaerotype_dust3 , &
- ! zaerotype_dust4 , &
- ! ratio_C2N_diatoms , &
- ! ratio_C2N_sp , &
- ! ratio_C2N_phaeo , &
- ! ratio_chl2N_diatoms, &
- ! ratio_chl2N_sp , &
- ! ratio_chl2N_phaeo , &
- ! F_abs_chl_diatoms , &
- ! F_abs_chl_sp , &
- ! F_abs_chl_phaeo , &
- ! ratio_C2N_proteins
-
- use ice_colpkg, only: &
- colpkg_init_parameters
+ subroutine init_icepack_package_configs(domain)
+
+ use icepack_intfc, only: &
+ icepack_init_parameters, &
+ icepack_write_parameters, &
+ icepack_configure, &
+ icepack_query_parameters ! debugging
+
+ use seaice_constants, only: &
+ seaicePuny, & ! a small number
+ seaiceBigNumber, & ! a large number
+ seaiceSecondsPerDay, & ! number of seconds in 1 day
+ seaiceDensityIce, & ! density of ice (kg/m^3)
+ seaiceDensitySnow, & ! density of snow (kg/m^3)
+ seaiceDensitySeaWater, & ! density of seawater (kg/m^3)
+ seaiceDensityFreshwater, & ! density of freshwater (kg/m^3)
+ seaiceFreshIceSpecificHeat, & ! specific heat of fresh ice (J/kg/K)
+ seaiceWaterVaporSpecificHeat, & ! specific heat of water vapor (J/kg/K)
+ seaiceAirSpecificHeat, & ! specific heat of air (J/kg/K)
+ seaiceSeaWaterSpecificHeat, & ! specific heat of ocn (J/kg/K)
+ seaiceLatentHeatVaporization, & ! latent heat, vaporization freshwater (J/kg)
+ seaiceZvir, & ! rh2o/rair - 1.0
+ seaiceLatentHeatSublimation, & ! latent heat, sublimation freshwater (J/kg)
+ seaiceLatentHeatMelting, & ! latent heat of melting of fresh ice (J/kg)
+ seaiceIceSurfaceMeltingTemperature, & ! melting temp. ice top surface (C)
+ seaiceSnowSurfaceMeltingTemperature, & ! melting temp. snow top surface (C)
+ seaiceStefanBoltzmann, & ! J m-2 K-4 s-1
+ seaiceIceSnowEmissivity, & ! emissivity of snow and ice
+ seaiceSnowSurfaceScatteringLayer, & ! snow surface scattering layer thickness (m)
+ seaiceStabilityReferenceHeight, & ! stability reference height (m)
+ seaiceFreshWaterFreezingPoint, & ! freezing temp of fresh ice (K)
+ seaiceIceSurfaceRoughness, & ! ice surface roughness (m)
+ seaiceVonKarmanConstant, & ! Von Karman constant
+ seaiceOceanAlbedo, & ! Ocean albedo
+ seaiceReferenceSalinity, & ! ice reference salinity (ppt)
+ seaiceMaximumSalinity, & ! ice maximum salinity (ppt)
+ seaiceMeltingTemperatureDepression, & ! melting temperature depression factor (C/ppt)
+ seaiceFrazilSalinityReduction, & ! bulk salinity reduction of newly formed frazil (ppt)
+ seaiceFrazilIcePorosity, & ! initial liquid fraction of frazil
+ seaicePi, & ! pi
+ seaiceGravity, & ! gravitational acceleration (m/s^2)
+ seaiceSnowPatchiness, & ! snow patchiness parameter
+ seaiceIceStrengthConstantHiblerP, & ! P* constant in Hibler strength formulation
+ seaiceIceStrengthConstantHiblerC, & ! C* constant in Hibler strength formulation
+ skeletalLayerThickness, & ! skeletal layer thickness
+ gramsCarbonPerMolCarbon, & ! grams carbon per mol carbon
+ seaiceSnowMinimumDensity, & ! minimum snow density (kg/m^3)
+ seaiceBrineDynamicViscosity, & ! dynamic viscosity of brine (kg/m/s)
+ seaiceFreezingTemperatureConstant, &! constant freezing temp of seawater (C)
+ seaiceExtinctionCoef, & ! vis extnctn coef in ice, wvlngth<700nm (1/m)
+ seaiceFreshIceConductivity, & ! thermal conductivity of fresh ice(W/m/deg)
+ seaiceSnowMinimumThickness, & ! min snow thickness for computing zTsn (m)
+ seaiceFrazilMinimumThickness, & ! min thickness of new frazil ice
+ seaiceAlbedoWtVisibleDirect, & ! visible, direct
+ seaiceAlbedoWtNearIRDirect, & ! near IR, direct
+ seaiceAlbedoWtVisibleDiffuse, & ! visible, diffuse
+ seaiceAlbedoWtNearIRDiffuse, & ! near IR, diffuse
+ seaiceQsatQiceConstant, & ! constant for saturation humidity over ice
+ seaiceQsatTiceConstant, & ! constant for saturation humidity over ice
+ seaiceQsatQocnConstant, & ! constant for saturation humidity over ocean
+ seaiceQsatTocnConstant ! constant for saturation humidity over ocean
type(domain_type), intent(inout) :: &
domain
+ type(MPAS_pool_type), pointer :: &
+ snow
+
character(len=strKIND), pointer :: &
config_thermodynamics_type, &
config_heat_conductivity_type, &
@@ -10097,13 +9953,17 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
config_itd_conversion_type, &
config_category_bounds_type, &
config_pond_refreezing_type, &
+ config_salt_flux_coupling_type, &
config_ocean_heat_transfer_type, &
+ config_frazil_coupling_type, &
config_sea_freezing_temperature_type, &
config_skeletal_bgc_flux_type, &
config_snow_redistribution_scheme
logical, pointer :: &
+ config_use_snicar_ad, &
config_calc_surface_temperature, &
+ config_update_ocean_fluxes, &
config_use_form_drag, &
config_use_high_frequency_coupling, &
config_use_ocean_mixed_layer, &
@@ -10113,10 +9973,13 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
config_use_vertical_biochemistry, &
config_use_shortwave_bioabsorption, &
config_use_skeletal_biochemistry, &
- config_use_vertical_zsalinity, &
config_use_modal_aerosols, &
- config_use_snicar_ad, &
- config_use_snow_liquid_ponds
+ config_use_macromolecules, &
+ config_do_restart_bgc, &
+ config_use_snow_liquid_ponds, &
+ config_use_snow_grain_radius, &
+ config_use_shortwave_redistribution, &
+ config_use_iron_solubility_file
real(kind=RKIND), pointer :: &
config_min_friction_velocity, &
@@ -10127,15 +9990,21 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
config_rapid_mode_aspect_ratio, &
config_slow_mode_drainage_strength, &
config_slow_mode_critical_porosity, &
+ config_macro_drainage_timescale, &
config_congelation_ice_porosity, &
+! config_frazil_ice_porosity, &
+! config_frazil_salinity_reduction, &
config_visible_ice_albedo, &
config_infrared_ice_albedo, &
config_visible_snow_albedo, &
config_infrared_snow_albedo, &
config_variable_albedo_thickness_limit, &
+! config_snow_surface_scattering_layer_depth, &
config_ice_shortwave_tuning_parameter, &
config_pond_shortwave_tuning_parameter, &
config_snow_shortwave_tuning_parameter, &
+ config_shortwave_redistribution_fraction, &
+ config_shortwave_redistribution_threshold, &
config_temp_change_snow_grain_radius_change, &
config_max_melting_snow_grain_radius, &
config_algae_absorption_coefficient, &
@@ -10151,10 +10020,6 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
config_biogrid_bottom_molecular_sublayer, &
config_bio_gravity_drainage_length_scale, &
config_biogrid_top_molecular_sublayer, &
- config_new_ice_fraction_biotracer, &
- config_fraction_biotracer_in_frazil, &
- config_zsalinity_molecular_sublayer, &
- config_zsalinity_gravity_drainage_scale, &
config_snow_porosity_at_ice_surface, &
config_ratio_Si_to_N_diatoms, &
config_ratio_Si_to_N_small_plankton, &
@@ -10172,8 +10037,6 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
config_ratio_Fe_to_DOC_saccharids, &
config_ratio_Fe_to_DOC_lipids, &
config_respiration_fraction_of_growth, &
- config_rapid_mobile_to_stationary_time, &
- config_long_mobile_to_stationary_time, &
config_algal_maximum_velocity, &
config_ratio_Fe_to_dust, &
config_solubility_of_Fe_in_dust, &
@@ -10240,52 +10103,50 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
config_DMSP_to_DMS_conversion_fraction, &
config_DMSP_to_DMS_conversion_time, &
config_DMS_oxidation_time, &
- config_mobility_type_diatoms, &
- config_mobility_type_small_plankton, &
- config_mobility_type_phaeocystis, &
- config_mobility_type_nitrate, &
- config_mobility_type_ammonium, &
- config_mobility_type_silicate, &
- config_mobility_type_DMSPp, &
- config_mobility_type_DMSPd, &
- config_mobility_type_humics, &
- config_mobility_type_saccharids, &
- config_mobility_type_lipids, &
- config_mobility_type_inorganic_carbon, &
- config_mobility_type_proteins, &
- config_mobility_type_dissolved_iron, &
- config_mobility_type_particulate_iron, &
- config_mobility_type_black_carbon1, &
- config_mobility_type_black_carbon2, &
- config_mobility_type_dust1, &
- config_mobility_type_dust2, &
- config_mobility_type_dust3, &
- config_mobility_type_dust4, &
- config_ratio_C_to_N_diatoms, &
- config_ratio_C_to_N_small_plankton, &
- config_ratio_C_to_N_phaeocystis, &
- config_ratio_chla_to_N_diatoms, &
- config_ratio_chla_to_N_small_plankton, &
- config_ratio_chla_to_N_phaeocystis, &
- config_scales_absorption_diatoms, &
- config_scales_absorption_small_plankton, &
- config_scales_absorption_phaeocystis, &
- config_ratio_C_to_N_proteins, &
config_fallen_snow_radius, &
config_new_snow_density, &
config_max_snow_density, &
config_minimum_wind_compaction, &
config_wind_compaction_factor, &
config_snow_redistribution_factor, &
- config_max_dry_snow_radius
+ config_max_dry_snow_radius, &
+ config_floediam, &
+ config_floeshape
+
+ real(kind=RKIND), dimension(:,:,:), pointer :: &
+ snowEmpiricalGrowthParameterTau, &
+ snowEmpiricalGrowthParameterKappa, &
+ snowPropertyRate
integer, pointer :: &
- config_boundary_layer_iteration_number
+ config_boundary_layer_iteration_number, &
+ nGrainAgingTemperature, &
+ nGrainAgingTempGradient, &
+ nGrainAgingSnowDensity
+
+ integer :: &
+ config_thermodynamics_type_int, &
+ config_ice_strength_formulation_int, &
+ config_ridging_participation_function_int, &
+ config_ridging_redistribution_function_int, &
+ config_itd_conversion_type_int, &
+ config_category_bounds_type_int
+
+ character(len=strKIND) :: tmp_config_shortwave_type
+ character(len=strKIND) :: tmp_config_snw_ssp_table
+ character(len=strKIND) :: snw_aging_table = 'snicar'
+
+ ! debugging
+ integer :: itmp1, itmp2
+ real(kind=RKIND) :: rtmp1, rtmp2
+ character(len=strKIND) :: ctmp1, ctmp2
call MPAS_pool_get_config(domain % configs, "config_thermodynamics_type", config_thermodynamics_type)
call MPAS_pool_get_config(domain % configs, "config_heat_conductivity_type", config_heat_conductivity_type)
call MPAS_pool_get_config(domain % configs, "config_ocean_heat_transfer_type", config_ocean_heat_transfer_type)
call MPAS_pool_get_config(domain % configs, "config_calc_surface_temperature", config_calc_surface_temperature)
+ call MPAS_pool_get_config(domain % configs, "config_update_ocean_fluxes", config_update_ocean_fluxes)
+ call MPAS_pool_get_config(domain % configs, "config_frazil_coupling_type", config_frazil_coupling_type)
call MPAS_pool_get_config(domain % configs, "config_min_friction_velocity", config_min_friction_velocity)
call MPAS_pool_get_config(domain % configs, "config_ice_ocean_drag_coefficient", config_ice_ocean_drag_coefficient)
call MPAS_pool_get_config(domain % configs, "config_snow_thermal_conductivity", config_snow_thermal_conductivity)
@@ -10294,7 +10155,10 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
call MPAS_pool_get_config(domain % configs, "config_rapid_mode_aspect_ratio", config_rapid_mode_aspect_ratio)
call MPAS_pool_get_config(domain % configs, "config_slow_mode_drainage_strength", config_slow_mode_drainage_strength)
call MPAS_pool_get_config(domain % configs, "config_slow_mode_critical_porosity", config_slow_mode_critical_porosity)
+ call MPAS_pool_get_config(domain % configs, "config_macro_drainage_timescale", config_macro_drainage_timescale)
call MPAS_pool_get_config(domain % configs, "config_congelation_ice_porosity", config_congelation_ice_porosity)
+! call MPAS_pool_get_config(domain % configs, "config_frazil_ice_porosity", config_frazil_ice_porosity)
+! call MPAS_pool_get_config(domain % configs, "config_frazil_salinity_reduction", config_frazil_salinity_reduction)
call MPAS_pool_get_config(domain % configs, "config_shortwave_type", config_shortwave_type)
call MPAS_pool_get_config(domain % configs, "config_use_snicar_ad", config_use_snicar_ad)
call MPAS_pool_get_config(domain % configs, "config_albedo_type", config_albedo_type)
@@ -10303,9 +10167,13 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
call MPAS_pool_get_config(domain % configs, "config_visible_snow_albedo", config_visible_snow_albedo)
call MPAS_pool_get_config(domain % configs, "config_infrared_snow_albedo", config_infrared_snow_albedo)
call MPAS_pool_get_config(domain % configs, "config_variable_albedo_thickness_limit", config_variable_albedo_thickness_limit)
+! call MPAS_pool_get_config(domain % configs, "config_snow_surface_scattering_layer_depth", config_snow_surface_scattering_layer_depth)
call MPAS_pool_get_config(domain % configs, "config_ice_shortwave_tuning_parameter", config_ice_shortwave_tuning_parameter)
call MPAS_pool_get_config(domain % configs, "config_pond_shortwave_tuning_parameter", config_pond_shortwave_tuning_parameter)
call MPAS_pool_get_config(domain % configs, "config_snow_shortwave_tuning_parameter", config_snow_shortwave_tuning_parameter)
+ call MPAS_pool_get_config(domain % configs, "config_use_shortwave_redistribution", config_use_shortwave_redistribution)
+ call MPAS_pool_get_config(domain % configs, "config_shortwave_redistribution_fraction", config_shortwave_redistribution_fraction)
+ call MPAS_pool_get_config(domain % configs, "config_shortwave_redistribution_threshold", config_shortwave_redistribution_threshold)
call MPAS_pool_get_config(domain % configs, "config_temp_change_snow_grain_radius_change", &
config_temp_change_snow_grain_radius_change)
call MPAS_pool_get_config(domain % configs, "config_max_melting_snow_grain_radius", config_max_melting_snow_grain_radius)
@@ -10326,6 +10194,7 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
call MPAS_pool_get_config(domain % configs, "config_category_bounds_type", config_category_bounds_type)
call MPAS_pool_get_config(domain % configs, "config_snow_to_ice_transition_depth", config_snow_to_ice_transition_depth)
call MPAS_pool_get_config(domain % configs, "config_pond_refreezing_type", config_pond_refreezing_type)
+ call MPAS_pool_get_config(domain % configs, "config_salt_flux_coupling_type", config_salt_flux_coupling_type)
call MPAS_pool_get_config(domain % configs, "config_pond_flushing_factor", config_pond_flushing_factor)
call MPAS_pool_get_config(domain % configs, "config_min_meltwater_retained_fraction", config_min_meltwater_retained_fraction)
call MPAS_pool_get_config(domain % configs, "config_max_meltwater_retained_fraction", config_max_meltwater_retained_fraction)
@@ -10339,17 +10208,15 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
call MPAS_pool_get_config(domain % configs, "config_use_vertical_biochemistry", config_use_vertical_biochemistry)
call MPAS_pool_get_config(domain % configs, "config_use_shortwave_bioabsorption", config_use_shortwave_bioabsorption)
call MPAS_pool_get_config(domain % configs, "config_use_modal_aerosols", config_use_modal_aerosols)
+ call MPAS_pool_get_config(domain % configs, "config_use_macromolecules", config_use_macromolecules)
+ call MPAS_pool_get_config(domain % configs, "config_use_iron_solubility_file", config_use_iron_solubility_file)
+ call MPAS_pool_get_config(domain % configs, "config_do_restart_bgc", config_do_restart_bgc)
call MPAS_pool_get_config(domain % configs, "config_use_skeletal_biochemistry", config_use_skeletal_biochemistry)
- call MPAS_pool_get_config(domain % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity)
call MPAS_pool_get_config(domain % configs, "config_biogrid_bottom_molecular_sublayer", &
config_biogrid_bottom_molecular_sublayer)
call MPAS_pool_get_config(domain % configs, "config_bio_gravity_drainage_length_scale", &
config_bio_gravity_drainage_length_scale)
call MPAS_pool_get_config(domain % configs, "config_biogrid_top_molecular_sublayer", config_biogrid_top_molecular_sublayer)
- call MPAS_pool_get_config(domain % configs, "config_zsalinity_gravity_drainage_scale", config_zsalinity_gravity_drainage_scale)
- call MPAS_pool_get_config(domain % configs, "config_new_ice_fraction_biotracer", config_new_ice_fraction_biotracer)
- call MPAS_pool_get_config(domain % configs, "config_fraction_biotracer_in_frazil", config_fraction_biotracer_in_frazil)
- call MPAS_pool_get_config(domain % configs, "config_zsalinity_molecular_sublayer", config_zsalinity_molecular_sublayer)
call MPAS_pool_get_config(domain % configs, "config_snow_porosity_at_ice_surface", config_snow_porosity_at_ice_surface)
call MPAS_pool_get_config(domain % configs, "config_ratio_Si_to_N_diatoms", config_ratio_Si_to_N_diatoms)
call MPAS_pool_get_config(domain % configs, "config_ratio_Si_to_N_small_plankton", config_ratio_Si_to_N_small_plankton)
@@ -10367,8 +10234,6 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_DOC_saccharids", config_ratio_Fe_to_DOC_saccharids)
call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_DOC_lipids", config_ratio_Fe_to_DOC_lipids)
call MPAS_pool_get_config(domain % configs, "config_respiration_fraction_of_growth", config_respiration_fraction_of_growth)
- call MPAS_pool_get_config(domain % configs, "config_rapid_mobile_to_stationary_time", config_rapid_mobile_to_stationary_time)
- call MPAS_pool_get_config(domain % configs, "config_long_mobile_to_stationary_time", config_long_mobile_to_stationary_time)
call MPAS_pool_get_config(domain % configs, "config_algal_maximum_velocity", config_algal_maximum_velocity)
call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_dust", config_ratio_Fe_to_dust)
call MPAS_pool_get_config(domain % configs, "config_solubility_of_Fe_in_dust", config_solubility_of_Fe_in_dust)
@@ -10444,1555 +10309,6 @@ subroutine init_column_package_configs(domain) !colpkg routine - remove
call MPAS_pool_get_config(domain % configs, "config_DMSP_to_DMS_conversion_fraction", config_DMSP_to_DMS_conversion_fraction)
call MPAS_pool_get_config(domain % configs, "config_DMSP_to_DMS_conversion_time", config_DMSP_to_DMS_conversion_time)
call MPAS_pool_get_config(domain % configs, "config_DMS_oxidation_time", config_DMS_oxidation_time)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_diatoms", config_mobility_type_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_small_plankton", config_mobility_type_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_phaeocystis", config_mobility_type_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_nitrate", config_mobility_type_nitrate)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_ammonium", config_mobility_type_ammonium)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_silicate", config_mobility_type_silicate)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_DMSPp", config_mobility_type_DMSPp)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_DMSPd", config_mobility_type_DMSPd)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_humics", config_mobility_type_humics)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_saccharids", config_mobility_type_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_lipids", config_mobility_type_lipids)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_inorganic_carbon", config_mobility_type_inorganic_carbon)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_proteins", config_mobility_type_proteins)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dissolved_iron", config_mobility_type_dissolved_iron)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_particulate_iron", config_mobility_type_particulate_iron)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_black_carbon1", config_mobility_type_black_carbon1)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_black_carbon2", config_mobility_type_black_carbon2)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust1", config_mobility_type_dust1)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust2", config_mobility_type_dust2)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust3", config_mobility_type_dust3)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust4", config_mobility_type_dust4)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_diatoms", config_ratio_C_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_small_plankton", config_ratio_C_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_phaeocystis", config_ratio_C_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_chla_to_N_diatoms", config_ratio_chla_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_chla_to_N_small_plankton", config_ratio_chla_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_chla_to_N_phaeocystis", config_ratio_chla_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_scales_absorption_diatoms", config_scales_absorption_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_scales_absorption_small_plankton", config_scales_absorption_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_scales_absorption_phaeocystis", config_scales_absorption_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_proteins", config_ratio_C_to_N_proteins)
- call MPAS_pool_get_config(domain % configs, "config_snow_redistribution_scheme", config_snow_redistribution_scheme)
- call MPAS_pool_get_config(domain % configs, "config_fallen_snow_radius", config_fallen_snow_radius)
- call MPAS_pool_get_config(domain % configs, "config_use_snow_liquid_ponds", config_use_snow_liquid_ponds)
- call MPAS_pool_get_config(domain % configs, "config_new_snow_density", config_new_snow_density)
- call MPAS_pool_get_config(domain % configs, "config_max_snow_density", config_max_snow_density)
- call MPAS_pool_get_config(domain % configs, "config_minimum_wind_compaction", config_minimum_wind_compaction)
- call MPAS_pool_get_config(domain % configs, "config_wind_compaction_factor", config_wind_compaction_factor)
- call MPAS_pool_get_config(domain % configs, "config_snow_redistribution_factor", config_snow_redistribution_factor)
- call MPAS_pool_get_config(domain % configs, "config_max_dry_snow_radius", config_max_dry_snow_radius)
-
- call colpkg_init_parameters(&
- config_cice_int("config_thermodynamics_type", config_thermodynamics_type), &
- config_heat_conductivity_type, &
- config_ocean_heat_transfer_type, &
- config_calc_surface_temperature, &
- config_min_friction_velocity, &
- config_ice_ocean_drag_coefficient, &
- config_snow_thermal_conductivity, &
- config_rapid_mode_channel_radius, &
- config_rapid_model_critical_Ra, &
- config_rapid_mode_aspect_ratio, &
- config_slow_mode_drainage_strength, &
- config_slow_mode_critical_porosity, &
- config_congelation_ice_porosity, &
- config_shortwave_type, &
- config_use_snicar_ad, &
- config_albedo_type, &
- config_visible_ice_albedo, &
- config_infrared_ice_albedo, &
- config_visible_snow_albedo, &
- config_infrared_snow_albedo, &
- config_variable_albedo_thickness_limit, &
- config_ice_shortwave_tuning_parameter, &
- config_pond_shortwave_tuning_parameter, &
- config_snow_shortwave_tuning_parameter, &
- config_temp_change_snow_grain_radius_change, &
- config_max_melting_snow_grain_radius, &
- config_algae_absorption_coefficient, &
- config_cice_int("config_ice_strength_formulation", config_ice_strength_formulation), &
- config_cice_int("config_ridging_participation_function", config_ridging_participation_function), &
- config_cice_int("config_ridging_redistribution_function", config_ridging_redistribution_function), &
- config_ridging_efolding_scale, &
- config_ratio_ridging_work_to_PE, &
- config_atmos_boundary_method, &
- config_calc_surface_stresses, &
- config_use_form_drag, &
- config_use_high_frequency_coupling, &
- config_boundary_layer_iteration_number, &
- config_use_ocean_mixed_layer, &
- config_sea_freezing_temperature_type, &
- config_cice_int("config_itd_conversion_type", config_itd_conversion_type), &
- config_cice_int("config_category_bounds_type", config_category_bounds_type), &
- config_snow_to_ice_transition_depth, &
- config_pond_refreezing_type, &
- config_pond_flushing_factor, &
- config_min_meltwater_retained_fraction, &
- config_max_meltwater_retained_fraction, &
- config_pond_depth_to_fraction_ratio, &
- config_snow_on_pond_ice_tapering_parameter, &
- config_critical_pond_ice_thickness, &
- config_skeletal_bgc_flux_type, &
- config_use_vertical_tracers, &
- config_scale_initial_vertical_bgc, &
- config_use_vertical_biochemistry, &
- config_use_shortwave_bioabsorption, &
- config_use_modal_aerosols, &
- config_use_skeletal_biochemistry, &
- config_use_vertical_zsalinity, &
- config_biogrid_bottom_molecular_sublayer, &
- config_bio_gravity_drainage_length_scale, &
- config_biogrid_top_molecular_sublayer, &
- config_new_ice_fraction_biotracer, &
- config_fraction_biotracer_in_frazil, &
- config_zsalinity_molecular_sublayer, &
- config_zsalinity_gravity_drainage_scale, &
- config_snow_porosity_at_ice_surface, &
- config_ratio_Si_to_N_diatoms, &
- config_ratio_Si_to_N_small_plankton, &
- config_ratio_Si_to_N_phaeocystis, &
- config_ratio_S_to_N_diatoms, &
- config_ratio_S_to_N_small_plankton, &
- config_ratio_S_to_N_phaeocystis, &
- config_ratio_Fe_to_C_diatoms, &
- config_ratio_Fe_to_C_small_plankton, &
- config_ratio_Fe_to_C_phaeocystis, &
- config_ratio_Fe_to_N_diatoms, &
- config_ratio_Fe_to_N_small_plankton, &
- config_ratio_Fe_to_N_phaeocystis, &
- config_ratio_Fe_to_DON, &
- config_ratio_Fe_to_DOC_saccharids, &
- config_ratio_Fe_to_DOC_lipids, &
- config_respiration_fraction_of_growth, &
- config_rapid_mobile_to_stationary_time, &
- config_long_mobile_to_stationary_time, &
- config_algal_maximum_velocity, &
- config_ratio_Fe_to_dust, &
- config_solubility_of_Fe_in_dust, &
- config_chla_absorptivity_of_diatoms, &
- config_chla_absorptivity_of_small_plankton, &
- config_chla_absorptivity_of_phaeocystis, &
- config_light_attenuation_diatoms, &
- config_light_attenuation_small_plankton, &
- config_light_attenuation_phaeocystis, &
- config_light_inhibition_diatoms, &
- config_light_inhibition_small_plankton, &
- config_light_inhibition_phaeocystis, &
- config_maximum_growth_rate_diatoms, &
- config_maximum_growth_rate_small_plankton, &
- config_maximum_growth_rate_phaeocystis, &
- config_temperature_growth_diatoms, &
- config_temperature_growth_small_plankton, &
- config_temperature_growth_phaeocystis, &
- config_grazed_fraction_diatoms, &
- config_grazed_fraction_small_plankton, &
- config_grazed_fraction_phaeocystis, &
- config_mortality_diatoms, &
- config_mortality_small_plankton, &
- config_mortality_phaeocystis, &
- config_temperature_mortality_diatoms, &
- config_temperature_mortality_small_plankton, &
- config_temperature_mortality_phaeocystis, &
- config_exudation_diatoms, &
- config_exudation_small_plankton, &
- config_exudation_phaeocystis, &
- config_nitrate_saturation_diatoms, &
- config_nitrate_saturation_small_plankton, &
- config_nitrate_saturation_phaeocystis, &
- config_ammonium_saturation_diatoms, &
- config_ammonium_saturation_small_plankton, &
- config_ammonium_saturation_phaeocystis, &
- config_silicate_saturation_diatoms, &
- config_silicate_saturation_small_plankton, &
- config_silicate_saturation_phaeocystis, &
- config_iron_saturation_diatoms, &
- config_iron_saturation_small_plankton, &
- config_iron_saturation_phaeocystis, &
- config_fraction_spilled_to_DON, &
- config_degredation_of_DON, &
- config_fraction_DON_ammonium, &
- config_fraction_loss_to_saccharids, &
- config_fraction_loss_to_lipids, &
- config_fraction_exudation_to_saccharids, &
- config_fraction_exudation_to_lipids, &
- config_remineralization_saccharids, &
- config_remineralization_lipids, &
- config_maximum_brine_temperature, &
- config_salinity_dependence_of_growth, &
- config_minimum_optical_depth, &
- config_slopped_grazing_fraction, &
- config_excreted_fraction, &
- config_fraction_mortality_to_ammonium, &
- config_fraction_iron_remineralized, &
- config_nitrification_rate, &
- config_desorption_loss_particulate_iron, &
- config_maximum_loss_fraction, &
- config_maximum_ratio_iron_to_saccharids, &
- config_respiration_loss_to_DMSPd, &
- config_DMSP_to_DMS_conversion_fraction, &
- config_DMSP_to_DMS_conversion_time, &
- config_DMS_oxidation_time, &
- config_mobility_type_diatoms, &
- config_mobility_type_small_plankton, &
- config_mobility_type_phaeocystis, &
- config_mobility_type_nitrate, &
- config_mobility_type_ammonium, &
- config_mobility_type_silicate, &
- config_mobility_type_DMSPp, &
- config_mobility_type_DMSPd, &
- config_mobility_type_humics, &
- config_mobility_type_saccharids, &
- config_mobility_type_lipids, &
- config_mobility_type_inorganic_carbon, &
- config_mobility_type_proteins, &
- config_mobility_type_dissolved_iron, &
- config_mobility_type_particulate_iron, &
- config_mobility_type_black_carbon1, &
- config_mobility_type_black_carbon2, &
- config_mobility_type_dust1, &
- config_mobility_type_dust2, &
- config_mobility_type_dust3, &
- config_mobility_type_dust4, &
- config_ratio_C_to_N_diatoms, &
- config_ratio_C_to_N_small_plankton, &
- config_ratio_C_to_N_phaeocystis, &
- config_ratio_chla_to_N_diatoms, &
- config_ratio_chla_to_N_small_plankton, &
- config_ratio_chla_to_N_phaeocystis, &
- config_scales_absorption_diatoms, &
- config_scales_absorption_small_plankton, &
- config_scales_absorption_phaeocystis, &
- config_ratio_C_to_N_proteins, &
- config_snow_redistribution_scheme, &
- config_use_snow_liquid_ponds, &
- config_fallen_snow_radius, &
- config_max_dry_snow_radius, &
- config_new_snow_density, &
- config_max_snow_density, &
- config_minimum_wind_compaction, &
- config_wind_compaction_factor, &
- config_snow_redistribution_factor)
-
- !-----------------------------------------------------------------------
- ! Parameters for thermodynamics
- !-----------------------------------------------------------------------
-
- ! ktherm:
- ! type of thermodynamics
- ! 1 = Bitz and Lipscomb 1999
- ! 2 = mushy layer theory
- !ktherm = config_cice_int("config_thermodynamics_type", config_thermodynamics_type)
-
- ! conduct:
- ! 'MU71' or 'bubbly'
- !conduct = config_heat_conductivity_type
-
- ! calc_Tsfc:
- ! if true, calculate surface temperature
- ! if false, Tsfc is computed elsewhere and
- ! atmos-ice fluxes are provided to CICE
- !calc_Tsfc = config_calc_surface_temperature
-
- ! ustar_min:
- ! minimum friction velocity for ice-ocean heat flux
- !ustar_min = config_min_friction_velocity
-
- ! mushy thermodynamics:
-
- ! a_rapid_mode:
- ! channel radius for rapid drainage mode (m)
- !a_rapid_mode = config_rapid_mode_channel_radius
-
- ! Rac_rapid_mode:
- ! critical rayleigh number for rapid drainage mode
- !Rac_rapid_mode = config_rapid_model_critical_Ra
-
- ! aspect_rapid_mode:
- ! aspect ratio for rapid drainage mode (larger=wider)
- !aspect_rapid_mode = config_rapid_mode_aspect_ratio
-
- ! dSdt_slow_mode:
- ! slow mode drainage strength (m s-1 K-1)
- !dSdt_slow_mode = config_slow_mode_drainage_strength
-
- ! phi_c_slow_mode:
- ! liquid fraction porosity cutoff for slow mode
- !phi_c_slow_mode = config_slow_mode_critical_porosity
-
- ! phi_i_mushy:
- ! liquid fraction of congelation ice
- !phi_i_mushy = config_congelation_ice_porosity
-
- !-----------------------------------------------------------------------
- ! Parameters for radiation
- !-----------------------------------------------------------------------
-
- ! shortwave:
- ! shortwave method, 'default' ('ccsm3') or 'dEdd'
- !shortwave = config_shortwave_type
-
- ! albedo_type:
- ! albedo parameterization, 'default' ('ccsm3') or 'constant'
- ! shortwave='dEdd' overrides this parameter
- !albedo_type = config_albedo_type
-
- ! baseline albedos for ccsm3 shortwave, set in namelist
-
- ! albicev:
- ! visible ice albedo for h > ahmax
- !albicev = config_visible_ice_albedo
-
- ! albicei:
- ! near-ir ice albedo for h > ahmax
- !albicei = config_infrared_ice_albedo
-
- ! albsnowv:
- ! cold snow albedo, visible
- !albsnowv = config_visible_snow_albedo
-
- ! albsnowi:
- ! cold snow albedo, near IR
- !albsnowi = config_infrared_snow_albedo
-
- ! ahmax:
- ! thickness above which ice albedo is constant (m)
- !ahmax = config_variable_albedo_thickness_limit
-
- ! dEdd tuning parameters, set in namelist
-
- ! R_ice:
- ! sea ice tuning parameter; +1 > 1sig increase in albedo
- !R_ice = config_ice_shortwave_tuning_parameter
-
- ! R_pnd:
- ! ponded ice tuning parameter; +1 > 1sig increase in albedo
- !R_pnd = config_pond_shortwave_tuning_parameter
-
- ! R_snw:
- ! snow tuning parameter; +1 > ~.01 change in broadband albedo
- !R_snw = config_snow_shortwave_tuning_parameter
-
- ! dT_mlt:
- ! change in temp for non-melt to melt snow grain radius change (C)
- !dT_mlt = config_temp_change_snow_grain_radius_change
-
- ! rsnw_mlt:
- ! maximum melting snow grain radius (10^-6 m)
- !rsnw_mlt = config_max_melting_snow_grain_radius
-
- ! kalg:
- ! algae absorption coefficient for 0.5 m thick layer
- !kalg = config_algae_absorption_coefficient
-
- !-----------------------------------------------------------------------
- ! Parameters for ridging and strength
- !-----------------------------------------------------------------------
-
- ! kstrength:
- ! 0 for simple Hibler (1979) formulation
- ! 1 for Rothrock (1975) pressure formulation
- !kstrength = config_cice_int("config_ice_strength_formulation", config_ice_strength_formulation)
-
- ! krdg_partic:
- ! 0 for Thorndike et al. (1975) formulation
- ! 1 for exponential participation function
- !krdg_partic = config_cice_int("config_ridging_participation_function", config_ridging_participation_function)
-
- ! krdg_redist:
- ! 0 for Hibler (1980) formulation
- ! 1 for exponential redistribution function
- !krdg_redist = config_cice_int("config_ridging_redistribution_function", config_ridging_redistribution_function)
-
- ! mu_rdg:
- ! gives e-folding scale of ridged ice (m^.5)
- ! (krdg_redist = 1)
- !mu_rdg = config_ridging_efolding_scale
-
- ! Cf
- ! ratio of ridging work to PE change in ridging (kstrength = 1)
- !Cf = config_ratio_ridging_work_to_PE
-
- !-----------------------------------------------------------------------
- ! Parameters for atmosphere
- !-----------------------------------------------------------------------
-
- ! atmbndy:
- ! atmo boundary method, 'default' ('ccsm3') or 'constant'
- !atmbndy = config_atmos_boundary_method
-
- ! calc_strair:
- ! if true, calculate wind stress components
- !calc_strair = config_calc_surface_stresses
-
- ! formdrag:
- ! if true, calculate form drag
- !formdrag = config_use_form_drag
-
- ! highfreq:
- ! if true, use high frequency coupling
- !highfreq = config_use_high_frequency_coupling
-
- ! natmiter:
- ! number of iterations for boundary layer calculations
- !natmiter = config_boundary_layer_iteration_number
-
- !-----------------------------------------------------------------------
- ! Parameters for ocean
- !-----------------------------------------------------------------------
-
- ! oceanmixed_ice:
- ! if true, use ocean mixed layer
- !oceanmixed_ice = config_use_ocean_mixed_layer
-
- ! fbot_xfer_type:
- ! transfer coefficient type for ice-ocean heat flux
- !fbot_xfer_type = config_ocean_heat_transfer_type
-
- ! tfrz_option:
- ! form of ocean freezing temperature
- ! 'minus1p8' = -1.8 C
- ! 'linear_salt' = -depressT * sss
- ! 'mushy' conforms with ktherm=2
- !tfrz_option = config_sea_freezing_temperature_type
-
- !-----------------------------------------------------------------------
- ! Parameters for the ice thickness distribution
- !-----------------------------------------------------------------------
-
- ! kitd:
- ! type of itd conversions
- ! 0 = delta function
- ! 1 = linear remap
- !kitd = config_cice_int("config_itd_conversion_type", config_itd_conversion_type)
-
- ! kcatbound:
- ! 0 = old category boundary formula
- ! 1 = new formula giving round numbers
- ! 2 = WMO standard
- ! 3 = asymptotic formula
- !kcatbound = config_cice_int("config_category_bounds_type", config_category_bounds_type)
-
- !-----------------------------------------------------------------------
- ! Parameters for melt ponds
- !-----------------------------------------------------------------------
-
- ! hs0:
- ! snow depth for transition to bare sea ice (m)
- !hs0 = config_snow_to_ice_transition_depth
-
- ! level-ice ponds
-
- ! frzpnd:
- ! pond refreezing parameterization
- !frzpnd = config_pond_refreezing_type
-
- ! dpscale:
- ! alters e-folding time scale for flushing with BL99 thermodynamics
- !dpscale = config_pond_flushing_factor
-
- ! rfracmin:
- ! minimum retained fraction of meltwater
- !rfracmin = config_min_meltwater_retained_fraction
-
- ! rfracmax:
- ! maximum retained fraction of meltwater
- !rfracmax = config_max_meltwater_retained_fraction
-
- ! pndaspect:
- ! ratio of pond depth to pond fraction
- !pndaspect = config_pond_depth_to_fraction_ratio
-
- ! hs1:
- ! tapering parameter for snow on pond ice
- !hs1 = config_snow_on_pond_ice_tapering_parameter
-
- ! topo ponds
-
- ! hp1
- ! critical parameter for pond ice thickness
- !hp1 = config_critical_pond_ice_thickness
-
- !-----------------------------------------------------------------------
- ! Parameters for biogeochemistry
- !-----------------------------------------------------------------------
-
- ! bgc_flux_type:
- ! bgc_flux_type = config_skeletal_bgc_flux_type
-
- ! z_tracers:
- ! if .true., bgc or aerosol tracers are vertically resolved
- !z_tracers = config_use_vertical_tracers
-
- ! scale_bgc:
- ! if .true., initialize bgc tracers proportionally with salinity
- !scale_bgc = config_scale_initial_vertical_bgc
-
- ! solve_zbgc:
- ! if .true., solve vertical biochemistry portion of code
- !solve_zbgc = config_use_vertical_biochemistry
-
- ! dEdd_algae:
- ! if .true., algal absorption of Shortwave is computed in the
- !dEdd_algae = config_use_shortwave_bioabsorption
-
- ! skl_bgc:
- ! if true, solve skeletal biochemistry
- !skl_bgc = config_use_skeletal_biochemistry
-
-! zsalinity has been deprecated
-! ! solve_zsal:
-! ! if true, update salinity profile from solve_S_dt
-! !solve_zsal = config_use_vertical_zsalinity
-
- ! modal_aero:
- ! if true, use modal aerosal optical properties
- ! only for use with tr_aero or tr_zaero
- !modal_aero = config_use_shortwave_bioabsorption
-
- ! grid_o:
- ! for bottom flux
- !grid_o = config_biogrid_bottom_molecular_sublayer
-
- ! l_sk:
- ! characteristic diffusive scale (zsalinity) (m)
- !l_sk =config_bio_gravity_drainage_length_scale
-
- ! grid_o_t:
- ! top grid point length scale
- !grid_o_t = config_biogrid_top_molecular_sublayer
-
- ! phi_snow:
- ! porosity of snow
- !phi_snow = config_snow_porosity_at_ice_surface
-
- ! initbio_frac:
- ! fraction of ocean tracer concentration used to initialize tracer
- !initbio_frac = config_new_ice_fraction_biotracer
-
- ! frazil_scav:
- ! multiple of ocean tracer concentration due to frazil scavenging
- !frazil_scav = config_fraction_biotracer_in_frazil
-
- ! ratio_Si2N_diatoms:
- ! ratio of algal Silicate to Nitrate (mol/mol)
- ! ratio_Si2N_diatoms = config_ratio_Si_to_N_diatoms
-
- ! ratio_Si2N_sp:
- ! ratio of algal Silicate to Nitrogen (mol/mol)
- ! ratio_Si2N_sp = config_ratio_Si_to_N_small_plankton
-
- ! ratio_Si2N_phaeo:
- ! ratio of algal Silicate to Nitrogen (mol/mol)
- ! ratio_Si2N_phaeo = config_ratio_Si_to_N_phaeocystis
-
- ! ratio_S2N_diatoms:
- ! ratio of algal Sulphur to Nitrogen (mol/mol)
- ! ratio_S2N_diatoms = config_ratio_S_to_N_diatoms
-
- ! ratio_S2N_sp:
- ! ratio of algal Sulphur to Nitrogen (mol/mol)
- ! ratio_S2N_sp = config_ratio_S_to_N_small_plankton
-
- ! ratio_S2N_phaeo:
- ! ratio of algal Sulphur to Nitrogen (mol/mol)
- ! ratio_S2N_phaeo = config_ratio_S_to_N_phaeocystis
-
- ! ratio_Fe2C_diatoms:
- ! ratio of algal iron to carbon (umol/mol)
- ! ratio_Fe2C_diatoms = config_ratio_Fe_to_C_diatoms
-
- ! ratio_Fe2C_sp:
- ! ratio of algal iron to carbon (umol/mol)
- ! ratio_Fe2C_sp = config_ratio_Fe_to_C_small_plankton
-
- ! ratio_Fe2C_phaeo:
- ! ratio of algal iron to carbon (umol/mol)
- ! ratio_Fe2C_phaeo = config_ratio_Fe_to_C_phaeocystis
-
- ! ratio_Fe2N_diatoms:
- ! ratio of algal iron to nitrogen (umol/mol)
- ! ratio_Fe2N_diatoms = config_ratio_Fe_to_N_diatoms
-
- ! ratio_Fe2N_sp:
- ! ratio of algal iron to nitrogen (umol/mol)
- ! ratio_Fe2N_sp = config_ratio_Fe_to_N_small_plankton
-
- ! ratio_Fe2N_phaeo:
- ! ratio of algal iron to nitrogen (umol/mol)
- ! ratio_Fe2N_phaeo = config_ratio_Fe_to_N_phaeocystis
-
- ! ratio_Fe2DON:
- ! ratio of iron to nitrogen of DON (nmol/umol)
- ! ratio_Fe2DON = config_ratio_Fe_to_DON
-
- ! ratio_Fe2DOC_s:
- ! ratio of iron to carbon of DOC (nmol/umol) saccharids
- ! ratio_Fe2DOC_s = config_ratio_Fe_to_DOC_saccharids
-
- ! ratio_Fe2DOC_l:
- ! ratio of iron to carbon of DOC (nmol/umol) lipids
- ! ratio_Fe2DOC_l = config_ratio_Fe_to_DOC_lipids
-
- ! fr_resp:
- ! fraction of algal growth lost due to respiration
- ! fr_resp = config_respiration_fraction_of_growth
-
- ! tau_min:
- ! rapid mobile to stationary exchanges (s) = 1.5 hours
- ! tau_min = config_rapid_mobile_to_stationary_time
-
- ! tau_max:
- ! long time mobile to stationary exchanges (s) = 2 days
- ! tau_max = config_long_mobile_to_stationary_time
-
- ! algal_vel:
- ! 0.5 cm/d(m/s) Lavoie 2005 1.5 cm/day
- ! algal_vel = config_algal_maximum_velocity
-
- ! R_dFe2dust:
- ! g/g (3.5% content) Tagliabue 2009
- ! R_dFe2dust = config_ratio_Fe_to_dust
-
- ! dustFe_sol;
- ! solubility fraction
- ! dustFe_sol = config_solubility_of_Fe_in_dust
-
- ! chlabs_diatoms:
- ! chl absorption (1/m/(mg/m^3))
- ! chlabs_diatoms = config_chla_absorptivity_of_diatoms
-
- ! chlabs_sp:
- ! chl absorption (1/m/(mg/m^3))
- ! chlabs_sp = config_chla_absorptivity_of_small_plankton
-
- ! chlabs_phaeo:
- ! chl absorption (1/m/(mg/m^3))
- ! chlabs_phaeo = config_chla_absorptivity_of_phaeocystis
-
- ! alpha2max_low_diatoms:
- ! light limitation diatoms (1/(W/m^2))
- ! alpha2max_low_diatoms = config_light_attenuation_diatoms
-
- ! alpha2max_low_sp:
- ! light limitation small plankton (1/(W/m^2))
- ! alpha2max_low_sp = config_light_attenuation_small_plankton
-
- ! alpha2max_low_phaeo:
- ! light limitation phaeocystis (1/(W/m^2))
- ! alpha2max_low_phaeo = config_light_attenuation_phaeocystis
-
- ! beta2max_diatoms:
- ! light inhibition diatoms(1/(W/m^2))
- ! beta2max_diatoms = config_light_inhibition_diatoms
-
- ! beta2max_sp:
- ! light inhibition small plankton(1/(W/m^2))
- ! beta2max_sp = config_light_inhibition_small_plankton
-
- ! beta2max_phaeo:
- ! light inhibition phaeocystis (1/(W/m^2))
- ! beta2max_phaeo = config_light_inhibition_phaeocystis
-
- ! mu_max_diatoms:
- ! maximum growth rate diatoms (1/day)
- ! mu_max_diatoms = config_maximum_growth_rate_diatoms
-
- ! mu_max_sp:
- ! maximum growth rate small plankton (1/day)
- ! mu_max_sp = config_maximum_growth_rate_small plankton
-
- ! mu_max_phaeo:
- ! maximum growth rate phaeocystis (1/day)
- ! mu_max_phaeo = config_maximum_growth_rate_phaeocystis
-
- ! grow_Tdep_sp:
- ! Temperature dependence of growth small plankton (1/C)
- ! grow_Tdep_sp = config_temperature_growth_small_plankton
-
- ! grow_Tdep_phaeo:
- ! Temperature dependence of growth phaeocystis (1/C)
- ! grow_Tdep_phaeo = config_temperature_growth_phaeocystis
-
- ! fr_graze_diatoms:
- ! Fraction grazed diatoms
- ! fr_graze_diatoms = config_grazed_fraction_diatoms
-
- ! fr_graze_sp:
- ! Fraction grazed small_plankton
- ! fr_graze_sp = config_grazed_fraction_small_plankton
-
- ! fr_graze_phaeo:
- ! Fraction grazed phaeocystis
- ! fr_graze_phaeo = config_grazed_fraction_phaeocystis
-
- ! mort_pre_diatoms:
- ! Mortality diatoms (1/day)
- ! mort_pre_diatoms = config_mortality_diatoms
-
- ! mort_pre_sp:
- ! Mortality small_plankton (1/day)
- ! mort_pre_sp = config_mortality_small_plankton
-
- ! mort_pre_phaeo:
- ! Mortality phaeocystis (1/day)
- ! mort_pre_phaeo = config_mortality_phaeocystis
-
- ! mort_Tdep_diatoms:
- ! T dependence of mortality diatoms (1/C)
- ! mort_Tdep_diatoms = config_temperature_mortality_diatoms
-
- ! mort_Tdep_sp:
- ! T dependence of mortality small plankton (1/C)
- ! mort_Tdep_sp = config_temperature_mortality_small_plankton
-
- ! mort_Tdep_phaeo:
- ! T dependence of mortality phaeocystis (1/C)
- ! mort_Tdep_phaeo = config_temperature_mortality_phaeocystis
-
- ! k_exude_diatoms:
- ! algal exudation diatoms (1/d)
- ! k_exude_diatoms = config_exudation_diatoms
-
- ! k_exude_sp:
- ! algal exudation small_plankton (1/d)
- ! k_exude_sp = config_exudation_small_plankton
-
- ! k_exude_phaeo:
- ! algal exudation phaeocystis (1/d)
- ! k_exude_phaeo = config_exudation_phaeocystis
-
- ! K_Nit_diatoms:
- ! nitrate half saturation diatoms (mmol/m^3)
- ! K_Nit_diatoms = config_nitrate_saturation_diatoms
-
- ! K_Nit_sp:
- ! nitrate half saturation small_plankton (mmol/m^3)
- ! K_Nit_sp = config_nitrate_saturation_small_plankton
-
- ! K_Nit_phaeo:
- ! nitrate half saturation phaeocystis (mmol/m^3)
- ! K_Nit_phaeocystis = config_nitrate_saturation_phaeocystis
-
- ! K_Am_diatoms:
- ! ammonium half saturation diatoms (mmol/m^3)
- ! K_Am_diatoms = config_ammonium_saturation_diatoms
-
- ! K_Am_sp:
- ! ammonium half saturation small_plankton (mmol/m^3)
- ! K_Am_sp = config_ammonium_saturation_small_plankton
-
- ! K_Am_phaeo:
- ! ammonium half saturation phaeocystis (mmol/m^3)
- ! K_Am_phaeocystis = config_ammonium_saturation_phaeocystis
-
- ! K_Sil_diatoms:
- ! silicate half saturation diatoms (mmol/m^3)
- ! K_Sil_diatoms = config_silicate_saturation_diatoms
-
- ! K_Sil_sp:
- ! silicate half saturation small_plankton (mmol/m^3)
- ! K_Sil_sp = config_silicate_saturation_small_plankton
-
- ! K_Sil_phaeo:
- ! silicate half saturation phaeocystis (mmol/m^3)
- ! K_Sil_phaeocystis = config_silicate_saturation_phaeocystis
-
- ! K_Fe_diatoms:
- ! iron half saturation diatoms (nM)
- ! K_Fe_diatoms = config_iron_saturation_diatoms
-
- ! K_Fe_sp:
- ! iron half saturation small_plankton (nM)
- ! K_Fe_sp = config_iron_saturation_small_plankton
-
- ! K_Fe_phaeo:
- ! iron half saturation phaeocystis (nM)
- ! K_Fe_phaeocystis = config_iron_saturation_phaeocystis
-
- ! f_don_protein:
- ! fraction of spilled grazing to proteins !
- ! f_don_protein = config_fraction_spilled_to_DON
-
- ! kn_bac_protein:
- ! Bacterial degredation of DON (1/d) ! !
- ! kn_bac_protein = config_degredation_of_DON
-
- ! f_don_Am_protein:
- ! fraction of remineralized DON to ammonium !
- ! f_don_Am_protein = config_fraction_DON_ammonium
-
- ! f_doc_s:
- ! fraction of mortality to DOC saccharids
- ! f_doc_s = config_fraction_loss_to_saccharids
-
- ! f_doc_l:
- ! fraction of mortality to DOC lipids
- ! f_doc_l = config_fraction_loss_to_lipids
-
- ! f_exude_s:
- ! fraction of exudation to DOC saccharids
- ! f_exude_s = config_fraction_exudation_to_saccharids
-
- ! f_exude_l:
- ! fraction of exudation to DOC lipids
- ! f_exude_l = config_fraction_exudation_to_lipids
-
- ! k_bac_s:
- ! Bacterial degredation of DOC (1/d) saccharids
- ! k_bac_s = config_remineralization_saccharids
-
- ! k_bac_l:
- ! Bacterial degredation of DOC (1/d) lipids
- ! k_bac_l = config_remineralization_lipids
-
- ! T_max:
- ! maximum temperature (C)
- ! T_max = config_maximum_brine_temperature
-
- ! fsal:
- ! Salinity limitation (ppt)
- ! fsal = config_salinity_dependence_of_growth
-
- ! op_dep_min:
- ! Light attenuates for optical depths exceeding min
- ! op_dep_min = config_minimum_optical_depth
-
- ! fr_graze_s:
- ! fraction of grazing spilled or slopped
- ! fr_graze_s = config_slopped_grazing_fraction
-
- ! fr_graze_e:
- ! fraction of assimilation excreted
- ! fr_graze_e = config_excreted_fraction
-
- ! fr_mort2min:
- ! fractionation of mortality to Am
- ! fr_mort2min = config_fraction_mortality_to_ammonium
-
- ! fr_dFe:
- ! remineralized nitrogen (in units of algal iron)
- ! fr_dFe = config_fraction_iron_remineralized
-
- ! k_nitrif:
- ! nitrification rate (1/day)
- ! k_nitrif = config_nitrification_rate
-
- ! t_iron_conv:
- ! desorption loss pFe to dFe (day)
- ! t_iron_conv = config_desorption_loss_particulate_iron
-
- ! max_loss:
- ! restrict uptake to % of remaining value
- ! max_loss = config_maximum_loss_fraction
-
- ! max_dfe_doc1:
- ! max ratio of dFe to saccharides in the ice (nM Fe/muM C)
- ! max_dfe_doc1 = config_maximum_ratio_iron_to_saccharids
-
- ! fr_resp_s:
- ! DMSPd fraction of respiration loss as DMSPd
- ! fr_resp_s = config_respiration_loss_to_DMSPd
-
- ! y_sk_DMS:
- ! fraction conversion given high yield
- ! y_sk_DMS = config_DMSP_to_DMS_conversion_fraction
-
- ! t_sk_conv:
- ! Stefels conversion time (d)
- ! t_sk_conv = config_DMSP_to_DMS_conversion_time
-
- ! t_sk_ox:
- ! DMS oxidation time (d)
- ! t_sk_ox = config_DMS_oxidation_time
-
- ! algaltype_diatoms:
- ! mobility type diatoms
- ! algaltype_diatoms = config_mobility_type_diatoms
-
- ! algaltype_sp:
- ! mobility type small_plankton
- ! algaltype_sp = config_mobility_type_small_plankton
-
- ! algaltype_phaeo:
- ! mobility type phaeocystis
- ! algaltype_phaeo = config_mobility_type_phaeocystis
-
- ! nitratetype:
- ! mobility type nitrate
- ! nitratetype = config_mobility_type_nitrate
-
- ! ammoniumtype:
- ! mobility type ammonium
- ! ammoniumtype = config_mobility_type_ammonium
-
- ! silicatetype:
- ! mobility type silicate
- ! silicatetype = config_mobility_type_silicate
-
- ! dmspptype:
- ! mobility type DMSPp
- ! dmspptype = config_mobility_type_DMSPp
-
- ! dmspdtype:
- ! mobility type DMSPd
- ! dmspdtype = config_mobility_type_DMSPd
-
- ! humicstype:
- ! mobility type humics
- ! humicstype = config_mobility_type_humics
-
- ! doctype_s:
- ! mobility type sachharids
- ! doctype_s = config_mobility_type_saccharids
-
- ! doctype_l:
- ! mobility type lipids
- ! doctype_l = config_mobility_type_lipids
-
- ! dictype_1:
- ! mobility type dissolved inorganic carbon
- ! dictype_1 = config_mobility_type_inorganic_carbon
-
- ! dontype_protein:
- ! mobility type proteins
- ! dontype_protein = config_mobility_type_proteins
-
- ! fedtype_1:
- ! mobility type dissolved iron
- ! fedtype_1 = config_mobility_type_dissolved_iron
-
- ! feptype_1:
- ! mobility type particulate iron
- ! feptype_1 = config_mobility_type_particulate_iron
-
- ! zaerotype_bc1:
- ! mobility type for black carbon 1
- ! zaerotype_bc1 = config_mobility_type_black_carbon1
-
- ! zaerotype_bc2:
- ! mobility type for black carbon 2
- ! zaerotype_bc2 = config_mobility_type_black_carbon2
-
- ! zaerotype_dust1:
- ! mobility type for dust 1
- ! zaerotype_dust1 = config_mobility_type_dust1
-
- ! zaerotype_dust2:
- ! mobility type for dust 2
- ! zaerotype_dust2 = config_mobility_type_dust2
-
- ! zaerotype_dust3:
- ! mobility type for dust 3
- ! zaerotype_dust3 = config_mobility_type_dust3
-
- ! zaerotype_dust4:
- ! mobility type for dust 4
- ! zaerotype_dust4 = config_mobility_type_dust4
-
- ! ratio_C2N_diatoms:
- ! algal C to N ratio (mol/mol) diatoms
- ! ratio_C2N_diatoms = config_ratio_C_to_N_diatoms
-
- ! ratio_C2N_sp:
- ! algal C to N ratio (mol/mol) small_plankton
- ! ratio_C2N_sp = config_ratio_C_to_N_small_plankton
-
- ! ratio_C2N_phaeo:
- ! algal C to N ratio (mol/mol) phaeocystis
- ! ratio_C2N_phaeo = config_ratio_C_to_N_phaeocystis
-
- ! ratio_chl2N_diatoms:
- ! algal chla to N ratio (mol/mol) diatoms
- ! ratio_chl2N_diatoms = config_ratio_chla_to_N_diatoms
-
- ! ratio_chl2N_sp:
- ! algal chla to N ratio (mol/mol) small_plankton
- ! ratio_chl2N_sp = config_ratio_chla_to_N_small_plankton
-
- ! ratio_chl2N_phaeo:
- ! algal chla to N ratio (mol/mol) phaeocystis
- ! ratio_chl2N_phaeo = config_ratio_chla_to_N_phaeocystis
-
- ! F_abs_chl_diatoms:
- ! scales absorbed radiation for dEdd diatoms
- ! F_abs_chl_diatoms = config_scales_absorption_diatoms
-
- ! F_abs_chl_sp:
- ! scales absorbed radiation for dEdd small_plankton
- ! F_abs_chl_sp = config_scales_absorption_small_plankton
-
- ! F_abs_chl_phaeo:
- ! scales absorbed radiation for dEdd phaeocystis
- ! F_abs_chl_phaeo = config_scales_absorption_phaeocystis
-
- ! ratio_C2N_proteins:
- ! ratio of C to N in proteins (mol/mol)
- ! ratio_C2N_proteins = config_ratio_C_to_N_proteins
-
-! ! grid_oS:
-! ! for bottom flux (zsalinity)
-! !grid_oS = config_zsalinity_molecular_sublayer
-
- ! l_skS:
-! ! 0.02 characteristic skeletal layer thickness (m) (zsalinity)
-! !l_skS = config_zsalinity_gravity_drainage_scale
-
- !-----------------------------------------------------------------------
- ! Parameters for snow
- !-----------------------------------------------------------------------
-
- ! snwredist:
- ! snow redistribution type
- ! snwredist = config_snow_redistribution_scheme
-
- ! use_smliq_pnd:
- ! convert excess snow liquid to ponds
- ! use_smliq_pnd = config_use_snow_liquid_ponds
-
- ! rsnw_fall:
- ! fallen snow grain radius (um)
- ! rsnw_fall = config_fallen_snow_radius
-
- ! rsnw_tmax:
- ! maximum dry metamorphism snow grain radius (um)
- ! rsnw_tmax = config_max_dry_snow_radius
-
- ! rhosnew:
- ! new snow density (kg/m^3)
- ! rhosnew = config_new_snow_density
-
- ! rhosmax:
- ! maximum snow density (kg/m^3)
- ! rhosmax = config_max_snow_density
-
- ! windmin:
- ! minimum wind speed to compact snow (m/s)
- ! windmin = config_minimum_wind_compaction
-
- ! snwlvlfac:
- ! snow loss factor for wind redistribution
- ! snwlvlfac = config_snow_redistribution_factor
-
- ! drhosdwind:
- ! wind compaction factor (kg s/m^4)
- ! drhosdwind = config_wind_compaction_factor
-
- end subroutine init_column_package_configs
-
-!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-!
-! init_icepack_package_configs
-!
-!> \brief
-!> \author Adrian K. Turner, Elizabeth Hunke, Darin Comeau, Nicole Jeffery, Andrew Roberts, Erin Thomas, Jon Wolfe, LANL, Anthony Craig, NOAA (cntr), David Bailey, NCAR
-!> \date 2022-2023
-!> \details
-!>
-!
-!-----------------------------------------------------------------------
-
- subroutine init_icepack_package_configs(domain)
-
- use icepack_intfc, only: &
- icepack_init_parameters, &
- icepack_write_parameters, &
- icepack_configure, &
- icepack_query_parameters ! debugging
-
- use seaice_constants, only: &
- seaicePuny, & ! a small number
- seaiceBigNumber, & ! a large number
- seaiceSecondsPerDay, & ! number of seconds in 1 day
- seaiceDensityIce, & ! density of ice (kg/m^3)
- seaiceDensitySnow, & ! density of snow (kg/m^3)
- seaiceDensitySeaWater, & ! density of seawater (kg/m^3)
- seaiceDensityFreshwater, & ! density of freshwater (kg/m^3)
- seaiceFreshIceSpecificHeat, & ! specific heat of fresh ice (J/kg/K)
- seaiceWaterVaporSpecificHeat, & ! specific heat of water vapor (J/kg/K)
- seaiceAirSpecificHeat, & ! specific heat of air (J/kg/K)
- seaiceSeaWaterSpecificHeat, & ! specific heat of ocn (J/kg/K)
- seaiceLatentHeatVaporization, & ! latent heat, vaporization freshwater (J/kg)
- seaiceZvir, & ! rh2o/rair - 1.0
- seaiceLatentHeatSublimation, & ! latent heat, sublimation freshwater (J/kg)
- seaiceLatentHeatMelting, & ! latent heat of melting of fresh ice (J/kg)
- seaiceIceSurfaceMeltingTemperature, & ! melting temp. ice top surface (C)
- seaiceSnowSurfaceMeltingTemperature, & ! melting temp. snow top surface (C)
- seaiceStefanBoltzmann, & ! J m-2 K-4 s-1
- seaiceIceSnowEmissivity, & ! emissivity of snow and ice
- seaiceSnowSurfaceScatteringLayer, & ! snow surface scattering layer thickness (m)
- seaiceStabilityReferenceHeight, & ! stability reference height (m)
- seaiceFreshWaterFreezingPoint, & ! freezing temp of fresh ice (K)
- seaiceIceSurfaceRoughness, & ! ice surface roughness (m)
- seaiceVonKarmanConstant, & ! Von Karman constant
- seaiceOceanAlbedo, & ! Ocean albedo
- seaiceReferenceSalinity, & ! ice reference salinity (ppt)
- seaiceMaximumSalinity, & ! ice maximum salinity (ppt)
- seaiceMeltingTemperatureDepression, & ! melting temperature depression factor (C/ppt)
- seaiceFrazilSalinityReduction, & ! bulk salinity reduction of newly formed frazil (ppt)
- seaiceFrazilIcePorosity, & ! initial liquid fraction of frazil
- seaicePi, & ! pi
- seaiceGravity, & ! gravitational acceleration (m/s^2)
- seaiceSnowPatchiness, & ! snow patchiness parameter
- seaiceIceStrengthConstantHiblerP, & ! P* constant in Hibler strength formulation
- seaiceIceStrengthConstantHiblerC, & ! C* constant in Hibler strength formulation
- skeletalLayerThickness, & ! skeletal layer thickness
- seaiceSnowMinimumDensity, & ! minimum snow density (kg/m^3)
- seaiceBrineDynamicViscosity, & ! dynamic viscosity of brine (kg/m/s)
- seaiceFreezingTemperatureConstant, &! constant freezing temp of seawater (C)
- seaiceExtinctionCoef, & ! vis extnctn coef in ice, wvlngth<700nm (1/m)
- seaiceFreshIceConductivity, & ! thermal conductivity of fresh ice(W/m/deg)
- seaiceSnowMinimumThickness, & ! min snow thickness for computing zTsn (m)
- seaiceFrazilMinimumThickness, & ! min thickness of new frazil ice
- seaiceAlbedoWtVisibleDirect, & ! visible, direct
- seaiceAlbedoWtNearIRDirect, & ! near IR, direct
- seaiceAlbedoWtVisibleDiffuse, & ! visible, diffuse
- seaiceAlbedoWtNearIRDiffuse, & ! near IR, diffuse
- seaiceQsatQiceConstant, & ! constant for saturation humidity over ice
- seaiceQsatTiceConstant, & ! constant for saturation humidity over ice
- seaiceQsatQocnConstant, & ! constant for saturation humidity over ocean
- seaiceQsatTocnConstant ! constant for saturation humidity over ocean
-
- type(domain_type), intent(inout) :: &
- domain
-
- type(MPAS_pool_type), pointer :: &
- snow
-
- character(len=strKIND), pointer :: &
- config_thermodynamics_type, &
- config_heat_conductivity_type, &
- config_shortwave_type, &
- config_albedo_type, &
- config_ice_strength_formulation, &
- config_ridging_participation_function, &
- config_ridging_redistribution_function, &
- config_atmos_boundary_method, &
- config_itd_conversion_type, &
- config_category_bounds_type, &
- config_pond_refreezing_type, &
- config_salt_flux_coupling_type, &
- config_ocean_heat_transfer_type, &
- config_frazil_coupling_type, &
- config_sea_freezing_temperature_type, &
- config_skeletal_bgc_flux_type, &
- config_snow_redistribution_scheme
-
- logical, pointer :: &
- config_use_snicar_ad, &
- config_calc_surface_temperature, &
- config_update_ocean_fluxes, &
- config_use_form_drag, &
- config_use_high_frequency_coupling, &
- config_use_ocean_mixed_layer, &
- config_calc_surface_stresses, &
- config_use_vertical_tracers, &
- config_scale_initial_vertical_bgc, &
- config_use_vertical_biochemistry, &
- config_use_shortwave_bioabsorption, &
- config_use_skeletal_biochemistry, &
- config_use_modal_aerosols, &
- config_use_snow_liquid_ponds, &
- config_use_snow_grain_radius, &
- config_use_shortwave_redistribution
-
- real(kind=RKIND), pointer :: &
- config_min_friction_velocity, &
- config_ice_ocean_drag_coefficient, &
- config_snow_thermal_conductivity, &
- config_rapid_mode_channel_radius, &
- config_rapid_model_critical_Ra, &
- config_rapid_mode_aspect_ratio, &
- config_slow_mode_drainage_strength, &
- config_slow_mode_critical_porosity, &
- config_macro_drainage_timescale, &
- config_congelation_ice_porosity, &
-! config_frazil_ice_porosity, &
-! config_frazil_salinity_reduction, &
- config_visible_ice_albedo, &
- config_infrared_ice_albedo, &
- config_visible_snow_albedo, &
- config_infrared_snow_albedo, &
- config_variable_albedo_thickness_limit, &
-! config_snow_surface_scattering_layer_depth, &
- config_ice_shortwave_tuning_parameter, &
- config_pond_shortwave_tuning_parameter, &
- config_snow_shortwave_tuning_parameter, &
- config_shortwave_redistribution_fraction, &
- config_shortwave_redistribution_threshold, &
- config_temp_change_snow_grain_radius_change, &
- config_max_melting_snow_grain_radius, &
- config_algae_absorption_coefficient, &
- config_ridging_efolding_scale, &
- config_ratio_ridging_work_to_PE, &
- config_snow_to_ice_transition_depth, &
- config_pond_flushing_factor, &
- config_min_meltwater_retained_fraction, &
- config_max_meltwater_retained_fraction, &
- config_pond_depth_to_fraction_ratio, &
- config_snow_on_pond_ice_tapering_parameter, &
- config_critical_pond_ice_thickness, &
- config_biogrid_bottom_molecular_sublayer, &
- config_bio_gravity_drainage_length_scale, &
- config_biogrid_top_molecular_sublayer, &
- config_new_ice_fraction_biotracer, &
- config_fraction_biotracer_in_frazil, &
- config_snow_porosity_at_ice_surface, &
- config_ratio_Si_to_N_diatoms, &
- config_ratio_Si_to_N_small_plankton, &
- config_ratio_Si_to_N_phaeocystis, &
- config_ratio_S_to_N_diatoms, &
- config_ratio_S_to_N_small_plankton, &
- config_ratio_S_to_N_phaeocystis, &
- config_ratio_Fe_to_C_diatoms, &
- config_ratio_Fe_to_C_small_plankton, &
- config_ratio_Fe_to_C_phaeocystis, &
- config_ratio_Fe_to_N_diatoms, &
- config_ratio_Fe_to_N_small_plankton, &
- config_ratio_Fe_to_N_phaeocystis, &
- config_ratio_Fe_to_DON, &
- config_ratio_Fe_to_DOC_saccharids, &
- config_ratio_Fe_to_DOC_lipids, &
- config_respiration_fraction_of_growth, &
- config_rapid_mobile_to_stationary_time, &
- config_long_mobile_to_stationary_time, &
- config_algal_maximum_velocity, &
- config_ratio_Fe_to_dust, &
- config_solubility_of_Fe_in_dust, &
- config_chla_absorptivity_of_diatoms, &
- config_chla_absorptivity_of_small_plankton, &
- config_chla_absorptivity_of_phaeocystis, &
- config_light_attenuation_diatoms, &
- config_light_attenuation_small_plankton, &
- config_light_attenuation_phaeocystis, &
- config_light_inhibition_diatoms, &
- config_light_inhibition_small_plankton, &
- config_light_inhibition_phaeocystis, &
- config_maximum_growth_rate_diatoms, &
- config_maximum_growth_rate_small_plankton, &
- config_maximum_growth_rate_phaeocystis, &
- config_temperature_growth_diatoms, &
- config_temperature_growth_small_plankton, &
- config_temperature_growth_phaeocystis, &
- config_grazed_fraction_diatoms, &
- config_grazed_fraction_small_plankton, &
- config_grazed_fraction_phaeocystis, &
- config_mortality_diatoms, &
- config_mortality_small_plankton, &
- config_mortality_phaeocystis, &
- config_temperature_mortality_diatoms, &
- config_temperature_mortality_small_plankton, &
- config_temperature_mortality_phaeocystis, &
- config_exudation_diatoms, &
- config_exudation_small_plankton, &
- config_exudation_phaeocystis, &
- config_nitrate_saturation_diatoms, &
- config_nitrate_saturation_small_plankton, &
- config_nitrate_saturation_phaeocystis, &
- config_ammonium_saturation_diatoms, &
- config_ammonium_saturation_small_plankton, &
- config_ammonium_saturation_phaeocystis, &
- config_silicate_saturation_diatoms, &
- config_silicate_saturation_small_plankton, &
- config_silicate_saturation_phaeocystis, &
- config_iron_saturation_diatoms, &
- config_iron_saturation_small_plankton, &
- config_iron_saturation_phaeocystis, &
- config_fraction_spilled_to_DON, &
- config_degredation_of_DON, &
- config_fraction_DON_ammonium, &
- config_fraction_loss_to_saccharids, &
- config_fraction_loss_to_lipids, &
- config_fraction_exudation_to_saccharids, &
- config_fraction_exudation_to_lipids, &
- config_remineralization_saccharids, &
- config_remineralization_lipids, &
- config_maximum_brine_temperature, &
- config_salinity_dependence_of_growth, &
- config_minimum_optical_depth, &
- config_slopped_grazing_fraction, &
- config_excreted_fraction, &
- config_fraction_mortality_to_ammonium, &
- config_fraction_iron_remineralized, &
- config_nitrification_rate, &
- config_desorption_loss_particulate_iron, &
- config_maximum_loss_fraction, &
- config_maximum_ratio_iron_to_saccharids, &
- config_respiration_loss_to_DMSPd, &
- config_DMSP_to_DMS_conversion_fraction, &
- config_DMSP_to_DMS_conversion_time, &
- config_DMS_oxidation_time, &
- config_mobility_type_diatoms, &
- config_mobility_type_small_plankton, &
- config_mobility_type_phaeocystis, &
- config_mobility_type_nitrate, &
- config_mobility_type_ammonium, &
- config_mobility_type_silicate, &
- config_mobility_type_DMSPp, &
- config_mobility_type_DMSPd, &
- config_mobility_type_humics, &
- config_mobility_type_saccharids, &
- config_mobility_type_lipids, &
- config_mobility_type_inorganic_carbon, &
- config_mobility_type_proteins, &
- config_mobility_type_dissolved_iron, &
- config_mobility_type_particulate_iron, &
- config_mobility_type_black_carbon1, &
- config_mobility_type_black_carbon2, &
- config_mobility_type_dust1, &
- config_mobility_type_dust2, &
- config_mobility_type_dust3, &
- config_mobility_type_dust4, &
- config_ratio_C_to_N_diatoms, &
- config_ratio_C_to_N_small_plankton, &
- config_ratio_C_to_N_phaeocystis, &
- config_ratio_chla_to_N_diatoms, &
- config_ratio_chla_to_N_small_plankton, &
- config_ratio_chla_to_N_phaeocystis, &
- config_scales_absorption_diatoms, &
- config_scales_absorption_small_plankton, &
- config_scales_absorption_phaeocystis, &
- config_ratio_C_to_N_proteins, &
- config_fallen_snow_radius, &
- config_new_snow_density, &
- config_max_snow_density, &
- config_minimum_wind_compaction, &
- config_wind_compaction_factor, &
- config_snow_redistribution_factor, &
- config_max_dry_snow_radius, &
- config_floediam, &
- config_floeshape
-
- real(kind=RKIND), dimension(:,:,:), pointer :: &
- snowEmpiricalGrowthParameterTau, &
- snowEmpiricalGrowthParameterKappa, &
- snowPropertyRate
-
- integer, pointer :: &
- config_boundary_layer_iteration_number, &
- nGrainAgingTemperature, &
- nGrainAgingTempGradient, &
- nGrainAgingSnowDensity
-
- integer :: &
- config_thermodynamics_type_int, &
- config_ice_strength_formulation_int, &
- config_ridging_participation_function_int, &
- config_ridging_redistribution_function_int, &
- config_itd_conversion_type_int, &
- config_category_bounds_type_int
-
- character(len=strKIND) :: tmp_config_shortwave_type
- character(len=strKIND) :: tmp_config_snw_ssp_table
- character(len=strKIND) :: snw_aging_table = 'snicar'
-
- ! debugging
- integer :: itmp1, itmp2
- real(kind=RKIND) :: rtmp1, rtmp2
- character(len=strKIND) :: ctmp1, ctmp2
-
- call MPAS_pool_get_config(domain % configs, "config_thermodynamics_type", config_thermodynamics_type)
- call MPAS_pool_get_config(domain % configs, "config_heat_conductivity_type", config_heat_conductivity_type)
- call MPAS_pool_get_config(domain % configs, "config_ocean_heat_transfer_type", config_ocean_heat_transfer_type)
- call MPAS_pool_get_config(domain % configs, "config_calc_surface_temperature", config_calc_surface_temperature)
- call MPAS_pool_get_config(domain % configs, "config_update_ocean_fluxes", config_update_ocean_fluxes)
- call MPAS_pool_get_config(domain % configs, "config_frazil_coupling_type", config_frazil_coupling_type)
- call MPAS_pool_get_config(domain % configs, "config_min_friction_velocity", config_min_friction_velocity)
- call MPAS_pool_get_config(domain % configs, "config_ice_ocean_drag_coefficient", config_ice_ocean_drag_coefficient)
- call MPAS_pool_get_config(domain % configs, "config_snow_thermal_conductivity", config_snow_thermal_conductivity)
- call MPAS_pool_get_config(domain % configs, "config_rapid_mode_channel_radius", config_rapid_mode_channel_radius)
- call MPAS_pool_get_config(domain % configs, "config_rapid_model_critical_Ra", config_rapid_model_critical_Ra)
- call MPAS_pool_get_config(domain % configs, "config_rapid_mode_aspect_ratio", config_rapid_mode_aspect_ratio)
- call MPAS_pool_get_config(domain % configs, "config_slow_mode_drainage_strength", config_slow_mode_drainage_strength)
- call MPAS_pool_get_config(domain % configs, "config_slow_mode_critical_porosity", config_slow_mode_critical_porosity)
- call MPAS_pool_get_config(domain % configs, "config_macro_drainage_timescale", config_macro_drainage_timescale)
- call MPAS_pool_get_config(domain % configs, "config_congelation_ice_porosity", config_congelation_ice_porosity)
-! call MPAS_pool_get_config(domain % configs, "config_frazil_ice_porosity", config_frazil_ice_porosity)
-! call MPAS_pool_get_config(domain % configs, "config_frazil_salinity_reduction", config_frazil_salinity_reduction)
- call MPAS_pool_get_config(domain % configs, "config_shortwave_type", config_shortwave_type)
- call MPAS_pool_get_config(domain % configs, "config_use_snicar_ad", config_use_snicar_ad)
- call MPAS_pool_get_config(domain % configs, "config_albedo_type", config_albedo_type)
- call MPAS_pool_get_config(domain % configs, "config_visible_ice_albedo", config_visible_ice_albedo)
- call MPAS_pool_get_config(domain % configs, "config_infrared_ice_albedo", config_infrared_ice_albedo)
- call MPAS_pool_get_config(domain % configs, "config_visible_snow_albedo", config_visible_snow_albedo)
- call MPAS_pool_get_config(domain % configs, "config_infrared_snow_albedo", config_infrared_snow_albedo)
- call MPAS_pool_get_config(domain % configs, "config_variable_albedo_thickness_limit", config_variable_albedo_thickness_limit)
-! call MPAS_pool_get_config(domain % configs, "config_snow_surface_scattering_layer_depth", config_snow_surface_scattering_layer_depth)
- call MPAS_pool_get_config(domain % configs, "config_ice_shortwave_tuning_parameter", config_ice_shortwave_tuning_parameter)
- call MPAS_pool_get_config(domain % configs, "config_pond_shortwave_tuning_parameter", config_pond_shortwave_tuning_parameter)
- call MPAS_pool_get_config(domain % configs, "config_snow_shortwave_tuning_parameter", config_snow_shortwave_tuning_parameter)
- call MPAS_pool_get_config(domain % configs, "config_use_shortwave_redistribution", config_use_shortwave_redistribution)
- call MPAS_pool_get_config(domain % configs, "config_shortwave_redistribution_fraction", config_shortwave_redistribution_fraction)
- call MPAS_pool_get_config(domain % configs, "config_shortwave_redistribution_threshold", config_shortwave_redistribution_threshold)
- call MPAS_pool_get_config(domain % configs, "config_temp_change_snow_grain_radius_change", &
- config_temp_change_snow_grain_radius_change)
- call MPAS_pool_get_config(domain % configs, "config_max_melting_snow_grain_radius", config_max_melting_snow_grain_radius)
- call MPAS_pool_get_config(domain % configs, "config_algae_absorption_coefficient", config_algae_absorption_coefficient)
- call MPAS_pool_get_config(domain % configs, "config_ice_strength_formulation", config_ice_strength_formulation)
- call MPAS_pool_get_config(domain % configs, "config_ridging_participation_function", config_ridging_participation_function)
- call MPAS_pool_get_config(domain % configs, "config_ridging_redistribution_function", config_ridging_redistribution_function)
- call MPAS_pool_get_config(domain % configs, "config_ridging_efolding_scale", config_ridging_efolding_scale)
- call MPAS_pool_get_config(domain % configs, "config_ratio_ridging_work_to_PE", config_ratio_ridging_work_to_PE)
- call MPAS_pool_get_config(domain % configs, "config_atmos_boundary_method", config_atmos_boundary_method)
- call MPAS_pool_get_config(domain % configs, "config_calc_surface_stresses", config_calc_surface_stresses)
- call MPAS_pool_get_config(domain % configs, "config_use_form_drag", config_use_form_drag)
- call MPAS_pool_get_config(domain % configs, "config_use_high_frequency_coupling", config_use_high_frequency_coupling)
- call MPAS_pool_get_config(domain % configs, "config_boundary_layer_iteration_number", config_boundary_layer_iteration_number)
- call MPAS_pool_get_config(domain % configs, "config_use_ocean_mixed_layer", config_use_ocean_mixed_layer)
- call MPAS_pool_get_config(domain % configs, "config_sea_freezing_temperature_type", config_sea_freezing_temperature_type)
- call MPAS_pool_get_config(domain % configs, "config_itd_conversion_type", config_itd_conversion_type)
- call MPAS_pool_get_config(domain % configs, "config_category_bounds_type", config_category_bounds_type)
- call MPAS_pool_get_config(domain % configs, "config_snow_to_ice_transition_depth", config_snow_to_ice_transition_depth)
- call MPAS_pool_get_config(domain % configs, "config_pond_refreezing_type", config_pond_refreezing_type)
- call MPAS_pool_get_config(domain % configs, "config_salt_flux_coupling_type", config_salt_flux_coupling_type)
- call MPAS_pool_get_config(domain % configs, "config_pond_flushing_factor", config_pond_flushing_factor)
- call MPAS_pool_get_config(domain % configs, "config_min_meltwater_retained_fraction", config_min_meltwater_retained_fraction)
- call MPAS_pool_get_config(domain % configs, "config_max_meltwater_retained_fraction", config_max_meltwater_retained_fraction)
- call MPAS_pool_get_config(domain % configs, "config_pond_depth_to_fraction_ratio", config_pond_depth_to_fraction_ratio)
- call MPAS_pool_get_config(domain % configs, "config_snow_on_pond_ice_tapering_parameter", &
- config_snow_on_pond_ice_tapering_parameter)
- call MPAS_pool_get_config(domain % configs, "config_critical_pond_ice_thickness", config_critical_pond_ice_thickness)
- call MPAS_pool_get_config(domain % configs, "config_skeletal_bgc_flux_type", config_skeletal_bgc_flux_type)
- call MPAS_pool_get_config(domain % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
- call MPAS_pool_get_config(domain % configs, "config_scale_initial_vertical_bgc", config_scale_initial_vertical_bgc)
- call MPAS_pool_get_config(domain % configs, "config_use_vertical_biochemistry", config_use_vertical_biochemistry)
- call MPAS_pool_get_config(domain % configs, "config_use_shortwave_bioabsorption", config_use_shortwave_bioabsorption)
- call MPAS_pool_get_config(domain % configs, "config_use_modal_aerosols", config_use_modal_aerosols)
- call MPAS_pool_get_config(domain % configs, "config_use_skeletal_biochemistry", config_use_skeletal_biochemistry)
- call MPAS_pool_get_config(domain % configs, "config_biogrid_bottom_molecular_sublayer", &
- config_biogrid_bottom_molecular_sublayer)
- call MPAS_pool_get_config(domain % configs, "config_bio_gravity_drainage_length_scale", &
- config_bio_gravity_drainage_length_scale)
- call MPAS_pool_get_config(domain % configs, "config_biogrid_top_molecular_sublayer", config_biogrid_top_molecular_sublayer)
- call MPAS_pool_get_config(domain % configs, "config_new_ice_fraction_biotracer", config_new_ice_fraction_biotracer)
- call MPAS_pool_get_config(domain % configs, "config_fraction_biotracer_in_frazil", config_fraction_biotracer_in_frazil)
- call MPAS_pool_get_config(domain % configs, "config_snow_porosity_at_ice_surface", config_snow_porosity_at_ice_surface)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Si_to_N_diatoms", config_ratio_Si_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Si_to_N_small_plankton", config_ratio_Si_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Si_to_N_phaeocystis", config_ratio_Si_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_S_to_N_diatoms", config_ratio_S_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_S_to_N_small_plankton", config_ratio_S_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_S_to_N_phaeocystis", config_ratio_S_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_C_diatoms", config_ratio_Fe_to_C_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_C_small_plankton", config_ratio_Fe_to_C_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_C_phaeocystis", config_ratio_Fe_to_C_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_N_diatoms", config_ratio_Fe_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_N_small_plankton", config_ratio_Fe_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_N_phaeocystis", config_ratio_Fe_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_DON", config_ratio_Fe_to_DON)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_DOC_saccharids", config_ratio_Fe_to_DOC_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_DOC_lipids", config_ratio_Fe_to_DOC_lipids)
- call MPAS_pool_get_config(domain % configs, "config_respiration_fraction_of_growth", config_respiration_fraction_of_growth)
- call MPAS_pool_get_config(domain % configs, "config_rapid_mobile_to_stationary_time", config_rapid_mobile_to_stationary_time)
- call MPAS_pool_get_config(domain % configs, "config_long_mobile_to_stationary_time", config_long_mobile_to_stationary_time)
- call MPAS_pool_get_config(domain % configs, "config_algal_maximum_velocity", config_algal_maximum_velocity)
- call MPAS_pool_get_config(domain % configs, "config_ratio_Fe_to_dust", config_ratio_Fe_to_dust)
- call MPAS_pool_get_config(domain % configs, "config_solubility_of_Fe_in_dust", config_solubility_of_Fe_in_dust)
- call MPAS_pool_get_config(domain % configs, "config_chla_absorptivity_of_diatoms", config_chla_absorptivity_of_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_chla_absorptivity_of_small_plankton", &
- config_chla_absorptivity_of_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_chla_absorptivity_of_phaeocystis", config_chla_absorptivity_of_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_light_attenuation_diatoms", config_light_attenuation_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_light_attenuation_small_plankton", config_light_attenuation_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_light_attenuation_phaeocystis", config_light_attenuation_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_light_inhibition_diatoms", config_light_inhibition_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_light_inhibition_small_plankton", config_light_inhibition_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_light_inhibition_phaeocystis", config_light_inhibition_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_maximum_growth_rate_diatoms", config_maximum_growth_rate_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_maximum_growth_rate_small_plankton", &
- config_maximum_growth_rate_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_maximum_growth_rate_phaeocystis", config_maximum_growth_rate_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_temperature_growth_diatoms", config_temperature_growth_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_temperature_growth_small_plankton", &
- config_temperature_growth_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_temperature_growth_phaeocystis", config_temperature_growth_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_grazed_fraction_diatoms", config_grazed_fraction_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_grazed_fraction_small_plankton", config_grazed_fraction_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_grazed_fraction_phaeocystis", config_grazed_fraction_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_mortality_diatoms", config_mortality_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_mortality_small_plankton", config_mortality_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_mortality_phaeocystis", config_mortality_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_temperature_mortality_diatoms", config_temperature_mortality_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_temperature_mortality_small_plankton", &
- config_temperature_mortality_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_temperature_mortality_phaeocystis", &
- config_temperature_mortality_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_exudation_diatoms", config_exudation_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_exudation_small_plankton", config_exudation_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_exudation_phaeocystis", config_exudation_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_nitrate_saturation_diatoms", config_nitrate_saturation_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_nitrate_saturation_small_plankton", &
- config_nitrate_saturation_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_nitrate_saturation_phaeocystis", config_nitrate_saturation_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ammonium_saturation_diatoms", config_ammonium_saturation_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ammonium_saturation_small_plankton", &
- config_ammonium_saturation_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ammonium_saturation_phaeocystis", &
- config_ammonium_saturation_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_silicate_saturation_diatoms", config_silicate_saturation_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_silicate_saturation_small_plankton", &
- config_silicate_saturation_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_silicate_saturation_phaeocystis", config_silicate_saturation_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_iron_saturation_diatoms", config_iron_saturation_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_iron_saturation_small_plankton", config_iron_saturation_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_iron_saturation_phaeocystis", config_iron_saturation_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_fraction_spilled_to_DON", config_fraction_spilled_to_DON)
- call MPAS_pool_get_config(domain % configs, "config_degredation_of_DON", config_degredation_of_DON)
- call MPAS_pool_get_config(domain % configs, "config_fraction_DON_ammonium", config_fraction_DON_ammonium)
- call MPAS_pool_get_config(domain % configs, "config_fraction_loss_to_saccharids", config_fraction_loss_to_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_fraction_loss_to_lipids", config_fraction_loss_to_lipids)
- call MPAS_pool_get_config(domain % configs, "config_fraction_exudation_to_saccharids", config_fraction_exudation_to_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_fraction_exudation_to_lipids", config_fraction_exudation_to_lipids)
- call MPAS_pool_get_config(domain % configs, "config_remineralization_saccharids", config_remineralization_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_remineralization_lipids", config_remineralization_lipids)
- call MPAS_pool_get_config(domain % configs, "config_maximum_brine_temperature", config_maximum_brine_temperature)
- call MPAS_pool_get_config(domain % configs, "config_salinity_dependence_of_growth", config_salinity_dependence_of_growth)
- call MPAS_pool_get_config(domain % configs, "config_minimum_optical_depth", config_minimum_optical_depth)
- call MPAS_pool_get_config(domain % configs, "config_slopped_grazing_fraction", config_slopped_grazing_fraction)
- call MPAS_pool_get_config(domain % configs, "config_excreted_fraction", config_excreted_fraction)
- call MPAS_pool_get_config(domain % configs, "config_fraction_mortality_to_ammonium", config_fraction_mortality_to_ammonium)
- call MPAS_pool_get_config(domain % configs, "config_fraction_iron_remineralized", config_fraction_iron_remineralized)
- call MPAS_pool_get_config(domain % configs, "config_nitrification_rate", config_nitrification_rate)
- call MPAS_pool_get_config(domain % configs, "config_desorption_loss_particulate_iron", config_desorption_loss_particulate_iron)
- call MPAS_pool_get_config(domain % configs, "config_maximum_loss_fraction", config_maximum_loss_fraction)
- call MPAS_pool_get_config(domain % configs, "config_maximum_ratio_iron_to_saccharids", config_maximum_ratio_iron_to_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_respiration_loss_to_DMSPd", config_respiration_loss_to_DMSPd)
- call MPAS_pool_get_config(domain % configs, "config_DMSP_to_DMS_conversion_fraction", config_DMSP_to_DMS_conversion_fraction)
- call MPAS_pool_get_config(domain % configs, "config_DMSP_to_DMS_conversion_time", config_DMSP_to_DMS_conversion_time)
- call MPAS_pool_get_config(domain % configs, "config_DMS_oxidation_time", config_DMS_oxidation_time)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_diatoms", config_mobility_type_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_small_plankton", config_mobility_type_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_phaeocystis", config_mobility_type_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_nitrate", config_mobility_type_nitrate)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_ammonium", config_mobility_type_ammonium)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_silicate", config_mobility_type_silicate)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_DMSPp", config_mobility_type_DMSPp)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_DMSPd", config_mobility_type_DMSPd)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_humics", config_mobility_type_humics)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_saccharids", config_mobility_type_saccharids)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_lipids", config_mobility_type_lipids)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_inorganic_carbon", config_mobility_type_inorganic_carbon)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_proteins", config_mobility_type_proteins)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dissolved_iron", config_mobility_type_dissolved_iron)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_particulate_iron", config_mobility_type_particulate_iron)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_black_carbon1", config_mobility_type_black_carbon1)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_black_carbon2", config_mobility_type_black_carbon2)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust1", config_mobility_type_dust1)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust2", config_mobility_type_dust2)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust3", config_mobility_type_dust3)
- call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust4", config_mobility_type_dust4)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_diatoms", config_ratio_C_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_small_plankton", config_ratio_C_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_phaeocystis", config_ratio_C_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_chla_to_N_diatoms", config_ratio_chla_to_N_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_ratio_chla_to_N_small_plankton", config_ratio_chla_to_N_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_ratio_chla_to_N_phaeocystis", config_ratio_chla_to_N_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_scales_absorption_diatoms", config_scales_absorption_diatoms)
- call MPAS_pool_get_config(domain % configs, "config_scales_absorption_small_plankton", config_scales_absorption_small_plankton)
- call MPAS_pool_get_config(domain % configs, "config_scales_absorption_phaeocystis", config_scales_absorption_phaeocystis)
- call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_proteins", config_ratio_C_to_N_proteins)
call MPAS_pool_get_config(domain % configs, "config_snow_redistribution_scheme", config_snow_redistribution_scheme)
call MPAS_pool_get_config(domain % configs, "config_fallen_snow_radius", config_fallen_snow_radius)
call MPAS_pool_get_config(domain % configs, "config_use_snow_liquid_ponds", config_use_snow_liquid_ponds)
@@ -12210,6 +10526,7 @@ subroutine init_icepack_package_configs(domain)
snowpatch_in = seaiceSnowPatchiness, & ! ccsm3 radiation scheme
!rhosi_in = , & ! brine, zbgc, zsalinity
sk_l_in = skeletalLayerThickness, & !
+ R_gC2molC_in = gramsCarbonPerMolCarbon, &
saltmax_in = seaiceMaximumSalinity, &
phi_init_in = seaiceFrazilIcePorosity, &
!min_salin_in = , & ! ktherm=1, brine, zsalinity
@@ -12285,39 +10602,38 @@ subroutine init_icepack_package_configs(domain)
z_tracers_in = config_use_vertical_tracers, &
scale_bgc_in = config_scale_initial_vertical_bgc, &
solve_zbgc_in = config_use_vertical_biochemistry, &
+ dEdd_algae_in = config_use_shortwave_bioabsorption, &
modal_aero_in = config_use_modal_aerosols, &
+ use_macromolecules_in = config_use_macromolecules, &
+ restartbgc_in = config_do_restart_bgc, &
skl_bgc_in = config_use_skeletal_biochemistry, &
grid_o_in = config_biogrid_bottom_molecular_sublayer, &
l_sk_in = config_bio_gravity_drainage_length_scale, &
- initbio_frac_in = config_new_ice_fraction_biotracer, &
-! grid_oS_in = config_zsalinity_molecular_sublayer, &
-! l_skS_in = config_zsalinity_gravity_drainage_scale, &
- dEdd_algae_in = config_use_shortwave_bioabsorption, &
+ grid_o_t_in = config_biogrid_top_molecular_sublayer, &
+ !grid_oS_in = config_zsalinity_molecular_sublayer, &
+ !l_skS_in = config_zsalinity_gravity_drainage_scale, &
phi_snow_in = config_snow_porosity_at_ice_surface, &
- !T_max_in = , & ! BGC
- !fsal_in = , &
- !fr_resp_in = , &
- !algal_vel_in = , &
- !R_dFe2dust_in = , &
- !dustFe_sol_in = , &
- !op_dep_min_in = , &
- !fr_graze_s_in = , &
- !fr_graze_e_in = , &
- !fr_mort2min_in = , &
- !fr_dFe_in = , &
- !k_nitrif_in = , &
- !t_iron_conv_in = , &
- !max_loss_in = , &
- !max_dfe_doc1_in = , &
- !fr_resp_s_in = , &
+ fr_resp_in = config_respiration_fraction_of_growth, &
+ algal_vel_in = config_algal_maximum_velocity, &
+ R_dFe2dust_in = config_ratio_Fe_to_dust, &
+ dustFe_sol_in = config_solubility_of_Fe_in_dust, &
+ use_atm_dust_iron_in = .not.config_use_iron_solubility_file, &
+ T_max_in = config_maximum_brine_temperature, &
+ fsal_in = config_salinity_dependence_of_growth, &
+ op_dep_min_in = config_minimum_optical_depth, &
+ fr_graze_s_in = config_slopped_grazing_fraction, &
+ fr_graze_e_in = config_excreted_fraction, &
+ fr_mort2min_in = config_fraction_mortality_to_ammonium, &
+ fr_dFe_in = config_fraction_iron_remineralized, &
+ k_nitrif_in = config_nitrification_rate, &
+ t_iron_conv_in = config_desorption_loss_particulate_iron, &
+ max_loss_in = config_maximum_loss_fraction, &
+ max_dfe_doc1_in = config_maximum_ratio_iron_to_saccharids, &
+ fr_resp_s_in = config_respiration_loss_to_DMSPd, &
+ y_sk_DMS_in = config_DMSP_to_DMS_conversion_fraction, &
+ t_sk_conv_in = config_DMSP_to_DMS_conversion_time, &
+ t_sk_ox_in = config_DMS_oxidation_time, &
!conserv_check_in = , &
- !y_sk_DMS_in = , &
- !t_sk_conv_in = , &
- !t_sk_ox_in = , &
- !frazil_scav_in = , &
- sw_redist_in = config_use_shortwave_redistribution, &
- sw_frac_in = config_shortwave_redistribution_fraction, &
- sw_dtemp_in = config_shortwave_redistribution_threshold, &
snwgrain_in = config_use_snow_grain_radius, &
snwredist_in = config_snow_redistribution_scheme, &
use_smliq_pnd_in = config_use_snow_liquid_ponds, &
@@ -12344,9 +10660,9 @@ subroutine init_icepack_package_configs(domain)
! - make Lfresh optional for E3SM?
! tcraig, this will write out icepack parameters to fort.101, need to uncomment 3 lines
-! if (mpas_log_info % taskID == 0) then
-! call icepack_write_parameters(101)
-! endif
+ if (mpas_log_info % taskID == 0) then
+ call icepack_write_parameters(101)
+ endif
! call seaice_icepack_write_warnings(icepack_warnings_aborted())
call mpas_log_write(" ----- compare values after icepack init -----")
@@ -12397,124 +10713,6 @@ subroutine init_icepack_package_configs(domain)
!call icepack_init_parameters(&
! shortwave = config_shortwave_type, & ! not working correctly above
! oceanmixed_ice = config_use_ocean_mixed_layer, & ! not used in Icepack/columnphysics (driver only)
- ! grid_o_t = config_biogrid_top_molecular_sublayer, & ! not used in Icepack
- ! frazil_scav = config_fraction_biotracer_in_frazil, & ! BGC
- ! ratio_Si2N_diatoms = config_ratio_Si_to_N_diatoms, &
- ! ratio_Si2N_sp = config_ratio_Si_to_N_small_plankton, &
- ! ratio_Si2N_phaeo = config_ratio_Si_to_N_phaeocystis, &
- ! ratio_S2N_diatoms = config_ratio_S_to_N_diatoms, &
- ! ratio_S2N_sp = config_ratio_S_to_N_small_plankton, &
- ! ratio_S2N_phaeo = config_ratio_S_to_N_phaeocystis, &
- ! ratio_Fe2C_diatoms = config_ratio_Fe_to_C_diatoms, &
- ! ratio_Fe2C_sp = config_ratio_Fe_to_C_small_plankton, &
- ! ratio_Fe2C_phaeo = config_ratio_Fe_to_C_phaeocystis, &
- ! ratio_Fe2N_diatoms = config_ratio_Fe_to_N_diatoms, &
- ! ratio_Fe2N_sp = config_ratio_Fe_to_N_small_plankton, &
- ! ratio_Fe2N_phaeo = config_ratio_Fe_to_N_phaeocystis, &
- ! ratio_Fe2DON = config_ratio_Fe_to_DON, &
- ! ratio_Fe2DOC_s = config_ratio_Fe_to_DOC_saccharids, &
- ! ratio_Fe2DOC_l = config_ratio_Fe_to_DOC_lipids, &
- ! fr_resp = config_respiration_fraction_of_growth, &
- ! tau_min = config_rapid_mobile_to_stationary_time, &
- ! tau_max = config_long_mobile_to_stationary_time, &
- ! algal_vel = config_algal_maximum_velocity, &
- ! R_dFe2dust = config_ratio_Fe_to_dust, &
- ! dustFe_sol = config_solubility_of_Fe_in_dust, &
- ! chlabs_diatoms = config_chla_absorptivity_of_diatoms, &
- ! chlabs_sp = config_chla_absorptivity_of_small_plankton, &
- ! chlabs_phaeo = config_chla_absorptivity_of_phaeocystis, &
- ! alpha2max_low_diatoms = config_light_attenuation_diatoms, &
- ! alpha2max_low_sp = config_light_attenuation_small_plankton, &
- ! alpha2max_low_phaeo = config_light_attenuation_phaeocystis, &
- ! beta2max_diatoms = config_light_inhibition_diatoms, &
- ! beta2max_sp = config_light_inhibition_small_plankton, &
- ! beta2max_phaeo = config_light_inhibition_phaeocystis, &
- ! mu_max_diatoms = config_maximum_growth_rate_diatoms, &
- ! mu_max_sp = config_maximum_growth_rate_small_plankton, &
- ! mu_max_phaeo = config_maximum_growth_rate_phaeocystis, &
- ! mu_max_diatoms = config_temperature_growth_diatoms, & ! rename
- ! mu_max_sp = config_temperature_growth_small_plankton, &
- ! mu_max_phaeo = config_temperature_growth_phaeocystis, &
- ! fr_graze_diatoms = config_grazed_fraction_diatoms, &
- ! fr_graze_sp = config_grazed_fraction_small_plankton, &
- ! fr_graze_phaeo = config_grazed_fraction_phaeocystis, &
- ! mort_pre_diatoms = config_mortality_diatoms, &
- ! mort_pre_sp = config_mortality_small_plankton, &
- ! mort_pre_phaeo = config_mortality_phaeocystis, &
- ! mort_Tdep_diatoms = config_temperature_mortality_diatoms, &
- ! mort_Tdep_sp = config_temperature_mortality_small_plankton, &
- ! mort_Tdep_phaeo = config_temperature_mortality_phaeocystis, &
- ! k_exude_diatoms = config_exudation_diatoms, &
- ! k_exude_sp = config_exudation_small_plankton, &
- ! k_exude_phaeo = config_exudation_phaeocystis, &
- ! K_Nit_diatoms = config_nitrate_saturation_diatoms, &
- ! K_Nit_sp = config_nitrate_saturation_small_plankton, &
- ! K_Nit_phaeo = config_nitrate_saturation_phaeocystis, &
- ! K_Am_diatoms = config_ammonium_saturation_diatoms, &
- ! K_Am_sp = config_ammonium_saturation_small_plankton, &
- ! K_Am_phaeo = config_ammonium_saturation_phaeocystis, &
- ! K_Sil_diatoms = config_silicate_saturation_diatoms, &
- ! K_Sil_sp = config_silicate_saturation_small_plankton, &
- ! K_Sil_phaeo = config_silicate_saturation_phaeocystis, &
- ! K_Fe_diatoms = config_iron_saturation_diatoms, &
- ! K_Fe_sp = config_iron_saturation_small_plankton, &
- ! K_Fe_phaeo = config_iron_saturation_phaeocystis, &
- ! f_don_protein = config_fraction_spilled_to_DON, &
- ! kn_bac_protein = config_degredation_of_DON, &
- ! f_don_Am_protein = config_fraction_DON_ammonium, &
- ! f_doc_s = config_fraction_loss_to_saccharids, &
- ! f_doc_l = config_fraction_loss_to_lipids, &
- ! f_exude_s = config_fraction_exudation_to_saccharids, &
- ! f_exude_l = config_fraction_exudation_to_lipids, &
- ! k_bac_s = config_remineralization_saccharids, &
- ! k_bac_l = config_remineralization_lipids, &
- ! T_max = config_maximum_brine_temperature, &
- ! fsal = config_salinity_dependence_of_growth, &
- ! op_dep_min = config_minimum_optical_depth, &
- ! fr_graze_s = config_slopped_grazing_fraction, &
- ! fr_graze_e = config_excreted_fraction, &
- ! fr_mort2min = config_fraction_mortality_to_ammonium, &
- ! fr_dFe = config_fraction_iron_remineralized, &
- ! k_nitrif = config_nitrification_rate, &
- ! t_iron_conv = config_desorption_loss_particulate_iron, &
- ! max_loss = config_maximum_loss_fraction, &
- ! max_dfe_doc1 = config_maximum_ratio_iron_to_saccharids, &
- ! fr_resp_s = config_respiration_loss_to_DMSPd, &
- ! y_sk_DMS = config_DMSP_to_DMS_conversion_fraction, &
- ! t_sk_conv = config_DMSP_to_DMS_conversion_time, &
- ! t_sk_ox = config_DMS_oxidation_time, &
- ! algaltype_diatoms = config_mobility_type_diatoms, &
- ! algaltype_sp = config_mobility_type_small_plankton, &
- ! algaltype_phaeo = config_mobility_type_phaeocystis, &
- ! nitratetype = config_mobility_type_nitrate, &
- ! ammoniumtype = config_mobility_type_ammonium, &
- ! silicatetype = config_mobility_type_silicate, &
- ! dmspptype = config_mobility_type_DMSPp, &
- ! dmspdtype = config_mobility_type_DMSPd, &
- ! humicstype = config_mobility_type_humics, &
- ! doctype_s = config_mobility_type_saccharids, &
- ! dictype_1 = config_mobility_type_lipids, &
- ! dictype_1 = config_mobility_type_inorganic_carbon, &
- ! dontype_protein = config_mobility_type_proteins, &
- ! fedtype_1 = config_mobility_type_dissolved_iron, &
- ! feptype_1 = config_mobility_type_particulate_iron, &
- ! zaerotype_bc1 = config_mobility_type_black_carbon1, &
- ! zaerotype_bc2 = config_mobility_type_black_carbon2, &
- ! zaerotype_dust1 = config_mobility_type_dust1, &
- ! zaerotype_dust2 = config_mobility_type_dust2, &
- ! zaerotype_dust3 = config_mobility_type_dust3, &
- ! zaerotype_dust4 = config_mobility_type_dust4, &
- ! ratio_C2N_diatoms = config_ratio_C_to_N_diatoms, &
- ! ratio_C2N_sp = config_ratio_C_to_N_small_plankton, &
- ! ratio_C2N_phaeo = config_ratio_C_to_N_phaeocystis, &
- ! ratio_chl2N_diatoms = config_ratio_chla_to_N_diatoms, &
- ! ratio_chl2N_sp = config_ratio_chla_to_N_small_plankton, &
- ! ratio_chl2N_phaeo = config_ratio_chla_to_N_phaeocystis, &
- ! F_abs_chl_diatoms = config_scales_absorption_diatoms, &
- ! F_abs_chl_sp = config_scales_absorption_small_plankton, &
- ! F_abs_chl_phaeo = config_scales_absorption_phaeocystis, &
- ! ratio_C2N_proteins = config_ratio_C_to_N_proteins, &
-
!-----------------------------------------------------------------------
! Parameters for thermodynamics
!-----------------------------------------------------------------------
@@ -12952,6 +11150,10 @@ subroutine init_icepack_package_configs(domain)
! solubility fraction
! dustFe_sol = config_solubility_of_Fe_in_dust
+ ! use_atm_dust_sol;
+ ! compute dust iron contribution in icepack
+ ! use_atm_dust_sol = .not.config_use_iron_solubility_file
+
! chlabs_diatoms:
! chl absorption (1/m/(mg/m^3))
! chlabs_diatoms = config_chla_absorptivity_of_diatoms
@@ -14490,7 +12692,9 @@ end subroutine seaice_column_reinitialize_oceanic_fluxes
subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
- use ice_colpkg, only: colpkg_init_zbgc
+ use icepack_intfc, only: icepack_init_zbgc
+ use icepack_intfc, only: icepack_init_parameters
+ use icepack_intfc, only: icepack_query_parameters
type(domain_type), intent(in) :: &
domain
@@ -14500,7 +12704,7 @@ subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
logical, pointer :: &
config_use_brine, &
- config_use_vertical_zsalinity, & !echmod deprecate
+! config_use_vertical_zsalinity, & !echmod deprecate
config_use_vertical_biochemistry, &
config_use_vertical_tracers, &
config_use_skeletal_biochemistry, &
@@ -14629,6 +12833,7 @@ subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
nParticulateIron, &
nDissolvedIron, &
nzAerosols, &
+ nZBGCTracers, &
maxAerosolType, &
maxAlgaeType, &
maxDOCType, &
@@ -14643,12 +12848,22 @@ subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
nTracers_temp, &
iAerosols
+ real(kind=RKIND) :: &
+ rtmp1, &
+ rtmp2
+ real (kind=RKIND), dimension (:), allocatable :: &
+ BGCTracerType, &
+ initialMobileFraction, &
+ retentionTime, &
+ releaseTime, &
+ newIceBGCFraction
+
! save tracer array size
nTracers_temp = tracerObject % nTracers
tracerObject % nTracers = tracerObject % nTracersNotBio
call MPAS_pool_get_config(domain % configs, "config_use_brine", config_use_brine)
- call MPAS_pool_get_config(domain % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity) !echmod deprecate
+! call MPAS_pool_get_config(domain % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity) !echmod deprecate
call MPAS_pool_get_config(domain % configs, "config_use_shortwave_bioabsorption", config_use_shortwave_bioabsorption)
call MPAS_pool_get_config(domain % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
call MPAS_pool_get_config(domain % configs, "config_use_skeletal_biochemistry", config_use_skeletal_biochemistry)
@@ -14771,7 +12986,386 @@ subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
call MPAS_pool_get_config(domain % configs, "config_scales_absorption_phaeocystis", config_scales_absorption_phaeocystis)
call MPAS_pool_get_config(domain % configs, "config_ratio_C_to_N_proteins", config_ratio_C_to_N_proteins)
- call MPAS_pool_get_dimension(domain % blocklist % dimensions, "ONE", ONE)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "ONE", ONE)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nIceLayers", nIceLayers)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nSnowLayers", nSnowLayers)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nBioLayers",nBioLayers)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nAlgae", nAlgae)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDOC", nDOC)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDIC", nDIC)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDON", nDON)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nParticulateIron", nParticulateIron)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDissolvedIron", nDissolvedIron)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nzAerosols", nzAerosols)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nZBGCTracers", nZBGCTracers)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxAerosolType", maxAerosolType)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxAlgaeType", maxAlgaeType)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxDOCType", maxDOCType)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxDICType", maxDICType)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxDONType", maxDONType)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxIronType", maxIronType)
+
+ allocate(BGCTracerType(nZBGCTracers))
+ allocate(initialMobileFraction(nZBGCTracers))
+ allocate(retentionTime(nZBGCTracers))
+ allocate(releaseTime(nZBGCTracers))
+ allocate(newIceBGCFraction(nZBGCTracers))
+
+ retentionTime(:) = 0.0_RKIND
+ releaseTime(:) = 0.0_RKIND
+ initialMobileFraction(:) = 0.0_RKIND
+ BGCTracerType(:) = 0.0_RKIND
+ newIceBGCFraction(:) = 0.0_RKIND
+
+ use_nitrogen = .false.
+ if (config_use_skeletal_biochemistry .or. config_use_vertical_biochemistry) &
+ use_nitrogen = .true.
+
+ allocate(tracerObject % index_verticalAerosolsConc(maxAerosolType))
+ allocate(tracerObject % index_verticalAerosolsConcLayer(maxAerosolType))
+ allocate(tracerObject % index_verticalAerosolsConcShortwave(maxAerosolType))
+ tracerObject % nzAerosolsIndex = nzAerosols
+
+ allocate(tracerObject % index_algaeConc(maxAlgaeType))
+ allocate(tracerObject % index_algaeConcLayer(maxAlgaeType))
+ tracerObject % nAlgaeIndex = nAlgae
+
+ allocate(tracerObject % index_algalCarbon(maxAlgaeType))
+ allocate(tracerObject % index_algalCarbonLayer(maxAlgaeType))
+ tracerObject % nAlgalCarbonIndex = nAlgae
+
+ allocate(tracerObject % index_DOCConc(maxDOCType))
+ allocate(tracerObject % index_DOCConcLayer(maxDOCType))
+ tracerObject % nDOCIndex = nDOC
+
+ allocate(tracerObject % index_DICConc(maxDICType))
+ allocate(tracerObject % index_DICConcLayer(maxDICType))
+ tracerObject % nDICIndex = nDIC
+
+ allocate(tracerObject % index_algalChlorophyll(maxAlgaeType))
+ allocate(tracerObject % index_algalChlorophyllLayer(maxAlgaeType))
+ tracerObject % nAlgalChlorophyllIndex = nAlgae
+
+ allocate(tracerObject % index_DONConc(maxDONType))
+ allocate(tracerObject % index_DONConcLayer(maxDONType))
+ tracerObject % nDONIndex = nDON
+
+ allocate(tracerObject % index_particulateIronConc(maxIronType))
+ allocate(tracerObject % index_particulateIronConcLayer(maxIronType))
+ tracerObject % nParticulateIronIndex = nParticulateIron
+
+ allocate(tracerObject % index_dissolvedIronConc(maxIronType))
+ allocate(tracerObject % index_dissolvedIronConcLayer(maxIronType))
+ tracerObject % nDissolvedIronIndex = nDissolvedIron
+
+ call icepack_init_parameters(&
+ ratio_Si2N_diatoms_in=config_ratio_Si_to_N_diatoms, &
+ ratio_Si2N_sp_in=config_ratio_Si_to_N_small_plankton, &
+ ratio_Si2N_phaeo_in=config_ratio_Si_to_N_phaeocystis, &
+ ratio_S2N_diatoms_in=config_ratio_S_to_N_diatoms, &
+ ratio_S2N_sp_in=config_ratio_S_to_N_small_plankton, &
+ ratio_S2N_phaeo_in=config_ratio_S_to_N_phaeocystis, &
+ ratio_Fe2C_diatoms_in=config_ratio_Fe_to_C_diatoms, &
+ ratio_Fe2C_sp_in=config_ratio_Fe_to_C_small_plankton, &
+ ratio_Fe2C_phaeo_in=config_ratio_Fe_to_C_phaeocystis, &
+ ratio_Fe2N_diatoms_in=config_ratio_Fe_to_N_diatoms, &
+ ratio_Fe2N_sp_in=config_ratio_Fe_to_N_small_plankton, &
+ ratio_Fe2N_phaeo_in=config_ratio_Fe_to_N_phaeocystis, &
+ ratio_Fe2DON_in=config_ratio_Fe_to_DON, &
+ ratio_Fe2DOC_s_in=config_ratio_Fe_to_DOC_saccharids, &
+ ratio_Fe2DOC_l_in=config_ratio_Fe_to_DOC_lipids, &
+ chlabs_diatoms_in=config_chla_absorptivity_of_diatoms, &
+ chlabs_sp_in=config_chla_absorptivity_of_small_plankton, &
+ chlabs_phaeo_in=config_chla_absorptivity_of_phaeocystis, &
+ alpha2max_low_diatoms_in=config_light_attenuation_diatoms, &
+ alpha2max_low_sp_in=config_light_attenuation_small_plankton, &
+ alpha2max_low_phaeo_in=config_light_attenuation_phaeocystis, &
+ beta2max_diatoms_in=config_light_inhibition_diatoms, &
+ beta2max_sp_in=config_light_inhibition_small_plankton, &
+ beta2max_phaeo_in=config_light_inhibition_phaeocystis, &
+ mu_max_diatoms_in=config_maximum_growth_rate_diatoms, &
+ mu_max_sp_in=config_maximum_growth_rate_small_plankton, &
+ mu_max_phaeo_in=config_maximum_growth_rate_phaeocystis, &
+ grow_Tdep_diatoms_in=config_temperature_growth_diatoms, &
+ grow_Tdep_sp_in=config_temperature_growth_small_plankton, &
+ grow_Tdep_phaeo_in=config_temperature_growth_phaeocystis, &
+ fr_graze_diatoms_in=config_grazed_fraction_diatoms, &
+ fr_graze_sp_in=config_grazed_fraction_small_plankton, &
+ fr_graze_phaeo_in=config_grazed_fraction_phaeocystis, &
+ mort_pre_diatoms_in=config_mortality_diatoms, &
+ mort_pre_sp_in=config_mortality_small_plankton, &
+ mort_pre_phaeo_in=config_mortality_phaeocystis, &
+ mort_Tdep_diatoms_in=config_temperature_mortality_diatoms, &
+ mort_Tdep_sp_in=config_temperature_mortality_small_plankton, &
+ mort_Tdep_phaeo_in=config_temperature_mortality_phaeocystis, &
+ k_exude_diatoms_in=config_exudation_diatoms, &
+ k_exude_sp_in=config_exudation_small_plankton, &
+ k_exude_phaeo_in=config_exudation_phaeocystis, &
+ K_Nit_diatoms_in=config_nitrate_saturation_diatoms, &
+ K_Nit_sp_in=config_nitrate_saturation_small_plankton, &
+ K_Nit_phaeo_in=config_nitrate_saturation_phaeocystis, &
+ K_Am_diatoms_in=config_ammonium_saturation_diatoms, &
+ K_Am_sp_in=config_ammonium_saturation_small_plankton, &
+ K_Am_phaeo_in=config_ammonium_saturation_phaeocystis, &
+ K_Sil_diatoms_in=config_silicate_saturation_diatoms, &
+ K_Sil_sp_in=config_silicate_saturation_small_plankton, &
+ K_Sil_phaeo_in=config_silicate_saturation_phaeocystis, &
+ K_Fe_diatoms_in=config_iron_saturation_diatoms, &
+ K_Fe_sp_in=config_iron_saturation_small_plankton, &
+ K_Fe_phaeo_in=config_iron_saturation_phaeocystis, &
+ f_don_protein_in=config_fraction_spilled_to_DON, &
+ kn_bac_protein_in=config_degredation_of_DON, &
+ f_don_Am_protein_in=config_fraction_DON_ammonium, &
+ f_doc_s_in=config_fraction_loss_to_saccharids, &
+ f_doc_l_in=config_fraction_loss_to_lipids, &
+ f_exude_s_in=config_fraction_exudation_to_saccharids, &
+ f_exude_l_in=config_fraction_exudation_to_lipids, &
+ k_bac_s_in=config_remineralization_saccharids, &
+ k_bac_l_in=config_remineralization_lipids, &
+ algaltype_diatoms_in=config_mobility_type_diatoms, &
+ algaltype_sp_in=config_mobility_type_small_plankton, &
+ algaltype_phaeo_in=config_mobility_type_phaeocystis, &
+ doctype_s_in=config_mobility_type_saccharids, &
+ doctype_l_in=config_mobility_type_lipids, &
+ dictype_1_in=config_mobility_type_inorganic_carbon, &
+ dontype_protein_in=config_mobility_type_proteins, &
+ fedtype_1_in=config_mobility_type_dissolved_iron, &
+ feptype_1_in=config_mobility_type_particulate_iron, &
+ zaerotype_bc1_in=config_mobility_type_black_carbon1, &
+ zaerotype_bc2_in=config_mobility_type_black_carbon2, &
+ zaerotype_dust1_in=config_mobility_type_dust1, &
+ zaerotype_dust2_in=config_mobility_type_dust2, &
+ zaerotype_dust3_in=config_mobility_type_dust3, &
+ zaerotype_dust4_in=config_mobility_type_dust4, &
+ ratio_C2N_diatoms_in=config_ratio_C_to_N_diatoms, &
+ ratio_C2N_sp_in=config_ratio_C_to_N_small_plankton, &
+ ratio_C2N_phaeo_in=config_ratio_C_to_N_phaeocystis, &
+ ratio_chl2N_diatoms_in=config_ratio_chla_to_N_diatoms, &
+ ratio_chl2N_sp_in=config_ratio_chla_to_N_small_plankton, &
+ ratio_chl2N_phaeo_in=config_ratio_chla_to_N_phaeocystis, &
+ F_abs_chl_diatoms_in=config_scales_absorption_diatoms, &
+ F_abs_chl_sp_in=config_scales_absorption_small_plankton, &
+ F_abs_chl_phaeo_in=config_scales_absorption_phaeocystis, &
+ ratio_C2N_proteins_in=config_ratio_C_to_N_proteins, &
+ nitratetype_in=config_mobility_type_nitrate, &
+ ammoniumtype_in=config_mobility_type_ammonium, &
+ dmspptype_in=config_mobility_type_DMSPp, &
+ dmspdtype_in=config_mobility_type_DMSPd, &
+ silicatetype_in=config_mobility_type_silicate, &
+ humtype_in=config_mobility_type_humics, &
+ frazil_scav_in=config_fraction_biotracer_in_frazil, &
+ initbio_frac_in=config_new_ice_fraction_biotracer, &
+ tau_min_in=config_rapid_mobile_to_stationary_time, &
+ tau_max_in=config_long_mobile_to_stationary_time)
+
+ call init_zbgc_tracer_indices(domain, tracerObject, use_nitrogen, nTracers_temp, &
+ BGCTracerType, initialMobileFraction, retentionTime, &
+ releaseTime, newIceBGCFraction)
+
+ call icepack_init_zbgc(bgc_tracer_type_in=BGCTracerType, &
+ zbgc_frac_init_in=initialMobileFraction, &
+ tau_ret_in=retentionTime, &
+ tau_rel_in=releaseTime, &
+ zbgc_init_frac_in=newIceBGCFraction)
+
+ ! check calculated tracer array size
+ if (nTracers_temp /= tracerObject % nTracers) then
+ call mpas_log_write(&
+ "init_column_tracer_object_for_biogeochemistry: nTracers_temp: $i, nTracers: $i", &
+ messageType=MPAS_LOG_CRIT, intArgs=(/nTracers_temp, tracerObject % nTracers/))
+ endif
+
+ call mpas_log_write(" ----- compare values after init_zbgc -----")
+
+ rtmp1 = config_new_ice_fraction_biotracer
+ call icepack_query_parameters(initbio_frac_out=rtmp2)
+ if (rtmp1 /= rtmp2) call mpas_log_write('initbio_frac differs $r $r',realArgs=(/rtmp1,rtmp2/))
+
+ rtmp1 = config_rapid_mobile_to_stationary_time
+ call icepack_query_parameters(tau_min_out=rtmp2)
+ if (rtmp1 /= rtmp2) call mpas_log_write('tau_min differs $r $r',realArgs=(/rtmp1,rtmp2/))
+
+ rtmp1 = config_long_mobile_to_stationary_time
+ call icepack_query_parameters(tau_max_out=rtmp2)
+ if (rtmp1 /= rtmp2) call mpas_log_write('tau_max differs $r $r',realArgs=(/rtmp1,rtmp2/))
+
+ deallocate(BGCTracerType)
+ deallocate(initialMobileFraction)
+ deallocate(retentionTime)
+ deallocate(releaseTime)
+ deallocate(newIceBGCFraction)
+
+ end subroutine init_column_tracer_object_for_biogeochemistry
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! init_zbgc_tracer_indices
+!
+!> \brief
+!> \author Nicole Jeffery, LANL
+!> \date 24 May 2024
+!> \details
+!> Moves icepack_init_zbgc_tracer_indices to the interface
+!
+!-----------------------------------------------------------------------
+
+ subroutine init_zbgc_tracer_indices(domain, tracerObject, use_nitrogen, nTracersTemp, &
+ BGCTracerType, initialMobileFraction, retentionTime, &
+ releaseTime, newIceBGCFraction)
+
+ type(domain_type), intent(in) :: &
+ domain
+
+ type(ciceTracerObjectType), intent(inout) :: &
+ tracerObject
+
+ real(kind=RKIND), dimension(:), intent(inout) :: &
+ BGCTracerType, &
+ initialMobileFraction, &
+ retentionTime, &
+ releaseTime, &
+ newIceBGCFraction
+
+ integer, intent(in) :: &
+ nTracersTemp
+
+ logical, intent(in) :: &
+ use_nitrogen
+
+ logical, pointer :: &
+ config_use_brine, &
+! config_use_vertical_zsalinity, & !echmod deprecate
+ config_use_vertical_biochemistry, &
+ config_use_vertical_tracers, &
+ config_use_skeletal_biochemistry, &
+ config_use_shortwave_bioabsorption, &
+ config_use_nitrate, &
+ config_use_carbon, &
+ config_use_chlorophyll, &
+ config_use_ammonium, &
+ config_use_silicate, &
+ config_use_DMS, &
+ config_use_nonreactive, &
+ config_use_humics, &
+ config_use_DON, &
+ config_use_iron, &
+ config_use_zaerosols
+
+ real(kind=RKIND), pointer :: &
+ config_mobility_type_diatoms, &
+ config_mobility_type_small_plankton, &
+ config_mobility_type_phaeocystis, &
+ config_mobility_type_nitrate, &
+ config_mobility_type_ammonium, &
+ config_mobility_type_silicate, &
+ config_mobility_type_DMSPp, &
+ config_mobility_type_DMSPd, &
+ config_mobility_type_humics, &
+ config_mobility_type_saccharids, &
+ config_mobility_type_lipids, &
+ config_mobility_type_inorganic_carbon, &
+ config_mobility_type_proteins, &
+ config_mobility_type_dissolved_iron, &
+ config_mobility_type_particulate_iron, &
+ config_mobility_type_black_carbon1, &
+ config_mobility_type_black_carbon2, &
+ config_mobility_type_dust1, &
+ config_mobility_type_dust2, &
+ config_mobility_type_dust3, &
+ config_mobility_type_dust4, &
+ config_rapid_mobile_to_stationary_time, &
+ config_long_mobile_to_stationary_time, &
+ config_fraction_biotracer_in_frazil, &
+ config_new_ice_fraction_biotracer
+
+ integer, pointer :: &
+ nIceLayers, &
+ nSnowLayers, &
+ nBioLayers, &
+ nAlgae, &
+ nDOC, &
+ nDIC, &
+ nDON, &
+ nParticulateIron, &
+ nDissolvedIron, &
+ nzAerosols, &
+ nZBGCTracers, &
+ maxAerosolType, &
+ maxAlgaeType, &
+ maxDOCType, &
+ maxDICType, &
+ maxDONType, &
+ maxIronType
+
+ integer :: &
+ iAerosols, &
+ nTracerDependOption, &
+ nCount, &
+ nTracerDepend, &
+ iBioLayer, &
+ iBioTracer
+
+ real(kind=RKIND) :: &
+ rtmp1, &
+ rtmp2
+
+ real (kind=RKIND), dimension (:), allocatable :: &
+ algalType, &
+ docType, &
+ dicType, &
+ donType, &
+ fedType, &
+ fepType, &
+ zAeroType
+
+ call MPAS_pool_get_config(domain % configs, "config_use_brine", config_use_brine)
+! call MPAS_pool_get_config(domain % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity) !echmod deprecate
+ call MPAS_pool_get_config(domain % configs, "config_use_shortwave_bioabsorption", config_use_shortwave_bioabsorption)
+ call MPAS_pool_get_config(domain % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
+ call MPAS_pool_get_config(domain % configs, "config_use_skeletal_biochemistry", config_use_skeletal_biochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_vertical_biochemistry", config_use_vertical_biochemistry)
+ call MPAS_pool_get_config(domain % configs, "config_use_nitrate", config_use_nitrate)
+ call MPAS_pool_get_config(domain % configs, "config_use_carbon", config_use_carbon)
+ call MPAS_pool_get_config(domain % configs, "config_use_chlorophyll", config_use_chlorophyll)
+ call MPAS_pool_get_config(domain % configs, "config_use_ammonium", config_use_ammonium)
+ call MPAS_pool_get_config(domain % configs, "config_use_silicate", config_use_silicate)
+ call MPAS_pool_get_config(domain % configs, "config_use_DMS", config_use_DMS)
+ call MPAS_pool_get_config(domain % configs, "config_use_nonreactive", config_use_nonreactive)
+ call MPAS_pool_get_config(domain % configs, "config_use_humics", config_use_humics)
+ call MPAS_pool_get_config(domain % configs, "config_use_DON", config_use_DON)
+ call MPAS_pool_get_config(domain % configs, "config_use_iron", config_use_iron)
+ call MPAS_pool_get_config(domain % configs, "config_use_zaerosols", config_use_zaerosols)
+
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_diatoms", config_mobility_type_diatoms)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_small_plankton", config_mobility_type_small_plankton)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_phaeocystis", config_mobility_type_phaeocystis)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_nitrate", config_mobility_type_nitrate)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_ammonium", config_mobility_type_ammonium)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_silicate", config_mobility_type_silicate)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_DMSPp", config_mobility_type_DMSPp)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_DMSPd", config_mobility_type_DMSPd)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_humics", config_mobility_type_humics)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_saccharids", config_mobility_type_saccharids)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_lipids", config_mobility_type_lipids)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_inorganic_carbon", config_mobility_type_inorganic_carbon)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_proteins", config_mobility_type_proteins)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_dissolved_iron", config_mobility_type_dissolved_iron)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_particulate_iron", config_mobility_type_particulate_iron)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_black_carbon1", config_mobility_type_black_carbon1)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_black_carbon2", config_mobility_type_black_carbon2)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust1", config_mobility_type_dust1)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust2", config_mobility_type_dust2)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust3", config_mobility_type_dust3)
+ call MPAS_pool_get_config(domain % configs, "config_mobility_type_dust4", config_mobility_type_dust4)
+ call MPAS_pool_get_config(domain % configs, "config_rapid_mobile_to_stationary_time", &
+ config_rapid_mobile_to_stationary_time)
+ call MPAS_pool_get_config(domain % configs, "config_long_mobile_to_stationary_time", &
+ config_long_mobile_to_stationary_time)
+ call MPAS_pool_get_config(domain % configs, "config_fraction_biotracer_in_frazil", &
+ config_fraction_biotracer_in_frazil)
+ call MPAS_pool_get_config(domain % configs, "config_new_ice_fraction_biotracer", &
+ config_new_ice_fraction_biotracer)
+
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nIceLayers", nIceLayers)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nSnowLayers", nSnowLayers)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nBioLayers",nBioLayers)
@@ -14782,6 +13376,7 @@ subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nParticulateIron", nParticulateIron)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nDissolvedIron", nDissolvedIron)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nzAerosols", nzAerosols)
+ call MPAS_pool_get_dimension(domain % blocklist % dimensions, "nZBGCTracers", nZBGCTracers)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxAerosolType", maxAerosolType)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxAlgaeType", maxAlgaeType)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxDOCType", maxDOCType)
@@ -14789,238 +13384,631 @@ subroutine init_column_tracer_object_for_biogeochemistry(domain, tracerObject)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxDONType", maxDONType)
call MPAS_pool_get_dimension(domain % blocklist % dimensions, "maxIronType", maxIronType)
- use_nitrogen = .false.
- if (config_use_skeletal_biochemistry .or. config_use_vertical_biochemistry) &
- use_nitrogen = .true.
-
- allocate(tracerObject % index_verticalAerosolsConc(maxAerosolType))
- allocate(tracerObject % index_verticalAerosolsConcLayer(maxAerosolType))
- allocate(tracerObject % index_verticalAerosolsConcShortwave(maxAerosolType))
- tracerObject % nzAerosolsIndex = nzAerosols
-
- allocate(tracerObject % index_algaeConc(maxAlgaeType))
- allocate(tracerObject % index_algaeConcLayer(maxAlgaeType))
- tracerObject % nAlgaeIndex = nAlgae
+ tracerObject % nTracersNotBio = tracerObject % nTracers
+ tracerObject % index_brineFraction = 0
+ if (config_use_brine) then
+ tracerObject % index_brineFraction = tracerObject % nTracers + 1 ! ice volume fraction with salt
+ tracerObject % nTracers = tracerObject % nTracers + 1
+ tracerObject % parentIndex(tracerObject % index_brineFraction) = 1 ! volume-weighted
+ tracerObject % firstAncestorMask (tracerObject % index_brineFraction,1) = 0.0_RKIND ! volume-weighted
+ tracerObject % firstAncestorMask (tracerObject % index_brineFraction,2) = 1.0_RKIND ! volume-weighted
+ tracerObject % firstAncestorMask (tracerObject % index_brineFraction,3) = 0.0_RKIND ! volume-weighted
+ tracerObject % ancestorNumber(tracerObject % index_brineFraction) = 0
+ tracerObject % ancestorIndices (tracerObject % index_brineFraction,1) = 0
+ tracerObject % ancestorIndices (tracerObject % index_brineFraction,2) = 0
+ endif
+
+ nTracerDependOption = 0 ! if tracerObject % index_brineFraction /= 0 then use fbri dependency
+ if (tracerObject % index_brineFraction == 0) nTracerDependOption = -1 ! otherwise make tracers depend on ice volume
+
+ !-----------------------------------------------------------------
+ ! biogeochemistry
+ !-----------------------------------------------------------------
+
+ tracerObject % nBioTracers = 0
+ tracerObject % nBioTracersShortwave = 0
+
+ ! vectors of size maxAlgaeType
+ tracerObject % index_algaeConcLayer(:) = 0
+ tracerObject % index_algalCarbonLayer(:) = 0
+ tracerObject % index_algalChlorophyllLayer(:) = 0
+ tracerObject % index_algaeConc(:) = 0
+ tracerObject % index_algalCarbon(:) = 0
+ tracerObject % index_algalChlorophyll(:) = 0
+
+ ! vectors of size maxDICType
+ tracerObject % index_DICConcLayer(:) = 0
+ tracerObject % index_DICConc(:) = 0
+
+ ! vectors of size maxDOCType
+ tracerObject % index_DOCConcLayer(:) = 0
+ tracerObject % index_DOCConc(:) = 0
+
+ ! vectors of size maxDONType
+ tracerObject % index_DONConcLayer(:) = 0
+ tracerObject % index_DONConc(:) = 0
+
+ ! vectors of size maxIronType
+ tracerObject % index_dissolvedIronConcLayer(:) = 0
+ tracerObject % index_particulateIronConcLayer(:) = 0
+ tracerObject % index_dissolvedIronConc(:) = 0
+ tracerObject % index_particulateIronConc(:) = 0
+
+ ! vectors of size maxAerosolType
+ tracerObject % index_verticalAerosolsConcLayer(:) = 0
+ tracerObject % index_verticalAerosolsConcShortwave(:) = 0
+ tracerObject % index_verticalAerosolsConc(:) = 0
+
+ tracerObject % index_nitrateConcLayer = 0
+ tracerObject % index_ammoniumConcLayer = 0
+ tracerObject % index_silicateConcLayer = 0
+ tracerObject % index_DMSPpConcLayer = 0
+ tracerObject % index_DMSPdConcLayer = 0
+ tracerObject % index_DMSConcLayer = 0
+ tracerObject % index_nonreactiveConcLayer = 0
+ tracerObject % index_humicsConcLayer = 0
+ tracerObject % index_chlorophyllShortwave = 0
+ tracerObject % index_LayerIndexToBioIndex(:) = 0
+ tracerObject % index_LayerIndexToDataArray(:) = 0
+
+ tracerObject % index_nitrateConc = 0
+ tracerObject % index_ammoniumConc = 0
+ tracerObject % index_silicateConc = 0
+ tracerObject % index_DMSPpConc = 0
+ tracerObject % index_DMSPdConc = 0
+ tracerObject % index_DMSConc = 0
+ tracerObject % index_nonreactiveConc = 0
+ tracerObject % index_humicsConc = 0
+
+ allocate(algalType(maxAlgaeType))
+ allocate(docType(maxDOCType))
+ allocate(dicType(maxDICType))
+ allocate(donType(maxDONType))
+ allocate(fedType(maxIronType))
+ allocate(fepType(maxIronType))
+ allocate(zAeroType(maxAerosolType))
+
+ algalType(1) = config_mobility_type_diatoms
+ algalType(2) = config_mobility_type_small_plankton
+ algalType(3) = config_mobility_type_phaeocystis
+
+ docType(1) = config_mobility_type_saccharids
+ docType(2) = config_mobility_type_lipids
+
+ dicType(1) = config_mobility_type_inorganic_carbon
+
+ donType(1) = config_mobility_type_proteins
+
+ fedType(1) = config_mobility_type_dissolved_iron
+ fepType(1) = config_mobility_type_particulate_iron
+
+ zAeroType(1) = config_mobility_type_black_carbon1
+ zAeroType(2) = config_mobility_type_black_carbon2
+ zAeroType(3) = config_mobility_type_dust1
+ zAeroType(4) = config_mobility_type_dust2
+ zAeroType(5) = config_mobility_type_dust3
+ zAeroType(6) = config_mobility_type_dust4
+
+ if (config_use_skeletal_biochemistry) then
+
+ nCount = 1
+ nTracerDepend = 0
+
+ if (config_use_shortwave_bioabsorption) then
+ tracerObject % index_chlorophyllShortwave = 1
+ tracerObject % nBioTracersShortwave = nIceLayers+nSnowLayers+2 ! only the bottom layer
+ ! will be nonzero
+ endif
+ elseif (config_use_vertical_tracers) then ! defined on nBioLayers+1 in ice
+ ! and 2 snow layers (snow surface + interior)
+ nCount = nBioLayers + 1
+ nTracerDepend = 2 + tracerObject % index_brineFraction + nTracerDependOption
+
+ if (use_nitrogen) then
+ if (config_use_shortwave_bioabsorption) then
+ tracerObject % index_chlorophyllShortwave = 1
+ tracerObject % nBioTracersShortwave = nIceLayers+nSnowLayers+2
+ endif
+ endif ! use_nitrogen
+
+ endif ! config_use_skeletal_biochemistry or config_use_vertical_tracers
+
+ if (config_use_skeletal_biochemistry .or. config_use_vertical_tracers) then
+
+ !-----------------------------------------------------------------
+ ! assign tracer indices and dependencies
+ ! BGCTracerType: < 0 purely mobile , >= 0 stationary
+ !------------------------------------------------------------------
+
+ if (use_nitrogen) then
+ do iBioTracer = 1, nAlgae
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_algaeConc(iBioTracer), &
+ tracerObject % index_algaeConcLayer(iBioTracer),&
+ algalType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_algaeConcLayer(iBioTracer)) &
+ = iBioTracer
+ enddo ! iBioTracer
+ endif ! use_nitrogen
+
+ if (config_use_nitrate) then
+ call init_bgc_tracer_indices(&
+ nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_nitrateConc, &
+ tracerObject % index_nitrateConcLayer, &
+ config_mobility_type_nitrate, nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_nitrateConcLayer) &
+ = maxAlgaeType + 1
+ endif ! config_use_nitrate
+
+ if (config_use_carbon) then
+ !
+ ! Algal C is not yet distinct from algal N
+ ! * Reqires exudation and/or changing C:N ratios
+ ! for implementation
+ !
+ ! do iBioTracer = 1,nAlgae
+ ! call init_bgc_tracer_indices(nCount,tracerObject % index_brineFraction, &
+ ! tracerObject % index_algalCarbon(iBioTracer), &
+ ! tracerObject % index_algalCarbonLayer(iBioTracer), &
+ ! algalType(iBioTracer), nTracerDepend, &
+ ! tracerObject % nTracers, &
+ ! tracerObject % nBioTracers, &
+ ! BGCTracerType, &
+ ! tracerObject % parentIndex, &
+ ! tracerObject % firstAncestorMask, &
+ ! tracerObject % ancestorNumber, &
+ ! tracerObject % ancestorIndices, &
+ ! tracerObject % index_LayerIndexToBioIndex)
+ ! tracerObject % index_LayerIndexToDataArray(tracerObject % index_algalCarbonLayer(iBioTracer)) &
+ ! = maxAlgaeType + 1 + iBioTracer
+ ! enddo ! iBioTracer
+
+ do iBioTracer = 1, nDOC
+ call init_bgc_tracer_indices(&
+ nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_DOCConc(iBioTracer), &
+ tracerObject % index_DOCConcLayer(iBioTracer), &
+ docType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_DOCConcLayer(iBioTracer)) &
+ = maxAlgaeType + 1 + iBioTracer
+ enddo ! iBioTracer
+ do iBioTracer = 1, nDIC
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_DICConc(iBioTracer), &
+ tracerObject % index_DICConcLayer(iBioTracer), &
+ dicType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_DICConcLayer(iBioTracer)) &
+ = maxAlgaeType + maxDOCType + 1 + iBioTracer
+ enddo ! iBioTracer
+ endif ! config_use_carbon
+
+ if (config_use_chlorophyll) then
+ do iBioTracer = 1, nAlgae
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_algalChlorophyll(iBioTracer), &
+ tracerObject % index_algalChlorophyllLayer(iBioTracer), &
+ algalType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_algalChlorophyllLayer(iBioTracer)) &
+ = maxAlgaeType + 1 + maxDOCType + maxDICType + iBioTracer
+ enddo ! iBioTracer
+ endif ! config_use_chlorophyll
+
+ if (config_use_ammonium) then
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_ammoniumConc, &
+ tracerObject % index_ammoniumConcLayer, &
+ config_mobility_type_ammonium, &
+ nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_ammoniumConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 2
+ endif
+ if (config_use_silicate) then
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_silicateConc, &
+ tracerObject % index_silicateConcLayer, &
+ config_mobility_type_silicate, &
+ nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_silicateConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 3
+ endif
+ if (config_use_DMS) then ! all together
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_DMSPpConc, &
+ tracerObject % index_DMSPpConcLayer, &
+ config_mobility_type_DMSPp, nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_DMSPpConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 4
+
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_DMSPdConc, &
+ tracerObject % index_DMSPdConcLayer, &
+ config_mobility_type_DMSPd, nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_DMSPdConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 5
+
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_DMSConc, &
+ tracerObject % index_DMSConcLayer, &
+ config_mobility_type_DMSPd, nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_DMSConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 6
+ endif
+ if (config_use_nonreactive) then
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_nonreactiveConc, &
+ tracerObject % index_nonreactiveConcLayer, &
+ config_mobility_type_nitrate, nTracerDepend,&
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_nonreactiveConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 7
+ endif
+ if (config_use_DON) then
+ do iBioTracer = 1, nDON
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_DONConc(iBioTracer), &
+ tracerObject % index_DONConcLayer(iBioTracer), &
+ donType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_DONConcLayer(iBioTracer)) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + 7 + iBioTracer
+ enddo ! iBioTracer
+ endif ! config_use_DON
+ if (config_use_iron) then
+ do iBioTracer = 1, nDissolvedIron
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_dissolvedIronConc(iBioTracer), &
+ tracerObject % index_dissolvedIronConcLayer(iBioTracer),&
+ fedType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_dissolvedIronConcLayer(iBioTracer)) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + maxDONType + 7 + iBioTracer
+ enddo ! iBioTracer
+ do iBioTracer = 1, nParticulateIron
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_particulateIronConc(iBioTracer), &
+ tracerObject % index_particulateIronConcLayer(iBioTracer), &
+ fepType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_particulateIronConcLayer(iBioTracer)) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + maxDONType + maxIronType + 7 + iBioTracer
+ enddo ! iBioTracer
+ endif ! config_use_iron
+
+ if (config_use_humics) then
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_humicsConc, &
+ tracerObject % index_humicsConcLayer, &
+ config_mobility_type_humics, nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, &
+ tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_humicsConcLayer) &
+ = 2*maxAlgaeType + maxDOCType + 8 + maxDICType + maxDONType + 2*maxIronType + maxAerosolType
+ endif
+ endif ! config_use_skeletal_biochemistry or config_use_vertical_tracers
+
+ if (config_use_vertical_tracers) then ! defined on nBioLayers+1 in ice
+ ! and 2 snow layers (snow surface + interior)
+ nCount = nBioLayers + 1
+ nTracerDepend = 2 + tracerObject % index_brineFraction + nTracerDependOption
+
+ ! z layer aerosols
+ if (config_use_zaerosols) then
+ do iBioTracer = 1, nzAerosols
+ if (config_use_shortwave_bioabsorption) then
+ tracerObject % index_verticalAerosolsConcShortwave(iBioTracer) = &
+ tracerObject % nBioTracersShortwave + 1
+ tracerObject % nBioTracersShortwave = &
+ tracerObject % nBioTracersShortwave + nIceLayers + nSnowLayers+2
+ endif
+ call init_bgc_tracer_indices(nCount, tracerObject % index_brineFraction, &
+ tracerObject % index_verticalAerosolsConc(iBioTracer), &
+ tracerObject % index_verticalAerosolsConcLayer(iBioTracer), &
+ zAeroType(iBioTracer), nTracerDepend, &
+ tracerObject % nTracers, &
+ tracerObject % nBioTracers, &
+ BGCTracerType, tracerObject % parentIndex, &
+ tracerObject % firstAncestorMask, &
+ tracerObject % ancestorNumber, &
+ tracerObject % ancestorIndices, &
+ tracerObject % index_LayerIndexToBioIndex)
+ tracerObject % index_LayerIndexToDataArray(tracerObject % index_verticalAerosolsConcLayer(iBioTracer)) &
+ = 2*maxAlgaeType + maxDOCType + maxDICType + maxDONType + 2*maxIronType + 7 + iBioTracer
+ enddo ! iBioTracer
+ endif ! config_use_zaerosols
+
+ tracerObject % index_mobileFraction = 0
+ if (tracerObject % nBioTracers > 0) then
+ tracerObject % index_mobileFraction = tracerObject % nTracers + 1
+ tracerObject % nTracers = tracerObject % nTracers + tracerObject % nBioTracers
+ do iBioLayer = 1,tracerObject % nBioTracers
+ initialMobileFraction(iBioLayer) = 1.0_RKIND
+ tracerObject % parentIndex(tracerObject % index_mobileFraction+iBioLayer-1) &
+ = 2+tracerObject % index_brineFraction
+ tracerObject % firstAncestorMask(tracerObject % index_mobileFraction+ iBioLayer - 1,1) = 0.0_RKIND
+ tracerObject % firstAncestorMask(tracerObject % index_mobileFraction+ iBioLayer - 1,2) = 1.0_RKIND
+ tracerObject % firstAncestorMask(tracerObject % index_mobileFraction+ iBioLayer - 1,3) = 0.0_RKIND
+ tracerObject % ancestorNumber(tracerObject % index_mobileFraction+ iBioLayer - 1) = 1
+ tracerObject % ancestorIndices(tracerObject % index_mobileFraction+ iBioLayer - 1,1) &
+ = tracerObject % index_brineFraction
+ tracerObject % ancestorIndices(tracerObject % index_mobileFraction+ iBioLayer - 1,2) = 0
+ retentionTime(iBioLayer) = 1.0_RKIND
+ releaseTime(iBioLayer) = 1.0_RKIND
+
+ if (BGCTracerType(iBioLayer) >= 0.0_RKIND .and. BGCTracerType(iBioLayer) < 0.5_RKIND) then
+ retentionTime(iBioLayer) = config_rapid_mobile_to_stationary_time
+ releaseTime(iBioLayer) = config_long_mobile_to_stationary_time
+ initialMobileFraction(iBioLayer) = 1.0_RKIND
+ elseif (BGCTracerType(iBioLayer) >= 0.5_RKIND .and. BGCTracerType(iBioLayer) < 1.0_RKIND) then
+ retentionTime(iBioLayer) = config_rapid_mobile_to_stationary_time
+ releaseTime(iBioLayer) = config_rapid_mobile_to_stationary_time
+ initialMobileFraction(iBioLayer) = 1.0_RKIND
+ elseif (BGCTracerType(iBioLayer) >= 1.0_RKIND .and. BGCTracerType(iBioLayer) < 2.0_RKIND) then
+ retentionTime(iBioLayer) = config_long_mobile_to_stationary_time
+ releaseTime(iBioLayer) = config_rapid_mobile_to_stationary_time
+ initialMobileFraction(iBioLayer) = 1.0_RKIND
+ elseif (BGCTracerType(iBioLayer) >= 2.0_RKIND ) then
+ retentionTime(iBioLayer) = config_long_mobile_to_stationary_time
+ releaseTime(iBioLayer) = config_long_mobile_to_stationary_time
+ initialMobileFraction(iBioLayer) = 1.0_RKIND
+ endif
+ enddo
+ endif
- allocate(tracerObject % index_algalCarbon(maxAlgaeType))
- allocate(tracerObject % index_algalCarbonLayer(maxAlgaeType))
- tracerObject % nAlgalCarbonIndex = nAlgae
+ endif ! config_use_vertical_tracers
- allocate(tracerObject % index_DOCConc(maxDOCType))
- allocate(tracerObject % index_DOCConcLayer(maxDOCType))
- tracerObject % nDOCIndex = nDOC
+ do iBioLayer = 1, tracerObject % nBioTracers
+ newIceBGCFraction(iBioLayer) = config_fraction_biotracer_in_frazil
+ if (BGCTracerType(iBioLayer) < 0.0_RKIND) &
+ newIceBGCFraction(iBioLayer) = config_new_ice_fraction_biotracer
+ enddo
- allocate(tracerObject % index_DICConc(maxDICType))
- allocate(tracerObject % index_DICConcLayer(maxDICType))
- tracerObject % nDICIndex = nDIC
+ if (.NOT.config_use_shortwave_bioabsorption) tracerObject % nBioTracersShortwave = 1
- allocate(tracerObject % index_algalChlorophyll(maxAlgaeType))
- allocate(tracerObject % index_algalChlorophyllLayer(maxAlgaeType))
- tracerObject % nAlgalChlorophyllIndex = nAlgae
+ !-----------------------------------------------------------------
+ ! final consistency checks
+ !-----------------------------------------------------------------
- allocate(tracerObject % index_DONConc(maxDONType))
- allocate(tracerObject % index_DONConcLayer(maxDONType))
- tracerObject % nDONIndex = nDON
+ if (tracerObject % nBioTracers > nZBGCTracers) then
+ call mpas_log_write(&
+ "init_zbgc_tracer_indices: nBioTracers $i, greater than max nZBGCTracers: $i", &
+ messageType=MPAS_LOG_CRIT, intArgs=(/tracerObject % nBioTracers, nZBGCTracers/))
+ endif
- allocate(tracerObject % index_particulateIronConc(maxIronType))
- allocate(tracerObject % index_particulateIronConcLayer(maxIronType))
- tracerObject % nParticulateIronIndex = nParticulateIron
+ deallocate(algalType)
+ deallocate(docType)
+ deallocate(dicType)
+ deallocate(donType)
+ deallocate(fedType)
+ deallocate(fepType)
+ deallocate(zAeroType)
- allocate(tracerObject % index_dissolvedIronConc(maxIronType))
- allocate(tracerObject % index_dissolvedIronConcLayer(maxIronType))
- tracerObject % nDissolvedIronIndex = nDissolvedIron
+ end subroutine init_zbgc_tracer_indices
- call colpkg_init_zbgc(&
- nBioLayers, &
- nIceLayers, &
- nSnowLayers, &
- nAlgae, &
- nzAerosols, &
- nDOC, &
- nDIC, &
- nDON, &
- nDissolvedIron, &
- nParticulateIron, &
- tracerObject % firstAncestorMask, &
- tracerObject % parentIndex, &
- tracerObject % ancestorNumber, &
- tracerObject % ancestorIndices, &
- tracerObject % nBioTracersShortwave, &
- config_use_brine, &
- tracerObject % index_brineFraction,&
- tracerObject % nTracers, &
- tracerObject % nBioTracers, &
- tracerObject % index_nitrateConc, &
- tracerObject % index_ammoniumConc, &
- tracerObject % index_silicateConc, &
- tracerObject % index_DMSConc, &
- tracerObject % index_nonreactiveConc, &
- tracerObject % index_verticalSalinity, &
- tracerObject % index_algaeConc, &
- tracerObject % index_algalCarbon, &
- tracerObject % index_algalChlorophyll, &
- tracerObject % index_DOCConc, &
- tracerObject % index_DONConc, &
- tracerObject % index_DICConc, &
- tracerObject % index_verticalAerosolsConc, &
- tracerObject % index_DMSPpConc, &
- tracerObject % index_DMSPdConc, &
- tracerObject % index_dissolvedIronConc, &
- tracerObject % index_particulateIronConc, &
- tracerObject % index_mobileFraction, &
- config_use_nitrate, &
- config_use_ammonium, &
- config_use_silicate, &
- config_use_DMS, &
- config_use_nonreactive, &
- config_use_vertical_zsalinity, & !echmod deprecate
- use_nitrogen, &
- config_use_carbon, &
- config_use_chlorophyll, &
- config_use_DON, &
- config_use_iron,&
- config_use_zaerosols, &
- tracerObject % index_verticalAerosolsConcShortwave, &
- tracerObject % index_chlorophyllShortwave, &
- tracerObject % index_algaeConcLayer, &
- tracerObject % index_nitrateConcLayer, &
- tracerObject % index_ammoniumConcLayer, &
- tracerObject % index_silicateConcLayer, &
- tracerObject % index_DMSConcLayer, &
- tracerObject % index_DMSPpConcLayer, &
- tracerObject % index_DMSPdConcLayer, &
- tracerObject % index_algalCarbonLayer, &
- tracerObject % index_algalChlorophyllLayer, &
- tracerObject % index_DICConcLayer, &
- tracerObject % index_DOCConcLayer, &
- tracerObject % index_nonreactiveConcLayer, &
- tracerObject % index_DONConcLayer, &
- tracerObject % index_dissolvedIronConcLayer, &
- tracerObject % index_particulateIronConcLayer, &
- tracerObject % index_verticalAerosolsConcLayer, &
- tracerObject % index_humicsConc, &
- tracerObject % index_humicsConcLayer, &
- config_use_humics, &
- config_use_vertical_zsalinity, & !echmod deprecate
- config_use_skeletal_biochemistry, &
- config_use_vertical_tracers, &
- config_use_shortwave_bioabsorption, &
- config_use_vertical_biochemistry, &
- config_fraction_biotracer_in_frazil, &
- config_new_ice_fraction_biotracer, &
- tracerObject % index_LayerIndexToDataArray, &
- tracerObject % index_LayerIndexToBioIndex, &
- tracerObject % nTracersNotBio, &
- maxAlgaeType, &
- maxDOCType, &
- maxDICType, &
- maxDONType, &
- maxIronType, &
- config_ratio_Si_to_N_diatoms, &
- config_ratio_Si_to_N_small_plankton, &
- config_ratio_Si_to_N_phaeocystis, &
- config_ratio_S_to_N_diatoms, &
- config_ratio_S_to_N_small_plankton, &
- config_ratio_S_to_N_phaeocystis, &
- config_ratio_Fe_to_C_diatoms, &
- config_ratio_Fe_to_C_small_plankton, &
- config_ratio_Fe_to_C_phaeocystis, &
- config_ratio_Fe_to_N_diatoms, &
- config_ratio_Fe_to_N_small_plankton, &
- config_ratio_Fe_to_N_phaeocystis, &
- config_ratio_Fe_to_DON, &
- config_ratio_Fe_to_DOC_saccharids, &
- config_ratio_Fe_to_DOC_lipids, &
- config_chla_absorptivity_of_diatoms, &
- config_chla_absorptivity_of_small_plankton, &
- config_chla_absorptivity_of_phaeocystis, &
- config_light_attenuation_diatoms, &
- config_light_attenuation_small_plankton, &
- config_light_attenuation_phaeocystis, &
- config_light_inhibition_diatoms, &
- config_light_inhibition_small_plankton, &
- config_light_inhibition_phaeocystis, &
- config_maximum_growth_rate_diatoms, &
- config_maximum_growth_rate_small_plankton, &
- config_maximum_growth_rate_phaeocystis, &
- config_temperature_growth_diatoms, &
- config_temperature_growth_small_plankton, &
- config_temperature_growth_phaeocystis, &
- config_grazed_fraction_diatoms, &
- config_grazed_fraction_small_plankton, &
- config_grazed_fraction_phaeocystis, &
- config_mortality_diatoms, &
- config_mortality_small_plankton, &
- config_mortality_phaeocystis, &
- config_temperature_mortality_diatoms, &
- config_temperature_mortality_small_plankton, &
- config_temperature_mortality_phaeocystis, &
- config_exudation_diatoms, &
- config_exudation_small_plankton, &
- config_exudation_phaeocystis, &
- config_nitrate_saturation_diatoms, &
- config_nitrate_saturation_small_plankton, &
- config_nitrate_saturation_phaeocystis, &
- config_ammonium_saturation_diatoms, &
- config_ammonium_saturation_small_plankton, &
- config_ammonium_saturation_phaeocystis, &
- config_silicate_saturation_diatoms, &
- config_silicate_saturation_small_plankton, &
- config_silicate_saturation_phaeocystis, &
- config_iron_saturation_diatoms, &
- config_iron_saturation_small_plankton, &
- config_iron_saturation_phaeocystis, &
- config_fraction_spilled_to_DON, &
- config_degredation_of_DON, &
- config_fraction_DON_ammonium, &
- config_fraction_loss_to_saccharids, &
- config_fraction_loss_to_lipids, &
- config_fraction_exudation_to_saccharids, &
- config_fraction_exudation_to_lipids, &
- config_remineralization_saccharids, &
- config_remineralization_lipids, &
- config_mobility_type_diatoms, &
- config_mobility_type_small_plankton, &
- config_mobility_type_phaeocystis, &
- config_mobility_type_saccharids, &
- config_mobility_type_lipids, &
- config_mobility_type_inorganic_carbon, &
- config_mobility_type_proteins, &
- config_mobility_type_dissolved_iron, &
- config_mobility_type_particulate_iron, &
- config_mobility_type_black_carbon1, &
- config_mobility_type_black_carbon2, &
- config_mobility_type_dust1, &
- config_mobility_type_dust2, &
- config_mobility_type_dust3, &
- config_mobility_type_dust4, &
- config_ratio_C_to_N_diatoms, &
- config_ratio_C_to_N_small_plankton, &
- config_ratio_C_to_N_phaeocystis, &
- config_ratio_chla_to_N_diatoms, &
- config_ratio_chla_to_N_small_plankton, &
- config_ratio_chla_to_N_phaeocystis, &
- config_scales_absorption_diatoms, &
- config_scales_absorption_small_plankton, &
- config_scales_absorption_phaeocystis, &
- config_ratio_C_to_N_proteins, &
- config_mobility_type_nitrate, &
- config_mobility_type_ammonium, &
- config_mobility_type_DMSPp, &
- config_mobility_type_DMSPd, &
- config_mobility_type_silicate, &
- config_mobility_type_humics, &
- config_rapid_mobile_to_stationary_time, &
- config_long_mobile_to_stationary_time)
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! init_bgc_tracer_indices
+!
+!> \brief
+!> \author Nicole Jeffery, LANL
+!> \date 24 May 2024
+!> \details
+!>
+!> Moves icepack_init_bgc_trcr to the interface
+!
+!-----------------------------------------------------------------------
- ! check calculated tracer array size
- if (nTracers_temp /= tracerObject % nTracers) then
- call mpas_log_write(&
- "init_column_tracer_object_for_biogeochemistry: nTracers_temp: $i, nTracers: $i", &
- messageType=MPAS_LOG_CRIT, intArgs=(/nTracers_temp, tracerObject % nTracers/))
- endif
+ subroutine init_bgc_tracer_indices( nCount, iBrineFraction, &
+ iBGCConc, iBGCConcLayer, &
+ BGCType, nTracerDepend, &
+ nTracers, nBioTracers, &
+ BGCTracerType, parentIndexBGC, &
+ firstAncestorMaskBGC, &
+ ancestorNumberBGC, &
+ ancestorIndicesBGC, &
+ layerIndexToBioIndex)
+
+ integer, intent(in) :: &
+ nCount , & ! counter
+ nTracerDepend , & ! tracer dependency index
+ iBrineFraction
+
+ integer, intent(inout) :: &
+ nTracers , & ! number of tracers
+ nBioTracers , & ! number of bio tracers
+ iBGCConc , & ! tracer index
+ iBGCConcLayer ! bio tracer index
+
+ integer, dimension(:), intent(inout) :: &
+ parentIndexBGC , & ! tracer dependencies
+ ancestorNumberBGC, & ! number of underlying tracer layers
+ layerIndexToBioIndex
+
+ integer, dimension(:,:), intent(inout) :: &
+ ancestorIndicesBGC ! indices of underlying tracer layers
+
+ real (kind=RKIND), dimension(:,:), intent(inout) :: &
+ firstAncestorMaskBGC ! = 0 or 1 depending on tracer dependency
+ ! argument 2: (1) aice, (2) vice, (3) vsno
+
+ real (kind=RKIND), intent(in) :: &
+ BGCType ! bio tracer transport type (mobile vs stationary)
+
+ real (kind=RKIND), dimension(:), intent(inout) :: &
+ BGCTracerType ! bio tracer transport type array
+
+ ! local variables
+
+ integer :: &
+ iCount , & ! loop index
+ nTemp , & ! temporary values
+ ancestorIndicesBGC1, & ! temporary values
+ ancestorIndicesBGC2
+
+ real (kind=RKIND) :: &
+ firstAncestorMaskBGC1, & ! temporary values
+ firstAncestorMaskBGC2, &
+ firstAncestorMaskBGC3
+
+ iBGCConc = nTracers + 1
+ nBioTracers = nBioTracers + 1
+ iBGCConcLayer = nBioTracers
+ BGCTracerType(nBioTracers) = BGCType
+
+ if (nCount > 1) then
+ ! include vertical bgc in snow
+ do iCount = nCount, nCount+1
+ nTracers = nTracers + 1
+ parentIndexBGC (iBGCConc + iCount ) = 2 ! snow volume
+ firstAncestorMaskBGC (iBGCConc + iCount,1) = 0.0_RKIND
+ firstAncestorMaskBGC (iBGCConc + iCount,2) = 0.0_RKIND
+ firstAncestorMaskBGC (iBGCConc + iCount,3) = 1.0_RKIND
+ ancestorNumberBGC(iBGCConc + iCount ) = 0
+ ancestorIndicesBGC (iBGCConc + iCount,1) = 0
+ ancestorIndicesBGC (iBGCConc + iCount,2) = 0
+ enddo
- end subroutine init_column_tracer_object_for_biogeochemistry
+ firstAncestorMaskBGC1 = 0.0_RKIND
+ firstAncestorMaskBGC2 = 1.0_RKIND
+ firstAncestorMaskBGC3 = 0.0_RKIND
+ nTemp = 1
+ ancestorIndicesBGC1 = iBrineFraction
+ ancestorIndicesBGC2 = 0
+ else ! nCount = 1
+ firstAncestorMaskBGC1 = 1.0_RKIND
+ firstAncestorMaskBGC2 = 0.0_RKIND
+ firstAncestorMaskBGC3 = 0.0_RKIND
+ nTemp = 0
+ ancestorIndicesBGC1 = 0
+ ancestorIndicesBGC2 = 0
+ endif ! nCount
+
+ do iCount = 1, nCount !in ice
+ nTracers = nTracers + 1
+ parentIndexBGC (iBGCConc + iCount - 1 ) = nTracerDepend
+ firstAncestorMaskBGC (iBGCConc + iCount - 1,1) = firstAncestorMaskBGC1
+ firstAncestorMaskBGC (iBGCConc + iCount - 1,2) = firstAncestorMaskBGC2
+ firstAncestorMaskBGC (iBGCConc + iCount - 1,3) = firstAncestorMaskBGC3
+ ancestorNumberBGC(iBGCConc + iCount - 1 ) = nTemp
+ ancestorIndicesBGC (iBGCConc + iCount - 1,1) = ancestorIndicesBGC1
+ ancestorIndicesBGC (iBGCConc + iCount - 1,2) = ancestorIndicesBGC2
+ enddo
+
+ layerIndexToBioIndex (iBGCConcLayer) = iBGCConc
+
+ end subroutine init_bgc_tracer_indices
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
!
@@ -15036,10 +14024,10 @@ end subroutine init_column_tracer_object_for_biogeochemistry
subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
- use ice_colpkg, only: &
- colpkg_init_bgc, &
- colpkg_init_hbrine!, &
-! colpkg_init_zsalinity !echmod deprecate
+ use icepack_intfc, only: &
+ icepack_init_bgc, &
+ icepack_init_hbrine, &
+ icepack_load_ocean_bio_array
type(domain_type), intent(inout) :: domain
@@ -15057,13 +14045,9 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
logical, pointer :: &
config_use_brine, &
-! config_use_vertical_zsalinity, & !echmod deprecate
config_use_vertical_tracers, &
config_use_skeletal_biochemistry, &
-! config_do_restart_zsalinity, & !echmod deprecate
- config_do_restart_bgc, &
- config_do_restart_hbrine, &
- config_use_macromolecules
+ config_do_restart_hbrine
real(kind=RKIND), pointer :: &
config_dt, &
@@ -15082,7 +14066,6 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
biologyGrid, & ! bgrid
verticalShortwaveGrid, & ! swgrid
interfaceGrid, & ! icgrid
- rayleighCriteriaReal, &
DOCPoolFractions
real(kind=RKIND), dimension(:,:), pointer :: &
@@ -15111,27 +14094,13 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
brineFraction
integer, pointer :: &
- nCellsSolve, &
- nIceLayers, &
- nBioLayers, &
- nBioLayersP1, &
- nBioLayersP2, &
- nCategories, &
- nShortwaveBio, &
- nZBGCTracers, &
- maxAerosolType, &
- maxAlgaeType, &
- maxDOCType, &
- maxDICType, &
- maxDONType, &
- maxIronType
+ nCellsSolve
integer :: &
iCell
logical :: &
abortFlag, &
- rayleighCriteria, &
setGetPhysicsTracers, &
setGetBGCTracers
@@ -15139,15 +14108,11 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
abortMessage
call MPAS_pool_get_config(domain % configs, "config_use_brine", config_use_brine)
-! call MPAS_pool_get_config(domain % configs, "config_do_restart_zsalinity", config_do_restart_zsalinity) !echmod deprecate
- call MPAS_pool_get_config(domain % configs, "config_do_restart_bgc", config_do_restart_bgc)
call MPAS_pool_get_config(domain % configs, "config_do_restart_hbrine", config_do_restart_hbrine)
-! call MPAS_pool_get_config(domain % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity) !echmod deprecate
call MPAS_pool_get_config(domain % configs, "config_use_skeletal_biochemistry", config_use_skeletal_biochemistry)
call MPAS_pool_get_config(domain % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
call MPAS_pool_get_config(domain % configs, "config_dt", config_dt)
call MPAS_pool_get_config(domain % configs, "config_snow_porosity_at_ice_surface", config_snow_porosity_at_ice_surface)
- call MPAS_pool_get_config(domain % configs, "config_use_macromolecules", config_use_macromolecules)
abortFlag = .false.
@@ -15172,7 +14137,6 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
call MPAS_pool_get_array(biogeochemistry, "bioTracerShortwave", bioTracerShortwave)
call MPAS_pool_get_array(biogeochemistry, "interfaceBiologyGrid", interfaceBiologyGrid)
call MPAS_pool_get_array(biogeochemistry, "interfaceGrid", interfaceGrid)
- call MPAS_pool_get_array(biogeochemistry, "rayleighCriteriaReal", rayleighCriteriaReal)
call MPAS_pool_get_array(biogeochemistry, "verticalGrid", verticalGrid)
call MPAS_pool_get_array(biogeochemistry, "biologyGrid", biologyGrid)
call MPAS_pool_get_array(biogeochemistry, "verticalShortwaveGrid", verticalShortwaveGrid)
@@ -15200,29 +14164,14 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
call MPAS_pool_get_array(tracers, "brineFraction", brineFraction, 1)
call MPAS_pool_get_dimension(block % dimensions, "nCellsSolve", nCellsSolve)
- call MPAS_pool_get_dimension(block % dimensions, "nCategories", nCategories)
- call MPAS_pool_get_dimension(block % dimensions, "nIceLayers", nIceLayers)
- call MPAS_pool_get_dimension(block % dimensions, "nBioLayers", nBioLayers)
- call MPAS_pool_get_dimension(block % dimensions, "nBioLayersP1", nBioLayersP1)
- call MPAS_pool_get_dimension(block % dimensions, "nBioLayersP2", nBioLayersP2)
- call MPAS_pool_get_dimension(block % dimensions, "nShortwaveBio", nShortwaveBio)
- call MPAS_pool_get_dimension(block % dimensions, "nZBGCTracers", nZBGCTracers)
- call MPAS_pool_get_dimension(block % dimensions, "maxAerosolType", maxAerosolType)
- call MPAS_pool_get_dimension(block % dimensions, "maxAlgaeType", maxAlgaeType)
- call MPAS_pool_get_dimension(block % dimensions, "maxDOCType", maxDOCType)
- call MPAS_pool_get_dimension(block % dimensions, "maxDICType", maxDICType)
- call MPAS_pool_get_dimension(block % dimensions, "maxDONType", maxDONType)
- call MPAS_pool_get_dimension(block % dimensions, "maxIronType", maxIronType)
-
- call colpkg_init_hbrine(&
- biologyGrid, &
- interfaceBiologyGrid, &
- verticalGrid, &
- interfaceGrid, &
- verticalShortwaveGrid, &
- nBioLayers, &
- nIceLayers, &
- config_snow_porosity_at_ice_surface)
+
+ call icepack_init_hbrine(&
+ bgrid_out=biologyGrid, &
+ igrid_out=interfaceBiologyGrid, &
+ cgrid_out=verticalGrid, &
+ icgrid_out=interfaceGrid, &
+ swgrid_out=verticalShortwaveGrid, &
+ phi_snow=config_snow_porosity_at_ice_surface)
do iCell = 1, nCellsSolve
if (.not. config_do_restart_hbrine) then
@@ -15237,65 +14186,33 @@ subroutine init_column_biogeochemistry_profiles(domain, tracerObject)
call set_cice_tracer_array_category(block, tracerObject, &
tracerArrayCategory, iCell, setGetPhysicsTracers, setGetBGCTracers)
-! if (config_use_vertical_zsalinity) then !echmod deprecate
-! call colpkg_init_zsalinity(&
-! nBioLayers, &
-! tracerObject % nTracersNotBio, &
-! config_do_restart_zsalinity, &
-! rayleighCriteria, &
-! rayleighCriteriaReal(iCell), &
-! tracerArrayCategory(tracerObject % nTracersNotBio+1:tracerObject % nTracers,:), &
-! tracerObject % index_verticalSalinity, &
-! nCategories, &
-! seaSurfaceSalinity(iCell))
-! endif
-
if (config_use_vertical_tracers .or. config_use_skeletal_biochemistry) then
- call colpkg_init_bgc(&
- config_dt, &
- nCategories, &
- nBioLayers, &
- nIceLayers, &
- tracerObject % nTracersNotBio, &
- verticalGrid, &
- interfaceBiologyGrid, &
- config_do_restart_bgc, &
- tracerObject % nTracers, &
- tracerObject % nBiotracers, &
- iceSalinity(:,:,iCell), &
- tracerArrayCategory(tracerObject % nTracersNotBio+1:tracerObject % nTracers,:), &
- seaSurfaceSalinity(iCell), &
- oceanNitrateConc(iCell), &
- oceanAmmoniumConc(iCell), &
- oceanSilicateConc(iCell), &
- oceanDMSPConc(iCell), &
- oceanDMSConc(iCell), &
- oceanAlgaeConc(:,iCell), &
- oceanDOCConc(:,iCell), &
- oceanDONConc(:,iCell), &
- oceanDICConc(:,iCell), &
- oceanDissolvedIronConc(:,iCell), &
- oceanParticulateIronConc(:,iCell), &
- oceanZAerosolConc(:,iCell), &
- oceanHumicsConc(iCell), &
- oceanBioConcentrations(:,iCell), &
- maxAlgaeType, &
- maxDOCType, &
- maxDICType, &
- maxDONType, &
- maxIronType, &
- nZBGCTracers, &
- maxAerosolType, &
- DOCPoolFractions, &
- config_use_macromolecules, &
- abortFlag, &
- abortMessage)
-
- if (abortFlag) then
- call mpas_log_write(&
- "init_column_biogeochemistry_profiles: colpkg_init_bgc: "//trim(abortMessage), &
- messageType=MPAS_LOG_CRIT)
- endif
+
+ call icepack_load_ocean_bio_array(&
+ nit=oceanNitrateConc(iCell), &
+ amm=oceanAmmoniumConc(iCell), &
+ sil=oceanSilicateConc(iCell), &
+ dmsp=oceanDMSPConc(iCell), &
+ dms=oceanDMSConc(iCell), &
+ algalN=oceanAlgaeConc(:,iCell), &
+ doc=oceanDOCConc(:,iCell), &
+ don=oceanDONConc(:,iCell), &
+ dic=oceanDICConc(:,iCell), &
+ fed=oceanDissolvedIronConc(:,iCell), &
+ fep=oceanParticulateIronConc(:,iCell), &
+ zaeros=oceanZAerosolConc(:,iCell), &
+ ocean_bio_all=oceanBioConcentrations(:,iCell), &
+ hum=oceanHumicsConc(iCell))
+
+ call icepack_init_bgc(&
+ sicen=iceSalinity(:,:,iCell), &
+ trcrn=tracerArrayCategory(tracerObject % nTracersNotBio+1:tracerObject % nTracers,:), &
+ sss=seaSurfaceSalinity(iCell), &
+ ocean_bio_all=oceanBioConcentrations(:,iCell), &
+ DOCPoolFractions=DOCPoolFractions)
+
+ call seaice_icepack_write_warnings(icepack_warnings_aborted())
+
endif ! biogeochemistry
! get the category tracer array
@@ -15495,10 +14412,10 @@ subroutine seaice_icepack_reinitialize_diagnostics_thermodynamics(domain)
pondFreshWaterFlux(:) = 0.0_RKIND
- !fresh_ai (:,:,:) = c0
- !fsalt_ai (:,:,:) = c0
- !fhocn_ai (:,:,:) = c0
- !fswthru_ai(:,:,:) = c0
+ !fresh_ai (:,:,:) = 0.0_RKIND
+ !fsalt_ai (:,:,:) = 0.0_RKIND
+ !fhocn_ai (:,:,:) = 0.0_RKIND
+ !fswthru_ai(:,:,:) = 0.0_RKIND
! shortwave
call MPAS_pool_get_subpool(block % structs, "shortwave", shortwavePool)
@@ -15810,8 +14727,9 @@ subroutine seaice_icepack_reinitialize_diagnostics_bgc(domain)
config_use_column_biogeochemistry, &
config_use_column_shortwave, &
config_use_column_physics, &
- config_use_vertical_biochemistry!, &
-! config_use_vertical_zsalinity !echmod deprecate
+ config_use_vertical_tracers, &
+! config_use_vertical_zsalinity, &
+ config_use_zaerosols
call MPAS_pool_get_config(domain % blocklist % configs, "config_use_column_physics", config_use_column_physics)
@@ -15822,15 +14740,16 @@ subroutine seaice_icepack_reinitialize_diagnostics_bgc(domain)
! biogeochemistry
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
- call MPAS_pool_get_config(block % configs, "config_use_vertical_biochemistry", config_use_vertical_biochemistry)
-! call MPAS_pool_get_config(block % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity) !echmod deprecate
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
+ call MPAS_pool_get_config(block % configs, "config_use_vertical_tracers", config_use_vertical_tracers)
+! call MPAS_pool_get_config(block % configs, "config_use_vertical_zsalinity", config_use_vertical_zsalinity)
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistryPool)
call MPAS_pool_get_subpool(block % structs, "diagnostics_biogeochemistry", diagnostics_biogeochemistryPool)
- if (config_use_vertical_biochemistry) then
+ if (config_use_vertical_tracers) then
call MPAS_pool_get_array(biogeochemistryPool, "primaryProduction", primaryProduction)
call MPAS_pool_get_array(biogeochemistryPool, "totalChlorophyll", totalChlorophyll)
call MPAS_pool_get_array(biogeochemistryPool, "netSpecificAlgalGrowthRate", netSpecificAlgalGrowthRate)
@@ -15847,15 +14766,6 @@ subroutine seaice_icepack_reinitialize_diagnostics_bgc(domain)
end if
-! if (config_use_vertical_zsalinity) then !echmod deprecate
-! call MPAS_pool_get_array(biogeochemistryPool, "zSalinityFlux", zSalinityFlux)
-! call MPAS_pool_get_array(biogeochemistryPool, "zSalinityGDFlux", zSalinityGDFlux)
-
-! zSalinityFlux = 0.0_RKIND
-! zSalinityGDFlux = 0.0_RKIND
-
-! end if
-
call MPAS_pool_get_array(biogeochemistryPool, "netBrineHeight", netBrineHeight)
call MPAS_pool_get_array(biogeochemistryPool, "oceanBioFluxes", oceanBioFluxes)
call MPAS_pool_get_array(biogeochemistryPool, "atmosIceBioFluxes", atmosIceBioFluxes)
@@ -15877,7 +14787,7 @@ subroutine seaice_icepack_reinitialize_diagnostics_bgc(domain)
call MPAS_pool_get_config(block % configs, "config_use_column_shortwave", config_use_column_shortwave)
- if (config_use_column_biogeochemistry .or. config_use_column_shortwave) then
+ if (config_use_column_biogeochemistry .or. config_use_column_shortwave .or. config_use_zaerosols) then
call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistryPool)
call MPAS_pool_get_array(biogeochemistryPool, "bioTracerShortwave", bioTracerShortwave)
@@ -16866,7 +15776,7 @@ end subroutine seaice_ocean_carbon_flux
!
!-----------------------------------------------------------------------
- subroutine seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux,oceanBioFluxes,iCell)
+ subroutine seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux,oceanBioFluxes)
real(kind=RKIND), intent(out) :: &
oceanCarbonFlux
@@ -16874,9 +15784,6 @@ subroutine seaice_ocean_carbon_flux_cell(block,oceanCarbonFlux,oceanBioFluxes,iC
real(kind=RKIND), dimension(:), intent(in) :: &
oceanBioFluxes
- integer, intent(in) :: &
- iCell
-
type(block_type), intent(in) :: &
block
@@ -17274,40 +16181,6 @@ subroutine seaice_total_carbon_content_category(block,totalCarbonContentCategory
end subroutine seaice_total_carbon_content_category
-!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-!-----------------------------------------------------------------------
-! Warning messages
-!-----------------------------------------------------------------------
-
-!echmod: remove this subroutine and all calls to it
-
- subroutine column_write_warnings(logAsErrors)
-
- use ice_colpkg, only: colpkg_get_warnings
-
- character(len=strKINDWarnings), dimension(:), allocatable :: &
- warnings
-
- logical, intent(in) :: &
- logAsErrors
-
- integer :: &
- iWarning
-
- call colpkg_get_warnings(warnings)
-
- if (logAsErrors) then
- do iWarning = 1, size(warnings)
- call mpas_log_write(trim(warnings(iWarning)), messageType=MPAS_LOG_ERR)
- enddo ! iWarning
- else
- do iWarning = 1, size(warnings)
- call mpas_log_write(trim(warnings(iWarning)), messageType=MPAS_LOG_WARN)
- enddo ! iWarning
- endif
-
- end subroutine column_write_warnings
-
!-----------------------------------------------------------------------
subroutine seaice_icepack_write_warnings(logAsErrors)
@@ -17330,12 +16203,12 @@ subroutine seaice_icepack_write_warnings(logAsErrors)
if (logAsErrors) then
do iWarning = 1, size(warnings)
call mpas_log_write(trim(warnings(iWarning)), messageType=MPAS_LOG_ERR)
- enddo ! iWarning
+ enddo ! iWarning
call mpas_log_write("icepack aborted", MPAS_LOG_CRIT)
else
do iWarning = 1, size(warnings)
call mpas_log_write(trim(warnings(iWarning)), messageType=MPAS_LOG_WARN)
- enddo ! iWarning
+ enddo ! iWarning
endif
call icepack_warnings_clear()
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_initialize.F b/components/mpas-seaice/src/shared/mpas_seaice_initialize.F
index 5611c090e212..69f145881758 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_initialize.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_initialize.F
@@ -784,8 +784,6 @@ subroutine init_ice_state_uniform_1D(&
initialSalinityProfile(:,iCell), &
initialMeltingTemperatureProfile(:,iCell), &
surfaceTemperature(1,1,iCell), &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy(:,1,iCell), &
snowEnthalpy(:,1,iCell))
call seaice_icepack_write_warnings(icepack_warnings_aborted())
@@ -990,8 +988,6 @@ subroutine init_ice_cice_default(&
initialSalinityProfile(:,iCell), &
initialMeltingTemperatureProfile(:,iCell), &
surfaceTemperature(1,iCategory,iCell), &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy(:,iCategory,iCell), &
snowEnthalpy(:,iCategory,iCell))
call seaice_icepack_write_warnings(icepack_warnings_aborted())
@@ -1148,7 +1144,6 @@ subroutine initial_category_areas_and_volumes(&
if (trim(config_column_physics_type) == "icepack") then
call icepack_init_itd(&
- nCategories, &
categoryThicknessLimits)
call seaice_icepack_write_warnings(icepack_warnings_aborted())
else if (trim(config_column_physics_type) == "column_package") then
@@ -1341,8 +1336,6 @@ subroutine init_ice_single_cell(&
initialSalinityProfile(:,iCell), &
initialMeltingTemperatureProfile(:,iCell), &
surfaceTemperature(1,iCategory,iCell), &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy(:,iCategory,iCell), &
snowEnthalpy(:,iCategory,iCell))
call seaice_icepack_write_warnings(icepack_warnings_aborted())
@@ -1562,8 +1555,6 @@ subroutine init_ice_ridging(&
initialSalinityProfile(:,iCell), &
initialMeltingTemperatureProfile(:,iCell), &
surfaceTemperature(1,iCategory,iCell), &
- nIceLayers, &
- nSnowLayers, &
iceEnthalpy(:,iCategory,iCell), &
snowEnthalpy(:,iCategory,iCell))
call seaice_icepack_write_warnings(icepack_warnings_aborted())
@@ -2580,11 +2571,12 @@ subroutine initialize_coupler_fields(domain)
maxAerosolType, &
nZBGCTracers
- logical, pointer :: &
+ logical, pointer :: &
config_do_restart, &
config_use_column_biogeochemistry, &
config_use_column_physics, &
- config_use_aerosols
+ config_use_aerosols, &
+ config_use_zaerosols
integer, pointer :: &
nCells
@@ -2682,8 +2674,9 @@ subroutine initialize_coupler_fields(domain)
endif
call MPAS_pool_get_config(block % configs, "config_use_column_biogeochemistry", config_use_column_biogeochemistry)
+ call MPAS_pool_get_config(block % configs, "config_use_zaerosols", config_use_zaerosols)
- if (config_use_column_biogeochemistry) then
+ if (config_use_column_biogeochemistry .or. config_use_zaerosols) then
call MPAS_pool_get_subpool(block % structs, "biogeochemistry", biogeochemistry)
@@ -2748,12 +2741,8 @@ subroutine initialize_coupler_fields(domain)
oceanNitrateConc(iCell), &
oceanSilicateConc(iCell),&
oceanZAerosolConc(:,iCell), &
- maxDICType, &
- maxDONType, &
- maxIronType, &
- maxAerosolType, &
- carbonToNitrogenRatioAlgae, &
- carbonToNitrogenRatioDON)
+ carbonToNitrogenRatioAlgae(:), &
+ carbonToNitrogenRatioDON(:))
enddo ! iCell
else if (trim(config_column_physics_type) == "column_package") then
@@ -2777,8 +2766,8 @@ subroutine initialize_coupler_fields(domain)
maxDONType, &
maxIronType, &
maxAerosolType, &
- carbonToNitrogenRatioAlgae, &
- carbonToNitrogenRatioDON)
+ carbonToNitrogenRatioAlgae(:), &
+ carbonToNitrogenRatioDON(:))
enddo ! iCell
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_velocity_solver.F b/components/mpas-seaice/src/shared/mpas_seaice_velocity_solver.F
index f49ac45a9360..3009b618161b 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_velocity_solver.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_velocity_solver.F
@@ -1431,7 +1431,6 @@ subroutine ice_strength(domain)
! this routine doesnt reset icePressure
call icepack_ice_strength(&
- nCategories, &
iceAreaCell(iCell), &
iceVolumeCell(iCell), &
openWaterArea(iCell), &