Clip multiple NetCDF files using bat file

Added by Ameer Muhammad over 2 years ago

I have multiple NetCDF file and i would like to clip these file using lat/long of my area. The files name are like,, etc. I am doing this using a batch (.bat) file. here is what i have

files=`ls *.nc` # pick up all the netcdf files in a directory
for file in $files ; do
cdo sellonlatbox -108.4363 -104.7039 49.16911 50.66338 files
#selecting the lat/long box of my region using files (all nc files) and save it as (I am however, confuse how to save the file as, and for my clipped region)