[gradsusr] Plot data text in a grid instead of random

Jeff Chabot jsc219 at gmail.com
Wed Dec 8 16:59:19 EST 2021


The data that I am using is from NOMADS:
https://nomads.ncep.noaa.gov/dods/gfs_0p25/gfs20211208/gfs_0p25_12z.info

Sure enough, it has this variable:

*landsfc*
** surface land cover (0=sea, 1=land) [proportion]
So, I am close.  I defined landseamask variable like so:

'define landseamask = landsfc'

Then used it here:

'set gxout grid'
'set gridln off'
'set ccolor 254'
'set digsiz 0.1'
'display maskout(skip(t2m,12,12),landseamask-1)'

I would think that would maskout any area that is negative (as sea is 0).
But, it is not masking anything out.  I must be close here.

Thanks again!


On Wed, Dec 8, 2021 at 7:26 AM Jeff Chabot <jsc219 at gmail.com> wrote:

> I am using set mpdset hires.  That maskout line 'd
> maskout(t2m,landseamask)' looks like the best option, but is there any easy
> way to define landseamask?  I have been using basemap.gs because it was a
> prebuilt script to mask out the oceans.
>
> Jeff C
>
> On Tue, Dec 7, 2021 at 11:42 PM Jeff Duda <jeffduda319 at gmail.com> wrote:
>
>> I agree with setting up a mask using maskout or 'if' (depending on grads
>> version). The trick is how to define your land-sea mask. But once you have
>> decided what you want to use, it should be as simple as the display command
>> Davide suggested, i.e.,
>>
>> 'set gxout grid'
>> 'd maskout(t2m,landseamask)'
>>
>> I don't know what basemap.gs does, but the built-in geopolitical
>> boundaries look pretty good at that scale. You're using 'set mpdset hires'
>> right?
>>
>> Jeff Duda
>>
>> On Tue, Dec 7, 2021 at 8:51 PM Jeff Chabot <jsc219 at gmail.com> wrote:
>>
>>> Running basemap.gs before means I have grid plots over the entire ocean
>>> as seen here:
>>>
>>> https://jeffsweatherservice.com/grads/temp_US_2_before.png
>>>
>>> I prefer the look running basemap.gs after, I'm just trying to fix the
>>> cutoff plots by the oceans, for example near San Francisco and southern
>>> Louisiana as seen here:
>>>
>>> https://jeffsweatherservice.com/grads/temp_US_2_after.png
>>>
>>> Basically, I am trying to prevent the text cutoff without showing the
>>> entire grid over the ocean.  Maybe it's not possible in GrADS.
>>>
>>> As for the other issue, I'll just use set gxout contour without labels.
>>>
>>> Thanks again!  I was able to use your maskout example nicely with precip
>>> accum, btw!
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Dec 6, 2021 at 9:58 AM Davide Sacchetti <
>>> davide.sacchetti at arpal.liguria.it> wrote:
>>>
>>>> about second question: run basemap.gs before t2m (or display t2m again
>>>> after basemap)
>>>>
>>>> about first question use maskout, eg.:
>>>> d maskout(t2m,t2m-32) displays only t2m>32
>>>> d maskout(t2m,33-t2m) displays only t2m<33
>>>> you can combine both:
>>>> d maskout(maskout(t2m,33-t2m),t2m-32)
>>>> (I haven't tried this command ... but the idea could be this)
>>>>
>>>> Davide
>>>>
>>>> *Dott. Davide Sacchetti*
>>>>
>>>>
>>>>
>>>>
>>>> *Dipartimento Stato dell’Ambiente e Tutela dai Rischi NaturaliU.O.
>>>> Clima Meteo IdroViale Brigate Partigiane 2, 16129 Genova (I)tel: +39
>>>> 0106437535mail: davide.sacchetti at arpal.liguria.it
>>>> <mauro.damonte at arpal.liguria.it>
>>>> web: https://www.arpal.liguria.it/homepage/meteo.html
>>>> <http://www.meteoliguria.it/>*
>>>>
>>>>
>>>> * Da: * Jeff Chabot <jsc219 at gmail.com>
>>>> * A: * GrADS Users Forum <gradsusr at gradsusr.org>
>>>> * Inviato: * 06/12/2021 15:33
>>>> * Oggetto: * Re: [gradsusr] Plot data text in a grid instead of random
>>>>
>>>> Duh!  That was a dumb question on my part, and I apologize.  I have set
>>>> ccolor working.  Two more better questions however.
>>>>
>>>> Is there any way to do a set gxout grid at just 32 degrees F?
>>>>
>>>> I tried the following with set gxout grid:
>>>> 'set gxout grid'
>>>> 'set gridln off'
>>>> 'set cint 1'
>>>> 'set cmin 32'
>>>> 'set cmax 32'
>>>> 'set ccolor 4'
>>>> 'set digsiz 0.1'
>>>> 'display skip(t2m,12,12)'
>>>>
>>>> *where t2m = ((tmp2m - 273.15) * 9 / 5) + 32
>>>>
>>>> The result is the full grid.
>>>>
>>>> My other question is probably much more complicated.  I am using
>>>> basemap.gs
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fbasemap.gs&e=7312d17f&h=398c37dd&f=y&p=n>
>>>> to mask out the oceans.  It is cropping the grid numbers by the oceans as
>>>> seen here: http://jeffsweatherservice.com/grads/temp_US_2.png
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fjeffsweatherservice.com%2Fgrads%2Ftemp_US_2.png&e=7312d17f&h=78ddcde1&f=y&p=n>
>>>> north of San Francisco and in southern Louisiana.  Is there a workaround
>>>> for that issue?
>>>>
>>>> 'run 'basemap.gs
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fbasemap.gs&e=7312d17f&h=398c37dd&f=y&p=n>
>>>> o 202 1 H' (run after the lines above).
>>>>
>>>> Thanks again!
>>>>
>>>> Jeff C
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Dec 6, 2021 at 4:50 AM Davide Sacchetti <
>>>> davide.sacchetti at arpal.liguria.it> wrote:
>>>>
>>>> great!
>>>> set ccolor color_number
>>>> bye bye
>>>> Davide
>>>>
>>>> *Dott. Davide Sacchetti*
>>>>
>>>>
>>>>
>>>>
>>>> *Dipartimento Stato dell’Ambiente e Tutela dai Rischi NaturaliU.O.
>>>> Clima Meteo IdroViale Brigate Partigiane 2, 16129 Genova (I)tel: +39
>>>> 0106437535mail: davide.sacchetti at arpal.liguria.it
>>>> <mauro.damonte at arpal.liguria.it>
>>>> web: https://www.arpal.liguria.it/homepage/meteo.html
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fwww.meteoliguria.it%2F&e=7312d17f&h=8b11d4a6&f=y&p=n>*
>>>>
>>>>
>>>> * Da: * Jeff Chabot <jsc219 at gmail.com>
>>>> * A: * GrADS Users Forum <gradsusr at gradsusr.org>
>>>> * Inviato: * 06/12/2021 6:52
>>>> * Oggetto: * Re: [gradsusr] Plot data text in a grid instead of random
>>>>
>>>> The following worked very well:
>>>>
>>>> 'set gxout grid'
>>>> 'set gridln off'
>>>> 'display skip(t2m,10,10)'
>>>>
>>>> Thanks guys!
>>>>
>>>> Can you control the color of those numbers?  I can only get them in
>>>> white.
>>>>
>>>> Sincerely,
>>>>
>>>> Jeff C
>>>>
>>>> On Thu, Dec 2, 2021 at 12:23 PM Jeff Duda <jeffduda319 at gmail.com>
>>>> wrote:
>>>>
>>>> You can also use a loop with 'draw string' to achieve this.
>>>>
>>>> Jeff Duda
>>>>
>>>> On Thu, Dec 2, 2021 at 9:28 AM Stephen McMillan <
>>>> smcmillan at planalytics.com> wrote:
>>>>
>>>> In addition to Davide's suggestion, you can use:
>>>>
>>>> 'set gridln off' to hide the grid lines
>>>>
>>>> Use "skip" function to skip plotting every other, every third, etc.
>>>> grid value
>>>>
>>>> Stephen Mc
>>>>
>>>>
>>>> On Thu, Dec 2, 2021 at 10:17 AM Jeff Chabot <jsc219 at gmail.com> wrote:
>>>>
>>>> Hi GrADS Users,
>>>>
>>>> Does anyone know if it is possible to plot data text in a grid pattern
>>>> instead of random plots in GrADS?
>>>>
>>>> For example, this is the grid pattern that I would like to use:
>>>>
>>>>
>>>> https://www.tropicaltidbits.com/analysis/models/gfs/2021120206/gfs_T2m_neus_1.png
>>>> <https://urlsand.esvalabs.com/?u=https%3A%2F%2Fwww.tropicaltidbits.com%2Fanalysis%2Fmodels%2Fgfs%2F2021120206%2Fgfs_T2m_neus_1.png&e=7312d17f&h=27bc95a0&f=y&p=n>
>>>>
>>>> Instead, I am currently showing numbers randomly attached to a contour
>>>> line:
>>>>
>>>> https://jeffsweatherservice.com/grads/hrrr/temp_NE_1.png
>>>> <https://urlsand.esvalabs.com/?u=https%3A%2F%2Fjeffsweatherservice.com%2Fgrads%2Fhrrr%2Ftemp_NE_1.png&e=7312d17f&h=f81a2820&f=y&p=n>
>>>>
>>>> Thanks,
>>>>
>>>> Jeff C
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n>
>>>>
>>>>
>>>> ***************************************************
>>>>
>>>> The information contained in this e-mail message
>>>>
>>>> is intended only for the use of the recipient(s)
>>>>
>>>> named above and may contain information that is
>>>>
>>>> privileged, confidential, and/or proprietary.
>>>>
>>>> If you are not the intended recipient, you may not
>>>>
>>>> review, copy or distribute this message. If you have
>>>>
>>>> received this communication in error, please notify
>>>>
>>>> the sender immediately by e-mail, and delete the original message.
>>>>
>>>> ***************************************************
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n>
>>>>
>>>>
>>>>
>>>> --
>>>> Jeff Duda, Research Scientist
>>>> University of Colorado Boulder
>>>> Cooperative Institute for Research in Environmental Sciences
>>>> NOAA/OAR/ESRL/Global Systems Laboratory
>>>> Boulder, CO
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>>
>>>> https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>> <https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>>
>>>> https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>
>>
>> --
>> Jeff Duda, Research Scientist
>> University of Colorado Boulder
>> Cooperative Institute for Research in Environmental Sciences
>> NOAA/OAR/ESRL/Global Systems Laboratory
>> Boulder, CO
>> _______________________________________________
>> 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/20211208/68138abb/attachment-0001.html>


More information about the gradsusr mailing list