Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PIO to Add Attributes to Existing NetCDF Files #1234

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
75b7568
Update version number to 8.2.1
mgduda Jun 28, 2024
fefaaf5
Remove debugging prints around calls to sfclayrev in driver_sfclayer
mgduda Jul 5, 2024
c78dc8c
Add mpas_dmpar_bcast_real4s routine for broadcasting real(kind=R4KIND…
mgduda Jul 8, 2024
e9967a9
Correct double-precision build failures of mpas_atmphys_init_microphy…
mgduda Jul 9, 2024
f0a6fc1
Restore CMake support for building the atmosphere core
amstokely Jun 25, 2024
4079ec5
Restore CMake support for building the init_atmosphere core
amstokely Jul 8, 2024
6839b14
* In ./src/core_atmosphere/physics/physics_wrf/Makefile, corrected al…
ldfowler58 Jul 15, 2024
6fa376e
Use more mpi_f08 features in mpi_f08_test for odd cases where certain
islas Jun 28, 2024
ed5c654
Check for libpnetcdf library existence rather than just directory
islas Jun 28, 2024
30d72e8
Check for the libnetcdf library existence similar to pnetcdf
islas Jul 2, 2024
e872e29
Add core_physic-specific dependencies to mpas_atmphys_lsm_noahmpfinal…
islas Jun 28, 2024
fbceccd
Fix MPAS-A dycore-only build
kuanchihwang Aug 1, 2024
4af96bf
* In ./src/core_atmosphere//physics/mpas_atmphys_driver_microphysics.…
ldfowler58 Jul 16, 2024
a9a4902
* In ./src/core_atmosphere:
ldfowler58 Jul 17, 2024
7e8c354
* In ./src/core_init_atmosphere/mpas_init_atm_thompson_aerosols.F, ch…
ldfowler58 Aug 6, 2024
2cc8060
* In ./src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F…
ldfowler58 Aug 6, 2024
7b75c62
Implement try-fail method to write new attributes to NetCDF files in PIO
amstokely Sep 9, 2024
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
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -737,10 +737,10 @@ else # Not using PIO, using SMIOL
endif

ifneq "$(NETCDF)" ""
ifneq ($(wildcard $(NETCDF)/lib), )
ifneq ($(wildcard $(NETCDF)/lib/libnetcdf.*), )
NETCDFLIBLOC = lib
endif
ifneq ($(wildcard $(NETCDF)/lib64), )
ifneq ($(wildcard $(NETCDF)/lib64/libnetcdf.*), )
NETCDFLIBLOC = lib64
endif
CPPINCLUDES += -I$(NETCDF)/include
Expand All @@ -761,10 +761,10 @@ endif


ifneq "$(PNETCDF)" ""
ifneq ($(wildcard $(PNETCDF)/lib), )
ifneq ($(wildcard $(PNETCDF)/lib/libpnetcdf.*), )
PNETCDFLIBLOC = lib
endif
ifneq ($(wildcard $(PNETCDF)/lib64), )
ifneq ($(wildcard $(PNETCDF)/lib64/libpnetcdf.*), )
PNETCDFLIBLOC = lib64
endif
CPPINCLUDES += -I$(PNETCDF)/include
Expand Down Expand Up @@ -1352,9 +1352,10 @@ mpi_f08_test:
$(info Checking for mpi_f08 support...)
$(eval MPAS_MPI_F08 := $(shell $\
printf "program main\n$\
& use mpi_f08, only : MPI_Init, MPI_Comm\n$\
& use mpi_f08, only : MPI_Init, MPI_Comm, MPI_INTEGER, MPI_Datatype\n$\
& integer :: ierr\n$\
& type (MPI_Comm) :: comm\n$\
& type (MPI_Datatype), parameter :: MPI_INTEGERKIND = MPI_INTEGER\n$\
& call MPI_Init(ierr)\n$\
end program main\n" | sed 's/&/ /' > mpi_f08.f90; $\
$\
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.2.0
MPAS-v8.2.1
====

The Model for Prediction Across Scales (MPAS) is a collaborative project for
Expand Down
40 changes: 36 additions & 4 deletions cmake/Functions/MPAS_Functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,33 @@ function(get_mpas_version mpas_version)
set(${mpas_version} ${CMAKE_MATCH_1} PARENT_SCOPE)
endfunction()

##
# get_git_version( <git_version> )
# Extracts the current Git version of the project.
# <git_version> will contain the Git version string.
# Example usage:
# get_git_version(GIT_VERSION)
# message("Git Version: ${GIT_VERSION}")
##


function(get_git_version git_version)
execute_process(
COMMAND git describe --tags --always
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE GIT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(NOT RESULT EQUAL 0)
message(WARNING "Failed to get Git version!")
endif()
set(${git_version} ${GIT_VERSION} PARENT_SCOPE
)
endfunction()


##
# mpas_fortran_target( <target-name> )
#
Expand Down Expand Up @@ -162,15 +189,20 @@ function(mpas_core_target)
file(MAKE_DIRECTORY ${CORE_DATADIR})

#Process registry and generate includes, namelists, and streams
if(${ARG_CORE} STREQUAL "atmosphere" AND ${DO_PHYSICS})
set(CPP_EXTRA_FLAGS ${CPP_EXTRA_FLAGS} -DDO_PHYSICS)
get_git_version(git_version)
string(TOUPPER ${ARG_CORE} ARG_CORE_UPPER)
set(CPP_EXTRA_FLAGS ${CPP_EXTRA_FLAGS} -DCORE_${ARG_CORE_UPPER} -DMPAS_NAMELIST_SUFFIX=${ARG_CORE} -DMPAS_EXE_NAME=mpas_${ARG_CORE} -DMPAS_GIT_VERSION=${git_version} -DMPAS_BUILD_TARGET=${CMAKE_Fortran_COMPILER_ID})
message("CPP_EXTRA_FLAGS: ${CPP_EXTRA_FLAGS}")
if (${DO_PHYSICS})
set(CPP_EXTRA_FLAGS ${CPP_EXTRA_FLAGS} -DDO_PHYSICS)
endif()
add_custom_command(OUTPUT Registry_processed.xml

add_custom_command(OUTPUT Registry_processed.xml
COMMAND ${CPP_EXECUTABLE} -E -P ${CPP_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/Registry.xml > Registry_processed.xml
COMMENT "CORE ${ARG_CORE}: Pre-Process Registry"
DEPENDS Registry.xml)
add_custom_command(OUTPUT ${ARG_INCLUDES}
COMMAND mpas_parse_${ARG_CORE} Registry_processed.xml
COMMAND mpas_parse_${ARG_CORE} Registry_processed.xml ${CPP_EXTRA_FLAGS}
COMMENT "CORE ${ARG_CORE}: Parse Registry"
DEPENDS mpas_parse_${ARG_CORE} Registry_processed.xml)
add_custom_command(OUTPUT namelist.${ARG_CORE}
Expand Down
Loading