[ncl-talk] Selecting same date

Mateus da Silva Teixeira mateusstex at gmail.com
Tue Mar 3 11:19:08 MST 2020


Hi Vanucia,

Take a look at the following lines:














*  asciifile = asciiread( "test.txt", -1, "string" )  nlines = dimsizes(
asciifile )  dates = str_get_field( asciifile(1:nlines-1), 1, ";" )
dates_nano = str_get_field( asciifile(1:nlines-1), 2, ";" )  lat =
str_get_field( asciifile(1:nlines-1), 3, ";" )  lon = str_get_field(
asciifile(1:nlines-1), 4, ";" )  pico_ka = str_get_field(
asciifile(1:nlines-1), 5, ";" )  print( dates )  print( dates_nano )
print( lat )  print( lon )  print( pico_ka )*

After reading all data, you can easily save them in an ascii file. Of
course, if you want to make some calculations with these data you should
convert from string to float.

Best regards,
Mateus


Em ter., 3 de mar. de 2020 às 12:01, Vanúcia Schumacher via ncl-talk <
ncl-talk at ucar.edu> escreveu:

> Hi users,
>
> I need help to fix my ncl script,
> what I'm trying to do is select all the same dates from the ascii file
> (test.txt) and save it
> in a new ascii file (refers to each date), but I'm not able to get all the
> values for each date.
>
> I attached the test data and the script
>
> I appreciate any help
>
> Cheers
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200303/3b7eca8b/attachment.html>


More information about the ncl-talk mailing list