[ncl-talk] Reading and plotting ASCII data (TRMM 3G68)

Dennis Shea shea at ucar.edu
Wed Mar 25 08:40:24 MDT 2020


In any language: NCL, GrADS, Python, Matlab .... there are
text/ascii/string handling functions.
I think you would learn a lot by trying to read the text file with code you
have written in your favorite language.
The 3G68 text file is not 'regular' as noted in the documentation.. The
different line types are intermingled.
This makes it a nuisance to read correctly. You have to determine an input
strategy:
         Read documentation (carefully) ...Think ... Code
i)   There are header lines. Is there information that needs to be read?
ii)   How to determine what line 'Type' ? The differing line lengths make
reading a nuisance.
iii)  You have to devise a book keeping strategy. It ia all about detail.
---
Type A. (Case when there is no PR pixel in cell)
0 5 106 59 24 24 0.87 0 0

...
Type B.  (Case when a line has both TMI and PR data)
 10 109 109 48 0 0 0 133 32 0.39 34 133 32 0.35 28
...
Type C. (Case when a line has no TMI but has PR). *-9* is missing.
2 0 157 196 0 0 *-9 -9* 33 3 0.04 0 33 3 0.03 0
========================================================================

Attached is something that works (I think).

It generates some plots.

%> ncl 3G68.ncl


On Mon, Mar 23, 2020 at 9:18 AM Lyndz via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Dear NCL-expert,
>
> I am reading an ascii file, which I uploaded here:
>
> https://www.dropbox.com/s/47t7ue9j1rx08x7/3G68.20090113.7.txt?dl=0
>
> http://apdrc.soest.hawaii.edu/doc/README.3G68
>
> http://apdrc.soest.hawaii.edu/dods/public_data/satellite_product/TRMM/TRMM_PR/3G68_hourly
>
> [Problem]
> I am confused as to how to convert the row and column into a lat on
> coordinates after reading the file.
> I just want to read and plot the PR_mean variable.
>
> Anyone here who has processed this file before?
> I'll appreciate any help on this matter.
>
> Sincerely,
> Lyndz
>
> _______________________________________________
> 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/20200325/3820e351/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3G68_20090113_12Z.png
Type: image/png
Size: 68418 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200325/3820e351/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3G68_20090113_PR24.png
Type: image/png
Size: 139643 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200325/3820e351/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3G68.ncl
Type: application/octet-stream
Size: 5733 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200325/3820e351/attachment.obj>


More information about the ncl-talk mailing list