Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
This merge introduces fixes from the release-v8.2.0 branch, and it connects the
v8.2.0 tag to future commits on 'develop'.

* master:
  Fix instances of incorrect quotes in init_atmosphere and atmosphere registries
  Add 'mp_thompson_aerosols' to list of possible_values for config_microp_scheme
  Add 'sf_noahmp' to list of possible_values for config_lsm_scheme
  Don't include FCINCLUDES in build options checked for build compatibility
  Ignore the entire physics_mmm subdirectory of src/core_atmosphere/physics
  Split physics source compilation from library updates for parallel builds
  Add missing dependency among physics in MPAS-A main physics Makefile
  Add 'sf_noahmp_in' package to Noah-MP static fields in atmosphere core registry
  Add module search paths to support compilation of Noah-MP code with nvfortran
  Update version number to 8.2.0
  Improve check on deallocation of hash table in mpas_geotile_mgr_finalize
  Add ONLY clause to USE statements for the 'mpi_f08' module
  Add "-check all" to LDFLAGS_DEBUG for 'intel' build target
  • Loading branch information
mgduda committed Jun 28, 2024
2 parents 7070294 + 942d402 commit eb62cd1
Show file tree
Hide file tree
Showing 23 changed files with 72 additions and 35 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ intel: # BUILDTARGET Intel oneAPI Fortran, C, and C++ compiler suite
"FFLAGS_DEBUG = -g -convert big_endian -free -check all -fpe0 -traceback" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
"LDFLAGS_DEBUG = -g -check all -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
"PICFLAG = -fpic" \
Expand Down Expand Up @@ -1042,7 +1042,6 @@ rebuild_check:
CPPFLAGS=$(CPPFLAGS)\n$\
LIBS=$(LIBS)\n$\
CPPINCLUDES=$(CPPINCLUDES)\n$\
FCINCLUDES=$(FCINCLUDES)\n$\
OPENMP=$(OPENMP)\n$\
OPENMP_OFFLOAD=$(OPENMP_OFFLOAD)\n$\
OPENACC=$(OPENACC)\n$\
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MPAS-v8.1.0
MPAS-v8.2.0
====

The Model for Prediction Across Scales (MPAS) is a collaborative project for
Expand Down
2 changes: 1 addition & 1 deletion src/core_atmosphere/Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local_path = ./physics_mmm
protocol = git
repo_url = https://github.com/NCAR/MMM-physics.git
tag = 20240525-MPASv8.2
tag = 20240626-MPASv8.2

required = True

Expand Down
12 changes: 6 additions & 6 deletions src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.1.0">
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.0">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down Expand Up @@ -2161,7 +2161,7 @@
<nml_option name="config_microp_scheme" type="character" default_value="suite" in_defaults="false"
units="-"
description="configuration for cloud microphysics schemes"
possible_values="`suite',`mp_wsm6',`mp_thompson',`mp_kessler',`off'"/>
possible_values="`suite',`mp_wsm6',`mp_thompson',`mp_thompson_aerosols', `mp_kessler',`off'"/>

<nml_option name="config_convection_scheme" type="character" default_value="suite" in_defaults="false"
units="-"
Expand All @@ -2171,7 +2171,7 @@
<nml_option name="config_lsm_scheme" type="character" default_value="suite" in_defaults="false"
units="-"
description="configuration for land-surface schemes"
possible_values="`suite',`noah',`off'"/>
possible_values="`suite',`sf_noah',`sf_noahmp`, `off'"/>

<nml_option name="config_pbl_scheme" type="character" default_value="suite" in_defaults="false"
units="-"
Expand Down Expand Up @@ -3284,11 +3284,11 @@
packages="mp_thompson_aers_in"/>

<var name="rnifampten" type="real" dimensions="nVertLevels nCells Time" units="nb kg^{-1} s^{-1}"
description="tendency of "ice-friendly" aerosol number concentration due to microphysics"
description="tendency of ice-friendly aerosol number concentration due to microphysics"
packages="mp_thompson_aers_in"/>

