-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: MET Tools Test Account <[email protected]> Co-authored-by: Howard Soh <[email protected]> Co-authored-by: jprestop <[email protected]> Co-authored-by: hsoh-u <[email protected]> Co-authored-by: George McCabe <[email protected]> fix #2389 main_v11.0 flowchart (#2391) fix definitions of G172 and G220 based on comments in NOAA-EMC/NCEPLIBS-w3emc#157. (#2405) fix #2380 main_v11.0 override (#2381) fix #2408 main_v11.0 empty config (#2409) fix #2390 main_v11.0 fix compiling hdf5 with zlib and handle NetCDF-C zip (#2403) fix #2415 main_v11.0 modulefiles (#2416) fix #2412 main_v11.0 climo (#2420) fix #2426 main_v11.0 buoy (#2432) fix #2437 main_v11.0 convert (#2438) fix for main_v11.0, for #2437, forgot one reference to the search_parent for a dictionary lookup. fix 2428 python from env main v11.0 (#2443) fix 2428 python csv input (#2450) fix #2452 main_v11.0 airnow (#2453) fix #2402 main_v11.0 sonarqube (First PR) (#2447)
- Loading branch information
1 parent
31a063c
commit 5cd254e
Showing
36 changed files
with
1,354 additions
and
965 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
######################################################################## | ||
# | ||
# Reads temporary file into memory. | ||
# | ||
# usage: /path/to/python read_tmp_dataplane.py dataplane.tmp | ||
# | ||
######################################################################## | ||
|
||
import os | ||
import sys | ||
|
||
met_base_dir = os.getenv('MET_BASE',None) | ||
if met_base_dir is not None: | ||
sys.path.append(os.path.join(met_base_dir, 'python')) | ||
|
||
# add share/met/python directory to system path to find met_point_obs | ||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), | ||
os.pardir, 'python'))) | ||
from met_point_obs import met_point_obs | ||
from met_point_obs_nc import nc_point_obs | ||
|
||
netcdf_filename = sys.argv[1] | ||
|
||
# read NetCDF file | ||
print('{p} reading{f}'.format(p=met_point_obs.get_prompt(), f=netcdf_filename)) | ||
point_obs_data = nc_point_obs() | ||
point_obs_data.read_data(netcdf_filename) | ||
|
||
met_point_data = point_obs_data.get_point_data() | ||
met_point_data['met_point_data'] = point_obs_data |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
######################################################################## | ||
# | ||
# Adapted from a script provided by George McCabe | ||
# Adapted by Randy Bullock | ||
# | ||
# usage: /path/to/python write_tmp_point.py \ | ||
# tmp_output_filename <user_python_script>.py <args> | ||
# | ||
######################################################################## | ||
|
||
import os | ||
import sys | ||
import importlib.util | ||
|
||
met_base_dir = os.getenv('MET_BASE',None) | ||
if met_base_dir is not None: | ||
sys.path.append(os.path.join(met_base_dir, 'python')) | ||
|
||
# add share/met/python directory to system path to find met_point_obs | ||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), | ||
os.pardir, 'python'))) | ||
|
||
from met_point_obs import met_point_obs | ||
from met_point_obs_nc import nc_point_obs | ||
|
||
PROMPT = met_point_obs.get_prompt() | ||
print("{p} Python Script:\t".format(p=PROMPT) + repr(sys.argv[0])) | ||
print("{p} User Command:\t".format(p=PROMPT) + repr(' '.join(sys.argv[2:]))) | ||
print("{p} Temporary File:\t".format(p=PROMPT) + repr(sys.argv[1])) | ||
|
||
tmp_filename = sys.argv[1] | ||
pyembed_module_name = sys.argv[2] | ||
sys.argv = sys.argv[2:] | ||
|
||
# append user script dir to system path | ||
pyembed_dir, pyembed_file = os.path.split(pyembed_module_name) | ||
if pyembed_dir: | ||
sys.path.insert(0, pyembed_dir) | ||
|
||
if not pyembed_module_name.endswith('.py'): | ||
pyembed_module_name += '.py' | ||
|
||
user_base = os.path.basename(pyembed_module_name).replace('.py','') | ||
|
||
spec = importlib.util.spec_from_file_location(user_base, pyembed_module_name) | ||
met_in = importlib.util.module_from_spec(spec) | ||
spec.loader.exec_module(met_in) | ||
|
||
if hasattr(met_in, 'point_obs_data'): | ||
met_in.point_obs_data.save_ncfile(tmp_filename) | ||
else: | ||
if hasattr(met_in.met_point_data, 'point_obs_data'): | ||
met_in.met_point_data['point_obs_data'].save_ncfile(tmp_filename) | ||
else: | ||
tmp_point_obs = nc_point_obs() | ||
tmp_point_obs.put_data(met_in.met_point_data) | ||
tmp_point_obs.save_ncfile(tmp_filename) | ||
|
||
#print('{p} writing {f}'.format(p=PROMPT, f=tmp_filename)) |
This file contains 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
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
internal/scripts/installation/config/install_met_env.acorn_py3.10
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module use /apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304/ | ||
module load intel python/3.10.4 | ||
module load ve/evs/1.0 | ||
module load netcdf/4.7.4 | ||
module load hdf5/1.12.2 | ||
module load bufr/11.5.0 | ||
module load zlib/1.2.11 | ||
module load jasper/2.0.25 | ||
module load libpng/1.6.37 | ||
module load gsl/2.7 | ||
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 | ||
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_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_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 | ||
export MET_GRIB2CLIB=/apps/ops/prod/libs/intel/19.1.3.304/g2c/1.6.4/lib64 | ||
export MET_GRIB2CINC=/apps/ops/prod/libs/intel/19.1.3.304/g2c/1.6.4/include | ||
export MET_GSL=/apps/spack/gsl/2.7/intel/19.1.3.304/xks7dxbowrdxhjck5zxc4rompopocevb | ||
export BUFRLIB_NAME=-lbufr_4 | ||
export GRIB2CLIB_NAME=-lg2c | ||
export LIB_JASPER=/apps/spack/jasper/2.0.25/intel/19.1.3.304/sjib74krrorkyczqpqah4tvewmlnqdx4/lib64 | ||
export LIB_LIBPNG=/apps/spack/libpng/1.6.37/intel/19.1.3.304/4ohkronuhlyherusoszzrmur5ewvlwzh/lib | ||
export LIB_Z=/apps/spack/zlib/1.2.11/intel/19.1.3.304/hjotqkckeoyt6j6tibalwzrlfljcjtdh/lib | ||
export SET_D64BIT=FALSE |
47 changes: 47 additions & 0 deletions
47
internal/scripts/installation/config/install_met_env.wcoss2_py3.10
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# JY module use /apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304/ | ||
module load intel | ||
# JY add following two | ||
module load craype/2.7.13 | ||
module load cray-mpich/8.1.12 | ||
|
||
module load python/3.10.4 | ||
module load netcdf/4.7.4 | ||
module load hdf5/1.10.6 | ||
module load bufr/11.6.0 | ||
module load zlib/1.2.11 | ||
module load jasper/2.0.25 | ||
module load libpng/1.6.37 | ||
module load gsl/2.7 | ||
module load g2c/1.6.4 | ||
|
||
#export TEST_BASE=/apps/ops/para/libs/intel/19.1.3.304/met/11.0.1 | ||
export TEST_BASE=$(pwd) | ||
export LIB_DIR=${TEST_BASE}/external_libs | ||
export BIN_DIR_PATH=${TEST_BASE}/bin | ||
export COMPILER=intel_19.1.3.304 | ||
export MET_SUBDIR=${TEST_BASE} | ||
export MET_TARBALL=v11.0.1.tar.gz | ||
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_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_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} | ||
export MET_BUFRLIB=/apps/ops/prod/libs/intel/19.1.3.304/bufr/11.6.0/lib64 | ||
# JY export MET_GRIB2CLIB=/apps/ops/prod/libs/intel/19.1.3.304/g2c/1.6.4/lib64 | ||
# JY export MET_GRIB2CINC=/apps/ops/prod/libs/intel/19.1.3.304/g2c/1.6.4/include | ||
export MET_GRIB2CLIB=${g2c_ROOT}/lib64 | ||
export MET_GRIB2CINC=${G2C_INC} | ||
export MET_GSL=/apps/spack/gsl/2.7/intel/19.1.3.304/xks7dxbowrdxhjck5zxc4rompopocevb | ||
export BUFRLIB_NAME=-lbufr_4 | ||
export GRIB2CLIB_NAME=-lg2c | ||
# JY export LIB_JASPER=/apps/spack/jasper/2.0.25/intel/19.1.3.304/sjib74krrorkyczqpqah4tvewmlnqdx4/lib64 | ||
export LIB_JASPER=${JASPER_LIBDIR} | ||
# JY export LIB_LIBPNG=/apps/spack/libpng/1.6.37/intel/19.1.3.304/4ohkronuhlyherusoszzrmur5ewvlwzh/lib | ||
export LIB_LIBPNG=${LIBPNG_LIBDIR} | ||
# JY export LIB_Z=/apps/spack/zlib/1.2.11/intel/19.1.3.304/hjotqkckeoyt6j6tibalwzrlfljcjtdh/lib | ||
export LIB_Z=${ZLIB_LIBDIR} | ||
export SET_D64BIT=FALSE |
27 changes: 27 additions & 0 deletions
27
internal/scripts/installation/modulefiles/11.0.1.lua.wcoss2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
help([[ | ||
]]) | ||
|
||
local pkgName = myModuleName() | ||
local pkgVersion = myModuleVersion() | ||
local pkgNameVer = myModuleFullName() | ||
|
||
local hierA = hierarchyA(pkgNameVer,1) | ||
local compNameVer = hierA[1] | ||
|
||
|
||
conflict(pkgName) | ||
|
||
local opt = os.getenv("HPC_OPT") or os.getenv("OPT") or "/opt/modules" | ||
|
||
local base = pathJoin(opt,compNameVer,pkgName,pkgVersion) | ||
|
||
prepend_path("PATH", pathJoin(base,"bin")) | ||
|
||
setenv("MET_ROOT", base) | ||
setenv("MET_BASE", pathJoin(base, "share", "met")) | ||
setenv("MET_VERSION", pkgVersion) | ||
|
||
whatis("Name: ".. pkgName) | ||
whatis("Version: " .. pkgVersion) | ||
whatis("Category: applications") | ||
whatis("Description: Model Evaluation Tools (MET)") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#%Module###################################################################### | ||
## | ||
## Model Evaluation Tools | ||
## | ||
proc ModulesHelp { } { | ||
puts stderr "Sets up the paths and environment variables to use the Model Evaluation Tools v11.0.1 | ||
*** For help see the official MET webpage at http://www.dtcenter.org/met/users ***" | ||
} | ||
|
||
# The intel compiler is required to run MET | ||
|
||
module use /apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304/ | ||
module load intel python/3.10.4 | ||
module load ve/evs/1.0 | ||
module load netcdf/4.7.4 | ||
module load hdf5/1.12.2 | ||
module load bufr/11.5.0 | ||
module load zlib/1.2.11 | ||
module load jasper/2.0.25 | ||
module load libpng/1.6.37 | ||
module load gsl/2.7 | ||
module load g2c/1.6.4 | ||
|
||
set base /apps/sw_review/emc/MET/11.0.1 | ||
set ver 11.0.1 | ||
set share $base/share/met | ||
set lib_base $base | ||
|
||
prepend-path PATH $base/exec | ||
|
||
setenv METversion V$ver | ||
setenv MET_ROOT $base | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.