API reference¶
This page provides an auto-generated summary of API. For more details and examples, refer to the relevant chapters in the main part of the documentation.
Project : CRESCENDO/AEROCOM Filename : organize_yaml.py Author : Ramiro Checa-Garcia email : rcheca@lsce.ipsl.fr Purpose : Reorganize variables for LMDzINCAOR experiment runs.
Revision History ———————————————————-
Date Author Ref Revision
2018-Apr R.Checa First version 2018-Sep R.Checa Working as main with modules in lib 2018-Oct R.Checa Implemented yaml 2018-Nov R.Checa Final first version based on yaml
TODO LIST:
Modules¶
aeroplots¶
Project : CRESCENDO/AEROCOM Filename : liborganize.py Author : Ramiro Checa-Garcia email : rcheca@lsce.ipsl.fr Purpose : Reorganize variables for LMDzINCAOR experiment runs.
Revision History ———————————————————-
Date Author Ref Revision
2018-Apr R.Checa First code 2018-Jul R.Checa Implemented as module 2018-Nov R.Checa Final first version.
TODO LIST:
Diagnostics on lev_var not in hard-code (Improvement)
Add reference values for key diagnostics (Improvement)
Add description to each function (Documentation)
Factors in new_var could be variables in netcdf (Improvement)
-
lib.liborganize.add_global_attributes(mysettings, ncname, newname, study, info_var, finfo=None)[source]¶ - Parameters
mysettings –
ncname –
newname –
study –
info_var –
finfo –
- Returns
-
lib.liborganize.check_units(varname_list, vars_dataset)[source]¶ - Parameters
varname_list –
vars_dataset –
- Returns
-
lib.liborganize.create_filename(mysettings, study, expID, varID, varfile, freq='mon', finfo='')[source]¶ This function creates the new filename of the netcdf with the diagnostics as derived from the current settings. In the case of CMIP6 netcdfs the filename will have the structure:
varID_tableID_sourceID_experimentID_memberID_gridlevel_timerange
varID ——-> is the variable name: varname
tableID ——> depends on variable AERday, Amon etc…
sourceID —–> IPSL-LMDZORINCAv6
experimentID -> CRESCWP3PD-amip
memberID —–> v5-r1i1p1f1 (v5 refers to our internal version)
gridlabel —-> gr (refers to the original grid but we provide at preslev)
timerange —-> 20000101-20121231 for all cases.
- Parameters
mysettings –
study –
expID –
varID – is the variable name: varname
varfile –
freq –
finfo –
- Returns
save_name
info_var
-
lib.liborganize.directory_structure(study, mysettings, clean=False, create=False, finfo=None)[source]¶ - Parameters
study –
mysettings –
clean –
create –
finfo –
- Returns
-
lib.liborganize.get_var(mysettings, year, varname, freqsource, module, timeout, outname, expcase, study, extra='', index=1, finfo=None)[source]¶ - Parameters
mysettings –
year –
varname –
freqsource –
module –
timeout –
outname –
expcase –
study –
extra –
index –
finfo –
- Returns
-
lib.liborganize.lev_var(mysettings, year, varname, freqsource, module, timeout, outname, expcase, study, extra='', lev='top', index=1, finfo=None)[source]¶ - Parameters
mysettings –
year –
varname –
freqsource –
module –
timeout –
outname –
expcase –
study –
extra –
lev –
index –
finfo –
- Returns
-
lib.liborganize.new_var(mysettings, year, varname, freqsource, module, timeout, outname, expcase, study, extra='', index=1, finfo=None)[source]¶ - Parameters
mysettings –
year –
varname –
freqsource –
module –
timeout –
outname –
expcase –
study –
extra –
index –
finfo –
- Returns
-
lib.liborganize.new_variable_altsur(vardataset, d_new_vars, outname, varname, outfile, finfo=None)[source]¶ - Parameters
vardataset –
d_new_vars –
outname –
varname –
outfile –
finfo –
- Returns
-
lib.liborganize.post_processing(mysettings, directory, list_variables, lyears, post_t, study, expID, freq, finfo=None)[source]¶
-
lib.liborganize.process_files(mysettings, year, expcase, study, proc_file, finfo=None)[source]¶ - Parameters
mysettings –
year –
expcase –
study –
proc_file –
finfo –
- Returns
-
lib.liborganize.read_process_file(mysettings, process_file, year, expcase, study, finfo=None)[source]¶ - Parameters
mysettings –
process_file –
year –
expcase –
study –
finfo –
- Returns
regions¶
Project : CRESCENDO/AEROCOM Filename : check.py Author : Ramiro Checa-Garcia email : rcheca@lsce.ipsl.fr Purpose : Specific type of checks for key variables
Revision History ———————————————————-
Date Author Ref Revision
2018-Oct R.Checa First version. 2018-Nov R.Checa Added the global mean at level
TODO LIST:
loops¶
Project : CRESCENDO/AEROCOM Filename : liborganize.py Author : Ramiro Checa-Garcia email : rcheca@lsce.ipsl.fr Purpose : Reorganize variables for LMDzINCAOR experiment runs.
Revision History ———————————————————-
Date Author Ref Revision
2018-Apr R.Checa First code 2018-Jul R.Checa Implemented as module 2018-Nov R.Checa Final first version.
TODO LIST:
Diagnostics on lev_var not in hard-code (Improvement)
Add reference values for key diagnostics (Improvement)
Add description to each function (Documentation)
Factors in new_var could be variables in netcdf (Improvement)
-
lib.specific_ipsl.add_global_attributes(mysettings, ncname, newname, study, info_var, finfo=None)[source]¶
-
lib.specific_ipsl.create_filename(mysettings, study, expID, varID, varfile, freq='mon', finfo='')[source]¶ - Filename will have the structure:
varID_tableID_sourceID_experimentID_memberID_gridlevel_timerange
varID ——-> is the variable name: varname tableID ——> depends on variable AERday, Amon etc… sourceID —–> IPSL-LMDZORINCAv6 experimentID -> CRESCWP3PD-amip memberID —–> v5-r1i1p1f1 (v5 refers to our internal version) gridlabel —-> gr (refers to the original grid but we provide at preslev) timerange —-> 20000101-20121231 for all cases.
-
lib.specific_ipsl.directory_structure(study, mysettings, clean=False, create=False, finfo=None)[source]¶
-
lib.specific_ipsl.get_var(mysettings, year, varname, freqsource, module, timeout, outname, expcase, study, extra='', index=1, finfo=None)[source]¶ Module= ATM, CHM, etc
name=vmro3 etc
freq=DA, HF, MO for ATM, for CHM all is DA
-
lib.specific_ipsl.lev_var(mysettings, year, varname, freqsource, module, timeout, outname, expcase, study, extra='', lev='top', index=1, finfo=None)[source]¶ Module= ATM, CHM, etc
name=vmro3 etc
freq=DA, HF, MO for ATM, for CHM all is DA
-
lib.specific_ipsl.new_var(mysettings, year, varname, freqsource, module, timeout, outname, expcase, study, extra='', index=1, finfo=None)[source]¶ Module= ATM, CHM, etc
name=vmro3 etc
freq=DA, HF, MO for ATM, for CHM all is DA
-
lib.specific_ipsl.new_variable_altsur(vardataset, d_new_vars, outname, varname, outfile, finfo=None)[source]¶
-
lib.specific_ipsl.post_processing(mysettings, directory, list_variables, lyears, post_t, study, expID, freq, finfo=None)[source]¶ This function is doing the post-processing of the extracted files
Note that it is not the best function from the programming point of view as the results depends strongly on the files found in the directory.
It should be important to add something that test if the files on the directories are the files expected from the settings file
-
lib.specific_ipsl.read_process_file(mysettings, process_file, year, expcase, study, finfo=None)[source]¶