Load
get_file_suffix(dir, suffix)
Returns a list of all files in dir
which end in suffix
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dir
|
str
|
Directory of interest. |
required |
suffix
|
str
|
Usually the file type of interest e.g. |
required |
Returns:
Type | Description |
---|---|
List[str]
|
List of all files with the correct |
Source code in isca_tools/utils/load.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
load_dataset(exp_name, run_no=None, data_dir=None, decode_times=False, use_cftime=True)
This loads a dataset produced by Isca containing all the diagnostics specified.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exp_name
|
str
|
Name of folder in |
required |
run_no
|
Optional[int]
|
Data is saved at intervals in time specified in the |
None
|
data_dir
|
Optional[str]
|
Directory which contains the |
None
|
decode_times
|
bool
|
If |
False
|
use_cftime
|
bool
|
If |
True
|
Returns:
Type | Description |
---|---|
Dataset
|
Dataset containing all diagnostics specified for the experiment. |
Source code in isca_tools/utils/load.py
26 27 28 29 30 31 32 33 34 35 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 |
|
load_namelist(exp_name=None, data_dir=None, namelist_file=None)
Returns all the namelists options and their corresponding values specified in the namelist .nml file
for the experiment indicated by exp_name
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exp_name
|
Optional[str]
|
Name of folder in |
None
|
data_dir
|
Optional[str]
|
Directory which contains the |
None
|
namelist_file
|
Optional[str]
|
Path to the namelist .nml file to load. Use this option if data for the experiment has not been created yet. |
None
|
Returns: Namelist values used for this experiment.
Source code in isca_tools/utils/load.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|