Visualizing data in Cubed-Sphere grid: Difference between revisions
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{rightTOC}} | {{rightTOC}} | ||
== Cubed-Sphere grid background == | == Cubed-Sphere grid background == | ||
Line 14: | Line 14: | ||
#Download source codes and save them as driver.m, CSnative.m, extendFace1.m,extendFace3.m, extendFace4.m, extendFace6.m, and the example data file respectively to the same folder. The extendFace(1-6).m are used to fill the seam between cubed-sphere faces. Face2 and Face5 are not necessary to be extended because they are redundant. | #Download source codes and save them as driver.m, CSnative.m, extendFace1.m,extendFace3.m, extendFace4.m, extendFace6.m, and the example data file respectively to the same folder. The extendFace(1-6).m are used to fill the seam between cubed-sphere faces. Face2 and Face5 are not necessary to be extended because they are redundant. | ||
#Users should specify the time, level , variable’s name and file name in driver.m | #Users should specify the time, level , variable’s name and file name in driver.m. The test data file can be downloaded [[Media:TEST7.geosgcm_prog.20000415_0000z.nc4]] | ||
#Run with Matlab: % driver | #Run with Matlab: % driver | ||
Line 27: | Line 27: | ||
For the new format of the output, users can use the python codes here to transform the data to lat-lon grid and visualize the products: | For the new format of the output, users can use the python codes here to transform the data to lat-lon grid and visualize the products: | ||
#Install python 3 (or above) and the modules numpy, netcdf4, matplotlib and mpl_toolkits on your computer. | #Install python 3 (or above) and the modules numpy, netcdf4, matplotlib and mpl_toolkits on your computer. | ||
#Download source codes CSnative.py, example1.py, example2.py and the example data file | #Download source codes CSnative.py, example1.py, example2.py and the example data file [[Media:TEST7.geosgcm_prog.20000415_0000z.nc4]] the same folder. | ||
#To show example 1, $python example1.py | #To show example 1, $python example1.py | ||
#To show example 2, $python example2.py | #To show example 2, $python example2.py | ||
Line 34: | Line 34: | ||
==== [[Recipe: python program example1 | example1.py]] ==== | ==== [[Recipe: python program example1 | example1.py]] ==== | ||
==== [[Recipe: python program example2| example2.py]] ==== | ==== [[Recipe: python program example2| example2.py]] ==== | ||
== IDL == | == IDL == | ||
Line 66: | Line 61: | ||
==Panoply== | ==Panoply== | ||
Now the Panoply after version 4.7.0 can view the native cubed-sphere products. This software can be downloaded from https://www.giss.nasa.gov/tools/panoply/ | Now the Panoply after version 4.7.0 can view the native cubed-sphere products. This software can be downloaded from https://www.giss.nasa.gov/tools/panoply/ | ||
==Converting (interpolating) cubed-sphere data to Lat-Lon data== | |||
For some purposes it will be impractical to adapt existing analysis tools to directly work with MERRA cubed-sphere products. In such cases, users will need to build an executable that can interpolate cubed-sphere data to a set of predefined lat-lon resolutions. (Note that special care must be taken for vector data, e.g., (u,v).) | |||
The building requirements and instruction can be found here https://geos5.org/wiki/index.php?title=Building_Baselibs . The executable program cube2laton can be used to convert (or interpolate) the data | |||
Converting data: | |||
% cube2latlon <in-file> <out-file> <target-resolution> | |||
E.g., | |||
% cube2latlon merra.nc latlon.nc 4x5 |