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

(RESOLVED) "Error while reading domain time-independent attribute" Error for WEST-EAST_GRID_DIMENSION

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.


New member
Hi all,

I'm having trouble getting metgrid to run correctly. I'm using HRRR to initialize, and running WRF/WPS v.4.01 . I get the error message:

Processing domain 1 of 2
 WRF_DEBUG: NetCDF error: NetCDF: Attribute not found
 WRF_DEBUG: NetCDF error in ext_ncd_get_dom_ti.code INTEGER, line          83  Element WEST-EAST_GRID_DIMENSION
ERROR: Error while reading domain time-independent attribute.

ungrib and geogrid run fine, and the FILE files and files are present.

A ncdump of gives:
netcdf geo_em.d01 {
        Time = UNLIMITED ; // (1 currently)
        DateStrLen = 19 ;
        west_east = 91 ;
        south_north = 157 ;
        south_north_stag = 158 ;
        west_east_stag = 92 ;
        land_cat = 21 ;
        soil_cat = 16 ;
        month = 12 ;

and my namelist.wps file is as follows.
 wrf_core = 'ARW',
 max_dom = 2,
 start_date = '2018-01-12_10:00:00', '2018-01-12_10:00:00',
 end_date   = '2018-01-13_04:00:00', '2018-01-13_04:00:00',
 interval_seconds = 3600,
 io_form_geogrid = 2,
 debug_level = 1000,

 parent_id         = 1,1,
 parent_grid_ratio = 1,3,
 i_parent_start    = 1,9,
 j_parent_start    = 1,8,
 e_we          = 92,229,
 e_sn          = 158,313,
 geog_data_res = '30s','30s',
 dx = 9000,
 dy = 9000,
 map_proj =  'lambert',
 ref_lat   = 37.916,
 ref_lon   = -119.739,
 truelat1  = 37.916,
 truelat2  = 37.916,
 stand_lon = -119.739,
 ref_x = 46.0,
 ref_y = 79.0,
 geog_data_path = '/nfs/cluster/AWSdata/Research/Forecasting/EPRI/WRF/geog2/WPS_GEOG',

 fg_name = 'FILE',
 io_form_metgrid = 2,

 press_pa = 201300 , 200100 , 100000 ,
             95000 ,  90000 ,
             85000 ,  80000 ,
             75000 ,  70000 ,
             65000 ,  60000 ,
             55000 ,  50000 ,
             45000 ,  40000 ,
             35000 ,  30000 ,
             25000 ,  20000 ,
             15000 ,  10000 ,
              5000 ,   1000

Any help much appreciated!!

Best regards,
Hi Dan,

Can you issue this command:
ncdump -h >& geo.txt
and then attach the geo.txt file here so that I can take a look. It seems like the geogrid output may be missing something, and the ncdump output may help to track down what that missing thing is.

Can you also let me know which set of geogrid static data you are using? If you can point me to the link, that would be helpful.

Thanks so much, Kelly! I've attached geo.txt. The namelist points to the standard WRF static files that I grabbed just a few weeks ago.
Here's a directory listing:

ls ../../geog2/WPS_GEOG
albedo_modis          modis_landuse_20class_30s_with_lakes  orogwd_30m          varsso
greenfrac_fpar_modis  orogwd_10m                            soiltemp_1deg       varsso_10m
lai_modis_10m         orogwd_1deg                           soiltype_bot_30s    varsso_2m
lai_modis_30s         orogwd_20m                            soiltype_top_30s    varsso_5m
maxsnowalb_modis      orogwd_2deg                           topo_gmted2010_30s


  • geo.txt
    10.4 KB · Views: 67
It looks like you have all the necessary fields, but it's possible that they didn't all complete in their download. When I use your namelist to run geogrid, I am getting additional fields in the geo_em* file that I'm not seeing in yours. I'm attaching the ncdump from that so that you can compare, as well as an "ls -ls" of my WPS_GEOG directory so that you can compare sizes of data files (you'll see additional fields in my file because I have ALL the static data in that directory - you only need to pay attention to the fields you have - the mandatory data).


  • mygeo.txt
    16.6 KB · Views: 69
  • static_data_size.txt
    5.2 KB · Views: 61
Could you send your geogrid.log file, and if possible, could you also direct the standard output and standard error messages from geogrid into a file, too, e.g.,
./geogrid.exe >& log
The code in geogrid to write the 'WEST-EAST_GRID_DIMENSION' attribute is immediately below the code to write the 'SIMULATION_START_DATE' attribute (which is present in your file), so it could be that the geogrid program is printing some indication of an error that is easily overlooked. For reference, here's the code in question: .
Thanks to both of you. I had only downloaded the "highest solution of each mandatory field" package from , but will try downloading all of them individually and see if that makes a difference.

I've attached the geogrid log file, it complains about missing some fields, but completes successfully. I thought that was good enough, but maybe not!


  • geogrid.log
    31.3 KB · Views: 57
Hi Kelly,

Here's the ncdump -h from my file. I notice that at the end, the "global attributes" section is missing exactly the variable that metgrid is looking for and failing to find. It's a little puzzling, because the grid size is certainly in there in the dimensions section at the top. Any idea why geogrid would fail to generate the 'WEST-EAST_GRID_DIMENSION' line of "global attributes'?

Thanks, Dan View attachment dkdgeo.txt
1) Do you happen to be using a shared system with others, and if so, are they able to run this from their directories without any problem?
2) Can you send an 'ls -ls' from inside your static data directory so that we can see the file size of each of the data types:
ls -ls /nfs/cluster/AWSdata/Research/Forecasting/EPRI/WRF/geog2/WPS_GEOG >& wps_geog.txt
and then send that wps_geog.txt file?
@danny7kd If you could also note your compiler, compiler version, and library versions, that would be useful. I have a fuzzy recollection of a similar issue in the past when writing integer global attributes via WRF's I/O library, and it may have been related to either the compiler or netCDF library.
Hi all,

All fixed. Thanks again for your help. The issue had to do with multiple netcdf libraries installed on my system. I should have known, because I've run into this before, but in fixing one problem, I recompiled the system with the wrong libraries and that led to errors later on. The thing that was tripping me up specifically was that the call to ext_put_dom_ti_integer_scalar in output_module.F in the geogrid section of WPS was failing with no error message while the call to ext_put_dom_ti_real_vector worked just fine, so I didn't have much guidance about what was wrong. Using the correct libraries resolved the problem.

Thanks again for your time!

Thank you so much for the update and explanation of the problem. Hopefully this will help someone else out in the future!