Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New recipe and diagnostic for Arctic-midlatitude research #3021

Merged
merged 106 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
2836bc8
calculate actors for Arctic-midlat teleconnections
egalytska Sep 9, 2022
d33012c
naming changes and recipe small improvement
Sep 12, 2022
9a7e396
minor correction
Sep 12, 2022
dc51404
correction
Sep 12, 2022
d0d32f5
corrected config file
Sep 12, 2022
1b9be14
cvdp-related things
Sep 12, 2022
0479f6b
changed the path for diagnostics
Sep 13, 2022
f13a147
remove old file
Sep 14, 2022
d5477c7
modified config user file
egalytska Jan 5, 2023
7016535
recipe to define variables for Arctic-midlatitude teleconnections, fi…
egalytska Jan 5, 2023
a693c28
delete old file
egalytska Jan 5, 2023
7d76a52
modified bash file to run esmvaltool
egalytska Jan 5, 2023
a086dbc
add python diagnostic to calculate variables and save into .nc file b…
egalytska Jan 5, 2023
451b84f
remove the old recipe, was used only for the tests
egalytska Jan 5, 2023
a500871
remove an old recipy file that was used for the tests
egalytska Jan 5, 2023
94d6e4c
added a path with cmorized HAdISST data
egalytska Jan 19, 2023
aad8e28
Merge branch 'main' into Arctic-midlat_EG
egalytska Jan 20, 2023
3384d5b
Merge branch 'main' into Arctic-midlat_EG
egalytska Feb 7, 2023
132269d
Merge branch 'main' into Arctic-midlat_EG
bsolino Feb 13, 2023
3831711
Automated code standards fixing
bsolino Feb 13, 2023
bc54e16
redundant file
egalytska Feb 15, 2023
829e3b4
redundant config-user file
egalytska Feb 15, 2023
f79b87b
updated folder name
egalytska Feb 15, 2023
8080a61
fixed issues related to the code standard in the diag script
egalytska Feb 15, 2023
8e05f49
updated folder name
egalytska Feb 15, 2023
4aaaa56
corrected path to the diag script
egalytska Feb 15, 2023
a0e7cd9
corrected typo
egalytska Feb 15, 2023
1a0ac0b
Merge branch 'main' into Arctic-midlat_EG
egalytska Feb 22, 2023
f20371a
fixing codacy missing-function-docstring (this is test)
egalytska Feb 22, 2023
3c5a17e
fixing trailing whitespace
egalytska Feb 22, 2023
f3b97d5
fixing trailing whitespace (again)
egalytska Feb 22, 2023
b8c47b5
further codacy fixes
egalytska Feb 22, 2023
2dfc60d
more codacy fixes
egalytska Feb 22, 2023
f0f5f01
more codacy fixes
egalytska Feb 22, 2023
276d643
more codacy fixes
egalytska Feb 22, 2023
fc6e222
fixed missing whitespace
egalytska Feb 23, 2023
13a5f64
Merge branch 'main' into Arctic-midlat_EG
egalytska Mar 15, 2023
553b2b5
update of the recipe according to the ESMValTool standarts
egalytska Mar 15, 2023
19f252b
Merge branch 'main' into Arctic-midlat_EG
egalytska Mar 20, 2023
6f1b79f
added .bibtex reference
egalytska Mar 20, 2023
baa2c22
added cvdp
egalytska Mar 22, 2023
d75e040
renamed the file
egalytska Mar 22, 2023
47122e1
slight improvements, no plotting function yet and no provenance yet
egalytska Mar 22, 2023
fa58394
added missing blank lines
egalytska Mar 22, 2023
e82f060
hopefully improved the diagnostics
egalytska Mar 24, 2023
e519eef
fixng minor issues
egalytska Mar 24, 2023
650b8d7
minor fixes
egalytska Mar 24, 2023
36fa992
fixes
egalytska Mar 24, 2023
fce9919
final fix?
egalytska Mar 24, 2023
930a9ee
code style improvements
egalytska Mar 24, 2023
b5594ff
added documentation
egalytska Mar 27, 2023
91dac59
deleted redundant recipe file
egalytska Mar 27, 2023
4d3b3da
changes in structure of recipe
egalytska Mar 27, 2023
6f7d9e9
fixing typos
egalytska Mar 27, 2023
dadc2b3
fixes
egalytska Mar 27, 2023
11bc620
Update esmvaltool/recipes/recipe_galytska23jgr.yml
egalytska Apr 12, 2023
135eaa3
Update esmvaltool/recipes/recipe_galytska23jgr.yml
egalytska Apr 12, 2023
ba10578
Update esmvaltool/recipes/recipe_galytska23jgr.yml
egalytska Apr 12, 2023
9e69dc6
Merge branch 'main' into Arctic-midlat_EG
egalytska Apr 12, 2023
1acdd9b
Corrected doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska Apr 14, 2023
6e65876
Update doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska Apr 14, 2023
c7873eb
Update doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska Apr 14, 2023
9a93763
Reference for cvdp doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska Apr 14, 2023
3fb80c4
returned cvdp's package diagnostic file driver.ncl to original state
egalytska Apr 14, 2023
6243a0a
edited info
egalytska Apr 14, 2023
fdc22d3
updated the info regarding the cvdp necessary changes in the header o…
egalytska Apr 14, 2023
4ad2b18
Merge branch 'main' into Arctic-midlat_EG
egalytska Apr 14, 2023
173189f
corrected docs
egalytska Apr 17, 2023
8b8c2e0
improved the diag script/ dealt with codacy issue(s)
egalytska Apr 17, 2023
6ee1c27
corrections after yamllint checks
egalytska Apr 17, 2023
7308e40
replace with the original file
egalytska Apr 17, 2023
ec41c4f
change to original driver.ncl
egalytska Apr 17, 2023
470fed3
remove redundant space
egalytska Apr 17, 2023
86e338d
added newline at the end of file
egalytska Apr 17, 2023
5bb28d0
typo fix
egalytska Apr 18, 2023
1aaf1f7
Merge remote-tracking branch 'origin/main' into Arctic-midlat_EG
egalytska May 23, 2023
6ffe28d
Update doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska May 23, 2023
c1a1ed2
Update doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska May 23, 2023
36f2fa2
Update esmvaltool/diag_scripts/cvdp/cvdp/driver.ncl
egalytska May 23, 2023
0147521
Update esmvaltool/recipes/recipe_galytska23jgr.yml
egalytska May 23, 2023
4d4a321
Update esmvaltool/recipes/recipe_galytska23jgr.yml
egalytska May 23, 2023
2a87583
corrected from daily to monthly
egalytska May 23, 2023
14db29b
Merge branch 'Arctic-midlat_EG' of https://github.com/ESMValGroup/ESM…
egalytska May 23, 2023
bbe8ed1
Update esmvaltool/diag_scripts/galytska23/select_variables_for_tigram…
egalytska May 23, 2023
8d3f71c
Update esmvaltool/diag_scripts/galytska23/select_variables_for_tigram…
egalytska May 23, 2023
f99e9c0
fixed an error: from daily to monthly
egalytska May 23, 2023
a6bb9f5
Merge branch 'Arctic-midlat_EG' of https://github.com/ESMValGroup/ESM…
egalytska May 23, 2023
84b6373
fix typo
egalytska Jun 12, 2023
fa0b676
fixed variable_cases function
egalytska Jun 12, 2023
7d455c8
improved with adding the option for plotting
egalytska Jun 15, 2023
afafed2
improved diagnostics based on the community feedback
egalytska Jun 15, 2023
bafe969
trailing space
egalytska Jun 15, 2023
8b6385f
Merge remote-tracking branch 'origin' into HEAD
egalytska Jun 15, 2023
61061d1
code style fixes
egalytska Jun 15, 2023
f2a6cb6
fix code style mistakes
egalytska Jun 15, 2023
ee14e25
fixing prospector issue
egalytska Jun 16, 2023
e0bda0d
updated figure for the docs
egalytska Jun 16, 2023
b531f80
fix typo in end_year
egalytska Jun 16, 2023
865efc5
fix typo
egalytska Jun 16, 2023
1ecd3ad
Update doc/sphinx/source/recipes/recipe_galytska23jgr.rst
egalytska Jun 16, 2023
2c407cb
Merge branch 'main' into Arctic-midlat_EG
egalytska Jun 16, 2023
93e2bb8
corrected issues with .nc files
egalytska Jun 16, 2023
619d274
code stile fixes
egalytska Jun 16, 2023
399d7cf
Delete job_DKRZ-EG.sh
egalytska Jun 16, 2023
265f040
added recipe to list of resource intensive ones
Jun 16, 2023
208b029
Update esmvaltool/diag_scripts/galytska23/select_variables_for_tigram…
egalytska Jun 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions config-user_EG_levante.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
###############################################################################
remi-kazeroni marked this conversation as resolved.
Show resolved Hide resolved
# User's configuration file for the ESMValTool
###############################################################################
---

