Re: ARW Online tutorial NCL script is not working

From: <mmkamal_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 19 2012 - 11:23:29 MST

Hi Mary,

Here you go the information you have asked:

gpc-f101n084-$ ncl -V
6.1.0

gpc-f101n084-$ env | grep NCARG
NCARG_ROOT=/scinet/gpc/Applications6/ncl/6.1.0/
NCARG_COLORMAPS=/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/colormaps

gpc-f101n084-$ ls -l $NCARG_ROOT/lib/ncarg/nclscripts/wrf
total 176
-rw-r--r-- 1 root root 156363 Oct 28 00:34 WRFUserARW.ncl
-rw-r--r-- 1 root root 9913 Oct 28 00:34 WRF_contributed.ncl

gpc-f101n084-$ ls -l $NCARG_ROOT/lib/ncarg/nclscripts/csm
total 1856
-rw-r--r-- 1 root root 14623 Oct 28 00:34 ccm_func.ncl
-rw-r--r-- 1 root root 422827 Oct 28 00:34 contributed.ncl
-rw-r--r-- 1 root root 137377 Oct 28 00:34 diagnostics_cam.ncl
-rw-r--r-- 1 root root 474076 Oct 28 00:34 gsn_code.ncl
-rw-r--r-- 1 root root 484929 Oct 28 00:34 gsn_csm.ncl
-rw-r--r-- 1 root root 59870 Oct 28 00:34 popRemap.ncl
-rw-r--r-- 1 root root 153721 Oct 28 00:34 shea_util.ncl
-rw-r--r-- 1 root root 85356 Oct 28 00:34 skewt_func.ncl
-rw-r--r-- 1 root root 35980 Oct 28 00:34 wind_rose.ncl

====================================================================
Here you go the top part of my "wrf_Precip2.ncl" script
====================================================================

; Example script to produce plots for a WRF real-data run,
; with the ARW coordinate dynamics option.
; In this example we first get the entire field over time, which will
; make it easier to calculate tendencies

load
"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load
"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load
"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
   a = addfile("wrfout_d01_2002.nc","r")

; We generate plots, but what kind do we prefer?
; type = "x11"
   type = "png"
; type = "pdf"
; type = "ps"
; type = "ncgm"
   wks = gsn_open_wks(type,"plt_Precip2")

; Set some basic resources
   res = True
   res@MainTitle = "REAL-TIME WRF"

   pltres = True
   mpres = True
   mpres@mpGeophysicalLineColor = "Black"
   mpres@mpNationalLineColor = "Black"
   mpres@mpUSStateLineColor = "Black"
   mpres@mpGridLineColor = "Black"
   mpres@mpLimbLineColor = "Black"
   mpres@mpPerimLineColor = "Black"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need

     slp = wrf_user_getvar(a,"slp",-1) ; slp
       wrf_smooth_2d( slp, 3 ) ; smooth slp

   ; Get non-convective, convective
   ; Calculate total precipitation
     rain_exp = wrf_user_getvar(a,"RAINNC",-1)
     rain_con = wrf_user_getvar(a,"RAINC",-1)
     rain_tot = rain_exp + rain_con
       rain_tot@description = "Total Precipitation"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
==============================================================

