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

ERROR: Couldn't open file ./ for input. For command ./metgrid.exe


New member
Dear users,

I am getting an error when trying to execute ./metgrid.exe.

The error is ERROR: Couldn't open file ./ for input.

Version Details :
Input data :
List of attachments:

Please suggest the required corrections to be made.

Thank You for your time.


  • geogrid.txt
    154 KB · Views: 3
  • metgrid.txt
    7.3 KB · Views: 2
  • namelist.wps
    1.2 KB · Views: 2
  • ungrib.txt
    3.8 MB · Views: 2
  • Vtable.GFS.txt
    8.4 KB · Views: 2
Do you have the file in your WPS running directory? If so, can you see if you can open it - using something like "ncview," or even if you can run an NCO command, like "ncdump" on the file?
Thank you very much for your response.
Yes, I got the generated file. Unfortunately, I am unable to open the generated geo_em.d01 file, using ncview or ncdump (please check the attachment). However, I can successfully open geo_em.d02 and geo_em.d03 (also attachment).geo_em.d01.pnggeo_em.d01_ncview_error.pnggeo_em.d02.pnggeo_em.d03.png
Last edited:
I looked a bit higher up in your geogrid.txt file and see this error several times during the process for d01

Error in ext_pkg_open_for_write_begin

That error often means you don't have the right permissions to write the file to that directory, but that wouldn't make much sense if you're able to write the d02 and d03 files. Can you try to run this again after making a couple of adjustments (these modifications aren't for the purpose of fixing the error, but should be fixed, regardless).

1) Set debug_level = 0 - setting this option to anything higher rarely provides much information and just causes the output files to be really large and more difficult to read.
2) Your d01 should be larger. Unless you're just playing around with WRF and not really interested in the results, domains should always be at least 100x100 grid points.

After that I just want you to rerun to see if you still get the same issue. Thanks!
Dear kwerner,

Thank you for your response. I have tried as you suggested. But still, I am getting a similar error. Please find the attachment of namelist.wps and log files. Please suggest the required corrections to be made.


  • ungrib.log
    720 KB · Views: 3
  • metgrid.log
    5.8 KB · Views: 2
  • namelist.wps
    1.2 KB · Views: 2
I notice the error message mentions MPI. Did you compile WPS with a dmpar option? I'm not sure why that would cause an issue, but can you try to recompile WPS for just serial computing? You don't need to recompile WRF - it's okay to compile WRF with dmpar, and WPS with the serial option. I'm just curious if that would make a difference. You'll then need to rerun geogrid and metgrid. You don't need to rerun ungrib.

If not, can you share your and files so I can take a look? Those files will likely be too large to attach, so take a look at the home page of this forum for instructions on sharing large files. Thanks!
Dear Kwetner,
Sorry for not getting back to you sooner. Yes, I have compiled WPS with a damper option. When I am executing in serial ( ./geogrid.exe, ./ungrib.exe, ./metgrid.exe, ./real.exe, ./wrf.exe) it completes successfully without any error. Even ./wrf.exe and ./real.exe are not working in parallel.
Thanks for the update. Regarding WPS, there really is no need to compile with the dmpar option. Since it's working okay when running the executables serially, that should be fine. We only recommend compiling WPS with dmpar when your domains are 1000s x 1000s of grid cells.

Regarding WRF, first verify that you did, indeed, choose the 'dmpar' option when you compiled. Look in your configure.wrf file and do a search for 'dmpar.' If you're unable to find it, you may have only compiled with the serial option. However, if you did successfully compile WRF with dmpar, but it's also not working, we would like to see the error message you're getting when you run real.exe.

Since that is a somewhat different issue than the original one posted here, will you post a new thread (in the WRF section, instead of the WPS section)? This helps to keep the topics separated by each topic, for each system. Thanks!