diff --git a/data/config/GridStatConfig_default b/data/config/GridStatConfig_default index adbb9a214b..aaeaccf337 100644 --- a/data/config/GridStatConfig_default +++ b/data/config/GridStatConfig_default @@ -270,6 +270,7 @@ ugrid_coordinates_file = ""; //////////////////////////////////////////////////////////////////////////////// + grid_weight_flag = NONE; tmp_dir = "/tmp"; output_prefix = ""; diff --git a/data/config/PointStatConfig_default b/data/config/PointStatConfig_default index 9a8132dccc..d41da25450 100644 --- a/data/config/PointStatConfig_default +++ b/data/config/PointStatConfig_default @@ -305,6 +305,7 @@ ugrid_coordinates_file = ""; //////////////////////////////////////////////////////////////////////////////// + tmp_dir = "/tmp"; output_prefix = ""; version = "V12.0.0"; diff --git a/docs/Users_Guide/appendixB.rst b/docs/Users_Guide/appendixB.rst index f437376108..cb7df93671 100644 --- a/docs/Users_Guide/appendixB.rst +++ b/docs/Users_Guide/appendixB.rst @@ -136,8 +136,6 @@ The NCEP verification regions that are implemented in MET as lat/lon polylines a * NAK.poly for Northern Alaska -* NAO.poly for Northern Atlantic Ocean - * NEC.poly for the Northern East Coast * NMT.poly for the Northern Mountain Region diff --git a/internal/scripts/installation/config/install_met_env.gaea b/internal/scripts/installation/config/install_met_env.gaea index a47e1d609f..6fb1934a85 100644 --- a/internal/scripts/installation/config/install_met_env.gaea +++ b/internal/scripts/installation/config/install_met_env.gaea @@ -10,3 +10,5 @@ export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lm export EXTERNAL_LIBS=/usw/met/12.0.0-beta1/external_libs export LIB_Z=${EXTERNAL_LIBS}/lib +export MAKE_ARGS=-j +export CXXFLAGS="-std=c++11" diff --git a/internal/scripts/installation/config/install_met_env.wcoss2_py3.10_secondary b/internal/scripts/installation/config/install_met_env.wcoss2_py3.10_secondary new file mode 100644 index 0000000000..fb0220c5a6 --- /dev/null +++ b/internal/scripts/installation/config/install_met_env.wcoss2_py3.10_secondary @@ -0,0 +1,51 @@ +module reset +module use /apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304 +module load intel +module load PrgEnv-intel/8.3.3 +module load craype/2.7.17 +module load python/3.10.4 +module use /apps/dev/modulefiles/ +module load ve/evs/1.0 +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.1.0-rc1 +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.1.0-rc1.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_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/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.10.6 +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 +export MAKE_ARGS=-j +export CXXFLAGS="-std=c++11" diff --git a/internal/scripts/installation/modulefiles/11.1.0.lua_wcoss2 b/internal/scripts/installation/modulefiles/11.1.0.lua_wcoss2 new file mode 100644 index 0000000000..457753be13 --- /dev/null +++ b/internal/scripts/installation/modulefiles/11.1.0.lua_wcoss2 @@ -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)") \ No newline at end of file diff --git a/internal/scripts/installation/modulefiles/11.1.0_acorn b/internal/scripts/installation/modulefiles/11.1.0_acorn new file mode 100644 index 0000000000..3712812827 --- /dev/null +++ b/internal/scripts/installation/modulefiles/11.1.0_acorn @@ -0,0 +1,33 @@ +#%Module###################################################################### +## +## Model Evaluation Tools +## +proc ModulesHelp { } { + puts stderr "Sets up the paths and environment variables to use the Model Evaluation Tools v11.1.0-rc1 + *** 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 use /apps/dev/modulefiles/ +module load ve/evs/1.0 +module load netcdf/4.7.4 +module load hdf5/1.10.6 +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.1.0-rc1 +set ver 11.1.0-rc1 +set share $base/share/met +set lib_base $base + +prepend-path PATH $base/bin + +setenv METversion V$ver +setenv MET_ROOT $base diff --git a/src/libcode/vx_data2d/vx_data2d.h b/src/libcode/vx_data2d/vx_data2d.h index cffb18e27c..1212aaaf4d 100644 --- a/src/libcode/vx_data2d/vx_data2d.h +++ b/src/libcode/vx_data2d/vx_data2d.h @@ -29,6 +29,7 @@ #include "leveltype_to_string.h" #include "var_info.h" #include "table_lookup.h" +#include "mask_filters.h" //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_grib2/data2d_grib2.cc b/src/libcode/vx_data2d_grib2/data2d_grib2.cc index f86516c2b7..82cc9495be 100644 --- a/src/libcode/vx_data2d_grib2/data2d_grib2.cc +++ b/src/libcode/vx_data2d_grib2/data2d_grib2.cc @@ -198,8 +198,9 @@ bool MetGrib2DataFile::data_plane(VarInfo &vinfo, DataPlane &plane) { if( 1 < listMatch.size() ){ ConcatString msg; for(size_t i=0; i < listMatch.size(); i++) { - msg << "record " << listMatch[i]->RecNum + msg << " Record " << listMatch[i]->RecNum << " field " << listMatch[i]->FieldNum + << ", table 4." << listMatch[i]->PdsTmpl << ": ipdtmpl[" << listMatch[i]->IPDTmpl.n() << "] = "; for(int j=0; j < listMatch[i]->IPDTmpl.n(); j++) { @@ -259,8 +260,9 @@ int MetGrib2DataFile::data_plane_array(VarInfo &vinfo, if( 1 < listMatchExact.size() ){ ConcatString msg; for(size_t i=0; i < listMatchExact.size(); i++) { - msg << "record " << listMatchExact[i]->RecNum + msg << " Record " << listMatchExact[i]->RecNum << " field " << listMatchExact[i]->FieldNum + << ", table 4." << listMatchExact[i]->PdsTmpl << ": ipdtmpl[" << listMatchExact[i]->IPDTmpl.n() << "] = "; for(int j=0; j < listMatchExact[i]->IPDTmpl.n(); j++) { @@ -728,11 +730,17 @@ void MetGrib2DataFile::read_grib2_record_list() { rec->PdsTmpl = gfld->ipdtnum; rec->ParmCat = gfld->ipdtmpl[0]; rec->Parm = gfld->ipdtmpl[1]; - rec->Process = gfld->ipdtmpl[2]; + + // get the process id + if( gfld->ipdtnum != 46 && gfld->ipdtnum != 48 ) { + rec->Process = gfld->ipdtmpl[2]; + } // get the level type if( gfld->ipdtnum == 46 ) { rec->LvlTyp = gfld->ipdtmpl[15]; + } else if( gfld->ipdtnum == 48 ) { + rec->LvlTyp = gfld->ipdtmpl[20]; } else { rec->LvlTyp = gfld->ipdtmpl[9]; } @@ -745,10 +753,16 @@ void MetGrib2DataFile::read_grib2_record_list() { // check for template number 46 if( gfld->ipdtnum == 46 ) { rec->LvlVal1 = scaled2dbl(gfld->ipdtmpl[16], gfld->ipdtmpl[17]); - rec->LvlVal2 = rec->LvlVal1; - // check for special fixed level types (1 through 10 or 101) and set the level values to 0 - // Reference: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-5.shtml - } else if( (rec->LvlTyp >= 1 && rec->LvlTyp <= 10) || rec->LvlTyp == 101 ) { + rec->LvlVal2 = rec->LvlVal1; + } + // check for template number 48 + else if( gfld->ipdtnum == 48 ) { + rec->LvlVal1 = scaled2dbl(gfld->ipdtmpl[21], gfld->ipdtmpl[22]); + rec->LvlVal2 = rec->LvlVal1; + } + // check for special fixed level types (1 through 10 or 101) and set the level values to 0 + // Reference: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-5.shtml + else if( (rec->LvlTyp >= 1 && rec->LvlTyp <= 10) || rec->LvlTyp == 101 ) { rec->LvlVal1 = 0; rec->LvlVal2 = 0; } else { @@ -805,6 +819,14 @@ void MetGrib2DataFile::read_grib2_record_list() { rec->PercVal = gfld->ipdtmpl[15]; } + // aerosol type and size for templates 46 and 48 + if( 46 == gfld->ipdtnum || 48 == gfld->ipdtnum ){ + rec->AerosolType = gfld->ipdtmpl[2]; + rec->AerosolIntervalType = gfld->ipdtmpl[3]; + rec->AerosolSizeLower = scaled2dbl(gfld->ipdtmpl[4], gfld->ipdtmpl[5]); + rec->AerosolSizeUpper = scaled2dbl(gfld->ipdtmpl[6], gfld->ipdtmpl[7]); + } + // depending on the template number, determine the reference times if( 8 <= gfld->ipdtnum && 12 >= gfld->ipdtnum ){ diff --git a/src/libcode/vx_data2d_grib2/data2d_grib2.h b/src/libcode/vx_data2d_grib2/data2d_grib2.h index 4191e19728..abf334a837 100644 --- a/src/libcode/vx_data2d_grib2/data2d_grib2.h +++ b/src/libcode/vx_data2d_grib2/data2d_grib2.h @@ -62,6 +62,10 @@ typedef struct { int DerType; int StatType; int PercVal; + int AerosolType; + int AerosolIntervalType; + double AerosolSizeLower; + double AerosolSizeUpper; IntArray IPDTmpl; } Grib2Record;