kombo kai kaikombo at yahoo.com
Wed Jun 25 12:04:27 EDT 2014

Re calculating the vertical integrated moisture using the summation formula and  cdiff function

I am again having the problem of VIMC.
this time I calculated it as a summation of divergence  between two levels
as follows
my file s were slp.2006.nc
uwnd.2006.nc
vwnd.2006.nc
shu,.2006.nc
'set x 1 144'
'set y 1 73'
'set t 1'
'set z 1000 850'
*'set z2=850'
g=9.8
'define m=3.1416/180'
'define d(uwnd.3)=cdiff(vwnd.4,x)'
'define dx=cdiff(lon,x)*m'
'define d(vwnd.4)=cdiff(uwnd.3*cos(lat*m),y)'
'define dy=cdiff(lat,y)*m'
'define qu=shum.2*uwnd.3'
'define qv=shum.2*vwnd.4'
'define po=pres(z=1)'
'define p=pres(z=3)'
'define dp=p-p0'
'define  VIMFC=-(1/g)*sum((dqv/dx+dqu/dy)/(6.37e6*cos(lat*m))(z=1000)+(dqv/dx+dqu/dy)/(6.37e6*cos(lat*m))(z=850))*dp
'set sdfwrite VIMF_1085.nc'
sdfwrite VIMF
The message error which I am getting is that there is no enough allocated memory for doing this calculation
Please   I real nee some or one  to go through the script and tell me what is the problem and how to correct
regards
kaikombo

Send gradsusr mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

than "Re: Contents of gradsusr digest..."

Today's Topics:

1. Re: gradsusr Digest, Vol 52, Issue 83 (kombo kai)

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

Message: 1
Date: Wed, 25 Jun 2014 07:09:15 -0700
From: kombo kai <kaikombo at yahoo.com>
Message-ID:
<1403705355.69461.YahooMailNeo at web121003.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Regarding? calculating the vertical integrated moisture flux
I am running the script to calculate the moisture flux for the levels from surface to 850,500,700, and 300
I have used the vint and the -hdvg(qu,qv) but I am getting the error messges
Here are the file
sdfopen slp.2006.nc
sdfopen shum.2006.nc
sdfopen uwnd.2006.nc
sdfopen vwnd.2006.nc
Now I set the dimensions of the data as follows\
set x 1 144
set y 1 73
set t 1 365
set z 1
define? a=shum.2*uwnd.3
define b=shum.2*vwnd.4
difine qu=vint(press(z=1),a,850)
define qv=vint(pres(z=1),b,850)
Then I define the vertical integrated moisture as follow
VIMF=divergence of qu and qv
??????????=hdivg(qu,qv)
Here I get the following error
two few levels and othe more

then I tried using the slp to be the surface pressure I end with almost the same errors
I there any one to help to fix this
regards
kaikombo

? -

?

Send gradsusr mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

than "Re: Contents of gradsusr digest..."

Today's Topics:

?  1. Re: gradsusr Digest, Vol 52, Issue 77 (kombo kai)

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

Message: 1
Date: Wed, 25 Jun 2014 03:14:49 -0700
From: kombo kai <kaikombo at yahoo.com>
Message-ID:
??? <1403691289.4643.YahooMailNeo at web121005.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

I have got four files and I want to calculate the
(1) vertical integrated moisture flux
(2) the divergence of the? vertical integrated moisture flux
the .nc file are? pres.sfc.2006.nc, shum.2006.nc (1000-300mb),uwnd.2006.nc (1000-50mb) and vwnd.2006.nc (1000-50mb)

I used the following algorithm to calculate the moisture flux
'set x 1 144'
'set y 1 73'
'set t 1 365'
'set lev 1'
'define qu=vint(pres,shum.2*uwnd.3,300)'
'define qv=vint((pres,shum.2*vwnd.4,300)'
'define vi=-hdivg(qu,qv)'
when I ran these command in the grads HDF I got the following error
error invalid expression 'define qu=vint(pres,shum.2*uwnd.3,300)
Error from UNIT? too few levels in default file
operation error? =>error? from vint function error occurred at column 1

Then I changed the file for surface pressure and used the slp.2006.nc but the same case happen again
cheers
kaikombo

?

Send gradsusr mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

than "Re: Contents of gradsusr digest..."

Today's Topics:

?? 1. Re: Use of ^ Character in Descriptor File (Frank Colby)
?? 2. symbol lookup error (Claudia Wanzeler)
?? 3. Re: symbol lookup error (Jennifer Adams)
?? 4. Re: Help on Areal average using Grads (Anil Kumar)

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

