Skip to content

Commit 5682aa5

Browse files
author
Bill Ladwig
committed
Merge branch 'release/1.3.2'
2 parents ee2b4ed + 30214df commit 5682aa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+14000
-12804
lines changed

.circleci/conda_env.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: wrf-python
22
channels:
33
- conda-forge
44
dependencies:
5-
- gcc
5+
- gcc_linux-64
6+
- gfortran_linux-64
67
- setuptools
78
- python
89
- numpy

.circleci/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ jobs:
4646
name: build wrf-python
4747
command: |
4848
source ~/miniconda3/bin/activate wrf-python
49+
unset FFLAGS
50+
unset LDFLAGS
51+
unset CFLAGS
4952
cd fortran/build_help
50-
gfortran -o sizes -fopenmp omp_sizes.f90
53+
$FC -o sizes -fopenmp omp_sizes.f90
5154
LD_LIBRARY_PATH=~/miniconda3/envs/wrf-python/lib python sub_sizes.py
5255
cd ..
53-
gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90
56+
$FC -E ompgen.F90 -fopenmp -cpp -o omp.f90
5457
cd ..
5558
python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
5659
python setup.py install --single-version-externally-managed --record=record.txt

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,13 @@ Citation
2323
Ladwig, W. (2017). wrf-python (Version x.x.x) [Software]. Boulder, Colorado: UCAR/NCAR. https://doi.org/10.5065/D6W094P1
2424

2525
Note: The version number x.x.x should be set to the version of wrf-python that you are using.
26+
27+
28+
--------------------
29+
30+
*The National Center for Atmospheric Research is sponsored by the National
31+
Science Foundation. Any opinions, findings and conclusions or recommendations
32+
expressed in this material do not necessarily reflect the views of the
33+
National Science Foundation.*
34+
35+

build_scripts/gnu_no_omp.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22

3+
unset LDFLAGS
4+
35
cd ../fortran
4-
gfortran -E ompgen.F90 -cpp -o omp.f90
5-
#f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
6+
$FC -E ompgen.F90 -cpp -o omp.f90
67
cd ..
78

89
python setup.py clean --all

build_scripts/gnu_omp.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22

3+
unset LDFLAGS
4+
35
cd ../fortran/build_help
4-
gfortran -o sizes -fopenmp omp_sizes.f90
6+
$FC -o sizes -fopenmp omp_sizes.f90
57
python sub_sizes.py
68

79
cd ..
8-
gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90
9-
#f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
10+
$FC -E ompgen.F90 -fopenmp -cpp -o omp.f90
1011
cd ..
1112

1213
python setup.py clean --all

build_scripts/win_msvc_mingw_no_omp.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
cd ../fortran
22
CALL gfortran -E ompgen.F90 -cpp -o omp.f90
3-
REM Wildcards not working on Windows for some reason
4-
REM CALL f2py -m _wrffortran -h wrffortran.pyf --overwrite-signature wrf_constants.f90 wrf_testfunc.f90 wrf_user.f90 rip_cape.f90 wrf_cloud_fracf.f90 wrf_fctt.f90 wrf_user_dbz.f90 wrf_relhl.f90 calc_uh.f90 wrf_user_latlon_routines.f90 wrf_pvo.f90 eqthecalc.f90 wrf_rip_phys_routines.f90 wrf_pw.f90 wrf_vinterp.f90 wrf_wind.f90 omp.f90
53
cd ..
64

75
CALL python setup.py clean --all

build_scripts/win_msvc_mingw_omp.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ CALL python sub_sizes.py
44

55
cd ..
66
CALL gfortran -E ompgen.F90 -cpp -fopenmp -o omp.f90
7-
REM Wildcards not working on Windows for some reason
8-
REM CALL f2py -m _wrffortran -h wrffortran.pyf --overwrite-signature wrf_constants.f90 wrf_testfunc.f90 wrf_user.f90 rip_cape.f90 wrf_cloud_fracf.f90 wrf_fctt.f90 wrf_user_dbz.f90 wrf_relhl.f90 calc_uh.f90 wrf_user_latlon_routines.f90 wrf_pvo.f90 eqthecalc.f90 wrf_rip_phys_routines.f90 wrf_pw.f90 wrf_vinterp.f90 wrf_wind.f90 omp.f90
97
cd ..
108

