- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to create a 3 dimensional array with RESHAPE() but get the following error message:
Error: The size of SOURCE must be greater than or equal to PRODUCT(SHAPE). [RESHAPE].
I have counted the number of elements in the Source array and they total 150 (6x5x5 = 150), and
PRODUCT(Shape) = 6x5x5 = 150 so I am stumped.
The code is posted below. Any comments would be appreciated.
[plain]MODULE JShift
! MODULE contains J Shift values for diagonal interpolation
IMPLICIT NONE
! the following J shift data is from the following spreadsheet:
! IVF WIN32 SeriesScanned SeriesGawn Burrill"GB Max Kt & Kq shift.xls"
REAL(4), PARAMETER, DIMENSION(6,5,5) :: GBD_JShift = &
RESHAPE(SOURCE = (/ &
!Prop 306 thru 320 BAR = 0.5
! Sig 2.0 Sig 1.5 Sig 1 Sig 0.75 Sig 0.5 P/D Range
0.105, 0.190, 0.150, 0.130, 0.170, & ! 0.6 to 0.8
0.095, 0.110, 0.210, 0.230, 0.195, & ! 0.8 to 1.0
0.080, 0.100, 0.115, 0.175, 0.160, & ! 1.0 to 1.2
-1.0, -1.0, -1.0, -1.0, -1.0, & ! 1.2 to 1.4
-1.0, -1.0, -1.0, -1.0, -1.0, & ! 1.4 to 1.6
0.375, 0.400, 0.505, 0.520, 0.640, & ! 1.2 to 2.0
!Prop 406 thru 420 BAR = 0.65
! Sig 2.0 Sig 1.5 Sig 1 Sig 0.75 Sig 0.5 P/D Range
0.075, 0.110, 0.170, 0.150, 0.185, & ! 0.6 to 0.8
0.100, 0.100, 0.135, 0.180, 0.175, & ! 0.8 to 1.0
0.075, 0.090, 0.105, 0.150, 0.130, & ! 1.0 to 1.2
0.095, 0.105, 0.130, 0.140, 0.185, & ! 1.2 to 1.4
0.085, 0.085, 0.090, 0.125, 0.095, & ! 1.4 to 1.6
0.170, 0.195, 0.235, 0.220, 0.335, & ! 1.6 to 2.0
! Prop 106 thru 120 BAR = 0.80
! Sig 2.0 Sig 1.5 Sig 1 Sig 0.75 Sig 0.5 P/D Range
0.100, 0.100, 0.145, 0.165, 0.140, & ! 0.6 to 0.8
0.085, 0.105, 0.140, 0.160, 0.160, & ! 0.8 to 1.0
0.090, 0.090, 0.095, 0.125, 0.170, & ! 1.0 to 1.2
0.085, 0.100, 0.120, 0.115, 0.145, & ! 1.2 to 1.4
0.095, 0.100, 0.110, 0.130, 0.120, & ! 1.4 to 1.6
0.155, 0.160, 0.185, 0.215, 0.245, & ! 1.6 to 2.0
! Prop 508 thru 520 BAR = 0.95
! Sig 2.0 Sig 1.5 Sig 1 Sig 0.75 Sig 0.5 P/D Range
-1.0 -1.0, -1.0, -1.0, -1.0, & ! 0.6 to 0.8
0.095, 0.100, 0.115, 0.130, 0.150, & ! 0.8 to 1.0
0.095, 0.085, 0.090, 0.100, 0.135, & ! 1.0 to 1.2
0.095, 0.110, 0.130, 0.150, 0.125, & ! 1.2 to 1.4
0.095, 0.090, 0.080, 0.105, 0.150, & ! 1.4 to 1.6
0.160, 0.190, 0.230, 0.205, 0.230, & ! 1.6 to 2.0
! Prop 208 thru 216 BAR = 0.95
! Sig 2.0 Sig 1.5 Sig 1 Sig 0.75 Sig 0.5 P/D Range
-1.0, -1.0, -1.0, -1.0, -1.0, & ! 0.6 to 0.8
0.085, 0.100, 0.110, 0.130, 0.170, & ! 0.8 to 1.0
0.125, 0.090, 0.105, 0.090, 0.125, & ! 1.0 to 1.2
0.085, 0.125, 0.105, 0.120, 0.125, & ! 1.2 to 1.4
0.115, 0.075, 0.100, 0.125, 0.155, & ! 1.4 to 1.6
-1.0, -1.0, -1.0, -1.0, -1.0/),& ! 1.6 to 2.0
SHAPE = (/6,5,5/), ORDER = (/2,1,3/))
END MODULE[/plain]
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[cpp] -1.0 -1.0, -1.0, -1.0, -1.0, & ! 0.6 to 0.8
^
[/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Repeat Offender! Can not believe I missed the missing comma. I went over those numbers several times looking forjust such a problem.Maybe I need to enlarge the type on thescreen. Added the comma and the Module compiled with no error. Thank youmuch.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page