Skip to content

Commit

Permalink
Merge pull request #1 from darincomeau/cherry-pick-from-akt
Browse files Browse the repository at this point in the history
Bring in changes from AKT icepack-integration branch
Merging now in order to cleanly update to the latest E3SM with better testing options.
  • Loading branch information
eclare108213 authored Dec 16, 2022
2 parents d240501 + 85e3174 commit 2ad4b45
Show file tree
Hide file tree
Showing 17 changed files with 18,871 additions and 232 deletions.
1 change: 1 addition & 0 deletions components/mpas-seaice/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ add_default($nl, 'config_recover_tracer_means_check');
# Namelist group: column_package #
##################################

add_default($nl, 'config_column_physics_type');
add_default($nl, 'config_use_column_shortwave');
add_default($nl, 'config_use_column_vertical_thermodynamics');
if ($ice_bgc eq 'ice_bgc') {
Expand Down
1 change: 1 addition & 0 deletions components/mpas-seaice/bld/build-namelist-section
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ add_default($nl, 'config_recover_tracer_means_check');
# Namelist group: column_package #
##################################

add_default($nl, 'config_column_physics_type');
add_default($nl, 'config_use_column_shortwave');
add_default($nl, 'config_use_column_vertical_thermodynamics');
add_default($nl, 'config_use_column_biogeochemistry');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<config_recover_tracer_means_check>false</config_recover_tracer_means_check>

<!-- column_package -->
<config_column_physics_type>'column_package'</config_column_physics_type>
<config_use_column_shortwave>true</config_use_column_shortwave>
<config_use_column_vertical_thermodynamics>true</config_use_column_vertical_thermodynamics>
<config_use_column_biogeochemistry>false</config_use_column_biogeochemistry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,14 @@ Default: Defined in namelist_defaults.xml

<!-- column_package -->

<entry id="config_column_physics_type" type="char*1024"
category="column_package" group="column_package">
Set column physics library.

Valid values: 'icepack' and 'column_package'
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_use_column_shortwave" type="logical"
category="column_package" group="column_package">
Run the shortwave radiation column physics calculation.
Expand Down
14 changes: 9 additions & 5 deletions components/mpas-seaice/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.SUFFIXES: .F .o
.PHONY: model_forward analysis_members shared
.PHONY: column_package icepack model_forward analysis_members shared

all: core_seaice

core_seaice: column_package shared analysis_members model_forward
core_seaice: icepack column_package shared analysis_members model_forward
ar -ru libdycore.a `find . -type f -name "*.o"`

gen_includes:
Expand All @@ -24,18 +24,22 @@ post_build:
column_package:
(cd column; $(MAKE))

shared: column_package
icepack:
$(MAKE) -f ../../Makefile.icepack --directory=icepack/columnphysics

shared: column_package icepack
(cd shared; $(MAKE))

analysis_members: column_package shared
analysis_members: column_package icepack shared
(cd analysis_members; $(MAKE))

model_forward: column_package shared analysis_members
model_forward: column_package icepack shared analysis_members
(cd model_forward; $(MAKE))

clean:
$(RM) *.o *.mod *.f90 libdycore.a
(cd column; $(MAKE) clean)
$(MAKE) -f ../../Makefile.icepack --directory=icepack/columnphysics clean
(cd shared; $(MAKE) clean)
(cd analysis_members; $(MAKE) clean)
(cd model_forward; $(MAKE) clean)
Expand Down
239 changes: 239 additions & 0 deletions components/mpas-seaice/src/Makefile.icepack
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
.SUFFIXES: .F90 .o

OBJS = icepack_aerosol.o \
icepack_age.o \
icepack_algae.o \
icepack_atmo.o \
icepack_brine.o \
icepack_firstyear.o \
icepack_flux.o \
icepack_fsd.o \
icepack_intfc.o \
icepack_isotope.o \
icepack_itd.o \
icepack_kinds.o \
icepack_mechred.o \
icepack_meltpond_cesm.o \
icepack_meltpond_lvl.o \
icepack_meltpond_topo.o \
icepack_mushy_physics.o \
icepack_ocean.o \
icepack_orbital.o \
icepack_parameters.o \
icepack_shortwave.o \
icepack_shortwave_data.o \
icepack_snow.o \
icepack_therm_0layer.o \
icepack_therm_bl99.o \
icepack_therm_itd.o \
icepack_therm_mushy.o \
icepack_therm_shared.o \
icepack_therm_vertical.o \
icepack_tracers.o \
icepack_warnings.o \
icepack_wavefracspec.o \
icepack_zbgc.o \
icepack_zbgc_shared.o \
icepack_zsalinity.o


all: $(OBJS)


icepack_aerosol.o:icepack_kinds.o
icepack_aerosol.o:icepack_parameters.o
icepack_aerosol.o:icepack_tracers.o
icepack_aerosol.o:icepack_warnings.o
icepack_aerosol.o:icepack_zbgc_shared.o
icepack_age.o:icepack_kinds.o
icepack_age.o:icepack_warnings.o
icepack_algae.o:icepack_aerosol.o
icepack_algae.o:icepack_kinds.o
icepack_algae.o:icepack_parameters.o
icepack_algae.o:icepack_tracers.o
icepack_algae.o:icepack_warnings.o
icepack_algae.o:icepack_zbgc_shared.o
icepack_atmo.o:icepack_kinds.o
icepack_atmo.o:icepack_parameters.o
icepack_atmo.o:icepack_tracers.o
icepack_atmo.o:icepack_warnings.o
icepack_brine.o:icepack_kinds.o
icepack_brine.o:icepack_mushy_physics.o
icepack_brine.o:icepack_parameters.o
icepack_brine.o:icepack_therm_shared.o
icepack_brine.o:icepack_tracers.o
icepack_brine.o:icepack_warnings.o
icepack_brine.o:icepack_zbgc_shared.o
icepack_firstyear.o:icepack_kinds.o
icepack_firstyear.o:icepack_parameters.o
icepack_firstyear.o:icepack_warnings.o
icepack_flux.o:icepack_kinds.o
icepack_flux.o:icepack_parameters.o
icepack_flux.o:icepack_tracers.o
icepack_flux.o:icepack_warnings.o
icepack_fsd.o:icepack_kinds.o
icepack_fsd.o:icepack_parameters.o
icepack_fsd.o:icepack_tracers.o
icepack_fsd.o:icepack_warnings.o
icepack_intfc.o:icepack_atmo.o
icepack_intfc.o:icepack_brine.o
icepack_intfc.o:icepack_fsd.o
icepack_intfc.o:icepack_itd.o
icepack_intfc.o:icepack_kinds.o
icepack_intfc.o:icepack_mechred.o
icepack_intfc.o:icepack_mushy_physics.o
icepack_intfc.o:icepack_ocean.o
icepack_intfc.o:icepack_orbital.o
icepack_intfc.o:icepack_parameters.o
icepack_intfc.o:icepack_shortwave.o
icepack_intfc.o:icepack_shortwave_data.o
icepack_intfc.o:icepack_snow.o
icepack_intfc.o:icepack_therm_itd.o
icepack_intfc.o:icepack_therm_shared.o
icepack_intfc.o:icepack_therm_vertical.o
icepack_intfc.o:icepack_tracers.o
icepack_intfc.o:icepack_warnings.o
icepack_intfc.o:icepack_wavefracspec.o
icepack_intfc.o:icepack_zbgc.o
icepack_isotope.o:icepack_kinds.o
icepack_isotope.o:icepack_parameters.o
icepack_isotope.o:icepack_tracers.o
icepack_isotope.o:icepack_warnings.o
icepack_itd.o:icepack_kinds.o
icepack_itd.o:icepack_parameters.o
icepack_itd.o:icepack_therm_shared.o
icepack_itd.o:icepack_tracers.o
icepack_itd.o:icepack_warnings.o
icepack_itd.o:icepack_zbgc_shared.o
icepack_mechred.o:icepack_itd.o
icepack_mechred.o:icepack_kinds.o
icepack_mechred.o:icepack_parameters.o
icepack_mechred.o:icepack_tracers.o
icepack_mechred.o:icepack_warnings.o
icepack_meltpond_cesm.o:icepack_kinds.o
icepack_meltpond_cesm.o:icepack_parameters.o
icepack_meltpond_cesm.o:icepack_warnings.o
icepack_meltpond_lvl.o:icepack_kinds.o
icepack_meltpond_lvl.o:icepack_parameters.o
icepack_meltpond_lvl.o:icepack_therm_shared.o
icepack_meltpond_lvl.o:icepack_warnings.o
icepack_meltpond_topo.o:icepack_kinds.o
icepack_meltpond_topo.o:icepack_parameters.o
icepack_meltpond_topo.o:icepack_therm_shared.o
icepack_meltpond_topo.o:icepack_warnings.o
icepack_mushy_physics.o:icepack_kinds.o
icepack_mushy_physics.o:icepack_parameters.o
icepack_mushy_physics.o:icepack_warnings.o
icepack_ocean.o:icepack_kinds.o
icepack_ocean.o:icepack_parameters.o
icepack_ocean.o:icepack_warnings.o
icepack_orbital.o:icepack_kinds.o
icepack_orbital.o:icepack_parameters.o
icepack_orbital.o:icepack_warnings.o
icepack_parameters.o:icepack_kinds.o
icepack_parameters.o:icepack_warnings.o
icepack_shortwave.o:icepack_kinds.o
icepack_shortwave.o:icepack_orbital.o
icepack_shortwave.o:icepack_parameters.o
icepack_shortwave.o:icepack_shortwave_data.o
icepack_shortwave.o:icepack_tracers.o
icepack_shortwave.o:icepack_warnings.o
icepack_shortwave.o:icepack_zbgc_shared.o
icepack_shortwave_data.o:icepack_kinds.o
icepack_shortwave_data.o:icepack_warnings.o
icepack_shortwave_data.o:icepack_parameters.o
icepack_snow.o:icepack_kinds.o
icepack_snow.o:icepack_parameters.o
icepack_snow.o:icepack_therm_shared.o
icepack_snow.o:icepack_warnings.o
icepack_therm_0layer.o:icepack_kinds.o
icepack_therm_0layer.o:icepack_parameters.o
icepack_therm_0layer.o:icepack_therm_bl99.o
icepack_therm_0layer.o:icepack_warnings.o
icepack_therm_bl99.o:icepack_kinds.o
icepack_therm_bl99.o:icepack_parameters.o
icepack_therm_bl99.o:icepack_therm_shared.o
icepack_therm_bl99.o:icepack_warnings.o
icepack_therm_itd.o:icepack_fsd.o
icepack_therm_itd.o:icepack_isotope.o
icepack_therm_itd.o:icepack_itd.o
icepack_therm_itd.o:icepack_kinds.o
icepack_therm_itd.o:icepack_mushy_physics.o
icepack_therm_itd.o:icepack_parameters.o
icepack_therm_itd.o:icepack_therm_shared.o
icepack_therm_itd.o:icepack_tracers.o
icepack_therm_itd.o:icepack_warnings.o
icepack_therm_itd.o:icepack_zbgc.o
icepack_therm_mushy.o:icepack_kinds.o
icepack_therm_mushy.o:icepack_mushy_physics.o
icepack_therm_mushy.o:icepack_parameters.o
icepack_therm_mushy.o:icepack_therm_shared.o
icepack_therm_mushy.o:icepack_tracers.o
icepack_therm_mushy.o:icepack_warnings.o
icepack_therm_shared.o:icepack_kinds.o
icepack_therm_shared.o:icepack_mushy_physics.o
icepack_therm_shared.o:icepack_parameters.o
icepack_therm_shared.o:icepack_warnings.o
icepack_therm_vertical.o:icepack_aerosol.o
icepack_therm_vertical.o:icepack_age.o
icepack_therm_vertical.o:icepack_atmo.o
icepack_therm_vertical.o:icepack_firstyear.o
icepack_therm_vertical.o:icepack_flux.o
icepack_therm_vertical.o:icepack_isotope.o
icepack_therm_vertical.o:icepack_kinds.o
icepack_therm_vertical.o:icepack_meltpond_cesm.o
icepack_therm_vertical.o:icepack_meltpond_lvl.o
icepack_therm_vertical.o:icepack_meltpond_topo.o
icepack_therm_vertical.o:icepack_mushy_physics.o
icepack_therm_vertical.o:icepack_parameters.o
icepack_therm_vertical.o:icepack_snow.o
icepack_therm_vertical.o:icepack_therm_0layer.o
icepack_therm_vertical.o:icepack_therm_bl99.o
icepack_therm_vertical.o:icepack_therm_mushy.o
icepack_therm_vertical.o:icepack_therm_shared.o
icepack_therm_vertical.o:icepack_tracers.o
icepack_therm_vertical.o:icepack_warnings.o
icepack_tracers.o:icepack_kinds.o
icepack_tracers.o:icepack_parameters.o
icepack_tracers.o:icepack_warnings.o
icepack_warnings.o:icepack_kinds.o
icepack_wavefracspec.o:icepack_fsd.o
icepack_wavefracspec.o:icepack_kinds.o
icepack_wavefracspec.o:icepack_parameters.o
icepack_wavefracspec.o:icepack_tracers.o
icepack_wavefracspec.o:icepack_warnings.o
icepack_zbgc.o:icepack_algae.o
icepack_zbgc.o:icepack_brine.o
icepack_zbgc.o:icepack_itd.o
icepack_zbgc.o:icepack_kinds.o
icepack_zbgc.o:icepack_parameters.o
icepack_zbgc.o:icepack_therm_shared.o
icepack_zbgc.o:icepack_tracers.o
icepack_zbgc.o:icepack_warnings.o
icepack_zbgc.o:icepack_zbgc_shared.o
icepack_zbgc.o:icepack_zsalinity.o
icepack_zbgc_shared.o:icepack_kinds.o
icepack_zbgc_shared.o:icepack_parameters.o
icepack_zbgc_shared.o:icepack_tracers.o
icepack_zbgc_shared.o:icepack_warnings.o
icepack_zsalinity.o:icepack_brine.o
icepack_zsalinity.o:icepack_kinds.o
icepack_zsalinity.o:icepack_parameters.o
icepack_zsalinity.o:icepack_therm_shared.o
icepack_zsalinity.o:icepack_tracers.o
icepack_zsalinity.o:icepack_warnings.o
icepack_zsalinity.o:icepack_zbgc_shared.o


.F90.o:
$(RM) $@ $*.mod
ifeq "$(GEN_F90)" "true"
$(CPP) $(CPPFLAGS) $(CPPINCLUDES) $< > $*.f90

$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES)
else
$(FC) $(CPPFLAGS) $(FFLAGS) -c $*.F90 $(CPPINCLUDES) $(FCINCLUDES)
endif

