Adding Two-Dimensional ORO to Files Using NCL and NCKS
If your model output file does not contain an oro field, you can use NCL and NCO (specifically, NCKS) to add this variable to your file.
Step 1: Make a backup copy of your data. This is always a smart idea.
Step 2: Download the appropriate oro file: oro.128x128.nc or oro.40x48.nc. Each file has a two-dimensional oro field. If these oro fields are not appropriate for your data files, you can make your own using NCL. Download the script oro.ncl. Edit the required fields (input and output files) and run it at the unix prompt:
ncl > oro.ncl
It will create a file that contains a two-dimensional (lat,lon) oro field.
Say you want to put oro into a file called ha.foam1.5.test.nc. The command to copy oro from oro.40x48.nc to ha.foam1.5.test.nc is (at the unix prompt):
ncks -v oro oro.40x48.nc ha.foam1.5.test.nc
You will be prompted to Overwrite, Append, or Exit the operation. You want to "append" the file, so choose A.
There may be some messages saying that certain file attributes like latitude and longitude have been overwritten. This is okay as long as the oro file and your data file have the same latitudes and longitudes.
Your data files should now contain the "oro" variable.
ncdump -h filename.nc to check the file header information.