! jnl file to make altimetric height anomaly maps. The anomaly is from the monthly mean. ! This file requires input arguments for lat/lon range and time range ! to run the program in ferret, you will need to type the following line with the various values filled in: ! go fer_alt_ht_monthly_anom time month lat_min lat_max lon_min lon_max iland con_lev ! time values are entered corresponding to monthly values starting with Jan, 2004 ! NOTE: These plots only make sense if time and month values correspond. In other words, if you want to look ! at a January monthly anomaly, you choose '1' for month and then choose '1' for Jan. 2004, '13' for Jan. 2005, ! '25' for Jan. 2006, or '37' for Jan. 2007. No other choices make sense. ! iland 0=hig res, 1=low res go fland ! con_lev sets the contour and fill levels of the plot. This is done in the following format: (lo,hi,delta). ! More than one can be chosen: (lo,mid,delta1),(mid,hi,delta2). See the Ferret Users Manual for more information. ! if no values are entered, the default region is 50S to 25N and 130E to 250E with an average over the ! entire depth and time region set mem/size=80 set window/clear cancel/all data cancel/all var cancel/all sym go set_pixel_size 1024 768 ! assigning variables to arguments passed in the go command as well as default values let lat_min=`$3%-50%` let lat_max=`$4%25%` let lon_min=`$5%130%` let lon_max=`$6%250%` let time=`$1%6%` let month=`$2%18%` let iland=`$7%1%` set mode interpolate set region/z=0:2000/y=`lat_min`:`lat_max`/x=`lon_min`:`lon_max` define viewport/xlim=.0,.95/ylim=0,1 top PPL DFLTFNT DR ppl conpre @P1@DR ppl axlsze 0.15,.15 ppl axset 1,1,1,1 ppl pen 0,7 ppl pen 1,7 ppl labset .15,.15,.15 use aviso_grid.nc use "c:\marineatlas\ferret\TMAP\fer_dsets\data\climatological_axes.cdf" let clim_aviso=aviso[d=1,gt=month_irreg@mod] ! setting map scales properly let beq=if (`lon_min`) eq (`lon_max`) then 1 else 0 if `beq` then let lon_max=`lon_max`+360 endif let blm=if (`lon_min`) gt (`lon_max`) then 1 else 0 if `blm` then let lon_max=`lon_max`+360 endif define symbol xdeg `lon_max-lon_min` define symbol ydeg `lat_max-lat_min` define symbol alasp `($ydeg)/($xdeg)` set win/asp=($alasp):axis ! begin mapping process ! only map an average if the times are different. otherwise, map at that time only ! time is the same let a=if `time` eq `month` then 1 else 0 if `a` then say "time is the same - no plot can be made" ! time is different else let aviso_anom=aviso[d=1,x=`lon_min`:`lon_max`,y=`lat_min`:`lat_max`,l=`time`]-clim_aviso[x=`lon_min`:`lon_max`,y=`lat_min`:`lat_max`,l=`month`] endif let anom_max=aviso_anom[x=@max,y=@max] let anom_min=aviso_anom[x=@min,y=@min] let abs_max=ABS(`anom_max`) let abs_min=ABS(`anom_min`) ! case where anom_max is bigger than anom_min let maxz=if `abs_max` gt `abs_min` and `abs_max` lt .1 then 1 else 0 if `maxz` then let lev_max = (int(100*abs_max)+1)/100 let lev_min = (int(-100*abs_max)-1)/100 endif let maxnz=if `abs_max` gt `abs_min` and `abs_max` gt .1 then 1 else 0 if `maxnz` then let lev_max=(int(10*anom_max)+1)/10 let lev_min=(int(-10*anom_max)-1)/10 endif let anom_diff=lev_max-lev_min let anom_delta=anom_diff/8 ! case where anom_min is bigger than anom_max let minz=if `abs_min` gt `abs_max` and `abs_min` lt .1 then 1 else 0 if `minz` then let lev_max = (int(100*abs_min)+1)/100 let lev_min = (int(100*anom_min)-1)/100 endif let minnz=if `abs_min` gt `abs_max` and `abs_min` gt .1 then 1 else 0 if `minnz` then let lev_max=(int(10*abs_min)+1)/10 let lev_min=(int(10*anom_min)-1)/10 endif let anom_diff=lev_max-lev_min let anom_delta=anom_diff/8 let con_lev= $8&"(`lev_min`,`lev_max`,`anom_delta`)"|*>"*"& fill/set/nolab/pal=centered/lev="`con_lev`" aviso_anom ppl shakey 1,,.08,,5,,,,,, ppl fill ! adding contours con/set_up/over/nolab/lev="`con_lev`" aviso_anom ppl conset .11,,,,,,,5.7,1.,1 ppl contour/overlay ! now use etopo6 to add bathymetry ! check zonal range to see if using high or low land resoluion let rcheck=`lon_max`-`lon_min` if `rcheck gt 120` then if `iland eq 0` then use etopo12_grid.nc shade/over/nokey/nolab/pal=black/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/lev=(0,10000,10000) btdata12[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] shade/over/nokey/nolab/palette=lightgreyscale/over/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/levels=(-1000,0,1000) btdata12[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] shade/over/nokey/nolab/pal=grey/over/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/lev=(-200,0,200) btdata12[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] endif if `iland eq 1` then use etopo12_grid.nc fill/over/nokey/nolab/palette=black/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/levels=(0,10000,10000) btdata12[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] endif endif if `rcheck le 120` then if `iland eq 0` then use etopo6_grid.nc fill/over/nokey/nolab/palette=black/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/levels=(0,10000,10000) btdata[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] fill/over/nokey/nolab/palette=lightgreyscale/over/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/levels=(-1000,0,1000) btdata[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] fill/over/nokey/nolab/palette=grey/over/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/levels=(-200,0,200) btdata[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] else use etopo6_grid.nc fill/over/nokey/nolab/palette=black/hlim=`lon_min`:`lon_max`/vlim=`lat_min`:`lat_max`/levels=(0,10000,10000) btdata[y=`lat_min`:`lat_max`,x=`lon_min`:`lon_max`] endif endif say Plot is finished say To adjust parameters, use the command line to pass arguments say For this file, the form to pass arguments is say go fer_alt_ht_monthly_anom time month lat_min lat_max lon_min lon_max iland con_lev