Comments (5)
It's not very clear in your description and code as to how you produced the forecast, I assumed that you have largely followed the processes laid out in the jupyter.
One of the reasons that you could be getting an all np.nan
result is that some of your forcing_variables
are not filled in correctly, most likely toa_incident_solar_radiation
, that is, all of the target timesteps' toa_incident_solar_radiation
must be supplied.
from graphcast.
@Aquila96 Thank you very much for your answer. Your demo data is complete global data, I added my code after your "Load weather data" section, my purpose is to only input my interest area and predict the result of this area, but the final result is nan.If it is wrong according to what you said, how should I correct it? Thank you very much for your reply.
@Aquila96
with gcs_bucket.blob(f"dataset/{dataset_file.value}").open("rb") as f:
example_batch = xarray.load_dataset(f).compute()
SHP = geopandas. Read_file ('/content/drive/MyDrive/graphcast - the main/SHP/roi. SHP ')
example_batch.rio.set_spatial_dims(x_dim="lon", y_dim="lat", inplace=True)
example_batch.rio.write_crs("WGS1984", inplace=True)
example_batch = example_batch.rio.clip(shp.geometry.apply(mapping),shp.crs)
from graphcast.
@Aquila96 Thank you very much for your answer. Your demo data is complete global data, I added my code after your "Load weather data" section, my purpose is to only input my interest area and predict the result of this area, but the final result is nan.If it is wrong according to what you said, how should I correct it? Thank you very much for your reply. @Aquila96
with gcs_bucket.blob(f"dataset/{dataset_file.value}").open("rb") as f: example_batch = xarray.load_dataset(f).compute() SHP = geopandas. Read_file ('/content/drive/MyDrive/graphcast - the main/SHP/roi. SHP ') example_batch.rio.set_spatial_dims(x_dim="lon", y_dim="lat", inplace=True) example_batch.rio.write_crs("WGS1984", inplace=True) example_batch = example_batch.rio.clip(shp.geometry.apply(mapping),shp.crs)
I'm not familiar with rioxarray
but it appears that the you have not supplied new data but simply clipped the example_batch
(rio.clip()
) to be the area you wanted (following the shp
file). This will introduce np.nan
values in the input (blank areas in your leftmost plot), the behaviour of GraphCast is that it does not like np.nan
values anywhere in its forcing and input terms, so an all nan output is to be expected.
The model is designed to accept strictly global initial conditions with pre-defined grid sizes, inputs not following the prescribed data formulations would generate np.nan
or inaccurate results.
from graphcast.
I don't quite follow what you're trying to do, but graphcast only works on the whole world, not on patches of any type. If you try to make predictions where some of the inputs are nonsensical (eg all zeros, or nans), you will get nonsense outputs (eg all nans) which may well be rendered as all white.
from graphcast.
I think Timo's reply above pretty much summarises it, closing.
from graphcast.
Related Issues (20)
- Obtaining successive forecasts based on previous predictions HOT 1
- Are forcing variables repeated? HOT 2
- Haiku needs all `hk.Module` must be initialized inside an `hk.transform` HOT 1
- About loss weights HOT 3
- GPU / TPU memory requirements for training HOT 3
- [GraphCast Operational Model] Issue with Negative Precipitation Data in GraphCast Operational Model Output HOT 2
- How to get the data in the paper? HOT 1
- weights license - use of graphcast HOT 5
- Graphcast error on Mac os HOT 1
- Problems feeding data to operational model: Target variable geopotential_at_surface must be time-dependent HOT 1
- when is the prediction result of this demo? HOT 2
- Forecasting beyond 10 days HOT 8
- Cyclone tracking
- There are some questions about forecasting. HOT 1
- Fine-Tuning Strategy for the GraphCast Operational Model HOT 2
- About the atmospheric variable “Vertical velocity”
- about the autoregressive finetuning
- How to train a model by myself HOT 4
- How get the value from model dataset, such as norm_prediction?
- graphcast intro description needs ERA5 link fixing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphcast.