[gradsusr] Extract time series from gridded data

Jennifer M Adams jadams21 at gmu.edu
Tue Jun 28 12:47:14 EDT 2016


Hi, Lydia —
Have a look at the tloop function http://cola.gmu.edu/grads/gadoc/gradfunctloop.html.
—Jennifer

On Jun 28, 2016, at 10:58 AM, Lydia Rill <lydia.d.rill at gmail.com<mailto:lydia.d.rill at gmail.com>> wrote:

Hi all,

I am new to using GrADS. Currently I have a script that uses the function gr2stn to pull the nearest grid point from the latitude and longitude I specify from the gridded data in a large binary file.
Because I want a time series, I have t set to vary, while x and y are set to 1.
I grab the values from the result using sublin and subwrd. I do this for each of the 4 variables that I want separately, and I have this set in a loop to get data for every day over multiple years.

This script works, but it is very slow as grabbing the daily data for 35 years takes almost a half hour!

Is there a more efficient way to pull a time series of a point from gridded data in a binary file?

Other information:
The gridded data is NLDAS2 forcing A which I aggregated from hourly to daily time step.
The daily gridded data is in a 22G binary file.
I am running GrADS 2.0.2 on a Mac OSX, and I call the attached script from a bash script.

Thank you for your help!

Lydia

--
Lydia D. Rill
M.S., Michigan State University 2016
B.S., Valparaiso University 2014
(224) 406-5130
Lydia.D.Rill at gmail.com<mailto:Lydia.D.Rill at gmail.com>
<station.gs>_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160628/3f6c8163/attachment.html 


More information about the gradsusr mailing list