PcpCombine won't open NetCDF files that GridStat opens #3207
-
|
I am using MET 11.0.3 and METplus 5.0.2. I am trying to use PcpCombine on some NetCDF files that I had no issues previously running GridStat (and other processes) on. For GridStat, I use "FCST_GRID_STAT_FILE_TYPE = NETCDF_NCCF". But for PcpCombine, it seems there is no direct equivalent, but I have tried "FCST_PCP_COMBINE_INPUT_DATATYPE = NETCDF" and "FCST_PCP_COMBINE_INPUT_DATATYPE = NETCDF_NCCF". However, I've noticed the "INPUT_DATATYPE" config option doesn't change the actual MET command that is run. I have also tried "FCST_PCP_COMBINE_INPUT_OPTIONS = file_type = NETCDF_NCCF;", so running a command like:
I get the following error: Any suggestions? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
|
Hi Michelle, And thank you for your question. It looks like you were on the right track: As for why you are running into an error, I cannot be certain. The command you provided should work as intended, as long as the file has a valid time matching the one you pass on command line (20250501_060000). I'm going to request that you send along a config file, along with some test data, so that we can properly assess what's giving you these errors. Information on how to send us data can be found at this link. A final note is that the version of MET and METplus you are running, 11.0.3 and 5.0.2 respectively, are a bit behind the latest releases (12.2.0 and 6.2.0). I would strongly suggest that you try and upgrade to the latest releases, as many of the errors and issues that users tend to find in older versions were actually fixed in newer releases. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Michelle, Thank you for providing the test data! I was able to test the file you sent over and I think the problem boils down to projection issues. My first test is always to see if the input data file projects correctly using the Plot-Data-Plane tool. If MET cannot recognize the file, or has difficulty projecting the results correctly in Plot-Data-Plane, any MET tool usage cannot be trusted (as interpolation/distance methods may not be correctly done). I did need to add the Take a look at the User's Guide section on supported grid projections. If the data file's projection system is not on this list, you will either need to reproject it to a supported grid outside of MET (the Regrid-Data-Plane tool only supports regridding between grids that MET supports), or utilize the UGRID functionality to read the file in as a unstructured grid. More information on UGRID functionality is here in the User's Guide. |
Beta Was this translation helpful? Give feedback.
-
|
Hello Michelle, And thank you for the additional details and test file. I've tested the newest file and confirmed that Plot-Data-Plane projects this file correctly, although it does require the Knowing that the first GEOS-HWT file is a Lambert Conformal projection, while the second GEOS-FP file is a standard Lat/Lon grid, has solidified my answer that this is a projection/file structure issue. The "bug" you're seeing with PCPCombine is MET failing to understand how to read the projection of the input file since we are telling MET that the input file is CF-compliant, when it really isn't. I ran the GEOS-HWT file through a CF convention check website and found that it failed in a few areas: most notably, it does not have any Note how it counts the projection as Lat/Lon, rather than Lambert Conformal. This is MET defaulting to Lat/Lon, as it has no This also explains why the GEOS-FP file succeeds in Plot-Data-Plane (and any other MET tool): the data is in Lat/Lon projection, which is MET's default, so MET guessing ends up being correct and verification can continue. I ran a CF-compliant file through Plot-Data-Plane, which also uses a Lambert-Conformal projection, and the log file output for Grid information says it all: I'll also copy the ncdump results of the input file, so you can see the difference between this compliant file and the GEOS-HWT file: So until your GEOS file(s) are in CF-compliant format, you will continue to need to utilize some post-processing outside of MET to attach grid information, such as Python Embedding. Otherwise, MET cannot read the files except by accident. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your patience Michelle, I wanted to ensure we got to the bottom of the problem and I think we have. I ran both files you provided (GEOS hwt and fp) through PCPCombine to again confirm that both files end up with 2 warnings: one for not being able to open the file, and one for not finding the correct data. It's that first warning, not being able to open the file, that we wanted to understand a bit more about, due to the same files being opened by MET via Grid-Stat. After speaking with our lead MET engineer, it seems that this comes down to a bit of coding in PCP-Combine, along with an understanding of the tool differences. It turns out that the But to really understand how the warning arises of PCP-Combine not being able to open your file, take a look at this line of code which attempts to open the file for reading. The search_pcp_dir() function loops over the files in the input directory. Line 788 attempts to open each file to be considered. Note that it does NOT pass in a user-provided "file type". So even when supplying But your files are not identified as such, which is the reason why that warning message is being printed: We are looking into adding capability that would allow PCP-Combine to read in I again want to emphasize that while this would clear up one of the warnings, both files are not CF-compliant and will raise other issues and warnings during the verification process. |
Beta Was this translation helpful? Give feedback.


FYI, this PCP-Combine issue about using the
file_typewhen searching for matching files for thesumcommand (dtcenter/MET#1533) was fixed today, merged into themain_v12.2branch (dtcenter/MET#3354), and included in the MET-12.2.1 bugfix release.@michellefrazer, if you have the opportunity to test out that bugfix release and check whether PCP-Combine behaves as you'd expect it to, we'd love to hear feedback! Thanks for reporting this issue and please keep the feedback coming.