I don’t know if it’s good or bad, but I like when the files I’m working with are in the working directory (so instead of using pathnames to my files I can just type filename or ./filename). But to avoid copying data and wasting space, symbolic links are the way to go. The command for that is: ln -s target_file sym_link, where -s stands for “symbolic” (just ln would create a hard link)

Continue reading

NCO:ncap2 is the function to do it: ncap2 -s 'new_var=var1+var2' in_filename.nc out_filename.nc The output file will have all of the variables that exist in the input file as well as the new_var. Add -O if your input and output files are the same (overwrite). I do not know what the -s stands for. BUT the new_var will have the same long_name as the first variable used for summing (i.e. it could make some things a bit confusing).

Continue reading

My bash aliases

If you find yourself using some commands always with the same flags, then it would make sense to define them as alieses, by putting them into your .bashrc file like this (log out and back in for it to take effect): # .bashrc # Put user specific aliases and functions here alias ls='ls -al --color=auto' alias qstat='qstat -a' alias qsub='qsub -m abe -M myemail@email.com' alias disk="du * -sh | sort -h" -a for ls shows hidden files (files that start with a dot, like .

Continue reading

The NCO (netCDF Operator) command ncks (netCDF Kitchen Sink). From the documentation: The nickname “kitchen sink” is a catch-all because ncks combines most features of ncdump and nccopy with extra features to extract, hyperslab, multi-slab, sub-set, and translate into one versatile utility. ncks extracts (a subset of the) data from input-file and and writes (or pastes) it in netCDF format to output-file, and optionally writes it in flat binary format to binary-file, and optionally prints it to screen.

Continue reading

Author's picture

Riinu Pius (Ots)

if it aint broke, you’re outdated

Senior Data Manager

Edinburgh, UK