Skip to content
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

Forecasting beyond 10 days #63

Open
tvonich opened this issue Feb 21, 2024 · 21 comments
Open

Forecasting beyond 10 days #63

tvonich opened this issue Feb 21, 2024 · 21 comments

Comments

@tvonich
Copy link

tvonich commented Feb 21, 2024

There's seems to be some default setting that won't allow a forecast beyond 10 days. I've tried identifying where in the code that might be and have not been able to find the spot.

Anyone successfully do this or know where to point me for fixing it?

@ws1234321
Copy link

Hello, I'd like to ask how you made the prediction within ten days. I entered 20 time data, but starting from the third data, the prediction is compared with the original data. I want to predict the time after 20 data. What should I do? If you know, please tell me, thank you.

@tewalds
Copy link
Contributor

tewalds commented Feb 22, 2024

Take a look at rollout.chunked_prediction. It takes a targets_template that defines how many outputs to generate. If you give it a template with more outputs it'll generate more outputs. You can generate as many as you want (months?), but don't expect it to generate predictions that are good much beyond 10 days. At some point it'll generate worse predictions than climatology, but I'm not sure when that is. If you want to evaluate it you'll obviously also need to get real data (from ERA5 or HRES) as we haven't included more than 10 days of example data.

@tvonich
Copy link
Author

tvonich commented Feb 23, 2024

Hello, I'd like to ask how you made the prediction within ten days. I entered 20 time data, but starting from the third data, the prediction is compared with the original data. I want to predict the time after 20 data. What should I do? If you know, please tell me, thank you.

If you check out the #32 and #56 I expect this is your same issue. It has to do with where the inputs are extracted from the example data.

@ws1234321
Copy link

Hello, I'd like to ask how you made the prediction within ten days. I entered 20 time data, but starting from the third data, the prediction is compared with the original data. I want to predict the time after 20 data. What should I do? If you know, please tell me, thank you.

If you check out the #32 and #56 I expect this is your same issue. It has to do with where the inputs are extracted from the example data.

Thank you. I think I understand a little. I will make changes in an aligned way. Thank you very much for your advice.

@ws1234321
Copy link

Hello, I'd like to ask how you made the prediction within ten days. I entered 20 time data, but starting from the third data, the prediction is compared with the original data. I want to predict the time after 20 data. What should I do? If you know, please tell me, thank you.你好,我想问一下你是如何在十天内做出预测的。我输入了 20 个时间数据,但从第三个数据开始,将预测与原始数据进行比较。我想预测 20 个数据之后的时间。我该怎么办?如果你知道,请告诉我,谢谢。

If you check out the #32 and #56 I expect this is your same issue. It has to do with where the inputs are extracted from the example data. ❗ 🔄

Hi, I'm sorry to bother you again. I operate on the data in a left aligned and right aligned manner. I use data from 1 to 20, and the training and evaluation steps are both 4. Left aligned, the predicted data are 3, 4, 5, and 6. Right aligned, the predicted results are 17, 18, 19, and 20. If I want to predict 21, 22, 23, and 24, what should I do? Thank you in advance

@tewalds
Copy link
Contributor

tewalds commented Mar 1, 2024

You need to generate a targets_template of the correct size. It can be filled with nans, but needs to be bigger than what you're currently passing in. You'll also need to generate the matching forcings.

@ws1234321
Copy link

You need to generate a targets_template of the correct size. It can be filled with nans, but needs to be bigger than what you're currently passing in. You'll also need to generate the matching forcings.

Thank you very much for your help. I will make adjustments as you said and express my thanks again.

@tvonich tvonich closed this as completed May 21, 2024
@tvonich
Copy link
Author

tvonich commented May 22, 2024

Take a look at rollout.chunked_prediction. It takes a targets_template that defines how many outputs to generate. If you give it a template with more outputs it'll generate more outputs. You can generate as many as you want (months?), but don't expect it to generate predictions that are good much beyond 10 days. At some point it'll generate worse predictions than climatology, but I'm not sure when that is. If you want to evaluate it you'll obviously also need to get real data (from ERA5 or HRES) as we haven't included more than 10 days of example data.

Timo, when you say it will generate worse error than climatology, does the error ever settle into a climatological plateau or does it grow forever?

@tvonich tvonich reopened this May 22, 2024
@ElNino9495
Copy link

Hi, I have a doubt, if i have my input as 1/1/24 06:00 and 1/1/24 12:00 and my targets are from 1/1/24 18:00 to 1/2/24 12:00 (TARGET SIZE OF FOUR) and i have the forcings of the following, can i iteratively use the outputs and successfully predict so on for a year?

@tvonich
Copy link
Author

tvonich commented Sep 10, 2024 via email

@ElNino9495
Copy link

Correct, but I'll also have to generate the corresponding forcings which will take a huge amount of time, right?

@tvonich
Copy link
Author

tvonich commented Sep 11, 2024 via email

@ElNino9495
Copy link

ElNino9495 commented Sep 23, 2024

I have managed to generate the forcings quickly but when i try to run my prediction model for 4 steps, the kernel always crashes. Is there something I can do to optimise my code?

@ElNino9495
Copy link

2024-09-23 11:07:11.281222: E external/xla/xla/service/slow_operation_alarm.cc:65] Constant folding an instruction is taking > 1s:

%add.675 = s32[3114720]{0} add(s32[3114720]{0} %broadcast.2435, s32[3114720]{0} %constant.620), metadata={op_name="jit()/jit(main)/while/body/mesh2grid_gnn/_process/mesh2grid_gnn/_process_step/mesh2grid_gnn/add" source_file="/data4/home/rohitsuresh/graphcast/graphcast/typed_graph_net.py" source_line=142}

this is the error i get

@tvonich
Copy link
Author

tvonich commented Sep 23, 2024 via email

@ElNino9495
Copy link

Its an nvidia a100 with 40gb ram and Im using the GraphCast_operational-ERA5-HRES_1979-2021-resolution_0.25-pressure_levels_13-mesh_2to6-precipitation_output_only.npz

@ElNino9495
Copy link

Screenshot 2024-09-24 at 7 13 21 AM Screenshot 2024-09-24 at 7 13 31 AM Screenshot 2024-09-24 at 7 13 46 AM

This is what my inputs, targets and forcings look like before i convert them to xarrays

@ElNino9495
Copy link

Hi, i was able to run it finally, but it took 20 minutes to make the predictions for 4 steps. Is this normal or can it be made faster?

@tvonich
Copy link
Author

tvonich commented Sep 24, 2024 via email

@ElNino9495
Copy link

ElNino9495 commented Sep 24, 2024 via email

@tvonich
Copy link
Author

tvonich commented Sep 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants