
======================
THINGS TO REMEMBER WHEN SWITCHING MODELS

WATLEV in SWater - defines the water level at the outlet, may be different in different watersheds
ROLOUT and COLOUT in SWater - defiens the output cell in the outlet, where we report the concentrations
MAXDRUN in SWater - depends on the cell resolution

Make sure that the LandUse map has the LABELS described by the landuse types.
The HYDRO map (2) and the StudyArea map should have the mouth of the river marked.
Check scaling of maps - it may be different in different projects.
There should be no 0's in the SLOPE map
Check that the River Map has been updated for new Hydro code

======================

~ FrameLink                          m0(M2,Maps/beshyd) m1(M2,Maps/beselev) m2(M2,Maps/besLinkMap) i(1,2) p(1) lm(1)
lm(1) - 1 to allow diagonal elements linking, 0 - no diagonal linking.
m0 - to read the hydro-river map
m1 - to read the elevation map
m2 - to read the LinkMap if it is available already. In this case the river map is not required.
i(1,2) - how the river map is marked - 1 the river cells, 2 - the outlet of the river.

======================
Categories in the River map
VOID (or 0) - outside of ONMAP
0 - ONMAP 
1 - the river 
2 - the cells of the river mouth
3 - the gaging stations on the river
4 - the drain points in the reservoirs or flat river areas (those that have an OPENWATER category 
in the LandUse Map).
======================

SME import GLOB.eqns HYD.eqns DIN.eqns DOM.eqns MAC.eqns 

/data/bin/startup_viewserver 

SME -java local run HNM

* P1_IC_UW_MOIST_PR                  d(M2,/data/Projects/PLM_MAPS/MAPSHUNT/USWTe,cln.grd) S(1.000e-04,0.050000)


Changed to dynmic generation of dwelling densitiy
* P1_POP_DENS                        c(M2,/data/Projects/PLM_MAPS/MAPS.1.Full/DWELLU,cln.grd) S(3.000e+00,0.000000)
How the DWELLU map was created:
Recode LU90.my.1km.ag1 Assigning 0 To 1 Through 2 Assigning 1250 To 5
Assigning 25 To 3 Assigning 750 To 4 
This is based on:
LOW DENS        <4.9pers/acre = 1.21E-3 pers/sq.m
MEDIUM DENS     >=4.9pers/ac    <=13.4pers/ac (aver= 9.15) 2.26E-03 pers/sq.m
HIGH DENS       >13.4pers/ac =  3.31E-3 pers/sq.m

* P1_POP_DENS                        UF( UCode,DwellMap,HABITATMAP, ZONMAP, P1_BOCOEF)

To save UNSAT WATER map:
* UW_MOIST_PRP                      M(M,4,USWT,0.000100,0.000000,0.000000) OT(729.000000,0.000000,730.000000)
To save SAT WATER map:
* SATW_HEAD                         M(M,4,GRWT,0.010000,0.000000,0.000000) OT(729.000000,0.000000,730.000000)

========
SCENARIOS

To calculate new land use map
* HABITATMAP                         UF( UCode,MakeLuMap)

For Crop Rotation 
* HABITATMAP                         UF( UCode,CropRot,DAYJUL)


 SME -d run HNM   -- run in debug mode


In SME when opened a variable: b a   - add a breakpoint on this variable. Will stop on all 
associated SME processes.



* P1_POP_DENS                        UF( UCode,DwellMap2,HABITATMAP, P1_BO_COEF)
--- to calculate dwelling units

* ROADS                              UF( UCode,Road_Dist,HYDRO, LENGTH)
--- to fill in the roads map
* ROADS                             M(M,4,RoadMap,1.000000,0.000000,0.000000) d(M2,/data/Projects/PLM_MAPS/MAPSHUNT/Roads,cln.grd) S(1.000e+00,0.000000)M(M,4,RoadMap,1.000000,0.000000,0.000000) OT(1.000000,0.000000,0.000000)

==============
 SME import DIN.eqns DOM.eqns ET.eqns GLOB.eqns HYD.eqns MAC.eqns PAR.eqns  

==============
* SATW_HEAD                          M(M,4,GRWT,0.010000,0.000000,0.000000) OT(365.000000,0.000000,3650.000000)
* UW_MOIST_PRP                       M(M,4,UWT,0.01000,0.000000,0.000000) OT(365.000000,0.000000,3650.000000)
==============
* P1_IC_SW_DEPTH                     d(M2,${MAPS}/BATHY,${RMAP}) S(1.000e+00,0.000000)
* P1_IC_UW_MOIST_PR                  d(M2,${MAPS}/UWTcc,${RMAP}) S(1.000e-02,0.000000)
* P1_IC_WT_TABLE                     d(M2,${MAPS}/GRWTcc,${RMAP}) S(1.000e+00,0.000000)

Finishing the Boynton project:


