Opened 15 years ago
Last modified 15 years ago
#408 closed bug
Corrected bug in get_ngfld.F and get_ngfldr.F — at Version 2
Reported by: | arango | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.4 |
Component: | Nonlinear | Version: | 3.4 |
Keywords: | Cc: |
Description (last modified by )
Corrected a bug in get_ngfld.F and get_ngfldr.F when the scale_factor and add_offset NetCDF attributes are used to compress the data. The generic routines in mod_netcdf.F already process these paramemeters to uncompress the data. So the additional scaling in get_ngfld.F and get_ngfldr.F routines is only related with Fscale(ifield,ng) and not compression:
Fmin=A(1)*Fscale(ifield,ng) Fmax=A(1)*Fscale(ifield,ng) ic=0 DO j=1,Jrec DO i=Istr,Iend ic=ic+1 Aval=A(ic)*Fscale(ifield,ng) Fmin=MIN(Fmin,Aval) Fmax=MAX(Fmax,Aval) Fout(i,j,Tindex)=Aval END DO END DO
Notice that the Fscale factor is a different issue and doesn't have nothing to do with the compression of data but field units manipulation from varinfo.dat. Usually, Fscale=1.0 for mostly all input fields.
Many thanks to Mark Hadfield for reporting this problem.
The same correction is also needed for get_2dfld.F, get_2dfldr.F, get_3dfld.F, and get_3dfldr.F when processing point-data. However, it very unlikely to have a input NetCDF file with point-data that needs to be compressed as byte and scaled with the scale_factor and add_offset attributes.
Change History (2)
comment:1 by , 15 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Description: | modified (diff) |
---|---|
Resolution: | Fixed |
Status: | closed → reopened |