diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8de167ba60..e18cbf4cca 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,7 +7,7 @@ version: 2 # Build all formats (htmlzip, pdf, epub) #formats: all -#formats: [pdf] +formats: [pdf] # Optionally set the version of Python and requirements required to build your # docs diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000..dd5b3a58aa --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/docs/Users_Guide/appendixC.rst b/docs/Users_Guide/appendixC.rst index 6a385f7bfe..2a1e358e68 100644 --- a/docs/Users_Guide/appendixC.rst +++ b/docs/Users_Guide/appendixC.rst @@ -765,7 +765,7 @@ where the weights are applied at each grid location, with values assigned accord .. only:: latex - .. math:: + .. math:: \text{S1\_OG} = \frac{\text{EGBAR}}{\text{OGBAR}} @@ -773,9 +773,10 @@ where the weights are applied at each grid location, with values assigned accord .. only:: html - .. math:: + .. math:: + \text{S1_OG} = \frac{\text{EGBAR}}{\text{OGBAR}} - + \text{FGOG_RATIO} = \frac{\text{FGBAR}}{\text{OGBAR}} @@ -989,7 +990,7 @@ Let :math:`\text{J}` be the number of categories, then both the forecast, :math: :math:`F_m = \sum_{j=1}^m (f_j)` and :math:`O_m = \sum_{j=1}^m (o_j), m = 1,…,J`. -To clarify, :math:`F_1 = f_1` is the first component of :math:`F_m`, :math:`F_2 = f_1+f_2`, etc., and :math:`F_J = 1`. Similarly, if :math:`o_j = 1` and :math:`i < j`, then :math:`O_i = 0` and when :math:`i≥j`, :math:`O_i = 1`, and of course, :math:`O_J = 1`. Finally, the RPS is defined to be: +To clarify, :math:`F_1 = f_1` is the first component of :math:`F_m`, :math:`F_2 = f_1+f_2`, etc., and :math:`F_J = 1`. Similarly, if :math:`o_j = 1` and :math:`i < j`, then :math:`O_i = 0` and when :math:`i >= j`, :math:`O_i = 1`, and of course, :math:`O_J = 1`. Finally, the RPS is defined to be: .. math:: \text{RPS} = \sum_{m=1}^J (F_m - O_m)^2 = \sum_{m=1}^J BS_m, @@ -1018,11 +1019,23 @@ The score can be interpreted as a continuous version of the mean absolute error To calculate crps_emp_fair (bias adjusted, empirical ensemble CRPS) for each individual observation with m ensemble members: -.. math:: \text{crps_emp_fair}_i = \text{crps_emp}_i - \frac{1}{2*m} * \frac{1}{m*(m-1)} \sum_{i \ne j}|f_{i} - f_{j}| +.. only:: latex + + .. math:: \text{crps\_emp\_fair}_i = \text{crps\_emp}_i - \frac{1}{2*m} * \frac{1}{m*(m-1)} \sum_{i \neq j}|f_{i} - f_{j}| + +.. only:: html + + .. math:: \text{crps_emp_fair}_i = \text{crps_emp}_i - \frac{1}{2*m} * \frac{1}{m*(m-1)} \sum_{i \neq j}|f_{i} - f_{j}| The overall CRPS_EMP_FAIR is calculated as the average of the individual measures. In equation form: -.. math:: \text{CRPS_EMP_FAIR} = \text{average(crps_emp_fair) } = \frac{1}{N} \sum_{i=1}^N \text{crps_emp_fair}_i +.. only:: latex + + .. math:: \text{CRPS\_EMP\_FAIR} = \text{average(crps\_emp\_fair) } = \frac{1}{N} \sum_{i=1}^N \text{crps\_emp\_fair}_i + +.. only:: html + + .. math:: \text{CRPS_EMP_FAIR} = \text{average(crps_emp_fair) } = \frac{1}{N} \sum_{i=1}^N \text{crps_emp_fair}_i Ensemble Mean Absolute Difference --------------------------------- @@ -1031,11 +1044,23 @@ Called "SPREAD_MD" in ECNT output :numref:`table_ES_header_info_es_out_ECNT` The ensemble mean absolute difference is an alternative measure of ensemble spread. It is computed for each individual observation (denoted by a lowercase spread_md) with m ensemble members: -.. math:: \text{spread_md}_i = \frac{1}{m*(m-1)} \sum_{i \ne j}|f_{i} - f_{j}| +.. only:: latex + + .. math:: \text{spread\_md}_i = \frac{1}{m*(m-1)} \sum_{i \neq j}|f_{i} - f_{j}| + +.. only:: html + + .. math:: \text{spread_md}_i = \frac{1}{m*(m-1)} \sum_{i \neq j}|f_{i} - f_{j}| The overall SPREAD_MD is calculated as the average of the individual measures. In equation form: -.. math:: \text{SPREAD_MD} = \text{average(spread_md) } = \frac{1}{N} \sum_{i=1}^N \text{spread_md}_i +.. only:: latex + + .. math:: \text{SPREAD\_MD} = \text{average(spread\_md) } = \frac{1}{N} \sum_{i=1}^N \text{spread\_md}_i + +.. only:: html + + .. math:: \text{SPREAD_MD} = \text{average(spread_md) } = \frac{1}{N} \sum_{i=1}^N \text{spread_md}_i A perfect forecast would have ensemble mean absolute difference = 0. @@ -1057,7 +1082,13 @@ Called "BIAS_RATIO" in ECNT output :numref:`table_ES_header_info_es_out_ECNT` The bias ratio (BIAS_RATIO) is computed when verifying an ensemble against gridded analyses or point observations. It is defined as the mean error (ME) of ensemble member values greater than or equal to the observation value to which they are matched divided by the absolute value of the mean error (ME) of ensemble member values less than the observation values. -.. math:: \text{BIAS_RATIO} = \frac{ \text{ME}_{f >= o} }{ |\text{ME}_{f < o}| } +.. only:: latex + + .. math:: \text{BIAS\_RATIO} = \frac{ \text{ME}_{f >= o} }{ |\text{ME}_{f < o}| } + +.. only:: html + + .. math:: \text{BIAS_RATIO} = \frac{ \text{ME}_{f >= o} }{ |\text{ME}_{f < o}| } A perfect forecast has ME = 0. Since BIAS_RATIO is computed as the high bias (ME_GE_OBS) divide by the absolute value of the low bias (ME_LT_OBS), a perfect forecast has BIAS_RATIO = 0/0, which is undefined. In practice, the high and low bias values are unlikely to be 0. @@ -1070,7 +1101,7 @@ Called "IGN" in ECNT output :numref:`table_ES_header_info_es_out_ECNT` The ignorance score (IGN) is the negative logarithm of a predictive probability density function (:ref:`Gneiting et al., 2004 `). In MET, the IGN is calculated based on a normal approximation to the forecast distribution (i.e. a normal pdf is fit to the forecast values). This approximation may not be valid, especially for discontinuous forecasts like precipitation, and also for very skewed forecasts. For a single normal distribution **N** with parameters :math:`\mu \text{ and } \sigma`, the ignorance score is -.. math:: \text{ign} (N( \mu, \sigma),y) = \frac{1}{2} \ln (2 \pi \sigma^2 ) + \frac{(y - \mu)^2}{\sigma^2}. +.. math:: \text{ign} (N( \mu, \sigma),y) = \frac{1}{2} \ln (2 \pi \sigma^2 ) + \frac{(y - \mu)^2}{2\sigma^2}. Accumulation of the ignorance score for many forecasts is via the average of individual ignorance scores. This average ignorance score is the value output by the MET software. Like many error statistics, the IGN is negatively oriented, so smaller numbers indicate better forecasts. diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index a57773b4b3..de74bb598a 100644 --- a/docs/Users_Guide/release-notes.rst +++ b/docs/Users_Guide/release-notes.rst @@ -9,8 +9,16 @@ When applicable, release notes are followed by the GitHub issue number which des enhancement, or new feature (`MET GitHub issues `_). Important issues are listed **in bold** for emphasis. -MET Version 11.0.1-rc1 release notes (20230221) ------------------------------------------------ +MET Version 11.0.2 release notes (20230330) +------------------------------------------- + +* Bugfixes: + + * Bugfix: Fix support for the YYYYMMDD format in NetCDF level timestrings (`#2482 `_). + * Bugfix: AERONET the lat/lon is not changed with different station ID (`#2493 `_). + +MET Version 11.0.1 release notes (20230228) +------------------------------------------- * Bugfixes: @@ -27,6 +35,7 @@ MET Version 11.0.1-rc1 release notes (20230221) * Bugfix: Fix ASCII2NC to handle missing NDBC buoy location information (`#2426 `_). * Bugfix: Fix the MET vx_pointdata_python library to handle MET_PYTHON_EXE for python embedding of point observations (`#2428 `_). * Bugfix: Refine the regrid dictionary's data conversion and censoring operations and fix climo time matching logic for a single monthly climo file (`#2437 `_). + * Bugfix: Fix the creation of the MET User's Guide PDF (`#2449 `_). * Bugfix: Fix inconsistent ASCII2NC AIRNOW location lookup logic (`#2452 `_). MET Version 11.0.0 release notes (20221209) diff --git a/docs/conf.py b/docs/conf.py index 56667e56f9..5f4ac0a3de 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,11 +20,11 @@ project = 'MET' author = 'UCAR/NCAR, NOAA, CSU/CIRA, and CU/CIRES' author_list = 'Opatz, J., T. Jensen, J. Prestopnik, H. Soh, L. Goodrich, B. Brown, R. Bullock, J. Halley Gotway, K. Newman' -version = '11.0.1-rc1' +version = '11.0.2' verinfo = version release = f'{version}' release_year = '2023' -release_date = f'{release_year}-02-21' +release_date = f'{release_year}-03-30' copyright = f'{release_year}, {author}' # -- General configuration --------------------------------------------------- diff --git a/internal/scripts/installation/compile_MET_all.sh b/internal/scripts/installation/compile_MET_all.sh index 4ebc7c704e..49ca28aba8 100644 --- a/internal/scripts/installation/compile_MET_all.sh +++ b/internal/scripts/installation/compile_MET_all.sh @@ -94,8 +94,16 @@ if [ ! -e $TAR_DIR ]; then exit 1 fi +# If MET_PYTHON_LIB is not set in the environment file, set it to the +# lib directory so it can be use to install MET with Python Embedding +# support +if [[ -z "$MET_PYTHON_LIB" ]]; then + MET_PYTHON_LIB=${MET_PYTHON}/lib +fi + + # Update library linker path -export LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib${MET_PYTHON:+:$MET_PYTHON/lib}${MET_NETCDF:+:$MET_NETCDF/lib}${MET_HDF5:+:$MET_HDF5/lib}${MET_BUFRLIB:+:$MET_BUFRLIB}${MET_GRIB2CLIB:+:$MET_GRIB2CLIB}${LIB_JASPER:+:$LIB_JASPER}${LIB_LIBPNG:+:$LIB_LIBPNG}${LIB_Z:+:$LIB_Z}${MET_GSL:+:$MET_GSL/lib}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} +export LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib${MET_PYTHON_LIB:+:$MET_PYTHON_LIB}${MET_NETCDF:+:$MET_NETCDF/lib}${MET_HDF5:+:$MET_HDF5/lib}${MET_BUFRLIB:+:$MET_BUFRLIB}${MET_GRIB2CLIB:+:$MET_GRIB2CLIB}${LIB_JASPER:+:$LIB_JASPER}${LIB_LIBPNG:+:$LIB_LIBPNG}${LIB_Z:+:$LIB_Z}${MET_GSL:+:$MET_GSL/lib}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}" # if LIB_Z is not set in the environment file, set it to the @@ -832,7 +840,7 @@ if [ $COMPILE_MET -eq 1 ]; then # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html # ${parameter:+word} # If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted. - export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib${ADDTL_DIR:+:$ADDTL_DIR}${MET_NETCDF:+:$MET_NETCDF/lib}${MET_HDF5:+:$MET_HDF5/lib}${MET_BUFRLIB:+:$MET_BUFRLIB}${MET_GRIB2CLIB:+:$MET_GRIB2CLIB}${MET_PYTHON:+:$MET_PYTHON/lib}${MET_GSL:+:$MET_GSL/lib}" + export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib${ADDTL_DIR:+:$ADDTL_DIR}${MET_NETCDF:+:$MET_NETCDF/lib}${MET_HDF5:+:$MET_HDF5/lib}${MET_BUFRLIB:+:$MET_BUFRLIB}${MET_GRIBCLIB:+:$MET_GRIB2CLIB}${MET_PYTHON_LIB:+:$MET_PYTHON_LIB}${MET_GSL:+:$MET_GSL/lib}" export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_JASPER:+$LIB_JASPER}${LIB_LIBPNG:+:$LIB_PNG}${LIB_Z:+$LIB_Z}" export LDFLAGS="${LDFLAGS} ${LIB_JASPER:+-L$LIB_JASPER} ${LIB_LIBPNG:+-L$LIB_LIBPNG} ${MET_HDF5:+-L$MET_HDF5/lib} ${ADDTL_DIR:+-L$ADDTL_DIR}" export LIBS="${LIBS} -lhdf5_hl -lhdf5 -lz" diff --git a/internal/scripts/installation/config/install_met_env.acorn_py3.10 b/internal/scripts/installation/config/install_met_env.acorn_py3.10 index b97699a187..9e725f6fac 100644 --- a/internal/scripts/installation/config/install_met_env.acorn_py3.10 +++ b/internal/scripts/installation/config/install_met_env.acorn_py3.10 @@ -12,7 +12,6 @@ module load g2c/1.6.4 export TEST_BASE=/apps/sw_review/emc/MET/11.0.1 export LIB_DIR=${TEST_BASE}/external_libs -export BIN_DIR_PATH=${TEST_BASE}/exec export COMPILER=intel_19.1.3.304 export MET_SUBDIR=${TEST_BASE} export MET_TARBALL=v11.0.1.tar.gz @@ -20,8 +19,9 @@ export USE_MODULES=TRUE export ADDTL_DIR=/apps/spack/gettext/0.21/intel/19.1.3.304/at2kdo4edvuhyzrt5g6zhwrdb7bdui4s/lib64 export PYTHON_MODULE=python_3.10.4 export MET_PYTHON=/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp +export MET_PYTHON_LIB=/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64 export MET_PYTHON_CC=-I/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/include/python3.10 -export MET_PYTHON_LD=-L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib/python3.10/config-3.10-x86_64-linux-gnu/\ -L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64\ -lpython3.10\ -lintl\ -lcrypt\ -ldl\ -lutil\ -lm\ -lm +export MET_PYTHON_LD=-L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64\ -lpython3.10\ -lintl\ -lcrypt\ -ldl\ -lutil\ -lm\ -lm export MET_NETCDF=/apps/prod/hpc-stack/intel-19.1.3.304/netcdf/4.7.4 export MET_HDF5=/apps/prod/hpc-stack/intel-19.1.3.304/hdf5/1.12.2 export MET_BUFRLIB=/apps/ops/prod/libs/intel/19.1.3.304/bufr/11.5.0/lib64 diff --git a/internal/scripts/installation/config/install_met_env.generic b/internal/scripts/installation/config/install_met_env.generic index 5b73adbb09..f2ef8ccc3e 100644 --- a/internal/scripts/installation/config/install_met_env.generic +++ b/internal/scripts/installation/config/install_met_env.generic @@ -28,7 +28,7 @@ export USE_MODULES=FALSE export PYTHON_LOC="$(python3-config --prefix)" #Directory of your python executable -export MET_PYTHON=${PYTHON_LOC}/bin +export MET_PYTHON=${PYTHON_LOC} #Python ldflags created using python3-config export MET_PYTHON_LD="$(python3-config --ldflags)" diff --git a/internal/scripts/installation/config/install_met_env.wcoss2_py3.10 b/internal/scripts/installation/config/install_met_env.wcoss2_py3.10 index c6d550c3a3..c788816632 100644 --- a/internal/scripts/installation/config/install_met_env.wcoss2_py3.10 +++ b/internal/scripts/installation/config/install_met_env.wcoss2_py3.10 @@ -5,6 +5,7 @@ module load craype/2.7.13 module load cray-mpich/8.1.12 module load python/3.10.4 +module load ve/evs/1.0 module load netcdf/4.7.4 module load hdf5/1.10.6 module load bufr/11.6.0 @@ -25,8 +26,9 @@ export USE_MODULES=TRUE export ADDTL_DIR=/apps/spack/gettext/0.21/intel/19.1.3.304/at2kdo4edvuhyzrt5g6zhwrdb7bdui4s/lib64 export PYTHON_MODULE=python_3.10.4 export MET_PYTHON=/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp +export MET_PYTHON_LIB=/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64 export MET_PYTHON_CC=-I/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/include/python3.10 -export MET_PYTHON_LD=-L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib\ -lpython3.10\ -lpthread\ -ldl\ -lutil\ -lm\ -Xlinker\ -export-dynamic +export MET_PYTHON_LD=-L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64\ -lpython3.10\ -lcrypt\ -lintl\ -ldl\ -lutil\ -lm\ -lm export MET_NETCDF=/apps/prod/hpc-stack/intel-19.1.3.304/netcdf/4.7.4 # JY export MET_HDF5=/apps/prod/hpc-stack/intel-19.1.3.304/hdf5/1.12.2 export MET_HDF5=${HDF5_ROOT} diff --git a/scripts/python/met_point_obs.py b/scripts/python/met_point_obs.py index 458a91572c..062e815b14 100755 --- a/scripts/python/met_point_obs.py +++ b/scripts/python/met_point_obs.py @@ -242,6 +242,7 @@ def log_info(self, info_msg): base_met_point_obs.info_msg(info_msg) def put_data(self, point_obs_dict): + self.use_var_id = point_obs_dict['use_var_id'] self.hdr_typ = point_obs_dict['hdr_typ'] self.hdr_sid = point_obs_dict['hdr_sid'] self.hdr_vld = point_obs_dict['hdr_vld'] @@ -446,6 +447,7 @@ def convert_point_data(self): hdr_vld_map = {} obs_var_map = {} obs_qty_map = {} + self.use_var_id = not self.is_grib_code() self.use_var_id = not self.is_grib_code() diff --git a/scripts/python/met_point_obs_nc.py b/scripts/python/met_point_obs_nc.py index cb86be5011..e6680c0689 100644 --- a/scripts/python/met_point_obs_nc.py +++ b/scripts/python/met_point_obs_nc.py @@ -64,6 +64,11 @@ def read_data(self, nc_filename): self.log_error_msg(f"input NetCDF file ({nc_filename}) does not exist") else: dataset = nc.Dataset(nc_filename, 'r') + + attr_name = 'use_var_id' + use_var_id_str = dataset.getncattr(attr_name) if attr_name in dataset.ncattrs() else "false" + self.use_var_id = use_var_id_str.lower() == 'true' + # Header self.hdr_typ = dataset['hdr_typ'][:] self.hdr_sid = dataset['hdr_sid'][:] diff --git a/src/basic/vx_util/util_constants.h b/src/basic/vx_util/util_constants.h index e7d86d38ad..eff9e8ebdc 100644 --- a/src/basic/vx_util/util_constants.h +++ b/src/basic/vx_util/util_constants.h @@ -18,6 +18,7 @@ //////////////////////////////////////////////////////////////////////// // Released versions of MET +static const char met_version_11_0_2[] = "V11.0.2"; static const char met_version_11_0_1[] = "V11.0.1"; static const char met_version_11_0_0[] = "V11.0.0"; static const char met_version_10_1_0[] = "V10.1.0"; diff --git a/src/libcode/vx_data2d_nc_pinterp/var_info_nc_pinterp.cc b/src/libcode/vx_data2d_nc_pinterp/var_info_nc_pinterp.cc index f7e51f84cf..76cbfe681c 100644 --- a/src/libcode/vx_data2d_nc_pinterp/var_info_nc_pinterp.cc +++ b/src/libcode/vx_data2d_nc_pinterp/var_info_nc_pinterp.cc @@ -220,19 +220,19 @@ void VarInfoNcPinterp::set_magic(const ConcatString &nstr, const ConcatString &l else { int level = 0; double level_value = bad_data_double; - if (is_number(ptr2)) { + if (is_datestring(ptr2)) { + unixtime unix_time = timestring_to_unix(ptr2); + level = vx_data2d_dim_by_value; + level_value = unix_time; + as_offset = false; + } + else if (is_number(ptr2)) { if (as_offset) level = atoi(ptr2); else { level = vx_data2d_dim_by_value; level_value = atof(ptr2); } } - else if (is_datestring(ptr2)) { - unixtime unix_time = timestring_to_unix(ptr2); - level = vx_data2d_dim_by_value; - level_value = unix_time; - as_offset = false; - } else { mlog << Error << "\n" << method_name << "trouble parsing NetCDF dimension value \"" diff --git a/src/libcode/vx_data2d_nccf/var_info_nccf.cc b/src/libcode/vx_data2d_nccf/var_info_nccf.cc index ee3880971c..dca1f9b47d 100644 --- a/src/libcode/vx_data2d_nccf/var_info_nccf.cc +++ b/src/libcode/vx_data2d_nccf/var_info_nccf.cc @@ -281,19 +281,19 @@ void VarInfoNcCF::set_magic(const ConcatString &nstr, const ConcatString &lstr) // Single level int level = 0; double level_value = bad_data_double; - if (is_number(ptr2)) { + if (is_datestring(ptr2)) { + unixtime unix_time = timestring_to_unix(ptr2); + level = vx_data2d_dim_by_value; + level_value = unix_time; + as_offset = false; + } + else if (is_number(ptr2)) { if (as_offset) level = atoi(ptr2); else { level = vx_data2d_dim_by_value; level_value = atof(ptr2); } } - else if (is_datestring(ptr2)) { - unixtime unix_time = timestring_to_unix(ptr2); - level = vx_data2d_dim_by_value; - level_value = unix_time; - as_offset = false; - } else { mlog << Error << "\n" << method_name << "trouble parsing NetCDF dimension value \"" diff --git a/src/tools/other/ascii2nc/aeronet_handler.cc b/src/tools/other/ascii2nc/aeronet_handler.cc index 18ef588f6c..5a1818396a 100644 --- a/src/tools/other/ascii2nc/aeronet_handler.cc +++ b/src/tools/other/ascii2nc/aeronet_handler.cc @@ -204,8 +204,8 @@ bool AeronetHandler::_readObservations(LineDataFile &ascii_file) int var_idx, sid_idx, elv_idx, lat_idx, lon_idx, date_idx, month_idx; double height_from_header; string aot = "AOT"; - //string angstrom = "Angstrom"; string var_name; + string prev_sid, cur_sid; StringArray hdr_names; NumArray header_heights; IntArray header_var_index; @@ -352,22 +352,28 @@ bool AeronetHandler::_readObservations(LineDataFile &ascii_file) break; } } - - // Get the stationLat - _stationLat = atof(data_line[lat_idx]); - // Get the stationLon - _stationLon = atof(data_line[lon_idx]); - // Get the stationAlt - if (elv_idx >= 0) _stationAlt = atof(data_line[elv_idx]); - else _stationAlt = bad_data_float; - - mlog << Debug(7) << "\n" << method_name << "stationID: " - << ((sid_idx < 0) ? _stationId : data_line[sid_idx]) << " from index " << sid_idx - << " lat: " << _stationLat - << " lon: " << _stationLon - << " elv: " << _stationAlt << " from index " << elv_idx << "\n"; + mlog << Debug(7) << method_name << "station_idx=" << sid_idx + << " elv_idx=" << elv_idx << "\n"; + first_line = false; } - first_line = false; + } + + cur_sid = (sid_idx < 0) ? _stationId : data_line[sid_idx]; + if (cur_sid.compare(prev_sid) != 0) { + prev_sid = cur_sid; + + // Get the stationLat + if (lat_idx >= 0) _stationLat = atof(data_line[lat_idx]); + // Get the stationLon + if (lon_idx >= 0) _stationLon = atof(data_line[lon_idx]); + // Get the stationAlt + if (elv_idx >= 0) _stationAlt = atof(data_line[elv_idx]); + else if (format_version == 3) _stationAlt = bad_data_float; + + mlog << Debug(7) << "\n" << method_name + << "stationID: " << cur_sid << " lat: " << _stationLat + << " lon: " << _stationLon << " elv: " << _stationAlt + << "\n"; } // // Pull the valid time from the data line @@ -421,7 +427,7 @@ bool AeronetHandler::_readObservations(LineDataFile &ascii_file) } _addObservations(Observation(header_type, - (sid_idx<0 ? _stationId : data_line[sid_idx]), + cur_sid, valid_time, _stationLat, _stationLon, _stationAlt, @@ -439,7 +445,7 @@ bool AeronetHandler::_readObservations(LineDataFile &ascii_file) double aod_at_550 = angstrom_power_interplation(aod_at_675,aod_at_440,675.,440.,dheight); if (!is_eq(aod_at_550, bad_data_double)) { _addObservations(Observation(header_type, - (sid_idx<0 ? _stationId : data_line[sid_idx]), + cur_sid, valid_time, _stationLat, _stationLon, _stationAlt, na_str, var_id, bad_data_double, dheight, aod_at_550,