NetCDF scale factor not being processed #1640
-
I've been working with NESDIS to get their ALEXI/GET-D product NetCDF output in a format that MET can process. We have made some great progress, but I'm not sure if the scale factor is being processed by MET. I ran the file through plot_data_plane to plot HDAY (or daily sensible heat flux) which shows plane min: -47204, plane max: 185084. If I use ncivew to view the variable the displayed range is -4.31 to 16.7494 MJ/m2/day. I'm wondering if the file isn't set up right to get MET to process the scale factor correctly? I was wondering if someone could take a look? I tried to add a .zip of the data file, output from plot_data_plane, and the GrADS images from NESDIS, but the file was too big! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
@malloryprow and others: There is a sample of the data on Cheyenne (/glade/scratch/barlage/getd/sample_data) if that's easy/easier for the MET crew to access. |
Beta Was this translation helpful? Give feedback.
-
Hi Mallory, And thanks for your question. I'm going to take a look at this data today (thanks to @barlage for pointing out where to find a sample of this!) to see what's going on, but my first guess is that MET is processing the data correctly: ncview takes a subsample of the full data to plot and oftentimes misses the finer details of the entire dataset, including the full plane scale. As I mentioned, I'll doublecheck this and see what I can find. A question for you: what should be the proper range for this data? Is MET correct (-47204 to 185084), or should it be the smaller scale that ncview displays (-4.31 to 16.7494)? This could also be a scale issue that can be corrected via the |
Beta Was this translation helpful? Give feedback.
-
Thanks to both, I was able to get in and see what there was to see. This is definitely a scale issue: I've attached two images from plot_data_plane.
The second image (scaled_image.png) shows what should occur with the scaling factor applied. I was able to accomplish this with
I'm going to tag @JohnHalleyGotway for a reference here, as I don't know if MET has (or should have) the capability to natively decode a |
Beta Was this translation helpful? Give feedback.
-
Hi all, @j-opatz asked me to take a closer look at this. I suspect that this is the first time we've run across NetCDF files that specify the scale_factor but not add_offset. And that's why we're seeing this behavior. On this line, the code is only parsing scale_factor and add_offset if BOTH are present. We could easily tweak that logic to process them independently. I read a bit in the CF-conventions doc, and saw this comment:
Based on that, I infer that neither, one, or both can be present, and they should be processed independently. I'll write up a bugfix issue about this. In the meantime, two options I see are...
|
Beta Was this translation helpful? Give feedback.
Hi all, @j-opatz asked me to take a closer look at this. I suspect that this is the first time we've run across NetCDF files that specify the scale_factor but not add_offset. And that's why we're seeing this behavior.
On this line, the code is only parsing scale_factor and add_offset if BOTH are present. We could easily tweak that logic to process them independently.
I read a bit in the CF-conventions doc, and saw this comment:
Based on that, I infer that neither, one, or both can be present, and they should be processed independently. I'll write up a bugfix issue about this.
I…