# Rootpaths to the data from different projects (lists are also possible)
rootpath:
# CMIP3: /work/bd0854/DATA/ESMValTool2/CMIP3/
CMIP5: [/work/kd0956/CMIP5/data/cmip5/output1]
CMIP6: [/work/ik1017/CMIP6/data/CMIP6/]
DAMIP: [/work/ik1017/CMIP6/data/DAMIP/]
OBS: [/work/bd0854/DATA/ESMValTool2/OBS, /work/bd0854/b380971/output/revision/data_formatting_20230112_110337]
# OBS6: [/work/bd0854/b309137/data_ext/, /mnt/lustre02/work/bd0854/DATA/ESMValTool2/OBS]
# obs4MIPs: [/work/bd0854/b309137/data_ext/, /mnt/lustre02/work/bd0854/DATA/ESMValTool2/OBS]
# ana4mips: ~/ana4mips_inputpath
# native6: ~/native6_inputpath
RAWOBS: /work/bd0854/b380971/data_temp/raw_obs/Tier2/HadISST #/work/bd0854/DATA/ESMValTool2/OBS
default: /work/bd0854/DATA/ESMValTool2/OBS
native6: [/work/bd0854/DATA/ESMValTool2/RAWOBS, /work/bd0854/b380971/data_temp/CDS/]