119
CALL python setup.py clean --all

chey_intel.py

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
def intel_version_match(type):
1515
# Match against the important stuff in the version string
16-
return simple_version_match(start=r'Intel.*?Fortran.*?(?:%s).*?Version' % (type,))
16+
return simple_version_match(
17+
start=r'Intel.*?Fortran.*?(?:%s).*?Version'.format(type,))
1718

1819

1920
class BaseIntelFCompiler(FCompiler):
@@ -36,13 +37,13 @@ class IntelFCompiler(BaseIntelFCompiler):
3637
possible_executables = ['ifort', 'ifc']
3738

3839
executables = {
39-
'version_cmd' : None, # set by update_executables
40-
'compiler_f77' : [None, "-72", "-w90", "-w95"],
41-
'compiler_f90' : [None],
42-
'compiler_fix' : [None, "-FI"],
43-
'linker_so' : ["<F90>", "-shared"],
44-
'archiver' : ["ar", "-cr"],
45-
'ranlib' : ["ranlib"]
40+
'version_cmd': None, # set by update_executables
41+
'compiler_f77': [None, "-72", "-w90", "-w95"],
42+
'compiler_f90': [None],
43+
'compiler_fix': [None, "-FI"],
44+
'linker_so': ["<F90>", "-shared"],
45+
'archiver': ["ar", "-cr"],
46+
'ranlib': ["ranlib"]
4647
}
4748

4849
pic_flags = ['-fPIC']
@@ -89,13 +90,13 @@ class IntelItaniumFCompiler(IntelFCompiler):
8990
possible_executables = ['ifort', 'efort', 'efc']
9091

9192
executables = {
92-
'version_cmd' : None,
93-
'compiler_f77' : [None, "-FI", "-w90", "-w95"],
94-
'compiler_fix' : [None, "-FI"],
95-
'compiler_f90' : [None],
96-
'linker_so' : ['<F90>', "-shared"],
97-
'archiver' : ["ar", "-cr"],
98-
'ranlib' : ["ranlib"]
93+
'version_cmd': None,
94+
'compiler_f77': [None, "-FI", "-w90", "-w95"],
95+
'compiler_fix': [None, "-FI"],
96+
'compiler_f90': [None],
97+
'linker_so': ['<F90>', "-shared"],
98+
'archiver': ["ar", "-cr"],
99+
'ranlib': ["ranlib"]
99100
}
100101

101102

@@ -104,18 +105,19 @@ class IntelEM64TFCompiler(IntelFCompiler):
104105
compiler_aliases = ()
105106
description = 'Intel Fortran Compiler for 64-bit apps'
106107

107-
version_match = intel_version_match('EM64T-based|Intel\\(R\\) 64|64|IA-64|64-bit')
108+
version_match = intel_version_match(
109+
'EM64T-based|Intel\\(R\\) 64|64|IA-64|64-bit')
108110

109111
possible_executables = ['ifort', 'efort', 'efc']
110112

111113
executables = {
112-
'version_cmd' : None,
113-
'compiler_f77' : [None, "-FI"],
114-
'compiler_fix' : [None, "-FI"],
115-
'compiler_f90' : [None],
116-
'linker_so' : ['<F90>', "-shared"],
117-
'archiver' : ["ar", "-cr"],
118-
'ranlib' : ["ranlib"]
114+
'version_cmd': None,
115+
'compiler_f77': [None, "-FI"],
116+
'compiler_fix': [None, "-FI"],
117+
'compiler_f90': [None],
118+
'linker_so': ['<F90>', "-shared"],
119+
'archiver': ["ar", "-cr"],
120+
'ranlib': ["ranlib"]
119121
}
120122

121123
def get_flags(self):
@@ -147,13 +149,13 @@ def update_executables(self):
147149
possible_executables = ['ifort', 'ifl']
148150

149151
executables = {
150-
'version_cmd' : None,
151-
'compiler_f77' : [None],
152-
'compiler_fix' : [None],
153-
'compiler_f90' : [None],
154-
'linker_so' : [None],
155-
'archiver' : [ar_exe, "/verbose", "/OUT:"],
156-
'ranlib' : None
152+
'version_cmd': None,
153+
'compiler_f77': [None],
154+
'compiler_fix': [None],
155+
'compiler_f90': [None],
156+
'linker_so': [None],
157+
'archiver': [ar_exe, "/verbose", "/OUT:"],
158+
'ranlib': None
157159
}
158160