Message: 1
Date: Mon, 23 Jun 2014 08:22:57 -0400
From: Frank Colby <Frank_Colby at uml.edu>
Subject: Re: [gradsusr] Use of ^ Character in Descriptor File
Message-ID: <53A81C21.7010604 at uml.edu>
Content-Type: text/plain; charset="iso-8859-1"

I just looked at my ctl files (windows 7) and they all use the ^ to
default to the current directory.? I have to run grads from that
directory to make this work.? I use a command window, cd to the
directory and then run grads from the command line.

Frank Colby
UMass Lowell

On 6/22/2014 10:20 AM, Arlindo da Silva wrote:
> Sephen,
>
>? ? In the past "^" expansion worked on windows, but since I am not a
> windows user I have to rely on users to report such problems.? In
> fact, the model.ctl that I use for tests has "^" in it and all windows
> builds passes 100% of the tests.
>
>? ? Can you send me the full name of the directory where the data
> resides? I want to make sure there is no glitch with the handling of
> specific directory names when expanding "^". Please send me the 2
> versions of the ctl file: one with the "^" and the other with full
> pathname and I will take a look.
>
>? ? Arlindo
>
>
>
> On Fri, Jun 20, 2014 at 9:23 AM, Stephen McMillan
> <smcmillan at planalytics.com <mailto:smcmillan at planalytics.com>> wrote:
>
>? ?? This question is for those familiar with MS Windows...
>
>? ?? The GrADS documentation states that "If a ^ character is placed in
>? ?? front of /data_filename/, then /data_filename/ is assumed to be
>? ?? relative to the path of the descriptor file. If you are using the
>? ?? ^ character in the DSET entry, then the descriptor file and the
>? ?? data file may be moved to a new directory without changing any
>? ?? entries in the data descriptor file, provided their relative paths
>? ?? remain the same."
>
>? ?? However, I have not been able to get this to work.? My descriptor
>? ?? (.ctl) and data file (.bin) have exactly the same names, apart
>? ?? from the extensions, and reside in the same folder.? Here's the
>? ?? applicable "dset" line in my descriptor file:
>? ?? dset ^tfit.air-nino+soi+amo.lt12.jan51-02.bin
>
>? ?? If I include the full pathname in dset, it works fine.? However, I
>? ?? want to be able to move the files to a new folder without having
>? ?? to edit the dset entry.? Is there an equivalent for Windows?
>
>? ?? I'm using GrADS version 2.0.1.oga.1 on a Windows 7 pc.
>
>? ?? Stephen McMillan
>
>? ?? ***************************************************
>? ?? 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.
>? ?? ***************************************************
>
>
>? ?? _______________________________________________
>
>
>
>
> --
> Arlindo da Silva
> /dasilva at alum.mit.edu <mailto:dasilva at alum.mit.edu>/
>
>
> _______________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 2
Date: Mon, 23 Jun 2014 10:37:42 -0300
From: Claudia Wanzeler <claudia.wanzeler at gmail.com>
Message-ID:
??? <CAN=Q7vnov468bzbMjpqXLqZcOVcUSP3e7UCeQ=_ZdKQ_L_OCPw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I installed the Grads version 2.0.1 on my computer grads. However, when I
ran my script, I am using the NCEP/NCAR Reanalysis data, appeared on the
screen the following error message (in red):

Config: v2.0.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5
opendap-grids,stn geotiff shapefile
Issue 'q config' command for more detailed configuration information
Landscape mode? ('n' for portrait):
GX Package Initialization: Size = 11 8.5
ga-> run teste_script.gs
No hardcopy metafile open
All files closed; all defined objects released;
All GrADS attributes have been reinitialized
1950 365 1

Could anyone help me on this?

Best wishes

--
Claudia? da Costa
INPA/UEA
Manaus, Brazil
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 3
Date: Mon, 23 Jun 2014 09:47:11 -0400
From: Jennifer Adams <jma at cola.iges.org>
Subject: Re: [gradsusr] symbol lookup error
Message-ID: <D37713B1-93D6-4F8A-A146-D286ECD6E99F at cola.iges.org>
Content-Type: text/plain; charset="us-ascii"

What is the output from 'q config'? What operating system are you running on? Can you also provide the output from 'ncdump -hs' on your data file?
--Jennifer

On Jun 23, 2014, at 9:37 AM, Claudia Wanzeler wrote:

