Changeset 443 in lmdz_wrf


Ignore:
Timestamp:
May 28, 2015, 3:43:05 PM (10 years ago)
Author:
lfita
Message:

Fixing use of 'WRF' Time variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diagnostics.py

    r442 r443  
    970970        var0 = ncobj.variables[depvars[0]]
    971971        var1 = ncobj.variables[depvars[1]]
    972         var2 = ncobj.variables[depvars[2]]
     972        if depvarsp[2] != 'WRFtime':
     973            var2 = ncobj.variables[depvars[2]]
    973974
    974975        var = var0[:] + var1[:]
     
    986987            dtime = (var2[1] - var2[0])*timeunits_seconds(tunits)
    987988        else:
     989            var2 = ncobj.variables['Times']
    988990            time1 = var2[0,:]
    989991            time2 = var2[1,:]
     
    992994            diffdate12 = ddate2 - ddate1
    993995            dtime = diffdate12.total_seconds()
     996            print 'dtime:',dtime
    994997
    995998        ncvar.insert_variable(ncobj, 'pr', diagout/dtime, diagoutd, diagoutvd, newnc)
Note: See TracChangeset for help on using the changeset viewer.