<var name="rnwfampten" type="real" dimensions="nVertLevels nCells Time" units="nb kg^{-1} s^{-1}"
description="tendency of "water-friendly" aerosol number concentration due to microphysics"
description="tendency of water-friendly aerosol number concentration due to microphysics"
packages="mp_thompson_aers_in"/>

<!-- ================================================================================================== -->
Expand Down Expand Up @@ -3573,7 +3573,7 @@
description="Ice mixing ratio increment"/>

<var name="qs_amb" name_in_code="qs" array_group="moist" packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in"
" units="kg kg^{-1}"
units="kg kg^{-1}"
description="Snow mixing ratio increment"/>

<var name="qg_amb" name_in_code="qg" array_group="moist" packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in"
Expand Down
3 changes: 3 additions & 0 deletions src/core_atmosphere/build_options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ PWD=$(shell pwd)
EXE_NAME=atmosphere_model
NAMELIST_SUFFIX=atmosphere
override CPPFLAGS += -DCORE_ATMOSPHERE
FCINCLUDES += -I$(PWD)/src/core_atmosphere/physics/physics_noahmp/drivers/mpas \
-I$(PWD)/src/core_atmosphere/physics/physics_noahmp/utility \
-I$(PWD)/src/core_atmosphere/physics/physics_noahmp/src

