@@ -533,13 +533,13 @@ subroutine wind_forcing_gyres(sfc_state, forces, day, G, US, CS)
533
533
! set the friction velocity
534
534
if (CS% answer_date < 20190101 ) then
535
535
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
536
- forces% tau_mag(i,j) = CS% gust_const + sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
537
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
536
+ forces% tau_mag(i,j) = CS% gust_const + sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
537
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
538
538
enddo ; enddo ; endif
539
539
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
540
540
forces% ustar(i,j) = sqrt (US% L_to_Z * ((CS% gust_const/ CS% Rho0) + &
541
- sqrt (0.5 * (forces% tauy(i,J-1 )* forces % tauy(i,J -1 ) + forces% tauy(i,J)* forces % tauy(i,J ) + &
542
- forces% taux(I-1 ,j)* forces % taux(I -1 ,j ) + forces% taux(I,j)* forces % taux(I,j )))/ CS% Rho0) )
541
+ sqrt (0.5 * (( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) + &
542
+ ( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 )))/ CS% Rho0) )
543
543
enddo ; enddo ; endif
544
544
else
545
545
call stresses_to_ustar(forces, G, US, CS)
@@ -743,19 +743,19 @@ subroutine wind_forcing_from_file(sfc_state, forces, day, G, US, CS)
743
743
if (.not. read_Ustar) then
744
744
if (CS% read_gust_2d) then
745
745
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
746
- forces% tau_mag(i,j) = CS% gust(i,j) + sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 )
746
+ forces% tau_mag(i,j) = CS% gust(i,j) + sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) )
747
747
enddo ; enddo ; endif
748
748
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
749
- tau_mag = CS% gust(i,j) + sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 )
749
+ tau_mag = CS% gust(i,j) + sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) )
750
750
forces% ustar(i,j) = sqrt (tau_mag * US% L_to_Z / CS% Rho0)
751
751
enddo ; enddo ; endif
752
752
else
753
753
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
754
- forces% tau_mag(i,j) = CS% gust_const + sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 )
754
+ forces% tau_mag(i,j) = CS% gust_const + sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) )
755
755
enddo ; enddo ; endif
756
756
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
757
757
forces% ustar(i,j) = sqrt (US% L_to_Z * (CS% gust_const/ CS% Rho0 + &
758
- sqrt (temp_x(i,j)* temp_x(i,j ) + temp_y(i,j)* temp_y(i,j )) / CS% Rho0) )
758
+ sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 )) / CS% Rho0) )
759
759
enddo ; enddo ; endif
760
760
endif
761
761
endif
@@ -797,25 +797,25 @@ subroutine wind_forcing_from_file(sfc_state, forces, day, G, US, CS)
797
797
if (CS% read_gust_2d) then
798
798
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
799
799
forces% tau_mag(i,j) = CS% gust(i,j) + &
800
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
801
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
800
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
801
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
802
802
enddo ; enddo ; endif
803
803
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
804
804
tau_mag = CS% gust(i,j) + &
805
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
806
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
805
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
806
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
807
807
forces% ustar(i,j) = sqrt ( tau_mag * US% L_to_Z / CS% Rho0 )
808
808
enddo ; enddo ; endif
809
809
else
810
810
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
811
811
forces% tau_mag(i,j) = CS% gust_const + &
812
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
813
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
812
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
813
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
814
814
enddo ; enddo ; endif
815
815
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
816
816
forces% ustar(i,j) = sqrt (US% L_to_Z * ( (CS% gust_const/ CS% Rho0) + &
817
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
818
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))/ CS% Rho0))
817
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
818
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))/ CS% Rho0))
819
819
enddo ; enddo ; endif
820
820
endif
821
821
endif
@@ -885,21 +885,21 @@ subroutine wind_forcing_by_data_override(sfc_state, forces, day, G, US, CS)
885
885
if (CS% read_gust_2d) then
886
886
call data_override(G% Domain, ' gust' , CS% gust, day, scale= US% Pa_to_RLZ_T2)
887
887
if (associated (forces% tau_mag)) then ; do j= G% jsc,G% jec ; do i= G% isc,G% iec
888
- forces% tau_mag(i,j) = sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 ) + CS% gust(i,j)
888
+ forces% tau_mag(i,j) = sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) ) + CS% gust(i,j)
889
889
enddo ; enddo ; endif
890
890
do j= G% jsc,G% jec ; do i= G% isc,G% iec
891
- tau_mag = sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 ) + CS% gust(i,j)
891
+ tau_mag = sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) ) + CS% gust(i,j)
892
892
ustar_loc(i,j) = sqrt ( tau_mag * US% L_to_Z / CS% Rho0 )
893
893
enddo ; enddo
894
894
else
895
895
if (associated (forces% tau_mag)) then
896
896
do j= G% jsc,G% jec ; do i= G% isc,G% iec
897
- forces% tau_mag(i,j) = sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 ) + CS% gust_const
897
+ forces% tau_mag(i,j) = sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) ) + CS% gust_const
898
898
! ustar_loc(i,j) = sqrt( forces%tau_mag(i,j) * US%L_to_Z / CS%Rho0 )
899
899
enddo ; enddo
900
900
endif
901
901
do j= G% jsc,G% jec ; do i= G% isc,G% iec
902
- ustar_loc(i,j) = sqrt (US% L_to_Z * (sqrt (temp_x(i,j)** 2 + temp_y(i,j)** 2 )/ CS% Rho0 + &
902
+ ustar_loc(i,j) = sqrt (US% L_to_Z * (sqrt (( temp_x(i,j)** 2 ) + ( temp_y(i,j)** 2 ) )/ CS% Rho0 + &
903
903
CS% gust_const/ CS% Rho0))
904
904
enddo ; enddo
905
905
endif
@@ -945,25 +945,25 @@ subroutine stresses_to_ustar(forces, G, US, CS)
945
945
if (CS% read_gust_2d) then
946
946
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
947
947
forces% tau_mag(i,j) = CS% gust(i,j) + &
948
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
949
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
948
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
949
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
950
950
enddo ; enddo ; endif
951
951
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
952
952
tau_mag = CS% gust(i,j) + &
953
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
954
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
953
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
954
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
955
955
forces% ustar(i,j) = sqrt ( tau_mag * I_rho )
956
956
enddo ; enddo ; endif
957
957
else
958
958
if (associated (forces% tau_mag)) then ; do j= js,je ; do i= is,ie
959
959
forces% tau_mag(i,j) = CS% gust_const + &
960
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
961
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
960
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
961
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
962
962
enddo ; enddo ; endif
963
963
if (associated (forces% ustar)) then ; do j= js,je ; do i= is,ie
964
964
tau_mag = CS% gust_const + &
965
- sqrt (0.5 * ((forces% tauy(i,J-1 )** 2 + forces% tauy(i,J)** 2 ) + &
966
- (forces% taux(I-1 ,j)** 2 + forces% taux(I,j)** 2 )))
965
+ sqrt (0.5 * ((( forces% tauy(i,J-1 )** 2 ) + ( forces% tauy(i,J)** 2 ) ) + &
966
+ (( forces% taux(I-1 ,j)** 2 ) + ( forces% taux(I,j)** 2 ) )))
967
967
forces% ustar(i,j) = sqrt ( tau_mag * I_rho )
968
968
enddo ; enddo ; endif
969
969
endif
0 commit comments