Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  fix tests
  Code QA
  Update docs
  Todo
  Fix unit tests
  Fix test
  Fix test
  update unittests to run write
  tests
  update unittests
  Remove duplicate test
  QA
  update Relative Humidity Percentage and unittest
  Code QA
  update Relative Humidity Percentage
  update Relative Humidity Percentage
  • Loading branch information
tlmquintino committed Jul 5, 2021
2 parents 53818f2 + 49a083d commit 1540184
Show file tree
Hide file tree
Showing 23 changed files with 949 additions and 209 deletions.
2 changes: 2 additions & 0 deletions TODO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ TODO
* add documentation to readthedocs
* add mode to control units of output
* poss change call of UTCI to use dew point temperature
* utci, heat index adjusted and mean radiant temperature \
fix for scalar values.
8 changes: 7 additions & 1 deletion docs/guide/heatindex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ You need 2m temperature in kelvin and optional relative humidity
as water vapour pressure, because this can be calculated from 2m temperature.

.. code-block:: python
calculate_heat_index(2m temperature,relative humidity)
calculate_heat_index_simplified(2m temperature,relative humidity)
use numpy array

.. code-block:: python
calculate_heat_index_adjusted(2m temperature,2m dew point temperature)
Interpret the Output
Expand Down
5 changes: 3 additions & 2 deletions docs/guide/mrt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ How To Use

These methods will return slightly different values. This is to be anticipated.

**Mean Radiant Temperature**

**Mean Radiant Temperature**
Please use numpy arrays
.. code-block:: python
https://github.com/ecmwf-projects/thermofeel.git
calculate_mean_radiant_temperature(surface-solar-radiation-downwards,surface-net-solar-radiation,
Total-sky-direct-solar-radiation-at-surface, Surface-thermal-radiation-downwards,Surface-net-thermal-radiation,
cosine-of-solar-zenith-angle)
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/utci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ More Information: https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/gdj3.10

How To Use
======================================
Please use with numpy arrays.

You will need 2m temperature in kelvin, mean radiant temperature in kelvin,
relative humidity (calculated as shown below,using dew point temperature) and 10 meter height wind speed.

Expand Down
50 changes: 50 additions & 0 deletions tests/at.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
5.100242432957708161e+01
3.449740895610079860e+01
2.074967507181270321e+00
2.096941171926744119e+00
2.160254141187522237e+00
2.262479193843887515e+00
2.338145633078909214e+00
2.511509240779616903e+00
2.599762969085702480e+00
2.642738204950546788e+00
2.801978837092974572e+00
2.799831929862136803e+00
2.851373327244516531e+00
2.838405532193178260e+00
2.810421970432855687e+00
2.766849465700261135e+00
2.671880179530717214e+00
2.620345791258614554e+00
2.583728871307698682e+00
2.465442113011420133e+00
2.399355705329412558e+00
2.352226447969542278e+00
2.264717458352549784e+00
2.152606649338906664e+00
2.035412884957622737e+00
1.990729871611904400e+00
2.464991514967704234e+01
2.445104963689163924e+01
2.389397117863717313e+01
2.382617606048461312e+01
2.383488495070884028e+01
2.441405668515216121e+01
2.504592470560618267e+01
2.583905228331690296e+01
2.774766396275197167e+01
2.928022309433919190e+01
3.174269497508419136e+01
3.230018527240406456e+01
3.263975143616852392e+01
3.279010555501537283e+01
3.269971309065846299e+01
3.180222740076209220e+01
3.125108149283875036e+01
2.986900463940935424e+01
2.901139119980211944e+01
2.844745086027921843e+01
2.713042435831607690e+01
2.621993961092107384e+01
2.515227198136460629e+01
2.479812433401065164e+01
14 changes: 0 additions & 14 deletions tests/context.py

This file was deleted.

