Skip to content

Commit 19d8f7a

Browse files
authored
Merge pull request #33 from NREL/gb/parallax_correct
Gb/parallax correct
2 parents e718cea + 6b0bb62 commit 19d8f7a

33 files changed

+1026
-388
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# test plots from pytest
22
tests/data/test_plots/*
33

4+
# mac stuff
5+
.DS_Store
6+
47
# Dask stuff:
58
dask-worker-space/
69

.pylintrc

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ confidence=
5555
# no Warning level messages displayed, use"--disable=all --enable=classes
5656
# --disable=W"
5757
disable=
58+
consider-using-f-string,
5859
# Defaults
5960
print-statement,
6061
parameter-unpacking,

README.rst

+22-12
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,27 @@ documentation can be found `here <https://github.com/NREL/nsrdb/tree/master/nsrd
2121
Installation
2222
============
2323

24-
1. Use conda (anaconda or miniconda with python 3.7) to create an nsrdb
24+
#. Use conda (anaconda or miniconda with python 3.7) to create an nsrdb
2525
environment: ``conda create --name nsrdb python=3.7``
26-
2. Activate your new conda env: ``conda activate nsrdb``
27-
3. Navigate to the nsrdb directory that contains setup.py and run:
26+
#. Activate your new conda env: ``conda activate nsrdb``
27+
#. There is a known dependency issue between h5py and netCDF4. it is
28+
recommended that you install ``conda install netCDF4`` before pip installing
29+
the nsrdb code base.
30+
#. You will have to install the REST2 code base (the private NREL-REST2 repo is
31+
`here <https://github.com/NREL/rest2>`_) BEFORE installing the nsrdb code
32+
base.
33+
#. Navigate to the nsrdb directory that contains setup.py and run:
2834
``pip install -e .``
29-
4. There is a known dependency issue between h5py and netCDF4. If you get an
30-
error using the netCDF4 module, try installing from ``conda`` instead of
31-
``pip``
32-
33-
a. ``pip uninstall netCDF4``
34-
b. ``conda install netCDF4``
35-
36-
5. Test your installation:
35+
#. If running with the MLClouds model, you will have to install this code base
36+
(the private MLClouds repo is `here <https://github.com/NREL/mlclouds>`_)
37+
AFTER installing the nsrdb code base.
38+
#. Test your installation:
3739

3840
a. Start ipython and test the following import:
3941
``from nsrdb.data_model import DataModel``
4042
b. Navigate to the tests/ directory and run the command: ``pytest``
4143

42-
6. If you are a developer, also run `pre-commit install` in the directory
44+
#. If you are a developer, also run `pre-commit install` in the directory
4345
containing .pre-commit-config.yaml.
4446

4547
NOTE: If you are trying to run the ``albedo`` sub-module you will need to
@@ -143,6 +145,14 @@ NSRDB Versions
143145
- Enabled cloud solar shading coordinate adjustment by default, enabled
144146
MLClouds machine learning gap fill method for missing cloud properties
145147
(cloud fill flag #7)
148+
* - 3.2.1
149+
- 1/12/2021
150+
- 2021
151+
- Implemented an algorithm to re-map the parallax and shading corrected
152+
cloud coordinates to the nominal GOES coordinate system. This fixes the
153+
issue of PC cloud coordinates conflicting with clearsky coordinates.
154+
This also fixes the strange pattern that was found in the long term
155+
means generated from PC data.
146156

147157
*Note: The “Data Years” column shows which years of NSRDB data were updated at
148158
the time of version release. However, each NSRDB file should be checked for the

nsrdb/all_sky/all_sky.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def all_sky_h5_parallel(f_source, rows=slice(None), cols=slice(None),
314314

315315
with Handler(f_source) as res:
316316
data_shape = res.shape
317-
missing = [arg not in res.dsets for arg in ALL_SKY_ARGS]
317+
missing = [arg for arg in ALL_SKY_ARGS if arg not in res.dsets]
318318
if any(missing):
319319
msg = ('Cannot run all_sky, missing datasets {} from source: {}'
320320
.format(missing, f_source))

nsrdb/cli.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ def eagle(ctx, alloc, memory, walltime, feature, stdout_path):
907907
else:
908908
cmd = ("python -c '{import_str};{f}({a})'"
909909
.format(import_str=import_str, f=fun_str, a=arg_str))
910+
slurm_id = None
910911
out = slurm_manager.sbatch(cmd,
911912
alloc=alloc,
912913
memory=memory,
@@ -916,13 +917,15 @@ def eagle(ctx, alloc, memory, walltime, feature, stdout_path):
916917
stdout_path=stdout_path)[0]
917918

918919
if out:
920+
slurm_id = out
919921
msg = ('Kicked off job "{}" (SLURM jobid #{}) on Eagle.'
920-
.format(name, out))
921-
Status.add_job(
922-
out_dir, command, name, replace=True,
923-
job_attrs={'job_id': out,
924-
'hardware': 'eagle',
925-
'out_dir': out_dir})
922+
.format(name, slurm_id))
923+
924+
Status.add_job(
925+
out_dir, command, name, replace=True,
926+
job_attrs={'job_id': slurm_id,
927+
'hardware': 'eagle',
928+
'out_dir': out_dir})
926929

927930
click.echo(msg)
928931
logger.info(msg)

nsrdb/data_model/albedo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import pandas as pd
1212

1313
from nsrdb.data_model.base_handler import AncillaryVarHandler
14-
from nsrdb.file_handlers.filesystem import NSRDBFileSystem as NFS
14+
from nsrdb.file_handlers.file_system import NSRDBFileSystem as NFS
1515

1616
logger = logging.getLogger(__name__)
1717

nsrdb/data_model/asymmetry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66

77
from nsrdb.data_model.base_handler import AncillaryVarHandler
8-
from nsrdb.file_handlers.filesystem import NSRDBFileSystem as NFS
8+
from nsrdb.file_handlers.file_system import NSRDBFileSystem as NFS
99

1010
logger = logging.getLogger(__name__)
1111

nsrdb/data_model/base_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from warnings import warn
88

99
from nsrdb import DATADIR, DEFAULT_VAR_META
10-
from nsrdb.file_handlers.filesystem import NSRDBFileSystem as NFS
10+
from nsrdb.file_handlers.file_system import NSRDBFileSystem as NFS
1111

1212
logger = logging.getLogger(__name__)
1313

0 commit comments

Comments
 (0)