Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cime_config/config_grids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5910,6 +5910,7 @@
<gridmap ocn_grid="IcoswISC30E3r5" rof_grid="JRA025">
<map name="ROF2OCN_ICE_RMAPNAME">cpl/cpl6/map_JRA025_to_IcoswISC30E3r5_cstmnn.r150e300.20231121.nc</map>
<map name="ROF2OCN_LIQ_RMAPNAME">cpl/cpl6/map_JRA025_to_IcoswISC30E3r5_cstmnn.r150e300.20231121.nc</map>
<map name="ROF2ICE_RMAPNAME">cpl/cpl6/map_JRA025_to_IcoswISC30E3r5_cstmnn.r150e300.20231121.nc</map>
</gridmap>

<gridmap ocn_grid="IcosXISC30E3r7" rof_grid="JRA025">
Expand Down Expand Up @@ -6486,6 +6487,7 @@
<map name="OCN2GLC_SHELF_FMAPNAME">cpl/gridmaps/IcoswISC30E3r5/map_IcoswISC30E3r5-nomask_to_ais4to20_esmfaave.20240701.nc</map>
<map name="OCN2GLC_SHELF_SMAPNAME">cpl/gridmaps/IcoswISC30E3r5/map_IcoswISC30E3r5-nomask_to_ais4to20_esmfbilin.20240701.nc</map>
<map name="OCN2GLC_TF_SMAPNAME">cpl/gridmaps/IcoswISC30E3r5/map_IcoswISC30E3r5-nomask_to_ais4to20_esmfbilin.20250403.nc</map>
<map name="GLC2ICE_RMAPNAME">cpl/gridmaps/mpas.ais4to20km/map_ais4to20_to_IcoswISC30E3r5-nomask_esmfaave.20240701.nc</map>
<map name="GLC2ICE_FMAPNAME">cpl/gridmaps/mpas.ais4to20km/map_ais4to20_to_IcoswISC30E3r5-nomask_esmfaave.20240701.nc</map>
<map name="GLC2ICE_SMAPNAME">cpl/gridmaps/mpas.ais4to20km/map_ais4to20_to_IcoswISC30E3r5-nomask_esmfbilin.20240701.nc</map>
<map name="GLC2OCN_FMAPNAME">cpl/gridmaps/mpas.ais4to20km/map_ais4to20_to_IcoswISC30E3r5-nomask_esmfaave.20240701.nc</map>
Expand Down
10 changes: 5 additions & 5 deletions components/mpas-albany-landice/driver/glc_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -1554,12 +1554,12 @@ subroutine glc_export_mct(g2x_g, errorCode)
do i = 1, nCellsSolve
n = n + 1

! Fogg_rofl
! Fogg_rofl - liquid runoff to ocean
g2x_g % rAttr(index_g2x_Fogg_rofl,n) = avgBareIceAblationApplied(i)
! Figg_rofi
g2x_g % rAttr(index_g2x_Figg_rofi,n) = 0.0 ! placeholder
! Fogg_rofi
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = avgCalvingFlux(i)
! Figg_rofi - solid runoff to sea ice
g2x_g % rAttr(index_g2x_Figg_rofi,n) = avgCalvingFlux(i)
! Fogg_rofi - solid runoff to ocean
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = 0.0
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = g2x_g % rAttr(index_g2x_Fogg_rofi,n) + avgFaceMeltFlux(i)
if (trim(config_basal_mass_bal_float) == 'ismip6') then
! if MALI is calculating ISMF, add that to rofi
Expand Down
61 changes: 47 additions & 14 deletions components/mpas-seaice/driver/ice_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ end subroutine xml_stream_get_attributes

call t_stopf ('mpassi_mct_init')

call seq_infodata_PutData( infodata, ice_prognostic=.true.)
call seq_infodata_PutData( infodata, ice_prognostic=.true., iceberg_prognostic=.true.)

!-----------------------------------------------------------------------
!
Expand Down Expand Up @@ -2095,6 +2095,7 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
! The following fields are sometimes received from the coupler,
! depending on model options:
!
! o rofi -- frozen water flux into sea ice
! o algae1 --
! o algae2 --
! o algae3 --
Expand Down Expand Up @@ -2125,6 +2126,10 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
! !REVISION HISTORY:
! same as module

use seaice_constants, only: &
seaiceLatentHeatMelting, & ! latent heat of melting of fresh ice (J/kg)
seaiceFreshIceSpecificHeat ! specific heat of fresh ice (J/kg/K)

! !INPUT/OUTPUT PARAMETERS:

type(mct_aVect), intent(inout) :: x2i_i
Expand Down Expand Up @@ -2161,6 +2166,7 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
aerosols, &
atmosCoupling, &
oceanCoupling, &
icebergFluxes, &
biogeochemistry

