From acadc6eca5808b302c5d5dbb2bece8ea05aaf316 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 22 Nov 2024 16:28:25 -0700 Subject: [PATCH] Replace atan with atan2 in NUOPC cap to addresss missing nvhpc support. nvhpc does not appear to support atan with two arguments as provided in the f2008 standard (#325) --- config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 b/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 index 2cb312c885..d184b211e0 100644 --- a/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 +++ b/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 @@ -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.