Skip to content

run_rosetta() fails to create batch sequence #12

Description

@brownag

Reported by @ColbyBrungard

library(terra)
terraOptions(memfrac=0.9, progress=2)

# test SpatRast sand, silt, clay – all sum to exactly 100%
test = rast("Z:\\vf\\WaterRetentionDifference\\test/sum_30cm_test_fix.tif")

run_rosetta(soildata = test,
  vars = NULL,
  rosetta_version = 2,
  cores = 8,
  file = "awc_30_cm.tif",
  nrows = 10000, 
  overwrite = TRUE
)

Yields the following:

Error in seq.default(1, out_info$nrows, nrows) : 'to' must be of length 1

TODO:

  • fall back for empty out_info object from writeStart() (why does this happen? because of run_rosetta() overwrite argument does not work if prior run failed #11/inability to open file for writing? other reasons?)
  • better nrows heuristic (borrow nrow(.data)/(terra::ncell(.data)/core_thresh) from jNSMR)
  • nrows: consider update of magic number for rosetta v.s. jNSM (core_thresh=25000L)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions