### Build Individual Application (RadxConvert Example) Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_manual_build.osx.md Demonstrates how to build and install an individual application, using RadxConvert as an example. This involves navigating to the application's source directory, cleaning previous builds, compiling, and installing. ```bash cd $LROSE_CORE_DIR/codebase/apps/Radx/src/RadxConvert make clean make make install ``` -------------------------------- ### Run CIDD with Example Configuration Source: https://github.com/ncar/lrose-core/blob/master/docs/download/CIDD_binary_download_and_install.linux.md This C-shell script snippet demonstrates how to run the CIDD application after installation. It includes setting up X resources for fonts and then launching CIDD with a specified font and parameter file URL. ```csh exec /bin/csh # set resources set timestr = `date -u +%Y%m%d%H%M%S` set XResourcesFile = /tmp/XResources4CIDD.${timestr} touch $XResourcesFile echo "OpenWindows.MonospaceFont: 7x13" >> $XResourcesFile echo "OpenWindows.RegularFont: 6x13" >> $XResourcesFile echo "OpenWindows.BoldFont: 6x13bold" >> $XResourcesFile xrdb -nocpp -override $XResourcesFile /bin/rm -f $XResourcesFile if (-e ~/.Xdefaults) then xrdb -nocpp -override ~/.Xdefaults endif # set fonts xset fp= /usr/share/X11/fonts/misc/,/usr/share/X11/fonts/75dpi/,/usr/share/X11/fonts/100dpi/ xset fp= /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ xset fp= /usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/ # start CIDD /usr/local/lrose/bin/CIDD -font fixed -p http://front.eol.ucar.edu/displayParams/CIDD.pecan ``` -------------------------------- ### Build and Install LROSE Applications Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_manual_build.osx.md Builds and installs the LROSE applications. This step also uses parallel building with '-j 8'. A fallback command 'make install' is provided in case of installation errors. ```bash cd $LROSE_CORE_DIR/codebase/apps make -j 8 install # Fallback if install error occurs: make install ``` -------------------------------- ### HawkEdit Script Example: Thresholding Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Demonstrates how to apply thresholding to a data field using predefined HawkEdit functions. This example shows setting a threshold above a certain value. ```javascript THRESHOLD_ABOVE(VZ, 3.5) ``` -------------------------------- ### Install 'toolsa' Library and Headers (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/toolsa/src/CMakeLists.txt This CMake snippet defines the installation rules for the 'toolsa' library and its header files. The library is installed to the specified installation prefix's 'lib' directory, and the header files from the 'include/toolsa' directory are installed to the 'include' directory of the installation prefix. ```cmake # install INSTALL(TARGETS toolsa DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) INSTALL(DIRECTORY include/toolsa DESTINATION ${CMAKE_INSTALL_PREFIX}/include ) ``` -------------------------------- ### Install CIDD Binary Release Source: https://github.com/ncar/lrose-core/blob/master/docs/download/CIDD_binary_download_and_install.linux.md This snippet shows the commands to navigate to the extracted release directory and execute the installation script for the CIDD binary release. The installation places binaries in /usr/local/lrose/bin. ```bash cd /tmp/lrose-cidd-20200609.bin.x86_64 ./install_cidd_bin_release.py ``` -------------------------------- ### Build and Install TDRP Parameter Handling Utility Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_manual_build.osx.md Builds and installs the TDRP parameter handling utility. This involves navigating to the TDRP source directory and running 'make install', followed by navigating to the tdrp_gen source directory and running 'make install' again. ```bash cd $LROSE_CORE_DIR/codebase/libs/tdrp/src make install cd $LROSE_CORE_DIR/codebase/apps/tdrp/src/tdrp_gen make install ``` -------------------------------- ### Build and Install LROSE Libraries Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_manual_build.osx.md Builds and installs the LROSE libraries, including header files and the libraries themselves. It utilizes parallel building with '-j 8' for faster compilation. If an install error occurs, a simpler 'make install' command is provided as a fallback. ```bash cd $LROSE_CORE_DIR/codebase/libs/ make -j 8 install_include make -j 8 install # Fallback if install error occurs: make install ``` -------------------------------- ### Install euclid Library and Headers (C/C++) Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/euclid/src/CMakeLists.txt This snippet outlines the installation process for the 'euclid' library and its associated header files. It specifies the destination directories within the installation prefix. ```cmake # install INSTALL(TARGETS euclid DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) INSTALL(DIRECTORY include/euclid DESTINATION ${CMAKE_INSTALL_PREFIX}/include ) ``` -------------------------------- ### Define Executable and Installation (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/titan/src/verify_grid/CMakeLists.txt This CMake snippet defines the final executable target for the 'verify_grid' application and specifies how it should be installed. It uses `add_executable` to create the binary from the source files and `INSTALL` command to copy the executable to the bin directory of the installation prefix. ```cmake # application add_executable (verify_grid ${SRCS}) # add tdrp_gen as a dependency add_dependencies(${PROJECT_NAME} tdrp_gen) # install INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) ``` -------------------------------- ### Install Runtime Scripts Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_manual_build.osx.md Installs runtime scripts if they are needed for the LROSE project. This involves navigating to the scripts directories for both the main apps and the procmap component and running 'make install' in each. ```bash cd $LROSE_CORE_DIR/codebase/apps/scripts/src make install cd $LROSE_CORE_DIR/codebase/apps/procmap/src/scripts make install ``` -------------------------------- ### Install Utility Scripts and Programs (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/scripts/src/CMakeLists.txt This snippet demonstrates the use of the CMake 'install' command to install various executable files. It specifies that programs like RUNtests.sh, GetAwsRadar.py, and others should be installed in the ${CMAKE_INSTALL_PREFIX}/bin directory. This is a common pattern for packaging and deploying executable scripts and binaries. ```cmake project (scripts) # install install(PROGRAMS RUNtests.sh DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS GetAwsRadar.py DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS TimeCmd.py DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS copyright_prepend DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS copyright_remove DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS ipcrm_linux DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS ldd_smart DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS loop_cmd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS make_cdrom DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS make_cdrom2 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS make_dvd+rw DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS make_jar DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS make_unix_cdrom DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS not_running DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS nuke_ipcs.linux DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS process_maps.csh DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS psinfo2 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS pull_files_ftp.py DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS push_files_ftp.py DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS push_spdb_files_ftp.py DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS runas DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_baks DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_CMakeLists DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_core DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_junk DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_latest_data_info_files DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_ldata_fmq_files DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_makefile DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_makefile.am DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_objs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_wspace DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS rm_wspace_all DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS running DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS scrub DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS set_font_path DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS snuff DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS hup DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS snuff_slow DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS snuff_inst DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS snuff_usr1 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS sync2files DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS utime_decode DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS auto_restart DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS auto_restart_stats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS DataMapper_list_check DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS procmap_list_kill DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS procmap_list_check DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS procmap_list_start DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS start_inst DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) ``` -------------------------------- ### Install LROSE Binary Release (bash) Source: https://github.com/ncar/lrose-core/blob/master/docs/download/download_binary_and_install.linux.md Installs the LROSE binary release using the provided 'install_bin_release.py' script. It shows how to view help, install to the default directory (~/lrose), and specify a custom installation prefix. ```bash ./install_bin_release.py --help ./install_bin_release.py ./install_bin_release.py --prefix /my/install/dir ``` -------------------------------- ### Install LROSE Binary Release Source: https://github.com/ncar/lrose-core/blob/master/docs/FAQ.md Steps to download, extract, and install the binary version of the LROSE release. This method is suitable for users who do not need to modify the source code. It involves using wget to download the archive, tar to extract it, and a Python script to perform the installation. ```bash cd ~/Downloads wget https://github.com/NCAR/lrose-core/releases/download/lrose-20180626/lrose-20180626.bin.x86_64.tgz tar xvfz lrose-20180626.bin.x86_64.tgz ls cd lrose-20180626.bin.x86_64 ./install_bin_release.py --verbose --prefix = ~/lrose ~/lrose/bin/RadxPrint -h ~/lrose/bin/RadxPrint -h ~/lrose/bin/Titan -h ``` -------------------------------- ### Install LROSE Core Library and Headers Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/rapformats/src/CMakeLists.txt This CMake snippet handles the installation of the built 'rapformats' library and its associated header files. The library is installed to the 'lib' subdirectory of the installation prefix, and headers are installed to the 'include/rapformats' directory. ```cmake # install INSTALL(TARGETS rapformats DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) INSTALL(DIRECTORY include/rapformats DESTINATION ${CMAKE_INSTALL_PREFIX}/include ) ``` -------------------------------- ### Install Executable (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/ingest/src/NWSsoundingIngest/CMakeLists.txt Specifies the installation rule for the built executable. The 'NWSsoundingIngest' target is installed into the 'bin' subdirectory of the CMAKE_INSTALL_PREFIX, making it accessible after the build process. ```cmake # install INSTALL (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) ``` -------------------------------- ### HawkEdit Script Example: Unfolding/Dealiasing Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Provides an example of unfolding or dealiasing a field based on Nyquist velocity. This function is used to correct velocity measurements. ```javascript BB_UNFOLDING_FIRST_GOOD_GATE() BB_UNFOLDING_LOCAL_WIND() BB_UNFOLDING_AC_WIND() ``` -------------------------------- ### HawkEdit Script Example: Remove Only Surface Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Shows the REMOVE_ONLY_SURFACE function, which is used to remove surface-related features from the data. ```javascript REMOVE_ONLY_SURFACE() ``` -------------------------------- ### Full LROSE-Core Build and Installation Command Sequence Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_manual_build.osx.md Provides a complete, ordered list of commands to execute for a full build and installation of LROSE-Core. This sequence can be directly copied and pasted into a terminal to run the entire procedure. ```bash cd $LROSE_CORE_DIR ./build/scripts/installPackageMakefiles.py cd $LROSE_CORE_DIR/codebase/libs/tdrp/src make install cd $LROSE_CORE_DIR/codebase/apps/tdrp/src/tdrp_gen make install cd $LROSE_CORE_DIR/codebase/libs/ make -j 8 install_include make -j 8 install make install cd $LROSE_CORE_DIR/codebase/apps make -j 8 install make install cd $LROSE_CORE_DIR/codebase/apps/scripts/src make install cd $LROSE_CORE_DIR/codebase/apps/procmap/src/scripts make install ``` -------------------------------- ### HawkEdit Script Example: Despeckling Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Shows the usage of the DESPECKLE function in HawkEdit scripts to remove noise or 'speckles' from data. ```javascript DESPECKLE() ``` -------------------------------- ### HawkEdit Script Example: Remove Aircraft Motion Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Illustrates the REMOVE_AIRCRAFT_MOTION function for removing motion artifacts caused by aircraft in the data. ```javascript REMOVE_AIRCRAFT_MOTION() ``` -------------------------------- ### HawkEdit Script Example: Remove Ring Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Demonstrates the REMOVE_RING function, used to eliminate ring-like artifacts from data fields in HawkEdit scripts. ```javascript REMOVE_RING() ``` -------------------------------- ### HawkEdit Script Example: Unconditional Delete Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Demonstrates the UNCONDITIONAL_DELETE function, which forcefully deletes data from a specified field, optionally with a bad data value and clip gate. ```javascript UNCONDITIONAL_DELETE(, , []) ``` -------------------------------- ### HawkEdit Script Examples: Basic Data Operations Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Demonstrates basic data assignment and arithmetic operations in HawkEdit scripts. These operations are analogous to JavaScript variable assignments and function calls. ```javascript VZ_COPY = VZ VZ2 = VZ * 2.0 ``` -------------------------------- ### HawkEdit Script Examples: Bad Flag Functions Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Illustrates the usage of HawkEdit's bad flag functions for identifying and marking bad data. These functions operate on a dedicated 'BAD_FLAGS' field. ```javascript CLEAR_BAD_FLAGS(BAD_FLAGS) SET_BAD_FLAGS_BETWEEN( VE between -1. and 1.) AND_BAD_FLAG_ABOVE(DZ, 35, BAD_FLAGS) ASSERT_BAD_FLAGS(VE, -999, BAD_FLAGS) ASSERT_BAD_FLAGS(DZ, -999, BAD_FLAGS) ``` -------------------------------- ### Create Executable and Install (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/QuadratureTest/CMakeLists.txt Defines the executable target for the application and specifies its installation directory. It also adds a dependency on 'tdrp_gen', likely a code generation target. ```cmake # application add_executable (QuadratureTest ${SRCS}) # add tdrp_gen as a dependency add_dependencies(${PROJECT_NAME} tdrp_gen) # install INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) ``` -------------------------------- ### HawkEdit Script Examples: Miscellaneous Functions Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Presents miscellaneous utility functions in HawkEdit scripts, primarily used for testing script functionality. These include zeroing data within boundaries or specific thirds. ```javascript ZERO_INSIDE_BOUNDARY() ZERO_MIDDLE_THIRD() ``` -------------------------------- ### Display Help for build_lrose_cmake.py Source: https://github.com/ncar/lrose-core/blob/master/docs/build/LROSE_cmake_build.scripted.md Shows how to display the help message for the `build_lrose_cmake.py` script, which lists available options and their usage. This is crucial for understanding build customization. ```bash cd ~/git/lrose-core/build/scripts ./build_lrose_cmake.py --help ``` -------------------------------- ### HawkEdit Script Examples: Advanced Bad Flag Assertions Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt Shows advanced usage of bad flag functions, including setting flags based on conditions and asserting bad data values. These are useful for cleaning data fields. ```javascript VE2 = SET_BAD_FLAGS_BETWEEN (VE, -1, 1., BAD_FLAGS) DZ2 = AND_BAD_FLAGS_ABOVE (DZ, 35., BAD_FLAGS) VE3 = ASSERT_BAD_FLAGS (BAD_FLAGS) DZ3 = ASSERT_BAD_FLAGS (DZ, BAD_FLAGS) ``` -------------------------------- ### Brew Install Stuck During LLVM Build Source: https://github.com/ncar/lrose-core/blob/master/docs/tests/system_tests_with_docker.md This code block illustrates a common issue encountered when installing LROSE via Homebrew on macOS, specifically when the build process for LLVM gets stuck during the 'make' step. It shows the download and cmake configuration stages preceding the failure. ```bash using linuxbrew/linuxbrew … I tried to brew install lrose-blaze.rb It gets stuck on make … ==> Downloading https://releases.llvm.org/6.0.0/compiler-rt-6.0.0.src.tar.xz ######################################################################## 100.0% ==> cmake -G Unix Makefiles /tmp/llvm-20180522-29614-1tkwygc/llvm-6.0.0.src -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELE ==> make ``` -------------------------------- ### String Array Input File Paths Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/tdrp/doc/html/parameter_file.example.html Initializes a 1D string array with variable length (3 elements) for input file paths. It demonstrates the use of embedded environment variables. ```ncl input_file_paths = { "$(HOME)/path1", "$(HOME)/paths", "$(HOME)/path3" }; ``` -------------------------------- ### Define and Map Custom JavaScript Function Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt This snippet shows how to define a named JavaScript function and then apply it to a field using the .map() method. The function 'incr' multiplies its input by -1. The result is stored in a new field. ```javascript function incr(val) { return val * -1 }; VEL_F = VEL.map(incr); ``` -------------------------------- ### Use Anonymous JavaScript Function with Boundary Condition Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/radar/src/HawkEdit/resources/script_help.txt This snippet demonstrates using an anonymous JavaScript function with the .map() method to conditionally modify field values based on a 'BOUNDARY' array. If the current index is within the boundary, the value is negated; otherwise, it remains unchanged. ```javascript VEL_NEG = VEL.map(function (num, idx) { if (BOUNDARY[idx] ) return num * -1; else return num; }); ``` -------------------------------- ### Create Executable and Install (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/didss/src/Fmq2MultMsgFmq/CMakeLists.txt This snippet defines the main executable target for the application using the previously defined source files. It also adds a dependency on `tdrp_gen` (likely for the parameter generation step) and specifies the installation directory for the executable. ```cmake # application add_executable (Fmq2MultMsgFmq ${SRCS}) # add tdrp_gen as a dependency add_dependencies(${PROJECT_NAME} tdrp_gen) # install INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) ``` -------------------------------- ### Creating Custom Radar Data Manipulation Functions Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/trmm_rsl/doc/programmers_guide.html Provides a template for creating custom functions that perform algorithmic operations on radar data structures, analogous to RSL_copy but with data transformation. The example shows a recursive approach where higher-level routines call lower-level routines to process data. ```c Radar *RSL_some_function_of_radar(Radar *radar) { int i; Volume *volume; Radar *new_radar; if (radar == NULL) return NULL; new_radar = RSL_copy_radar(radar); /* This is bad, bad, bad. */ for (i=0; i<=radar->h.nvolumes; i++) new_radar->v[i] = RSL_some_function_of_volume(radar->v[i]); return new_radar; } ``` -------------------------------- ### Install 32-bit Runtime Support for CIDD Source: https://github.com/ncar/lrose-core/blob/master/docs/download/CIDD_binary_download_and_install.linux.md This snippet details the process of installing the necessary 32-bit runtime support packages for CIDD. It involves downloading a Python script, making it executable, running it with the --cidd32 flag, and then removing the script. ```bash wget https://raw.githubusercontent.com/NCAR/lrose-core/master/build/scripts/install_linux_packages.py chmod +x install_linux_packages.py ./install_linux_packages.py --cidd32 rm install_linux_packages.py ``` -------------------------------- ### Running HawkEye from Command Line Source: https://github.com/ncar/lrose-core/blob/master/docs/apps/radar/HawkEye/Tutorial.md Demonstrates how to launch HawkEye with different arguments, including specifying a data file, a parameter file, or requesting help. ```bash HawkEye Hawkeye -h Hawkeye -f test_data/cfradial/kddc/20150626/cfrad.20150626_025610.151_to_20150626_030145.891_KDDC_v270_Surveillance_SUR.nc Hawkeye -params field_project.HawkEye.params ``` -------------------------------- ### Installing 'qtplot' Library and Headers (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/qtplot/src/CMakeLists.txt This CMake code defines the installation rules for the 'qtplot' target. It installs the compiled library to the specified installation prefix's 'lib' directory and installs the header files from the 'include/qtplot' directory to the installation prefix's 'include' directory. ```cmake INSTALL(TARGETS qtplot DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) INSTALL(DIRECTORY include/qtplot DESTINATION ${CMAKE_INSTALL_PREFIX}/include ) ``` -------------------------------- ### String Input Directory Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/tdrp/doc/html/parameter_file.example.html Defines the input directory path as a single-valued string parameter, potentially including environment variables. This is specifically noted for use in realtime mode. ```ncl input_dir = "$(HOME)/input_dir"; ``` -------------------------------- ### Install Radar Library and Headers Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/radar/src/CMakeLists.txt This CMake snippet specifies the installation rules for the built 'radar' library and its associated header files. The library is installed into the 'lib' subdirectory of the installation prefix, and headers are installed into the 'include/radar' directory. ```cmake # install INSTALL(TARGETS radar DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) INSTALL(DIRECTORY include/radar DESTINATION ${CMAKE_INSTALL_PREFIX}/include ) ``` -------------------------------- ### AreaCompute Example Parameter File (AreaCompute.params) Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/tdrp/doc/html/example_c++.html An example parameter file for the AreaCompute application, generated by running the application with a specific flag. It shows the current settings for debug, shape, size, and output_path, demonstrating how these parameters are configured. ```params debug = FALSE; shape = SQUARE; size = 1; output_path = "./AreaCompute.out"; ``` -------------------------------- ### Define Executable and Installation (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/ingest/src/UAEMesonet2Spdb/CMakeLists.txt This snippet defines the main executable for the application and specifies how it should be installed. It also adds a dependency on 'tdrp_gen', likely for code generation related to TDRP. ```cmake # application add_executable (UAEMesonet2Spdb ${SRCS}) # add tdrp_gen as a dependency add_dependencies(${PROJECT_NAME} tdrp_gen) # install INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) ``` -------------------------------- ### Install lrose-core Library and Headers Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/Mdv/src/CMakeLists.txt This CMake code snippet specifies the installation targets for the 'Mdv' library and its associated header files. The library is installed into the 'lib' subdirectory of the installation prefix, and the header files from the 'include/Mdv' directory are installed into the 'include' subdirectory. ```cmake # install INSTALL(TARGETS Mdv DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) INSTALL(DIRECTORY include/Mdv DESTINATION ${CMAKE_INSTALL_PREFIX}/include ) ``` -------------------------------- ### Configure Products and Generate Horizontal Image Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/titan/src/CIDD_titan/Params/Remote_cmds.txt This example shows how to select a domain, turn on specific symbolic products, wind fields, and map overlays, set the horizontal image name, and then dump the image. This allows for customized image content with selected data layers. ```text SELECT_DOMAIN_NUM 4 SET_SYMPRODS_ON METARS-plot SET_WINDS_ON MM5 SET_MAPS_ON Taiwan SET_H_IMAGE_NAME XSECT_H_IM_04 DUMP_H_IMAGE ``` -------------------------------- ### bzWriteOpen Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/toolsa/src/compress/doc/bzip_3.html Prepares a BZFILE structure for writing compressed data to a given file handle. It initializes compression parameters and allocates necessary memory. ```APIDOC ## bzWriteOpen ### Description Prepare to write compressed data to file handle `f`. `f` should refer to a file which has been opened for writing, and for which the error indicator (`ferror(f)`)is not set. For the meaning of parameters `blockSize100k`, `verbosity` and `workFactor`, see `bzCompressInit`. All required memory is allocated at this stage, so if the call completes successfully, `BZ_MEM_ERROR` cannot be signalled by a subsequent call to `bzWrite`. ### Method BZFILE * ### Endpoint N/A (Library Function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c int bzerror; FILE *f = fopen("output.bz2", "wb"); int blockSize100k = 9; int verbosity = 2; int workFactor = 20; BZFILE *b = bzWriteOpen(&bzerror, f, blockSize100k, verbosity, workFactor); ``` ### Response #### Success Response (BZ_OK) - **Return Value** (BZFILE *) - Pointer to an abstract `BZFILE` structure if successful. - **bzerror** (int) - Indicates success (BZ_OK). #### Response Example ```json { "bzerror": 0, // BZ_OK "bzfile_ptr": "0x..." // Pointer to BZFILE structure } ``` ### Error Handling - **BZ_PARAM_ERROR**: if `f` is `NULL` or `blockSize100k < 1` or `blockSize100k > 9` - **BZ_IO_ERROR**: if `ferror(f)` is nonzero - **BZ_MEM_ERROR**: if insufficient memory is available ``` -------------------------------- ### Bzip2 Compression Workflow Source: https://github.com/ncar/lrose-core/blob/master/codebase/libs/toolsa/src/compress/doc/bzip_3.html Outlines the typical sequence of function calls for compressing data using the bzip2 library. It covers initialization, running the compression with BZ_RUN, finishing with BZ_FINISH, and ending the stream. ```c /* Get started */ bzCompressInit(...); /* Shovel data in and shlurp out compressed form */ while (more_data) { bzCompress(..., BZ_RUN, ...); } /* Finish up */ while (stream_not_ended) { bzCompress(..., BZ_FINISH, ...); } /* Close up */ bzCompressEnd(...); ``` -------------------------------- ### Install RadxKdp Executable (CMake) Source: https://github.com/ncar/lrose-core/blob/master/codebase/apps/Radx/src/RadxKdp/CMakeLists.txt Specifies the installation rules for the RadxKdp executable. It ensures that the built executable is copied to the `bin` directory within the installation prefix, making it available after installation. ```cmake INSTALL (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) ``` -------------------------------- ### area_compute Application - Example Parameter File Source: https://github.com/ncar/lrose-core/blob/master/docs/tdrp/example_c.html An example of a parameter file for the area_compute application, showing how parameters like debug, shape, size, and output_path are set. This file can be generated by running the application with a specific flag. ```c debug = FALSE; shape = SQUARE; size = 1; output_path = "./area_compute.out"; ```