[Thread Prev][Thread Next][Index]
[ferret_users] Re: [ferret_users] Trying to visualize data on cubed-sphere grid
> Hi Patrick,
> About the polygon command, I believe that Ferret does fill in the
> polygons that are defined. In the dataset Ki_cells.nc, I see cells where
> the longitude values cross the branch cut. We would want to make some
> correction, when we detect that this is what's happening. So for this cell,
>
> yes? use Ki_cells
> yes? list/j=2171 bounds_lon
> VARIABLE : BOUNDS_LON
> FILENAME : Ki_cells.nc
> SUBSET : 6 points (X)
> Y : 2171
> 2171
> 2171
> 1 / 1: 174.5
> 2 / 2: 167.6
> 3 / 3: 172.1
> 4 / 4: -172.1
> 5 / 5: -167.6
> 6 / 6: -174.5
>
> we should correct the longitudes. What comes to my mind is an external
> function, where we pass in the longitude vertex coordinates and a
> tolerance for the size of jump that will mark the vertex locations for a
> correction, and the return for a cell like this would be corrected, but
> a cell such as
>
> 1 / 1: -5.5
> 2 / 2: -12.4
> 3 / 3: -7.9
> 4 / 4: 7.9
> 5 / 5: 12.4
> 6 / 6: 5.5
>
> would not change. Does that sound like a reasonable solution? It seems
> to me that trying to put automated logic into the polygon plot code
> itself might lead to results that wouldn't be well suited to all grids.
Hi Ansley,
You are right, this can be done by some conditionnal variables
but I wanted to avoid this kind of cooking to users.
Here is the code
yes? use Ki_cells.nc
yes? set variable/units="degrees_east" BOUNDS_LON
yes? set variable/units="degrees_north" BOUNDS_LAT
yes? let bounds_lon1=if abs(bounds_lon-lon) lt 180 then bounds_lon else bounds_lon+360
yes? let bounds_lon2=if abs(bounds_lon1-lon) lt 180 then bounds_lon1 else bounds_lon-360
yes? yes? polygon/MODULO/COORD_AX=Y/line/fill/hlim=0:360 BOUNDS_LON2, BOUNDS_LAT, KI
Patrick
--
LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
Data Analysis and Visualization Engineer
ICMC - IPSL Climate Modelling Centre
--
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement