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

Missing values being set incorrectly

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.

thodgdon818

New member
I am adding a new static data field into geogrid and want to set the "missing_value" parameter in the index file and GEOGRID.TBL to 10.0. I can generate geo_em files that have the correct values where data was specified. However where missing data was present, the geo_em.d0*.nc files output half of the missing values as 10.0 and the other half as 2.14e6. The index file and information added into the GEOGRID.TBL is listed below for reference. I also have attached an example geo_em file to view the output.

Index file:
type = continuous
signed = no
projection = lambert
dx = 1995.445353
dy = 1995.445353
known_x = 1.0
known_y = 1.0
known_lat = 29.487809
known_lon = -120.640584
truelat1 = 39
truelat2 = 39
stdlon = -108
wordsize = 4
tile_x = 604
tile_y = 403
tile_z = 1
units = "mg/m^2/s"
row_order = top_bottom
endian = little
missing_value = 10
scale_factor = 0.001
description = "mean dust emission potential"

GEOGRID.TBL entry:
===============================
name=DUST
priority=1
dest_type=continuous
interp_option=default:sixteen_pt
masked=water
fill_missing=10.
rel_path= default:dust_flux/
===============================
 

Attachments

  • geo_em.d01.nc
    20.8 MB · Views: 61
As a simple test, I used your 'index' file and 'GEOGRID.TBL' entry, and created a synthetic dataset with a small box of missing data from Python:
Code:
import numpy as np
a = np.empty((403,604), dtype=np.int32)
a[:,:] = 3.142 * 1000.0
a[100:150,200:250] = 10.0
a.tofile('00001-00604.00001-00403')
When I run geogrid.exe, it appears that the data are mapped correctly to my domain, with the parts of the domain that are not covered by the data or are covered by missing data being filled in with whatever value I prescribe in the GEOGRID.TBL entry with the 'fill_missing' keyword.

Could you give a try with a dataset created by the script, above, and see whether that works? If it does, then it may be that there's something particular to the dust dataset that you've prepared.

Also, which version of the WPS are you running?
 
I am using WPS version 4.0. It appears that when I use the data generated from your script, it works just fine. If I open the file I had generated in ArcGIS it appears to look correct.
 
I figured out my issue. I had specified the wrong no data value in the index file. The no data should have been set to 21478483047, not 10. Half of the pixels were handled correctly due to the water mask flag being set.
 
Top