[MITgcm-devel] missing_value in mds diags

Jean-Michel Campin jmc at ocean.mit.edu
Thu Jun 23 12:42:02 EDT 2011


Hi Martin and Gael,

I've just made the changes in pkg/diagnostics.
Let me know if this works for you.

There is one thing that was not very clear to me, around line 134
in diagnostics_mnc_out.F, regarding this call:
> C     suppress the missing value attribute (iflag = 0)
>         CALL MNC_CW_VATTR_MISSING('diag_levels', 0,
that use to be done only IF (useMissingValue).
It's now always called, since missing values can be found also 
when writing a counter-diagnostics (with fraction-weight), but
not sure exactly when this is really needed.

Also, I think it would be better to set the logical parameter
"missingValFillsMask" as a run-time parameter in data.diagnostics
and remove the CPP option DIAGNOSTICS_MISSING_VALUE (it's only used 
to set missingValFillsMask to true).
Not sure that "missingValFillsMask" is the best name, could be
changed before it makes its way to data.diagnostics.

Cheers,
Jean-Michel

On Thu, Jun 16, 2011 at 02:03:00PM -0400, Jean-Michel Campin wrote:
> Hi Martin and Gael,
> 
> Since I changed recenty diagnostics_out.F and was going to 
> change it again soon, I can do the missing-value modifications
> we agree on.
> 
> The simplest thing to do would be to use the same missing value
> (default = UNSET_RL & can be specified on a per file basis
> in data.diagnostics) 
> a) for all D*_FRACT_FILL diagnostics (whether or not we use MNC or 
>   DIAGNOSTICS_MISSING_VALUE is defined or not).
> b) and in MNC output as it is now.
> 
> Right now case (a) is always UNSET_RL (except if fizhi is compiled)
> which could results in 2 differents misssing value in an MNC file
> (one over land, and reported as missing-value in NetCDF file header
>  and the UNSET_RL where the average fraction is zero, which is not
> reported as a missing value in the NetCDF header); and my impression
> is that it's tricky/comfusing to maintain this double special 
> value thing, so would go for just one.
> 
> And regarding the default, I agree with Martin, and when I talked
> to Gael I made the same point, so I propose that we stick to what 
> we agree on, and keep the default missing value as it is now.
> 
> Cheers,
> Jean-Michel
> 
> On Thu, Jun 16, 2011 at 10:30:34AM -0700, Martin Losch wrote:
> > Hi Gael,
> > 
> > long ago I tried to implement some reasonable "missing_value" attribute for mnc output. This attribute needs to be turned on explicitly (define DIAGNOSTICS_MISSING_VALUE) and then the missing value defaults to UNSET_RL/RS/I etc. The implementation is a little incomplete and not entirely general, so I think that the way this is done is the best I could do at that time.
> > The D*_FRACT_FILL is a bit different, and I do not even remember, if the missing_value stuff works with mnc and this routine.
> > 
> > For MDS, on the one hand having missing_value=0 seems sensible, as this is what we have for land points already.  On the other hand, you cannot decide between land points and points where there is no ice and you might want to have value indicating this? 12345.6 is a very unlikely number that you not get by chance, while 0 can happen, especially when there is no ice cover. I am not sure. 
> > 
> > May I ask that the default missing_value for mnc remains unchanged (UNSET_RL/RS/I)?
> > 
> > Martin
> > 
> > On Jun 15, 2011, at 4:59 PM, Gael Forget wrote:
> > 
> > > Dear all,
> > > 
> > > while preparing the diags for seaice tracers, which are done with DIAGNOSTICS_FRACT_FILL, 
> > > I had a hard time figuring out why the fields were 12345.6 (i.e. the value of UNSET_RL) where
> > > there is no ice. My initial reaction was obvisouly that I coded something terribly wrong.
> > > Then I noticed the missing_value run time parameter and set it to 0. It did not do me 
> > > any good because it is only used with mnc. After discussing this with Jean Michel, 
> > > I would propose we make this capability effective with mds, and possibly set the 
> > > missing_value default to 0 for mds diags.
> > > 
> > > I understand that the missing value is not presently written in the 
> > > meta file, so the average user cannot what the missing value is
> > > (I did not until two days ago). This is true regardless of whether
> > > the missing value is 12345.6 or 0. Also, assuming a user decides to 
> > > specify it, then it implies that at least he knows what the value is. So 
> > > I think he should be allowed to specify and use missing_value with mds.
> > > 
> > > Furthermore, with the 12345.6 value, the first reaction when plotting a field
> > > is not 'this is the missing value' but 'this diagnostic file' is completely wrong. 
> > > Typically, I suspect some users will shy away from the generic seaice tracer
> > > stuff, or send emails to support, just because the diags look ugly at first glance. 
> > > So I would prefer a zero default for the diags missing_value with mds.
> > > 
> > > I was wondering whether someone disagrees or has suggestions?
> > > 
> > > Cheers,
> > > Gael
> > > 
> > > 
> > > _______________________________________________
> > > MITgcm-devel mailing list
> > > MITgcm-devel at mitgcm.org
> > > http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > 
> > 
> > _______________________________________________
> > MITgcm-devel mailing list
> > MITgcm-devel at mitgcm.org
> > http://mitgcm.org/mailman/listinfo/mitgcm-devel
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel



More information about the MITgcm-devel mailing list