cedadev / jasmin_scivm

9 stars 0 forks source link

patch NCL6.3.0 #71

Closed alaniwi closed 7 years ago

alaniwi commented 8 years ago

From a user query:

""" I work with a package called ESMValTool on JASMIN, and this software relies on the NCL language. On JASMIN, NCL is provided as part of the JAP, currently NCL6.3.0. Unfortunately, there is a trivial bug in NCL6.3.0 that prevents ESMValTool from running, meaning users can only run ESMValTool using a local installation of NCL at present.

ESMValTool is a high-profile package that will be used for CMIP6, and there is no indication of when NCL6.3.1 will be released (6.3.0 only came out on 18th March), so it would be great if we could patch NCL6.3.0 for a future release of the JAP. I've cc'd Alan Iwi in as he kindly patched an earlier JAP version of NCL when a previous problem arose (see http://proj.badc.rl.ac.uk/cedaservices/ticket/706).

If a patch is possible, something like the following should do the trick:

File to patch: /lib/ncarg/nclscripts/csm/shea_util.ncl

@@ -4636,7 +4636,7 @@
; opt@partialcorrelation=True
; Saji Hameed saji.nh@gmail.com
;-------------------
-
+undef("mreg_part_corr")
function mreg_part_corr(x1,x2,y,opt)
local opt
begin

Basically, 'undef("mreg_part_corr")' is missing from line 4639 """

alaniwi commented 8 years ago

As previously, FP stripped leading whitespace in the user query, so the above patch doesn't apply. This one should though (aside from tweaking any paths):

--- /usr/lib/ncarg/nclscripts/csm/shea_util.ncl 2015-12-06 15:23:21.000000000 +0000
+++ ./shea_util.ncl     2016-04-26 15:09:50.000000000 +0100
@@ -4637,6 +4637,7 @@
 ; Saji Hameed saji.nh@gmail.com
 ;-------------------

+undef("mreg_part_corr")
 function mreg_part_corr(x1,x2,y,opt)
 local opt
 begin
alaniwi commented 8 years ago

Despite delay in looking at this, NCL is still at 6.3.0.

alaniwi commented 8 years ago

Now patched. Minimally tested that patch has applied and that ncl still starts up okay.