-
|
I need some variables from NLDAS2 including surface pressure. I see in the source code (pynldas2.py) that if I have the source be netcdf instead of grib, I can get surface pressure. But I don't see where in jupyter lab or otherwise I change the source. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
You need to pass the carrizo_nldas=nldas.get_bycoords(coords_list,"2002-10-01","2024-01-01", variables='psurf', source='netcdf')Here's the documentation for |
Beta Was this translation helpful? Give feedback.
-
|
Thank you.
I did the following but then the IDs get wonky. For example, one id is 'prcp' and prints rlds, psurf, pet, prcp, etc.
I want it to print the NLDAS for each coordinate I give where the id is 0-# coordinates. It did this previous to switching the source and listing the variables out.
<variables=('prcp','temp','wind_u','wind_v','rlds','rsds','humidity','psurf')
carrizo_nldas=nldas.get_bycoords(coords_list,"1992-10-01","2022-09-30",variables,source='netcdf')>
…________________________________
From: Taher Chegini ***@***.***>
Sent: Friday, September 27, 2024 7:19 AM
To: hyriver/hyriver.github.io ***@***.***>
Cc: Paige Becker ***@***.***>; Author ***@***.***>
Subject: [EXTERNAL] Re: [hyriver/hyriver.github.io] How to change source of pynldas from grib to netcdf? (Discussion #41)
CAUTION: This email originated from outside of the Colorado School of Mines organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
You need to pass the source='netcdf' along with variables='psurf'. So it should be something like this:
carrizo_nldas=nldas.get_bycoords(coords_list,"2002-10-01","2024-01-01", variables='psurf', source='netcdf')
Here's the documentation for get_bycoords<https://docs.hyriver.io/autoapi/pynldas2/pynldas2/index.html#pynldas2.pynldas2.get_bycoords>. Just note that since you're getting data for more than 20 years at hourly scale, it's going to take a while. I recommend only getting variables that you need, since by default it will retrieve all the variables that can make the request much, much larger.
—
Reply to this email directly, view it on GitHub<#41 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BEPH5TM27VQJ52ERBVNYGELZYVLMJAVCNFSM6AAAAABO57B7DOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANZXGU3TOMQ>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
|
The issue is that you passed carrizo_nldas = nldas.get_bycoords(coords_list, "1992-10-01", "2022-09-30", variables=variables, source='netcdf')Please look at the documentation link that I sent to make sure you pass the arguments correctly. |
Beta Was this translation helpful? Give feedback.
The issue is that you passed
variablesascoords_idsince the fourth parameter in the function's signature iscoords_id. You should usevariables=variableslike in the code that I provided in the previous comment:Please look at the documentation link that I sent to make sure you pass the arguments correctly.