Base
create_per_job_nml(input_file_path, files_per_job=1, years_per_job=None, exist_ok=None)
Splits up list of all input files (or years) into separate lists of no more than files_per_job
(years_per_job
) in each.
A nml
file is then created for each of these with name same as input_file_path
but with first file (year)
in job as a suffix.
E.g. input_nml
becomes input0.nml
with input_info['script_info']['ind_files']
set to file
indices to run for that job.
E.g. input_nml
becomes input1985.nml
with input_info['script_info']['year_files']
set to
years to run for that job.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_file_path
|
str
|
Path to |
required |
files_per_job
|
int
|
Number of files to consider for each job. |
1
|
years_per_job
|
Optional[int]
|
Number of years to run for each job. Overrides |
None
|
exist_ok
|
Optional[bool]
|
If |
None
|
Returns:
Type | Description |
---|---|
List
|
List of paths to nml files created e.g. |
Source code in isca_tools/cesm/base.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
get_pressure(ps, p0, hya, hyb)
Calculates pressure at the hybrid levels, similar to NCAR function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ps
|
Union[ndarray, DataArray]
|
|
required |
p0
|
float
|
Surface reference pressure in Pa.
|
required |
hya
|
Union[ndarray, DataArray]
|
|
required |
hyb
|
Union[ndarray, DataArray]
|
|
required |
Returns:
Type | Description |
---|---|
Union[ndarray, DataArray]
|
|
Source code in isca_tools/cesm/base.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|