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/read_sla.pro – 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.