[gradsusr] computation over a region not with regular lat/lon

Ashok Priyadarshan Dimri apdimri at yahoo.com
Thu Jul 5 04:22:51 EDT 2012


Hi all,
could anyone tell me how to compute, say, average precipitaion over a region (not with regular lat/lon)?
Thanks in adnvance.
Sincerly
Dimri



________________________________
 From: "gradsusr-request at gradsusr.org" <gradsusr-request at gradsusr.org>
To: gradsusr at gradsusr.org 
Sent: Thursday, July 5, 2012 6:02 AM
Subject: gradsusr Digest, Vol 29, Issue 5
 
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. change color labels of color bar (Joe Pollina)
   2. Re: change color labels of color bar (Jeff Duda)
   3. Re: change color labels of color bar (Goodson,Ron [Edm])
   4. Re: change color labels of color bar (Joe Pollina)
   5.  Linux version (Leandro Sgroi)
   6. read from grib and insert into mysql (claudiomet)
   7. Re: read from grib and insert into mysql (claudiomet)
   8. Grads cannot open MERRA HDF file (You, Yalei)


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

Message: 1
Date: Wed, 04 Jul 2012 13:02:12 -0400
From: Joe Pollina <joseph.pollina at noaa.gov>
Subject: [gradsusr] change color labels of color bar
To: gradsusr at gradsusr.org
Message-ID: <4FF47714.9010501 at noaa.gov>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I have both cbarn.gs and cbarm.gs to plot a color bar.  I am looking for 
a way to change the color of the labels of the color bar.  The label 
color defaults to white.  My problem is that my map background needs to 
be white and the color labels on the color bar blends into the map 
background, and thus are not visible.  Is there a way to change the 
labels of the color bar to black?

Thanks


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

Message: 2
Date: Wed, 4 Jul 2012 12:08:03 -0500
From: Jeff Duda <jeffduda319 at gmail.com>
Subject: Re: [gradsusr] change color labels of color bar
To: GrADS Users Forum <gradsusr at gradsusr.org>
Message-ID:
    <CAAig09AW_-m_dz4pmbzNfPiVqvzf_kRpTus-3=LBA=PBVT52gA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

When changing your background color to white, use the command "set display
color white" then "clear" before displaying your data.  "set background"
only changes the color of color #0, which is referred to as the "background
color".

Jeff Duda

On Wed, Jul 4, 2012 at 12:02 PM, Joe Pollina <joseph.pollina at noaa.gov>wrote:

> I have both cbarn.gs and cbarm.gs to plot a color bar.  I am looking for
> a way to change the color of the labels of the color bar.  The label
> color defaults to white.  My problem is that my map background needs to
> be white and the color labels on the color bar blends into the map
> background, and thus are not visible.  Is there a way to change the
> labels of the color bar to black?
>
> Thanks
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>



-- 
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120704/6f18728c/attachment-0001.html 

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

Message: 3
Date: Wed, 4 Jul 2012 11:21:29 -0600
From: "Goodson,Ron [Edm]" <Ron.Goodson at EC.gc.ca>
Subject: Re: [gradsusr] change color labels of color bar
To: "GrADS Users Forum" <gradsusr at gradsusr.org>
Message-ID:
    <4A6AB38B55B49C44A22E021A83CBEDDB0F94EA89 at sr-pnr-exch3.prairie.int.ec.gc.ca>
    
Content-Type: text/plain;    charset="us-ascii"

Hi

I made a "cbarnw" just for that ...

In cbarn.gs .. just look for the lines

'set string 1 1 5'
and
'set string 1 tc 5'

and change the first 1 to a 0 ...


ron



