|
Last change
on this file since 3536 was
2759,
checked in by aslmd, 3 years ago
|
|
adding unmodified code from WRFV3.0.1.1, expurged from useless data +1M size
|
|
File size:
1010 bytes
|
| Line | |
|---|
| 1 | #include <stdio.h> |
|---|
| 2 | #include <stdlib.h> |
|---|
| 3 | #include <string.h> |
|---|
| 4 | #include <strings.h> |
|---|
| 5 | |
|---|
| 6 | #include "protos.h" |
|---|
| 7 | #include "registry.h" |
|---|
| 8 | #include "data.h" |
|---|
| 9 | |
|---|
| 10 | int |
|---|
| 11 | gen_model_data_ord ( char * dirname ) |
|---|
| 12 | { |
|---|
| 13 | FILE * fp ; |
|---|
| 14 | char fname[NAMELEN] ; |
|---|
| 15 | char * fn = "model_data_order.inc" ; |
|---|
| 16 | int i ; |
|---|
| 17 | |
|---|
| 18 | if ( dirname == NULL ) return(1) ; |
|---|
| 19 | if ( strlen(dirname) > 0 ) { sprintf(fname,"%s/%s",dirname,fn) ; } |
|---|
| 20 | else { sprintf(fname,"%s",fn) ; } |
|---|
| 21 | if ((fp = fopen( fname , "w" )) == NULL ) return(1) ; |
|---|
| 22 | print_warning(fp,fname) ; |
|---|
| 23 | fprintf(fp,"INTEGER , PARAMETER :: model_data_order = DATA_ORDER_") ; |
|---|
| 24 | for ( i = 0 ; i < 3 ; i++ ) |
|---|
| 25 | { |
|---|
| 26 | switch ( model_order[i] ) |
|---|
| 27 | { |
|---|
| 28 | case ( COORD_X ) : fprintf(fp,"X") ; break ; |
|---|
| 29 | case ( COORD_Y ) : fprintf(fp,"Y") ; break ; |
|---|
| 30 | case ( COORD_Z ) : fprintf(fp,"Z") ; break ; |
|---|
| 31 | default : fprintf(stderr,"Model data order ambiguous. Is there a dimspec for all three coordinate axes?\n") ; break ; |
|---|
| 32 | } |
|---|
| 33 | } |
|---|
| 34 | fprintf(fp,"\n") ; |
|---|
| 35 | close_the_file( fp ) ; |
|---|
| 36 | return(0) ; |
|---|
| 37 | } |
|---|
| 38 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.