# simclimat-lib

[![npm version](https://badge.fury.io/js/simclimat-lib.svg)](https://badge.fury.io/js/simclimat-lib)
[![HitCount](http://hits.dwyl.io/adeseine/simclimat-lib.svg)](http://hits.dwyl.io/adeseine/simclimat-lib)
![NPM](https://img.shields.io/npm/l/simclimat-lib.svg)
<!-- 
![GitHub last commit](https://img.shields.io/github/last-commit/alaindeseine/simclimat-lib.svg)
![GitHub top language](https://img.shields.io/github/languages/top/alaindeseine/simclimat-lib.svg)
![GitHub package.json version](https://img.shields.io/github/package-json/v/alaindeseine/simclimat-lib.svg)
-->


This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.

> Note: This library is currently a work in progress and is therefore subject to frequent changes. Use with care. 

## Installation

Run `npm install --save simclimat-lib` to install the library.

## Objects

The library contains several objects. 

Three objects need to be instanciated in order to generate climate datas.

### CExperienceValues

TODO

### CSimulationValues

TODO

### CModel

CModel class contain all scientific calulation methods helpers and a public method called ``modeExecute()``. 

This method do climate calculations and returned the CSimulationValues object passed in parameters fullfilled with climates values in the six datas arrays.

TO BE CONTINUED

### Example

````typescript
// Objects and vars déclaration
let years: numbers          = 10000;
let sv: CSimulationValues   = new CSimulationValues();
let ev: CExperienceValues   = new CExperienceValues( years );
let m : CModel              = new CModel();

// Here you should call either create_actual_state() or create_1750_state() of CSimulationValues object to init properties and datas arrays. 
sv.create_1750_state();

// Here you can change CSimulationValues properties before calling modelExecute
sv.fixed_albedo     = true;
sv.albedo_value     = 33;

// Call modelExecute method to calculate climates datas
sv = calculSimulation.modelExecute( sv, ev );

// Inspect returned values in console
console.info( sv );
````
