Caliop2ascii

From Wicare

Jump to: navigation, search

Insert non-formatted text here

Tool for displaying CALIOP/caltrack data in ASCII

Contents

Description

caliop2ascii program aims to display CALIOP/caltrack HDF file dataset's value in ascii format either as physical values (scaled), which is the default behaviour from now, or as raw values (old behavior for compatibility, see --raw option).

Usage

 Usage : caliop2ascii [list of options] <input CALIOP/caltrack HDF file> [sds_name1,[sds_name2 ...]]
 
 If invoked without any options and arguments, caliop2ascii will display this usage message
 If invoked without any options and only a supported CALIOP/caltrack HDF file format (see list above),
 caliop2ascii will display a list of available sds's attributes.
 If invoked with --all option and only a supported CALIOP/caltrack HDF file format (see list above), caliop2ascii will display every available sds datas
 
 Note that for long options, equal sign should be used when passing optional argument value.
 
 Options
   --all                                        display all available SDS
   --attributes|-a                              display file or sds's attributes
   --coordinates_grid|-c [1|2|3]                display coordinates in the parasol grid (line,column)
                                              optional argument should be
                                                   1 for full resolution POLDER's grid (6480x3240),
                                                   2 for medium resolution POLDER's grid (2160x1080),
                                                   3 for low resolution POLDER's grid (720x360).
                                                   (if omitted, full resolution is supposed)
 --delim=DELIM                                use DELIM instead of TAB for field delimiter            
 --grid_subset|-G <min_line[:min_column][,max_line[:max_column]]>
                                              display values only in the suitable zone
 --date|-d                                    display the acquisition date for each pixel
                                              unless the -T option is used, the default date format is "%F"
 --date_format|-D <date_format>               sets the format used to display dates
                                              same syntax as the Unix date command, see the man page of date(1)
 --coordinates_geo|-g                         display geographic coordinates (latitude, longitude)
 
 --decode_fcf|-f [fcf_field]                  display fields from specific's Feature_Classification_Flags SDS (if requested) 
                                              as mentionned in the Document Data Management System - Data Products Catalog,
                                              No: PC-SCI-503 Release and following releases.
 
                                              Seven fields can be obtained (see Table 44 from previous reference):
                                              Bit(s)   Field Description         
                                              1-3      Feature Type              
                                              4-5      Feature Type QA           
                                              6-7      Ice/Water Phase           
                                              8-9      Ice/Water Phase QA        
                                              10-12    Feature Sub-type          
                                              13       Cloud/Aerosol/PSC Type QA 
                                              14-16    Horizonthal averaging required for detection
 
                                              If no option is given, every fields will be display.
 
                                              Optional argument should be
 
                                              . FeatureType 
                                              . FeaturetypeQA
                                              . Phase
                                              . PhaseQA
                                              . FeatureSubType
                                              . TypeQA
                                              - HA
 
                                              You can give many times --decode_fcf|-f option with argument,
                                              but --decode_fcf|-f option without argument will take precedence 
                                              to others.
 
 --geo_subset|-C <min_lat[:min_lon],max_lat[:max_lon]>
                                              display values only in the suitable zone
 
 --fillvalue|--fv <fill_value>                sets the fill value (default is 'nan')
 
 --index_language_offset|-i <c|fortran>       convention to apply for array index offset
                                                     1 for FORTRAN (default convention),
                                                     0 for C
 --metadata|-m [metadata_name]                display metadata list available with their characteristics
                                              Optionally, you can specifiy a metadata metadata_name, and
                                              caliop2ascii will then display values and then exit.
                                              (--record_index option is compatible with it).
                                              (For DFNT_CHAR or DFNT_UCHAR metadata type,
                                              strings will be displayed, --record_index option is deactivate).
 --node_longitude|-N                          display the node longitude (between -180 and +180 degrees)
 
 --quiet|-q                                   Quiet execution.  Useful if caliop2ascii is run in a script.
                                              Note that this option will inhibit --verbose option.
 --record_index|-r                            display the record index as figured in the CALIOP HDF file
 
 --raw                                        display raw datas without scaling them.
 
 --time|-t                                    display the acquisition time for each pixel
                                              unless the --time_format option is used, the default time format is "%H:%M:%S"
 --time_format <TIME_FORMAT>                  sets the format used to display times
                                              same syntax as the Unix date command, see the man page of date(1)
 --verbose|-v                                 display extended information
                                              This option support level of verbosity as optional argument:
                                              0 (QUIET)      <-- Nothing is reported to sdtout and/or stderr,
                                                                 except fatal error messages on stderr that lead to stop execution.
                                              1 (MINIMAL)    <-- Errors messages only are reported to stderr.
                                              2 (NORMAL)     <-- Default value.
                                              3 (DETAILED)   <-- More messages are displayed
                                              4 (DIAGNOSTIC) <-- Debugging purposes (Much more messages displayed
                                              Optional level of verbosity should be given as : --verbose=<level>
                                              By default (-v or --verbose option), the behaviour is same as previously (normal verbose).
                                              Note that level of verbosity could be given as an index (between 0 and 4 included),
                                              or a character string (QUIET, MINIMAL, NORMAL, DETAILED or DIAGNOSTIC, case insensitive).
 
 --version                                    display version number and copyright informations then exit
 --V                                          display version number then exit
 
 --reverse_coordinates|-X                     display (lines and columns) and (latitudes and longitudes) in reverse order
                                              by default, caliop2ascii display lines before columns and latitudes before longitudes;
                                              some tools expect the reverse, which is the -X option aim at.
 --examples                                   display some examples and exit
 
 --help                                       display this help and examples then exit
 
 CALIOP files types supported in this release
    - CAL_LID_L2_333mCLay (Lidar Level 2 Cloud Layer data product at 333 m horizontal resolution)
    - CAL_LID_L2_01kmCLay (Lidar Level 2 Cloud Layer data product at 1 km horizontal resolution)
    - CAL_LID_L2_05kmCLay (Lidar Level 2 Cloud Layer data product at 5 km horizontal resolution)
    - CAL_LID_L2_05kmCPro (Lidar Level 2 Cloud Profile data product at 5 km horizontal resolution)
    - CAL_LID_L2_05kmALay (Lidar Level 2 Aerosol Layer data product at 5 km horizontal resolution)
    - CAL_LID_L2_VFM (Lidar Level 2 Vertical Feature Mask data product at 5 km horizontal resolution)
    - CAL_LID_L1 (Lidar Level 1B Profiles DP 1.1)
 caltrack files types supported in this release
    - caltrack_l1_CALIOP-VFM ()
    - caltrack_l1_CLOUDSAT-1B-CPR ()
    - caltrack_l1_ECMWF-AN ()
    - caltrack_l1_MODIS-MYD021KM ()
    - caltrack_l1_MODIS-MYD03 ()
    - caltrack_l2_CALIOP-05KMALAY ()
    - caltrack_l2_CLOUDSAT-2B-CLDCLASS ()
    - caltrack_l2_CLOUDSAT-2B-GEOPROF-LIDAR ()
    - caltrack_l2_CLOUDSAT-2B-GEOPROF ()
    - caltrack_l2_CLOUDSAT-2B-TAU ()
    - caltrack_l2_DARDAR-CLOUD ()
    - caltrack_l2_DARDAR-MASK ()
    - caltrack_l2_IIR-L2 ()
    - caltrack_l2_MODIS-MYD04-L2 ()
    - caltrack_l2_MODIS-MYD05-L2 ()
    - caltrack_l2_MODIS-MYD06-L2 ()
    - caltrack_l2_OMI_CLDO2 ()
    - caltrack_l2_OMI_CLDRR ()
    - caltrack_l2_OMI_NO2 ()
    - ....

Download

Source can be downloaded here :

CALOP2ASCII-0.7.0.tgz

Package can be browsed here :

caliop2ascii

Compilation

Prerequisites

Configure

Edit the file named "makefile" at the root of the package and eventually change the following variables to fit to your environment

Required

 export HDFLIBDIR = /usr/local/hdf/lib
 export HDFINCDIR = /usr/local/hdf/include
 export ZLIBLIBDIR=/usr/lib/x86_64-linux-gnu
 export ZLIBINCDIR=/usr/include/x86_64-linux-gnu
 export JPEGLIBDIR=/usr/lib/x86_64-linux-gnu
 export JPEGINCDIR=/usr/include/x86_64-linux-gnu

to

 export HDFLIBDIR  = <directory-path-to-the-file-"libmfhdf.a">
 export HDFINCDIR  = <directory-path-to-the-file-"mfhdf.h">
 export ZLIBLIBDIR = <directory-path-to-the-file-"libz.a">
 export ZLIBINCDIR = <directory-path-to-the-file-"zlib.h">
 export JPEGLIBDIR = <directory-path-to-the-file-"libjpeg.a">
 export JPEGINCDIR = <directory-path-to-the-file-"jpeglib.h">

Optionnal

If the HDF4 library has not been compiled with the szip support enabled, which is the default installation, change the lines

 export SZIPLIBDIR =/usr/lib/x86_64-linux-gnu
 export SZIPINCDIR =/usr/include/x86_64-linux-gnu

to :

 export SZIPLIBDIR =""
 export SZIPINCDIR ="

If enabled, set them to :

 export SZIPLIBDIR =<directory-path-to-the-file-"libsz.a">
 export SZIPINCDIR =<directory-path-to-the-file-"szlib.h">

Build

Build the application by running

> make

If successfull, the tool will be situed in the bin directory.

Examples

Decode the feature classification flags

  • Display all flags
 caliop2ascii -f<Caliop_File> Feature_Classification_Flags

will print all decoded bit flags (i.e. FeatureType, FeatureTypeQA, Phase, PhaseQA, FeatureSubType, TypeQA and HA) for all elements of the second dimension of the SDS

  • Display only a few selected flags

Add the option "-decode_fcf|-f" with the desired field:

caliop2ascii -f FeatureType -f FeatureSubType -f HA <Caliop_File> Feature_Classification_Flags

Display the attributes

  • Display the global file attributes
caliop2ascii -a <Caliop_File>
  • Display the attributes of the given SDS
caliop2ascii -a <Caliop_File> <sds_name>

Customize ASCII output format

  • --delim <DELIM> allows to set the separator
  • --fillvalue|--fv <fill_value> change the displayed fill value (instead of displaying the one set for the given dataset)
  • Show only the detected layers for Aerosol or Cloud Layer products :
 caliop2ascii <Caliop_File> Layer_Top_altitude[+] Layer_Bottom_Altitude[+]

Copyright

Copyright (C) 2004-2014 Laboratoire d'Optique Atmosphérique, UMR8518 CNRS/Lille1 -

François Thieuleux and Jérôme Riedi

This is free software. You may redistribute copies of it under the terms of

the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.

There is NO WARRANTY, to the extent permitted by law.

For any questions or concerns regarding this program, or general information about the ICARE Project, please email to contact@icare.univ-lille1.fr


Personal tools
<
September 2017
>
MTWTFSS
123
45678910
11121314151617
18192021222324
252627282930