[Thread Prev][Thread Next][Index]

[ferret_users] shade/modulo every time



Hi all,

I am wondering if it could be possible to have the qualifier /modulo
for the shade command even if I use this command with 1 arg
(this qualifier is proposed only for the shade 3 args)

For now, the only way to get a correct plot is to specify var with var[x=-180:180]

yes? use levitus_climatology
yes? shade/hlim=-180:180:30 temp[k=1]
--> missing some part of the plot

You then must do
yes? shade/hlim=-180:180:30 temp[k=1,x=-180:180]

But I would like to do:
yes? shade/hlim=-180:180:30/modulo temp[k=1]

By this way, I can treat in the same way, variables that are with rectlinear grid
and the ones that are with curvilinear grids.
In both case, I will use:
shade/hlim=-180:180:30/modulo var [,...]

I can even think to a transparent way to swith between shade1arg and shade3args.
Bellow the script that does the switch.

let me know, if this request can be accpeted or if there is a good workaround.

Regards
Patrick

$ cat CMIP5_shade.jnl
!======================================
let allnames = ..varnames

def sym isexist_lon=`IS_ELEMENT_OF_STR (allnames, "lon")`
def sym isexist_lat=`IS_ELEMENT_OF_STR (allnames, "lat")`

if `($isexist_lon) AND ($isexist_lat)` then
       set variable/units="degrees_east"/title="Longitude" lon
       set variable/units="degrees_north"/title="Latitude" lat
       def sym nbpts=`lon,return=isize`
       set axis/modulo `lon,return=xaxis`
       ($01)/modulo/i=1:`($nbpts)+1` ($02),lon,lat

else
       ($01) ($02)

endif
!======================================

$ ferret
yes? go CMIP5_shade.jnl shade/lev=20 var2D


--
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