Exploring the XML File Format – Part 3 – SLOPE/W

by Nate Hekman on December 10, 2010

XML File Format Series
1. Exploring the XML File Format
2. Exploring the XML File Format – Part 2
3. Exploring the XML File Format – Part 3 – SLOPE/W

John asked some specific questions about the file format, which makes it much easier to add a Part 3 to my series about the GeoStudio xml file format.

Nate, the reason I asked for the XSD is that I would like to write an XML-file from scratch, perform a batch calculation with it (Bishop, using CU-values) and then read the stability result (Safety factor). Could you tell me: A) which blocks are realy needed in the XML to do this (I guess I do not have to write the View block for instance)? B) where I can find the result in the XML? I see there are other (result) files but was wondering whether the result would be in the xml as well.

I’ll give you some suggestions here, but you’ll need to do some tests to see if I’m 100% accurate and if it matches your needs. I suggest you use GeoStudio to create an analysis similar to what you need, then do a File – Save As, change the “Save as type” to “GeoStudio File (*.xml)”, and save it. That will give you an xml file you can look through for starters, without having to go through the hassle of a zip file all the time. Now find the portions of the file you think may not be necessary, and delete them (or comment them out) one at a time, save it, try opening it in GeoStudio and see if there are any errors reported. For example, you’ll need the Analyses section, but within that section you can likely get rid of the InputFiles. Here are the major sections I’m guessing you should be able to get rid of completely without the SLOPE/W solver caring:

  • BCs – slope doesn’t use boundary conditions
  • Contour – only used if you’re using GeoStudio to look at the results (and I think it will open fine without this section, just using defaults)
  • Functions – unless you’re using functions of course, in which case you can still get rid of the Boundary subsection and keep only Material.
  • MeshItems – no mesh in slope
  • SketchItems – that’s only for markup
  • View – that’s just view preferences

Which leaves you with only:

  • Analyses – the analysis settings
  • Contexts – the “associations” I’ve described in the past, such as which material is associated with which region in which analysis.
  • Coordinates – this one may even be optional, since we really only use units for labelling things.
  • FileInfo – define at least the FileVersion–this helps GeoStudio load the xml data correctly.
  • Functions if you use any
  • GeometryItems – defines your regions, lines and points
  • Materials – defines the materials
  • SlopeItems – defines slope-specific objects such as slip surface definition. 

Results

The results are not stored in the xml file.  There are lots of results generated, and xml is too verbose and would inflate the file size unnecessarily.  Instead results of finite element analyses are all stored in csv files–with a bonus that they are easy to open in a spreadsheet application, as well as being easy to parse in code.  Results of slope analyses are not in csv format; they are in text files which are supposed to be easy to figure out.  Here’s what the GeoStudio 2007 User’s Guide says about them:

All of the SLOPE/W output files have column descriptions that explain what each data set represents.  If you have specific questions or it is not clear, please contact GEO-SLOPE via e-mail at support [at] geo-slope [dot] com. The following files are created by SLOPE/W: Factor of safety:  *.FAC Slice forces:  *.FRC01 and OPTFRC Probability and sensitivity:  *.PRO01 and OPTPRO Permanent deformation (Newmark with QUAKE/W):  *.NEW

Open a solved gsz file in your favourite zip application (I use 7-Zip), and you’ll see a folder with the same name as your analysis.  Each solved analysis stores its results in its own folder. Inside that folder you’ll see another xml file–that’s a snapshot of the main xml file as it was when the analysis was solved. You’ll also see additional numbered folders, these are the time steps.  Each time step’s results gets its own folder. All these result folders will contain csv files (for finite element analyses) or .fac/.frc files (for slope/w).  The .fac file summarizes the factors of safety.  The .frc01 file contains the computed forces for all slices of the critical slip surface.  If you’ve opted to store results for more than one critical slip surface, then the next most critical will be stored in .frc02, and so on. The User’s Guide suggests you email support if you need help understanding the format of the result files.  If you need a quick answer, that’s still your best bet, but I’m also happy to answer questions through blog comments as I have time.

{ 18 comments… read them below or add one }

1

hunggeopro6 11.11.11 at 2:28 am

Dear Nate!
Can you explain the key in XML file for me understand? When and where the key that is used?
Thank so much!

2

Nate 11.11.11 at 8:01 am

@hunggeopro6: what ‘key’ do you mean?

3

hunggeopro6 11.14.11 at 3:37 am

Example:

…… and some other Key.
Can you explain me the meaning of the key ?
Thank so much!

4

hunggeopro6 11.14.11 at 3:47 am

