Skip to content

Commit ae55108

Browse files
authored
Merge pull request #45 from carlosromero-bsc/upstream-contrib/fix-retrievals
fix: CDS levelist retrieval, HPC2020 permissions, and build installation path documentation
2 parents d45833b + 2ad395d commit ae55108

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The following options can be configured directly during the bundle build step:
9090
| `--with-single-precision` | Enable single precision build |
9191
| `--without-tests` | Disable tests |
9292
| `--build-type=<arg>` | `<Debug\|RelWithDebInfo\|Release\|Bit>` |
93-
| `--install-dir=<install-prefix>` | Install location |
93+
| `--install-dir=<install-prefix>` | Install location (Important: to prevent breaking incremental builds, avoid specifying a directory inside your build folder) |
9494

9595
Additional CMake options can be set via:
9696

@@ -145,6 +145,8 @@ Once the environment is properly configured, a standalone build can be performed
145145

146146
cmake --install `<path-to-build>` --parallel `<nthreads>`
147147

148+
*Note: If setting `CMAKE_INSTALL_PREFIX` during configuration, avoid setting it to a directory inside the build folder `<path-to-build>` to prevent breaking incremental builds.*
149+
148150

149151
Building ecLand (v2.0.0 stable release)
150152
--------------

‎tools/create_forcing/README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ to the MARS database, you should get a cds api access token first (more informat
191191
sodir: ./ecland_input/clim/ # output dir for initial cond and static fields
192192
fodir: ./ecland_input/forcing/ # output dir for forcing
193193
scriptsdir: <full_path_to_create_forcing_dir>/scripts/ # Directory with create_forcing scripts
194-
retrieve_with: cds
194+
retrieve_with: cds # Other option: mars
195195

196196

197197
The block `initial_conditions` allows to specify some variables to select what type of data to download.
@@ -209,8 +209,9 @@ For users outside of ecmwf, these variables should not be modified as ERA5 data
209209
CLIMVERSION: "v015" # the version of the climate data used for the initial condition data.
210210
# ERA5 uses the v015
211211
clim_data_loc: "cds" # the location of the climate data used for the initial condition data.
212-
# external users should set it to "cds"
213-
# emcwf users can set it to internal "ecmwf" path.
212+
# - external users should set it to "cds"
213+
# - emcwf users can set it to internal "ecmwf" path.
214+
# Important: in order to use the "ecmwf" option, the user needs to have access to the IFS UNIX group.
214215

215216

216217
The block `forcing` allows to specify some variables to select what type of forcing data to download.

‎tools/create_forcing/scripts/osm_pyutils/extract_process_cds.py‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818

1919
def download_from_cds(DATE, STREAM, TIME, STEPS_VAR, dataName, type_data, dataFormat, grbVars, grbLevType, grbLev,outFile):
2020
c = cdsapi.Client()
21-
c.retrieve(dataName,
22-
{
23-
'date' : DATE,
24-
'time' : TIME,
25-
'param' : grbVars,
26-
'levtype' : grbLevType,
27-
'levelist': grbLev,
28-
'stream' : STREAM,
29-
'step' : STEPS_VAR,
30-
'type' : type_data,
31-
'format' : dataFormat,
32-
},
33-
outFile
34-
)
21+
request = {
22+
'date' : DATE,
23+
'time' : TIME,
24+
'param' : grbVars,
25+
'levtype' : grbLevType,
26+
'stream' : STREAM,
27+
'step' : STEPS_VAR,
28+
'type' : type_data,
29+
'data_format' : dataFormat,
30+
}
31+
# Only include levelist if it's not None (surface fields don't have levelist)
32+
if grbLev is not None:
33+
request['levelist'] = grbLev
34+
c.retrieve(dataName, request, outFile)
3535

3636
# Function to deaccumulate flux variables, derive total precipitation and convert units
3737
def deacc_variable(data, pp, FREQ):

0 commit comments

Comments
 (0)