! jnl file that uses Argo data to make different temperature maps ! requires input arguments for time range, depth 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_psal_map_real_time depth_min depth_max lat_min lat_max lon_min lon_max iland 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 4 variables as well as the lat/lon ranges. ! depth values are entered in the range of 0 - 2000dbar ! iland 0=hig res, 1=low res go fland ! station 1=overlay stations, all other values disable ! 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 cancel/all region set window/clear go set_pixel_size 1024 768 set mem/size=100 ! assigning variables to arguments passed in the go command as well as default values let lat_min=`$3%-90%` let lat_max=`$4%90%` let lon_min=`$5%0%` let lon_max=`$6%360%` let depth_min=`$1%0%` let depth_max=`$2%200%` let iland=`$7%1%` set mode interpolate 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 RG_ArgoClim_Real_Time.nc let temp=argo_temperature_annual_anomaly[d=1] let psal=ARGO_SALINITY_ANNUAL_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 define region/z=`depth_min`:`depth_max`/y=`lat_min`:`lat_max`/x=`lon_min`:`lon_max` mreg set region mreg define viewport/xlim=.0,.95/ylim=0,1 top ! begin mapping process ! only map an average if the two depths are different. otherwise, map at that depth only ! only plot averaged points if there is data down at the deepest layer let mskd=if psal[z=`depth_max`] then 1 ! depth is the same let a=if `depth_max` eq `depth_min` then 1 else 0 if `a` then let psal_map=psal[z=`depth_min`] endif ! depth is different let b=if `depth_max` ne `depth_min` then 1 else 0 if `b` then let psal_map=if mskd[d=1] eq 1 then psal[z=`depth_min`:`depth_max`@ave] endif let con_lev= $8&"()"|*>"*"& fill/nolab/set/palette=cofi_sal/lev="`con_lev`" psal_map ppl shakey 1,,.08,,5,,,,,, ppl fill ! adding contours con/set_up/nolab/over/lev="`con_lev`" psal_map 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 shad/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`] shad/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`] shad/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 shad/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_psal_map_real_time depth_min depth_max lat_min lat_max lon_min lon_max iland con_lev