NetCDF File Issue with MODE #2333
-
Hello myself and @ebower084 are working on generating a QPF ensemble mean netCDF file and then running that through MODE. When trying to run the netCDF file through MODE I get the following error: ERROR : @ebower084 has tried changing some of the details in the netCDF file to match files that are confirmed to work with MODE but we keep running into this error. At this point we don't know if it is a netCDF file issue or if something needs to be adjusted in my MODE script for it to properly read the file. The ncdump for the file we are trying to use is the following: dimensions: // global attributes: If you need the actual netCDF file, let me know and I will work on sending that over to the anonymous FTP. Thank you for any help you can provide. Ben Albright |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Hi Ben, And thank you for your question. Given the wording of your error code,
It seems like you may be improperly using the "*" character in your configuration file. From the MET User's Guide, it provides the following guidance for netCDF levels:
So the only places in the level information that need an asterisk character are those 2-D arrays. In a MET configuration file, the dictionary might look like
Would you be able to provide the configuration file that is pulling in the netCDF information? |
Beta Was this translation helpful? Give feedback.
-
Hi Ben: The problem is with your forecast file. It's not in a format that MET can read, although it's close to MET's netCDF format. There are a couple of issues to fix. The first is the global attribute file_type = "NETCDF_NCCF" ;. NETCDF_NCCF specifically refers to CF compliant netCDF files. Since yours is not in this format, it would be good to remove this attribute. Second, the dimensions are inconsistent between the global attributes and the variables. The global attributes list nx = 1799 and nx = 1059. However, at the top of the file, the dimensions say x = 1059 and y = 1799. Additionally, a MET NETCDF file typically uses lat and lon as the dimensions rather than x and y. I ran a quick test removing the file_type global attribute and changing the dimensions to what are listed below: There is also another caveat. When I read this into MODE, it sets the forecast time to be 19700101_000000 This is the default time MODE uses when it cannot find date/time information in a file. For a MET version netCDF, the time information needs to be stored as attributes of the variable. Your observation file shows how this should be specified. If you want MET to read the date and time information on your forecast data, then you will want to add the attributes below to the apcp_24hr variable: Christina |
Beta Was this translation helpful? Give feedback.
Hi Ben:
The problem is with your forecast file. It's not in a format that MET can read, although it's close to MET's netCDF format. There are a couple of issues to fix. The first is the global attribute file_type = "NETCDF_NCCF" ;. NETCDF_NCCF specifically refers to CF compliant netCDF files. Since yours is not in this format, it would be good to remove this attribute. Second, the dimensions are inconsistent between the global attributes and the variables. The global attributes list nx = 1799 and nx = 1059. However, at the top of the file, the dimensions say x = 1059 and y = 1799. Additionally, a MET NETCDF file typically uses lat and lon as the dimensions rather than x and y. I ran a qui…