[ncl-install] Output of NCL script

Dennis Shea shea at ucar.edu
Sun Aug 6 08:21:24 MDT 2017


Hello,

Please post only NCL i*nstallation questions* to the ncl-install at ucar.edu
mail list.

Please post all NCL *usage questions* to ncl-talk at ucar.edu
You must subscribe.

----

The following uses 'asciiwrite':
  https://www.ncl.ucar.edu/Document/Functions/Built-in/asciiwrite.shtml

;*********************************
; Write to ASCII
;*********************************
    diro = "./"
    filo = "Setareh_SPI.txt"
    ptho = diro + filo
    system("/bin/rm -f "+ptho)   ; remove any pre-existing file

    text =  sprinti("%0.6i", YYYYMM)     +"  "+sprintf("%8.2f",yrfrac)
+"  "+\
               sprintf("%9.3f", spi_ts(0,:))+"  "+sprintf("%9.3f",
spi_ts(1,:))+"  "+\
               sprintf("%9.3f", spi_ts(2,:))+"  "+sprintf("%9.3f",
spi_ts(3,:))
    ascrrwrite(ptho, text)

----
There are numerous examples of writing text (ascii) files. See:

   https://www.ncl.ucar.edu/Applications/list_io.shtml

----
Also, a very *nice tutorial *for NCL including plotting at:

   https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/

----
Many more usage examples at:


*https://www.ncl.ucar.edu/Applications/
<https://www.ncl.ucar.edu/Applications/>*
See XY plots

Good luck

On Sat, Aug 5, 2017 at 1:09 PM, Setareh Rahimi <setareh.rahimi at gmail.com>
wrote:

> Dear All,
>
> I have a script which gives me a plot of SPI( drought index), but I do not
> need to have a plot of results in Ncl, I just need an output, so I can plot
> it in Excel. Please help me how can I do so. Please have a look at the
> attached file which is the script of the SPI.
>
> Look forward to hearing from you,
>
> --
> S.Rahimi
>
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20170806/1f4e9a9e/attachment.html 


More information about the ncl-install mailing list