Idl strtrim
Pid = call_external(c4idl_slib, 'idl_pid')Īnother way to identify your session is to put the xterm number (tty) in the title bar of the xterm window. Put it at some strategic places in your script so it prints to the screen from time to time so you can easily find it.Ĭ4idl_slib = getenv('SEADAS') + '/bin/IDLshare.so' When you run SeaDAS in batch mode (-b option) you can retrieve the process number as below (it's not the same process id as you find with 'ps -ef | grep seadas'). If all fails kill the process (the process number is included in the main SeaDAS menu window title). skip 1000 (which will skip 1000 lines, more then there probably are in the script), then try. First try to skip a lot of lines to get to the end of that script by typing. return or return (or retall) to get back to the main level. Stuck SeaDAS - When you get errors like '% Execution halted at.
If you want to remove specific bands and keep some, use the command: sdp_band_remove, num, where num is the band number you want to remove (relative to 0, so if you want to remove the thrid band in the list, num=2). Removing specific bands - With the command 'clear_up' all bands are removed from the bandlist. Mband_cmd, cmd_array=cmd, bandname=new_band, navband=1, units='mg/m^3'
#IDL STRTRIM CODE#
Using the following code the values higher then 30 of loaded band 1 are reset to 30 with the mband_cmd program:Ĭmd = ['result=b1','gt30=where(b1 gt 30., count)', $ array index start with 1,1 and IDL with 0,0Īdjusting Maximum Value - The chlorophyll algorithm used can give unreasonable high concentration of 200 mg/m^3 and higher. Station_value = geodata(pix-1, lin-1) have to subtract 1 from pixel and line since SeaDAS Sdp_nav_ll2tv, tmp, lat, lon, pix, lin, band=band_no & lon = -150 latitude/longitude of station Example below is using same loaded band and geodata as in first example above:
Value at Specific Latitude/Longitude - Looking for the data at one specific station and don't know the 'pixel/line'? Without using 'Cursor Position' or 'Read and Profile' display functions you can use the sdp_nav_ll2tv function from the command line. Usage: SDP_ADD_BAND_ENTRY, banddata, info_band=info_band, nav_band=nav_band, FILENAME=filename, PRODNAME=prodname, BANDNAME=i_bandname, si=i_si, scale_type=i_scale_type, units=i_units (see file: $SEADAS/idl_lib/sdp_add_band_entry.pro) You can also include units, bandname (usually "product : filename"), etc. Simple example: you have a quality flag loaded in an array, qual, geolocation data similar to those in band 1. To get an IDL array into the SeaDAS bandlist. IDL Array to SeaDAS Band - The opposite of above. Geodata = sdp_raw2geo(band_no, banddata) convert 'raw data' to geophysical values Sdp_band_get,band_no, banddata store 'raw data' into array banddata Simple example: quickly check if there are any valid data in your scene so you don't have to do any further analyses: This is a very useful function when you want to work with blotches from the command-line or scripts. I also created the function ' get_band.pro' to store banddata into an IDL array. SeaDAS Band to IDL Array - A not documented handy command to get the data of a loaded band into an array which can be manipulated from the command line (instead of using the mband_cmd function). SeaDAS help: index, command mode overview. A few might only be applicable to 'ocean', our Sun server.
#IDL STRTRIM SOFTWARE#
SeaDAS is an IDL based software package used mainly for SeaWiFS and MODIS satellite image processing. Home > Research > Tools > SeaDAS Tips & Tricks SeaDAS/IDL (and some Unix) Tips & Tricks