159161
compile_switch = '/c '
@@ -163,7 +165,8 @@ def update_executables(self):
163165
module_include_switch = '/I'
164166

165167
def get_flags(self):
166-
opt = ['/nologo', '/MD', '/nbs', '/names:lowercase', '/assume:underscore']
168+
opt = ['/nologo', '/MD', '/nbs', '/names:lowercase',
169+
'/assume:underscore']
167170
return opt
168171

169172
def get_flags_free(self):
@@ -192,13 +195,13 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler):
192195
ar_exe = IntelVisualFCompiler.ar_exe
193196

194197
executables = {
195-
'version_cmd' : None,
196-
'compiler_f77' : [None, "-FI", "-w90", "-w95"],
197-
'compiler_fix' : [None, "-FI", "-4L72", "-w"],
198-
'compiler_f90' : [None],
199-
'linker_so' : ['<F90>', "-shared"],
200-
'archiver' : [ar_exe, "/verbose", "/OUT:"],
201-
'ranlib' : None
198+
'version_cmd': None,
199+
'compiler_f77': [None, "-FI", "-w90", "-w95"],
200+
'compiler_fix': [None, "-FI", "-4L72", "-w"],
201+
'compiler_f90': [None],
202+
'linker_so': ['<F90>', "-shared"],
203+
'archiver': [ar_exe, "/verbose", "/OUT:"],
204+
'ranlib': None
202205
}
203206

204207

doc/source/_templates/product_table.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@
245245
| | | | |
246246
| | | mi | |
247247
+--------------------+---------------------------------------------------------------+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
248+
| height_agl | Model Height for Mass Grid (AGL) | m | **units** (str) : Set to desired units. Default is *'m'*. |
249+
| | | | |
250+
| | | km | |
251+
| | | | |
252+
| | | dm | |
253+
| | | | |
254+
| | | ft | |
255+
| | | | |
256+
| | | mi | |
257+
+--------------------+---------------------------------------------------------------+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
248258
| zstag | Model Height for Vertically Staggered Grid | m | **msl** (boolean): Set to False to return AGL values. True is for MSL. Default is *True*. |
249259
| | | | |
250260
| | | km | **units** (str) : Set to desired units. Default is *'m'*. |

doc/source/contrib.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. _contrib_guide:
2+
3+
Contributor Guide
4+
=================================
5+
6+
.. note::
7+
8+
This contributor guide is written for wrf-python v1.3.x. In the
9+
not-too-distant future, wrf-python will undergo a significant refactoring
10+
to remove the wrapt decorators (which don't serialize for dask), but the
11+
concepts will remain the same as described below.
12+
13+
14+
Ways to Contribute
15+
-----------------------------
16+
17+
Users are encouraged to contribute various ways. This includes:
18+
19+
- Submitting a bug report
20+
- Submitting bug fixes
21+
- Submitting new Fortran computational routines
22+
- Submitting new Python computational routines
23+
- Submitting fully wrapped computational routines
24+
25+
26+
Getting the source code
27+
------------------------------
28+
29+
The source code is available on GitHub:
30+
31+
https://github.com/NCAR/wrf-python
32+
33+
To checkout the code::
34+
35+
git clone https://github.com/NCAR/wrf-python
36+
37+
38+
Git Flow
39+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
41+
This project follows the GitFlow Workflow, which you can read about here if it
42+
is new to you:
43+
44+
https://leanpub.com/git-flow/read
45+
46+
When you first clone the repository, by default you will be on the 'develop'
47+
branch, which is what you should use for your development.
48+
49+
50+
Pull Requests
51+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52+
53+
In order to submit changes, you must use GitHub to issue a pull request.
54+
55+
56+
Overview of WRF-Python Internals
57+
----------------------------------
58+
59+
WRF-Python is a collection of diagnostic and interpolation routines for WRF-ARW
60+
data. The API consists of a handful of functions
61+
62+
63+

0 commit comments

Comments
 (0)