clean:
$(RM) *.o *.mod
24 changes: 24 additions & 0 deletions components/mpas-seaice/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@

<!-- column physics -->
<nml_record name="column_package" in_defaults="true">
<nml_option name="config_column_physics_type" type="character" default_value="column_package" units="unitless"
description="Type of column library."
possible_values="'icepack' and 'column_package'"
/>
<nml_option name="config_use_column_shortwave" type="logical" default_value="true" units="unitless"
description="Run the shortwave radiation column physics calculation."
possible_values="true or false"
Expand Down Expand Up @@ -4676,6 +4680,26 @@
dimensions="nCategories nCells Time"
units="W m-2"
/>
<var name="penetratingShortwaveFluxVisibleDirect"
type="real"
dimensions="nCategories nCells Time"
units="W m-2"
/>
<var name="penetratingShortwaveFluxVisibleDiffuse"
type="real"
dimensions="nCategories nCells Time"
units="W m-2"
/>
<var name="penetratingShortwaveFluxIRDirect"
type="real"
dimensions="nCategories nCells Time"
units="W m-2"
/>
<var name="penetratingShortwaveFluxIRDiffuse"
type="real"
dimensions="nCategories nCells Time"
units="W m-2"
/>
<var name="shortwaveLayerPenetration"
type="real"
dimensions="nIceLayersP1 nCategories nCells Time"
Expand Down
12 changes: 11 additions & 1 deletion components/mpas-seaice/src/model_forward/mpas_seaice_core.F
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ function seaice_core_finalize(domain) result(iErr)

