This section lists alphabetically all of the subroutines and functions beginning with the letters I-Z contained in the MODIS ocean color processing codes. A brief description and the location of each subroutine is also given. For subroutines and functions beginning with the letters A-H and the symbol _ , please see Table 8a: Subroutines and Functions (_ & A-H).
NOTE : Subroutines which have the same name as the file they are contained within (such as the subroutine fresnel in the file fresnel.f90) are not listed here. A description of them can be found in Table 7a : Processing Files (A-L) and Table 7b : Processing Files (M-Z).
_ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y
| Subroutine/Function | Location | Description |
|---|---|---|
| I | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| init_inv_const | hoge-v2.0.c | Subroutine to intialize inversion constants. |
| init_oc | hoge-v2.0.c | Function to intialize the pure seawater absorption and backscatter
values for each band. Values are from Smith and Baker (1978?) for the five wavelengths 415, 443, 490, 531 and 555nm. |
| initEfs | utils.c | Initialize and event flag structure of <*e>. |
| interpolate | getanc.c | Initializes/sets parameters and calls dataintp rtn. |
| INTERV | wang3.f | Computes largest ILEFT in (1,LXT) such that XT(ILEFT) .LE. X |
| ipar_difrfl | ipar-1.2.f | Computes surface reflectance for diffuse irrad. (rosps) and foam (rof) as function of wind speed. |
| ipar_dirrfl | ipar-1.2.f | Computes fresnel reflectance for the direct solar beam. |
| ipar_params | ipar-1.2.f | Read MODIS wavelengths, weighting functions for Ed and a_phi, and high wind speed threshold from file. |
| isHex | get.c | Return 1 if a string contains all hex characters. |
| isIdentifier | parser.c | Return whether token points to a name or a string as opposed to a NODE or LINK. |
| isLeadingSubstring | get.c | Case insensitive string comparison. |
| isOctal | get.c | Return 1 if a string contains all octal characters. |
| ItoA | utils.c | Convert an integer to ASCII. |
| ItoAZ | utils.c | Convert an integer to ASCII, zero-filled. |
| iwindowproject | iwindow.f90 | Convert a grid coordinate into a projection pseudo coordinate. |
| J | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| julgre | utils.c | Convert julian date to gregorian date. |
| L | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| LinkInNode | parser.c | Link in a node. Use left pointer for nodes, right pointer for link to next node. |
| LLDIFF | dataintp.f | To find difference between lat1/lon1 and lat2/lon2. The difference can be used as a distance indicator between two points. |
| LLDIST | dataintp.f | Finds the great circle distance between two earth geocoordinates and the direction of the second point relative to the first. (Assumes spherical earth.) |
| LoadAndCheckArgument | get.c | Load up an argument and validate it. |
| LoadArgDefault | get.c | Initialize argument with its default value. |
| LoadArgument | get.c | Given an ASCII, convert it to the correct type. |
| ludecomposition | hoge-v2.0.c | Routine sets up the 5x5 matrix which is passed to pel_ludcmp and pel_lubksb, to retrieve: phytoplankton absorption at 415nm, cdom absorption at 415nm total constituent backscatter at 415nm, pub at 490nm, peb at 555nm. |
| M | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| main | v2_meta.c | Test driver for metadata functions, if TESTMAIN defined. |
| MakeNode | parser.c | Construct a node. |
| MakeOneLine | dsplib.c | Collect command line tokens together into a single string. |
| mcloud | MOD_PRmcloud.f90 | Checks the quality of a value by comparing it to a 3 week reference. |
| mcloudmain | MOD_PRmcloud.f90 | Main subroutine for MCLOUD. |
| mfill | MOD_PRmfill.f90 | The main program for image filling using distance weighted average and iterative smoothing. This program reads binned data (a PST file) and outputs the data with missing data areas inserted with smoothed distance weighted averages of the surrounding pixels. |
| mfillmain | MOD_PRmfill.f90 | Main subroutine for MFILL. |
| mmap | MOD_PRmmap.f90 | This routine obtains parameters from the command line for input to the mapping module mmap. The program mmap maps the equal area binned data into any of 28 possible projections. |
| mmapmain | MOD_PRmmap.f90 | Main subroutine for MMAP. |
| Mocean_AttrSize | moceanutil.c | Returns the size of the attribute. |
| Mocean_CalInit | moceancal.c | This routine initializes the table. |
| Mocean_CreateOutputImage | moceancreate.c | This function creates a hdf file in the specified format. |
| Mocean_GeolocReadElemt | moceangeoloc.c | Reads in the specified line number for a given band from an image file. |
| Mocean_GetBandPixelSize | moceanutil.c | Returns the number of "units" of "pixel type" of a particular band. |
| Mocean_GetBandPixelType | moceanutil.c | Returns the type of pixel of a particular band. |
| Mocean_GetFileId | moceanutil.c | Returns an HDF file identifier. |
| Mocean_GetImageFormat | moceanutil.c | Returns an identifier which indicates the type of UM file format. |
| Mocean_GetImageSizeX | moceanutil.c | Returns the number of pixels per scan line. |
| Mocean_GetImageSizeY | moceanutil.c | Returns the number of scan lines in a file. |
| Mocean_ImageAttrSize | moceanutil.c | Returns the size of the global HDF attribute. |
| Mocean_ImageClose | moceanclose.c | Terminates the access of mocean API routines to a MODIS HDF file opened using Mocean_ImageOpen. |
| Mocean_ImageOpen | moceanopen.c | Mocean_ImageOpen opens a file and creates the HDF structures to
support the Mocean routines' access to it. openMOCEANfile must be called to produce the MODIS file structure before any of the MOCEAN API routines can access it. Note that setting the file access to "w" creates a file and will overwrite a pre-existing one. Mocean_ImageOpen will close the file and return null outputs if an error occurs. |
| Mocean_ImageRead | moceanread.c | Reads in the specified line number for a given band from an image file. |
| Mocean_ImageReadRaw | moceanread.c | The function reads all the bands for an entire scan line from an image file. |
| Mocean_ImageWrite | moceanwrite.c | Writes out one scan line from a single band to an image file. |
| Mocean_ImageWriteRaw | moceanwrite.c | Writes out all the bands from one scan line to an image file. |
| Mocean_NumberOfBands | moceanutil.c | Returns the number of bands in a file. |
| Mocean_ReadAttr | moceanutil.c | Returns the value of the attribute. |
| Mocean_ReadCalibration | moceancal.c | Returns the scaling factors for a given band of an image. |
Mocean_ReadImageAttr |
moceanutil.c | Returns the specified file attribute. |
| Mocean_WriteAttr | moceanutil.c | Sets the specified band attribute. |
| Mocean_WriteCalibration | moceancal.c | Modifies the scaling factors of a given band in the specified image. |
| Mocean_WriteImageAttr | moceanutil.c | Sets the specified file attribute. |
| MissingArgument | get.c | Tell user there is a missing argument. |
| mod_get_l1b_close_v2 | L1B_Geo_Cld_Interface | Closes L1B, geolocation, and CloudMask sds's, vdatas, and files. |
| mod_get_l1b_closef | hdf-io3.c | Closing routine, to close the files. |
| mod_get_l1b_closef | hdf-io.c | Uses mod_get_l1b_close to close the input files. |
| mod_get_l1b_open_v2 | L1B_Geo_Cld_Interface.c | Open the L1B, geolocation, and CloudMask files and sdss & vdatas. Read nrec & nsamp from L1B file, as well as scale & offset values. |
| mod_get_l1b_openf | hdf-io3.c | Intialization routine to open the files and read product metadata. |
| mod_get_l1b_openf | hdf-io.c | Uses mod_get_l1b_open to open the three input files and read the metadata. mod_get_l1b_openf extracts the date and time of the data from the metadata structure. |
| mod_get_l1b_record_v2 | L1B_Geo_Cld_Interface | Read one scan from L1B, geolocation, and CloudMask files. |
| mod_get_l1b_recordf | hdf-io3.c | A data read routine to read individual scan lines and their associated data. |
| mod_get_l1b_recordf | hdf-io.c | Uses mod_get_l1b_record to read the requested level-1b data. |
| modcol | MOD_PR18.f90 | The routine to obtain information from the command line for inputs to the atmospheric correction which computes Rayleigh scattering for a given satellite pass. |
| modcolmain | MOD_PR18.f90 | Main subroutine for MODCOL. |
| modis_put_l2_meta | hdf-io.c | Writes the core and product metadata information to the output file. |
| modsst | MOD_PR28.f90 | Modsst contains the main subroutine MODSSTMAIN for the modsst module and the input for the command line to the module. Several other utility subroutines are also contained in this file. |
| modsstmain | MOD_PR28.f90 | The MODSSTMAIN subroutine begins by opening the input image with a
call to mcsstop. The baseplate temperature is obtained from the ingest header record by a
call to getPrtemp. The MODSSTMAIN subroutine then reads calibration tables and running and
raw calibration records and sets up conversion factors. A summary of input coefficients
from the command line is printed out and the output image is created by a call to
Mocean_CreateOutputImage. The subroutine writes audit records to the output image and
reads the reference SST image. Calibration information for the various bands are
setup and calibration entries are written out by a call to Mocean_WriteCalibration. The
subroutine then builds temperature conversion tables. A degradation correction for the
given satellite is then applied to the visible calibration. Coefficients for the tlw
calculation are obtained by a call to pathnlccoeffsx. Initialization of temperature
conversion routines is done by a call to ETLOADRESP and the visible channel calibration is
obtained by a call to ETGETVIS. The subroutine then corrects for non-linearity and
changing PRT temperature. The subroutine GETEMISSIVITY is then called to intialize the
emissivity table. The subroutine then calls ETINTGEMIS to compute a vector(zenith angle)
convolved with each band response. The AVHRR package is then intialized by calls to AVCONS and AVINIT and coefficients needed for the atmospheric correction are obtained by a call to AVLOOP. The subroutine then determines how to blend calibration sets, and decommutates raw telemetry data for sensor calibration. The routine pre-computes the PRT radiance for each channel as part of the NLC algorithm. The subroutine then checks the satellite zenith angle and sets the mask bit if test fails. Daytime data is tested for sunglint and the mask bit set if failure. The atmospheric correction is done and the cloud albedo is checked and the mask bit set if pixel fails test. The non-linearity correction for the given satellite is applied and the radiance is converted to temperature. The surface emissivity correction for the infared channels are computed and then applied. A check is made of channel uniformity and the mask bit is set if pixel fails test. tlw is then computed using the specified coefficients. The data quality tests are done and mask bits set if data fails a given test. The data is then written out by a call to mocean_ImageWrite. Statistics are printed and the image closed by a call to mocean_ImageClose. |
| msbin | MOD_PRmsbin.f90 | This routine is the main program for MODIS Ocean Color space binning. This program reads the specified level-2 file and uses the binit routine to bin the data into equal area bins. During the binning process the routine uses information from the l2 data flags to exclude data from the bin. The main routine then writes out the level-3 binned product file. |
| msbinmain | MOD_PRmsbin.f90 | Main subroutine for MSBIN. |
| mspc | MOD_PRmspc.f90 | Subsample (actually sum) a pst file (9k) into a pst file with a different resolution (18k). |
| mspcmain | MOD_PRmspc.f90 | Main subroutine for MSPC. |
| mtbin | MOD_PRmtbin.f90 | The main program for time binning. This program accepts a list of PST images to sum. The output file contains the sums of the best quality data available from the input files. |
| mtbinmain | MOD_PRmtbin.f90 | Main subroutine for MTBIN. |
| N | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| NameToken | parser.c | Construct a name or string token. |
| nav_get | hdf-io3.c | Returns image navigation information for the scan line returned by the last call to get_l1a_recordf. |
| navinit | hdf-io3.c | Collects data appropiate to timing of satellite over-pass for scanline returned by last call to get_l1a_recordf. |
| newatm | wang3.f | The main routine for the atmospheric correction. |
| nstrcpy | utils.c | Copy `InString' to `OutString', don't copy more than `MaxOut'. Always stick in a NULL at the end of the string. We assume there is room for it. |
| O | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| OctToBin | get.c | Convert an octal string to binary. |
| one_day | dayboundsub.f90 | Called by few_day. |
| OneBadArg | get.c | Bad argument, print it out. |
| openHDF | HDFroutines.c | Opens the given HDF file. |
| OutputDec | utils.c | Output message followed by decimal number. |
| OutputHex | utils.c | Output message and hexidecimal number. |
| OutputMsg | utils.c | Output a message. |
| OutputTwoDec | utils.c | Output a message followed by two decimal numbers. |
| P | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| ParseArg | parser.c | Parse an argument. |
| ParseExpr | parser.c | Parse an expression. |
| ParseSubExpr | parser.c | Parse a sub-expression. |
| peb_gen | hogemods-v2.0.c | Function to produce spectral model for PEB. |
| PeekAtToken | parser.c | Peek at the next token. |
| pel_lubksb | hogemods-v2.0.c | Function solves the set of linear equations based on the LU decomposition matrix, a, decoding row permutations with indx, and applying column vector b to return answers in b. |
| pel_ludcmp | hogemods-v2.0.c | Function replaces given matrix a with LU decompostion of a rowwise permutation of itself. |
| pgs_met_getpcattr_wrap | pgsmetwrap.c | pgs_met_getpcattr is callable by fortran and passes the parameters to the C version of PGS_MET_GetPCAttr. |
| pgs_met_getpcattrs_wrap | pgsmetwrap.c | pgs_met_getpcattrs is callable by fortran and passes the parameters to the C version of PGS_MET_GetPCAttr. This is for string values only. |
| pgs_met_setattr_wrap | pgsmetwrap.c | pgs_met_setattr is callable by fortran and passes the parameters to the C version of PGS_MET_SetAttr. |
| pgs_met_setattrs_wrap | pgsmetwrap.c | pgs_met_setattrs is callable by fortran and passes the parameters to the C version of PGS_MET_SetAttr. This is for string values only. |
| phyto_gen | hogemods-v2.0.c | Function to generate phytoplankton spectral model normalized at 415nm. |
| prscml_ | get.c | Fortran name for Dsp_ParseCommandLine. |
| pub_gen | hogemods-v2.0.c | Function to produce spectral model for PUB. |
| PushBackChar | parser.c | Put a character back in input area. |
| put_l3b_closef | l3out.f90 | Close level-3b output file. |
| put_l3b_openf | l3out.f90 | Create level-3b output file and write out calibration information and other metadata. |
| put_l3b_recordf | l3out.f90 | Write a record to the level-3b output file. |
| put_l3mf | hdf-io1.f90 | Create and populate the level 3 mapped output file. |
| Q | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| quadrat_form | hogemods-v2.0.c | Function to calculate the answer to a quadratic equation. |
| R | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| RAD1PI | dataintp.f | Function to put a radian value into the range of -PI to PI. |
| RAD360 | dataintp.f | Function to convert radian angle to degrees (0 to 360). |
| RADDEG | dataintp.f | Function to convert a radian to degrees. |
| RAYLEIGH_IQU | wang3.f | Interpolates using the tables of Rayleigh scattering for sun and
viewing angles which are not covered in the tables. It uses 2-D linear
interpolation. All angles are in degrees. The Stokes parameters I, Q, and U for a
Rayleigh atmosphere are the returned quantities. The units are radiance/solar irradiance. To convert to reflectance you need to multiply by pi and divide by the cosine of the sun angle. |
| rdlatlon | HDFroutines.c | Reads the geometry vdata and writes lat/lons. |
| read_attr | hdf_io_tools.c | Given an sd_id or sds_id, and an attribute name, use SDfindattr and SDreadattr to read the attribute value into pointer data. Issue error message and exit if SD... returns error. |
| read_climatology | getanc.c | reads climatology data file |
| read_model_data | wang3.f | Read model data. |
| read_ndt_data | read_ndt.f | Read ndt data. |
| read_NRT | getanc.c | Reads ancillary NRT data file/s. |
| READ_RAYLEIGH_IQU | wang3.f | Loads the Rayleigh tables into memory. |
| ReadFlag | utils.c | Return status of a flag. |
| ReadTypedPSA | v2_meta.c | Reads a PSA into a typed variable (does string to value conversions). |
| rectll | czcssubn.f90 | Subroutine for geometric picture transformation and interpolation . |
| reflect_gen | hogemods-v2.0.c | Function to generate modelled reflectance. |
| reformat_date_time | dayboundsub.f90 | Convert date and fractional time of day into a date-time string. |
| regrid | remapgrid.f90 | Computes the distortion matrix and writes the transformation matrix to
the common area , cvtcomsph. The parameters written to the common area in array XIMGCV
are: PHIT - Maximum latitude in grid PHIB - Minimum latitude in grid ALL - Minimum longitude in grid ALR - Maximum longitude in grid |
| relax_grid | MOD_PRmfill.f90 | Slosh data around grid. |
| rev1d | bin9kmf.f90 | Convert bin number to earth location. |
| rev2d | bin9kmf.f90 | Convert integer row, column to earth location. |
| rev2dn | bin9kmf.f90 | Convert bin number to integer row, column. |
| rev2fd | bin9kmf.f90 | Convert integer row, column to fractional row, column al(real) - grid column represented as fractional value. |
| rev2lf | bin9kmf.f90 | Convert fractional row, column to earth location. |
| reverseproject | reverse.f90 | Convert a projection pseudo coordinate into earth location. |
| rho_a_find_newton | wang3.f | Find roots of quartic equation. |
| rho_a_sub_quartic | wang3.f | This is the implementation of the atmospheric correction algorithm by using the Fourier coefficients of the (rho_a+rho_ra) vs. (rho_as) fitted as a QUARTIC function!! The values of rho_a+rho_ra are returned in the array "rho_a(nlambda)." Note, the last two are unchanged from the input. It also computes the aerosol optical thickness and diffuse transmittance at each band and returns them in the arrays "ret_taua(nlambda)" and t_star(nlambda). |
| rint | evlcal.c | Function missing from DEC RTL: round to nearest integer. |
| S | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| SaveCommandLine | get.c | Stash away a copy of the command line. |
| SaveFirstCmdLine | get.c | Copy the invocation line. |
| SDstartck | hdf_io_tools.c | SDstart the hdf file filenm for mode = "r", "rw", or "w". Issue error message and exit if Hopen returns error. |
| select_model_data | wang3.f | Copies selected model data to a common area. |
| set_climatology | get_climatology.c | Function set_climatology selects climatology files to be used for
processing. If only <f1> and/or <f4> is given then annual climatatology
data files are assumed for that data group. If more than 1 filename is given for
that group then high resolution daily climatology files are assumed. Daily files for climatology must be given in sequential time. |
| set_files | getanc.c | Sets file1 and file2 from input file names depending upon syear, sday and eday. |
| SetFlag | utils.c | Set an event flag. |
| setL2L3sbin_metafrominput | v2_meta.c | Copys CoreMetadata & PSA values to L2 or L3 sbin outputs, writes coremetadata & removes metadata handles. |
| setL3PSA_meta | v2_meta.c | Sets PSAs for L3 files (space or time binned). OBSELETE. |
| setL3tbin_metafromparams | v2_meta.c | Sets metadata in L3 tbin files that would be set from input in L3 sbin files, writes & removes metadata. |
| SetLocalGranId | v2_meta.c | Sets LocalGranuleId in coremetadata using previously set shortname, etc. |
| setMeasParam_metafrominput | v2_meta.c | Copy MeasuredParamContainer & VerParm for given paramName. |
| SetPSA | v2_meta.c | Writes a PSA. |
| SetTypedPSA | v2_meta.c | Sets a PSA from value of a typed variable (does value to string conversions). |
| setuplog | setuplogmsc.f90 (also in setuplog.f90 and setuplogmfill) |
Show user the input parameters and set up string to be written to the output file. |
| setupp | setupp.c | Convert a string to upper case. |
| setuppn | setupp.c | Convert a (sub)string to upper case. |
| setVerparm_metafrominput | v2_meta.c | Copys PSA VerParm* values. |
| SimpleToken | parser.c | Construct a new token descriptor. |
| SkipLevel | get.c | Skip intervening levels. |
| SlurpCommas | parser.c | Suck up zero or more consecutive commas. |
| SPACEINT | dataintp.f | ??? |
| SPL1D1 | wang3.f | Spline interpolation. This subroutine will normally be used in conjunction with SPL1D2. |
| spl1d2 | wang3.f | SPL1D2 interpolates in a table, returning values of the function and its first and second derivatives. This is normally used in conjunction with SPL1D1 which will supply second derivatives. (replaced by spl1d2lcl). |
| spl1d2lcl | wang3.f | SPL1D2LCL interpolates in a table, returning values of the function and its first and second derivatives. This is normally used in conjunction with SPL1D1 which will supply second derivatives. |
| sstreymain | MOD_PRrey.f90 | Opens the input files, uses the middle input twice in the mean calculation, and writes out a 360x180 grid with the mean values. |
| stdtime | stdtime.f90 | Calculates the total number of days since Jan 1, 1971, 0:0:0. |
| strcasecmp | get.c | Compares two strings ignoring case. |
| strncasecmp | get.c | Compares two strings up to 'n' characters ignoring case. |
| SUNANG | sunang2.f | Compute solar zenith, azimuth, and air-mass given the earth location, c date, and time. |
| SyntaxError | parser.c | Print syntax error message. |
| T | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| taua_invert | wang3.f | This subroutine takes the single scattered aerosol radiance and for the model designated by iphase returns the optical thickness tau_a(lambda) for a flat sea surface. |
| tcb_gen | hogemods-v2.0.c | Function to produce spectral model for total constituent backscatter. |
| TIMEINT | dataintp.f | ??? |
| trim | init.c | Trim trailing spaces from string. |
| typhdr | cvttyphdr.f90 | Examines file header and assigns correct class, etc according to internal numeration scheme. |
| typhdrspecial1 | cvttyphdr.f90 | Declare common area for hidden stuff. |
| typhdrspecial2 | cvttyphdr.f90 | Declare common area for visible stuff. |
| typhdrspecial3 | cvttyphdr.f90 | Initialize flags in common area. |
| V | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| v2_meta | v2_meta.c | Initializes metadata, sets coremetadata common to L2 & L3 files. |
| VmsErrMsg | errmsg.c | Given an error message number, return an ASCII string for that error number. |
| W | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| WaitForFlag | utils.c | Wait for an event flag to be set. |
| windowsetup | winset.f90 | This subroutine takes image size information and calculates the necessary parameters so that U,V projection coordinates can be converted to output grid (screen) coordinates. |
| write_attr | hdf_io_tools.c | Given an sd_id or sds_id, and an attribute name, type, and count, write it to a file with SDsetattr. If it is a string, calculate strlen. Issue error message and exit if SD... returns error. |
| Y | _ & A-H | I | J | L | M | N | O | P | Q | R | S | T | V | W | Y |
|
| ylgint | wang3.f | Function to Lagrange interpolate (or extrapolate) given x(i) and y(i) ( y(i) = f(x(i)) and i = 1,n ). Also given is xbar for which ylgint = f(xbar) will be returned. f(x) will be a (npts-1) order polynomial. n must be greater than or equal to 2; and if (npts < 2) or (npts > n) then, npts is set equal to n. |
| ymd | stdtime.f90 | Calculates the sequential day of year. |
Documented by Jasmine S. Bartlett, COAS, Oregon State University.