[gradsusr] gradsusr Digest, Vol 113, Issue 24

E Mobarak mobarak_e at yahoo.com
Tue Jul 30 00:54:11 EDT 2019


 Re: Re: read data (Martin V. Mathew)
Thanks for your help
It was very effective and helpful

    On Saturday, July 27, 2019, 8:33:14 PM GMT+4:30, gradsusr-request at gradsusr.org <gradsusr-request at gradsusr.org> wrote:  
 
 Send gradsusr mailing list submissions to
    gradsusr at gradsusr.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://gradsusr.org/mailman/listinfo/gradsusr
or, via email, send a message with subject or body 'help' to
    gradsusr-request at gradsusr.org

You can reach the person managing the list at
    gradsusr-owner at gradsusr.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gradsusr digest..."


Today's Topics:

  1. Re: read data (Martin V. Mathew)


----------------------------------------------------------------------

Message: 1
Date: Fri, 26 Jul 2019 17:38:58 +0530
From: "Martin V. Mathew" <vmartinmathew at gmail.com>
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: Re: [gradsusr] read data
Message-ID:
    <CAEqFDk7FnFinB363Voca7njm-A1sLCjpak06J8QCu35o1mb3hQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

Try this way

*--------------------------------
InFile='data.txt';

* skipping the first line of the data file
res=read(InFile)

res=read(InFile)
returnCd=subwrd(res,1);

while (returnCd!=2) ;* Checking for end of file
latpt=subwrd(res,2);* say 'lat='latpt
lonpt=subwrd(res,3);* say 'lon='lonpt

* Reading next line
res=read(InFile)
returnCd=subwrd(res,1);* say 'rc='returnCd
endwhile ;* while (returnCd!=2)
*--------------------------------

On Thu, 25 Jul 2019 at 15:35, E Mobarak <mobarak_e at yahoo.com> wrote:

> Hi usr
> how write scripts for read  data from text file with some row and column
> for example
>
> data.txt  including
> lat    lon  name
> 31    45  AA
> 38    40  BB
>  25    50  CC
> thnaks
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>


-- 
Dr. Martin V. Mathew
Project Scientist -2
Ocean Observation Systems
National Institute of Ocean Technology
Pallikaranai, Chennai,
India.
https://www.researchgate.net/profile/Martin_Mathew
https://scholar.google.co.in/citations?user=02RvXg4AAAAJ&hl=en
http://www.dak.iitkgp.ernet.in/phd/profile.php?roll=09CL9405
https://www.scopus.com/authid/detail.uri?authorId=57190953029
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190726/341adb47/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr


------------------------------

End of gradsusr Digest, Vol 113, Issue 24
*****************************************
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190730/b436d4aa/attachment.html>


More information about the gradsusr mailing list