1 subroutine da_ffdduv_model (F,D,U,V,ID)
3 !-------------------------------------------------------------------------
7 ! Convert wind speed (F in m/s) and direction (D in degree 0-360) into
8 ! wind (U-V in m/s) components on grid coordinates
11 ! Convert wind (U-V in m/s) components into wind speed (F in m/s) and
12 ! direction (D in degree 0-360) on grid coordinates
14 !-------------------------------------------------------------------------
18 real, intent (inout) :: F,D
19 real, intent (inout) :: U,V
20 integer, intent (in) :: ID
23 if (trace_use_frequent) call da_trace_entry("da_ffdduv_model")
40 if (trace_use_frequent) call da_trace_exit("da_ffdduv_model")
45 if (U .GT. 0.0) D = 270.0
46 if (U .LT. 0.0) D = 90.0
50 if (U .LE. 0.0 .AND. V .LE. 0.0) D = A
51 if (U .LE. 0.0 .AND. V .GE. 0.0) D = A + 180.0
52 if (U .GE. 0.0 .AND. V .GE. 0.0) D = A + 180.0
53 if (U .GE. 0.0 .AND. V .LE. 0.0) D = A + 360.0
58 write(unit=message(1),fmt='(A,I2)') ' UNKNOWN OPTION ',ID
59 call da_error(__FILE__,__LINE__,message(1:1))
63 if (trace_use_frequent) call da_trace_exit("da_ffdduv_model")
65 end subroutine da_ffdduv_model