New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3069 for branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot – NEMO

Ignore:
Timestamp:
2011-11-09T16:18:38+01:00 (12 years ago)
Author:
djlea
Message:

Update OBS and ASM documentation. Small updates and fixes to dataplot.

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  
    1010COMMON pr2, view_landscape 
    1111 
     12; get filename of postscript device   
     13 
     14r = fstat(!D.UNIT) 
     15filename = r.name 
     16 
    1217device,/close           
    1318set_plot,'x' 
     
    1520if keyword_set(view) then begin 
    1621 
    17 ; get filename of postscript device   
    18  
    19    r = fstat(!D.UNIT) 
    20    filename = r.name 
    21  
    2222   if (view_landscape) then begin 
    23       spawn,'gv -landscape -swap '+filename 
     23      spawn,'gv -orientation=landscape -swap '+filename 
    2424   endif else begin 
    2525      spawn,'gv '+filename  
  • branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot/read_feedback.pro

    r2945 r3069  
    6161  if (NumObs gt 0) then begin   
    6262    ByteNam = intarr(strnam, NumVars) 
    63     ByteEntries = intarr(strnam, NumEntries) 
     63    if (n_elements(NumEntries) eq 1) then ByteEntries = intarr(strnam, NumEntries) 
    6464    ByteId = intarr(strwmo, NumObs) 
    6565    ByteType = intarr(strtyp, NumObs) 
    6666    ByteJulDRef = intarr(strjuld) 
    6767    VarNames = strarr(NumVars) 
    68     Entries = strarr(NumEntries) 
     68    if (n_elements(NumEntries) eq 1) then Entries = strarr(NumEntries) 
    6969    Id = strarr(NumObs) 
    7070    Type = strarr(NumObs) 
     
    148148   
    149149      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  
    153157       
    154158      varid = ncdf_varid(ncid, strtrim(VarNames(ivar))+'_QC') 
  • branches/dev_2802_OBStools/NEMOGCM/TOOLS/OBSTOOLS/dataplot/read_sla.pro

    r3026 r3069  
    6767  if (varid eq -1) then begin  
    6868   varid = ncdf_varid(ncid, 'Longitudes') 
     69        if (varid eq -1) then begin 
     70             varid = ncdf_varid(ncid, 'longitude') 
     71        endif 
    6972        ncdf_attget, ncid, varid, 'scale_factor', scale_factor 
    7073  endif 
     
    8790  if (varid eq -1) then begin 
    8891   varid = ncdf_varid(ncid, 'Latitudes') 
     92        if (varid eq -1) then begin 
     93             varid = ncdf_varid(ncid, 'latitude') 
     94        endif 
    8995        ncdf_attget, ncid, varid, 'scale_factor', scale_factor 
    9096  endif 
     
    103109     
    104110  varid = ncdf_varid(ncid, 'JULD') 
     111  if (varid eq -1) then begin 
     112        varid = ncdf_varid(ncid, 'time') 
     113  endif 
    105114  if (varid ne -1) then begin  
    106115   ncdf_varget, ncid, varid, Dats 
     
    188197  ncdf_attget, ncid, varid, '_FillValue', FillValue 
    189198  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 
    191208  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 
    192210  if not keyword_set(quiet) then print,'SLA FillValue: ',FillValue 
    193211  pts = where(obsval eq FillValue, count) 
    194212;  if not keyword_set(quiet) then print,count 
    195   obsval=obsval*scale_factor 
     213  obsval=obsval*scale_factor+add_offset 
    196214  if count gt 0 then obsval(pts) = rmdi 
    197215   
Note: See TracChangeset for help on using the changeset viewer.