Replies: 4 comments 2 replies
-
If sw4 can't read your rfile, you have probably made a mistake when setting it up. The first thing you need to do is to install version 3 of sw4. Then carefully follow the instructions in the user's guide on the rfile format, section 12.5. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if version 3 would resolve my issue, but I'll give it a try. Anyway, as I wrote, SW4 is reading my rfile (and also pfile), but it seems to read the data values incorrectly for both file formats. I already verified that I can write the same rfile as the provided example with SW4 package, so I'm not sure why SW4 seems to have the wrong ranges for density, vp, and vs. I followed the section you mentioned, but regardless if I follow the order mentioned in the guide or the order that's being used in the provided readmat.m file, SW4 doesn't seem to read the values correctly. The guide seems to indicate that the data have the following dimensionality: data(c, i, j, k), but the readmat.m file order seems to be: data(c, k, j, i)!! Here's also a screenshot of trying to run SW4 with a pfile and the value ranges are all wrong (I should be expecting 1.xxish x 10^3-2.xxish x 10^3 kg/m3 data range for density, however the values are in the 1.xxish x 10^6 range!!!) |
Beta Was this translation helpful? Give feedback.
-
The fact that some grid points have undefined material properties tells me that you have not covered the entire domain with your rfile/pfile model. A good idea is to add a single block command with background material properties (before the rfile/pfile command). Then output images of various cross-sections to inspect your model. The pfile command has been used extensively by many people and it is unlikely to have the problem you mention. As described in the user's guide, section 12.3.1, the units for P & S velocities should be in km/s and density should be in g/(cm)^3. |
Beta Was this translation helpful? Give feedback.
-
I think I got the pfile to work, but I'm just testing stuff on a virtual machine on my local laptop. I'm planning to run the real thing on Amazon EC2 cloud, but I'm not sure what configuration I should select. Do you have any recommendation? I think they have virtual CPUs and I'm not sure how many should I acquire for my stuff. I ran a test before on Amazon, but the sw4 process was killing itself I think (not sure if it was the same error or not because the message was different) here's a screenshot: Thanks for all the help you've given me, I really appreciate it. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I followed the guide in how to generate an rfile and wrote my function in Matlab. I successfully tested my own function to generate the same file as the example one under the examples/rfile folder and also against the provided readmat file. However, when I run my .in file with my rfile, the data seems to be read differently to what the provided readmat reads. The density, vp, and vs values seem to be messed up. For example, my density range is: 1.2ish x 10^3 to 2.2ish x 10^3 kg/m3, but as you can see in the screenshot below, SW4 has the wrong value for the lower bound (it's reading -1)
So, I tried the pfile format and found out that the guide seems to be flipping the order of varying x and y. I followed the provided example of pfile (its order was reversed to what's in the user guide) and SW4 seemed to read my pfile correclty. So, this get me thinking that the rfile specification might be outdated or something. Can you please advise on how to get the rfile working with SW4?
Beta Was this translation helpful? Give feedback.
All reactions