Changeset 506 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jun 17, 2015, 10:44:42 AM (10 years ago)
Author:
lfita
Message:

Definning wind direction as [0,360)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/validation_sim.py

    r505 r506  
    996996
    997997                theta = np.arctan2(ua, va)
     998                theta = np.where(theta < 0., theta + 2.*np.pi, theta)
     999                varNOcheckv = 360.*theta/(2.*np.pi)
     1000
    9981001                dimensions = tuple(['Time','bottom_top','south_north','west_east'])
    9991002                shape = ua.shape
    1000                 varNOcheckv = 360.*theta/(2.*np.pi)
    10011003
    10021004            elif varn == 'WRFwds':
    10031005#        print '    ' + main + ': computing surface wind direction from WRF as ATAN2(V,U) ...'
    10041006                theta = np.arctan2(ncobj.variables['V10'][:], ncobj.variables['U10'][:])
     1007                theta = np.where(theta < 0., theta + 2.*np.pi, theta)
    10051008               
    10061009                varNOcheckv = 360.*theta/(2.*np.pi)
     
    10111014#        print '    ' + main + ': computing surface wind direction from TSs as ATAN2(v,u) ...'
    10121015                theta = np.arctan2(ncobj.variables['v'][:], ncobj.variables['u'][:])
     1016                theta = np.where(theta < 0., theta + 2.*np.pi, theta)
    10131017
    10141018                varNOcheckv = 360.*theta/(2.*np.pi)
Note: See TracChangeset for help on using the changeset viewer.