... | @@ -7,31 +7,31 @@ |
... | @@ -7,31 +7,31 @@ |
|
## How to contribute to NES
|
|
## How to contribute to NES
|
|
|
|
|
|
1. Create an issue and complete the description
|
|
1. Create an issue and complete the description
|
|
- Complete the issue description as much as possible with (estimation time, milestone, assigned one, etc.)
|
|
- Complete the issue description as much as possible with (estimated time, corresponding milestone, assigned person, etc.)
|
|
2. Create a branch (from master) directly in the issue (name should start with `develop-` following the number and title of the issue)
|
|
2. Create a branch (from master) directly in the issue (name should start with `develop-` following the number and title of the issue that appears by default)
|
|
3. Clone and checkout to the new branch without modifications in Nord3v2.
|
|
3. Clone and checkout to the new branch, without any modification, in Nord3v2.
|
|
- It is recommended to run some tests to ensure the current behavior.
|
|
- It is recommended to run some tests to ensure the current behavior.
|
|
4. Modify the code.
|
|
4. Modify the code.
|
|
5. Run the simulation with the new branch:
|
|
5. Run the simulation with the new branch:
|
|
- To achieve it is important to prepend the cloned path in the `PYTHONPATH`
|
|
- To achieve it is important to prepend the cloned path in the `PYTHONPATH`
|
|
- e.g., `export PYTHONPATH=/gpfs/scratch/bsc32/bsc32538/NES:${PYTHONPATH}`
|
|
- e.g., `export PYTHONPATH=/gpfs/scratch/bsc32/bsc32538/NES:${PYTHONPATH}`
|
|
6. Create and run a specific test for your case.
|
|
6. Create and run a specific test for your case in the folder `tests`.
|
|
7. Update the `CHANGELOG.md` with the new option-
|
|
7. Update the `CHANGELOG.md` and include information on the new development or bug fix.
|
|
8. Update the wiki with the new specifications.
|
|
8. Update the wiki with the new specifications.
|
|
9. Merge `master` into your development branch.
|
|
9. Merge `master` into your development branch.
|
|
- To ensure that if there has been news on the master, they are included.
|
|
- To ensure that if there has been any changes in the master branch, these are included.
|
|
10. Run all tests.
|
|
10. Run all tests in `tests`.
|
|
11. Create a merge request assigning it to Alba or Carles
|
|
11. Create a merge request and assign it to Alba (@avilanov) or Carles (@ctena), who will review it.
|
|
|
|
|
|
## Vertical interpolation
|
|
## Vertical interpolation
|
|
|
|
|
|
- [Numpy linear interpolation](https://numpy.org/doc/stable/reference/generated/numpy.interp.html) is faster than [scipy.interpolate.interp1d](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html)
|
|
- [Numpy linear interpolation](https://numpy.org/doc/stable/reference/generated/numpy.interp.html) is faster than [scipy.interpolate.interp1d](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html)
|
|
- Do the operation using float32 sometimes produces negative values on very small results
|
|
- Doing the operation using float32 sometimes produces negative values on very small results
|
|
- Force to float64 fixes the problem
|
|
- Forcing it to float64 fixes the problem
|
|
|
|
|
|
```python
|
|
```python
|
|
# We force the interpolation with float64 to avoid negative values
|
|
# We force the interpolation with float64 to avoid negative values
|
|
# We don't know why the negatives appear with float34
|
|
# We don't know why the negatives appear with float32
|
|
if kind == 'linear':
|
|
if kind == 'linear':
|
|
dst_data[t, :, j, i] = np.array(
|
|
dst_data[t, :, j, i] = np.array(
|
|
np.interp(new_levels,
|
|
np.interp(new_levels,
|
... | | ... | |