Hi Henry, A few years later, I have bumped into your solution for me. I would like to generate a map of the number of months with data from monthly data, uwnd(time,lat,lon). 'uwnd' is a monthly number of observations variable. I tried ncap2 -h -s 'where(uwnd>=1)uwnd=1;nbr_good=uwnd.total();' uwnd.nobs.nc b.nc which yielded a single value, nbr_good, and not a map. What do I modify to get a map of the number of months with data? Thank you!
Hi Henry, A few years later, I have bumped into your solution for me. I would like to generate a map of the number of months with data from monthly data, uwnd(time,lat,lon). 'uwnd' is a monthly number of observations variable. I tried ncap2 -h -s 'where(uwnd>=1)uwnd=1;nbr_good=uwnd.total();' uwnd.nobs.nc b.nc which yielded a single value nbr_good, and not a map. What do I modify to get a map of the number of months with data? Thank you!
Hi Henry, A few years later, I have bumped into your solution for me. I would like to generate a map of the number of months with data from monthly data, uwnd(time,lat,lon). 'uwnd' is a monthly number of observations variable. I tried ncap2 -h -s 'where(uwnd>=1)uwnd=1;nbr_good=uwnd.total();' uwnd.nobs.nc b.nc which yielded a scalar, nbr_good. What do I modify to get a map of the number of months with data? Thank you!
I saw this thread hoping it would produce a grid of the number of values summed over time (the record dimension). I tried modifying the expression to be 'where(variable!=0)variable=1;variable.total();' and this produces a single number. Can you point me to where I can learn about what arguments I can put in total()? I couldn't find anything in my old C manual. Another way to put this is that it would be great if ncap2 would have the calculation of N (the number of samples) as a basic operation. I...
Thank you Christopher! That worked. I am happy to write to Matlab if this is a problem...
I have since found that "ncdump.nc fn.nc | ncgen -o fn2.nc" makes for a much more...
Greetings, I created several netCDF files in Matlab, and I would like to calculate...
Greetings, On http://nco.sourceforge.net, two of the links to netCDF documentation,...