[gradsusr] To Plot Ocean Current streams

Anil Kumar Sharma aanil649 at gmail.com
Fri Apr 25 08:53:11 EDT 2014


Hi Eric,

Your inputs are valid. Thanks for your help.

On another case, with the same data set I am using the below command to
display the u_velocity and v_velocity vars  as vector this time:

*reinit*
*sdfopen rtofs_glo_2ds_f024_daily_prog.nc
<http://rtofs_glo_2ds_f024_daily_prog.nc>*
*set vpage 0 11 0 8.5*
*set parea 0 11 0 8.5*
*set lon 199.0503 291.3354*
*set lat -24.15176601231298 25.77516058680343*
*set mproj scaled*
*set mproj off*
*set display color white*
*set datawarn off*
*set grads off*
*set timelab off*
*set xlab off*
*set ylab off*
*set frame off*
*set t 1*
*set cint 40*
*set display color white*
*set background 0 *
*set gxout vector*
*set cthick 6*
*set ccolor 1*
*set arrscl 0.11 *

*d skip(u_velocity*1.95,3,6);skip(v_velocity*1.95,3,6)*

And the output is as per expectation and is attached.

In display command, Am using skip factor to clearly visualize the arrow
display otherwise it goes sluggish. What I need is to display the clear
output but the value must be average of the other skipped value. So that
user can choose the area, where intensity is high from full plot (withgout
going down to greater zoom on plots).

I point am explaining is, I guess, areal average but how can i achieve in
my requirement.


--Anil




On Fri, Apr 4, 2014 at 12:38 AM, Eric Altshuler <ela at cola.iges.org> wrote:

> Hello Anil,
>
> You need to do 'set gxout stream' before displaying the variables. By
> default, the gxout type for displaying two variables ('display U;V') is
> 'vector', so you'll get a vector plot unless you tell grads you want
> something different. To control streamline appearance, use 'set strmden …'
> The plot you attached was probably made by manually drawing the currents,
> and grads can't do this automatically.
>
> Best regards,
>
> Eric L. Altshuler
> Research Scientist
> Center for Ocean-Land-Atmosphere Studies
> 253 Research Hall, Mail Stop 6C5
> George Mason University
> 4400 University Drive
> Fairfax, VA 22030 USA
>
> E-mail: ela at cola.iges.org
> Phone: (703) 993-5725
> Fax: (703) 993-5770
>
>
> ------------------------------
> *From: *"Anil Kumar Sharma" <aanil649 at gmail.com>
> *To: *"GrADS Users Forum" <gradsusr at gradsusr.org>
> *Sent: *Thursday, April 3, 2014 3:13:38 AM
> *Subject: *[gradsusr] To Plot Ocean Current streams
>
>
> Hi Everyone,
>
> I have NetCDF data downloaded for Ocean Current from NOAA website and is
> attached for reference. Below is the NCDump
>
> *netcdf rtofs_glo_2ds_f024_daily_prog {*
> *dimensions:*
> *        lat = 360 ;*
> *        lev = 1 ;*
> *        lon = 720 ;*
> *        time = 1 ;*
> *variables:*
> *        double lat(lat) ;*
> *                lat:grads_dim = "y" ;*
> *                lat:grads_mapping = "linear" ;*
> *                lat:grads_size = "2160" ;*
> *                lat:units = "degrees_north" ;*
> *                lat:long_name = "latitude" ;*
> *                lat:minimum = -90. ;*
> *                lat:maximum = 89.90947 ;*
> *                lat:resolution = 0.08333f ;*
> *        double lev(lev) ;*
> *                lev:grads_dim = "z" ;*
> *                lev:grads_mapping = "levels" ;*
> *                lev:units = "millibar" ;*
> *                lev:long_name = "altitude" ;*
> *                lev:minimum = 1. ;*
> *                lev:maximum = 1. ;*
> *        double lon(lon) ;*
> *                lon:grads_dim = "x" ;*
> *                lon:grads_mapping = "linear" ;*
> *                lon:grads_size = "4320" ;*
> *                lon:units = "degrees_east" ;*
> *                lon:long_name = "longitude" ;*
> *                lon:minimum = 74.16 ;*
> *                lon:maximum = 434.06227 ;*
> *                lon:resolution = 0.08333f ;*
> *        double time(time) ;*
> *                time:grads_dim = "t" ;*
> *                time:grads_mapping = "linear" ;*
> *                time:grads_size = "9" ;*
> *                time:grads_min = "00z13mar2014" ;*
> *                time:grads_step = "1dy" ;*
> *                time:units = "days since 1-1-1 00:00:0.0" ;*
> *                time:long_name = "time" ;*
> *                time:minimum = "00z13mar2014" ;*
> *                time:maximum = "00z21mar2014" ;*
> *                time:resolution = 1.f ;*
> *        float u_velocity(time, lev, lat, lon) ;*
> *                u_velocity:_FillValue = 1.26765e+030f ;*
> *                u_velocity:missing_value = 1.26765e+030f ;*
> *                u_velocity:long_name = "eastward_sea_water_velocity (m/s)
> " ;*
> *        float v_velocity(time, lev, lat, lon) ;*
> *                v_velocity:_FillValue = 1.26765e+030f ;*
> *                v_velocity:missing_value = 1.26765e+030f ;*
> *                v_velocity:long_name = "northward_sea_water_velocity
> (m/s) " ;*
>
> *// global attributes:*
> *                :title = "2D Sfc Daily Prognostic 00Z13mar2014: Forecast,
> downlo*
> *aded Mar 13 15:18 UTC" ;*
> *                :Conventions = "COARDS\n",*
>  *                        "GrADS" ;*
> *                :dataType = "Grid" ;*
> *                :history =  "Thu Mar 13 11:21:41 EDT 2014 : imported by
> GrADS Data Server 2.0" ;*
> *                :NCO = "20140314" ;*
> *}*
>
>
> I need to Plot the current Streams as output, Attached image can be
> treated as output sample.
> currently, I am using below command for displaying u_velocity and
> v_velocity variables
>
> *d skip(u_velocity*1.95,14,14);skip(v_velocity*1.95,14,14)*
>
> with skip function I am only able to plot arrow but no stream (we can say
> axis of current)
>
> I really don't know how to get this working. Any help on it please
>
> -- Anil
>
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140425/f3135484/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3_{ba81658c-0987-4f67-8769-8bfd24b032bf}.png
Type: image/png
Size: 10276 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20140425/f3135484/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtofs_glo_2ds_f024_daily_prog.nc
Type: application/x-netcdf
Size: 2084340 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20140425/f3135484/attachment-0001.nc 


More information about the gradsusr mailing list