-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add function for accessing MERRA-2 #2572
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
base: main
Are you sure you want to change the base?
Conversation
AdamRJensen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a test where the start/end dates have a timezone.
|
I guess you are maybe missing a "bad request" test? E.g., if username/password do not exist? Otherwise LGTM! :-) |
| - M2T1NXRAD.5.12.4: SWGDN, SWGDNCLR, ALBEDO | ||
| - M2T1NXSLV.5.12.4: T2M, U10M, V10M, T2MDEW, PS, TO3, TQV | ||
| - M2T1NXAER.5.12.4: TOTEXTTAU, TOTSCATAU, TOTANGSTR | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to include all these in the variable map? And make that visible in the documentation?
Also, if there is down-welling long-wave, please add it for module temperature modeling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the remaining items do not have pvlib names.
Several long-wave variables are available (click to the "Variables" tab): https://disc.gsfc.nasa.gov/datasets/M2T1NXRAD_5.12.4/summary
I guess LWGNT may be the most relevant. Perhaps someone more familiar with this area can confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also guess that LWGNT (surface net downward longwave flux) is most relevant. Someone else confirming would still be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "net" description usually denotes downwelling minus upwelling, but in this case the variable is also denoted as downwelling.
The parameter is described in a NASA appendix here:
LWGNT - Surface net downward longwave flux (W/m2)
The rate of flow of radiant energy reaching the Earth's surface in the thermal infrared spectrum (4-100 µm), expressed in Watts per square meter. LWGNT is a result of atmospheric absorption, emission, and scattering within the entire atmospheric column.
Thus, this is indeed the correct variable of interest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest the following mapping:
'LWGNT': 'lwn',
'LWGEM': 'lwu',
We already have ir_down as a parameter in faiman_rad -- how about ir_net and ir_up for these two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Longwave irradiance (> 4500 nm) is a subset of infrared (> 780 nm); therefore, in my opinion, calling it infrared is imprecise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 'LWGNT': 'lwn', 'LWGEM': 'lwu' in latest commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a first for me: I advocate for longer names here! At least lw_down or in more typical pvlib style: longwave_down. The net data is optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was confusing "downward" with "net downward". Looks like it's all cleared up, now.
Is there anything worth describing about this technique? Is it a work-around of some sort? |
AdamRJensen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Do we want to allow inputting pvlib names for the parameters?
I did consider this, but it would require changing the function to iterate over more than one dataset. I am inclined to leave the current (somewhat inconvenient) functionality for now, and if there is demand for a more complex solution then we can add that functionality later.
It's just a simplification of the pydap approach (without actually needing pydap), I suppose. I can't say much about it beyond what the code and comments already document. |
|
Let's give this PR until the Friday when I suggest we merge it. |

[ ] Closes #xxxxdocs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.I found a simple way to retrieve MERRA-2 data without needing extra dependencies like xarray and pydap (#1274). It is a little slow, but seems to work well otherwise.
Note, the tests should skip until I add the necessary credentials to the repository's secrets.credentials now added