-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PRISM Data #33
Comments
Draft shell script to download prism data, project it to 4326, and clip it to a user-input mask vector. Inputs should be year and mask vector filepath. See |
@COBrogan thanks for pushing your script up there. I’m going to do some parallel work on NLDAS2 today. I will feedback if I have anything that will cross over into PRISM. |
Thanks @rburghol . It was easy enough to get the raster into the database. Next steps are:
|
@COBrogan - wuestion, is |
I forsaw us passing in a file (maybe csv) containing the WKT string. I think |
Note - the final raster size after clipping with your file is 426k, which is down from 9 megs from the original tif (after reprojecting). This will make a big difference in data storage. |
@rburghol that's good news! The clipping is fairly fast too. I've update the script to start getting this data into the database. If we have time tomorrow or Monday, I'd like to sync up on this download/insert script. I have the right idea, but my current code doesn't feel like the approach I should be taking. I've noticed that dh_update_timeseries_weather can probably do some of this work for me, but I thought we were trying to get this done only in shell. Or was it only the downloads we were concerned with? Either way, I'm getting closer. I also want to learn how to call dh_handletimestamp. I'm guessing this is as easy as calling the module, but I may need directions on where to find that. |
I think that we need to take a crack at developing timestamp handling via shell as it will reduce complexity and enhance modularity for batch automation. We can verify it against the PHP and in the end if the shell method can’t hang, we can isolate the function from PHP and call it from the shell. We can compare notes tomorrow if you have like 30 minutes. |
I'm updating the scripts such that the download + processing are handled by a function and the import to the database is handled by a separate function. My intention is that the database import function, |
[like] Scott, Durelle reacted to your message:
…________________________________
From: C. Brogan ***@***.***>
Sent: Tuesday, May 21, 2024 8:43:50 PM
To: HARPgroup/model_meteorology ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [HARPgroup/model_meteorology] PRISM Data (Issue #33)
I'm updating the scripts such that the download + processing are handled by a function and the import to the database is handled by a separate function. My intention is that the database import function, addRasterToDBase2.sh, is generic enough to be used by all of our data import processes.
—
Reply to this email directly, view it on GitHub<#33 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC4K424HDVBNSDOFO4T7S4DZDOWYNAVCNFSM6AAAAABHYRNM6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRTGQYTAMZSGY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
@COBrogan This seems like a really great idea. Thanks for modularising and I can't wait to take a look at it! |
Maintained by Oregon State, the PRSIM dataset offers daily, monthly, and normals datasets for precipitation (ppt), mean temp, max temp, min temp, mean dew point, and min/max vapor pressure. From their homepage, "The PRISM Climate Group gathers climate observations from a wide range of monitoring networks, applies sophisticated quality control measures, and develops spatial climate datasets to reveal short- and long-term climate patterns. The resulting datasets incorporate a variety of modeling techniques and are available at multiple spatial/temporal resolutions, covering the period from 1895 to the present." See here for additional documentation and comparison to daymet
PRISM data is available at a 4km resolution. 800 m resolution raster files exist, but we need to purchase these rasters, which will have limits on distribution. For current pricing, see this page on the PRISM website.
PRISM data can be downloaded from the website, through an anonymous FTP site, or through their webservices. The web services is the most secure means to access this data programmatically, but their server traffic limits downloads of the same dataset to just twice so caution is advised when testing. Instructions for using this service can be found here. As noted on the Explorer page, PRISM considers the date downloaded to be the day that ends on the selected date:
Per the PRISM website, data from the past 6 months is provisional. This means they are subject to change as reporting stations finalize their data. Per PRISM,
With PRISM, we need to:
Code/Examples
Import PRISM using meta-model
DB_FORCE_OVERWRITE=1;export DB_FORCE_OVERWRITE; /opt/model/meta_model/run_model raster_met "2021-01-07" PRISM auto met
Inventory PRISM in postgres
st_summarystats
function, you can access things like 'min', 'max', and 'mean' with "." (dot) notation. However, the dot notation will only work if you call it from parentheses around thest_summary
statement itself, so:(ST_SummaryStatsAgg(met.rast, 1, TRUE)).mean
worksST_SummaryStatsAgg(met.rast, 1, TRUE).mean
fails with an errorERROR: syntax error at or near "."
Verify PRISM in postgres
The text was updated successfully, but these errors were encountered: