matthiasdemuzere / w2w

A python tool that ingests WUDAPT information into WRF.
MIT License
39 stars 16 forks source link

w2w problem #112

Closed Foxcrash2021 closed 1 year ago

Foxcrash2021 commented 1 year ago

Describe your issue

Hello, I encountered a problem while using w2w. I used the underlying surface updated with land use data from Liaoning Province in 2020 in China (which involves the reclassification of USGS by geographical data), and then used it/ Geogrid.exe generated a geographic file, and then I used w2w to generate an LCZ file, but this error occurred

ac35ce81ccfc36c6842df0cf91ea4cf

I don't know if it's because I updated the land use data

w2w --version

w2w -0.5.0

nc-config --all

netcdf-fortran-4.5.3
netcdf-c-4.7.4

Installed Packages

numpy==1.23.1

Traceback

https://user-images.githubusercontent.com/94523993/226560059-15b435bd-d4a9-4cda-9c60-33a2b51bcd5e.png
matthiasdemuzere commented 1 year ago

I do think this error occurs because of the updated land use data, that is not recognised by W2W. Yet hard to say without knowing how exactly you have updated the land use using "geographical data".

@dargueso perhaps you can follow-up?

dargueso commented 1 year ago

@matthiasdemuzere I can follow up, but I need information on the new land use data used. It looks like there is a problem with variables LU_INDEX and LANDUSEF, which may not be consistent. But hard to tell without the files. @Foxcrash2021, can you send us more info? Thanks

Foxcrash2021 commented 1 year ago

Okay, I'll provide more information, just a moment

Foxcrash2021 commented 1 year ago

Let me briefly describe how I update the data. First, I used the high-precision tif data from the Chinese Academy of Sciences to perform a reclassification based on USGS categories for the provinces I want to simulate. Some categories are missing, but the maximum number of categories 24 corresponds to USGS. Then

2956394e055717d97d69ccdfb7065a2

, I used the gdal tool to convert tif data into bil data. Based on the generated header file. hdr, I created an index file and binary geographic data, If LCZ partitioning is not used, just use/ I can continue to run the geogrid.exe process until a wrfout is generated. My wrf version is 4.3

eae1b97df8aaec346ef4dfcedcf7c10
dargueso commented 1 year ago

@Foxcrash2021, using alternative data sources is not supported by W2W in principle. However, I can have a look and see if I can help you. To that purpose, I need to see the actual geo_em file in order to understand where the error is coming from.

Foxcrash2021 commented 1 year ago

ok,thanks,I will upload later

Foxcrash2021 commented 1 year ago

here. 2020_geo_em.zip

Foxcrash2021 commented 1 year ago

"I did not update the d01 data and used the default ones, while I updated the d02 and d03 data."

dargueso commented 1 year ago

Hi @Foxcrash2021, I'm checking your files and there are a few things that puzzle me. Assuming you're using a USGS 24-cat system, in geo_em.d01.nc , it looks like there is no Urban areas (category 1). In geo_em.d02.nc and geo_em.d02.nc, the entire domain is category 16 (which is water in USGS), so it is impossible to replace any urban. Furthermore, if the domain would be entirely urban, the code isn't able to replace by the surroundings, because that information is not provided. It seems that you have to double check the conversion of your data. WRF works fine but I'm not sure the landscape is described as you expected.

Foxcrash2021 commented 1 year ago

Hi @Foxcrash2021, I'm checking your files and there are a few things that puzzle me. Assuming you're using a USGS 24-cat system, in geo_em.d01.nc , it looks like there is no Urban areas (category 1). In geo_em.d02.nc and geo_em.d02.nc, the entire domain is category 16 (which is water in USGS), so it is impossible to replace any urban. Furthermore, if the domain would be entirely urban, the code isn't able to replace by the surroundings, because that information is not provided. It seems that you have to double check the conversion of your data. WRF works fine but I'm not sure the landscape is described as you expected.

Thank you for your reply. I discovered what you said later, and it is true. It may be that something went wrong when I converted the data. I will carefully review it immediately. Thank you again for pointing out this key issue to me