harphub / harpIO

IO functions for HARP
https://harphub.github.io/harpIO/
Other
6 stars 16 forks source link

Issue reading file in atos #108

Closed carlos9917 closed 7 months ago

carlos9917 commented 7 months ago

This might be a non-issue, but adding here as requested by Andrew.

Using the harpSpatial function verify_spatial I am getting this error while running a script in atos.

Reading /ec/res4/scratch/nhd/CERISE/sample_data/radar/3h_accum//202310010300.kavrRAD.03.h5 Initialising ob regridding. valid FC dates: 20231001-0000 +++ fcdate = 20231001-0000 +++ ldt = 3h Reading /ec/res4/scratch/nhd/CERISE/sample_data/NEA//NEA_2023100100_TP.grib Error in names(grib_info) <- c("short_name", "level_type", "level_number") : 'names' attribute [3] must be the same length as the vector [2] Calls: verify_spatial ... do.call -> -> read_func -> lapply -> FUN In addition: Warning message: get_filenames() was deprecated in harpIO 0.1.0. :information_source: Please use generate_filenames() instead. :information_source: The deprecated feature was likely used in the harpSpatial package.

Attaching a subset of the above file containing only two messages. NEA_2023100100_TP_subset.grib.gz

andrew-MET commented 7 months ago

I can read the data with

 read_grid(
   "NEA_2023100100_TP_subset.grib", 
   "Pcp"
 )

I suspect the issue is the parameter name that verify_spatial() is passing to the read_grid() function is incorrect (e.g. it's giving it "AccPcp1h" instead of "Pcp" as I get that exact error when I do that - obviously it needs to fail in a more meaningful way there). I suggest trying it with the "develop" version of harpSpatial and if you get the same problem to open an issue on harpSpatial.