>
> I installed the Grads version 2.0.1 on my computer grads. However, when I ran my script, I am using the NCEP/NCAR Reanalysis data, appeared on the screen the following error message (in red):
>
> Config: v2.0.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile
> Issue 'q config' command for more detailed configuration information
> Landscape mode? ('n' for portrait):?
> GX Package Initialization: Size = 11 8.5
> ga-> run teste_script.gs
> No hardcopy metafile open
> All files closed; all defined objects released;
> All GrADS attributes have been reinitialized
> 1950 365 1
>
>
> Could anyone help me on this?
>
> Best wishes
>
>
> --
> Claudia? da Costa
> INPA/UEA
> Manaus, Brazil
>
>
> _______________________________________________

--
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030

-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 4
Date: Mon, 23 Jun 2014 20:02:43 +0530
From: "Anil Kumar" <anilku at oceanmanager.com>
Message-ID: <013f01cf8ef0\$014c8140\$03e583c0\$@oceanmanager.com>
Content-Type: text/plain; charset="utf-8"

Dear Jennifer,

Referencing your below reply, Am trying to use amax() with linear interpolation to the same problem (need area maximum now) But am not getting the maximum values in destination grid. I have gone throu? the documentation http://www.iges.org/grads/gadoc/gradfunclterp.htmlbutamnot getting any clue that we can use amax() function with the ltrep. But when I use it not getting the maximum value?s plot in grads. Below is the command used and CTL file.

reinit

sdfopen D:/WeatherGribFiles/2014/06/11/rtofs_glo_2ds_f024_daily_prog.nc

open D:/WeatherGribFiles/2014/06/11/rtofs_glo_2ds_f024_daily_prog2.ctl

set parea 0 11 0 8.5

set vpage 0 11 0 8.5

set lon -74.16 434

set lat -90 90

set cthick 6

set arrscl 0.10

d lterp(u_velocity.1*1.95,lat.2,amax);lterp(v_velocity.1*1.95,lat.2,amax)

CTL file :

dset D:\WeatherGribFiles\2014\06\22\rtofs_glo_2ds_f024_daily_prog.nc

index? D:\WeatherGribFiles\2014\06\22\rtofs_glo_2ds_f024_daily_prog_DUMMY.nc

title 2D Sfc Daily Prognostic 00Z22jun2014: Forecast, downloaded Jun 22 15:20 UTC

undef 1.26765e+30

dtype netcdf

xdef 180 linear 74.16 2.0?

ydef 67 linear -90 3.0?

zdef 1 linear 1 1

tdef 1 linear 00Z23JUN2014 1mn

options template

vars 2

u_velocity=>u_velocity? 1? t,z,y,x? eastward_sea_water_velocity (m/s)?

v_velocity=>v_velocity? 1? t,z,y,x? northward_sea_water_velocity (m/s)?

endvars

As I change the X def, ydef entries for the dummy destination grid size, value changes but I expect it to be max every time. Please lead me.

Thanks & Regards

Anil Kumar

OceanManager Inc.

Sent: Thursday, May 01, 2014 9:09 PM

Hi, Anil --

You need to create a new descriptor file that describes a grid you would like to be your 'destination grid'; presumably it would have grid points that correspond to every 8th grid point in your original grid. It can be a dummy descriptor -- use 'dset ^foo.dat' and 'options template' so GrADS won't care if foo.dat doesn't exist. Open both descriptors, then use lterp to regrid using the aave method:

?? 'd lterp(u.1,lat.2,aave); lterp(v.1,lat.2,aave)'

--Jennifer

On May 1, 2014, at 9:58 AM, Anil Kumar wrote:

I have NetCDF file having Ocean Current Data (attached for reference). Am using below command to display u_velocity and v_velocity and generating vector plot using SKIP() function from Grads.

reinit

sdfopen D:/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 74 434

set lat -70 70

set mproj latlon

set display color white

set datawarn 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

d skip(u_velocity*1.95,8,8);skip(v_velocity*1.95,8,8)

printim D:\output.png x1061 y587 -t 0

output is attached and unfortunately this is not what i need exactly. It is just plotting every 8th point. I want to plot areal average of every 8 points and want exactly the same plot.

<image001.png>
?

NetCDF file has 4320 LON points? and 2160? LAT points. The ?display? command is powerful enough to iterate along the longitude and latitude. But aave() <http://www.iges.org/grads/gadoc/gradfuncaave.html>? function needs fixed X and Y dimensions, no STRIDE option for X and Y.

How can I achieve this using Grads??? Ultimately I need global vector output.

-Anil Kumar

<rtofs_glo_2ds_f024_daily_prog.nc><output.png>_______________________________________________

--

Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030

-------------- next part --------------
An HTML attachment was scrubbed...

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

_______________________________________________

End of gradsusr Digest, Vol 52, Issue 77
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...

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

_______________________________________________

End of gradsusr Digest, Vol 52, Issue 83
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...

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

_______________________________________________