JPL-MGHG / JPL-MGHG-SDS

This is a generic repo for tracking of SDS tasks
0 stars 0 forks source link

Run Benchmark Version of CARDAMOM on MAAP #3

Closed ddalton-swe closed 7 months ago

ddalton-swe commented 7 months ago
ddalton-swe commented 7 months ago

MAAP Job Completion Report:

The execution of the MAAP job has been completed. For detailed information and output, please refer to the following files:

Output File:

Screenshot: Completion Image

ddalton-swe commented 7 months ago

It should be noted that this job to 10h 35m to run

ddalton-swe commented 7 months ago

Running CARDAMOM on MAAP within the ADE

To run CARDAMOM within the Multi-mission Algorithm and Analysis Platform (MAAP) using the Analysis and Development Environment (ADE), follow these steps:

  1. Clone the CARDAMOM repository:

    git clone https://github.com/CARDAMOM-framework/CARDAMOM_v2.3.git
    cd CARDAMOM_v2.3
    touch run_cardamom.sh
  2. Open the run_cardamom.sh file and add the following script:

    #!/bin/bash
    
    set -e
    
    # Determine the directory of the script
    basedir=$(cd "$(dirname "$0")" && pwd -P)
    
    INPUT_FILE=$(ls -d input/*)
    
    # Create and activate a Conda environment
    conda create --name myenv python=3.7
    eval "$(conda shell.bash hook)"
    conda activate myenv
    
    # Install required Conda packages
    conda install -c conda-forge libnetcdf gcc
    
    # Set LD_LIBRARY_PATH environment variable
    export LD_LIBRARY_PATH="${basedir}:/opt/conda/lib:$LD_LIBRARY_PATH"
    
    # Run the CARDAMOM_COMPILE.sh
    "${basedir}/BASH/CARDAMOM_COMPILE.sh"
    
    # Run the CARDAMOM_MDF.exe with the provided input file
    "${basedir}/C/projects/CARDAMOM_MDF/CARDAMOM_MDF.exe" "${INPUT_FILE}" parameter.cbr
    
    # Deactivate the Conda environment
    conda deactivate
  3. Navigate to the home directory and set up the input data:

    cd ~
    mkdir input
    cd input
    curl -O https://raw.githubusercontent.com/CARDAMOM-framework/CARDAMOM_v2.3/main/DATA/CARDAMOM_DEMO_DRIVERS_prototype_1005.cbf.nc
    cd ..
  4. Run the CARDAMOM script:

    time bash ./CARDAMOM_v2.3/run_cardamom.sh