Found a workaround after a lot of voodoo! First, I discovered that mro works OK on some of my files. So I compared the metadata of the working & non-working files and could not find any difference. I also tried extracting smaller slabs and -- weirdly -- some of the small slabs worked with mro and some didn't. I then tried running "ncra --mro" with the debug flag "-D 3", and compared the debug info between the working and non-working files. With the non-working file, debug info showed all the input...
We just updated NCO to 4.9.7 and mro is not working correctly. ncra --mro -d time,,,12,12 in.nc out.nc The command runs but out.nc has only 1 time slice, the average of all the time slices (and the value of the average is correct). I'm really hoping to use the per_record_weights option offered by 4.9.7! How could we troubleshoot this? Is the input file somehow not structured right? It looks like this: netcdf in { dimensions: lat = 1 ; lon = 1 ; time = UNLIMITED ; // (1140 currently) variables: double...
I run ncra with stride to calculate the average January temperature: ncra -d time,0,,12 monthlytemp.nc avgjan.nc In the input file, time is days since 1900-01-01. In the output file, the time value appears to be the average of all the time slices that were averaged. Since I'm averaging an even number of years in the input, January average winds up having a mid-year timestamp. It doesn't sound like unreasonable behavior, but I just wanted to check to make sure I'm not missing something, maybe a neat...
I have file with a temperature grid and two time grids: float temperature(time, lat, lon) ; short t0(lat,lon); short t1(lat,lon); How can I set temperature value before t0 and after t1 to be _FillValue? I'm trying to calculate temperature averages for time periods defined by t0 and t1, where t0 and t1 vary from cell to cell. I thought I'd set the values outside of the period to FillValue and then run ncra on the whole slab. Thank you.
A colleague gave me a file generated by Matlab, which represents USA in a 389 x 922 grid, like this: netcdf delta { dimensions: lat = 389 ; lon = 922 ; variables: double delta(lat, lon) ; double lat(lat) ; double lon(lon) ; } Somehow his code wrote the file so lat & lon appear swapped (see attached screenshot from ncview). I tried: ncpdq -a lat,lon delta.nc out.nc And it rotates the grid but doesn't produce the correct rotation. I've also tried all combinations of switching the order of the arguments,...
Thanks!! But when I do that I get this: % ncremap -d 0.5deg.nc 0.25deg.nc out.nc Started processing at Wed Feb 10 16:51:28 PST 2021. NCO version is 4.5.5 Map-only run: no input data detected therefore will exit after generating map Destination grid will be inferred from data-file Weight-generation type: esmf ESMF's ESMF_RegridWeightGen will generate map-file Algorithm used to generate weights in map-file is: bilinear Completed generating map-file(s) at Wed Feb 10 16:51:28 PST 2021. Elapsed time 0m0s...
I have a 0.25 degree resolution global dataset: pressure(lat,lon,time) I just want to aggregate them to 0.5 degree; i.e., average 4 cells to make one cell. Is there a simple command for this? Ncremap seems terribly complicated! Thank you.
I have daily temperature data in ten-year files: 1901_1910.nc, 1911_1920.nc, ...1991_2000.nc. The time dimension/variable contains days-since-basedate values. I need to convert these into monthly averages, for each month from 1901 to 2000 (i.e., I need to end up with 12 mo x 100 yrs = 1200 time slices). Ncra with --mro won't work because of irregular number of days in the months (including leap days!) Can ncclimo's reshaping mode do this for me? Thank you.