13 gen_model_data_ord ( char * dirname
)
17 char * fn
= "model_data_order.inc" ;
20 if ( dirname
== NULL
) return(1) ;
21 if ( strlen(dirname
) > 0 ) { sprintf(fname
,"%s/%s",dirname
,fn
) ; }
22 else { sprintf(fname
,"%s",fn
) ; }
23 if ((fp
= fopen( fname
, "w" )) == NULL
) return(1) ;
24 print_warning(fp
,fname
) ;
25 fprintf(fp
,"INTEGER , PARAMETER :: model_data_order = DATA_ORDER_") ;
26 for ( i
= 0 ; i
< 3 ; i
++ )
28 switch ( model_order
[i
] )
30 case ( COORD_X
) : fprintf(fp
,"X") ; break ;
31 case ( COORD_Y
) : fprintf(fp
,"Y") ; break ;
32 case ( COORD_Z
) : fprintf(fp
,"Z") ; break ;
33 default : fprintf(stderr
,"Model data order ambiguous. Is there a dimspec for all three coordinate axes?\n") ; break ;
37 close_the_file( fp
) ;