# Directory structure for input data: [default]/BADC/DKRZ/ETHZ/etc
# See config-developer.yml for definitions.
drs:
CMIP3: DKRZ
CMIP5: DKRZ
CMIP6: DKRZ

# Directory tree created by automatically downloading from ESGF
#rootpath:
# CMIP3: ~/climate_data
# CMIP5: ~/climate_data
# CMIP6: /work/bd0854/b380971/data_temp/automatic_download
# CORDEX: ~/climate_data
# obs4MIPs: ~/climate_data
#drs:
# CMIP3: ESGF
# CMIP5: ESGF
# CMIP6: ESGF
# CORDEX: ESGF
# obs4MIPs: ESGF

# Run at most this many tasks in parallel [null]/1/2/3/4/..
# Set to null to use the number of available CPUs.
# If you run out of memory, try setting max_parallel_tasks to 1 and check the
# amount of memory you need for that by inspecting the file
# run/resource_usage.txt in the output directory. Using the number there you
# can increase the number of parallel tasks again to a reasonable number for
# the amount of memory available in your system.
max_parallel_tasks: null

# Destination directory
output_dir: /work/bd0854/b380971/output/revision/

# Directory for storing downloaded climate data
download_dir: /work/bd0854/b380971/data_temp/CMIP6

# Auxiliary data directory (used for some additional datasets)
auxiliary_data_dir: ./auxiliary_data

# Set the console log level debug, [info], warning, error
log_level: info

