Replies: 2 comments
-
|
Great questions, I will tackle the first one here. For the specific example above, replacing the loop with your suggested syntax is both (possibly) equivalent and has no performance penalty. I say possibly because the array might not be dimensioned as in the and although in most of our uses, you can safely skip the upper bound. |
Beta Was this translation helpful? Give feedback.
-
|
The Fortran
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been following the course by NRIS on modern FORTRAN and I'm trying to relate the information in the course with our code base.
some_vector(:,:) = 0.r_8E.g from oslo_aero_opitcal_params.F90, Is actually the do loop to initialize the Nnatk here required?! initialize concentration fields do i=0,nmodes do k=1,pver do icol=1,ncol Nnatk(icol,k,i) = 0.0_r8 end do end do end do do k=1,pver do icol=1,ncol n_aer(icol,k) = 0.0_r8 end do end do kalw(:,:,:,:)=0._r8 be(:,:,:,:)=0._r8 ke(:,:,:,:)=0._r8 asym(:,:,:,:)=0._r8 ssa(:,:,:,:)=0._r8real(r8), pointer, dimension(:,:,:) :: suwhat case is this needed compared just defining it as a standard vector? And what is the difference?Beta Was this translation helpful? Give feedback.
All reactions