report_builds:
@echo "CORE=atmosphere"
4 changes: 1 addition & 3 deletions src/core_atmosphere/physics/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
*.f90
physics_wrf/*.f90
physics_wrf/files/
physics_mmm/.gitignore
physics_mmm/README.md
physics_mmm/LICENSE
physics_mmm
10 changes: 7 additions & 3 deletions src/core_atmosphere/physics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ core_physics_noahmp:
(cd physics_noahmp/drivers/mpas; $(MAKE) all COREDEF="$(COREDEF)")

core_physics_init: $(OBJS_init)
ar -ru libphys.a $(OBJS_init)

core_physics: core_physics_wrf
core_physics: core_physics_wrf core_physics_noahmp
($(MAKE) phys_interface COREDEF="$(COREDEF)")
ar -ru libphys.a $(OBJS)
ar -ru libphys.a $(OBJS_init) $(OBJS)
($(MAKE) -C ./physics_mmm -f Makefile.mpas physics_mmm_lib)
($(MAKE) -C ./physics_wrf physics_wrf_lib)
($(MAKE) -C ./physics_noahmp/drivers/mpas driver_lib)
($(MAKE) -C ./physics_noahmp/src src_lib)
($(MAKE) -C ./physics_noahmp/utility utility_lib)

phys_interface: $(OBJS)

Expand Down
15 changes: 10 additions & 5 deletions src/core_atmosphere/physics/Registry_noahmp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,24 @@
<var_struct name="mesh" time_levs="1">

<var name="soilcomp" type="real" dimensions="nSoilComps nCells" units="unitless"
description="soil composition needed as input in the NOAH-MP land surface model"/>
description="soil composition needed as input in the NOAH-MP land surface model"
packages="sf_noahmp_in"/>

<var name="soilcl1" type="real" dimensions="nCells" units="unitless"
description="soil texture class level 1 needed as input for the NOAH-MP land surface model"/>
description="soil texture class level 1 needed as input for the NOAH-MP land surface model"
packages="sf_noahmp_in"/>

<var name="soilcl2" type="real" dimensions="nCells" units="unitless"
description="soil texture class level 2 needed as input for the NOAH-MP land surface model"/>
description="soil texture class level 2 needed as input for the NOAH-MP land surface model"
packages="sf_noahmp_in"/>

<var name="soilcl3" type="real" dimensions="nCells" units="unitless"
description="soil texture class level 3 needed as input for the NOAH-MP land surface model"/>
description="soil texture class level 3 needed as input for the NOAH-MP land surface model"
packages="sf_noahmp_in"/>

<var name="soilcl4" type="real" dimensions="nCells" units="unitless"
description="soil texture class level 4 needed as input for the NOAH-MP land surface model"/>
description="soil texture class level 4 needed as input for the NOAH-MP land surface model"
packages="sf_noahmp_in"/>

</var_struct>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.SUFFIXES: .o .F90

.PHONY: driver driver_lib

all: dummy driver

dummy:
Expand All @@ -26,6 +28,8 @@ OBJS = NoahmpSnowInitMod.o \
PedoTransferSR2006Mod.o

driver: $(OBJS)

driver_lib:
ar -ru ./../../../libphys.a $(OBJS)

# DEPENDENCIES:
Expand Down Expand Up @@ -66,5 +70,5 @@ clean:
$(RM) *.i

.F90.o:
$(FC) $(CPPFLAGS) $(COREDEF) $(FFLAGS) -c $*.F90 $(CPPINCLUDES) $(FCINCLUDES) -I. -I../../utility -I../../src -I../../../../../framework
$(FC) $(CPPFLAGS) $(COREDEF) $(FFLAGS) -c $*.F90 $(CPPINCLUDES) $(FCINCLUDES) -I. -I../../utility -I../../src -I../../../../../framework -I../../../../../external/esmf_time_f90

4 changes: 4 additions & 0 deletions src/core_atmosphere/physics/physics_noahmp/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.SUFFIXES: .F90 .o

.PHONY: src src_lib

#
# The Noah-MP code fails to build with the GNU compilers with -std=f2008,
# so remove that flag here if it is present in FFLAGS
Expand Down Expand Up @@ -138,6 +140,8 @@ OBJS = ConstantDefineMod.o \
WaterMainGlacierMod.o

src: $(OBJS)

src_lib:
ar -ru ./../../libphys.a $(OBJS)

# DEPENDENCIES:
Expand Down
4 changes: 4 additions & 0 deletions src/core_atmosphere/physics/physics_noahmp/utility/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.SUFFIXES: .F90 .o

.PHONY: utility utility_lib

all: dummy utility

dummy:
Expand All @@ -9,6 +11,8 @@ OBJS = Machine.o \
CheckNanMod.o

utility: $(OBJS)

utility_lib:
ar -ru ./../../libphys.a $(OBJS)

# DEPENDENCIES:
Expand Down
4 changes: 4 additions & 0 deletions src/core_atmosphere/physics/physics_wrf/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.SUFFIXES: .F .o

.PHONY: physics_wrf physics_wrf_lib

all: dummy physics_wrf

dummy:
Expand Down Expand Up @@ -52,6 +54,8 @@ OBJS = \


physics_wrf: $(OBJS)

physics_wrf_lib:
ar -ru ./../libphys.a $(OBJS)

# DEPENDENCIES:
Expand Down
4 changes: 2 additions & 2 deletions src/core_init_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.1.0">
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.0">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down Expand Up @@ -570,7 +570,7 @@
<var name="v_init" packages="met_stage_out"/>
<var name="t_init" packages="met_stage_out"/>
<var name="qv_init" packages="met_stage_out"/>
<var_array name="scalars" packages="met_stage_out";mp_thompson_aers_in"/>
<var_array name="scalars" packages="met_stage_out;mp_thompson_aers_in"/>
<var name="u" packages="met_stage_out"/>
<var name="w" packages="met_stage_out"/>
<var name="dz" packages="met_stage_out"/>
Expand Down
4 changes: 2 additions & 2 deletions src/core_init_atmosphere/mpas_geotile_manager.F
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ function mpas_geotile_mgr_finalize(mgr) result(ierr)
endif
enddo
enddo
deallocate(mgr % hash)
deallocate(mgr % hash, stat=ierr)

if (associated(mgr % hash)) then
if (associated(mgr % hash) .or. (ierr /= 0)) then
call mpas_log_write("Problem deallocating the geotile hash table", messageType=MPAS_LOG_ERR)
ierr = -1
return
Expand Down
2 changes: 1 addition & 1 deletion src/core_landice/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="landice" core_abbrev="li" version="8.1.0">
<registry model="mpas" core="landice" core_abbrev="li" version="8.2.0">


<!-- ======================================================================= -->
Expand Down
2 changes: 1 addition & 1 deletion src/core_ocean/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="ocean" core_abbrev="ocn" version="8.1.0">
<registry model="mpas" core="ocean" core_abbrev="ocn" version="8.2.0">

<dims>
<dim name="nCells" units="unitless"
Expand Down
2 changes: 1 addition & 1 deletion src/core_seaice/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="seaice" core_abbrev="seaice" version="8.1.0">
<registry model="mpas" core="seaice" core_abbrev="seaice" version="8.2.0">

<dims>
<dim name="nCells"
Expand Down
2 changes: 1 addition & 1 deletion src/core_sw/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="sw" core_abbrev="sw" version="8.1.0">
<registry model="mpas" core="sw" core_abbrev="sw" version="8.2.0">
<dims>
<dim name="nCells"/>
<dim name="nEdges"/>
Expand Down
2 changes: 1 addition & 1 deletion src/core_test/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="test" core_abbrev="test" version="8.1.0">
<registry model="mpas" core="test" core_abbrev="test" version="8.2.0">
<dims>
<dim name="nCells"/>
<dim name="nEdges"/>
Expand Down
2 changes: 1 addition & 1 deletion src/framework/mpas_abort.F
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ subroutine mpas_dmpar_global_abort(mesg, deferredAbort)!{{{
#ifdef _MPI
#ifndef NOMPIMOD
#ifdef MPAS_USE_MPI_F08
use mpi_f08
use mpi_f08, only : MPI_COMM_WORLD, MPI_Comm_rank, MPI_Comm_size, MPI_Abort
#else
use mpi
#endif
Expand Down
11 changes: 10 additions & 1 deletion src/framework/mpas_dmpar.F
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ module mpas_dmpar
#ifdef _MPI
#ifndef NOMPIMOD
#ifdef MPAS_USE_MPI_F08
use mpi_f08
use mpi_f08, only : MPI_Comm, MPI_Datatype
use mpi_f08, only : MPI_INTEGER, MPI_2INTEGER, MPI_REAL, MPI_2REAL, MPI_DOUBLE_PRECISION, &
MPI_2DOUBLE_PRECISION, MPI_CHARACTER, MPI_INTEGER8
use mpi_f08, only : MPI_COMM_SELF, MPI_COMM_WORLD, MPI_INFO_NULL, MPI_THREAD_SINGLE, &
MPI_THREAD_SERIALIZED, MPI_THREAD_FUNNELED, MPI_THREAD_MULTIPLE, MPI_STATUS_IGNORE
use mpi_f08, only : MPI_Query_thread, MPI_Comm_dup
use mpi_f08, only : MPI_Init_thread , MPI_Init, MPI_Comm_rank, MPI_Comm_size, MPI_Finalize, &
MPI_Comm_free, MPI_Abort, MPI_Bcast, MPI_Allreduce, MPI_Scatterv, MPI_Recv, &
MPI_Send, MPI_Request, MPI_Irecv, MPI_Isend, MPI_Wait, MPI_Wtime, MPI_Test
use mpi_f08, only : MPI_SUM, MPI_MIN, MPI_MAX, MPI_MINLOC, MPI_MAXLOC
#else
use mpi
#endif
Expand Down
5 changes: 4 additions & 1 deletion src/framework/mpas_halo.F
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ end subroutine mpas_halo_exch_group_add_field
subroutine mpas_halo_exch_group_full_halo_exch(domain, groupName, iErr)

#ifdef MPAS_USE_MPI_F08
use mpi_f08
use mpi_f08, only : MPI_Datatype, MPI_Comm
use mpi_f08, only : MPI_REAL, MPI_DOUBLE_PRECISION, MPI_REQUEST_NULL, &
MPI_STATUS_IGNORE, MPI_STATUSES_IGNORE
use mpi_f08, only : MPI_Irecv, MPI_Isend, MPI_Waitany, MPI_Waitall
#else
use mpi
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/framework/mpas_log.F
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ subroutine log_abort()
#ifdef _MPI
#ifndef NOMPIMOD
#ifdef MPAS_USE_MPI_F08
use mpi_f08
use mpi_f08, only : MPI_COMM_WORLD, MPI_Abort
#else
use mpi
#endif
Expand Down

0 comments on commit eb62cd1

Please sign in to comment.