Changeset 3069 for branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS
- Timestamp:
- 2011-11-09T16:18:38+01:00 (13 years ago)
- Location:
- branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot/prend2.pro
r3002 r3069 10 10 COMMON pr2, view_landscape 11 11 12 ; get filename of postscript device 13 14 r = fstat(!D.UNIT) 15 filename = r.name 16 12 17 device,/close 13 18 set_plot,'x' … … 15 20 if keyword_set(view) then begin 16 21 17 ; get filename of postscript device18 19 r = fstat(!D.UNIT)20 filename = r.name21 22 22 if (view_landscape) then begin 23 spawn,'gv - landscape -swap '+filename23 spawn,'gv -orientation=landscape -swap '+filename 24 24 endif else begin 25 25 spawn,'gv '+filename -
branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot/read_feedback.pro
r2945 r3069 61 61 if (NumObs gt 0) then begin 62 62 ByteNam = intarr(strnam, NumVars) 63 ByteEntries = intarr(strnam, NumEntries)63 if (n_elements(NumEntries) eq 1) then ByteEntries = intarr(strnam, NumEntries) 64 64 ByteId = intarr(strwmo, NumObs) 65 65 ByteType = intarr(strtyp, NumObs) 66 66 ByteJulDRef = intarr(strjuld) 67 67 VarNames = strarr(NumVars) 68 Entries = strarr(NumEntries)68 if (n_elements(NumEntries) eq 1) then Entries = strarr(NumEntries) 69 69 Id = strarr(NumObs) 70 70 Type = strarr(NumObs) … … 148 148 149 149 varid = ncdf_varid(ncid, strtrim(VarNames(ivar))+'_Hx') 150 ncdf_varget, ncid, varid, tmp 151 Hx(*,*,ivar) = tmp 152 ncdf_attget, ncid, varid, '_Fillvalue', FillValHx 150 if (varid gt -1) then begin 151 ncdf_varget, ncid, varid, tmp 152 Hx(*,*,ivar) = tmp 153 ncdf_attget, ncid, varid, '_Fillvalue', FillValHx 154 endif else begin 155 FillValHx=0 156 endelse 153 157 154 158 varid = ncdf_varid(ncid, strtrim(VarNames(ivar))+'_QC') -
branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot/read_sla.pro
r3026 r3069 67 67 if (varid eq -1) then begin 68 68 varid = ncdf_varid(ncid, 'Longitudes') 69 if (varid eq -1) then begin 70 varid = ncdf_varid(ncid, 'longitude') 71 endif 69 72 ncdf_attget, ncid, varid, 'scale_factor', scale_factor 70 73 endif … … 87 90 if (varid eq -1) then begin 88 91 varid = ncdf_varid(ncid, 'Latitudes') 92 if (varid eq -1) then begin 93 varid = ncdf_varid(ncid, 'latitude') 94 endif 89 95 ncdf_attget, ncid, varid, 'scale_factor', scale_factor 90 96 endif … … 103 109 104 110 varid = ncdf_varid(ncid, 'JULD') 111 if (varid eq -1) then begin 112 varid = ncdf_varid(ncid, 'time') 113 endif 105 114 if (varid ne -1) then begin 106 115 ncdf_varget, ncid, varid, Dats … … 188 197 ncdf_attget, ncid, varid, '_FillValue', FillValue 189 198 scale_factor=1. 190 if (ncinfo.ndims gt 2) then ncdf_attget, ncid, varid, 'scale_factor', scale_factor 199 add_offset=0. 200 ;if (ncinfo.ndims gt 2) then ncdf_attget, ncid, varid, 'scale_factor', scale_factor 201 ncviq=ncdf_varinq(ncid, varid) 202 for iatt=0,ncviq.natts-1 do begin 203 ncaiq=ncdf_attname(ncid, varid, iatt) 204 if ( ncaiq eq 'scale_factor') then ncdf_attget, ncid, varid, 'scale_factor', scale_factor 205 if ( ncaiq eq 'add_factor') then ncdf_attget, ncid, varid, 'add_factor', add_factor 206 endfor 207 191 208 if not keyword_set(quiet) then print,'SLA scale factor: ',scale_factor 209 if not keyword_set(quiet) then print,'SLA add offset: ',add_offset 192 210 if not keyword_set(quiet) then print,'SLA FillValue: ',FillValue 193 211 pts = where(obsval eq FillValue, count) 194 212 ; if not keyword_set(quiet) then print,count 195 obsval=obsval*scale_factor 213 obsval=obsval*scale_factor+add_offset 196 214 if count gt 0 then obsval(pts) = rmdi 197 215
Note: See TracChangeset
for help on using the changeset viewer.