Commit 6d88cc91 authored by Johannes Spazier's avatar Johannes Spazier

Applied ZTOP-patch.

parent 5acb5fe2
......@@ -88,4 +88,7 @@ int ewDumpPOIsCompact( int istage );
extern CNode *gNode;
/* unset to remove ZTOP_PATCH */
#define ZTOP_PATCH
#endif /* EASYWAVE_H */
......@@ -49,6 +49,31 @@ int ewSource()
ierr = eq.read( Par.fileSource ); if(ierr) return ierr;
#ifdef ZTOP_PATCH
// check fault parameters
Err.disable();
ierr = eq.finalizeInput();
while( ierr ) {
i = ierr/10;
ierr = ierr - 10*i;
if( ierr == FLT_ERR_STRIKE ) {
Log.print( "No strike on input: Employing effective symmetric source model" );
if( eq.nfault > 1 ) { Err.enable(); return Err.post("Symmetric source assumes only 1 fault"); }
eq.fault[0].strike = 0.;
effSymSource = 1;
}
else if( ierr == FLT_ERR_ZTOP ) {
Log.print( "Automatic depth correction to fault top @ 10 km" );
eq.fault[i].depth = eq.fault[i].width/2 * sindeg(eq.fault[i].dip) + 10.e3;
}
else {
Err.enable();
return ierr;
}
ierr = eq.finalizeInput();
}
Err.enable();
#else
// check fault parameters
Err.disable();
ierr = eq.finalizeInput();
......@@ -68,6 +93,7 @@ int ewSource()
ierr = eq.finalizeInput(); if(ierr) return ierr;
}
Err.enable();
#endif
// calculate uplift on a rectangular grid
// set grid resolution, grid dimensions will be set automatically
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment