Changeset 5682 for branches/2015/dev_r5072_UKMO2_OBS_simplification/NEMOGCM/TOOLS/SIREN/src/interp_nearest.f90
- Timestamp:
- 2015-08-12T17:46:45+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5072_UKMO2_OBS_simplification/NEMOGCM/TOOLS/SIREN/src/interp_nearest.f90
r5037 r5682 24 24 !> J.Paul 25 25 ! REVISION HISTORY: 26 !> @date September, 2014 - Initial version26 !> @date September, 2014 - Initial version 27 27 !> 28 28 !> @note Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 55 55 !> 56 56 !> @author J.Paul 57 !> - September, 2014- Initial Version57 !> @date September, 2014 - Initial Version 58 58 !> 59 59 !> @param[inout] dd_value 2D array of variable value … … 69 69 70 70 ! local variable 71 INTEGER(i4), DIMENSION(4) :: il_shape 71 INTEGER(i4), DIMENSION(4) :: il_shape 72 73 INTEGER(I4), DIMENSION(:,:,:), ALLOCATABLE :: il_detect 72 74 73 75 ! loop indices … … 80 82 il_shape(:)=SHAPE(dd_value) 81 83 84 ALLOCATE(il_detect(il_shape(1),il_shape(2),il_shape(3))) 82 85 DO jl=1,il_shape(4) 86 il_detect(:,:,:)=id_detect(:,:,:) 83 87 ! loop on vertical level 84 88 DO jk=1,il_shape(3) … … 86 90 ! I-J plan 87 91 CALL interp_nearest__2D(dd_value(:,:,jk,jl),& 88 & i d_detect(:,:,jk), &92 & il_detect(:,:,jk), & 89 93 & id_rho(jp_I), id_rho(jp_J) ) 90 IF( ANY(i d_detect(:,:,jk)==1) )THEN94 IF( ANY(il_detect(:,:,jk)==1) )THEN 91 95 ! I direction 92 96 DO jj=1,il_shape(2) 93 97 CALL interp_nearest__1D( dd_value(:,jj,jk,jl),& 94 & i d_detect(:,jj,jk), &98 & il_detect(:,jj,jk), & 95 99 & id_rho(jp_I) ) 96 100 ENDDO 97 IF( ALL(i d_detect(:,:,jk)==0) )THEN101 IF( ALL(il_detect(:,:,jk)==0) )THEN 98 102 CYCLE 99 103 ELSE … … 101 105 DO ji=1,il_shape(1) 102 106 CALL interp_nearest__1D( dd_value(ji,:,jk,jl),& 103 & i d_detect(ji,:,jk), &107 & il_detect(ji,:,jk), & 104 108 & id_rho(jp_J) ) 105 109 ENDDO … … 110 114 ENDDO 111 115 116 id_detect(:,:,:)=il_detect(:,:,:) 117 DEALLOCATE(il_detect) 118 112 119 END SUBROUTINE interp_nearest_fill 113 120 !------------------------------------------------------------------- … … 116 123 !> 117 124 !> @author J.Paul 118 !> - September, 2014- Initial Version125 !> @date September, 2014 - Initial Version 119 126 !> 120 127 !> @param[inout] dd_value 2D array of variable value … … 171 178 !> 172 179 !> @author J.Paul 173 !> - September, 2014- Initial Version180 !> @date September, 2014 - Initial Version 174 181 !> 175 182 !> @param[inout] dd_value 1D array of variable value … … 216 223 !> 217 224 !> @author J.Paul 218 !> - September, 2014- Initial Version225 !> @date September, 2014 - Initial Version 219 226 !> 220 227 !> @param[inout] dd_value 2D array of mixed grid value … … 300 307 !> 301 308 !> @author J.Paul 302 !> - September, 2014- Initial Version309 !> @date September, 2014 - Initial Version 303 310 !> 304 311 !> @param[inout] dd_value 1D array of mixed grid value
Note: See TracChangeset
for help on using the changeset viewer.