Opened 17 years ago
Closed 17 years ago
#226 closed upgrade (Done)
_FillValue logic in output NetCDF files
Reported by: | arango | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.2 |
Component: | Nonlinear | Version: | 3.2 |
Keywords: | Cc: |
Description
The _FillValue logic introduced in src:ticket:222 broke when wetting and drying is activated. In this case, the bathymetry array becomes time-dependent and the tindex>0 and nVdim>2 logic to avoid masking no longer works. Recall that we cannot mask the bathymetry array in ROMS because h=0 in such areas and will give NaNs when dividing by h.
This implies that we need a more sophisticate logic to replace masked areas with _FillValue during IO. The less intrusive solution is put an optional argument (..., SetFillVal) to the nf_fwrite*d and def_var routines. Since optional arguments require an explicit interface, these routines were converted to modules. Therefore, several changes were needed in several of the IO routines.
This new logic is more elegant and allows for exception to land fill values in the future.