You have explained the meaning some key in part Exploring the XML File Format but have many key still unexplained.
Can you explain me the meaning all of the key ?
Thank so much!

5

Nate 11.15.11 at 10:28 am

Unfortunately I do not have the time to explain every part of the xml. I also don’t think it would be useful, because many of them are only used by a small number of people. If there are specific keys or specific features you would like to understand, I would be happy to expand some more on them.

6

hunggeopro6 11.15.11 at 8:51 pm

No problem! I’m trying to create File in GeoStudio2007 and save as to XML step by step, I see the code and trying to know that key used. If you have someone knowledgeable on this subject please send to me email address, I can know more about XML and GeoStudio2007 .
Have different between 2004 and 2007 when I save as to XML?

7

Nate 11.16.11 at 9:37 am

So what product are you most interested in? Slope? Seep? Something else?

I’d suggest (or perhaps you have already done this) that you start by creating a very simple file, a single analysis with nothing in it. Save it and look at the xml.

Then add something simple, like a region, save it again (with a new name) and see what has changed in the xml by comparing this file with the previous one.

Add something else simple, like a material, save it again and see what has changed in the xml.

I think that everything you’ll see in the xml from those simple steps will already have been described in the Grokking GeoStudio blog. If there is something you notice in the xml that you don’t understand, then ask me about that specific item and I’ll fill you in. (Or maybe I’ll add a Part 4 to the blog!)

There are some differences in the xml between 2004 and 2007, but mostly just related to the fact that 2007 has new features. For example, 2004 only allowed one analysis of each product (one slope, one seep, one ctran, etc), whereas 2007 allows any number, so naturally the xml related to analyses would be slightly different. But in general the structure of the xml will be similar.

8

hunggeopro6 11.17.11 at 7:55 pm

“….add something simple, like a region, save it again (with a new name) and see what has changed in the xml by comparing this file with the previous one…..”!
It correct. I’m doing exactly as your guide.
So what product are you most interested in? Slope? Seep? Something else?
I’m interested in SlopeW and then Sigma.
I hope many thing new in a part 4.
Best Regards!

9

hunggeopro6 04.04.12 at 9:56 pm

Dear Nate!
I have created the file Slope. Thank the knowledge you shared with us.
I will send you a video for you to see. I’m still looking forward to part 4 of you.
Regards!

10

hunggeopro6 04.11.12 at 1:49 am

11

Nate 04.11.12 at 8:39 am

Very nice! It’s great to see useful applications written around the GeoStudio file format.

12

Toan 04.12.12 at 11:16 pm

hi, hunggeopro6, nice to see u in here ^^

13

hunggeopro6 04.16.12 at 9:42 am

@Toan: You are hdt4151 at ketcau forum, aren’t you?

14

Toan 04.16.12 at 8:20 pm

yea, that’s right 🙂

15

Alessia 12.06.16 at 3:58 am

Hello Nate,
I have a question about the result files and I hope you can help me.
I am trying to manipulate the .xml file because I need to run hundreds of simulations that differ just for the value of one or two parameters (in the boundary condition). I have a time-dependent analysis in SEEP and then I use the resulting pore water pressure in a SLOPE analysis to calculate the FS for all the time steps. I have 35 time-steps, but I am mainly interested in the minimum FS in time with Bishop method. The problem is that when I work on the Geostudio file I can easily plot the minimum FS versus time and export the results, but if I work on the .fac/.frc all the time-steps are saved in different folders and it’s quite impractical to compare values at different time-steps. Is there any way to overcome this issue? Is there a way to generate an output file that collects data for different time-steps (ideally the minimum FS and the location of the correspondent slip surface)?
Thank you very much for this amazing blog!
Alessia

16

Nate Hekman 12.07.16 at 9:53 am

No, Alessia, each time step is its own independent analysis, and thus gets stored in its own folder. To compare values across time steps your code will have to read all the time step sub folders.

As an aside, GeoStudio 2012 and 2016 (version 8+) have a different format for storing SLOPE/W results: they store them in .csv files just like SEEP/W does. That may make it easier for you to write code that works consistently across all analysis types. They still store each time step in a separate folder, though.

17

Albert 12.04.18 at 3:15 am

Dear Nate,

how can I add columns of results in the slip_surface.csv file? In particular I want to output the Entry and Exit points of each surface. Is it possible to do it from the .xml file? Thanks for the blog!

18

Nate Hekman 12.04.18 at 5:07 pm

@Albert: you cannot affect what gets written to the .csv files. You could probably, however, kludge something by creating an Add-In. As Add-Ins do have access to the slip surface data, it could write its own file.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>