This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ZBRENT, x1, x2, FUNC_NAME=func_name, $ | |
| MAX_ITERATIONS=maxit, TOLERANCE=TOL | |
| ;+ | |
| ; NAME: | |
| ; ZBRENT | |
| ; PURPOSE: | |
| ; Find the zero of a 1-D function up to specified tolerance with IDL. | |
| ; EXPLANTION: | |
| ; This routine assumes that the function is known to have a zero. | |
| ; Adapted from procedure of the same name in "Numerical Recipes" by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;+ | |
| ;========================================================================================= | |
| ; NAME: | |
| ; planck | |
| ; | |
| ; TYPE: | |
| ; Function | |
| ; | |
| ; DESCRIPTION: | |
| ; IDL function to compute the Planck or inverse fucnction on a list [array] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;+ | |
| ; Function to calculate dewpoint from drybulb temperature and | |
| ; relative humidity. | |
| ; | |
| ; :Uses: | |
| ; svp.pro | |
| ; | |
| ; :Params: | |
| ; temp : in, required, type="array" | |
| ; drybulb temperature in degree Celsius |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;+ | |
| ; IDL procedure to averge data to lower frequency. Data will be modified and retured. | |
| ; All data is converted to type FLOAT and missing values will be replaced with NaN. | |
| ; | |
| ; :Params: | |
| ; time : in, required, type=1-D array of times in IDL format | |
| ; Will return middle of averaging period in type DOUBLE | |
| ; data : in, required, type=1-D array | |
| ; Will return averaged data in type FLOAT | |
| ; return_freq : in, required, type = scalar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;+ | |
| ; IDL function to decode bit packed numbers or remove/add bits from/to a bit packed number. | |
| ; | |
| ; :Post: | |
| ; Only works with IDL 8.0 or greater. | |
| ; | |
| ; :Params: | |
| ; number : in, required, type = scaler integer | |
| ; The bit packed number or array of bit packed numbers to return bits or remove bits. | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Purpose: Function to parse ARM NetCDF file name with R | |
| # Inputs: String or string array/list containing filename or datastream | |
| # (full UNIX/Linux path allowed) | |
| # | |
| # Returns: List with values assigned to set elements of the list. | |
| # Default value is NULL | |
| # - site, platform, facility, level, date, time, ext, datastream | |
| # | |
| # Example: nameList = armfs('/data/sgpmetE13.b1.20100301.000010.cdf') | |
| # site = nameList$site # site equals 'sgp' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Purpose: Function to create an array of 8 digit dates. | |
| # Inputs: | |
| # _Required_ String or integer containing start date in yyyymmdd | |
| # _Optional_ String or integer containing end date in yyyymmdd | |
| # If ommitted, will use current sytem date | |
| # | |
| # | |
| # Returns: Vector of dates from start date to end date in yyyymmdd | |
| # | |
| # Example: dates = datesInclude(20100301,20100303) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;+ | |
| ; IDL procedure to split ARM file names into component parts | |
| ; | |
| ; :Params: | |
| ; file : in, required, type=String or string array | |
| ; The filename(s) or datastream(s) to parse | |
| ; | |
| ; :Keywords: | |
| ; DSNAME : out, optional, type=String or string array | |
| ; The Partial Datastream Name (ie sgpmfrsrE13) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Simple way to convert ARM time from NetCDF file into native IDL Julian Dates | |
| ; kenkehoe | |
| ncdf_id = NCDF_OPEN(file, /NOWRITE) ; Open NetCDF file to extract times | |
| NCDF_VARGET, ncdf_id, 'base_time', base_time ; retrieve base_time | |
| NCDF_VARGET, ncdf_id, 'time_offset', time_offset ; retrieve time_offset | |
| NCDF_CLOSE, ncdf_id ; Close NetCDF file | |
| ; Convert epoch seconds into Julian Dates | |
| idltime = JULDAY(1,1,1970,0,0,base_time + time_offset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this_is_my_gist.txt | |
| # Created by kenkehoe | |
| This is my gist. | |
| There are many like it, but this one is mine. | |
| My gist is my life. | |
| I must master it as I must master my life. | |
| Without me my gist is useless. | |
| Without my gist, I am useless. |
NewerOlder