public MidLevel(EarthModel earth, bool loadFromStateFiles, float defaultValue = 0) : base(earth, LevelType.MidLevel, loadFromStateFiles, defaultValue) { _fNonAdvect = 0.75f; _fProAdvect = 1 - _fNonAdvect; _fScaleWindX = 0.5f; _fScaleWindY = 0.5f; }
public SurfaceLevel(EarthModel earth, bool loadFromStateFiles, float defaultValue = 0) { this.Earth = earth; InitGeographicalParams(); if (loadFromStateFiles == false) { if (defaultValue == 0) { // ------------ // Soil temperature where applicable string filePath = Path.Combine(SimulationData.WorkFolder, "SOIL.thd"); if (File.Exists(filePath)) { var tl = FileSupport.LoadMatrixFromFile(filePath); TL.Assign((r, c) => { if (WL[r, c] == 0) { return(tl[r, c]); } return(0); }); } // ------------ // Sea temperature where applicable filePath = Path.Combine(SimulationData.WorkFolder, "SST.thd"); if (File.Exists(filePath)) { var tw = FileSupport.LoadMatrixFromFile(filePath); TW.Assign((r, c) => { if (WL[r, c] != 0) { return(tw[r, c]); } return(0); }); } // Combined surface temperature TS.Assign((r, c) => { if (WL[r, c] != 0) { return(TW[r, c]); } return(TL[r, c]); }); // ------------ // Snow cover filePath = Path.Combine(SimulationData.WorkFolder, "SNOW.thd"); if (File.Exists(filePath)) { this.SNOW = FileSupport.LoadMatrixFromFile(filePath); } } else { TE = MatrixFactory.Init(defaultValue); TW = MatrixFactory.Init(defaultValue); TL = MatrixFactory.Init(defaultValue); TS = MatrixFactory.Init(defaultValue); SNOW = MatrixFactory.Init(defaultValue); RAIN = MatrixFactory.Init(defaultValue); BLIZZARD = MatrixFactory.Init(defaultValue); ALBEDO = MatrixFactory.Init(defaultValue); Precip = MatrixFactory.Init(defaultValue); TLow = MatrixFactory.Init(defaultValue); THigh = MatrixFactory.Init(defaultValue); LIDX = MatrixFactory.Init(defaultValue); FOG = MatrixFactory.Init(defaultValue); TNormLow = MatrixFactory.Init(defaultValue); TNormHigh = MatrixFactory.Init(defaultValue); } } else { TE = FileSupport.Load(Earth.UTC.Title, "T_TE_MAP"); TW = FileSupport.Load(Earth.UTC.Title, "T_TW_MAP"); TL = FileSupport.Load(Earth.UTC.Title, "T_TL_MAP"); TS = FileSupport.Load(Earth.UTC.Title, "T_TS_MAP"); SNOW = FileSupport.Load(Earth.UTC.Title, "N_00_MAP"); RAIN = FileSupport.Load(Earth.UTC.Title, "R_00_MAP"); BLIZZARD = FileSupport.Load(Earth.UTC.Title, "B_00_MAP"); ALBEDO = FileSupport.Load(Earth.UTC.Title, "A_00_MAP"); Precip = FileSupport.Load(Earth.UTC.Title, "C_00_MAP"); TLow = FileSupport.Load(Earth.UTC.Title, "T_SL_MAP"); THigh = FileSupport.Load(Earth.UTC.Title, "T_SH_MAP"); LIDX = FileSupport.Load(Earth.UTC.Title, "L_00_MAP"); FOG = FileSupport.Load(Earth.UTC.Title, "F_SI_MAP"); TNormLow = FileSupport.Load(Earth.UTC.Title, "T_NL_MAP"); TNormHigh = FileSupport.Load(Earth.UTC.Title, "T_NH_MAP"); } }
public JetLevel(EarthModel earth, bool loadFromStateFiles, float defaultValue = 0) : base(earth, LevelType.JetLevel, loadFromStateFiles, defaultValue) { }