integer, pointer :: nCellsSolve
Expand All @@ -2170,7 +2176,11 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
config_use_modal_aerosols, &
config_use_zaerosols, &
config_use_column_biogeochemistry, &
config_couple_biogeochemistry_fields
config_couple_biogeochemistry_fields, &
config_use_data_icebergs

real(kind=RKIND), pointer :: &
bergTemperature ! iceberg temperature

character(len=strKIND), pointer :: &
config_column_physics_type, &
Expand Down Expand Up @@ -2201,6 +2211,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
snowfallRateField, &
uAirVelocityField, &
vAirVelocityField, &
bergFreshwaterFluxField, &
bergLatentHeatFluxField, &
oceanNitrateConcField, &
oceanSilicateConcField, &
oceanAmmoniumConcField, &
Expand Down Expand Up @@ -2246,6 +2258,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
snowfallRate, &
uAirVelocity, &
vAirVelocity, &
bergFreshwaterFlux, &
bergLatentHeatFlux, &
oceanNitrateConc, &
oceanSilicateConc, &
oceanAmmoniumConc, &
Expand Down Expand Up @@ -2291,6 +2305,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_config(configs, "config_column_physics_type", config_column_physics_type)
call mpas_pool_get_config(configs, "config_thermodynamics_type", config_thermodynamics_type)
call mpas_pool_get_config(configs, "config_ocean_surface_type", config_ocean_surface_type)
call MPAS_pool_get_config(configs, "config_use_data_icebergs", config_use_data_icebergs)
call MPAS_pool_get_config(configs, "config_iceberg_temperature", bergTemperature)
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)
Expand Down Expand Up @@ -2328,6 +2344,12 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_pool_get_array(atmosCoupling, 'uAirVelocity', uAirVelocity)
call mpas_pool_get_array(atmosCoupling, 'vAirVelocity', vAirVelocity)

if (.not. 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_aerosols) then
call mpas_pool_get_subpool(block_ptr % structs, 'aerosols', aerosols)

Expand Down Expand Up @@ -2417,6 +2439,13 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
uAirVelocity(i) = x2i_i % rAttr(index_x2i_Sa_u, n)
vAirVelocity(i) = x2i_i % rAttr(index_x2i_Sa_v, n)

! if not using data icebergs, import icebergs here
if (.not. config_use_data_icebergs) then
bergFreshwaterFlux(i) = x2i_i % rAttr(index_x2i_Fixx_rofi, n)
bergLatentHeatFlux(i) = bergFreshwaterFlux(i) * &
(seaiceLatentHeatMelting - seaiceFreshIceSpecificHeat*bergTemperature)
endif

! set aerosols, if configured
if (config_use_aerosols) then
if (config_use_modal_aerosols) then
Expand Down Expand Up @@ -2641,6 +2670,14 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{
call mpas_dmpar_exch_halo_field(uAirVelocityField)
call mpas_dmpar_exch_halo_field(vAirVelocityField)

if (.not. config_use_data_icebergs) then
call mpas_pool_get_subpool(domain % blocklist % structs, 'berg_fluxes', icebergFluxes)
call mpas_pool_get_field(icebergFluxes, 'bergFreshwaterFlux', bergFreshwaterFluxField)
call mpas_pool_get_field(icebergFluxes, 'bergLatentHeatFlux', bergLatentHeatFluxField)
call mpas_dmpar_exch_halo_field(bergFreshwaterFluxField)
call mpas_dmpar_exch_halo_field(bergLatentHeatFluxField)
endif

if (config_use_aerosols) then
call mpas_dmpar_exch_halo_field(atmosAerosolFluxField)
endif
Expand Down Expand Up @@ -2742,8 +2779,7 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
config_use_column_biogeochemistry, &
config_use_zaerosols, &
config_couple_biogeochemistry_fields, &
config_use_column_shortwave, &
config_use_data_icebergs
config_use_column_shortwave

real(kind=RKIND), pointer :: &
sphere_radius
Expand Down Expand Up @@ -2818,7 +2854,6 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
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)
Expand Down Expand Up @@ -2872,12 +2907,10 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
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_subpool(block_ptr % structs, "berg_fluxes", icebergFluxes)

call MPAS_pool_get_array(icebergFluxes, "bergFreshwaterFlux", bergFreshwaterFlux)
call MPAS_pool_get_array(icebergFluxes, "bergLatentHeatFlux", bergLatentHeatFlux)
endif
call MPAS_pool_get_array(icebergFluxes, "bergFreshwaterFlux", bergFreshwaterFlux)
call MPAS_pool_get_array(icebergFluxes, "bergLatentHeatFlux", bergLatentHeatFlux)

if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then
call mpas_pool_get_subpool(block_ptr % structs, 'biogeochemistry', biogeochemistry)
Expand Down Expand Up @@ -2956,10 +2989,10 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{
!-------states--------------------
i2x_i % rAttr(index_i2x_Si_ifrac ,n) = ailohi

if (config_use_data_icebergs) then
i2x_i % rAttr(index_i2x_Fioi_bergw,n) = bergFreshwaterFlux(i)
i2x_i % rAttr(index_i2x_Fioi_bergh,n) = bergLatentHeatFlux(i)
endif
! Always export berg fluxes - they are either from coupler or from data
! but either way have been assigned at this point
i2x_i % rAttr(index_i2x_Fioi_bergw,n) = bergFreshwaterFlux(i)
i2x_i % rAttr(index_i2x_Fioi_bergh,n) = bergLatentHeatFlux(i)

if ( ailohi > 0.0_RKIND ) then

Expand Down
2 changes: 2 additions & 0 deletions components/mpas-seaice/driver/mpassi_cpl_indices.F
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ module mpassi_cpl_indices
integer :: index_x2i_Faxa_swnet ! sw: net
integer :: index_x2i_Fioo_q ! ocn freezing melting potential
integer :: index_x2i_Fioo_frazil ! ocn frazil ice formation
integer :: index_x2i_Fixx_rofi ! flux: frozen water flux into sea ice
integer :: index_x2i_Faxa_bcphidry ! flux: Black Carbon hydrophilic dry deposition
integer :: index_x2i_Faxa_bcphodry ! flux: Black Carbon hydrophobic dry deposition
integer :: index_x2i_Faxa_bcphiwet ! flux: Black Carbon hydrophilic wet deposition
Expand Down Expand Up @@ -214,6 +215,7 @@ subroutine mpassi_cpl_indices_set( )
index_x2i_Faxa_swvdf = mct_avect_indexra(x2i,'Faxa_swvdf')
index_x2i_Fioo_q = mct_avect_indexra(x2i,'Fioo_q')
index_x2i_Fioo_frazil = mct_avect_indexra(x2i,'Fioo_frazil')
index_x2i_Fixx_rofi = mct_avect_indexra(x2i,'Fixx_rofi')
index_x2i_Faxa_bcphidry = mct_avect_indexra(x2i,'Faxa_bcphidry')
index_x2i_Faxa_bcphodry = mct_avect_indexra(x2i,'Faxa_bcphodry')
index_x2i_Faxa_bcphiwet = mct_avect_indexra(x2i,'Faxa_bcphiwet')
Expand Down
2 changes: 1 addition & 1 deletion components/mpas-seaice/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4967,7 +4967,7 @@
</var_struct>

<!-- fluxes from icebergs to ocean -->
<var_struct name="berg_fluxes" time_levs="1" packages="pkgBergs">
<var_struct name="berg_fluxes" time_levs="1">
<var name="bergFreshwaterFlux"
type="real"
dimensions="nCells Time"
Expand Down
17 changes: 17 additions & 0 deletions driver-mct/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,23 @@
<desc>rof2ocn runoff mapping file decomp type</desc>
</entry>

<entry id="ROF2ICE_RMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>rof2ice runoff mapping file</desc>
</entry>

<entry id="ROF2ICE_RMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>rof2ice runoff mapping file decomp type</desc>
</entry>

<entry id="GLC2LND_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
Expand Down
29 changes: 29 additions & 0 deletions driver-mct/cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4748,6 +4748,35 @@
</values>
</entry>

<entry id="rof2ice_rmapname" modify_via_xml="ROF2ICE_RMAPNAME">
<type>char</type>
<category>mapping</category>
<input_pathname>abs</input_pathname>
<group>seq_maps</group>
<desc>
runoff to ice mapping file
</desc>
<values>
<value>$ROF2ICE_RMAPNAME</value>
</values>
</entry>

<entry id="rof2ice_rmaptype" modify_via_xml="ROF2ICE_RMAPTYPE">
<type>char</type>
<category>mapping</category>
<group>seq_maps</group>
<desc>
The type of mapping desired, either "source" or "destination" mapping.
X is associated with rearrangement of the source grid to the
destination grid and then local mapping. Y is associated with mapping
on the source grid and then rearrangement and sum to the destination
grid.
</desc>
<values>
<value>$ROF2ICE_RMAPTYPE</value>
<value bfbflag="on">X</value>
</values>
</entry>

<entry id="lnd2glc_fmapname" modify_via_xml="LND2GLC_FMAPNAME">
<type>char</type>
Expand Down
2 changes: 1 addition & 1 deletion driver-mct/main/prep_ice_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ subroutine prep_ice_calc_g2x_ix(timer)
do egi = 1,num_inst_glc
g2x_gx => component_get_c2x_cx(glc(egi))
call seq_map_map(mapper_Rg2i, g2x_gx, g2x_ix(egi), &
fldlist='Fixx_rofi', norm=.true.)
fldlist='Figg_rofi', norm=.true.)
enddo
call t_drvstopf (trim(timer))

Expand Down