BookmarkSubscribeRSS Feed
hanson4022
Calcite | Level 5

I haven't had much luck searching on this topic, so maybe someone else has run in to this. I'm trying to get a climate dataset of temperatures over time for a grid of locations (found here: Daily Gridded Surface Data | DAYMET) into SAS so it's a little more friendly to work with for data analysis and exporting summarized data to csv. However I haven't been able to find any way to do this yet. Most of the procedures written to convert NetCDF files to formats like ASCII were written for Linux and I get lost in trying to figure out code I'm not familiar with. Maybe there's some way to import directly to SAS and simplify things? It's been done for R, so that's one contingency I'm considering right now. Anyone here ever worked with NetCDF files?

Ultimately what I'm trying to do is have a dataset containing variables, latitude, longitude, time, and whatever variable (such as temperature) that is measured at each lat,long,time combination. NetCDF uses multidimensional arrays, so I assume if the file can be understood by SAS, it's just a matter of looping through the arrays to reduce the data to basically a flat 2D depiction of the data. That should let me use something simple like proc means with a by statement to find the minimum or maximum temperature for each location in the file.

2 REPLIES 2
art297
Opal | Level 21

The following page contains a link to a site from which you can download a free (I think) utility for converting NetCDF files to ASCII so they can be read into SAS: Statistical Summary "Lumping Up" Rules for Simulation Models

The download link, specifically, is NCO Homepage

hanson4022
Calcite | Level 5

Unfortunately, when I download the Windows package, it results in "unspecified errors" and doesn't install. It's looking like R might be the only option I've found that doesn't require figuring out the intricacies of other folk's codes.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1954 views
  • 0 likes
  • 2 in conversation