Opened 15 years ago
Last modified 15 years ago
#408 closed bug
Corrected bug in get_ngfld.F and get_ngfldr.F — at Initial Version
Reported by: | arango | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.4 |
Component: | Nonlinear | Version: | 3.4 |
Keywords: | Cc: |
Description
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.