# Disable the automatic download of missing CMIP3, CMIP5, CMIP6, CORDEX,
# and obs4MIPs data from ESGF by default. This is useful if you are working
# on a computer without an internet connection.
offline: true
# Exit on warning (only for NCL diagnostic scripts)? true/[false]
exit_on_warning: false
# Plot file format? [png]/pdf/ps/eps/epsi
output_file_type: png
# Use netCDF compression true/[false]
compress_netcdf: false
# Save intermediary cubes in the preprocessor true/[false]
save_intermediary_cubes: false
# Remove the preproc dir if all fine
remove_preproc_dir: false
# Path to custom config-developer file, to customise project configurations.
# See config-developer.yml for an example. Set to None to use the default
# config_developer_file: null
# Get profiling information for diagnostics
# Only available for Python diagnostics
profile_diagnostic: true
98 changes: 49 additions & 49 deletions esmvaltool/diag_scripts/cvdp/cvdp/driver.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,68 @@
; CVDP driver script. To run the CVDP at the command line type: ncl driver.ncl
; To run the CVDP at the command line, put it in background mode, and write the terminal output
; to a file named file.out, type: ncl driver.ncl >&! file.out &
;
;
;============================================================================================
outdir = "/project/CVDP/" ; location of output files (must end in a "/")
; It is recommended that a new or empty directory be pointed to here
; It is recommended that a new or empty directory be pointed to here
; as existing files in outdir can get removed.

namelists_only = "False" ; Set to True to only create the variable namelists. Useful
; upon running the package for the first time to verify that the correct
; files are being selected by the package. (See files in namelist_byvar/ directory)
; Set to False to run the entire package.
; Set to False to run the entire package.

obs = "True" ; True = analyze and plot observations (specified in namelist_obs), False = do not
scale_timeseries = "False" ; True = scale timeseries so that x-axis length is comparable across timeseries, False = do not
output_data = "True" ; True = output selected calculated data to a netCDF file. Make sure .nc files from previous CVDP
; runs are not in outdir or they will get added to or modified.
compute_modes_mon = "True" ; True = compute DJF, MAM, JJA, SON, Annual and Monthly Atmospheric Modes of Variability
; False = do not compute the Monthly Atmospheric Modes of Variability (saves computation time)
;- - - - - - - - - - - - - - - - - -
; runs are not in outdir or they will get added to or modified.
compute_modes_mon = "True" ; True = compute DJF, MAM, JJA, SON, Annual and Monthly Atmospheric Modes of Variability
; False = do not compute the Monthly Atmospheric Modes of Variability (saves computation time)
;- - - - - - - - - - - - - - - - - -
opt_climo = "Full" ; Full = remove climatology based on full record of each simulation,
; Custom = set climatological period using climo_syear (climatological start year) and climo_eyear (climatological end year)
; Custom = set climatological period using climo_syear (climatological start year) and climo_eyear (climatological end year)

if (opt_climo.eq."Custom") then ; When climo_syear and climo_eyear are positive, remove the climatology/annual cycle based on these years.
climo_syear = -30 ; Both settings should be within the range of years of all specified model runs and observational datasets.
climo_syear = -30 ; Both settings should be within the range of years of all specified model runs and observational datasets.
climo_eyear = 0 ; When climo_syear is negative, remove the climatology/annual cycle relative to the end of each model run
end if ; or observational dataset. Example: climo_syear = -25, climo_eyear = 0 will result in the climatology
; being removed from the last 26 years of each model run and observations.
;- - - - - - - - - - - - - - - - - -
; being removed from the last 26 years of each model run and observations.
;- - - - - - - - - - - - - - - - - -
colormap = 0 ; 0 = default colormaps, 1 = colormaps better for color blindness

output_type = "png" ; png = create png files, ps = create postscript files as well as png files (for web viewing).
png_scale = 1.5 ; Set the output .png size. Value between .1->5. Any value > 1 (< 1) increases (decreases) png size.
output_type = "png" ; png = create png files, ps = create postscript files as well as png files (for web viewing).

