ROMS
Loading...
Searching...
No Matches
inp_decode_mod::load_r Interface Reference

Public Member Functions

integer function load_0d_dp (ninp, vinp, nout, vout)
 
integer function load_1d_dp (ninp, vinp, nout, vout)
 
integer function load_2d_dp (ninp, vinp, iout, jout, vout)
 
integer function load_3d_dp (ninp, vinp, iout, jout, kout, vout)
 
integer function load_0d_r8 (ninp, vinp, nout, vout)
 
integer function load_1d_r8 (ninp, vinp, nout, vout)
 
integer function load_2d_r8 (ninp, vinp, iout, jout, vout)
 
integer function load_3d_r8 (ninp, vinp, iout, jout, kout, vout)
 

Detailed Description

Definition at line 71 of file inp_decode.F.

Member Function/Subroutine Documentation

◆ load_0d_dp()

integer function inp_decode_mod::load_r::load_0d_dp ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) nout,
real(dp), intent(out) vout )

Definition at line 1007 of file inp_decode.F.

1008!
1009!***********************************************************************
1010! !
1011! It loads input values into a requested model scalar double !
1012! precision variable when numerical kernel is in single precision. !
1013! !
1014! On Input: !
1015! !
1016! Ninp Number of input elements to process in Vinp (integer) !
1017! Vinp Input values (1D real(dp) array) !
1018! Nout Size of output integer variable dimension (not used) !
1019! !
1020! On Output: !
1021! !
1022! Vout Output scalar variable (real, KIND=dp) !
1023! Nval Number of output values processed !
1024! !
1025!=======================================================================
1026!
1027! Imported variable declarations.
1028!
1029 integer, intent(in) :: Ninp, Nout
1030 real(dp), intent(in) :: Vinp(:)
1031!
1032 real(dp), intent(out) :: Vout
1033!
1034! Local variable declarations.
1035!
1036 integer :: ic
1037 integer :: Nval
1038!
1039!-----------------------------------------------------------------------
1040! Load scalar floating-point variable with input value.
1041!-----------------------------------------------------------------------
1042!
1043 ic=1
1044 vout=vinp(ic)
1045 nval=ic
1046!
1047 RETURN

◆ load_0d_r8()

integer function inp_decode_mod::load_r::load_0d_r8 ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) nout,
real(r8), intent(out) vout )

Definition at line 1252 of file inp_decode.F.

1253!
1254!=======================================================================
1255! !
1256! It loads input values into a requested model scalar floating-point !
1257! variable (KIND=r8). !
1258! !
1259! On Input: !
1260! !
1261! Ninp Number of input elements to process in Vinp (integer) !
1262! Vinp Input values (1D real(dp) array) !
1263! Nout Size of output integer variable dimension (not used) !
1264! !
1265! On Output: !
1266! !
1267! Vout Output scalar variable (real, KIND=r8) !
1268! Nval Number of output values processed !
1269! !
1270!=======================================================================
1271!
1272! Imported variable declarations.
1273!
1274 integer, intent(in) :: Ninp, Nout
1275 real(dp), intent(in) :: Vinp(:)
1276!
1277 real(r8), intent(out) :: Vout
1278!
1279! Local variable declarations.
1280!
1281 integer :: ic
1282 integer :: Nval
1283!
1284!-----------------------------------------------------------------------
1285! Load scalar floating-point variable with input value.
1286!-----------------------------------------------------------------------
1287!
1288 ic=1
1289#ifdef SINGLE_PRECISION
1290 vout=real(vinp(ic),r8)
1291#else
1292 vout=vinp(ic)
1293#endif
1294 nval=ic
1295!
1296 RETURN

References mod_kinds::r8.

◆ load_1d_dp()

integer function inp_decode_mod::load_r::load_1d_dp ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) nout,
real(dp), dimension(:), intent(out) vout )

Definition at line 1050 of file inp_decode.F.

