Skip to content

Commit 287bfca

Browse files
Add multirun capability to blocking_neale POD (#472)
* Revert "Update with current development efforts" * Fix FTP links in README.md Github.com does not show hyperlinks with the ftp:// protocol, even if they're explicitly specified. Work around this by writing out the full URL in the document. * Fix FTP links in README.md Fixes #7 Github.com does not show hyperlinks with the ftp:// protocol, even if they're explicitly specified. Work around this by writing out the full URL in the document so users can find data. * Correct precipiation variable name * allow system to overwrite png files * update blocking to use multirun capability * documentation and defaults setting not default --------- Co-authored-by: Thomas Jackson <[email protected]> Co-authored-by: tsjackson-noaa <[email protected]>
1 parent 32f94ef commit 287bfca

12 files changed

Lines changed: 602 additions & 168 deletions

diagnostics/blocking_neale/blocking.ncl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ load "$POD_HOME/blocking_digested.ncl"
88
; Reads in daily Z500mb and constructs various indices and plots of blocking.
99
; Analyzes many ensemble members and plots the mean and spread or std
1010
; Can accomodate data of different resolutions.
11-
; - DRB Feb 2021
11+
; - DRBC Feb 2021
1212
; separate some analysis and plotting functions into blocking_funcs
1313
; make controllable by env vars
14-
14+
; - DRBC May 2023: Add multi-run capability
1515
begin
1616

1717
lstd = False ; Plot standard dev lines (otherwise plot min/max which is UNTESTED).
@@ -22,7 +22,8 @@ set_digested(opts) ; translates env vars to opts@read_digested,write_digested
2222
; this is used by all_cases to set file names
2323

2424
all_cases = blocking_get_all_case_info(opts)
25-
; data structure to hold all case information of length number of files
25+
printVarSummary(all_cases)
26+
; opts = data structure to hold all case information of length number of files
2627
; case_names,case_type,file_names,@years_run0, years_run1 = start and stop years corresponding to above
2728

2829

@@ -89,6 +90,7 @@ do ifile=0,all_cases@nfiles-1
8990

9091
; Check for global read digested settings (MDTF case restricted to only undigested)
9192
if (opts@MDTF_BLOCKING_READ_DIGESTED.and.(file_opts@case_type.ne."MDTF")) then ; read in block_time
93+
print("Opening digested file")
9294
f_dig = open_digested(file_opts)
9395

9496
time_ymd = blocking_readtime(f_dig,file_opts) ; time_ymd(idays)
@@ -105,6 +107,7 @@ do ifile=0,all_cases@nfiles-1
105107
nlons = dimsizes(lon)
106108

107109
else ; opts@MDTF_BLOCKING_READ_DIGESTED = False
110+
print("Opening un-digested file")
108111
var_in_p = blocking_readfile_orig(file_opts) ; Data actually read here
109112
;file_opts in: year0,year1,period_name,filename,var_name,lat/lon limits
110113
;file_opts out: time_ymd, idays,time
@@ -241,7 +244,7 @@ do ifile=0,all_cases@nfiles-1
241244
block_freq_p(ifile,:) = (/block_freq/) ; For plotting (days->freq)
242245
end if
243246

244-
print(" Sanity check: min max "+min(block_freq_p(ifile,:))+" "+max(block_freq_p(ifile,:)))
247+
print(" Sanity check: block freq range "+min(block_freq_p(ifile,:))+"-"+max(block_freq_p(ifile,:)))
245248

246249
; Plots of individual cases with time axes
247250
; ndoys = 365 always (remove extra day in obs for simplicity)
@@ -292,10 +295,12 @@ do ifile=0,all_cases@nfiles-1
292295
; if this is the first file in the ensemble, create the panel graphics object
293296
if (ifile.eq.min(ens_file_inds)) then
294297
res_t = True ;output from get_plot_*
295-
res_t@tiMainString = file_opts@case_name +file_opts@year_range
296298
wks_ens_page = get_plot_anncycle_ensname(this_ens_name,all_cases,settings,res_t)
297299
end if
298300

301+
res_t@tiMainString = file_opts@case_name +file_opts@year_range
302+
303+
299304
; draw the Hovmueller figure (individual panels for each file)
300305
plot_t(ifile) = gsn_csm_hov(wks_ens_page, lonPivot(block_freq_yr,270.), res_t)
301306

diagnostics/blocking_neale/blocking_digested.ncl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ begin
1919

2020
file_name_digested = strs(dimsizes(strs)-1) ; file name is last string
2121

22+
2223
dir_one_up = strs(dimsizes(strs)-2) ;add obs names to their file names
2324
if ((dir_one_up.eq."ERAI").or.(dir_one_up.eq."MERRA")) then
2425
file_name_digested = dir_one_up+"."+file_name_digested
@@ -72,6 +73,7 @@ begin
7273

7374
time_ymd = file_opts_in@time_ymd
7475
dims_time_ymd = dimsizes(time_ymd)
76+
print("write_digested "+dims_time_ymd)
7577
ncalendar = dims_time_ymd(1)
7678

7779
dimSizes = (/ -1 , nlon, ncalendar /)

0 commit comments

Comments
 (0)