! jnl file that uses Aviso data to make different altimetric height hovmoller diagrams ! requires input arguments for time range and lat/lon 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_hovmoller time_start time_end lat_min lat_max lon_min lon_max con_lev ! If you choose not to give values for the various variables, default ones will be substituted for you. ! If you only want to choose some values, you can, but you cannot skip any values. This means you can ! fill in the first 2 and no others, or if you want to specify the lat/lon ranges, you must fill in values ! for the first variables as well as the lat/lon ranges. ! depth values are entered in the range of 0 - 2000dbar ! time values are entered in the available range starting with Jan, 2004 ! 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. cancel/all data cancel/all var cancel/all sym set window/clear go set_pixel_size 1024 768 ! set the aspect ratio SET WINDOW/ASPECT=.75 set mem/size=80 ! assigning variables to arguments passed in the go command as well as default values let lat_min=`$3%(-2)%` let lat_max=`$4%(2)%` let lon_min=`$5%(130)%` let lon_max=`$6%(250)%` let time_start=`$1%1%` let time_end=`$2%53%` 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 ! Ensuring longitudes are properly plotted let boundb=if (`lon_min`) gt (`lon_max`) then 1 else 0 if `boundb` then let lon_max=`lon_max`+360 endif use aviso_grid.nc ! only lat is the same let a=if (`lat_min`) eq (`lat_max`) and (`lon_min`) ne (`lon_max`) then 1 else 0 ! all 3 are different let d=if (`lon_min`) ne (`lon_max`) and (`lat_min`) ne (`lat_max`) then 1 else 0 if `a` then let aviso_time= aviso[x=`lon_min`:`lon_max`,y=`lat_min`,l=`time_start`:`time_end`] let anom_max=aviso_time[x=@max,l=@max] let anom_min=aviso_time[x=@min,l=@min] endif if `d` then let aviso_time= aviso[x=`lon_min`:`lon_max`,y=`lat_min`:`lat_max`@ave,l=`time_start`:`time_end`] let anom_max=aviso_time[x=@max,l=@max] let anom_min=aviso_time[x=@min,l=@min] endif ! creating an equal, centered key 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(10*abs_max)+1)/10 let lev_min = (int(-10*abs_max)-1)/10 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(anom_max)+1 let lev_min=int((-1*anom_max))-1 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(10*abs_min)+1)/10 let lev_min = (int(10*anom_min)-1)/10 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(abs_min)+1 let lev_min=int(anom_min)-1 endif let anom_diff=lev_max-lev_min let anom_delta=anom_diff/8 let con_lev= $7&"(`lev_min`,`lev_max`,`anom_delta`)"|*>"*"& fill/nolab/pal=default/set_up/lev="`con_lev`" aviso_time ppl labset 0.2 0.2 0.2 0.2 ppl axlsze,0.15,0.15 ppl shakey 1,1,.08,0,5,9,,,, ppl fill contour/set/over/nolab/color=black/lev="`con_lev`" aviso_time ppl conset,0.12 ppl conpre,0 ppl labset 0.2 0.2 0.2 0.2 ppl axlsze,0.15,0.15 ppl contour/over ppl origin ,($orig_yorg) !restore y origin 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_hovmoller time_start time_end lat_min lat_max lon_min lon_max con_lev