1051!
1052!***********************************************************************
1053! !
1054! It loads input values into a requested model 1D double precision !
1055! array when numerical kernel is in single precision. !
1056! !
1057! On Input: !
1058! !
1059! Ninp Number of input elements to process in Vinp (integer) !
1060! Vinp Input values (1D real(dp) array) !
1061! Nout Size of output integer variable dimension !
1062! !
1063! On Output: !
1064! !
1065! Vout Output 1D variable (real, KIND=dp) !
1066! Nval Number of output values processed !
1067! !
1068!=======================================================================
1069!
1070! Imported variable declarations.
1071!
1072 integer, intent(in) :: Ninp, Nout
1073 real(dp), intent(in) :: Vinp(:)
1074!
1075 real(dp), intent(out) :: Vout(:)
1076!
1077! Local variable declarations.
1078!
1079 integer :: Nstr, i, ic
1080 integer :: Nval
1081!
1082!-----------------------------------------------------------------------
1083! Load 1D floating-point variable with input values.
1084!-----------------------------------------------------------------------
1085!
1086! If not all values are provided for variable, assume the last value
1087! for the rest of the array.
1088!
1089 ic=0
1090 IF (ninp.le.nout) THEN
1091 DO i=1,ninp
1092 ic=ic+1
1093 vout(i)=vinp(i)
1094 END DO
1095 IF (nout.gt.ninp) THEN
1096 nstr=ninp+1
1097 DO i=nstr,nout
1098 ic=ic+1
1099 vout(i)=vinp(ninp)
1100 END DO
1101 END IF
1102 ELSE
1103 DO i=1,nout
1104 ic=ic+1
1105 vout(i)=vinp(i)
1106 END DO
1107 END IF
1108 nval=ic
1109!
1110 RETURN

References mod_param::nstr.

◆ load_1d_r8()

integer function inp_decode_mod::load_r::load_1d_r8 ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) nout,
real(r8), dimension(:), intent(out) vout )

Definition at line 1299 of file inp_decode.F.

1300!
1301!=======================================================================
1302! !
1303! It loads input values into a requested model 1D floating-point !
1304! array (KIND=r8). !
1305! !
1306! On Input: !
1307! !
1308! Ninp Number of input elements to process in Vinp (integer) !
1309! Vinp Input values (1D real(dp) array) !
1310! Nout Size of output integer variable dimension !
1311! !
1312! On Output: !
1313! !
1314! Vout Output 1D variable (real, KIND=r8) !
1315! Nval Number of output values processed !
1316! !
1317!=======================================================================
1318!
1319! Imported variable declarations.
1320!
1321 integer, intent(in) :: Ninp, Nout
1322 real(dp), intent(in) :: Vinp(:)
1323!
1324 real(r8), intent(out) :: Vout(:)
1325!
1326! Local variable declarations.
1327!
1328 integer :: Nstr, i, ic
1329 integer :: Nval
1330!
1331!-----------------------------------------------------------------------
1332! Load 1D floating-point variable with input values.
1333!-----------------------------------------------------------------------
1334!
1335! If not all values are provided for variable, assume the last value
1336! for the rest of the array.
1337!
1338 ic=0
1339 IF (ninp.le.nout) THEN
1340 DO i=1,ninp
1341 ic=ic+1
1342#ifdef SINGLE_PRECISION
1343 vout(i)=real(vinp(i),r8)
1344#else
1345 vout(i)=vinp(i)
1346#endif
1347 END DO
1348 IF (nout.gt.ninp) THEN
1349 nstr=ninp+1
1350 DO i=nstr,nout
1351 ic=ic+1
1352#ifdef SINGLE_PRECISION
1353 vout(i)=real(vinp(ninp),r8)
1354#else
1355 vout(i)=vinp(ninp)
1356#endif
1357 END DO
1358 END IF
1359 ELSE
1360 DO i=1,nout
1361 ic=ic+1
1362#ifdef SINGLE_PRECISION
1363 vout(i)=real(vinp(i),r8)
1364#else
1365 vout(i)=vinp(i)
1366#endif
1367 END DO
1368 END IF
1369 nval=ic
1370!
1371 RETURN

References mod_param::nstr, and mod_kinds::r8.

◆ load_2d_dp()

integer function inp_decode_mod::load_r::load_2d_dp ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) iout,
integer, intent(in) jout,
real(dp), dimension(:,:), intent(out) vout )

Definition at line 1113 of file inp_decode.F.

