Jump to DART Documentation Main Index
This routine is designed to convert the MODIS Land Product Subsets data of Leaf Area Index (LAI) and Fraction of Photosynthetically Active Radiation (FPAR) 8 day composite [MOD15A2] to a DART observation sequence file. According to the MODIS LAI/FPAR Product User's Guide:
Leaf area index (LAI; dimensionless) is defined as the one-sided green leaf area per unit ground area in broadleaf canopies and as one-half the total needle surface area per unit ground area in coniferous canopies.
Fraction of Photosynthetically Active Radiation absorbed by vegetation (FPAR; dimensionless) is defined as the fraction of incident photosynthetically active radiation (400-700 nm) absorbed by the green elements of a vegetation canopy.
Specifically, the composites are comma-separated-values (.csv format) ASCII files where each line is a record. The input .csv files are directly from the Oak Ridge National Laboratory DAAC. There are two streams to download the data formats we support, they differ only in the very first line of the file. One of the formats has a header record, the other does not. Other than that, the file formats are identical. The format with the header record is fully described in https://lpdaac.usgs.gov/dataset_discovery/modis. Please remember to cite the data in your publications, specific instructions from LP DAAC are available here. This is an example:
Data Citation: Oak Ridge National Laboratory Distributed Active Archive Center (ORNL DAAC). 2012. MODIS subsetted land products, Collection 5. Available on-line [http://daac.ornl.gov/MODIS/modis.html] from ORNL DAAC, Oak Ridge, Tennessee, U.S.A. Accessed Month dd, yyyy.
For more information on downloading the data, see DATA SOURCES below. The MODIS Land Product Subsets page indicates that the Collection 5 MODIS Subsets are available three ways:
The DART workflow is usually:
For some models (CLM, for example), it is required to reorganize the observation sequence files into a series of files that contains ONLY the observations for each assimilation. This can be achieved with the makedaily.sh script.
This namelist is read from the file input.nml. Namelists start with an ampersand '&' and terminate with a slash '/'. Character strings that contain a '/' must be enclosed in quotes to prevent them from prematurely terminating the namelist.
&MOD15A2_to_obs_nml text_input_file = 'MOD15A2.fn_usbouldr.txt', metadata_file = 'MOD15A2_site_metadata.txt', obs_out_file = 'obs_seq.out', maxgoodqc = 10, verbose = .false. /
|text_input_file||character(len=256)||Name of the MODIS file of comma-separated values. This may be a relative or absolute filename.|
|metadata_file||character(len=256)||Name of the file that contains the location information for the specific sites. This may be a relative or absolute filename. If this file does not exist, it is presumed that the location information is part of the 'site' column. If this is not true, the program will fail. For more information see the section Presumed Format|
|obs_out_file||character(len=128)||Name of the output observation sequence file.|
|maxgoodqc||real||maximum value of any observation quality control flag to pass through to the output observation sequence. Keep in mind that filter has the ability to discriminate on the value, so there is really little to be gained by rejecting them during the conversion. The QC value is passed through in its native value, i.e. it is not converted to play nicely with observations that have values 0,1,2,3,4,5 etc.|
|verbose||logical||Print extra information during the MOD15A2_to_obs execution.|
The download site for the 'Field Site and Flux tower' data is
http://daac.ornl.gov/cgi-bin/MODIS/GR_col5_1/mod_viz.html. Since the files are preprocessed, the download is immediate. This method results in files with the header record, and requires a small amount of additional work:
The data files have names like MOD15A2.fn_uswiirpi.txt or
MOD15A2.fn_dehambur.txt and have very long lines.
The first line (i.e. record) of the file is a comma-separated list explaining the
file format for all the remaining lines/records.
These files contain records with 49 pixel values where each pixel represents the values for a 1km by 1km voxel. The center pixel is the only value converted to a DART observation value.
MODIS_LAI % head -1 MOD15A2.fn_dehambur.txt HDFname,Product,Date,Site,ProcessDate,Band,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49
The format of the Site in these files is the predominant difference between the files from the download methods. The Site fields in these files have specified site names that must have a case-sensitive match to a site in the metadata file specified by input.nml:metadata_file .
This format is not supported yet.
The download site for the 'Global Tool' data is
http://daac.ornl.gov/cgi-bin/MODIS/GLBVIZ_1_Glb/modis_subset_order_global_col5.pl. Because some processing to fulfill the request is needed, a job is scheduled on the DAAC server and an email notification is sent with instuctions on how to retrieve the file(s) of interest. This method requires exact knowledge of the location(s) of interest. MOD15A2_to_obs presumes prior knowledge of the file format and that the latitude and longitude are coded in the site name (which is the default behavior). Do not change the format of the file. Please follow the download instructions below - exactly. These instructions were accurate as of 11 April 2014.
The resulting ASCII files will have the same format as described below. The 'site name' column for these files is of the form: Lat47.61666667Lon12.58333333Samp7Line7 which provides the location information otherwise provided by the MOD15A2_site_metadata.txt file for the predefined sites.
I have not used the Web Service.
The data product "Leaf Area Index - Fraction of Photosynthetically Active Radiation 8-Day L4 Global 1km"
(MOD15A2) is described in
(expand the 'Layers' tab). The units and the QC values are described there. What I have not
been able to determine is how to interpret the 'Date' ... if it is 2000049 ... It is day 49 of year 2000.
Is that the start of the 8 day composite, the middle, the end? If you know the answer, please let me know.
Taken (almost) directly from https://lpdaac.usgs.gov/tools/lp_daac_web_services and modified only slightly with examples more appropriate for the LAI/FPAR product.
The MODIS MOD15A2 products in question are ASCII files of comma-separated values. If the file contains a header record/line, all columns are interpreted based on this header column. If the file does not contain a header, the following format is REQUIRED.
|Column Number||Column Description||Example Values|
|1||Unique row identifier||MOD15A2.A2000049.fn_ruyakuts.005.2006268205917.Fpar_1km
|2||MODIS Land Product Code||MOD15A2|
|3||MODIS Acquisition Date
|A2000049 ( ?this is an 8 day average)
What does 49 indicate? start? middle? end?
Each site is assigned a unique ID. Click Here to get Site name information from SiteID
|5||MODIS Processing Date (YYYYDDDHHMMSS)||2006269073558|
|6||Product Scientific Data Set (Band): Indicates type of values to follow. Specific values vary by Product. Data quality information are interleaved.||MOD15A2: FparExtra_QC, FparLai_QC, FparStdDev_1km, Fpar_1km, LaiStdDev_1km, Lai_1km|
|7 to N||Data values of type as specified. Number of data columns as given in Column 4. Definition of QC component values vary by Scientific Data Set.||QC: 00100001,01100001,01100001, ...
Measurement: 2,2,1,1,1,1,1,0,0,0,1,1,0,0, to N
QC flags are binary-coded ascii strings e.g., 10011101 bits 5,6,7 (the last three) are decoded as follows:
Consequently, the last three digits are used by DART's data processing logic.
The MOD15A2_to_obs.f90 file is the source
for the main converter program.
Look at the source code where it reads the example data file. You will
almost certainly need to change the "read" statement to match your data
format. The example code reads each text line into a character buffer
and then reads from that buffer to parse up the data items.
FIXME Explain the 10% for the obs error for FPAR and question the LAIStddev ...
To compile and test, go into the work subdirectory and run the quickbuild.csh script to build the converter and a couple of general purpose utilities. advance_time helps with calendar and time computations, and the obs_sequence_tool manipulates DART observation files once they have been created.
To change the observation types, look in the DART/obs_def directory. If you can find an obs_def_XXX_mod.f90 file with an appropriate set of observation types, change the 'use' lines in the converter source to include those types. Then add that filename in the input.nml namelist file to the &preprocess_nml namelist, the 'input_files' variable. Multiple files can be listed. Then run quickbuild.csh again. It remakes the table of supported observation types before trying to recompile the source code.
An example script for converting batches of files is in the shell_scripts directory. A tiny example data file is in the data directory. These are NOT intended to be turnkey scripts; they will certainly need to be customized for your use. There are comments at the top of the script saying what options they include, and should be commented enough to indicate where changes will be likely to need to be made.
See the general discussion in the observations introduction page about what options are available for the things you need to specify. These include setting a time, specifying an expected error, setting a location, and an observation type.
|Revision:||$Revision: 11441 $|
|Source:||$URL: https://svn-dares-dart.cgd.ucar.edu/DART/releases/Manhattan/observations/obs_converters/MODIS/MOD15A2_to_obs.html $|
|Change Date:||$Date: 2017-04-06 16:00:44 -0600 (Thu, 06 Apr 2017) $|
|Change history:||try "svn log" or "svn diff"|