Page 1 of 1

Adding the wind vector as an output

Posted: Thu Jan 21, 2016 6:39 pm
by Sou
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

Re: Adding the wind vector as an output

Posted: Mon Mar 07, 2016 4:36 pm
by Katrijn
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

Re: Adding the wind vector as an output

Posted: Mon Mar 07, 2016 4:42 pm
by Sou
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

Posted: Wed Jul 26, 2017 6:41 am
by sysysy
i agree with the third comment about that ...well done

Re: Adding the wind vector as an output

Posted: Thu Aug 03, 2017 8:10 am
by Katrijn
Hi sysysy,
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

Posted: Fri Sep 01, 2017 9:27 pm
by Sou
Hi Katrijin,
This problem is not solved yet I mean for this specific parameter. iarr-windatc.
Regards,
Soudeh

Re: Adding the wind vector as an output

Posted: Sun Sep 24, 2017 6:42 pm
by Katrijn
elaborate please