Changeset 2618 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 19, 2019, 5:09:15 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_generic.f90
r2476 r2618 29 29 ! RangeR: Function to provide a range of d1 values from 'iniv' to 'endv', of real values in a vector 30 30 ! RangeR_K: Function to provide a range of d1 from 'iniv' to 'endv', of real(r_k) values in a vector 31 ! rm_values_vecRK: Subroutine to remove a given value (e.g. fill_Value) from a RK vector 31 32 ! stoprun: Subroutine to stop running and print a message 32 33 ! vectorI_S: Function to transform a vector of integers to a string of characters … … 1193 1194 END SUBROUTINE GDATE 1194 1195 1196 SUBROUTINE rm_values_vecRK(d1, vector, rmvalue, rmd1, rmvector) 1197 ! Subroutine to remove a given value (e.g. fill_Value) from a RK vector 1198 1199 IMPLICIT NONE 1200 1201 INTEGER, INTENT(in) :: d1 1202 REAL(r_k), INTENT(in) :: rmvalue 1203 REAL(r_k), DIMENSION(d1), INTENT(in) :: vector 1204 INTEGER, INTENT(out) :: rmd1 1205 REAL(r_k), DIMENSION(d1), INTENT(out) :: rmvector 1206 1207 ! Local 1208 INTEGER :: i 1209 1210 !!!!!!! Variables 1211 ! d1: length of the vector 1212 ! vector: vector with values 1213 ! rmvalue: RK value to remove 1214 ! rmd1: length of the new vector 1215 ! rmvector: new vector 1216 1217 fname = 'rm_values_vecRK' 1218 1219 rmd1 = 0 1220 rmvector = zeroRK 1221 1222 DO i=1, d1 1223 IF (vector(i) /= rmvalue) THEN 1224 rmd1 = rmd1 + 1 1225 rmvector(rmd1) = vector(i) 1226 END IF 1227 END DO 1228 1229 END SUBROUTINE rm_values_vecRK 1230 1195 1231 END MODULE module_generic
Note: See TracChangeset
for help on using the changeset viewer.