For your convenience I would like to let you know that I have
generated the attached graphics by setting the following environmental
variable using the same data set with another script
(http://www.ncl.ucar.edu/Applications/Scripts/WRF_pcp_1.ncl)

load
"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load
"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

Please let me know if you need any other information.

Thanks
Kamal

Quoting Mary Haley <haley@ucar.edu>:

> Kamal,
>
> There's not enough information here. Dave is right that it looks
> like an NCARG_ROOT issue. This error:
>
> fatal:GetSysAppDir:Unable to get a default value for the system
> App Resource directory
>
> is what indicates that either NCARG_ROOT wasn't set, or was set incorrectly.
>
> But then when you showed your load commands below, it seems like
> there are other problems.
>
> Are you loading the scripts with the full paths, or using
> $NCARG_ROOT? That is, do you literally have:
>
>> load
>> "/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load
>> "/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
> or do you have (this is the preferred method):
>
>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load"$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
> where NCARG_ROOT is set to /scinet/gpc/Applications6/ncl/6.1.0?
>
> Also, I'm wondering about this error:
>
>>>> fatal:error at line 1 in file
>>>> /scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>
> This looks like something is wrong with this file, which means it
> was either changed incorrectly, or the file got corrupted.
>
> Can you emal me the top part of your script *exactly at it appears*
> with the "load" commands, and then email me the following information:
>
> ncl -V
> env | grep NCARG
> ls -l $NCARG_ROOT/lib/ncarg/nclscripts/wrf
> ls -l $NCARG_ROOT/lib/ncarg/nclscripts/csm
>
> --Mary
>
> On Dec 18, 2012, at 8:56 PM, mmkamal@uwaterloo.ca wrote:
>
>> Hi Dave,
>>
>> Here you go the path of the NCARG_ROOT environment variable I have set:
>>
>> load
>> "/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load
>> "/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load"/scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>>
>> Could you please tell me where is my mistake as the same environment
>> variable is working for other plot.
>>
>>
>> Thanks
>> Kamal
>>
>>
>>
>>
>>
>>
>>
>>
>> Quoting Dave Allured - NOAA Affiliate <dave.allured@noaa.gov>:
>>
>>> The NCARG_ROOT environment variable is not set correctly. Please see
>>> these instructions in the FAQ:
>>> http://www.ncl.ucar.edu/FAQ/#basics_003
>>>
>>> Once you have set this correctly, the path to contributed.ncl as shown
>>> below should resolve correctly to a plain file.
>>>
>>> Here is a general hint about NCL. When you get a lot of error
>>> messages, it is usually the first one that takes you to the real
>>> problem.
>>>
>>> Also, if you have further trouble getting your installation started,
>>> please note the hint about using the ncl-install user list. Good
>>> luck, I'm going home now.
>>>
>>> --Dave
>>>
>>> On Tue, Dec 18, 2012 at 8:31 PM, <mmkamal@uwaterloo.ca> wrote:
>>>> Hi,
>>>>
>>>>
>>>> I have been trying to plot the ARW WRF precipitation variable using
>>>> the NCL script listed in the ARW Online tutorial
>>>> (http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/PRECIP/wrf_Precip.htm) but getting the following error message. I could not figure out the problem. Can anyone please help me who tried it before. I get the
>>>> following
>>>> error
>>>> message:
>>>>
>>>> ===================================================================
>>>> Copyright (C) 1995-2012 - All Rights Reserved
>>>> University Corporation for Atmospheric Research
>>>> NCAR Command Language Version 6.1.0
>>>> The use of this software is governed by a License Agreement.
>>>> See http://www.ncl.ucar.edu/ for more details.
>>>> fatal:Could not open
>>>> ($NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl)
>>>> Mfatal:error at line 1 in file
>>>> /scinet/gpc/Applications6/ncl/6.1.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>>>>
>>>> Mfatal:GetSysAppDir:Unable to get a default value for the system App
>>>> Resource directory
>>>> Mwarning:["Resources.c":734]:Unable to set appSysDir to default value
>>>> - Using NULL
>>>> Mwarning:Unable to Get System Resource File Name?
>>>> Mfatal:Undefined identifier: (wrf_user_getvar) is undefined,
>>>> can't continue
>>>> Mfatal:["Execute.c":7743]:Execute: Error occurred at or near line 42
>>>> in file wrf_Precip2.ncl
>>>>
>>>> =========================================================
>>>>
>>>> Thanks in advance
>>>> Kamal
>>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

WRF_pcp_1.png
Received on Wed Dec 19 11:24:04 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 21 2012 - 10:43:23 MST