50 changes: 50 additions & 0 deletions tests/es.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
6.231373855738132050e+01
3.536824257589194076e+01
8.186270877775042365e+00
8.197886786038079521e+00
8.226354491890694121e+00
8.274084117549726614e+00
8.309908473333162959e+00
8.396004980435197496e+00
8.442672735536355333e+00
8.468840871922843405e+00
8.556819252040510193e+00
8.563343227615638042e+00
8.565034033593093454e+00
8.567937865032085654e+00
8.560898540727283290e+00
8.546374481866047645e+00
8.503453422218631985e+00
8.481242666543561626e+00
8.461946267112033127e+00
8.399021382421539172e+00
8.362617305415396274e+00
8.337252204806356204e+00
8.292553554252124925e+00
8.238392018699331132e+00
8.157227878942180155e+00
8.142870528059061641e+00
2.574329226037627905e+01
2.549632981958831834e+01
2.489695248294750485e+01
2.481535460160086970e+01
2.483282194269867560e+01
2.543155966353685571e+01
2.608940740849445916e+01
2.691357769084625673e+01
2.893211563120852503e+01
3.055630797741530813e+01
3.310118561761350264e+01
3.364435402120854945e+01
3.395845241647587898e+01
3.409790134262850358e+01
3.400858107549151299e+01
3.301311646513263298e+01
3.247130750541010258e+01
3.105673085479377349e+01
3.027775663124069183e+01
2.981068619989851953e+01
2.848255992781740176e+01
2.758870001507796488e+01
2.642779982107996162e+01
2.609746082655843580e+01
50 changes: 50 additions & 0 deletions tests/heatindex.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
6.827130186236260556e+01
5.214277189370140775e+01
1.682293935382901040e+01
1.685539648208555619e+01
1.693476102350799195e+01
1.706725621417447769e+01
1.716623840618322561e+01
1.740251366372957165e+01
1.752964709951444178e+01
1.760065008928896546e+01
1.783788198943363668e+01
1.785538351354481179e+01
1.785991733068266996e+01
1.786770188141765558e+01
1.784882673114724128e+01
1.780983656373932078e+01
1.769425369006023629e+01
1.763422930340979633e+01
1.758196246261406870e+01
1.741075080329713032e+01
1.731115543909074006e+01
1.724152295209444219e+01
1.711833650217805669e+01
1.696824367263228339e+01
1.674160043503780670e+01
1.670129155873075177e+01
4.408692005277692516e+01
4.384767867859928714e+01
4.325829274956684145e+01
4.317707195763226480e+01
4.319447876459975788e+01
4.378459045379910464e+01
4.441878856337787340e+01
4.519354131621288673e+01
4.700623560532383749e+01
4.838674527081376198e+01
5.042948744642587400e+01
5.084847589537083223e+01
5.108824283855793880e+01
5.119411205350203886e+01
5.112634102963756533e+01
5.036102083617055314e+01
4.993645387109604883e+01
4.879944343132233797e+01
4.815452790528902938e+01
4.776102037329750516e+01
4.661231772102185289e+01
4.581270163878123469e+01
4.473948306702579458e+01
4.442646366381388390e+01
50 changes: 50 additions & 0 deletions tests/hia.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
3.458725496870650318e+01
2.753202090057606455e+01
2.505346642252182843e+00
2.527942866520977550e+00
2.581410506086155632e+00
2.665109787679840636e+00
2.728947966943108039e+00
2.877069982889162603e+00
2.953900747029199803e+00
2.997614519213173345e+00
3.141453061528736157e+00
3.144478398946799036e+00
3.144636133546166334e+00
3.146080915445605530e+00
3.132723074212174996e+00
3.107108221629175659e+00
3.034686610882578517e+00
2.998263968738422935e+00
2.967121444401550789e+00
2.861509753374937404e+00
2.801521237467328618e+00
2.759282915374829503e+00
2.683974295305892710e+00
2.590833511790088473e+00
2.450741349846528916e+00
2.427614081669157375e+00
2.133991871615402047e+01
2.118991600173162837e+01
2.080262905499432691e+01
2.075933153431624589e+01
2.078091137659317056e+01
2.118487880027022996e+01
2.159914511758204014e+01
2.211388477387816209e+01
2.331500455506077785e+01
2.422383478322549522e+01
2.558614707750683692e+01
2.586078147382793802e+01
2.601592479335354469e+01
2.607903620291202884e+01
2.603032603176823656e+01
2.551524968034762963e+01
2.524073858283702876e+01
2.448622057959354947e+01
2.405140323579498940e+01
2.379253310419579037e+01
2.303175685035486353e+01
2.249363424920906240e+01
2.177203973079396704e+01
2.157011779914747507e+01
50 changes: 50 additions & 0 deletions tests/humidex.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
3.181680820957683409e+01
2.311586174154547280e+01
1.071192815863128089e+00
1.091873512557015147e+00
1.140124923779183064e+00
1.213456263083344311e+00
1.269931980357910106e+00
1.399191824490173985e+00
1.465008253415817308e+00
1.502805850196409665e+00
1.626199440312461775e+00
1.625461677247642456e+00
1.624458710201452050e+00
1.624259323651983777e+00
1.611961310298283934e+00
1.589122625784739284e+00
1.525968606365154301e+00
1.494708517208266585e+00
1.468229878802844723e+00
1.376817234598206596e+00
1.325510854291053420e+00
1.289251305304048856e+00
1.224339627388246754e+00
1.143444972855547803e+00
1.021986149777490027e+00
1.002701119892833503e+00
1.802933237346644546e+01
1.790227620392641938e+01
1.756605762569824947e+01
1.753287558588795036e+01
1.755605580835072033e+01
1.791384721269730562e+01
1.827231683053258848e+01
1.872146470549375863e+01
1.976805739170981724e+01
2.055768584523860909e+01
2.175007803556746921e+01
2.198870039006618526e+01
2.212269128950930508e+01
2.217487836393547695e+01
2.213069640909662894e+01
2.167733067302737027e+01
2.144054831900109548e+01
2.078175018061205037e+01
2.039938995887564488e+01
2.017452090762793659e+01
1.951164397735078637e+01
1.903915869488423596e+01
1.840582772021519986e+01
1.823222774900250442e+01
50 changes: 50 additions & 0 deletions tests/mrtr.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
2.860406426008037784e+02
2.861090036134117440e+02
2.862937602769229102e+02
2.865420744745272827e+02
2.868114064298556514e+02
2.871119740584474584e+02
2.874246370378360211e+02
2.877000955013742214e+02
2.878504383950159422e+02
2.879542445109591426e+02
2.879697923986486785e+02
2.879174809785870934e+02
2.878002682345488665e+02
2.875899145871997007e+02
2.873507936252476611e+02
2.871016284937660998e+02
2.868293452926152440e+02
2.866111500467481505e+02
2.864877159415628398e+02
2.864099654387674150e+02
2.863160129099064761e+02
2.862135254265532467e+02
2.861295499073399924e+02
2.860447100739661437e+02
2.860406426008037784e+02
2.861090036134117440e+02
2.862937602769229102e+02
2.865420744745272827e+02
2.868114064298556514e+02
2.871119740584474584e+02
2.874246370378360211e+02
2.877000955013742214e+02
2.878504383950159422e+02
2.879542445109591426e+02
2.879697923986486785e+02
2.879174809785870934e+02
2.878002682345488665e+02
2.875899145871997007e+02
2.873507936252476611e+02
2.871016284937660998e+02
2.868293452926152440e+02
2.866111500467481505e+02
2.864877159415628398e+02
2.864099654387674150e+02
2.863160129099064761e+02
2.862135254265532467e+02
2.861295499073399924e+02
2.860447100739661437e+02
2.861295499073399924e+02
2.860447100739661437e+02
Loading

0 comments on commit 1540184

Please sign in to comment.