[ncl-talk] Extracting A Time Series of Forcing Data Information from Specific Locations

Smith, Stuart smit1770 at purdue.edu
Fri Mar 9 09:37:29 MST 2018


Hello,

 

I would like to compare two sets of forcing data. One is in a .grb file
while the other is a .txt. When working the GRIB files (1 hour timesteps), I
would like my .ncl script to reads in a time series of data, with the goal
to plot specific weather data variables from specific locations to compare
the .txt files. 

 

However, when running my .ncl script listed below I receive a Segmentation
fault error. I'm not sure if this is because I am not defining the latitude
and longitude coordinates soon enough, causing an error by reading in too
much data. I do not know how to print or plot specific latitude (48.5625)
and longitude (-98.9375) points and print their forcing variables. Could you
please help improve my .ncl script? I have also uploaded an example of the
.grb files I am working with. Thank you for your time.

 

 

begin

 

;Go to directory of interest 

 

diri =
ncargpath("/depot/phig/apps/LIS_VIC/NLDAS_Forcing/discover/nobackup/projects
/lis/MET_FORCING/NLDAS2.FORCING/2009/075/")

 

 

;list names of all of the files and add ful file path

grb_list = systemfunc("ls "+diri+"NLDAS_FORA0125_H.*.002.grb") 

  

;print(grb_list)   ; make sure the desired files are listed in the correct
order

 

; read in all files

 

grb_file = addfiles("grb_list","r")

ListSetType (grb_file, "join")

data = grb_file[:]->DSWRF_110_SFC

data at lat=grb_file[:]->lat_110  ;Lat. of interest 48.5625

data at lon=grb_file[:]->lon_110  ;Lon. of interest -98.9375

 

print(data)

 

 

end

 

 

Regards,

 

-Stuart 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180309/4d0039dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NLDAS2.tar.gz
Type: application/x-gzip
Size: 45 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180309/4d0039dd/attachment.bin>


More information about the ncl-talk mailing list