Visualizing data in Cubed-Sphere grid: Difference between revisions
No edit summary |
|||
(12 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 23: | Line 23: | ||
==== [[Recipe: Matlab program fills the seam4| extendFace4.m]] ==== | ==== [[Recipe: Matlab program fills the seam4| extendFace4.m]] ==== | ||
==== [[Recipe: Matlab program fills the seam6| extendFace6.m]] ==== | ==== [[Recipe: Matlab program fills the seam6| extendFace6.m]] ==== | ||
== Python == | == Python == | ||
For the new format of the output, users can use the python | 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. | |||
#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 2, $python example2.py | |||
==== [[Recipe: python program reads cubed-sphere data| CSnative.py]]==== | |||
==== [[Recipe: python program example1 | example1.py]] ==== | |||
==== [[Recipe: python program example2| example2.py]] ==== | |||
== IDL == | == IDL == | ||
To use IDL codes and the pbs scripts to visualize a large number of GEOS-5 cubed-sphere products: | |||
#Download the codes and save them as cube_to_latlon.pro, winds_cube_to_latlon.pro, convert_latlon.j (pbs script) , idlstart ( environment ) and README. | |||
#The README file explains all the scripts and the steps visualizing the data. Although all the examples and data are on discover, it is not difficult for users to make changes to run the programs on the other systems. | |||
==== [[Recipe: README| README]] ==== | |||
==== [[Recipe: environment | idlstart]]==== | |||
==== [[Recipe: pbs script | Ops12KM_R_to_latlon.j]]==== | |||
==== [[Recipe: | ==== [[Recipe: cube_lat_laon |cube_to_latlon.pro]]==== | ||
==== [[Recipe: | ==== [[Recipe: winds | winds_cube_to_latlon.pro]]==== | ||
== GrADS == | == GrADS == | ||
Line 187: | Line 58: | ||
# sdfopen file.nc4 | # sdfopen file.nc4 | ||
# run command <tt>dc</tt> to plot the cube-sphere grid NetCDF file. Users can get help by just run dc without any argument. | # run command <tt>dc</tt> to plot the cube-sphere grid NetCDF file. Users can get help by just run dc without any argument. | ||
==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 |