png_scale = 1.5 ; Set the output .png size. Value between .1->5. Any value > 1 (< 1) increases (decreases) png size.
; When output_type = "png" a value of 1 will result in a png sized 1500 (H) x 1500 (W) before automatic cropping of white space
; When output_type = "ps" a value of 1 will result in a png density setting of 144 before automatic cropping of white space
webpage_title = "Title goes here" ; Set webpage title

tar_output = "False" ; True = tar up all output in outdir and remove individual files, False = do not
; Note: ALL files in outdir will be tarred up and then removed from the outdir directory.
webpage_title = "Title goes here" ; Set webpage title

;---Advanced Options----------------------------------------------------------------------
tar_output = "False" ; True = tar up all output in outdir and remove individual files, False = do not
; Note: ALL files in outdir will be tarred up and then removed from the outdir directory.

;---Advanced Options----------------------------------------------------------------------
zp = "ncl_scripts/" ; directory path of CVDP NCL scripts. (must end in a "/")
; Examples: "ncl_scripts/" if all code is local, or on CGD or CISL systems: "~asphilli/CESM-diagnostics/CVDP/Release/v4.1.0/ncl_scripts/"
; Regardless of this setting the following files should be in one directory: namelist, driver.ncl, and namelist_obs.
; Regardless of this setting the following files should be in one directory: namelist, driver.ncl, and namelist_obs.
; If pointing to code in ~asphilli make sure the driver script version #s match between this script and the script in ~asphilli.
ncl_exec = "ncl" ; This can be changed to a different path if a different version of NCL needs to be used, such as "/different/path/to/bin/ncl"
run_style = "parallel" ; parallel = allow simple python-based parallelization to occur. X number of CVDP NCL scripts will be called at once.

ncl_exec = "ncl" ; This can be changed to a different path if a different version of NCL needs to be used, such as "/different/path/to/bin/ncl"

run_style = "parallel" ; parallel = allow simple python-based parallelization to occur. X number of CVDP NCL scripts will be called at once.
; X is set via max_num_tasks. Terminal output will be harder to follow.
; serial = call CVDP NCL scripts serially. (Default)
max_num_tasks = 4 ; if run_parallel = "parallel", how many CVDP NCL scripts can be called at once? (If unsure set to 3)
modular = "False" ; True = Run only those CVDP scripts specified in modular_list.
; serial = call CVDP NCL scripts serially. (Default)

max_num_tasks = 4 ; if run_parallel = "parallel", how many CVDP NCL scripts can be called at once? (If unsure set to 3)

modular = "True" ; True = Run only those CVDP scripts specified in modular_list.
; False = Run all CVDP scripts (Default)

modular_list = "pdo,aice.trends_timeseries,sst.indices" ; When modular = "True" list the CVDP scripts that will be run.
modular_list = "sst.indices,psl.nam_nao" ; When modular = "True" list the CVDP scripts that will be run.
remi-kazeroni marked this conversation as resolved.
Show resolved Hide resolved
; Example: modular_list = "amoc,amo,pr.trends_timeseries"
; For a list of available scripts see complete_list at line 72.
; For a list of available scripts see complete_list at line 72.

machine_casesen = "True" ; True = Your filesystem is case sensitive (Default)
; False = Your filesystem is case insensitive
; False = Your filesystem is case insensitive
;========END USER MODIFICATIONS===========================================================
version = "5.0.0"

Expand All @@ -78,7 +78,7 @@
do gg = 0,dimsizes(outfiles)-1
if (isfilepresent2("obs_"+outfiles(gg))) then
system("rm obs_"+outfiles(gg))
end if
end if
end do