use mpas_derived_types
use mpas_decomp
use seaice_icepack, only: &
seaice_icepack_finalize
use seaice_column, only: &
seaice_column_finalize
use seaice_mesh_pool, only: &
Expand All @@ -425,13 +427,21 @@ function seaice_core_finalize(domain) result(iErr)
type (domain_type), intent(inout) :: domain
integer :: ierr

character(len=strKIND), pointer :: &
config_column_physics_type

iErr = 0

call mpas_log_write(" Destruct mesh pool...")
call seaice_mesh_pool_destroy(iErr)

! finalize column
call seaice_column_finalize(domain)
call mpas_pool_get_config(domain % configs, "config_column_physics_type", config_column_physics_type)
if (trim(config_column_physics_type) == "icepack") then
call seaice_icepack_finalize(domain)
else if (trim(config_column_physics_type) == "column_package") then
call seaice_column_finalize(domain)
endif ! config_column_physics_type

call seaice_analysis_finalize(domain, ierr)

Expand Down
2 changes: 1 addition & 1 deletion components/mpas-seaice/src/seaice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ list(APPEND RAW_SOURCES
core_seaice/shared/mpas_seaice_numerics.F
core_seaice/shared/mpas_seaice_constants.F
core_seaice/shared/mpas_seaice_column.F
# core_seaice/shared/mpas_seaice_icepack.F
core_seaice/shared/mpas_seaice_icepack.F
core_seaice/shared/mpas_seaice_diagnostics.F
core_seaice/shared/mpas_seaice_error.F
core_seaice/shared/mpas_seaice_mesh_pool.F
Expand Down
Loading

0 comments on commit 2ad4b45

Please sign in to comment.