! jnl file that uses Argo data to make geostrophic velocity section overlay plots !let section_direction=`$1%N%` ! begin mapping process ! don't want to plot geostrophic velocity within 5 degrees of equator let msk=if y[g=`temp,return=grid`] lt 5 and y[g=`temp,return=grid`] gt (-5) then 0 else 1 let vx=geo_uz*msk let vel_x=if vx ne 0 then vx let vz=geo_vz*msk let vel_z=if vz ne 0 then vz ! geostrophic velocity can only be plotted if the depths are different. ! depth is the same let a=if `depth_min` eq `depth_max` then 1 else 0 if `a` then say "depth is the same - cannot graph velocity" let b=if `time_start` eq `time_end` then 1 else 0 let c=if (`xlo`) ne (`xhi`) then 1 else 0 let d=if (`ylo`) ne (`yhi`) then 1 else 0 let e=if `time_start` ne `time_end` then 1 else 0 let boundb=if (`xlo`) gt (`xhi`) then 1 else 0 ! now can start plotting velocity vectors over if `b` then if ($1%TRUE|N>TRUE|E>FALSE|>TRUE%) then !checking whether it is a N-S or E-W section & assigning N-S as default if `c` then ! plotting vector/nolab/over/pen=black vel_x[y=`ylo`:`yhi`,x=`xlo`:`xhi`@ave,l=`time_start`,z=`depth_min`:`depth_max`],vel_z[y=`ylo`:`yhi`,x=`xlo`:`xhi`@ave,l=`time_start`,z=`depth_min`:`depth_max`] else ! no averaging over x ! plotting vector/nolab/over/pen=black vel_x[y=`ylo`:`yhi`,x=`xlo`,l=`time_start`,z=`depth_min`:`depth_max`],vel_z[y=`ylo`:`yhi`,x=`xlo`,l=`time_start`,z=`depth_min`:`depth_max`] endif ! c loop else ! E-W section ! Ensuring longitudes are properly plotted if `boundb` then let xhi=`xhi`+360 endif if `d` then ! plotting vector/nolab/over/pen=black vel_x[x=`xlo`:`xhi`,y=`ylo`:`yhi`@ave,l=`time_start`,z=`depth_min`:`depth_max`],vel_z[x=`xlo`:`xhi`,y=`ylo`:`yhi`@ave,l=`time_start`,z=`depth_min`:`depth_max`] else ! no averaging over y ! plotting vector/nolab/over/pen=black vel_x[x=`xlo`:`xhi`,y=`ylo`,l=`time_start`,z=`depth_min`:`depth_max`],vel_z[x=`xlo`:`xhi`,y=`ylo`,l=`time_start`,z=`depth_min`:`depth_max`] endif ! d loop endif !b endif !n-s ! time is different if `e` then if ($1%TRUE|N>TRUE|E>FALSE|>TRUE%) then !checking whether it is a N-S or E-W section & assigning N-S as default if `c` then ! plotting vector/nolab/over/pen=black vel_x[y=`ylo`:`yhi`,x=`xlo`:`xhi`@ave,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`],vel_z[y=`ylo`:`yhi`,x=`xlo`:`xhi`@ave,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`] else ! no averaging over x ! plotting vector/nolab/over/pen=black vel_x[y=`ylo`:`yhi`,x=`xlo`,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`],vel_z[y=`ylo`:`yhi`,x=`xlo`,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`] endif ! c loop else ! E-W section if `d` then ! plotting vector/nolab/over/pen=black vel_x[x=`xlo`:`xhi`,y=`ylo`:`yhi`@ave,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`],vel_z[x=`xlo`:`xhi`,y=`ylo`:`yhi`@ave,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`] else ! no averaging over y ! plotting vector/nolab/over/pen=black vel_x[x=`xlo`:`xhi`,y=`ylo`,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`],vel_z[x=`xlo`:`xhi`,y=`ylo`,l=`time_start`:`time_end`@ave,z=`depth_min`:`depth_max`] endif ! d loop endif !e endif !n-s