[Thread Prev][Thread Next][Index]

Re: [ferret_users] curvilinear grid



Hi Andy,

I hope others will write with their particular experience with the cube-sphere grids.

Here's one idea, not using the 3-argument SHADE or Fill command, but with the PLOT/VS/RIBBON command for a versus plot colored by value.  This illustrates how stretched out the grid is when shown in a flat rectangular plot. It works in Ferret or PyFerret, but in PyFerret we have some nice-looking filled plot-symbols.  In Ferret, you'd give a symbol number, maybe PLOT/VS/RIBBON/SYM=25/THICK.

yes? use GCHP.StateMet_inst.2000101_0000z_c48_reshape.nc4

yes? plot/vs/ribbon/sym=hexfill lon, lat, Met_AVGW[k=1]
yes? frame/file=GCHP_plot_vs.png


When Ferret or PyFerret draws curvilinear plots with grid-cell centers it doesn't know what to do with the corners or sometimes edges, in grids where there are various cuts and poles. It's doing a purely graphical method, making shapes out of the lon/lat values in the grids.

Here's a way to break up the plot into the different faces and keep the location data for each of them within its own space. I found these sub-regions using non-curvilinear SHADE plots of the lon variable, seeing where it has jumps.

You could probably do better using the grid edges, and avoid the white space - I haven't worked out how that would go. You can give the 3-argument plot commands using either center or edge values.

The first plot here is used to set up the command color levels that will represent all the colors in the entire plot and then each overlay plot say /LEV with no argument to ask Ferret/PyFerret to reuse the color specification from the previous plot.


yes? use GCHP.StateMet_inst.2000101_0000z_c48_reshape.nc4

yes? ! get color levels for the whole map
yes? shade/k=1 Met_AVGW

yes? shade/hlim=0:360/vlim=-90:90/lev Met_AVGW[k=1,i=1:29,j=1:48], lon[i=1:29,j=1:48], lat[i=1:29,j=1:48]
yes? shade/over/nolab/lev Met_AVGW[k=1,i=30:48,j=1:48], lon[i=30:48,j=1:48], lat[i=30:48,j=1:48]
yes? shade/over/nolab/lev Met_AVGW[k=1,j=49:144], lon[j=49:144], lat[j=49:144]
yes? shade/over/nolab/lev Met_AVGW[k=1,j=145:240], lon[j=145:240], lat[j=145:240]
yes? shade/over/nolab/lev Met_AVGW[k=1,j=241:288], lon[j=241:288], lat[j=241:288]
yes? frame/file=GCHP_curvi.png


Ansley

On 4/27/2019 6:35 AM, Andy Jacobson wrote:
Hi All,

I'm working for the first time with a curvilinear grid (a cubed-sphere atmosphere from GEOS-Chem). My first attempts with plotting fields from this model indicate that I'm either using ferret incorrectly or that the files I'm using are not formatted as expected (see attached). I generated them with:


       NOAA/PMEL TMAP
        FERRET v6.72
        Linux 2.6.32-131.12.1.el6.x86_64 64-bit - 09/13/11
        27-Apr-19 13:24

yes? use GCHP.StateMet_inst.2000101_0000z_c48_reshape.nc4
yes? fill Met_AVGW[k=1],lon,lat
fill Met_AVGW[k=1yes? go land
yes? quit

I presume that the artifacts I'm seeing (e.g.the long diagonal striping across 180W) are not correct behavior. Is there a requirement that the lat/lon centers be written in any particular order in the netCDF file?

The netCDF file itself is available at ftp://aftp.cmdl.noaa.gov/user/andy/GCHP.StateMet_inst.2000101_0000z_c48_reshape.nc4 if you need to take a look.

Many thanks in advance,

Andy

--
Ansley Manke
NOAA/PMEL Science Data Integration Group
7600 Sand Point Way NE
206-526-6246

Attachment: GCHP_plot_vs.png
Description: PNG image

Attachment: GCHP_curvi.png
Description: PNG image


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement