Changeset 157 for trunk/SRC/ReadWrite/idl-NetCDF
- Timestamp:
- 08/21/06 11:01:50 (18 years ago)
- Location:
- trunk/SRC/ReadWrite/idl-NetCDF
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_listdims.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param NCID 9 ; 10 ; 11 ; @restrictions 12 ; 13 ; 14 ; @examples 15 ; 16 ; 17 ; @history 18 ; 19 ; 20 ; @version 21 ; $Id$ 22 ; 23 ;- 1 24 FUNCTION ncdf_listdims,ncid 2 25 ; -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_listvars.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param NCID 9 ; 10 ; 11 ; @returns 12 ; 13 ; 14 ; @restrictions 15 ; 16 ; 17 ; @examples 18 ; 19 ; 20 ; @history 21 ; 22 ; 23 ; @version 24 ; $Id$ 25 ; 26 ;- 1 27 FUNCTION ncdf_listvars,ncid 2 28 ; -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_quickread/ncdf_quickread_helper.pro
r134 r157 37 37 ; Also, only stringify attributes of type CHAR. 38 38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 39 39 ;+ 40 ; @file_comments 41 ; This function returns the filename name from the full path. 42 ; 43 ; @categories 44 ; 45 ; 46 ; @param FULLPATH 47 ; full directory+file path 48 ; 49 ; @keyword SUFFIX 50 ; include inptu suffix in output file name 51 ; 52 ; @returns 53 ; file - filename 54 ; 55 ; @restrictions 56 ; 57 ; 58 ; @examples 59 ; Call: file = ncdf_quickread_getfile(fullpath) 60 ; 61 ; @history 62 ; 63 ; 64 ; @version 65 ; $Id$ 66 ;- 40 67 function ncdf_quickread_getFile, fullpath, suffix=suffix 41 68 on_error,2 42 69 compile_opt hidden 43 ; func_description44 ; This function returns the filename name from the full path.45 ; Inputs: fullpath - full directory+file path46 ; Keyword: /suffix: include inptu suffix in output file name47 ; Outputs: file - filename48 ; Example Call: file = ncdf_quickread_getfile(fullpath)49 50 70 ; Retrieve the postion at which the first '/' character occurs from 51 71 ; the end of the string. … … 73 93 end 74 94 95 ;+ 96 ; @file_comments 97 ; This function returns the directory name from the full path. 98 ; 99 ; @categories 100 ; 101 ; 102 ; @param FULLPATH 103 ; full directory+file path 104 ; 105 ; @returns 106 ; directory path 107 ; 108 ; @restrictions 109 ; 110 ; 111 ; @examples 112 ; Call: dir = ncdf_quickread_getdir(fullpath) 113 ; 114 ; @history 115 ; 116 ; 117 ; @version 118 ; $Id$ 119 ;- 75 120 76 121 function ncdf_quickread_getDir, fullpath 77 122 on_error,2 78 123 compile_opt hidden 79 ; func_description80 ; This function returns the directory name from the full path.81 ; Inputs: fullpath - full directory+file path82 ; Outputs: dir - directory path83 ; Example Call: dir = ncdf_quickread_getdir(fullpath)84 85 124 ; Retrieve the postion at which the first '/' character occurs from 86 125 ; the end of the string. … … 97 136 end 98 137 99 100 function ncdf_quickread_validateName, varname 101 on_error,2 102 compile_opt hidden 103 ; func_description 138 ;+ 139 ; @file_comments 104 140 ; This routine ensures that the given name does not start with a number, 105 141 ; nor contain a dash. IDL cannot accept a variable starting with a … … 107 143 ; underscore is prepended to the name, and if it contains a dash, the 108 144 ; dash is replaced with an underscore. 145 ; 146 ; @categories 147 ; 148 ; 149 ; @param VARNAME 150 ; The name of the variable to be read 151 ; 152 ; 153 ; @returns 154 ; 155 ; 156 ; @restrictions 157 ; 158 ; 159 ; @examples 160 ; 161 ; 162 ; @history 163 ; 164 ; 165 ; @version 166 ; $Id$ 167 ;- 168 169 function ncdf_quickread_validateName, varname 170 on_error,2 171 compile_opt hidden 109 172 110 173 ; Initialize the name. … … 138 201 ; End function. 139 202 end 140 141 203 ;+ 204 ; @file_comments 205 ; This procedure creates a script to read the data in a given netCDF 206 ; file into IDL. The default output file is the name of the netCDF 207 ; file with idl replacing any existing suffix. The default output is 208 ; variable data only. 209 ; 210 ; @categories 211 ; 212 ; 213 ; @param INFILE 214 ; full path to netCDF file of interest 215 ; 216 ; @keyword VERBOSE 217 ; Set this keyword to return an error message in case of an error. 218 ; 219 ; @keyword PREFIX 220 ; see changelog above. 221 ; 222 ; @keyword FIELDS 223 ; 224 ; 225 ; @keyword REFORM 226 ; see changelog above. 227 ; 228 ; @returns 229 ; array of commands to run at top level 230 ; 231 ; @restrictions 232 ; 233 ; 234 ; @examples 235 ; 236 ; 237 ; @history 238 ; 239 ; 240 ; @version 241 ; $Id$ 242 ; 243 ;- 142 244 function ncdf_quickread_helper, infile, verbose=verbose, $ 143 245 prefix=prefix, fields=fields, $ … … 146 248 compile_opt hidden 147 249 ; 148 ; This procedure creates a script to read the data in a given netCDF 149 ; file into IDL. The default output file is the name of the netCDF 150 ; file with idl replacing any existing suffix. The default output is 151 ; variable data only. 152 ; Inputs: infile - full path to netCDF file of interest 153 ; Optional Inputs: verbose - includes extractions of all input file 154 ; attributes in idl script 155 ; prefix, reform - see changelog above. 156 ; 157 ; Return value: array of commands to run at top level 250 ; 158 251 159 252 ; Ensure that the netCDF format is supported on the current platform. -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper1.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param NCVARSTRING 9 ; 10 ; 11 ; @param NCDFSTRUCT 12 ; 13 ; 14 ; @param STRUCTNAME 15 ; 16 ; 17 ; @returns 18 ; 19 ; 20 ; @restrictions 21 ; 22 ; 23 ; @examples 24 ; 25 ; 26 ; @history 27 ; 28 ; 29 ; @version 30 ; $Id$ 31 ; 32 ;- 1 33 pro ncdf_quickwrite_helper1,ncvarstring,ncdfstruct,structname 2 34 ;; -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper2.pro
r134 r157 14 14 ;; we use this function enough to give it a short name, but the underscore 15 15 ;; is to make it unlikely to conflict with a user's function. 16 16 ;+ 17 ; @file_comments 18 ; 19 ; 20 ; @categories 21 ; 22 ; 23 ; @param STRING 24 ; String to be split. Contains text after in, out token on output. 25 ; 26 ; 27 ; @returns 28 ; 29 ; 30 ; @restrictions 31 ; 32 ; 33 ; @examples 34 ; 35 ; 36 ; @history 37 ; 38 ; 39 ; @version 40 ; $Id$ 41 ; 42 ;- 17 43 function _str,string 18 44 return,strcompress(string,/remove_all) … … 20 46 21 47 ;------------------------------------------------------ 48 ;+ 49 ; @file_comments 50 ; 51 ; 52 ; @categories 53 ; 54 ; 55 ; @param NUM 56 ; 57 ; 58 ; @param NAME 59 ; It is a string giving the name of the file to be opened. If NAME does not contain 60 ; the separating character of directories ('/' under unix for example), the file 61 ; will be looked for in the current directory. 62 ; 63 ; 64 ; @returns 65 ; 66 ; 67 ; @restrictions 68 ; 69 ; 70 ; @examples 71 ; 72 ; 73 ; @history 74 ; 75 ; 76 ; @version 77 ; $Id$ 78 ; 79 ;- 22 80 function ncdf_quickwrite_typename,num,name 23 81 on_error,2 … … 63 121 ;----------------------------------------------------- 64 122 123 ;+ 124 ; @file_comments 125 ; 126 ; 127 ; @categories 128 ; 129 ; 130 ; @param NCFILENAME 131 ; 132 ; 133 ; @param S 134 ; The string to be searched 135 ; 136 ; @param SNAME 137 ; 138 ; 139 ; @returns 140 ; 141 ; 142 ; @restrictions 143 ; 144 ; 145 ; @examples 146 ; 147 ; 148 ; @history 149 ; 150 ; 151 ; @version 152 ; $Id$ 153 ; 154 ;- 65 155 66 156 pro ncdf_quickwrite_helper2,ncfilename,s,sname -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper3.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param S 9 ; The string to be searched 10 ; 11 ; 12 ; @returns 13 ; 14 ; 15 ; @restrictions 16 ; 17 ; 18 ; @examples 19 ; 20 ; 21 ; @history 22 ; 23 ; 24 ; @version 25 ; $Id$ 26 ; 27 ;- 1 28 pro ncdf_quickwrite_helper3,s 2 29 ;; -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_read.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param FILENAME 9 ; The filename 10 ; 11 ; @param INFO 12 ; General info 13 ; 14 ; @param DINFO 15 ; Dimension info 16 ; 17 ; @param VINFO 18 ; Variable info 19 ; 20 ; @param GATTS 21 ; Global attributes 22 ; 23 ; @param VATTS 24 ; Variable attributes 25 ; 26 ; @param DATA 27 ; Data 28 ; 29 ; 30 ; @returns 31 ; 32 ; 33 ; @restrictions 34 ; 35 ; 36 ; @examples 37 ; 38 ; 39 ; @history 40 ; 41 ; 42 ; @version 43 ; $Id$ 44 ; 45 ;- 1 46 PRO ncdf_read,filename,info,dinfo,vinfo,gatts,vatts,data 2 47 ; -------- ---- ----- ----- ----- ----- ---- -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_struct.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param FILENAME 9 ; The file's name 10 ; 11 ; @keyword NODATA 12 ; 13 ; 14 ; @keyword NOATTRIBUTES 15 ; 16 ; 17 ; @returns 18 ; 19 ; 20 ; @restrictions 21 ; 22 ; 23 ; @examples 24 ; 25 ; 26 ; @history 27 ; 28 ; 29 ; @version 30 ; $Id$ 31 ; 32 ;- 1 33 FUNCTION ncdf_struct,filename,nodata=nodata,noattributes=noattributes 2 34 ; -
trunk/SRC/ReadWrite/idl-NetCDF/ncdf_struct_free.pro
r134 r157 1 ;+ 2 ; @file_comments 3 ; 4 ; 5 ; @categories 6 ; 7 ; 8 ; @param S 9 ; The string to be searched 10 ; 11 ; 12 ; @returns 13 ; 14 ; 15 ; @restrictions 16 ; 17 ; 18 ; @examples 19 ; 20 ; 21 ; @history 22 ; 23 ; 24 ; @version 25 ; $Id$ 26 ; 27 ;- 1 28 PRO ncdf_struct_free,s 2 29 ;
Note: See TracChangeset
for help on using the changeset viewer.