---
pipeline:
  name: tempSpecificDepthLakes_threshold_select
transform:
  cmd:
  - Rscript
  - ./flow.thsh.slct.R
  - DirIn=$REPO_LOCATIONS
  - DirOut=/pfs/out
  - DirErr=/pfs/out/errored_datums
  - FileThsh=$FILE_THRESHOLDS
  - TermCtxt1=depth0WaterTemp
  - TermCtxt2=depth1WaterTemp
  - TermCtxt3=depth2WaterTemp
  - TermCtxt4=depth3WaterTemp
  - TermCtxt5=depth4WaterTemp
  - TermCtxt6=depth5WaterTemp
  - TermCtxt7=depth6WaterTemp
  - TermCtxt8=depth7WaterTemp
  - TermCtxt9=depth8WaterTemp
  - TermCtxt10=depth9WaterTemp
  - TermCtxt11=depth10WaterTemp
  - DirSubCopy=location|data|uncertainty_data|uncertainty_coef|flags
  image: quay.io/battelleecology/neon-is-thsh-slct-r:039a10a7
  image_pull_secrets:
  - battelleecology-quay-read-all-pull-secret
  env:
    LOG_LEVEL: INFO
    PARALLELIZATION_INTERNAL: '1' # Parallelization within R. If increased, adjust resource requests appropriately.
input:
  cross:
  - pfs:
      name: REPO_LOCATIONS
      repo: tempSpecificDepthLakes_regularized
      glob: /tchain/*/*/*
  - pfs:
      name: FILE_THRESHOLDS
      repo: threshold_tempSpecificDepthLakes
      glob: /thresholds.json
parallelism_spec:
  constant: 1
resource_requests:
  memory: 20M
  cpu: 0.1
autoscaling: true
scheduling_spec:
  node_selector:
    cloud.google.com/gke-ephemeral-storage-local-ssd: "true"
    nodepool.neonscience.org/pipeline: "yes"
    cloud.google.com/gke-spot: "true"
pod_spec: |-
  { "tolerations": [
    {
      "key": "nodepool.neonscience.org/pipeline",
      "operator": "Exists"
    },
    {
      "effect": "NoSchedule",
      "key": "cloud.google.com/gke-spot",
      "operator": "Exists"
    }  
  ] }
pod_patch: |-
  [
    { "op": "replace",
      "path":"/containers/1/resources/requests/memory",
      "value":"24M"
    },
    { "op": "replace",
      "path": "/containers/1/resources/requests/cpu",
      "value": "0.1"
    }
  ]
