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

(RESOLVED) link_grib.csh "command not found"

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

mitchellkcm

New member
I have been having trouble getting the ./link_grib.csh script to work. I typically get a command not found error. Do I have to run this from a particular directory at the command line? Can I run this from the bash shell? I tried changing to tcsh and still had no luck.
 
Hi,

It shouldn't matter which shell you are using when you run the ./link_grib.csh script. While inside the WPS/ directory, you will run the script using the path to the directory that holds the input data, and then use the prefix of the data files, themselves. For example, if you store your data files inside a directory called "gfs_files," and the data files were named "data_file.1, data_file.2, data_file.3," etc., then you would use this command

./link_grib.csh path_to_files/gfs_files/data_file

Notice there is no “.” after this script. The script takes into account the fact that you are linking the files ‘here’ and it should bring over all the files beginning with the prefix ‘data_file.’

Keep in mind that if you have anything else in the directory with that prefix (e.g., data_file.tar), it can cause problems, and could give this error. Check that you’re issuing the correct command, that you don’t have any other file in there that may be causing problems, and also check that the files are complete (no problem downloading the full file). You can issue:

ls -ls path_to_files/my_directory/data_file*

to see the size of the files. If you are still having problems:
1) let me know the exact command you are issuing
2) Issue
ls -ls path_you_are_using_for_link_grib.csh_script/input_files* >& log.input_files
3) upload the log.input_files (from step 2), namelist.wps, and ungrib.log files
 
Just in case it helps, running
Code:
./link_grib.csh
tells the shell (tcsh, bash, etc.) to look for a command called "link_grib.csh" in your current working directory because of the ./ prefix before the script name. So, if you're trying the command from anywhere besides the top-level WPS directory (where the link_grib.csh script resides), you'll likely get this error.

There are a couple of solutions:
1) You could add the absolute path of the WPS directory to your PATH environment variable, then run the link_grib.csh script without the ./ prefix
2) You could specify the path to the link_grib.csh script -- either as a relative or an absolute path. For example, if you're working in a directory that resides alongside the WPS directory (i.e, if the WPS directory is one directory up from your working directory), you could use
Code:
../link_grib.csh
or
Code:
/path/to/your/WPS/link_grib.csh
.
 
Top