Generating template input files. #675
tobeycarman
started this conversation in
Data Handling
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using NetCDF's CDL might be helpful for generating template input datasets. For example one problem that consistently comes up is that a bunch of our sample input datasets (in the input catalog) are missing the
fri-fire.nc
file for some reason. Even if running with no fire on, the model still requires the file to be present. Therefore in many cases, we don't really care what data is in the file as long as it exists. And we don't need any of the projection information either.While it would be possible to simply copy an
fri-fire.nc
from another input directory of the same X/Y size, this would be misleading because the file would have incorrect spatial reference information. We don't even need the spatial reference info so the simplest thing to do is simply make a file without it. This can be done as follows:ncdump
to export an existing filencdump /a/good/fri-fire.nc > /tmp/foo.cdl
.cdl
file you just saved and strip out all the unnecessary info.ncgen
to make a new file where you need it from the cdl:ncgen -o /the/final/place/fri-fire.nc /tmp/foo.cdl
An example stripped file looks like this; if this suits your needs, you can use it directly and skip steps 1 and 2:
Beta Was this translation helpful? Give feedback.
All reactions