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

Questions about landscape_gen_funcs.py #30

Closed
MikeRiz521 opened this issue Jun 17, 2024 · 8 comments
Closed

Questions about landscape_gen_funcs.py #30

MikeRiz521 opened this issue Jun 17, 2024 · 8 comments

Comments

@MikeRiz521
Copy link

MikeRiz521 commented Jun 17, 2024

I want to generate a landscape file for the area of my interest, and I have already gathered the necessary rasters from CORINE for fuels and EuroDEM for the elevation. However I do have some questions:

  1. Should the produced elevation and fuel maps have the same dimensions? I did not see any part of the code about downsampling any of the two input rasters to match their resolutions, should the input raster files already have the same resolution?
  2. Should both raster files be reprojected on a common CRS? On the example file you are using epsg:5880, but then your reproject onto a different CRS for Aullenne when running the resolution, why are you doing that? Can I just not use the two raster files on whatever CRS they originally are? And if I do have to reproject both rasters on a common CRS, should I use the one specific for my area, or should I just use the epsg:4326 which is used by google?
  3. How large can the maps be on the landscape.nc for the simulation to not crash, is there a limit on the dimensions?
  4. The netcdf module from netCDF4 does not seem to have the function that you use for creating the lndscape.nc file, netcdf_file, shouldn't this bug be fixed? I tried to use the netcdf module from scipy.io and it seems to have worked, though I am not sure.

Thank you in advance for your responses, I will appreciate your help a lot since this script seems to be a very usefull tool to create a landscape.nc file, which is not easy to do from scratch

@filippi
Copy link
Contributor

filippi commented Jun 21, 2024

Hi, sorry for late answer,

  1. you can use whatever you want as long as the data is consistent, and you know what you are doing, each layer can have its own resolution but should have the same reference and extent.
  2. as for projection, same, whatever cos, but it must be conformal and consistent between layers. ForeFire do not handle projections, it assumes data is consistent and metric.
  3. I tried it up to 5000X5000, it is not really suppose to do much more
  4. All these helper scripts are really here to get started, every user eventually built their own, just use the netcdf lib you like the most.

@MikeRiz521
Copy link
Author

Thank you for your response, I managed to generate my own landscape.nc file that looks good in the EDA. However now I have an issue with the simulation. More specifically, I have used a single band of southern wind, and the example aullene.ff file, but the fire propagation stays the same triangular shape only a bit bigger. I understand that according to your documentation, if we don't use specific wind columns to our landscape through WindNInja, then the wind depends on the triggers we put in the ForeFire file. I also understand that loc=(0.,0.,0.) is the ignition point. So what do I need to change to see a different polygon in the simulation than just a triangle? Thank you!

@filippi
Copy link
Contributor

filippi commented Jun 25, 2024

Well, a triangle not getting bigger, is a fire not starting. Have you tried to update and use the pyForeFire library ?
look at the wind example, it gives more idea on how to build the fields, it depends so much on your use case that there is no general answer

@MikeRiz521
Copy link
Author

Is the wind example in landscape_gen_funcs.py, or somewhere else? Basically I just took the example in there and removed the 7 bands

@filippi
Copy link
Contributor

filippi commented Jun 25, 2024

It is on the other depot with the python bindings :
https://github.com/forefireAPI/pyForeFire

@MikeRiz521
Copy link
Author

Thank you, I'll have a look and I will let you know if I have any further questions!

@MikeRiz521
Copy link
Author

So it says you need the netCDF libraries and ther netCDF-CXX libraries, however on the netCDF download page it only offers libraries for C, C++, Fortran and Java. Which one of these do I need for pyForeFire?

@filippi
Copy link
Contributor

filippi commented Oct 4, 2024

cXX is c++, take this one, but overall it may depends on your system

@filippi filippi closed this as completed Oct 4, 2024
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

2 participants