Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

CLC Corine Land-Use into Geogrid -

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

L Alvarez

New member
Hello there,

I have downloaded the european coverage of Corine Land Use, and I have cut for my area of ​​interest. Then I projected for WRG84 ->
https://www.eea.europa.eu/data-and-maps/data/clc-2006-raster-3#tab-derived-datasets

I have converted it to geotiff format ->
https://www.dropbox.com/s/o4lcg9egadmmj14/hola3.tif?dl=0

Later I have converted it to ascii format ->

Code:
gdal_translate -of AAIGrid hol3.tif h.asc

This has created me 3 files; .asc, .asc.aux.xml and .prj
Here I stand, I know that i have to reclassify the layers (USGS), I think, but I don't know how it's done and convert it to being read by Geogrid.

Anyone have experience here?..
Thank,

L. Alvarez
 
Rather than converting to ASCII and then to the binary format used by the geogrid program, you can convert a GeoTIFF directly to the binary raster format used by geogrid using GDAL's gdal_translate tool; e.g.,
Code:
gdal_translate -of ENVI hola3.tif hola3.dat
The gdal_translate tool will print to the screen the number of columns and the number of rows in the dataset
Code:
Input file size is 1107, 977
0...10...20...30...40...50...60...70...80...90...100 - done.
which you can use to rename, e.g., hola3.dat to 00001-01107.00001-00977 .
 
Hello mgduda,

I'm still drifting with this matter.
With the following steps, I see that it conflicts with my SRTM terrain data at 3s, which used to work.
(attached all these files compressed)

My steps are:

1) I have a tif file georeferred to wgs84 (final.tif)

2) I use a python script to reclassify land use from 44 to 24 according to USGS (reclassify.py)
(I don't know if this step is strictly necessary. Can the model recognize the 44 native categories of Corine Land Use?)
./reclassify.py final.tif output.tif

3) I run gdal, to make geogrid executable as you suggested.
gdal_translate -of ENVI output.tif geogrid.dat
Input file size is 1920, 1011
0...10...20...30...40...50...60...70...80...90...100 - done.

4) rename then, geogrid.dat to 00001-01920.00001-01011

5) I create my index file ->
(With the geogrid.hdr file I extract some values)

ENVI
description = {
geogrid.dat}
samples = 1920
lines = 1011
bands = 1
header offset = 0
file type = ENVI Standard
data type = 1
interleave = bsq
byte order = 0
map info = {Geographic Lat/Lon, 1, 1, -17.173185353, 28.876852643, 0.000696270173958334, 0.00116987870227498,WGS-84}
coordinate system string = {GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]}
band names = {
Band 1}


Code:
type=categorical
category_min=1
category_max=24
projection=regular_ll
dx=0.000696270173958334
dy=0.00116987870227498
known_x=1.0
known_y=1.0
known_lat=28.876852643
known_lon=-17.173185353
wordsize=4
tile_x=1920
tile_y=1011
tile_z=1
tile_bdr=0
missing_value = 0
units="category"
description="CORINE (UE project)"


6) I modify my GEOGRID.TBL
(I have doubts here)


Code:
===============================
name=LANDUSEF
        priority=1
        dest_type=categorical
        z_dim_name=land_cat
        dominant = LU_INDEX
	...
	...
        landmask_water =        default:17,21      # Calculate a landmask from this field
	...
	...
	...
	...
        interp_option =        default:nearest_neighbor
        interp_option =       lan_3s:nearest_neighbor
	...
	...
	...
        rel_path =         lowres:modis_landuse_20class_5m_with_lakes/
        rel_path =        default:modis_landuse_20class_30s_with_lakes/
        rel_path=              land_3s:land_3s/


7) in my namelist.wps file
(geog_data_res = 'default','default','default','3s+land_3s',)
 

Attachments

  • corine_land_use.zip
    163.4 KB · Views: 113
  • geo_em.d04.nc.zip
    3.2 MB · Views: 86
  • 1.png
    1.png
    35.5 KB · Views: 2,496
  • 2.png
    2.png
    41.8 KB · Views: 2,496
I know its been a while since this post was activated but i just wanted to ask, if u finally managed to change the USGS to Corine land use data successfully in the WPS. If u want please share the steps u followed to do so....Thanks in advance!!

Dimitris
 
Hi,
I am having the same problem mentioned here. Any chance someone solved it?

The strange thing is that when I check at the NC file (created converting the tiff one with gdal -Input file size is 20303, 1561:cool:, I do not get any invalid value: (cdo infov)

-1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter name
1 : 0000-00-00 00:00:00 0 317092254 0 : 1.0000 12.129 33.000 : Band1

But when running geogrid with debug 1000 I get:
WARNING: In source tile ./WPS_GEOG/corine/00001-20303.00001-15618, point (1076, 131) has an invalid category of 0

I appreciate the help!
Thanks
Ari
 
Top