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

Misplaced urban areas #105

Closed
flaviandribeiro opened this issue Nov 29, 2022 · 11 comments
Closed

Misplaced urban areas #105

flaviandribeiro opened this issue Nov 29, 2022 · 11 comments

Comments

@flaviandribeiro
Copy link

Describe your issue

I'm trying to use LCZ classification for São Paulo state, Brazil. I was able to run the program successfully, but the resulting file shows a misplaced urban classification. Note that there are urban areas at the coastline in LCZSPInt.tif, but the geo_em.d03_LCZ_params.nc file places them outside (northwest from) the coast. It seems that the geographical projections are off, but it uses EPSG 4236. LCZSPInt.tif was extracted from the LCZ global map produced by Demuzere et al. (2022). If you could help me with any clues on how to solve this, it would be greatly appreciated.
Captura de tela de 2022-11-29 12-01-30
Captura de tela de 2022-11-29 12-00-50
LCZ-SP.zip

w2w --version

w2w.0.4.2

nc-config --all

--cc            -> /usr/bin/cc
  --cflags        -> -I/usr/include -I/usr/include/hdf5/serial
  --libs          -> -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf
  --static        -> -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl

  --has-c++       -> no
  --cxx           -> 

  --has-c++4      -> no
  --cxx4          -> 

  --has-fortran   -> no
  --has-dap       -> yes
  --has-dap2      -> yes
  --has-dap4      -> yes
  --has-nc2       -> yes
  --has-nc4       -> yes
  --has-hdf5      -> yes
  --has-hdf4      -> no
  --has-logging   -> no
  --has-pnetcdf   -> no
  --has-szlib     -> no
  --has-cdf5      -> yes
  --has-parallel4 -> no
  --has-parallel  -> no

  --prefix        -> /usr
  --includedir    -> /usr/include
  --libdir        -> /usr/lib/x86_64-linux-gnu
  --version       -> netCDF 4.7.3

Installed Packages

numpy==1.23.2

Traceback

No response

@matthiasdemuzere
Copy link
Owner

@flaviandribeiro, could you please also provide the original geo_em files? For sure geo_em.d03.nc, so that we can check what happens ...

@flaviandribeiro
Copy link
Author

Yes, for sure.
geo_em.d03.zip

@flaviandribeiro
Copy link
Author

I'm sending the others too
geo_em.d0.zip

@jkittner
Copy link
Collaborator

didn't we fix something similar in #60?

@matthiasdemuzere
Copy link
Owner

didn't we fix something similar in #60?

That is what I thought as well. I have to check the projection that is embedded in the files of @flaviandribeiro and see whether our implementation of #60 is buggy or not?

@matthiasdemuzere
Copy link
Owner

So I just ran this example myself. And indeed, the LCZ pixels seems to be shifted north-west-ward.

I do think this must be related to #60, even though in this case MAP_PROJ = 1 (the Lambert projection), which so far never caused issues?

As I am not sure where to start, it might take a bit of time to figure this one out ...

@yoselita
Copy link

We have also problem with the misplacement of the urban areas, and also may be related to the issue #60. We are working with the rotated latlon projection, and it looks like the w2w tool does not read the projection correctly. In the code the standard equidistant latlon projection is defined (i.e. MAP_PROJ = 6), but the rotated latlon option is not, and therefore I guess the projection is not read correctly, and the LCZ data are not correctly interpolated and therefore misplaced.

I tried to add the projection into the w2w.py code following the link given within the code, but I did not make it work.
Screenshot from 2023-01-16 18-31-14

The changes I tested in the forked w2w repository that you can find on this link.

We would appreciate any kind of help, as the most of the climate simulations that we are performing are on the rotated latlon projection.

@matthiasdemuzere
Copy link
Owner

Hi @yoselita: I am sorry to hear you also have issues with the reprojection.
Would it be possible to share your geo_em files, and clipped LCZ map?

@yoselita and @flaviandribeiro: I currently do not have much time to look into this. Not sure if one of you already found a solution to this problem?

@yoselita
Copy link

Thank you @matthiasdemuzere. Unfortunately, I haven't found yet the solution to the problem. You can download the files I was using to create the map shared above from this link.

@flaviandribeiro
Copy link
Author

flaviandribeiro commented Jan 26, 2023 via email

@flaviandribeiro
Copy link
Author

flaviandribeiro commented Apr 6, 2023 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