Visualizing data in Cubed-Sphere grid: Difference between revisions

No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{rightTOC}}
{{rightTOC}}
<span style="color: red; font-weight: bold; font-size: 24pt">IN PROGRESS</span>
 


== 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 HU_getc180forweyium_c180.geosgcm_prog.20000414_2200z.nc4 to the same folder.
#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]] ====
<syntaxhighlight lang="python" >
</syntaxhighlight>


== IDL ==
== IDL ==
Line 63: 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