[Dart-dev] DART/branches Revision: 12638
dart at ucar.edu
dart at ucar.edu
Wed Jun 6 15:36:43 MDT 2018
thoar at ucar.edu
2018-06-06 15:36:43 -0600 (Wed, 06 Jun 2018)
1500
Used an integer variable for a loop variable that was being used as an index.
I replaced 't' with 'it', because it was available and was not being used in
any subsequent code. The gfortran and intel compilers both threw warnings like:
gfortran -g -Wuninitialized -Wunused -ffree-line-length-none -fbounds-check \
-fbacktrace -ffpe-trap=invalid,zero,overflow -I/opt/local/include \
-c ../../../models/openggcm/openggcm_interp_mod.f90
../../../models/openggcm/openggcm_interp_mod.f90:987:37:
dim_index(1) = kpoi(1, itet(t,itl)) ! dim_index(1) is the index into height
1
Warning: Legacy Extension: REAL array index at (1)
../../../models/openggcm/openggcm_interp_mod.f90:988:37:
dim_index(2) = kpoi(2, itet(t,itl)) ! dim_index(2) is the index into lat
1
Warning: Legacy Extension: REAL array index at (1)
../../../models/openggcm/openggcm_interp_mod.f90:989:37:
dim_index(3) = kpoi(3, itet(t,itl)) ! dim_index(3) is the index into lon
1
Warning: Legacy Extension: REAL array index at (1)
../../../models/openggcm/openggcm_interp_mod.f90:993:17:
oplus(:,t) = get_state(state_index, state_handle)
1
Warning: Legacy Extension: REAL array index at (1)
../../../models/openggcm/openggcm_interp_mod.f90:985:9:
do t = 1,4
1
Warning: Deleted feature: Loop variable at (1) must be integer
Modified: DART/branches/openggcm/models/openggcm/openggcm_interp_mod.f90
===================================================================
--- DART/branches/openggcm/models/openggcm/openggcm_interp_mod.f90 2018-06-06 20:51:20 UTC (rev 12637)
+++ DART/branches/openggcm/models/openggcm/openggcm_interp_mod.f90 2018-06-06 21:36:43 UTC (rev 12638)
@@ -984,15 +984,15 @@
!>@todo CHECK THIS THOROUGHLY
- do t = 1,4
+ do it = 1,4
- dim_index(1) = kpoi(1, itet(t,itl)) ! dim_index(1) is the index into height
- dim_index(2) = kpoi(2, itet(t,itl)) ! dim_index(2) is the index into lat
- dim_index(3) = kpoi(3, itet(t,itl)) ! dim_index(3) is the index into lon
+ dim_index(1) = kpoi(1, itet(it,itl)) ! dim_index(1) is the index into height
+ dim_index(2) = kpoi(2, itet(it,itl)) ! dim_index(2) is the index into lat
+ dim_index(3) = kpoi(3, itet(it,itl)) ! dim_index(3) is the index into lon
state_index = get_dart_vector_index(dim_index(1), dim_index(2), dim_index(3), domain_id, var_id)
- oplus(:,t) = get_state(state_index, state_handle)
+ oplus(:,it) = get_state(state_index, state_handle)
enddo
@@ -1005,7 +1005,7 @@
! not fatal in many cases, for example out of the domain for LOS integration
return
-end
+end subroutine g_oplus_int
!-----------------------------------------------------------------------
More information about the Dart-dev
mailing list