Temperature per specific date as a function of latitude and longitude?

Can anyone help me pull temperature based on specific dates, latitudes, and longitudes? For instance, what was the tempearture on Jan 15, 2020, at 38.9072° N, 77.0369° W?
I have a large number of quieries like this and need an efficient way to pull the data.
Thanks!

7 件のコメント

Cris LaPierre
Cris LaPierre 2020 年 3 月 18 日
What is your data source?
MJ
MJ 2020 年 3 月 18 日
If you mean for the lat./lon. data, there is no specific data source. There are some events at different locations and times that I have in a spreadsheet. If you mean for the weather, I've no clue what source would be used by Matlab.
dpb
dpb 2020 年 3 月 18 日
編集済み: dpb 2020 年 3 月 18 日
(S?)He's asking for how you have the data you're trying to query...we can't see your terminal from here...
You've told us you have a spreadsheet; what we don't have as any idea whatsoever as to how it is constructed.
Attaching a representative piece of it would be one way, reading it as a table variable and attaching the resulting .mat file thereof another, just a text list of a few lines with column headings perhaps enough...
MJ
MJ 2020 年 3 月 18 日
編集済み: MJ 2020 年 3 月 18 日
Sure. Here is an example. I have over 10,000 rows like this:
Column A Column B (lati.) Column C (long.)
01/01/2020 38.9072 -77.0369
Adam Danz
Adam Danz 2020 年 3 月 18 日
MJ, I removed my answer about sunrise/sunset after I realized I was addressing the wrong question. Woops!
MJ
MJ 2020 年 3 月 18 日
No worries. Tnx
Adam Danz
Adam Danz 2020 年 3 月 18 日
編集済み: Adam Danz 2020 年 3 月 18 日
I'm assuming you have temperature data for a bunch of (latitude, longitude) and date values (3D array?).
To address your question, you can use ismembertol to match the latitude and longitude values with your reference values. ismembertol will match values that are close enough given the tolerance level. Then match the dates which may need to be adjusted to removed the time-part so that you're only working with dates.
We can't get too specific without having more detail about your data, how it's arranges, its precision, etc.

サインインしてコメントする。

回答 (1 件)

darova
darova 2020 年 3 月 18 日

0 投票

AN example
ii = 1:10;
str = sprintf('f%d ',ii);
str = strsplit(str,' ');
str(end) = [];
A = table(str',ii',ii'+3,...
'VariableNames',{'data' 'N' 'W'})
c1 = strcmp(A.data,'f2'); % find data 'f2'
c2 = abs(A.N-2) < 0.01; % find latitude '2'
c3 = abs(A.W-5) < 0.01; % find longitude '5'
ix = find(c1 & c2 & c3)

カテゴリ

ヘルプ センター および File ExchangeWeather and Atmospheric Science についてさらに検索

質問済み:

MJ
2020 年 3 月 18 日

回答済み:

2020 年 3 月 18 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by