1114!
1115!***********************************************************************
1116! !
1117! It loads input values into a requested model 2D double precision !
1118! array when numerical kernel is in single precision. !
1119! !
1120! On Input: !
1121! !
1122! Ninp Number of input elements to process in Vinp (integer) !
1123! Vinp Input values (1D real(dp) array) !
1124! Iout Size of output integer variable first I-dimension !
1125! Jout Size of output integer variable second J-dimension !
1126! !
1127! On Output: !
1128! !
1129! Vout Output 2D variable (real, KIND=dp) !
1130! Nval Number of output values processed !
1131! !
1132!=======================================================================
1133!
1134! Imported variable declarations.
1135!
1136 integer, intent(in) :: Ninp, Iout, Jout
1137 real(dp), intent(in) :: Vinp(:)
1138!
1139 real(dp), intent(out) :: Vout(:,:)
1140!
1141! Local variable declarations.
1142!
1143 integer :: Nstr, i, ic
1144 integer :: Nout, Nval
1145!
1146 real(dp), dimension(Iout*Jout) :: Vwrk
1147!
1148!-----------------------------------------------------------------------
1149! Load 2D floating-point variable with input values.
1150!-----------------------------------------------------------------------
1151!
1152! If not all values are provided for variable, assume the last value
1153! for the rest of the array.
1154!
1155 ic=0
1156 nout=iout*jout
1157 IF (ninp.le.nout) THEN
1158 DO i=1,ninp
1159 ic=ic+1
1160 vwrk(i)=vinp(i)
1161 END DO
1162 IF (nout.gt.ninp) THEN
1163 nstr=ninp+1
1164 DO i=nstr,nout
1165 ic=ic+1
1166 vwrk(i)=vinp(ninp)
1167 END DO
1168 END IF
1169 ELSE
1170 DO i=1,nout
1171 ic=ic+1
1172 vwrk(i)=vinp(i)
1173 END DO
1174 END IF
1175 vout=reshape(vwrk,(/iout,jout/))
1176 nval=ic
1177!
1178 RETURN

References mod_param::nstr.

◆ load_2d_r8()

integer function inp_decode_mod::load_r::load_2d_r8 ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) iout,
integer, intent(in) jout,
real(r8), dimension(:,:), intent(out) vout )

Definition at line 1374 of file inp_decode.F.

1375!
1376!***********************************************************************
1377! !
1378! It loads input values into a requested model 2D floating-point !
1379! array (KIND=r8). !
1380! !
1381! On Input: !
1382! !
1383! Ninp Number of input elements to process in Vinp (integer) !
1384! Vinp Input values (1D real(dp) array) !
1385! Iout Size of output integer variable first I-dimension !
1386! Jout Size of output integer variable second J-dimension !
1387! !
1388! On Output: !
1389! !
1390! Vout Output 2D variable (real, KIND=r8) !
1391! Nval Number of output values processed !
1392! !
1393!=======================================================================
1394!
1395! Imported variable declarations.
1396!
1397 integer, intent(in) :: Ninp, Iout, Jout
1398 real(dp), intent(in) :: Vinp(:)
1399!
1400 real(r8), intent(out) :: Vout(:,:)
1401!
1402! Local variable declarations.
1403!
1404 integer :: Nstr, i, ic
1405 integer :: Nout, Nval
1406!
1407 real(r8), dimension(Iout*Jout) :: Vwrk
1408!
1409!-----------------------------------------------------------------------
1410! Load 2D floating-point variable with input values.
1411!-----------------------------------------------------------------------
1412!
1413! If not all values are provided for variable, assume the last value
1414! for the rest of the array.
1415!
1416 ic=0
1417 nout=iout*jout
1418 IF (ninp.le.nout) THEN
1419 DO i=1,ninp
1420 ic=ic+1
1421#ifdef SINGLE_PRECISION
1422 vwrk(i)=real(vinp(i),r8)
1423#else
1424 vwrk(i)=vinp(i)
1425#endif
1426 END DO
1427 IF (nout.gt.ninp) THEN
1428 nstr=ninp+1
1429 DO i=nstr,nout
1430 ic=ic+1
1431#ifdef SINGLE_PRECISION
1432 vwrk(i)=real(vinp(ninp),r8)
1433#else
1434 vwrk(i)=vinp(ninp)
1435#endif
1436 END DO
1437 END IF
1438 ELSE
1439 DO i=1,nout
1440 ic=ic+1
1441#ifdef SINGLE_PRECISION
1442 vwrk(i)=real(vinp(i),r8)
1443#else
1444 vwrk(i)=vinp(i)
1445#endif
1446 END DO
1447 END IF
1448 vout=reshape(vwrk,(/iout,jout/))
1449 nval=ic
1450!
1451 RETURN

References mod_param::nstr, and mod_kinds::r8.

◆ load_3d_dp()

integer function inp_decode_mod::load_r::load_3d_dp ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) iout,
integer, intent(in) jout,
integer, intent(in) kout,
real(dp), dimension(:,:,:), intent(out) vout )

Definition at line 1181 of file inp_decode.F.

1183!
1184!***********************************************************************
1185! !
1186! It loads input values into a requested model 3D double precision !
1187! array when numerical kernel is in single precision. !
1188! !
1189! On Input: !
1190! !
1191! Ninp Number of input elements to process in Vinp (integer) !
1192! Vinp Input values (1D real(dp) array) !
1193! Iout Size of output integer variable first I-dimension !
1194! Jout Size of output integer variable second J-dimension !
1195! Kout Size of output integer variable third K-dimension !
1196! !
1197! On Output: !
1198! !
1199! Vout Output 3D variable (real, KIND=dp) !
1200! Nval Number of output values processed !
1201! !
1202!=======================================================================
1203!
1204! Imported variable declarations.
1205!
1206 integer, intent(in) :: Ninp, Iout, Jout, Kout
1207 real(dp), intent(in) :: Vinp(:)
1208!
1209 real(dp), intent(out) :: Vout(:,:,:)
1210!
1211! Local variable declarations.
1212!
1213 integer :: Nstr, i, ic
1214 integer :: Nout, Nval
1215!
1216 real(dp), dimension(Iout*Jout*Kout) :: Vwrk
1217!
1218!-----------------------------------------------------------------------
1219! Load 3D floating-point variable with input values.
1220!-----------------------------------------------------------------------
1221!
1222! If not all values are provided for variable, assume the last value
1223! for the rest of the array.
1224!
1225 ic=0
1226 nout=iout*jout*kout
1227 IF (ninp.le.nout) THEN
1228 DO i=1,ninp
1229 ic=ic+1
1230 vwrk(i)=vinp(i)
1231 END DO
1232 IF (nout.gt.ninp) THEN
1233 nstr=ninp+1
1234 DO i=nstr,nout
1235 ic=ic+1
1236 vwrk(i)=vinp(ninp)
1237 END DO
1238 END IF
1239 ELSE
1240 DO i=1,nout
1241 ic=ic+1
1242 vwrk(i)=vinp(i)
1243 END DO
1244 END IF
1245 vout=reshape(vwrk,(/iout,jout,kout/))
1246 nval=ic
1247!
1248 RETURN

References mod_param::nstr.

◆ load_3d_r8()

integer function inp_decode_mod::load_r::load_3d_r8 ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) iout,
integer, intent(in) jout,
integer, intent(in) kout,
real(r8), dimension(:,:,:), intent(out) vout )

Definition at line 1454 of file inp_decode.F.

1456!
1457!***********************************************************************
1458! !
1459! It loads input values into a requested model 3D floating-point !
1460! array (KIND=r8). !
1461! !
1462! On Input: !
1463! !
1464! Ninp Number of input elements to process in Vinp (integer) !
1465! Vinp Input values (1D real(dp) array) !
1466! Iout Size of output integer variable first I-dimension !
1467! Jout Size of output integer variable second J-dimension !
1468! Kout Size of output integer variable third K-dimension !
1469! !
1470! On Output: !
1471! !
1472! Vout Output 3D variable (real, KIND=r8) !
1473! Nval Number of output values processed !
1474! !
1475!=======================================================================
1476!
1477! Imported variable declarations.
1478!
1479 integer, intent(in) :: Ninp, Iout, Jout, Kout
1480 real(dp), intent(in) :: Vinp(:)
1481!
1482 real(r8), intent(out) :: Vout(:,:,:)
1483!
1484! Local variable declarations.
1485!
1486 integer :: Nstr, i, ic
1487 integer :: Nout, Nval
1488!
1489 real(r8), dimension(Iout*Jout*Kout) :: Vwrk
1490!
1491!-----------------------------------------------------------------------
1492! Load 3D floating-point variable with input values.
1493!-----------------------------------------------------------------------
1494!
1495! If not all values are provided for variable, assume the last value
1496! for the rest of the array.
1497!
1498 ic=0
1499 nout=iout*jout*kout
1500 IF (ninp.le.nout) THEN
1501 DO i=1,ninp
1502 ic=ic+1
1503#ifdef SINGLE_PRECISION
1504 vwrk(i)=real(vinp(i),r8)
1505#else
1506 vwrk(i)=vinp(i)
1507#endif
1508 END DO
1509 IF (nout.gt.ninp) THEN
1510 nstr=ninp+1
1511 DO i=nstr,nout
1512 ic=ic+1
1513#ifdef SINGLE_PRECISION
1514 vwrk(i)=real(vinp(ninp),r8)
1515#else
1516 vwrk(i)=vinp(ninp)
1517#endif
1518 END DO
1519 END IF
1520 ELSE
1521 DO i=1,nout
1522 ic=ic+1
1523#ifdef SINGLE_PRECISION
1524 vwrk(i)=real(vinp(i),r8)
1525#else
1526 vwrk(i)=vinp(i)
1527#endif
1528 END DO
1529 END IF
1530 vout=reshape(vwrk,(/iout,jout,kout/))
1531 nval=ic
1532!
1533 RETURN

References mod_param::nstr, and mod_kinds::r8.


The documentation for this interface was generated from the following file: