Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Convert netcdf4 Input data downloaded from RDA into grib or appropriate format for running ungrib in WPS.

samudra

New member
I downloaded input data from RDA site, but all files downloaded are in NC format, which gives the ERROR: edition_num: unable to open GRIBFILE.AAA, while running ungrib.exe. Kindly suggest steps to convert nc to grib or download directly grib files. I am not sure if I am missing something here. I am trying to give a nested domain run for 10 days and have been using ERA5 as my input data.
 
Couple of queries -
1)I tired using the python script for conversion and an intermediate file was created labelled ERA5... . But still I got an error, screenshot attached here, saying that the script could not find a file, although the file is downloaded and present at the same folder.
2) After getting the intermediate file, how do i proceed with ungribing, rename the prefix in namelist file as ERA5 and continue with the same process? Or some additional process is present?
 

Attachments

  • Screenshot from 2025-08-08 10-43-20.png
    Screenshot from 2025-08-08 10-43-20.png
    13.7 KB · Views: 3
  • Screenshot from 2025-08-08 10-43-06.png
    Screenshot from 2025-08-08 10-43-06.png
    26.4 KB · Views: 3
Hi, the error has been resolved. Some issue with the localpath itself. I have generated the intermediate files using the python script mentioned above.
But I am unable to run metgrid as I get the following error -

Processing domain 1 of 2
Processing 2006-09-01_00
ERA5
WARNING: Couldn't open file ERA5:2006-09-01_00 for input.
ERROR: The mandatory field TT was not found in any input data.
Abort(0) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 0) - process 0
I checked the intermediate files using util/rd_intermediate.exe and the variable TT was there.

Is there some steps that I have missed out after creating the intermediate files and metgrid.exe?
I have attached the namelist.wps and metgrid.log files here. I have also tried recompiling WPS but the error persists.
 

Attachments

  • metgrid.log
    15.5 KB · Views: 0
  • namelist.wps
    716 bytes · Views: 0
Last edited:
Sure. The first iisue that I had was of not being able to locate the input files that I downloaded to generate the intermediate files. It seems like the problem was with the path that needs to be specific while running the py script (the github link to the script and associated files could be found in the thread above). The path should have been given from the parent directory itself. So, after rectifying, the py script got executed and generated the intermediate files with prefix as "ERA5 :".
The second issue I had was of executing mtegrid.exe after generating the intermediate files using the py script. The error was coming from the inability of the exe program to open the files. Seems like it was a linking problem, where we need to link the intermediate files with the WPS folder. You can do it using ln -sf "path to the files" .[note the fullstop] . It is basically the same code that one uses while linking the Vtables too. After that metgrid.exe ran successfully.

Hope it was helpful. If there is any query, feel free to reach out here.
 
Top