!$Author: wjr $ !$Date: 2012-03-30 09:46:26 -0500 (Fri, 30 Mar 2012) $ !$Revision: 12162 $ !$HeadURL: https://svn.weru.ksu.edu/weru/weps1/trunk/weps.src/src/sweep/sweep.for $ ! Make sure that any input filename specified with the -i option has an ! extension of some kind. ! !********************************************************************** ! MAIN for SWEEP !********************************************************************** program sweep ! ! +++ PURPOSE +++ ! ! To start a standalone version of the EROSION submodel ! ! It calls ERODIN (through sweep_cmdline) to read an input file (stdin), ! calls ERODINIT to initialize grid, ! runs the EROSION submodel code, and ! calls ERODOUT to print the generated output (stdout). ! ! +++ ARGUMENT DECLARATIONS +++ ! ! + + + GLOBAL COMMON BLOCKS + + + use p1werm_def use constants_def use file_def use m1flag_def use sweep_filenames_def use datetime_def use anemometer_def use gridmod use m1sim_def use m2geo_def use p1erode_def use w1clig_def use sweep_init use sweep_commandline ! +++ SUBROUTINES CALLED+++ ! erodin (called in sweep_cmdline) ! erodinit ! erosion ! erodout ! ++++ LOCAL VARIABLES +++ integer julday !utility date function ! +++ END SPECIFICATIONS +++ ! Determine date of Run datetimestr = get_datetimestr() write(6,*) "Date of SWEEP run: ",datetimestr ! On WEPS runs, this value comes from the weather input data file (CLIGEN or real data) ! for best SWEEP results it should be an input data value awzypt = 300.0 !Requires yrly average precip. (Hagen's best estimate for us to use in sweep) ! Initialize anemometer defaults call std_anemometer_init() call sweep_cmdline() ! Set the day, month and year for the "single day event" ! and get the "Julian Date" for it. am0jd = julday(1,1,0001) ! Initialize erosion code, create grid, etc: ! (must come after sim field size, & no. subr specified) call erodinit() ! Start erosion call erosion(min_erosion_awu) ! Sweep will generate the final grid values and the summarized erosion totals if (btest(am0efl,0).or.btest(am0efl,1).or.btest(am0efl,3)) then call erodout (o_egrd_unit, o_erod_unit, o_sgrd_unit, input_filename, hagen_plot_flag) endif if (i_einp_unit .ne. 5) then !leave stdin alone close(i_einp_unit) endif if (o_einp_unit .ne. 6) then !leave stdout alone close(o_einp_unit) endif if (o_erod_unit .ne. 6) then !leave stdout alone close(o_erod_unit) endif close(o_egrd_unit) close(o_sgrd_unit) close(o_emit_unit) close(o_eplt_unit) stop end program sweep