Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I need to edit a file netcdf with nco.
the file is the initialization of the WRF model.
I would like to eliminate the "snow" to if it has a value of less than 10 cm.
I have no idea how to make NCO.
I should do something like that!
"if WEASDsfc <10, then WEASDsfc = 0, else do not modify"
ncap2 -s 'where(WEASDsfc < 10) WEASDsfc=0' in.nc out.nc
many thanks Zender!!!!!!!!!
I have another little question!
I need to extract a temperature value for a specific point of the grid.
I tried to use many command but I could not solve.
for example, I wrote this:
ncks -C -v T2 -s "%.10f\n" wrfout_d02_2013-10-04_20:00:00
but this command I print all values of T 2.
I am interested in defining a point "lat-lon"
I have included the coordinates in many ways, but without success
for example :
ncks -C -v XLONG,43.0 -d XLAT,13.0,T2 -s "%.10f\n" wrfout_d02_2013-10-04_20:00:00
do you have any suggestions for me?!
your command has syntax errors. try
ncks -C -d XLONG,43.0 -d XLAT,13.0 -s "%.10f\n" wrfout_d02_2013-10-04_20:00:00
thanks for you help but
is not working and does not do what I need!
local@node01-> ncks -C -d XLAT,40.0 -d XLONG,12.0 -s "%.10f\n" wrfout_d01_2013-10-02_00:00:00
ncks: ERROR dimension XLAT is not in input file
but i have this variable in netcdf file!
but I have to extract the value of T2, the point of latitude 40 and longitude 13.
I read the manual, but I could not obtain what I need!
please place the file in a publicly available location so we can look at it.
try this link
sorry, netCDF file only. it want me to install an executable.
this link works better?
Can you give a try to the latest version?
also, please post the output of
Your file has 3 datasets
ncks -m out.nc
it will list the variables and their dimensions
XLAT is a variable
the command below is an example that hyperslabs XLAT with dimensions south_north and west_east
ncks -H -C -v XLAT -d south_north,1,1,1 -d west_east,1,1,1 out.nc
Time south_north west_east XLAT=34.3179
WRF produces 2 or 3 dimensional irregular coordinate grids.
Manipulating these is difficult.
The ncks -d option only works on one-dimensional coordinates.
ncap2 can be used to obtain valuess.
See http://nco.sf.net/nco.html#wrf and the preceding few paragraphs.