Skip to content

read_andreas() breaking when trying to read world-region paths #9

@oj713

Description

@oj713

The new and improved read_andreas() is having issues for me when i attempt to read world-region biogeochemical variables. Variables names don't translate correctly and the function breaks entirely when I try to read a single row. Not seeing the same issue when reading from "chfc" region variables. I verified that my andreas is version 0.3.0. Any idea what's going on?

c_path <- copernicus_path("world/GLOBAL_ANALYSISFORECAST_BGC_001_028")
# c_path <- copernicus_path("world/GLOBAL_MULTIYEAR_BGC_001_029") # also breaks with the hindcast data
c_db <- read_database(c_path)

read_andreas(c_db[1,], c_path)
# Error in if (!is.null(n <- names(.x)) && (any(n == "") || length(n) !=  : 
# missing value where TRUE/FALSE needed

read_andreas(c_db[1:2,], c_path)
# stars object with 2 dimensions and 2 attributes
# attribute(s):
#   Min.     1st Qu.    Median       Mean    3rd Qu.     Max.   NA's
# NA.      0.0000   0.4796621   2.54206   5.326982   6.310005 970.9621 298249
# NA..1  167.5223 209.7411575 260.34106 274.186486 336.031082 442.8019 298249
# dimension(s):
#   from   to offset delta refsys x/y
# x    1 1440 -180.1  0.25 WGS 84 [x]
# y    1  681  90.12 -0.25 WGS 84 [y]

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