Do nodata values in rasterfile cause errors?

119 views
Skip to first unread message

Joachim

unread,
Apr 24, 2020, 10:26:42 AM4/24/20
to wrf-hydro_users
Hi,

I am using WRF-Hydro in standalone mode. I have successfully run WRF Hydro on Domains where everything is covered by land mass but currently I  am having issues when running WRF Hydro when the domain is touching the sea (i.e. the rasterfile used in the preprocessing has 'nodata' values). First I thought that the errors encountered are coming from these "nodata" entries where the sea is. I replaced all "nodata" values in the rasterfile with zero values, but I still can't run wrf_hydro.exe successfully. Therefore my question is: do nodata entries in my rasterfile cause errors? What is the best way to deal with this situation if one wants to run a domain which includes such values?

Thank you for your help

Best regards, 

Joachim




Kevin

unread,
Apr 24, 2020, 11:17:01 AM4/24/20
to wrf-hydro_users
Joachim,

NoData values are perfectly acceptable in the input high-resolution elevatoin layer (DEM) in the GIS Pre-processing tools. We frequently build model domains that contain coastlines and ocean areas, where the input DEM will contain NoData. Wherever a valid NoData value exists in the input DEM, it is converted to the WRF-Hydro nodata value (-9999) on the model grid. Have you checked the LU_INDEX and LANDMASK values in your input geo_em.d01.nc ("geogrid") file, to ensure that these are being represented as "water" in the Land Surface Model?


Kevin

Joachim

unread,
Apr 28, 2020, 4:07:17 PM4/28/20
to wrf-hydro_users
Hi Kevin

Thanks for your help! I checked the LU-Index for water which is 17 when taking the Landuse file from 'modis_landuse_20class_30s_with_lakes'. In the tutorial the 'usgs_30s' file is used, where the  water is indexed with 16. I think this is where the error is occuring. I now changed in the GEOGRID:TBL to the following:

name=LANDUSEF
        priority=1
        dest_type=categorical
        z_dim_name=land_cat
        dominant = LU_INDEX
        landmask_water =        default:17         # Calculate a landmask from this field
        interp_option =        default:nearest_neighbor
        rel_path =        default:modis_landuse_20class_30s_with_lakes/

 In the geo_em.d01.nc it is now also stated that:

:ISWATER = 17 ;
:ISLAKE = 21 ;
:ISICE = 15 ;

Unfortunately, running wrf_hydro.exe still is not working. Do you know if there is more to chnage to make sure the right index is used as water?

Thank you and best regards, 

Joachim

aubrey

unread,
Apr 29, 2020, 6:29:50 PM4/29/20
to wrf-hydro_users
We have not tested the code with land cover classifications that use separate categories for water and lake. Try using either the standard USGS or MODIS (no lake) classification systems.

Thanks!
Aubrey

Joachim

unread,
Apr 30, 2020, 10:55:11 AM4/30/20
to wrf-hydro_users
Hi Aubrey, thanks for your help! I downloaded the landuse data from the https://www2.mmm.ucar.edu/wrf/users/download/get_sources_wps_geog.html website, which is recommended in the WRF Hydro documentation. This is where I got the modis_landuse_20class_30s_with_lakes file. There is another file (without the lakes) called modis_landuse_20class_15s (is this the one you mean by 'no lake'?). Unfortunately the link doesn't work anymore and I can't try it out. Do you know where I can download the landuse files (globally) which will be compatible with WRF Hydro?

Thank you and best regards

Joachim

Kevin

unread,
Apr 30, 2020, 10:58:59 AM4/30/20
to wrf-hyd...@ucar.edu
Joachim,

The 'landuse' layers, except 'landuse_30s_with_lakes' should work.

Kevin

Joachim

unread,
May 6, 2020, 10:36:42 AM5/6/20
to wrf-hydro_users
Hello Kevin

Thank you for your hint. I tried the dataset you mentioned but unfortunately it is not working as well. If I run it over land, it works well. The land mask layer seems fine as well. Somehow I can't figure out the root of the problem but will continue searching. Thank you for your help anyways.

Best regards, Joachim

Joachim

unread,
May 12, 2020, 10:21:31 AM5/12/20
to wrf-hydro_users
Hi everyone 

I tried to go all the way back to the Lambert-tutorial from the wrf-hydro training. Now i tried to just move the domain a little bit further south so the sea is included in the domain ( I have attached the namelist.wps file). This time I din't change the landuse file from what is provided in the WPS tutorial. The rasterfiles used in the preprocessing I took from hydrosheds, as it is recommended in the documentation. The Forcing data I took from GLDAS. Everything else I strictly did according to the tutorial. But again I have the problem, that when I try to run the simulation it crashes. The same process over land works fine. Is there something else I am missing here? Is this not supposed to work with the setup from the wrf hydro training container or the files from the WPS container? I also attached the log files.

Thank you for your help

Joachim



On Thursday, April 30, 2020 at 3:58:59 PM UTC+1, Kevin wrote:
diag_hydro.00001
namelist.wps
run.log

Walter

unread,
May 12, 2020, 10:30:39 AM5/12/20
to wrf-hydro_users
Hey Joachim

I had a look at the diag_hydro.00001 file you have shared.

I faced the same problem where LWDN has a value -9999.

I wrote a shell script that replaces missing values of -9999 with 0 in the forcing data.

By doing this, I solved the error and got my model to run.

Cheers

Walter

Joachim

unread,
May 13, 2020, 6:04:25 AM5/13/20
to wrf-hydro_users
Thank you Walter

I followed your advice and now it is running. Thank you very much!

Cheers 

Joachim

Walter Samuel

unread,
May 13, 2020, 8:14:32 AM5/13/20
to wrf-hyd...@ucar.edu
Glad I could help you. Molly and Katelyn had answered this query earlier in another thread. 

Regards

Walter


--
You received this message because you are subscribed to the Google Groups "wrf-hydro_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wrf-hydro_use...@ucar.edu.
To view this discussion on the web visit https://groups.google.com/a/ucar.edu/d/msgid/wrf-hydro_users/8042c1a0-1c10-4ce1-b52c-3f129c93bcb4%40ucar.edu.

Orzu Odinaev

unread,
Jan 23, 2023, 1:38:35 AM1/23/23
to wrf-hydro_users, Walter
Hey Walter,
I have the same error, could you please share that script replacing -9999 with 0?

Orzu Odinaev

unread,
Jan 23, 2023, 1:39:17 AM1/23/23
to wrf-hydro_users, Joachim
Hey Joachim,
I have the same error, could you please share that script replacing -9999 with 0?

Reply all
Reply to author
Forward
0 new messages