Open rburghol opened 2 years ago
Find the code that sets the GLOBAL lines: fgrep RESUME ./code/src/* -R| grep RUN|grep line
cbp run_land.csh CFBASE30Y20180615_vadeq JL2_6850_6890
cbp run_lug.csh CFBASE30Y20180615_vadeq JL2_6850_6890
special action flag I
not programmed for modules in
pp/src/lug/lspecact.f
Problem: Cannot run in old mode (run_river.csh) in p6.
error:
Same error happens when I try to run the p6 scripts manually, so maybe I am missing a path?
but this DOES work:
cd run_bhatt/OneCommandWSM_P6_STRLOAD_SCENCF
./bhatt_run_lug_INFEXP_quiet_oneseg.csh CFBASE30Y20180615_vadeq H51125 RWB
RWB
is a dummy for the log fileThis also works:
cp run_bhatt/OneCommandWSM_P6_STRLOAD_SCENCF/bhatt_run_lug_INFEXP_quiet_oneseg.csh ./run/standard/
./bhatt_run_lug_INFEXP_quiet_oneseg.csh CFBASE30Y20180615_vadeq H51125 RW
model directory is OneCommandWSM_P6_STRLOAD_SCENCF/
script is located in https://github.com/HARPgroup/cbp_wsm/blob/p61st/run_bhatt/OneCommandWSM_P6_STRLOAD_SCENCF/bhatt_one_command_wsm.csh
Tasks/Status
HSP_VERSION
variablebhatt_one_command_wsm.csh
??set PROJECT_HOME = /opt/model/p6/gb604b
set MY_HOME = run_bhatt
set SCRIPT_DIR = OneCommandWSM_P6_STRLOAD_SCENCF
HSP_VERSION
set in environment variables fromhspf.config
: if we want it globally - does not yet work since this ends up overwriting the exported ENV variable until we get reading into control filesconfig/scripts/[scenario].con
set_hspf_icprb
...commandsCode
hsp_uci_version
: converts a UCI from hspf to hsp2 or vice versahsp_uci_version [uci file full path] [hsp version]
hsp_uci_version ~/working/modeling/hsp2/test_cbp/forA51800.uci hsp2
run/standard/run_lug.csh
hspf_config
: Looks for a scenario argument(2nd arg, $1), and if it finds it, will look for a config/control/scripts/[scenario].con file to load csh variables. Has code to translate CSH formatted vars to bash (eliminate theset
prefix)find_scenario_fragment
: and migrate code here perhaps?Implementation:
cbp
script runs hspf_confighspf_to_hsp2
to overhaul the UCIHSP_VERSION=hspf
HSP_VERSION="hsp2";export HSP_VERSION;cbp run_land.csh hsp2_2022 OR4_8120_7890
Converting UCI
This is a quick and dirty implementation using
sed
, since initial testing has only shown a single line being incompatible.Code: hsp_uci_version
Convert to hsp2 and back to hspf.