Skip to content

Commit 81092df

Browse files
committed
Merge branch 'nvhpc_fixes' into development
2 parents 2f2c5e3 + 5b5523a commit 81092df

2 files changed

Lines changed: 28 additions & 19 deletions

File tree

src/marbl_interior_tendency_mod.F90

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ subroutine compute_autotroph_calcification(km, autotroph_local, temperature, car
15531553

15541554
!P-limitation effect (CaCO2/organicC ratio increases when P limitation term is low)
15551555
! max out picpoc at one to prevent crashing due to "ballast exceeds POC" error
1556-
picpoc = min(1., max(0.0_r8, -0.48_r8 * Plim(auto_ind,:) + picpoc(:) + 0.48_r8))
1556+
picpoc = min(1.0_r8, max(0.0_r8, -0.48_r8 * Plim(auto_ind,:) + picpoc(:) + 0.48_r8))
15571557

15581558
!multiply cocco growth rate by picpoc to get CaCO3 formation
15591559
CaCO3_form(auto_ind,:) = picpoc(:) * photoC(auto_ind,:)
@@ -1709,7 +1709,7 @@ subroutine compute_autotroph_nutrient_uptake(marbl_tracer_indices, autotroph_der
17091709
!-----------------------------------------------------------------------
17101710
! local variables
17111711
!-----------------------------------------------------------------------
1712-
integer :: auto_ind
1712+
integer :: auto_ind, k
17131713
!-----------------------------------------------------------------------
17141714

17151715
associate( &
@@ -1733,21 +1733,23 @@ subroutine compute_autotroph_nutrient_uptake(marbl_tracer_indices, autotroph_der
17331733

17341734
do auto_ind = 1, autotroph_cnt
17351735

1736-
where (VNtot(auto_ind,:) > c0)
1737-
NO3_V(auto_ind,:) = (VNO3(auto_ind,:) / VNtot(auto_ind,:)) * photoC(auto_ind,:) * Q
1738-
NH4_V(auto_ind,:) = (VNH4(auto_ind,:) / VNtot(auto_ind,:)) * photoC(auto_ind,:) * Q
1739-
else where
1740-
NO3_V(auto_ind,:) = c0
1741-
NH4_V(auto_ind,:) = c0
1742-
end where
1736+
do k=1,size(VNtot,2)
1737+
if (VNtot(auto_ind,k) > c0) then
1738+
NO3_V(auto_ind,k) = (VNO3(auto_ind,k) / VNtot(auto_ind,k)) * photoC(auto_ind,k) * Q
1739+
NH4_V(auto_ind,k) = (VNH4(auto_ind,k) / VNtot(auto_ind,k)) * photoC(auto_ind,k) * Q
1740+
else
1741+
NO3_V(auto_ind,k) = c0
1742+
NH4_V(auto_ind,k) = c0
1743+
end if
17431744

1744-
where (VPtot(auto_ind,:) > c0)
1745-
PO4_V(auto_ind,:) = (VPO4(auto_ind,:) / VPtot(auto_ind,:)) * photoC(auto_ind,:) * gQp(auto_ind,:)
1746-
DOP_V(auto_ind,:) = (VDOP(auto_ind,:) / VPtot(auto_ind,:)) * photoC(auto_ind,:) * gQp(auto_ind,:)
1747-
else where
1748-
PO4_V(auto_ind,:) = c0
1749-
DOP_V(auto_ind,:) = c0
1750-
end where
1745+
if (VPtot(auto_ind,k) > c0) then
1746+
PO4_V(auto_ind,k) = (VPO4(auto_ind,k) / VPtot(auto_ind,k)) * photoC(auto_ind,k) * gQp(auto_ind,k)
1747+
DOP_V(auto_ind,k) = (VDOP(auto_ind,k) / VPtot(auto_ind,k)) * photoC(auto_ind,k) * gQp(auto_ind,k)
1748+
else
1749+
PO4_V(auto_ind,k) = c0
1750+
DOP_V(auto_ind,k) = c0
1751+
end if
1752+
end do
17511753

17521754
!-----------------------------------------------------------------------
17531755
! Get nutrient uptake by diatoms based on C fixation

tests/python_for_tests/machines.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,21 @@ def load_module(mach, compiler, module_name):
3333
module('load', 'ncarenv/23.06')
3434
module('load', 'craype')
3535
elif compiler == 'nvhpc':
36-
module('load', 'ncarenv/23.06')
36+
module('load', 'ncarenv/24.12')
3737
else:
3838
module('load', 'ncarenv/23.09')
3939
module('load', module_name)
4040
module('load', 'ncarcompilers/1.0.0')
4141
if compiler == 'cray':
4242
module('load', 'cray-mpich/8.1.25')
43+
elif compiler == 'nvhpc':
44+
module('load', 'cray-mpich/8.1.29')
4345
else:
4446
module('load', 'cray-mpich/8.1.27')
45-
module('load', 'netcdf/4.9.2')
47+
if compiler == 'nvhpc':
48+
module('load', 'netcdf/4.9.3')
49+
else:
50+
module('load', 'netcdf/4.9.2')
4651
if compiler in ['gnu', 'cray']:
4752
module('load', 'cray-libsci/23.02.1.1')
4853

@@ -101,7 +106,7 @@ def machine_specific(mach, supported_compilers, module_names):
101106
module_names['intel'] = 'intel/2023.2.1'
102107
module_names['gnu'] = 'gcc/12.2.0'
103108
module_names['cray'] = 'cce/15.0.1'
104-
module_names['nvhpc'] = 'nvhpc/23.1'
109+
module_names['nvhpc'] = 'nvhpc/25.9'
105110
return
106111

107112
if mach == 'cheyenne':
@@ -144,6 +149,8 @@ def machine_specific(mach, supported_compilers, module_names):
144149
supported_compilers.append('pgi')
145150
if _compiler_is_present('ifort'):
146151
supported_compilers.append('intel')
152+
if _compiler_is_present('nvfortran'):
153+
supported_compilers.append('nvhpc')
147154
if _compiler_is_present('nagfor'):
148155
supported_compilers.append('nag')
149156
if supported_compilers == []:

0 commit comments

Comments
 (0)