Hello,

I have modified my uwind and vwind parameters in the usrdef surface dataf90 file in subroutine

SUBROUTINE usrdef_surface_data

in RHONE test case, I made a variable " windspd " in the cited subroutine which is defined as :

Do i =1,n1dat

Do j =1,n2dat

windspeed(i,j)= SQRT(surdata(i,j,1)**2 + surdata(i,j,2)**2)

windspd(i,j) = windspd(i,j)+windspeed(i,j)

uwindspd(i,j) = uwindspd(i,j)+ABS(surdata(i,j,1))

vwindspd(i,j) = vwindspd(i,j)+ABS(surdata(i,j,2))

surdata(i,j,1) =uwindspd(i,j)

surdata(i,j,2) =vwindspd(i,j)

END DO

END DO

END DO

Now I want to ask coherence to set windspd to be one of my output parameters.

How can I ask it?

I only defined the

!1. Output variables

!-------------------

!

!---fortran name

tsrvars(3)%f90_name = 'winspd'

!---long name

tsrvars(3)%long_name = 'wind vector'

!---units

tsrvars(3)%units = 'm/s'

!---varids and ranks

tsrvars%ivarid = (/0,iarr_uwindatc,iarr_vwindatc,iarr_windatc,iarr_uvel,iarr_vvel,iarr_temp/)

tsrvars%nrank = (/2,2,2,2,3,3,3/)

.

.

.

.

.

!

and I dont know thow to define it in SUBROUTINE usrdef_tsr2d_vals(out2ddat,i,j,n2vars)

in the usrdef time series f90 file....

I tried to get iarr_windatc output, too, but it just gives 0, any idea why?

Thank you,

Sue

## Adding the wind vector as an output

**Moderator:** Katrijn

### Re: Adding the wind vector as an output

Hi Sou,

Normally windspeed is listed as a standard output so just adding iarr_uwindatc in the standard 'SUBROUTINE usrdef_tsr_params' should be sufficient:

!---varids and ranks

tsrvars%ivarid = (/0,iarr_uwindatc,iarr_vwindatc,iarr_windatc,iarr_uvel,iarr_vvel,iarr_temp/)

tsrvars%nrank = (/2,2,2,2,3,3,3/)

This should be sufficient, don't forget to change the number of output variables in the Usrdef_Model.f90 file accordingly! Hope this helped.

Cheers,

Katrijn

Normally windspeed is listed as a standard output so just adding iarr_uwindatc in the standard 'SUBROUTINE usrdef_tsr_params' should be sufficient:

!---varids and ranks

tsrvars%ivarid = (/0,iarr_uwindatc,iarr_vwindatc,iarr_windatc,iarr_uvel,iarr_vvel,iarr_temp/)

tsrvars%nrank = (/2,2,2,2,3,3,3/)

This should be sufficient, don't forget to change the number of output variables in the Usrdef_Model.f90 file accordingly! Hope this helped.

Cheers,

Katrijn

### Re: Adding the wind vector as an output

thank you katrijin but I have done all of these settings but it just produces 0 for iarr_windatc.

### Re: Adding the wind vector as an output

i agree with the third comment about that ...well done

Graduated from Soran University with First Class Degree with Honours in Computer Science.

### Re: Adding the wind vector as an output

Hi sysysy,

Can you elaborate? Soudeh wrote me a pm that his problem is solved now, what about your problem?

Cheers,

Katrijn

Can you elaborate? Soudeh wrote me a pm that his problem is solved now, what about your problem?

Cheers,

Katrijn

### Re: Adding the wind vector as an output

Hi Katrijin,

This problem is not solved yet I mean for this specific parameter. iarr-windatc.

Regards,

Soudeh

This problem is not solved yet I mean for this specific parameter. iarr-windatc.

Regards,

Soudeh

### Re: Adding the wind vector as an output

elaborate please