
year=${1}
month=${2}

# ------------------------------------------------------------

make clean
make dr             # Calc_Dr_IDXs.f90 

# ------------------------------------------------------------
cat > Namelist_Dr_IDXs.txt << EOF

&File_Dir_Names
   Inp_Dir      = "/home/tanpv/Data/562_VNU/0.25_VN/Dat_Ope/"        ! Input data dir
   Mask_File    = "/home/tanpv/Data/AWC/Mask_VN_0.25_Corrected.nc"   ! Land points and sub-region
   Out_Dir      = "/home/tanpv/Data/562_VNU/0.25_VN/Dr_IDXs_Ope/"
   TVar         = "t2"             ! Ten bien nhiet do trong file NC
   RVar         = "pr"              ! Ten bien luong mua trong file NC
/
&Data_Info
   Yr1          = 1983              ! Tru nam 1982
   Yr2          = 2025              !
   Yr_Ope       = ${year}              ! Operational year
   Mon_Ope      = ${month}                ! Operational month
   Nmodel       = 2                 ! "RegCM","clWRF"
   NLen         = 3                 ! So quy mo thoi gian han (Drought timescale)
   Nidx         = 2                 ! So chi so han
/
&Model_name
   Model_nm     = "RegCM","clWRF",
   IDXname      = "spi", "spei",
/
&Dr_Timescale
   Len_SPI      = 1,3,6,           ! Cac drought timescale (thang)
/

EOF

./1.exe


##################################
