NCL Coordinate System [Lat/Lon] Extraction Error

Miscellaneous questions you have about anything related to graphically displaying WRF output

NCL Coordinate System [Lat/Lon] Extraction Error

Postby msw17002 » Wed Nov 14, 2018 7:57 pm

Hello,

I'm trying to extract post-processed coordinate system data (lat/lon) from the post-processed WRF3.7 grid. I have no problems adding the .grib file into NCL, however, when I try to extract the latitude field (titled, 'latitude_-90_to_+90_surface'), the NCL operation stops. Clearly, the '+' symbol cannot be read by NCL. Thus, I'm trying to either a) rename the variable without the '+' symbol or b) convert the given (x,y) Cartesian coordinate (x,y) system grid into spherical coordinates (lat/lon) given a 'LambertConformal_Projection.'

Are either of my ideas possible? I appreciate your feedback!
msw17002
 
Posts: 3
Joined: Wed Nov 14, 2018 7:39 pm

Re: NCL Coordinate System [Lat/Lon] Extraction Error

Postby msw17002 » Mon Nov 26, 2018 6:35 pm

I found a [patchy] fix to this problem:

One way to fix this problem, assuming that the postprd and wrfout coordinates are different, is use the 'NOAA Weather and Climate Toolkit.' I imported a .nc file into the Toolkit, then I exported a random variable field as a .csv. The file contains the grid coordinates for all grid points in their correct order. All you have to do is reshape the 1-d lat and lon field(s) from the .csv to that of the grid dimensions in which you're working with.
msw17002
 
Posts: 3
Joined: Wed Nov 14, 2018 7:39 pm

Re: NCL Coordinate System [Lat/Lon] Extraction Error

Postby msw17002 » Thu Nov 29, 2018 6:17 pm

I found a much better way.

For anyone who experiences a similar problem, all you have to do is define the variable in question as a new variable/string. Then you can extract the variable without any problem. What I did can be seen below:

test="latitude_-90_to_+90_surface"
Y = Grib_File->$test$

Cheers!
msw17002
 
Posts: 3
Joined: Wed Nov 14, 2018 7:39 pm


Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 3 guests

cron