Skip to content

Conversation

@kandersolar
Copy link
Member

@kandersolar kandersolar commented Oct 17, 2025

  • [ ] Closes #xxxx
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for 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`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including 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

@kandersolar kandersolar added this to the v0.13.2 milestone Oct 17, 2025
@kandersolar kandersolar added the remote-data triggers --remote-data pytests label Oct 17, 2025
Copy link
Member

@AdamRJensen AdamRJensen left a 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.

@kandersolar kandersolar added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Oct 17, 2025
@IoannisSifnaios
Copy link
Contributor

IoannisSifnaios commented Oct 23, 2025

I guess you are maybe missing a "bad request" test? E.g., if username/password do not exist?

Otherwise LGTM! :-)

@kandersolar kandersolar added the io label Oct 28, 2025
@kandersolar kandersolar added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Nov 3, 2025
- 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
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member

@AdamRJensen AdamRJensen Dec 3, 2025

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take that statement back. A quick comparison with a BSRN station showed very very different results.
image

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Contributor

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.

@adriesse
Copy link
Member

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.

Is there anything worth describing about this technique? Is it a work-around of some sort?

@kandersolar kandersolar mentioned this pull request Dec 1, 2025
5 tasks
Copy link
Member

@AdamRJensen AdamRJensen left a 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?

@kandersolar
Copy link
Member Author

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.

Is there anything worth describing about this technique? Is it a work-around of some sort?

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.

@AdamRJensen
Copy link
Member

Let's give this PR until the Friday when I suggest we merge it.

@kandersolar kandersolar added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Dec 3, 2025
@kandersolar kandersolar added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement io remote-data triggers --remote-data pytests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants