Skip to content

Commit

Permalink
Add ability to create multiple hydrology instances in driver. Each in…
Browse files Browse the repository at this point in the history
…stance will represent a member in an ensemble. Hydrology instances will change their working directory to a subdirectory that matches the component name (i.e. HYD-03). WRF-Hydro ensemble is running side-by-side with a new test case sbys_tuolumne_hyd.ens002.ldas. Coupled LND-HYD ensemble work is incomplete.
  • Loading branch information
danrosen25 committed Oct 8, 2019
1 parent 2b20516 commit 2786d7b
Show file tree
Hide file tree
Showing 5 changed files with 312 additions and 48 deletions.
50 changes: 50 additions & 0 deletions compset/runconfig/lishydro.runconfig.hyd.ens002
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
###############################################
#### LISHydro runtime configuration #####
###############################################

# optionally turn off a component (options are "yes" and "no")
lnd: no
hyd: yes
med: no

# PET lists - if not set, use all PETs
#pets_lnd:
pets_hyd: __PETLISTHYD__
multi_instance_hyd: true
instance_count_hyd: 2
#pets_med:

# global clock
time_step: __TIMESTEP__
start_time: __STARTTIME__
stop_time: __STOPTIME__

# run sequence
runSeq::
@__TIMESTEP__
HYD-1
HYD-2
@
::

# component attributes
driverAttributes::
Verbosity = high
Profiling = 0
::

hydAttributes::
Verbosity = 1
Diagnostic = 0
Profiling = 0
realize_all_export = false
config_file = hydro.namelist
das_config_file = namelist.hrldas
time_step = 0
forcings_directory = __FORCINGDIRHYD__
domain_id = 1
nest_to_nest = false
import_dependency = false
output_directory = HYD_OUTPUT
::

10 changes: 10 additions & 0 deletions compset/runsettings/sbys_tuolumne_hyd.ens002.ldas
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/csh
set RUNCONFIG="hyd.ens002"
set TASKS="512"
set TIME="01:00:00"
set PETLISTHYD="0 255 256 511"
set TIMESTEP="3600"
set STARTTIME="2015 10 01 0 0 0"
set STOPTIME="2015 11 01 0 0 0"
set REMAP="redist"
set FORCINGDIRHYD="WRFHYDRO_FORCING/LDASOUT/tuolumne"
29 changes: 22 additions & 7 deletions compset/setuprun.csh
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,28 @@ mkdir -p $RUNDIR
if ($RUNCONFIG =~ *hyd*) then
set DATA_HYD=$DATA_ROOT/WRFHydro/$COMPSET
if (-d $DATA_HYD) then
cp $DATA_HYD/namelist.hrldas $RUNDIR
cp $DATA_HYD/hydro.namelist $RUNDIR
cp $DATA_HYD/WRFHYDRO_PARMS/CHANPARM.TBL $RUNDIR
ln -sf $DATA_HYD/WRFHYDRO_DOMAIN $RUNDIR/WRFHYDRO_DOMAIN
ln -sf $DATA_HYD/WRFHYDRO_FORCING $RUNDIR/WRFHYDRO_FORCING
ln -sf $DATA_HYD/WRFHYDRO_PARMS $RUNDIR/WRFHYDRO_PARMS
ln -sf $DATA_HYD/WRFHYDRO_RESTART $RUNDIR/WRFHYDRO_RESTART
set ensemble=`find $DATA_HYD -name 'HYD-*'`
foreach data_hyd_member (${ensemble})
set member=`basename $data_hyd_member`
set rundir_member=$RUNDIR/$member
mkdir -p $rundir_member
cp $data_hyd_member/namelist.hrldas $rundir_member
cp $data_hyd_member/hydro.namelist $rundir_member
cp $data_hyd_member/WRFHYDRO_PARMS/CHANPARM.TBL $rundir_member
ln -sf $data_hyd_member/WRFHYDRO_DOMAIN $rundir_member/WRFHYDRO_DOMAIN
ln -sf $data_hyd_member/WRFHYDRO_FORCING $rundir_member/WRFHYDRO_FORCING
ln -sf $data_hyd_member/WRFHYDRO_PARMS $rundir_member/WRFHYDRO_PARMS
ln -sf $data_hyd_member/WRFHYDRO_RESTART $rundir_member/WRFHYDRO_RESTART
end
if ( "$ensemble" == "" ) then
cp $DATA_HYD/namelist.hrldas $RUNDIR
cp $DATA_HYD/hydro.namelist $RUNDIR
cp $DATA_HYD/WRFHYDRO_PARMS/CHANPARM.TBL $RUNDIR
ln -sf $DATA_HYD/WRFHYDRO_DOMAIN $RUNDIR/WRFHYDRO_DOMAIN
ln -sf $DATA_HYD/WRFHYDRO_FORCING $RUNDIR/WRFHYDRO_FORCING
ln -sf $DATA_HYD/WRFHYDRO_PARMS $RUNDIR/WRFHYDRO_PARMS
ln -sf $DATA_HYD/WRFHYDRO_RESTART $RUNDIR/WRFHYDRO_RESTART
endif
else
echo "ERROR: DATA_HYD directory not found [$DATA_HYD]"
exit 1
Expand Down
Loading

0 comments on commit 2786d7b

Please sign in to comment.