# Building String rte_file = " .rte file Subbasin: " + SubBasin + " " + DateAndTime + " " + SWAT_Vers + \ "\n" + cj.trailing_spaces(14, CHW2, 3) + " | CHW2 : Main channel width [m]" + \ "\n" + cj.trailing_spaces(14, CHD, 3) + " | CHD : Main channel depth [m]" + \ "\n" + cj.trailing_spaces(14, CH_S2, 5) + " | CH_S2 : Main channel slope [m/m]" + \ "\n" + cj.trailing_spaces(14, CH_L2, 3) + " | CH_L2 : Main channel length [km]" + \ "\n" + cj.trailing_spaces(14, CH_N2, 3) + " | CH_N2 : Manning's nvalue for main channel" + \ "\n" + cj.trailing_spaces(14, CH_K2, 3) + " | CH_K2 : Effective hydraulic conductivity [mm/hr]" + \ "\n" + cj.trailing_spaces(14, CH_COV1, 3) + " | CH_COV1: Channel erodibility factor" + \ "\n" + cj.trailing_spaces(14, CH_COV2, 3) + " | CH_COV2 : Channel cover factor" + \ "\n" + cj.trailing_spaces(14, CH_WDR, 3) + " | CH_WDR : Channel width:depth ratio [m/m]" + \ "\n" + cj.trailing_spaces(14, ALPHA_BNK, 3) + " | ALPHA_BNK : Baseflow alpha factor for bank storage [days]" + \ "\n" + cj.trailing_spaces(14, ICANAL, 2) + " | ICANAL : Code for irrigation canal" + \ "\n" + cj.trailing_spaces(14, CH_ONCO, 2) + " | CH_ONCO : Organic nitrogen concentration in the channel [ppm]" + \ "\n" + cj.trailing_spaces(14, CH_OPCO, 2) + " | CH_OPCO : Organic phosphorus concentration in the channel [ppm]" + \ "\n" + cj.trailing_spaces(14, CH_SIDE, 2) + " | CH_SIDE : Change in horizontal distance per unit vertical distance" + \ "\n" + cj.trailing_spaces(14, CH_BNK_BD, 2) + " | CH_BNK_BD : Bulk density of channel bank sediment (g/cc)" + \ "\n" + cj.trailing_spaces(14, CH_BED_BD, 2) + " | CH_BED_BD : Bulk density of channel bed sediment (g/cc)" + \ "\n" + cj.trailing_spaces(14, CH_BNK_KD, 2) + " | CH_BNK_KD : Erodibility of channel bank sediment by jet test (cm3/N-s)" + \ "\n" + cj.trailing_spaces(14, CH_BED_KD, 2) + " | CH_BED_KD : Erodibility of channel bed sediment by jet test (cm3/N-s)" + \ "\n" + cj.trailing_spaces(14, CH_BNK_D50, 2) + " | CH_BNK_D50 : D50 Median particle size diameter of channel bank sediment (micro-m)" + \ "\n" + cj.trailing_spaces(14, CH_BED_D50, 2) + " | CH_BED_D50 : D50 Median particle size diameter of channel bed sediment (micro-m)" + \ "\n" + cj.trailing_spaces(14, CH_BNK_TC, 2) + " | CH_BNK_TC : Critical shear stress of channel bank (N/m2)" + \ "\n" + cj.trailing_spaces(14, CH_BED_TC, 2) + " | CH_BED_TC : Critical shear stress of channel bed (N/m2)" + \ "\n" + cj.trailing_spaces(6, CH_ERODMO1, 2) + cj.trailing_spaces(6, CH_ERODMO2, 2) + cj.trailing_spaces(6, CH_ERODMO3, 2) + cj.trailing_spaces(6, CH_ERODMO4, 2) + cj.trailing_spaces(6, CH_ERODMO5, 2) + cj.trailing_spaces(6, CH_ERODMO6, 2) + cj.trailing_spaces(6, CH_ERODMO7, 2) + cj.trailing_spaces(6, CH_ERODMO8, 2) + cj.trailing_spaces(6, CH_ERODMO9, 2) + cj.trailing_spaces(6, CH_ERODMO10, 2) + cj.trailing_spaces(6, CH_ERODMO11, 2) + cj.trailing_spaces(6, CH_ERODMO12, 2) + \ "\n" + cj.trailing_spaces(14, CH_EQN, 0) + " | CH_EQN : Sediment routing methods\n" fileName = cj.get_filename(int(SubBasin), int(0), "rte") cj.write_to(variables.DefaultSimDir + "TxtInOut\\" + fileName, rte_file) #print fileName
HRU_ID = cj.trailing_zeros(5, SUBBASIN, 0) + cj.trailing_zeros(4, i, 0) hru_files_in_sub += "\n" + HRU_ID + ".hru" + HRU_ID + ".mgt" + HRU_ID + ".sol" + HRU_ID + ".chm " + HRU_ID + ".gw " + HRU_ID + ".sep" # Building String sub_file = " .sub file Subbasin: " + SUBBASIN + " " + DateAndTime + " " + SWAT_Vers + \ "\n" + cj.trailing_spaces(16, SUB_KM, 6) + " | SUB_KM : Subbasin area [km2]" + \ "\n" + \ "\n" + "Climate in subbasin" + \ "\n" + cj.trailing_spaces(16, SUB_LAT, 6) + " | LATITUDE : Latitude of subbasin [degrees]" + \ "\n" + cj.trailing_spaces(16, SUB_ELEV, 2) + " | ELEV : Elevation of subbasin [m]" + \ "\n" + cj.trailing_spaces(16, IRGAGE, 0) + " | IRGAGE: precip gage data used in subbasin" + \ "\n" + cj.trailing_spaces(16, ITGAGE, 0) + " | ITGAGE: temp gage data used in subbasin" + \ "\n" + cj.trailing_spaces(16, ISGAGE, 0) + " | ISGAGE: solar radiation gage data used in subbasin" + \ "\n" + cj.trailing_spaces(16, IHGAGE, 0) + " | IHGAGE: relative humidity gage data used in subbasin" + \ "\n" + cj.trailing_spaces(16, IWGAGE, 0) + " | IWGAGE: wind speed gage data used in subbasin" + \ "\n" + cj.get_filename(int(SUBBASIN), int(0), "wgn") + " | WGNFILE: name of weather generator data file" + \ "\n" + cj.trailing_spaces(16, FCST_REG, 0) + " | FCST_REG: Region number used to assign forecast data to the subbasin" + \ "\n" + "Elevation Bands" + \ "\n" + "| ELEVB: Elevation at center of elevation bands [m]" + \ "\n" + cj.trailing_spaces(8, ELEVB1, 3) + cj.trailing_spaces(8, ELEVB2, 3) + cj.trailing_spaces(8, ELEVB3, 3) + cj.trailing_spaces(8, ELEVB4, 3) + cj.trailing_spaces(8, ELEVB5, 3) + cj.trailing_spaces(8, ELEVB6, 3) + cj.trailing_spaces(8, ELEVB7, 3) + cj.trailing_spaces(8, ELEVB8, 3) + cj.trailing_spaces(8, ELEVB9, 3) + cj.trailing_spaces(8, ELEVB10, 3) + \ "\n" + "| ELEVB_FR: Fraction of subbasin area within elevation band" + \ "\n" + cj.trailing_spaces(8, ELEVB_FR1, 3) + cj.trailing_spaces(8, ELEVB_FR2, 3) + cj.trailing_spaces(8, ELEVB_FR3, 3) + cj.trailing_spaces(8, ELEVB_FR4, 3) + cj.trailing_spaces(8, ELEVB_FR5, 3) + cj.trailing_spaces(8, ELEVB_FR6, 3) + cj.trailing_spaces(8, ELEVB_FR7, 3) + cj.trailing_spaces(8, ELEVB_FR8, 3) + cj.trailing_spaces(8, ELEVB_FR9, 3) + cj.trailing_spaces(8, ELEVB_FR10, 3) + \ "\n" + "| SNOEB: Initial snow water content in elevation band [mm]" + \ "\n" + cj.trailing_spaces(8, SNOEB1, 1) + cj.trailing_spaces(8, SNOEB2, 1) + cj.trailing_spaces(8, SNOEB3, 1) + cj.trailing_spaces(8, SNOEB4, 1) + cj.trailing_spaces(8, SNOEB5, 1) + cj.trailing_spaces(8, SNOEB6, 1) + cj.trailing_spaces(8, SNOEB7, 1) + cj.trailing_spaces(8, SNOEB8, 1) + cj.trailing_spaces(8, SNOEB9, 1) + cj.trailing_spaces(8, SNOEB10, 1) + \ "\n" + cj.trailing_spaces(16, PLAPS, 3) + " | PLAPS : Precipitation lapse rate [mm/km]" + \ "\n" + cj.trailing_spaces(16, TLAPS, 3) + " | TLAPS : Temperature lapse rate [deg C/km]" + \ "\n" + cj.trailing_spaces(16, SNO_SUB, 3) + " | SNO_SUB : Initial snow water content [mm]" + \ "\n" + "Tributary Channels" + \ "\n" + cj.trailing_spaces(16, CH_L1, 3) + " | CH_L1 : Longest tributary channel length [km]" + \ "\n" + cj.trailing_spaces(16, CH_S1, 3) + " | CH_S1 : Average slope of tributary channel [m/m]" + \ "\n" + cj.trailing_spaces(16, CH_W1, 3) + " | CH_W1 : Average width of tributary channel [m]" + \
SOL_PH10 = hru_record.split(",")[152].strip('"') # Building String Sol_file = " .Sol file Watershed HRU:" + WshedHRU + " Subbasin:" + SubBasin + " HRU:" + HRU_No + " Luse:" + Luse + " Soil: " + Soil + " Slope: " + Slope + " " + \ DateAndTime + " " + SWAT_Vers + \ "\n Soil Name: " + SNAM + \ "\n Soil Hydrologic Group: " + HYDGRP + \ "\n Maximum rooting depth(mm) :" + cj.trailing_spaces(8, int(float(SOL_ZMX)), 2) + \ "\n Porosity fraction from which anions are excluded: " + '{0:.3f}'.format(float(ANION_EXCL)) + \ "\n Crack volume potential of soil: " + '{0:.3f}'.format(float(SOL_CRK)) + \ "\n Texture 1 : " + TEXTURE + \ "\n Depth [mm]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_Z1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_Z2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_Z3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_Z4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_Z5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_Z6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_Z7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_Z8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_Z9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_Z10, 2)) + \ "\n Bulk Density Moist [g/cc]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_BD1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_BD2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_BD3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_BD4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_BD5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_BD6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_BD7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_BD8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_BD9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_BD10, 2)) + \ "\n Ave. AW Incl. Rock Frag :" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_AWC1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_AWC2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_AWC3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_AWC4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_AWC5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_AWC6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_AWC7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_AWC8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_AWC9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_AWC10, 2)) + \ "\n Ksat. (est.) [mm/hr]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K1 == "0.0" else SOL_K1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K2 == "0.0" else SOL_K2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K3 == "0.0" else SOL_K3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K4 == "0.0" else SOL_K4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K5 == "0.0" else SOL_K5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K6 == "0.0" else SOL_K6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K7 == "0.0" else SOL_K7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K8 == "0.0" else SOL_K8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K9 == "0.0" else SOL_K9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, 0.01 if SOL_K10 == "0.0" else SOL_K10, 2)) + \ "\n Organic Carbon [weight %]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_CBN1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_CBN2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_CBN3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_CBN4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_CBN5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_CBN6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_CBN7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_CBN8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_CBN9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_CBN10, 2)) + \ "\n Clay [weight %]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, CLAY1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, CLAY2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, CLAY3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, CLAY4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, CLAY5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, CLAY6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, CLAY7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, CLAY8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, CLAY9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, CLAY10, 2)) + \ "\n Silt [weight %]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SILT1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SILT2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SILT3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SILT4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SILT5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SILT6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SILT7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SILT8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SILT9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SILT10, 2)) + \ "\n Sand [weight %]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SAND1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SAND2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SAND3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SAND4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SAND5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SAND6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SAND7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SAND8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SAND9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SAND10, 2)) + \ "\n Rock Fragments [vol. %]:" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, ROCK1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, ROCK2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, ROCK3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, ROCK4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, ROCK5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, ROCK6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, ROCK7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, ROCK8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, ROCK9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, ROCK10, 2)) + \ "\n Soil Albedo (Moist) :" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_ALB1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_ALB2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_ALB3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_ALB4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_ALB5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_ALB6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_ALB7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_ALB8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_ALB9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_ALB10, 2)) + \ "\n Erosion K :" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, USLE_K1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, USLE_K2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, USLE_K3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, USLE_K4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, USLE_K5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, USLE_K6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, USLE_K7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, USLE_K8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, USLE_K9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, USLE_K10, 2)) + \ "\n Salinity (EC, Form 5) :" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_EC1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_EC2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_EC3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_EC4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_EC5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_EC6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_EC7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_EC8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_EC9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_EC10, 2)) + \ "\n Soil pH :" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_PH1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_PH2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_PH3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_PH4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_PH5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_PH6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_PH7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_PH8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_PH9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_PH10, 2)) + \ "\n Soil CACO3 :" + ("" if int(float(SOL_Z1)) == int(0) else cj.trailing_spaces(12, SOL_CAL1, 2)) + ("" if int(float(SOL_Z2)) == int(0) else cj.trailing_spaces(12, SOL_CAL2, 2)) + ("" if int(float(SOL_Z3)) == int(0) else cj.trailing_spaces(12, SOL_CAL3, 2)) + ("" if int(float(SOL_Z4)) == int(0) else cj.trailing_spaces(12, SOL_CAL4, 2)) + ("" if int(float(SOL_Z5)) == int(0) else cj.trailing_spaces(12, SOL_CAL5, 2)) + ("" if int(float(SOL_Z6)) == int(0) else cj.trailing_spaces(12, SOL_CAL6, 2)) + ("" if int(float(SOL_Z7)) == int(0) else cj.trailing_spaces(12, SOL_CAL7, 2)) + ("" if int(float(SOL_Z8)) == int(0) else cj.trailing_spaces(12, SOL_CAL8, 2)) + ("" if int(float(SOL_Z9)) == int(0) else cj.trailing_spaces(12, SOL_CAL9, 2)) + ("" if int(float(SOL_Z10)) == int(0) else cj.trailing_spaces(12, SOL_CAL10, 2)) + \ "\n \n" fileName = cj.get_filename(int(SubBasin), int(HRU_No), "sol") cj.write_to(variables.DefaultSimDir + "TxtInOut\\" + fileName, Sol_file) #print fileName
"\n " + '{0:.3f}'.format(float(RS3)) + " | RS3: Benthic source rate for NH4-N in the reach at 20 degC [mg NH4-N/[m2.day]]" + \ "\n " + '{0:.3f}'.format(float(RS4)) + " | RS4: Rate coefficient for organic N settling in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RS5)) + " | RS5: Organic phosphorus settling rate in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RS6)) + " | RS6: Rate coefficient for settling of arbitrary non-conservative constituent in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RS7)) + " | RS7: Benthic source rate for arbitrary non-conservative constituent in the reach at 20 degC [mg ANC/[m2.day]]" + \ "\n " + '{0:.3f}'.format(float(RK1)) + " | RK1: Carbonaceous biological oxygen demand deoxygenation rate coefficient in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RK2)) + " | RK2: Oxygen reaeration rate in accordance with Fickian diffusion in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RK3)) + " | RK3: Rate of loss of carbonaceous biological oxygen demand due to settling in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RK4)) + " | RK4: Benthic oxygen demand rate in the reach at 20 degC [mg O2/[m2.day]]" + \ "\n " + '{0:.3f}'.format(float(RK5)) + " | RK5: Coliform die-off rate in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(RK6)) + " | RK6: Decay rate for arbitrary non-conservative constituent in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(BC1)) + " | BC1: Rate constant for biological oxidation of NH4 to NO2 in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(BC2)) + " | BC2: Rate constant for biological oxidation of NO2 to NO3 in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(BC3)) + " | BC3: Rate constant for hydrolysis of organic N to NH4 in the reach at 20 degC [day-1]" + \ "\n " + '{0:.3f}'.format(float(BC4)) + " | BC4: Rate constant for mineralization of organic P to dissolved P in the reach at 20 degC [day-1]" + \ "\nPesticide Parameters:" + \ "\n " + '{0:.8f}'.format(float(CHPST_REA)) + " | CHPST_REA: Pesticide reaction coefficient in reach [day-1]" + \ "\n " + '{0:.8f}'.format(float(CHPST_VOL)) + " | CHPST_VOL: Pesticide volatilization coefficient in reach [m/day]" + \ "\n " + '{0:.8f}'.format(float(CHPST_KOC)) + " | CHPST_KOC: Pesticide partition coefficient between water and air in reach [m3/day]" + \ "\n " + '{0:.8f}'.format(float(CHPST_STL)) + " | CHPST_STL: Settling velocity for pesticide sorbed to sediment [m/day]" + \ "\n " + '{0:.8f}'.format(float(CHPST_RSP)) + " | CHPST_RSP: Resuspension velocity for pesticide sorbed to sediment [m/day]" + \ "\n " + '{0:.8f}'.format(float(CHPST_MIX)) + " | CHPST_MIX: Mixing velocity (diffusion/dispersion) for pesticide in reach [m/day]" + \ "\n " + '{0:.8f}'.format(float(SEDPST_CONC)) + " | SEDPST_CONC: Initial pesticide concentration in reach bed sediment [mg/m3 sediment]" + \ "\n " + '{0:.8f}'.format(float(SEDPST_REA)) + " | SEDPST_REA: Pesticide reaction coefficient in reach bed sediment [day-1]" + \ "\n " + '{0:.8f}'.format(float(SEDPST_BRY)) + " | SEDPST_BRY: Pesticide burial velocity in reach bed sediment [m/day]" + \ "\n " + '{0:.8f}'.format(float(SEDPST_ACT)) + " | SEDPST_ACT: Depth of active sediment layer for pesticide [m]\n" fileName = cj.get_filename(int(SubBasin), int(int(0)), "swq") cj.write_to(variables.DefaultSimDir + "TxtInOut\\" + fileName, swq_file) #print fileName