Skip to content

Instantly share code, notes, and snippets.

@ougx
Created January 28, 2019 14:34
Show Gist options
  • Save ougx/eb51bec578d3e411c708d77ad947107f to your computer and use it in GitHub Desktop.
Save ougx/eb51bec578d3e411c708d77ad947107f to your computer and use it in GitHub Desktop.
echo Working directory: %~dp0 of %computername% by %username%
echo Running time: %date%; %time%
set lay= 1
set row= %1
set col= %2
set pump= -0.2
set namfile=rrca
set cell=R%1C%2
set resultfolder=result-NPNM
echo Row %row% and Column %col%
set wd=%~dp0
IF EXIST E:\dnr\RRCA\RRCA_Directory_Structure\1050run\condor\MF_DATA\12p-fixed.str (
Echo Folder Found on C drive
set modpath=E:\dnr\RRCA\RRCA_Directory_Structure\1050run\condor\MF_DATA\
) ELSE (
net use \\server1\IWMShare\Users\Michael\Model\RRCA\rrca_1050run\condor_pump\1951-2000-pump 0036386Ogx /USER:DNR\mou
set modpath=\\server1\IWMShare\Users\Michael\Model\RRCA\rrca_1050run\condor_pump\1951-2000-pump\
)
:: set name file
echo # Name file create by Michael > %namfile%.nam
echo LIST 6 %cell%.lst >> %namfile%.nam
echo BAS6 1 %modpath%NPNM_bas.bas OLD >> %namfile%.nam
echo LPF 2 %modpath%12p.lpf OLD >> %namfile%.nam
echo DIS 3 %modpath%12p.dis OLD >> %namfile%.nam
echo OC 11 %modpath%all.oc OLD >> %namfile%.nam
echo PCG 12 %modpath%12p.pcg OLD >> %namfile%.nam
echo STR 13 %modpath%12p-fixed.str OLD >> %namfile%.nam
echo DRN 14 %modpath%11.drn OLD >> %namfile%.nam
echo EVT 15 %modpath%12p.evt OLD >> %namfile%.nam
echo RCH 16 %modpath%NPNM_bas.rch OLD >> %namfile%.nam
echo WEL 18 %cell%.wel >> %namfile%.nam
echo DATA(BINARY) 30 %cell%.head >> %namfile%.nam
echo DATA(BINARY) 40 %cell%.ccf >> %namfile%.nam
:: create new well
copy /Y %modpath%NPNM_scn.wel %cell%.wel
set oldwel="9999999999"
set newel="%lay:~-10%%row:~-10%%col:~-10%%pump:~-10%"
:: echo %newel%
%modpath%fart -i %cell%.wel %oldwel% %newel%
%modpath%rrca-mf2k.exe %namfile%.nam
:: set zonebudget file
echo %cell% csv2 > %namfile%.zbi
echo %cell%.ccf >> %namfile%.zbi
echo %cell% >> %namfile%.zbi
echo %modpath%NRD.zon >> %namfile%.zbi
echo A >> %namfile%.zbi
:: run zonebudget
%modpath%rrca-zonbud.exe < %namfile%.zbi
:: move the results
mkdir %resultfolder%
move /Y *.csv %resultfolder%\
move /Y cum.dat %resultfolder%\%cell%.bal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment