diff --git a/Makefile b/Makefile index 5fbaeca357..9b84f0c012 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -MODEL_FORMULATION = +MODEL_FORMULATION = dummy: @@ -219,14 +219,14 @@ gfortran: "CC_SERIAL = gcc" \ "CXX_SERIAL = g++" \ "FFLAGS_PROMOTION = -fdefault-real-8 -fdefault-double-8" \ - "FFLAGS_OPT = -O3 -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form" \ - "CFLAGS_OPT = -O3 -m64" \ - "CXXFLAGS_OPT = -O3 -m64" \ - "LDFLAGS_OPT = -O3 -m64" \ - "FFLAGS_DEBUG = -g -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" \ - "CFLAGS_DEBUG = -g -m64" \ - "CXXFLAGS_DEBUG = -O3 -m64" \ - "LDFLAGS_DEBUG = -g -m64" \ + "FFLAGS_OPT = -O3 -ffree-line-length-none -fconvert=big-endian -ffree-form" \ + "CFLAGS_OPT = -O3" \ + "CXXFLAGS_OPT = -O3" \ + "LDFLAGS_OPT = -O3" \ + "FFLAGS_DEBUG = -g -ffree-line-length-none -fconvert=big-endian -ffree-form -fcheck=all -fbacktrace -ffpe-trap=invalid,zero,overflow" \ + "CFLAGS_DEBUG = -g" \ + "CXXFLAGS_DEBUG = -g" \ + "LDFLAGS_DEBUG = -g" \ "FFLAGS_OMP = -fopenmp" \ "CFLAGS_OMP = -fopenmp" \ "CORE = $(CORE)" \ @@ -421,9 +421,9 @@ llvm: "OPENMP = $(OPENMP)" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) -CPPINCLUDES = -FCINCLUDES = -LIBS = +CPPINCLUDES = +FCINCLUDES = +LIBS = # # If user has indicated a PIO2 library, define USE_PIO2 pre-processor macro @@ -458,9 +458,15 @@ endif # Depending on PIO version, libraries may be libpio.a, or libpiof.a and libpioc.a # Keep open the possibility of shared libraries in future with, e.g., .so suffix # +# Check if libpio.* exists and link -lpio if so, but we make an exception for +# libpio.settings (a file added in PIO2), which is not a library to link ifneq ($(wildcard $(PIO_LIB)/libpio\.*), ) - LIBS += -lpio + # Makefiles don't support "and" operators so we have nested "if" instead + ifneq "$(wildcard $(PIO_LIB)/libpio\.*)" "$(PIO_LIB)/libpio.settings" + LIBS += -lpio + endif endif + ifneq ($(wildcard $(PIO_LIB)/libpiof\.*), ) LIBS += -lpiof endif diff --git a/README.md b/README.md index c29fec6914..1d28ea2a6d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v7.0 +MPAS-v7.1 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index e4cf270af4..5bce0c36ac 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -1,5 +1,5 @@ - + @@ -1352,10 +1352,10 @@ description="weights for cell-centered second derivative, normal to edge, for transport scheme"/> + description="Weighting coefficients used for reconstructing cell-based fields at edges"/> + description="Weighting coefficients used for reconstructing cell-based fields at edges"/> @@ -3009,7 +3009,7 @@ description="terrain height"/> + description="monthly-mean climatological surface albedo"/> diff --git a/src/core_atmosphere/physics/physics_wrf/module_bl_gwdo.F b/src/core_atmosphere/physics/physics_wrf/module_bl_gwdo.F index beaa2955f2..58dcc15853 100644 --- a/src/core_atmosphere/physics/physics_wrf/module_bl_gwdo.F +++ b/src/core_atmosphere/physics/physics_wrf/module_bl_gwdo.F @@ -365,7 +365,7 @@ subroutine gwdo2d(dudt, dvdt, dtaux2d, dtauy2d, & dxy4p(its:ite,3) = dxy4(its:ite,4) dxy4p(its:ite,4) = dxy4(its:ite,3) ! - cleff(its:ite) = dxmeter + cleff(its:ite) = dxmeter(its:ite) ! ! initialize arrays ! diff --git a/src/core_atmosphere/physics/physics_wrf/module_ra_cam_support.F b/src/core_atmosphere/physics/physics_wrf/module_ra_cam_support.F index 37fd487e07..fb9481c9d8 100644 --- a/src/core_atmosphere/physics/physics_wrf/module_ra_cam_support.F +++ b/src/core_atmosphere/physics/physics_wrf/module_ra_cam_support.F @@ -8,7 +8,7 @@ MODULE module_ra_cam_support implicit none integer, parameter :: r8 = 8 real(r8), parameter:: inf = 1.e20 ! CAM sets this differently in infnan.F90 - integer, parameter:: bigint = O'17777777777' ! largest possible 32-bit integer + integer, parameter:: bigint = int(O'17777777777') ! largest possible 32-bit integer integer :: ixcldliq integer :: ixcldice diff --git a/src/core_init_atmosphere/Registry.xml b/src/core_init_atmosphere/Registry.xml index 515b881d01..815804d8b9 100644 --- a/src/core_init_atmosphere/Registry.xml +++ b/src/core_init_atmosphere/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_init_atmosphere/mpas_init_atm_cases.F b/src/core_init_atmosphere/mpas_init_atm_cases.F index e08d55e48e..19a2bf9683 100644 --- a/src/core_init_atmosphere/mpas_init_atm_cases.F +++ b/src/core_init_atmosphere/mpas_init_atm_cases.F @@ -74,7 +74,7 @@ subroutine init_atm_setup_case(domain, stream_manager) character(len=StrKIND), pointer :: xtime type (MPAS_Time_type) :: curr_time, stop_time - type (MPAS_TimeInterval_type) :: clock_interval, lbc_stream_interval + type (MPAS_TimeInterval_type) :: clock_interval, lbc_stream_interval, surface_stream_interval character(len=StrKIND) :: timeString integer, pointer :: nCells @@ -264,6 +264,21 @@ subroutine init_atm_setup_case(domain, stream_manager) else if (config_init_case == 8 ) then call mpas_log_write('real-data surface (SST) update test case ') + + ! + ! Check that config_fg_interval matches the output_interval of the surface stream + ! + clock_interval = mpas_get_clock_timestep(domain % clock, ierr=ierr) + surface_stream_interval = MPAS_stream_mgr_get_stream_interval(stream_manager, 'surface', MPAS_STREAM_OUTPUT, ierr) + if (clock_interval /= surface_stream_interval) then + call mpas_log_write('****************************************************************', messageType=MPAS_LOG_ERR) + call mpas_log_write('The intermediate SST file interval specified by ''config_fg_interval''', messageType=MPAS_LOG_ERR) + call mpas_log_write('does not match the output_interval for the ''surface'' stream.', messageType=MPAS_LOG_ERR) + call mpas_log_write('Please correct the namelist.init_atmosphere and/or', messageType=MPAS_LOG_ERR) + call mpas_log_write('streams.init_atmosphere files.', messageType=MPAS_LOG_ERR) + call mpas_log_write('****************************************************************', messageType=MPAS_LOG_CRIT) + end if + block_ptr => domain % blocklist do while (associated(block_ptr)) call mpas_pool_get_subpool(block_ptr % structs, 'mesh', mesh) @@ -4758,7 +4773,8 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state t(k,iCell) = t(k,iCell) * (p0 / pressure(k,iCell)) ** (rgas / cp) ! RHO_ZZ - rho_zz(k,iCell) = pressure(k,iCell) / rgas / (p(k,iCell) * t(k,iCell)) + rho_zz(k,iCell) = pressure(k,iCell) / rgas / (p(k,iCell) * t(k,iCell) & + * (1.0 + (rvord - 1.0) * scalars(index_qv,k,iCell))) rho_zz(k,iCell) = rho_zz(k,iCell) / (1.0 + scalars(index_qv,k,iCell)) end do end do diff --git a/src/core_landice/Registry.xml b/src/core_landice/Registry.xml index 1e31339959..8e7911e231 100644 --- a/src/core_landice/Registry.xml +++ b/src/core_landice/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_ocean/Registry.xml b/src/core_ocean/Registry.xml index fc0649047f..4a9710e10f 100644 --- a/src/core_ocean/Registry.xml +++ b/src/core_ocean/Registry.xml @@ -1,5 +1,5 @@ - + - + - + diff --git a/src/core_test/Registry.xml b/src/core_test/Registry.xml index 481f15d4bd..9f889b4dd9 100644 --- a/src/core_test/Registry.xml +++ b/src/core_test/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/external/Makefile b/src/external/Makefile index 4409d9c704..d2f9e86f2e 100644 --- a/src/external/Makefile +++ b/src/external/Makefile @@ -6,7 +6,7 @@ esmf_time: ( cd esmf_time_f90; $(MAKE) FC="$(FC) $(FFLAGS)" CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS) -DHIDE_MPI" GEN_F90=$(GEN_F90) ) ezxml-lib: - ( cd ezxml; $(MAKE) ) + ( cd ezxml; $(MAKE) OBJFILE="ezxml.o" ) clean: ( cd esmf_time_f90; $(MAKE) clean ) diff --git a/src/external/ezxml/Makefile b/src/external/ezxml/Makefile index b7d1633363..93c192920c 100644 --- a/src/external/ezxml/Makefile +++ b/src/external/ezxml/Makefile @@ -1,14 +1,5 @@ -.SUFFIXES: .c .o - -OBJS = ezxml.o - -all: clean - $(MAKE) -j 1 library - -library: $(OBJS) +$(OBJFILE): ezxml.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $(OBJFILE) clean: $(RM) *.o *.i - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< diff --git a/src/tools/input_gen/Makefile b/src/tools/input_gen/Makefile index 29c47a242d..4204692c67 100644 --- a/src/tools/input_gen/Makefile +++ b/src/tools/input_gen/Makefile @@ -4,14 +4,14 @@ EZXML_PATH= ../../external/ezxml NL_OBJS = namelist_gen.o test_functions.o ST_OBJS = streams_gen.o test_functions.o -XML_OBJS = $(EZXML_PATH)/ezxml.o +XML_OBJS = $(EZXML_PATH)/ezxml_tools.o all: ezxml ($(MAKE) -j 1 namelist_gen CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)") ($(MAKE) -j 1 streams_gen CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)") ezxml: - (cd $(EZXML_PATH); $(MAKE) CFLAGS="$(CFLAGS) $(TOOL_TARGET_ARCH)") + (cd $(EZXML_PATH); $(MAKE) CFLAGS="$(CFLAGS) $(TOOL_TARGET_ARCH)" OBJFILE="ezxml_tools.o") namelist_gen: ezxml $(NL_OBJS) $(XML_OBJS) $(CC) $(CPPFLAGS) $(CFLAGS) -I$(EZXML_PATH) -o $@ $(NL_OBJS) $(XML_OBJS) diff --git a/src/tools/registry/Makefile b/src/tools/registry/Makefile index 46d9d56394..1b1900d6a6 100644 --- a/src/tools/registry/Makefile +++ b/src/tools/registry/Makefile @@ -9,10 +9,10 @@ all: ezxml ($(MAKE) parse CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)") ezxml: - (cd $(EZXML_PATH); $(MAKE) CFLAGS="$(CFLAGS) $(TOOL_TARGET_ARCH)") + (cd $(EZXML_PATH); $(MAKE) CFLAGS="$(CFLAGS) $(TOOL_TARGET_ARCH)" OBJFILE="ezxml_tools.o") parse: $(OBJS) - $(CC) $(CPPFLAGS) $(CFLAGS) $(EZXML_PATH)/ezxml.o -I$(EZXML_PATH) -o $@ $(OBJS) + $(CC) $(CPPFLAGS) $(CFLAGS) $(EZXML_PATH)/ezxml_tools.o -I$(EZXML_PATH) -o $@ $(OBJS) parse.o: