Singularity HDF5 Point Obs Readin #2391
-
Hello, I am trying to get point observations (radiosondes for now) in an HDF5 file read into point_stat using embedding. I've written the script test_h5_embed.py which reads in the hdf5 file and rearranges the incoming raobs in a dataframe whose indices match what I read on the MET documentation df_master = pd.DataFrame(columns=['typ','sid','vld','lat','lon','elv','var', Finally, the dataframe values are extracted and converted to a list and stored in a variable named met_point_obs (although I've also tried storing it in varialbes named point_obs_data and point_data, neither worked). The script is invoked with arguments specifying what particular observation to store in 'obs'. I've placed a temperature file along with this script attached to this discussion. The script is invoked like: test_h5_embed.py NAF_raob_2023033000.h5 tmp With the correct environmental variables set, I run: singularity exec /app/projects/NEPTUNE/software/singularity/met_v11.0.1.simg point_stat 'PYTHON_NUMPY' 'PYTHON_NUMPY' PointStat2023033000NEST1a0121x0121 -v 5 -outdir ./out/point_stat/radiosonde and get this non-descript error: ERROR : (See below comment for the observation file) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 25 replies
-
Here is the observation file split into two files. You can extract the full data file by running (post unzip) cat NAF_raob_2023033000.tar.gz.a* | tar xzvf - NAF_raob_2023033000.tar.gz.ab.zip |
Beta Was this translation helpful? Give feedback.
-
Greetings @justintsu. I see that you are having trouble with Python embedding for point observations using Point Stat. Thank you for providing your script, data files, Point Stat config file, and command. Prior to MET v11.0.0, Python Embedding for point observations was not well supported in tools like Point Stat, which require a special format of point observations typically provided by the PB2NC tool. In MET v11.0.0 and v11.0.1 (the version you are using), in order to use Python embedding for point observations with Point Stat you'll need to call a special reformatter on your If you cannot upgrade to the latest version of MET (v11.1.0), I would recommend the following changes to your Python script
Could you please try that and let us know how it works? |
Beta Was this translation helpful? Give feedback.
-
read_COAMPS_general.zip |
Beta Was this translation helpful? Give feedback.
Keep in mind that while the observations are only read one time with Python for each time, your COAMPS Python script is called for each entry in the
fcst
block. So you may consider doing some profiling of how long that script takes to run. Is it global data? What is the nx/ny of the grid?I'd suggest reducing your config file to a single time, single subset of variables at a single level. It's possible some variables are taking longer than others for some reason, but without some systematic profiling it's hard to know where the bottlenecks are, if there are any.
One question I'd ask is whether it is necessary for you to be setting
MET_PYTHON_EXE
? If you set this, MET will write out and re…