Giter VIP home page Giter VIP logo

Comments (2)

mikejohnson51 avatar mikejohnson51 commented on June 9, 2024

Hi,

Unfortunately this is an issue with the palmer index stored on that thredds server. They only retain 2969 days of data for palmer compared to 15233 for the rest of the variables.

See here (PDSI)
http://thredds.northwestknowledge.net:8080/thredds/dodsC/agg_met_pdsi_1979_CurrentYear_CONUS.nc.html

VS here (tmin)
http://thredds.northwestknowledge.net:8080/thredds/dodsC/agg_met_tmmn_1979_CurrentYear_CONUS.nc.html

I haven't put an error catch in yet because I am hoping it will change.

I do have an update coming and try to work it so that one variable wont kill the query. See #16

The other two variables in your query work well,

Mike

from climater.

mikejohnson51 avatar mikejohnson51 commented on June 9, 2024

Hi @crestedcaracaryn,

Sorry for the long delay on this. The package has been completely re-written to supply greater flexibility, more datasets, and easier use. In this example, the multiple time horizons between the rainfall and PDSI grids can now be captured correctly:

library(AOI); library(climateR);library(terra)
#> Using GDAL version 3.6.0 which was retracted because it cannot write large GPKG files
#> terra 1.7.8

AOI = aoi_get(c(45.3988,-95.7885,100,100),km=TRUE)

gm_hist = getGridMET(AOI,
                     varname=c('pet','pdsi','pr'),
                     startDate = "2009-01-01",
                     endDate = "2009-01-10")

str(gm_hist, max.level = 3)
#> List of 4
#>  $ precipitation_amount                         :S4 class 'SpatRaster' [package "terra"]
#>  $ category                                     :S4 class 'SpatRaster' [package "terra"]
#>  $ daily_mean_palmer_drought_severity_index     :S4 class 'SpatRaster' [package "terra"]
#>  $ daily_mean_reference_evapotranspiration_grass:S4 class 'SpatRaster' [package "terra"]

plot(gm_hist$daily_mean_palmer_drought_severity_index)

plot(gm_hist$precipitation_amount)

Created on 2023-02-15 by the reprex package (v2.0.1)

I hope the package rewrite proves useful to you if you are still using it and pursuing simular research/data questions.

Mike

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.