Giter VIP home page Giter VIP logo

Comments (2)

mikejohnson51 avatar mikejohnson51 commented on May 31, 2024

Hi @program-- Awesome, thank you for this I think both errors should be fixed with the latest commit:

library(AOI)
library(climateR)

aoi1 <- AOI::aoi_get("UCSB")
aoi2 <- AOI::aoi_get("Colorado Springs")

# Doesn't Work
climateR::getGridMET(
  AOI       = aoi1,
  param     = "palmer",
  startDate = "2021-01-01",
  endDate   = "2021-02-01"
)
#> $palmer
#> class      : RasterStack 
#> dimensions : 2, 2, 4, 7  (nrow, ncol, ncell, nlayers)
#> resolution : 0.04166667, 0.04166667  (x, y)
#> extent     : -119.9125, -119.8292, 34.37917, 34.4625  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> names      : X2021_pentad_1, X2021_pentad_2, X2021_pentad_3, X2021_pentad_4, X2021_pentad_5, X2021_pentad_6, X2021_pentad_7 
#> min values :          -2.48,          -2.46,          -2.43,          -2.43,          -2.38,          -2.36,          -2.34 
#> max values :          -2.25,          -2.26,          -2.26,          -2.28,          -2.26,          -2.26,          -2.23

# Doesn't Work
climateR::getGridMET(
  AOI       = aoi2,
  param     = "palmer",
  startDate = "2021-01-01",
  endDate   = "2021-02-01"
)
#> $palmer
#> class      : RasterStack 
#> dimensions : 8, 9, 72, 7  (nrow, ncol, ncell, nlayers)
#> resolution : 0.04166667, 0.04166667  (x, y)
#> extent     : -104.9542, -104.5792, 38.7125, 39.04583  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> names      : X2021_pentad_1, X2021_pentad_2, X2021_pentad_3, X2021_pentad_4, X2021_pentad_5, X2021_pentad_6, X2021_pentad_7 
#> min values :          -5.21,          -5.21,          -5.20,          -5.17,          -5.16,          -5.13,          -5.11 
#> max values :          -2.75,          -2.71,          -2.66,          -2.59,          -2.53,          -2.48,          -2.43


aoi <- AOI::aoi_get("UCSB")

# Works
climateR::getGridMET(
  AOI       = aoi,
  param     = "fmoist_100",
  startDate = "2021-01-01",
  endDate   = "2021-02-01"
)
#> $fmoist_100
#> class      : RasterStack 
#> dimensions : 2, 2, 4, 32  (nrow, ncol, ncell, nlayers)
#> resolution : 0.04166667, 0.04166667  (x, y)
#> extent     : -119.9125, -119.8292, 34.37917, 34.4625  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> names      : X2021.01.01, X2021.01.02, X2021.01.03, X2021.01.04, X2021.01.05, X2021.01.06, X2021.01.07, X2021.01.08, X2021.01.09, X2021.01.10, X2021.01.11, X2021.01.12, X2021.01.13, X2021.01.14, X2021.01.15, ... 
#> min values :        16.6,        17.5,        18.1,        18.5,        19.9,        17.3,        14.8,        12.9,        12.4,        11.8,        11.0,        10.7,        11.4,        10.8,        10.0, ... 
#> max values :        19.7,        19.7,        19.6,        19.6,        22.2,        21.3,        18.9,        17.0,        17.4,        17.3,        15.5,        15.5,        16.7,        14.9,        13.2, ...

# Works
climateR::getGridMET(
  AOI       = aoi,
  param     = "fmoist_1000",
  startDate = "2021-01-01",
  endDate   = "2021-02-01"
)
#> $fmoist_1000
#> class      : RasterStack 
#> dimensions : 2, 2, 4, 32  (nrow, ncol, ncell, nlayers)
#> resolution : 0.04166667, 0.04166667  (x, y)
#> extent     : -119.9125, -119.8292, 34.37917, 34.4625  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> names      : X2021.01.01, X2021.01.02, X2021.01.03, X2021.01.04, X2021.01.05, X2021.01.06, X2021.01.07, X2021.01.08, X2021.01.09, X2021.01.10, X2021.01.11, X2021.01.12, X2021.01.13, X2021.01.14, X2021.01.15, ... 
#> min values :        14.3,        14.6,        14.6,        14.6,        15.9,        15.9,        15.8,        15.6,        15.4,        15.0,        14.6,        14.1,        14.2,        14.1,        14.0, ... 
#> max values :        20.1,        20.1,        19.9,        19.6,        20.9,        21.0,        20.8,        20.5,        20.5,        20.2,        19.7,        19.2,        19.3,        19.0,        18.7, ...

climateR::getGridMET(
  AOI       = aoi,
  param     = c("fmoist_100", "fmoist_1000"),
  startDate = "2021-01-01",
  endDate   = "2021-02-01"
)
#> $fmoist_100
#> class      : RasterStack 
#> dimensions : 2, 2, 4, 32  (nrow, ncol, ncell, nlayers)
#> resolution : 0.04166667, 0.04166667  (x, y)
#> extent     : -119.9125, -119.8292, 34.37917, 34.4625  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> names      : X2021.01.01, X2021.01.02, X2021.01.03, X2021.01.04, X2021.01.05, X2021.01.06, X2021.01.07, X2021.01.08, X2021.01.09, X2021.01.10, X2021.01.11, X2021.01.12, X2021.01.13, X2021.01.14, X2021.01.15, ... 
#> min values :        16.6,        17.5,        18.1,        18.5,        19.9,        17.3,        14.8,        12.9,        12.4,        11.8,        11.0,        10.7,        11.4,        10.8,        10.0, ... 
#> max values :        19.7,        19.7,        19.6,        19.6,        22.2,        21.3,        18.9,        17.0,        17.4,        17.3,        15.5,        15.5,        16.7,        14.9,        13.2, ... 
#> 
#> 
#> $fmoist_1000
#> class      : RasterStack 
#> dimensions : 2, 2, 4, 32  (nrow, ncol, ncell, nlayers)
#> resolution : 0.04166667, 0.04166667  (x, y)
#> extent     : -119.9125, -119.8292, 34.37917, 34.4625  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> names      : X2021.01.01, X2021.01.02, X2021.01.03, X2021.01.04, X2021.01.05, X2021.01.06, X2021.01.07, X2021.01.08, X2021.01.09, X2021.01.10, X2021.01.11, X2021.01.12, X2021.01.13, X2021.01.14, X2021.01.15, ... 
#> min values :        14.3,        14.6,        14.6,        14.6,        15.9,        15.9,        15.8,        15.6,        15.4,        15.0,        14.6,        14.1,        14.2,        14.1,        14.0, ... 
#> max values :        20.1,        20.1,        19.9,        19.6,        20.9,        21.0,        20.8,        20.5,        20.5,        20.2,        19.7,        19.2,        19.3,        19.0,        18.7, ...

Created on 2021-04-12 by the reprex package (v1.0.0)

from climater.

program-- avatar program-- commented on May 31, 2024

Awesome @mikejohnson51! I'll go ahead and close this issue 😄

from climater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.