! jnl file that uses Argo data to make geostrophic velocity plots ! requires input arguments for the time range, dynamic height levels 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_geo_vel_avg_map month depth_top depth_bot lat_min lat_max lon_min lon_max iland xvector yvector ! 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 4 variables as well as the lat/lon ranges. ! depth values are entered in the range of 0 to 2000dbar ! time values are entered in the range of 1-12 corresponding to the monthys of the year. ! iland 0=hig res, 1=low res go fland ! xvector and yvector describe the number of vectors plotted on the map. 1 corresponds to every vector, ! 2 to every 2nd vector, etc. ! if no values are entered, the default region is 50S to 25N and 130E to 250E with an average over the ! time region and 0 to 1000dbar cancel/all data cancel/all var cancel/all sym set mem/size=80 set window/clear go set_pixel_size 1024 768 ! assigning variables to arguments passed in the go command as well as default values let lat_min=`$4%-60%` let lat_max=`$5%20%` let lon_min=`$6%130%` let lon_max=`$7%250%` let depth_top=`$2%0%` let depth_bottom=`$3%1000%` let month=`$1%1%` let iland=`$8%1%` let xvector=`$9%2%` let yvector=`$10%2%` set mode interpolate set region/z=`depth_top`:`depth_bottom`/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 ! load data use RG_ArgoClim_Full.nc let temp=ARGO_TEMPERATURE_MEAN[d=1]+ARGO_TEMPERATURE_ANOMALY[d=1] let psal=ARGO_SALINITY_MEAN[d=1]+ARGO_SALINITY_ANOMALY[d=1] ! 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 ! setting depth region set region/z=`depth_top`:`depth_bottom` ! calculate dynamic height let dyn_s=psal[d=1] let dyn_t=temp[d=1] let dyn_p=z[d=1,g=`temp, return=grid`] let dens=rho_un(dyn_s,dyn_t,dyn_p) let potemp=THETA_FO(dyn_s,dyn_t,dyn_p,0) let podens=rho_un(dyn_s,potemp,0.)-1000 go dynamic_height use "c:\marineatlas\ferret\TMAP\fer_dsets\data\climatological_axes.cdf" let clim_geo_u=geo_u[gt=month_irreg@mod] let clim_geo_v=geo_v[gt=month_irreg@mod] ! 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 clim_vx=clim_geo_u*msk let clim_vel_x=if clim_vx ne 0 then clim_vx let clim_vy=clim_geo_v*msk let clim_vel_y=if clim_vy ne 0 then clim_vy ! 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/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/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/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/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 ! geostrophic velocity can only be plotted if the depths are different. ! depth is the same let a=if `depth_top` eq `depth_bottom` then 1 else 0 if `a` then say "depth is the same - cannot graph dynamic height" ! depth is different let d= if `a` eq 0 then 1 else 0 if `d` then vector/over/nolab/xskip=`xvector`/yskip=`yvector` clim_vel_x[x=`lon_min`:`lon_max`,y=`lat_min`:`lat_max`,l=`month`],clim_vel_y[x=`lon_min`:`lon_max`,y=`lat_min`:`lat_max`,l=`month`] 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_geo_vel_avg_map month depth_min depth_max lat_min lat_max lon_min lon_max