Test v8.4.0 merge#1
Closed
clark-evans wants to merge 241 commits intoclark-evans:merge-v8.4.0from
Closed
Conversation
… top-to-bottom Note: The changes in this commit mirror those in commit f232665, but this commit concerns to the code for producing LBCs rather than the code for producing ICs. The code in the init_atm_case_lbc routine for vertically interpolating relative humidity and specific humidity for LBCs assumed that first-guess levels would be given in bottom-to-top order when attempting to vertically extrapolate to model levels below the lowest first-guess level. The relevant code for relative humidity read as follows -- the code for specific humidity is similar. if (target_z < z_fg(1,iCell) .and. k < nVertLevels) relhum(k,iCell) = relhum(k+1,iCell) If first-guess levels are not given in bottom-to-top order, then z_fg(1,iCell) does not necessarily contain the height of the surface in the first-guess data, resulting in a copy of vertically interpolated relative humidity level k+1 to level k. One possible fix for this issue might be to compare target_z with sorted_arr(1,1). Since sorted_arr is always sorted in ascending order by its first index, the check to decide when to copy/extrapolate relative humidity would be independent of the order in which first-guess levels were provided. If the comparison were to be made against sorted_arr(1,1) rather than against z_fg(1,iCell), the effect would be to copy the lowest *interpolated* level downward to model levels below the first-guess ground. An alternative fix adopted in this commit is to simply delete the logic to explicitly copy/extrapolate downward, since both relative humidity and specific humidity are vertically interpolated with extrap=0, which specifies constant- value extrapolation. In this case, the lowest *first-guess* level -- rather than the lowest *interpolated* level -- is copied downward. Note: The issue being addressed by this commit is a dependence on the order in which levels are given in the input intermediate file, and not on the direction in which the first-guess model indexes its levels.
This commit updates the tag to 20250616-MPASv8.3 for the MMM-physics external in the src/core_atmosphere/Externals.cfg file to address an issue with .F90 files not being re-compiled to .o files if a .F90 file was modified. With the updated tag, compiling the atmosphere core, then making changes to any of the .F90 files in src/core_atmosphere/physics/physics_mmm/, then running 'make' again (without first cleaning) leads to the modified .F90 files correctly being re-compiled.
#1335) This merge fixes a bug in the vertical interpolation of humidity for LBCs when first-guess levels are given in top-to-bottom order. Note: The changes in this merge mirror those in merge commit d3ab76a (#936), but this merge concerns to the code for producing LBCs rather than the code for producing ICs. The code in the init_atm_case_lbc routine for vertically interpolating relative humidity and specific humidity for LBCs assumed that first-guess levels would be given in bottom-to-top order when attempting to vertically extrapolate to model levels below the lowest first-guess level. The relevant code for relative humidity read as follows -- the code for specific humidity is similar. if (target_z < z_fg(1,iCell) .and. k < nVertLevels) relhum(k,iCell) = relhum(k+1,iCell) If first-guess levels are not given in bottom-to-top order, then z_fg(1,iCell) does not necessarily contain the height of the surface in the first-guess data, resulting in a copy of vertically interpolated relative humidity level k+1 to level k. The fix adopted in this merge is to simply delete the logic to explicitly copy/extrapolate downward, since both relative humidity and specific humidity are vertically interpolated with extrap=0, which specifies constant-value extrapolation. In this case, the lowest first-guess level -- rather than the lowest interpolated level -- is copied downward. * init_atmosphere/fix_lbc_rh_extrap: Fix bug in vertical interp of humidity for LBCs when levels are given top-to-bottom
…1337) This merge updates the MMM-physics external tag to 20250616-MPASv8.3 in the src/core_atmosphere/Externals.cfg file to address an issue with .F90 files not being re-compiled to .o files if a .F90 file was modified. With the updated tag, compiling the atmosphere core, then making changes to any of the .F90 files in src/core_atmosphere/physics/physics_mmm/, then running make again (without first cleaning) leads to the modified .F90 files being correctly re-compiled. * atmosphere/update_mmm_phys_tag: Update MMM-physics tag in Externals.cfg to fix .F90 re-compilation issue
This merge corrects two issues in the MPAS-Atmosphere model: * Fix a bug in the vertical interpolation of humidity for LBCs when first-guess levels are given in top-to-bottom order. Incorrect logic in the init_atm_case_lbc routine previously assumed that first-guess levels would be given in bottom-to-top order when attempting to vertically extrapolate to model levels below the lowest first-guess level, resulting in a copy of the vertically interpolated relative humidity at level k+1 to level k if levels were given in top-to-bottom order. This bug resulted in an unreasonably low water vapor mixing ratio field (lbc_qv) in LBC files. (PR #1335) NB: This bug is present in most older releases of MPAS, and it should be possible to cherry-pick the fix onto any branch or release based on MPAS v7.0 or later. * Fix an issue with .F90 files in the src/core_atmosphere/physics/physics_mmm/ directory not being re-compiled by updating the MMM-physics external tag to acquire a new Makefile.mpas file for MMM-physics. With the updated tag, compiling the atmosphere core, then making changes to any of the .F90 files in src/core_atmosphere/physics/physics_mmm/, then running make again (without first cleaning) leads to the modified .F90 files being correctly re-compiled. (PR #1337)
This commit adds support for linking with the MUSICA-Fortran library. This capability is intended as a first step towards being able to use MUSICA chemistry components (MICM, TUV-x) in MPAS-Atmosphere. In order for MPAS to link with the MUSICA-Fortran library, the library must be detectable through 'pkg-config'. Specifying MUSICA=true on the MPAS 'make' command line will cause MPAS to link with the MUSICA library; for example: make gnu CORE=atmosphere MUSICA=true Note that, although the use of the MUSICA library will likely be within the context of the atmosphere core only, compiling any core with MUSICA=true will cause the MUSICA library to be linked with the MPAS model core executable. If the MUSICA-Fortran library has been linked successfully, the build summary will include the message MPAS was linked with the MUSICA-Fortran library version 0.10.1. (possibly with a different version number); additionally, when running the model, the log file will contain a message indicating MUSICA support as well as the MICM library version, e.g.: MUSICA support: yes - MICM version: 3.8.0 If the MUSICA-Fortran library has not been linked, the build summary will include the message MPAS was not linked with the MUSICA-Fortran library. and the log file for a core will contain the message MUSICA support: no .
This merge adds support for linking with the MUSICA-Fortran library as a first step towards being able to use MUSICA chemistry components (MICM, TUV-x) in MPAS-Atmosphere. In order for MPAS to link with the MUSICA-Fortran library, the library must be detectable through 'pkg-config'. Specifying MUSICA=true on the MPAS 'make' command line will cause MPAS to link with the MUSICA library; for example: make gnu CORE=atmosphere MUSICA=true Note that, although the use of the MUSICA library will likely be within the context of the atmosphere core only, compiling any core with MUSICA=true will cause the MUSICA library to be linked with that MPAS model core's executable. If the MUSICA-Fortran library has been linked successfully, the build summary will include the message MPAS was linked with the MUSICA-Fortran library version 0.10.1. (possibly with a different version number); additionally, when running the compiled core executable, its log file will contain a message indicating MUSICA support as well as the MICM library version, e.g.: MUSICA support: yes - MICM version: 3.8.0 * develop-add-musica-lib: Add support for linking with the MUSICA-Fortran library
This merge introduces fixes from MPAS v8.3.0, and it connects the v8.3.0 tag to future commits on 'develop'. * tag 'v8.3.0': Add 13 to the possible values for config_init_case in init_atmosphere Registry Note in description of config_lu_supersample_factor applicability to USGS Add 'MODIFIED_IGBP_MODIS_NOAH_15s' to possible_values for config_landuse_data Copy streams.init_atmosphere in the setup_run_dir.py script for MPAS-A Update version number to 8.3.0
This merge introduces fixes from MPAS v8.3.1, and it connects the v8.3.1 tag to future commits on 'develop'. * tag 'v8.3.1': Update MMM-physics tag in Externals.cfg to fix .F90 re-compilation issue Fix bug in vertical interp of humidity for LBCs when levels are given top-to-bottom Update version number to 8.3.1
…re core This commit adds a call to the mpas_initialize_vectors routine for init case 13 (CAM-MPAS 3-d grid) to compute the edgeNormalVectors, cellTangentPlane, and localVerticalUnitVectors fields, which may be useful for alternative initialization workflows for CAM-MPAS.
… (PR #1351) This merge adds the computation of the edgeNormalVectors, cellTangentPlane, and localVerticalUnitVectors fields for MPAS-A initialization case 13 (CAM-MPAS 3-d grid) through a call to the mpas_initialize_vectors routine. These fields may be useful for alternative initialization workflows for CAM-MPAS. * init_atmosphere/case_13_edgeNormalVectors: Add computation of edgeNormalVectors for case 13 in the init_atmosphere core
The c_attname array in the streaminfo_query function (in mpas_stream_inquiry.F) was allocated to the same size as the attname variable. When attname had no padding, this caused a buffer overflow when appending a C null terminator (c_null_char) to c_attname.
Tests fail when removing an input alarm from an output list or an output alarm from an input list due to the absence of proper error handling in MPAS_stream_mgr_remove_alarm in mpas_stream_manager.F. The test checks for an error when attempting to remove an alarm from the opposite list, but the error handling is missing, causing the test to fail.
…alarm Previously, some logic paths (e.g., passing the wrong direction to MPAS_stream_mgr_remove_alarm) would log an error without affecting the code's execution state. The fix can be verified by running the test core, where the previously failing stream tests now pass.
Error logging is no longer necessary in mpas_stream_list.F, as error codes and logging are now handled in mpas_stream_manager.F. The related macros have been commented out.
…o develop (PR #1354) This merge introduces error checking to the MPAS_stream_mgr_remove_alarm subroutine in mpas_stream_manager.F, ensuring that errors returned by the MPAS_stream_list_remove subroutine are correctly handled. Previously, specific logic paths (e.g., passing an incorrect direction to MPAS_stream_mgr_remove_alarm) would log an error without affecting the state of the code. This issue has been addressed by adding the necessary error handling, which now ensures the correct error codes are set and logged when errors occur. Additionally, redundant error logging in the mpas_stream_list_module (specifically in the mpas_stream_list_remove subroutine) has been removed, as the newly added error checking now handles and logs these errors correctly. The changes in this merge can be verified by running new stream alarm tests that have been added to the test core.
…velop (PR #1352) This merge corrects a buffer overflow in the streaminfo_query function in the mpas_stream_inquiry module; the streainfo_query function is invoked as the 'query' method of instances of an MPAS_streamInfo_type type. In the streaminfo_query function, the local array c_attname was allocated with the same size as the attname argument to the function, and c_attname was later set to contain a C-compatible string representation of attname using the mpas_f_to_c_string subroutine. However, the c_attname array should have been allocated with space for at least one additional character to account for the C null character that is added by the mpas_f_to_c_string routine. At present, aside from the test core, the query method of an MPAS_streamInfo_type instance is only invoked in the atm_setup_packages and atm_get_mesh_stream routines with a attname name of 'input_interval'. In practice, the under-allocated c_attname array didn't appear to cause any issues, but this under-allocation was nonetheless a bug that is corrected by allocating c_attname with len(attname)+1 characters.
Update FindPnetCDF.cmake so PnetCDF::PnetCDF_C sets INTERFACE_LINK_LIBRARIES to pnetcdf instead of only setting INTERFACE_LINK_DIRECTORIES to the parallel-netcdf library directory, ensuring proper linkage in builds.
…(PR #1356) This merge fixes CMake linking for the PnetCDF C library by updating FindPnetCDF.cmake so that PnetCDF::PnetCDF_C also sets INTERFACE_LINK_LIBRARIES to pnetcdf instead of only setting INTERFACE_LINK_DIRECTORIES to the parallel-netcdf library directory. * cmake/pnetcdf-linking-bug-in-findpnetcdf: Fix CMake linking for PnetCDF C library
Unit tests were added for the mpas_stream_list module, covering stream list creation, insertion, querying, and removal. The tests fail when inserting duplicate streams adjacent to each other, either as the first or last stream in the list. The bug is in the MPAS_stream_list_insert subroutine in the mpas_stream_list module, which does not correctly handle duplicates in these cases.
The original code allowed adjacent duplicate streams to be inserted into the list, which caused incorrect behavior when adding a duplicate stream next to an existing one. The bug was fixed by updating the insertion logic to properly reject adjacent duplicate streams. The new code checks for duplicates during insertion and prevents adding the stream if it is already in the list, even if adjacent. The mpas_test_insert_duplicate_at_begin and mpas_test_insert_duplicate_at_end tests in the mpas_stream_list test suite confirm that these changes fix the bug.
Fix bug in mpas_stream_list_insert that could unlink the head node when a duplicate stream was inserted. Moved nullify(stream % next) calls into the relevant conditional blocks to ensure new streams are only linked after passing duplicate checks. Prevents inadvertent modification of the list when duplicate insertions occur.
…er_ints The 'pointer' attribute is unnecessary for the 'inlist' argument, and requiring the inlist argument to be a pointer precluded the use of mpas_dmpar_scatter_ints for arrays that are not pointers, e.g., allocatable arrays or array constructors. Additionally, since the inlist argument is used only as the first argument to MPI_Scatterv (i.e., as the 'sendbuf' argument of MPI_Scatterv), it can be declared as an intent(in) in the mpas_dmpar_scatter_ints routine. The changes in this commit have also been found to resolve runtime errors occurring with certain compiler and MPI library combinations, specifically, nvfortran and OpenMPI 5.x.
…1361) This merge removes the pointer attribute from the 'inlist' dummy argument of the mpas_dmpar_scatter_ints routine. The pointer attribute is unnecessary for the inlist argument, and requiring the inlist argument to be a pointer precluded the use of mpas_dmpar_scatter_ints for arrays that are not pointers, e.g., allocatable arrays or array constructors. Additionally, since the inlist argument is used only as the first argument to MPI_Scatterv (i.e., as the sendbuf argument of MPI_Scatterv), it can be declared as an intent(in) argument in the mpas_dmpar_scatter_ints routine. The changes in this merge have also been found to resolve runtime errors occurring with certain compiler and MPI library combinations, specifically, nvfortran and OpenMPI 5.x. * framework/dmpar_scatter_dummy_pointer: Remove 'pointer' attribute from 'inlist' argument of mpas_dmpar_scatter_ints
…nt for the vertically (column-wise) semi-implicit acoustic/gravity-wave integration. Presently the coefficent is a single constant. We now allow this coefficient to vary with model and interface levels as a function of height zeta between two values with a transition layer between the two. This commit, to the Registry only, adds namelist control variables for specifying the lower and upper values of epssm and the lower and upper heights of the transition region for these values. The commit also includes Registry-defined arrays storing the values (1 +- epssm(z))/2 at the levels and interfaces needed in the solution procedure.
…_core.F to initialize the Registry-defined arrays storing the values (1 +- epssm(z))/2 at the levels and interfaces needed in the solution procedure. The initialization occurs at model integration start up. The vertically varying epssm is NOT active at this point; the simulation still uses the constant value from config_epssm.
This merge fixes a bug in the mpas_stream_list module where adjacent duplicate streams were allowed to be inserted into a list. The issue was in the MPAS_stream_list_insert logic, which has been updated to properly reject adjacent duplicates. As part of this merge, unit tests for the mpas_stream_list_module have been added to the 'test' core. The fix for the duplicate insertion bug is tested by the mpas_test_insert_duplicate_at_begin and mpas_test_insert_duplicate_at_end tests.
This merge modifies the MPAS-Atmosphere CMake build system to use manage_externals to obtain specific tags from the https://github.com/NCAR/MMM-physics.git and https://github.com/NOAA-GSL/UGWP.git repositories. Previously, the logic in src/core_atmosphere/CMakeLists.txt simply obtained the HEAD of the default branch from each of these repositories, and this lead to problems when the default branches evolved in ways that were incompatible with the MPAS code. With the changes in this merge, the behavior of the CMake build for MPAS-Atmosphere has changed, and assuming the physics_mmm/ and physics_noaa/UGWP/ are in a clean state, compiling will cause these to be synchronized with whatever version is specified in the src/core_atmosphere/Externals.cfg file. This is consistent with the behavior of GNU Make builds of the atmosphere core. Note that the GNU Make build system already uses manage_externals to obtain specific tags of external physics repositories. * feature/externals: Use the checkout_externals utility to checkout physics submodules with cmake.
This fixes a typo in src/core_atmosphere/physics/mpas_atmphys_interface.F where evapprod(k,k) was used instead of evapprod(k,i), introduced in 8e00576. The fix corrects diagnostic output, but should not affect the model state or simulation results. The change is based on the commit where the typo was introduced, so it can be applied cleanly to older MPAS versions without unrelated changes.
This merge fixes an indexing typo in mpas_atmphys_interface.F, where evapprod(k,k) was used instead of evapprod(k,i). This typo was introduced in 8e00576, and the fix comes from a branch based on this commit. The fix corrects diagnostic output, but should not affect the model state or simulation results. * bugfix_evapprod_develop: Fix evapprod indexing typo in mpas_atmphys_interface.F
This commit removes the following PV diagnostic fields from the default "output" stream for MPAS-Atmosphere: ertel_pv u_pv v_pv theta_pv vort_pv iLev_DT depv_dt_lw depv_dt_sw depv_dt_bl depv_dt_cu depv_dt_mix dtheta_dt_mp depv_dt_mp depv_dt_diab depv_dt_fric depv_dt_diab_pv depv_dt_fric_pv These fields may not be of general interest, and so removing them saves space in output files (the "history" netCDF files are ~20% smaller based on testing with a global 60-km mesh). Additionally, removing these fields from default output streams saves a small amount of computation time, as the logic in the mpas_pv_diagnostics module computes these diagnostics only if they are requested in an output stream.
This merge removes the following PV diagnostic fields from the default "output" stream for MPAS-Atmosphere: - ertel_pv - u_pv - v_pv - theta_pv - vort_pv - iLev_DT - depv_dt_lw - depv_dt_sw - depv_dt_bl - depv_dt_cu - depv_dt_mix - dtheta_dt_mp - depv_dt_mp - depv_dt_diab - depv_dt_fric - depv_dt_diab_pv - depv_dt_fric_pv These fields may not be of general interest, and so removing them saves space in output files (the "history" netCDF files are ~20% smaller based on testing with a global 60-km mesh). Additionally, removing these fields from default output streams saves a small amount of computation time, as the logic in the mpas_pv_diagnostics module computes these diagnostics only if they are requested in an output stream. * atmosphere/dont_output_pv_diags: Remove PV diagnostics from default "output" stream in MPAS-Atmosphere
…interp This commit consolidates the multiple definitions of function vertical_interp, found in modules mpas_init_atm_cases and init_atm_vinterp in the init_atmosphere core and introduces one uniform definition in the init_atm_vinterp module
This merge sets the units to "m s^{-1}" for the config_mpas_cam_coef namelist
option in the Registry.xml file for the atmosphere core.
* atmosphere/adjust_units:
Add units for config_mpas_cam_coef in atmosphere Registry.xml
…op (PR #1429) This merge consolidates the multiple definitions of function vertical_interp, found in modules mpas_init_atm_cases and init_atm_vinterp in the init_atmosphere core and introduces one uniform definition in the init_atm_vinterp module. * init_atmosphere/consolidate_vertical_interp: Consolidating multiple definitions of vertical_interp into init_atm_vinterp
This commit corrects the link path for the ESMF module by replacing the incorrect make variable MPAS_ESMF_LIBS with MPAS_ESMF_LIB, which is the variable defined in the root Makefile. This issue came to attention due to a linking error that arises when building the MPAS atmosphere core with the nvhpc compiler in DEBUG mode.
This merge corrects a typographical error in src/core_atmosphere/utils/Makefile, where the variable 'MPAS_ESMF_LIBS' should be 'MPAS_ESMF_LIB', matching the name of the variable as defined in the top-level Makefile. This typo was caught when trying to build with the 'nvhpc' target with DEBUG=true, where missing references to various esmf symbols were generated when linking the 'build_tables' executable. * fix_esmf_link_path: Correcting the ESMF link path in src/core_atmosphere/utils/Makefile
…var_arrays This commit defines a new package, 'les', for the atmosphere core, and it attaches this package to the 'tke' constituent in the 'scalars', 'scalars_tend', and 'lbc_scalars' var_arrays in the atmosphere core's Registry.xml file. The 'tke' constituent is only required when an LES model has been selected at runtime (i.e., config_les_model = '3d_smagorinsky' or config_les_model = 'prognostic_1.5_order'), and the 'les' package is therefore active if and only if config_les_model is not 'none'.
…not defined When DO_PHYSICS is not defined, the mpas_atmphys_constants.F code in src/core_atmosphere/physics is not compiled, leading to build failures for mpas_atm_dissipation_models.F in the src/core_atmosphere/dynamics directory, since the calculate_n2 routine within the mpas_atm_dissipation_models module relies on the definitions of parameters from the mpas_atmphys_constants module. The fix provided by this commit involves adding local definitions of the required physical constants in the calculate_n2 routine only when the DO_PHYSICS macro is not defined. When DO_PHYSICS is defined, the definitions of these physical constants are imported from the mpas_atmphys_constants module as before.
…1435) This merge fixes a build failure for mpas_atm_dissipation_models.F when the DO_PHYSICS macro is not defined. When DO_PHYSICS is not defined, the mpas_atmphys_constants.F code in src/core_atmosphere/physics is not compiled, leading to build failures for mpas_atm_dissipation_models.F in the src/core_atmosphere/dynamics directory, since the calculate_n2 routine within the mpas_atm_dissipation_models module relies on the definitions of parameters from the mpas_atmphys_constants module. The fix provided by this merge involves adding local definitions of the required physical constants in the calculate_n2 routine only when the DO_PHYSICS macro is not defined. When DO_PHYSICS is defined, the definitions of these physical constants are imported from the mpas_atmphys_constants module as before. * atmosphere/fix_nophys_build_constants: Fix build failure for mpas_atm_dissipation_models when DO_PHYSICS is not defined
…uild When DO_PHYSICS is not defined in a build of the atmosphere core, the diag_physics pool/var_struct is not defined in the Registry.xml file, leading to a crash in the atm_compute_dyn_tend routine when attempting to query ustm, hfx, or qfx from the diag_physics pool. The simple fix in this commit is to guard the calls to mpas_pool_get_array for ustm, hfx, and qfx in the atm_compute_dyn_tend with preprocessor directives, so that the access of these arrays from the diag_physics pool occurs only when DO_PHYSICS is defined. Note that the atm_compute_dyn_tend routine already contains logic to accommodate situations in which ustm, hfx, and qfx are not available (because they are allocated only when the either of the bl_mynn_in or bl_ysu_in packages are active), and so it's only the calls to set pointers to these arrays from the diag_physics pool that need to be guarded.
This merge fixes a crash in the atm_compute_dyn_tend routine when DO_PHYSICS is not defined in a build of the atmosphere core. When DO_PHYSICS is not defined, the diag_physics pool/var_struct is not defined in the Registry.xml file, leading to a crash in the atm_compute_dyn_tend routine when attempting to query ustm, hfx, or qfx from the diag_physics pool. The simple fix in this merge is to guard the calls to mpas_pool_get_array for ustm, hfx, and qfx in the atm_compute_dyn_tend with preprocessor directives, so that the access of these arrays from the diag_physics pool occurs only when DO_PHYSICS is defined. Note that the atm_compute_dyn_tend routine already contains logic to accommodate situations in which ustm, hfx, and qfx are not available (because they are allocated only when the either of the bl_mynn_in or bl_ysu_in packages are active), and so it's only the calls to set pointers to these arrays from the diag_physics pool that need to be guarded. * atmosphere/fix_les_nophys_crash: Fix crash in atm_compute_dyn_tend when DO_PHYSICS is not defined in build
This merge defines a new package, 'les', for the atmosphere core, and it attaches this package to the 'tke' constituent of the 'scalars', 'scalars_tend', and 'lbc_scalars' var_arrays in the atmosphere core's Registry.xml file. The 'tke' constituent is only required when an LES model has been selected at runtime (i.e., when config_les_model = '3d_smagorinsky' or config_les_model = 'prognostic_1.5_order'), and the 'les' package is therefore active if and only if config_les_model is not 'none'. * atmosphere/new_les_package: Define new package, 'les', and attach it to the 'tke' constituent of var_arrays
This commit introduces explicit argument names for the optional argument iErr in calls to mpas_halo_exch_group_full_halo_exch in mpas_halo_testing. The merge of PR 1355 to develop, which introduced an extra optional argument (withGPUAwareMPI) to the signature of mpas_halo_exch_group_full_halo_exch, broke the build of the test core. This commit fixes the build of the test core.
This merge fixes builds of the 'test' core by correcting the argument list of calls to mpas_halo_exch_group_full_halo_exch in mpas_halo_testing. Commit b0ce630 added an extra optional argument (withGPUAwareMPI) to the mpas_halo_exch_group_full_halo_exch routine, and calls to this routine in mpas_halo_testing were not updated to use the keyword form for optional arguments (the optional iErr argument was being passed by position). With this commit, the iErr argument to mpas_halo_exch_group_full_halo_exch in mpas_halo_testing is now passed by keyword, resolving build errors of the 'test' core. * test/fix_halo_tests: Fix calls to mpas_halo_exch_group_full_halo_exch in mpas_halo_testing
This commit fixes bugs that cause MPAS-Atmosphere to crash when the CAM radiation scheme is activated. Several arrays are allocated only when the RRTMG radiation scheme is activated. However, these arrays were being used when the CAM radiation scheme is turned on, leading to a segmentation fault. This commit fixes this issue by conditionally using these arrays only when the RRTMG scheme has been selected at runtime.
This merge fixes MPAS-A crashes when using the CAM SW radiation scheme. Several arrays are allocated only when RRTMG radiation scheme is activated. However, these arrays were being used when CAM radiation scheme is turned on, leading to segmentation fault and subsequent model crash. This merge fixes this issue by reallocating these arrays based on specific schemes. * camrad: Fix segfault when CAM radiation is activated in MPAS-Atmosphere
This merge corrects an issue with high q2 values over urban cells in Noah-MP. Essentially, the fix is to correct the q2 diagnostics in the Noah-MP source file EnergyVarOutTransferMod.F90, changing line 139 to: NoahmpIO%Q2MXY(I) = NoahmpIO%Q2MBXY(I) * ( 1 - NoahmpIO%FVEGXY(I) ) + NoahmpIO%Q2MVXY(I) * NoahmpIO%FVEGXY(I) Note that this merge only impacts the 'q2' diagnostic field, and no other changes to simulation results are expected. * hotfix-v8.3.1_q2diag: fix the q2 diagnostics in NoahMP
This commit fixes an issue in snow initialization over the Arctic Ocean and other areas covered by seaice. Snow water equivalent (as well as snow depth and snow cover) in the initial conditions of MPAS was set to zero over sea ice areas. This leads to a significant warm bias of skintemp during model integration. When MPAS is initialized in winter, the simulated conditions over polar regions become physically unrealistic. This commit corrects snow initialization, making it physically reasonable over Arctic Ocean and other areas covered by seaice in winter.
This merge fixes an issue in snow initialization over areas covered by seaice in MPAS-A. Snow water equivalent (as well as snow depth and snow cover) in the initial conditions was set to zero over sea ice areas. This leads to a significant warm bias of skintemp during model integration. When MPAS is initialized in winter, the simulated conditions over polar regions become physically unrealistic. This merge corrects snow initialization, making it physically reasonable over areas covered by seaice in winter. * initsnow: Fix snow initialization over seaice points in MPAS-A
This commit updates the Registry.xml entry for the config_init_case namelist option in the init_atmosphere core so that its description and possible_values attributes reflect the addition of the new LES initialization case (case 10).
….4.0 (PR #1442) This merge updates the Registry.xml entry for the 'config_init_case' namelist option in the init_atmosphere core so that its 'description' and 'possible_values' attributes reflect the addition of the new LES initialization case (case 10). * init_atmosphere/les_case_registry_desc: Update config_init_case Registry.xml description to include LES case
If no optional `ierr` argument is provided in calling the subroutine `mpas_get_stream_filename()` the model segfaults by trying to assign to the nonexistent argument. Additionally, `ierr` is set to zero to initialize, but as this module uses its own error codes it should instead use `MPAS_STREAM_MGR_NOERR`. This change checks if `ierr` is present, and if so initializes it to `MPAS_STREAM_MGR_NOERR`.
This merge fixes an issue within mpas_get_stream_filename() where the optional argument ierr was being assigned to before checking if it was passed in. The routine now checks if ierr is present, and if so initializes it to MPAS_STREAM_MGR_NOERR. * bugfix_streammgr_optierr: Fix premature use of optional argument in mpas_get_stream_filename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The title above should be a 1 line short summary of the pull request (i.e. what the project the PR represents is intended to do).
Enter a description of this PR. This should include why this PR was created, and what it does.
Testing and relations to other Pull Requests should be added as subsequent comments.
See the below examples for more information.
MPAS-Dev/MPAS#930
MPAS-Dev/MPAS#931
Mandatory Questions
Priority Reviewers