if (isfilepresent2(outdir+"metrics_orig.txt")) then ; remove metrics_orig.txt file if present
Expand All @@ -88,7 +88,7 @@
if (opt_climo.eq."Custom") then
if (climo_syear.ge.climo_eyear) then
print("Specified custom climatology start year (climo_syear) cannot be greater than or equal to the specified end year (climo_eyear), exiting CVDP.")
exit
exit
end if
else
climo_syear = -999
Expand All @@ -102,8 +102,8 @@
"export OUTPUT_DATA="+output_data+"; export VERSION="+version+"; export PNG_SCALE="+png_scale+"; "+\
"export OPT_CLIMO="+opt_climo+"; export CLIMO_SYEAR="+climo_syear+"; export CLIMO_EYEAR="+climo_eyear+"; "+\
"export COMPUTE_MODES_MON="+compute_modes_mon+"; export OUTPUT_TYPE="+output_type+"; export MACHINE="+machine_casesen+"; "+\
"export COLORMAP="+colormap+"; export CVDP_SCRIPTS="+zp+"; export MAX_TASKS="+max_num_tasks+";"
ncl_exec = ncl_exec+" -n -Q"
"export COLORMAP="+colormap+"; export CVDP_SCRIPTS="+zp+"; export MAX_TASKS="+max_num_tasks+";"
ncl_exec = ncl_exec+" -n -Q"

system(envvar_str + " "+str_sub_str(ncl_exec," -Q","")+" "+zp+"namelist.ncl") ; create variable namelists
if (namelists_only.eq."True") then
Expand All @@ -112,10 +112,10 @@
do gg = 0,dimsizes(outfiles)-1
if (isfilepresent2("obs_"+outfiles(gg))) then
system("rm obs_"+outfiles(gg))
end if
end if
end do
exit
end if
end if

if (modular.eq."True") then
modular_list = str_sub_str(modular_list," ","") ; remove spaces if present
Expand All @@ -127,25 +127,25 @@
else
modular_list = str_sub_str(modular_list,","," "+ncl_exec+" "+zp)
modular_list = str_sub_str(modular_list,".ncl",".ncl;")
system(envvar_str+" "+ncl_exec+" "+zp+modular_list)
system(envvar_str+" "+ncl_exec+" "+zp+modular_list)
end if
else
complete_list = str_sub_str(complete_list,",",".ncl,") ; add .ncl in to end of each script name
complete_list = complete_list+".ncl" ; add .ncl in to last script name
if (run_style.eq."parallel") then
complete_list = str_sub_str(complete_list,","," "+zp)
system(envvar_str+" python "+zp+"runTasks.py "+zp+complete_list)
system(envvar_str+" python "+zp+"runTasks.py "+zp+complete_list)
else
complete_list = str_sub_str(complete_list,","," "+ncl_exec+" "+zp)
complete_list = str_sub_str(complete_list,".ncl",".ncl;")
system(envvar_str+" "+ncl_exec+" "+zp+complete_list)
system(envvar_str+" "+ncl_exec+" "+zp+complete_list)
end if
end if

if (output_data.eq."True") then
if (output_data.eq."True") then
system(envvar_str + " "+ncl_exec+" "+zp+"ncfiles.append.ncl")
end if
end if

if (output_type.eq."png") then
ofiles = systemfunc("ls "+outdir+"*.png")
do gg = 0,dimsizes(ofiles)-1
Expand All @@ -162,7 +162,7 @@
end if
end do
delete([/filesize,ofilesS,ofilesT/])

ofiles = systemfunc("ls "+outdir+"*."+output_type)
ofiles_png = str_sub_str(ofiles,"."+output_type,".png")
d_opt = 144*png_scale
Expand All @@ -172,7 +172,7 @@
end do
print("Done with "+output_type+"->png conversion")
end if

system("cp "+zp+"cas-cvdp.png "+outdir)
system("cp namelist_byvar/* "+outdir)
system("cp namelist "+outdir)
Expand Down Expand Up @@ -204,11 +204,11 @@
do gg = 0,dimsizes(outfiles)-1
if (isfilepresent2("obs_"+outfiles(gg))) then
system("rm obs_"+outfiles(gg))
end if
end if
end do

delete([/ofiles,outfiles,outdir,obs,scale_timeseries,output_data,opt_climo,climo_syear,climo_eyear,\
png_scale,webpage_title,compute_modes_mon,met_files/])

print("Finished: Climate Variability Diagnostics Package ("+systemfunc("date")+")")

Loading