Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

plotgrids.ncl

Dipson11

Member
Ihave plotgrids.ncl in
home/bdipson/WRF/WPS_intel/util
This ddirectory has other files too. :
vg_tsfc.exe | g1print.exe | gfs.ncl | height_ukmo.exe | Makefile| plotfmt.ncl | plotgrids.ncl | plotgrids_old.ncl | src vertical_grid_50_20m_63km.txt
calc_ecmwf_p.exe | g2print.exe| gfs_old.ncl | int2nc.exe | mod_levs.exe| plotfmt_nc.ncl| plotgrids_new.ncl| rd_intermediate.exe | vertical_grid_38_20m_G3.txt vertical_grid_70_20m_80km.txt


>>>cat plotgrids.ncl

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
;

; Check the version of NCL
version = systemfunc("ncl -V")
if(version.lt.6.1) then
print("You need NCL V6.1 to run this script. Try running util/plotgrids_old.ncl. Stopping now...")
return
end if
if(version.ge.6.2) then
print("You need NCL V6.1 to run this script. Try running util/plotgrids_new.ncl. Stopping now...")
return
end if

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

; read the following namelist file
filename = "namelist.wps"
.....................................
my namelist.wps file is in
/home/bdipson/WRF/WPS_intel


...when I use ncl plotgrids.ncl it says command not found, how can i use to view my namelist.wps file??? should i copy the namelist.wps to home/bdipson/WRF/WPS_intel/util??

what should be $NCARGS_ROOT, when I echo $NCARGS_ROOT it displays nothing,
$PATH
echo $PATH
/home/bdipson/.local/bin:/home/bdipson/bin:/home/miniconda/miniconda3/bin:/home/miniconda/miniconda3/condabin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
 
Last edited:
i fixed it by doing conda activate ncl_stable.
i get new error
(ncl_stable) [bdipson@d01 util]$ ncl plotgrids_new.ncl
Copyright (C) 1995-2019 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.6.2
The use of this software is governed by a License Agreement.
See NCAR Command Language (NCL) for more details.
GKS ERROR NUMBER -208 ISSUED FROM SUBROUTINE GOPWK :
--X driver error: DISPLAY environment variable not set
GKS ERROR NUMBER 25 ISSUED FROM SUBROUTINE GESC :
--SPECIFIED WORKSTATION IS NOT OPEN
fatal:Workstation with PID#8 is not open
fatal:Unable to open Workstation-Can't Create
fatal:Unable to access object with id:-4
fatal:pID #-4 can't be found in NhlSetValues
At line 64 of file plotgrids_var.f90 (unit = 10)
Fortran runtime error: Cannot open file 'namelist.wps': There is no such file or directory
 
Please run this script under WPS directory, where your namelist.wps is located, i.e.,
ncl util/plotgrids_new.ncl
 
Please run this script under WPS directory, where your namelist.wps is located, i.e.,
ncl util/plotgrids_new.ncl
Hey chen, the problem is im remotely connecting to the server where wrf is installed. And it is not forwarding the display "
-X driver error: DISPLAY environment variable not set
GKS ERROR NUMBER 25 ISSUED FROM SUBROUTINE"

There is a intermediate computer and a server,

Local >>>>ssh -X username @ip(intermediate) >>> ssh -X d20 (server) .

I donot get the display if i try to plot , is there any solution to it?
 
This is related to X11 window that displays your plot. It is related to environmental settings of your computer. You will have to consult your computer manager how to make it work.
 
This is related to X11 window that displays your plot. It is related to environmental settings of your computer. You will have to consult your computer manager how to make it work.
Thank you chen, The problem was with X11 forwarding, it worked now !!
 
Top