Skip to content
Snippets Groups Projects
Commit 23217b27 authored by Paolo Veglio's avatar Paolo Veglio
Browse files

added exception for ncgen to use system default if it exists

parent 226fec16
No related branches found
No related tags found
No related merge requests found
Pipeline #55656 failed with stages
in 13 seconds
......@@ -21,6 +21,7 @@ float *g_phis;
float *g_tpw1;
float *g_tpw2;
float *g_lst;
float *g_sst;
float *ti_sfct;
float *ti_tpw;
int nwp_rows;
......@@ -30,6 +31,7 @@ long int nwp_cells;
// Ancillary data for entire granule.
struct granule_ancillary {
float *reynSST;
float *geos_sst;
float *ndvibk;
unsigned char *eco;
float *sfct;
......
"""Write the output data in a netcdf file."""
import logging
from os.path import basename
from os.path import basename, isfile
from subprocess import run
import numpy as np
......@@ -364,7 +364,16 @@ def run_mvcm(
ndvi_fname = file_names["NDVI"]
anc_dir = file_names["ANC_DIR"]
cmd_ncgen = [f"{exe_path}/ncgen", "-b", f"{exe_path}/mvcm_snpp_viirs.cdl", "-o", f"{out_file}"]
if isfile("/opt/netcdf4/4.8.1-gcc-11.2/bin/ncgen"):
cmd_ncgen = ["ncgen", "-b", f"{exe_path}/mvcm_snpp_viirs.cdl", "-o", f"{out_file}"]
else:
cmd_ncgen = [
f"{exe_path}/ncgen",
"-b",
f"{exe_path}/mvcm_snpp_viirs.cdl",
"-o",
f"{out_file}",
]
cmd_mvcm = [
f"{mvcm_exe}",
"-sat",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment