Skip to content

Commit

Permalink
Replace atan with atan2 in NUOPC cap to addresss missing nvhpc support.
Browse files Browse the repository at this point in the history
nvhpc does not appear to support atan with two arguments as provided in the f2008 standard (#325)
  • Loading branch information
jedwards4b authored Nov 22, 2024
1 parent a533e20 commit acadc6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
forces%tau_mag(i,j) = gustiness + G%mask2dT(i,j) * sqrt((taux_at_h(i,j)**2) + (tauy_at_h(i,j)**2))
forces%ustar(i,j) = sqrt(gustiness*Irho0 + Irho0 * G%mask2dT(i,j) * &
sqrt((taux_at_h(i,j)**2) + (tauy_at_h(i,j)**2)))
forces%omega_w2x(i,j) = atan(tauy_at_h(i,j), taux_at_h(i,j))
forces%omega_w2x(i,j) = atan2(tauy_at_h(i,j), taux_at_h(i,j))
enddo ; enddo
call pass_vector(forces%taux, forces%tauy, G%Domain, halo=1)
else ! C-grid wind stresses.
Expand Down

0 comments on commit acadc6e

Please sign in to comment.