Menu

ncks extraction with time

Help
Brian T
2012-01-31
2013-10-17
  • Brian T

    Brian T - 2012-01-31

    Stupid question, but I'm trying to extract a single variable at a single location (lat/long) but also include the time variable. I have no problem exporting everything except the time variable. I am not sure how to get -s to export the variables of interest as well as time.

    Thanks

    /ncks -C -v st -d lat,45.4 -d lon,258.9 -s "%f\n" test.nc

     
  • Charlie Zender

    Charlie Zender - 2012-01-31

    it's kind of unclear what you want, does this do it?

    ncks -C -v st,time -d lat,45.4 -d lon,258.9 -s "%f\n" test.nc

     
  • Brian T

    Brian T - 2012-01-31

    Sorry, removing the -s "%f\n" gives the output I want, but has too much information.
    Example output;
    time=26226 level=2 lat=45.4 lon=258.9 st=31728 K

    I was trying to get the output from the time, as well as the st in a csv format, so that it follows;
    26226, 31728
    26227, 31729

     
  • Charlie Zender

    Charlie Zender - 2012-01-31

    Claro. NCO has no way of doing that. One way to do it is to filter ncks output of above command through sed/perl/gawk.
    cz

     

Log in to post a comment.

MongoDB Logo MongoDB