Hello,
I have a program that compiles and runs as needed via a terminal window (or double-click) but was wondering how tricky it is to convert it to a menu-driven style?
Basically it reads a parameters file which has these elements: OPEN(10, file='parameters.dat', status='OLD')
!//////////////////INPUT///////////////////////////// ! Program inputs in parameters.dat: ! Perform a detailed topography calculation on the land areas ! present in the file topo_cart_det.xyz: ! det=1-->yes ! det=0-->no ! del_xd-->grid step Distant zone (km) ! del_xi-->grid step Intermediate zone (km) ! del_xBg-->grid step Bouguer output grid (km) ! rho_c-->crust reduction density (kg/m³) ! rho_w-->water reduction density (kg/m³) ! N-->number of nodes of elevation an FA input grids in x ! M-->number of nodes of elevation an FA input grids in y ! R_i-->Limit of the intermediate zone (km) ! R_d-->Limit of the distant zone (km) ! land='on'-->calculates Bouguer anomaly at land and sea points ! land='off'->calculates Bouguer anomaly only at sea points ! slab_Boug=1-->INPUT GRAVITY ANOMALY IS SLAB-CORRECTED BOUGUER ! slab_Boug=0-->INPUT GRAVITY ANOMALY IS FREE AIR !If det=1, then, the input file must contain the following additional !information: ! N_det-->number of nodes of topo_cart_det.xyz input grid in x ! M_det-->number of nodes of topo_cart_det.xyz input grid in y ! del_xdet-->grid step of the Detailed Intermediate zone (km)
opens up two existing files for data input (gravity and topography) open(4,file='topo_cart.xyz', status='OLD') open(5,file='gravi_cart.xyz',status='OLD')
Processes the data to write two output files (Bouguer anomaly and slab_correction) open(15,file='bouguer.xyz',status='UNKNOWN') open(17,file='bouguer_slab.xyz',status='UNKNOWN') .......... OPEN(10, file='lat_ex.dat', status='UNKNOWN') WRITE(10,) L_x,L_y,rtiodel_xi CLOSE(10) write(,)'' write(,)'BOUGUER ANOMALY CALCULATED' write(,)'' DEALLOCATE (E,FA,FA_strg) IF (det==1) DEALLOCATE (E_det) CLOSE(15) CLOSE(17)
I am trying to simplify the usage of the program since at present if one needs to change a variable in the parameters file, that is done externally.
At the moment, input file names have to be standard and changed after computation.
I have not used Clearwin+ yet so kind of shooting in the dark a bit here!
Cheers Lester