-----Original Message-----
From: gradsusr-bounces at gradsusr.org
[mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Joe Pollina
Sent: July 4, 2012 11:02 AM
To: gradsusr at gradsusr.org
Subject: [gradsusr] change color labels of color bar

I have both cbarn.gs and cbarm.gs to plot a color bar.  I am looking for
a way to change the color of the labels of the color bar.  The label
color defaults to white.  My problem is that my map background needs to
be white and the color labels on the color bar blends into the map
background, and thus are not visible.  Is there a way to change the
labels of the color bar to black?

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



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

Message: 4
Date: Wed, 04 Jul 2012 13:41:04 -0400
From: Joe Pollina <joseph.pollina at noaa.gov>
Subject: Re: [gradsusr] change color labels of color bar
To: GrADS Users Forum <gradsusr at gradsusr.org>
Message-ID: <4FF48030.7060807 at noaa.gov>
Content-Type: text/plain; charset="iso-8859-1"

Thanks for the help Jeff...it turned by black contours white, but after 
setting the color back to black and displaying the variable again, the 
contours turn back to black.

On 7/4/2012 1:08 PM, Jeff Duda wrote:
> When changing your background color to white, use the command "set 
> display color white" then "clear" before displaying your data.  "set 
> background" only changes the color of color #0, which is referred to 
> as the "background color".
>
> Jeff Duda
>
> On Wed, Jul 4, 2012 at 12:02 PM, Joe Pollina <joseph.pollina at noaa.gov 
> <mailto:joseph.pollina at noaa.gov>> wrote:
>
>     I have both cbarn.gs <http://cbarn.gs> and cbarm.gs
>     <http://cbarm.gs> to plot a color bar.  I am looking for
>     a way to change the color of the labels of the color bar.  The label
>     color defaults to white.  My problem is that my map background
>     needs to
>     be white and the color labels on the color bar blends into the map
>     background, and thus are not visible.  Is there a way to change the
>     labels of the color bar to black?
>
>     Thanks
>     _______________________________________________
>     gradsusr mailing list
>    gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>    http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
>
> -- 
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120704/45b31eab/attachment-0001.html 

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

Message: 5
Date: Wed, 04 Jul 2012 16:15:53 -0300
From: Leandro Sgroi <lsgroi at fich1.unl.edu.ar>
Subject: [gradsusr]  Linux version
To: gradsusr at gradsusr.org
Message-ID: <4FF49669.4000408 at fich1.unl.edu.ar>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi, I'm using ubuntu 12.04 LTS http://www.ubuntu.com/download/desktop 
and this version allows cdo version 1.5.3 and grads version 2.0.a9-4.

-- 
Ing. Leandro Sgroi
Centro de Estudios de Variabilidad y Cambio Clim?tico
Facultad de Ingenier?a y Ciencias H?dricas
Universidad Nacional del Litoral
C.C. 217, Ciudad Universitaria, (3000) Santa Fe - Argentina
Tel: 342-4575-233/234/244 Int.176
lsgroi(at)fich1.unl.edu.ar




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

Message: 6
Date: Wed, 4 Jul 2012 17:10:51 -0300
From: claudiomet <claudiomet at gmail.com>
Subject: [gradsusr] read from grib and insert into mysql
To: GrADS Users Forum <gradsusr at gradsusr.org>
Message-ID:
    <CABWjCh10mBPgLhb9Wx0qEHJ1ryzF_B9V--Nir-Tt_cPQAzmbAQ at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi users !

I'm trying to create a script who reads variables from a point of grib
file and insert the content into a mysql database but I'dont have any
success.
the simplifies script is like this

-------------------------------
'open file.ctl'
'set lon -70
'set lat -30
t = 1
while ( t < 49 )
'q time'; date=subwrd(result,3)
'd t2'; temperature = subwrd(result,4)
'd rh2'; humidity =  subwrd(result,4)
'!mysql --user=user --password=password database -e "INSERT INTO
station (date,temp,hum) VALUES('date','temperature','humidity');"'
t=t+1
endwhile

The main problem in the date, is a string that must be enclosed by
doublequotes in the insert statement, buy when I put doublequotes the
script fails, putting the doublaquotes enclosing the word date like
this:
'!mysql --user=user --password=password database -e "INSERT INTO
station (date,temp,hum) VALUES('"date"','temperature','humidity');"'

the insert fails, nothing is inserted in the database because the
script tries to insert the word date (and without quotes) instead the
value of  the variable date with doublequotes

When I put the doublequotes enclosing 'date' like this:
'!mysql --user=user --password=password database -e "INSERT INTO
station (date,temp,hum) VALUES("'date'",'temperature','humidity');"'
the insert fails and date is empty.

The text is very big and dump into a csv file for apply mysqlimport is
very very slow, I need to avoid the usage of temporal txt files.

?how to put strings (variable) in enclosed by quotes and doublequotes
in a grads script like a mysql intert?

Best regards!



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

Message: 7
Date: Wed, 4 Jul 2012 17:43:20 -0300
From: claudiomet <claudiomet at gmail.com>
Subject: Re: [gradsusr] read from grib and insert into mysql
To: GrADS Users Forum <gradsusr at gradsusr.org>
Message-ID:
    <CABWjCh3yuOYLubD6cdckitxVOJfOKm=Tk-iwmb-hjHXsBFv4rw at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

I answer to myself, problem solved using escape sequences to write the
doublequotes

'!mysql --user=user --password=password database -e "INSERT INTO
station (date,temp,hum) VALUES(\"'date'\",'temperature','humidity');"'

2012/7/4 claudiomet <claudiomet at gmail.com>:
> Hi users !
>
> I'm trying to create a script who reads variables from a point of grib
> file and insert the content into a mysql database but I'dont have any
> success.
> the simplifies script is like this
>
> -------------------------------
> 'open file.ctl'
> 'set lon -70
> 'set lat -30
> t = 1
> while ( t < 49 )
> 'q time'; date=subwrd(result,3)
> 'd t2'; temperature = subwrd(result,4)
> 'd rh2'; humidity =  subwrd(result,4)
> '!mysql --user=user --password=password database -e "INSERT INTO
> station (date,temp,hum) VALUES('date','temperature','humidity');"'
> t=t+1
> endwhile
>
> The main problem in the date, is a string that must be enclosed by
> doublequotes in the insert statement, buy when I put doublequotes the
> script fails, putting the doublaquotes enclosing the word date like
> this:
> '!mysql --user=user --password=password database -e "INSERT INTO
> station (date,temp,hum) VALUES('"date"','temperature','humidity');"'
>
> the insert fails, nothing is inserted in the database because the
> script tries to insert the word date (and without quotes) instead the
> value of  the variable date with doublequotes
>
> When I put the doublequotes enclosing 'date' like this:
> '!mysql --user=user --password=password database -e "INSERT INTO
> station (date,temp,hum) VALUES("'date'",'temperature','humidity');"'
> the insert fails and date is empty.
>
> The text is very big and dump into a csv file for apply mysqlimport is
> very very slow, I need to avoid the usage of temporal txt files.
>
> ?how to put strings (variable) in enclosed by quotes and doublequotes
> in a grads script like a mysql intert?
>
> Best regards!



-- 
Claudio Cortes
Meteorologo, Ingeniero de proyectos
Micomo S.A. Filial Codelco
Unidad de Negocios Ambientales
www.micomo.cl

---
Claudio Cortes
Meteorologist, Project Engineer
Micomo S.A. Codelco Subsidiary
Environmental Business Unit
www.micomo.cl



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

Message: 8
Date: Wed, 4 Jul 2012 21:02:38 +0000
From: "You, Yalei" <yy08 at fsu.edu>
Subject: [gradsusr] Grads cannot open MERRA HDF file
To: "gradsusr at gradsusr.org" <gradsusr at gradsusr.org>
Message-ID:
    <CBA37D5984B52141980D4AF0362B8AA5299EF4 at fsu-exch-nwr04.fsu.edu>
Content-Type: text/plain; charset="iso-8859-1"

Hey all,

I am trying to use GRADS to plot the MERRA data, for example the "surface pressure filed"

My OS is Ubuntu 11.01, and Grads version is: 2.0.a9

After starts Grads under ubuntu, I typed in the fowllowing:
***************************
sdfopen MERRA100.prod.assim.inst3_3d_asm_Cp.19790101.SUB.hdf

Here is the infromation:

Scanning self-describing file:  MERRA100.prod.assim.inst3_3d_asm_Cp.19790101.SUB.hdf
Error: nc_open failed to open file MERRA100.prod.assim.inst3_3d_asm_Cp.19790101.SUB.hdf
Attempt to use feature that was not turned on when netCDF was built.
gadsdf: Couldn't ingest SDF metadata.
******************************

Any advice is highly appreciated. Thanks.

Mike




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120704/d9aadcd5/attachment.html 

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

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


End of gradsusr Digest, Vol 29, Issue 5
***************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120705/8c528fd1/attachment-0003.html 


More information about the gradsusr mailing list