Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

getregional_datasets.ncl error

Yonas

Yonas
New Member
Hello, I was trying to extract domain and surface data for specific region using the "getregional_datasets.pl" command as mentioned in the CLM manual but i am getting this error: "env: ‘ncl’: No such file or directory". I followed the following steps:

cd /opt/ncar/cesm2/components/clm/tools/ncl_scripts
./getregional_datasets.pl -ne 74,221 -sw 51,189 -i sample_inlist -o sample_outlist
This is the output i got:
Execute: env S_LAT=51 W_LON=189 N_LAT=74 E_LON=221 GRIDFILE=/home/user/inputdata/share/domains/domain.lnd.fv1.9x2.5_gx1v7.181205.nc NFILES=2 OUTFILELIST=outfilelist_getregional_datasets___tmp.lst INFILELIST=infilelist_getregional_datasets___tmp.lst ncl /opt/ncar/cesm2/components/clm/tools/ncl_scripts/getregional_datasets.ncl
env: ‘ncl’: No such file or directory

For the sample_inlist, i used:
fatmlndfrc = '/home/user/inputdata/share/domains/domain.lnd.fv1.9x2.5_gx1v7.181205.nc'
fsurdat = '/home/user/inputdata/lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_1.9x2.5_hist_16pfts_Irrig_CMIP6_simyr1850_c190304.nc'

For the sample_outlist, i used:
fatmlndfrc = '/home/user/inputdata/share/domains/domain.lnd.fv1.9x2.5_266.0_41.0.nc'
fsurdat= '/home/user/inputdata/lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_1.9x2.5_266.0_41.0.nc'

Looking forward for your help!!!
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
You need to have the tool NCL (NCAR Command Language) installed on your system. To see more about NCL go to


There are directions to download and install it from there. Once, you install it make sure it's available for use in the script by making sure it's in your env variable PATH.
 

Yonas

Yonas
New Member
You need to have the tool NCL (NCAR Command Language) installed on your system. To see more about NCL go to


There are directions to download and install it from there. Once, you install it make sure it's available for use in the script by making sure it's in your env variable PATH.
Hi Erik, Thank you for your answer. Actually i already have the NCL tool in my system, but i didn't property set the environment variable path for the "NCARG_ROOT" in my system. I fixed that and it's working.
Thanks!
 

Maggie Xia

Maggie Xia
New Member
Hi Erik, Thank you for your answer. Actually i already have the NCL tool in my system, but i didn't property set the environment variable path for the "NCARG_ROOT" in my system. I fixed that and it's working.
Thanks!
Hi Yonas,
I am now running into the same problem here. I am also running the script in the docker container and not sure how to set the environment variable path properly. Could you help me? Thanks in advance!
 

Yonas

Yonas
New Member
Hi Yonas,
I am now running into the same problem here. I am also running the script in the docker container and not sure how to set the environment variable path properly. Could you help me? Thanks in advance!

I solved the issue at the moment by installing NCL inside the container. I started the CESM container first, then installed Miniconda inside it, then installed NCL using the conda approach described on their website Installing NCL with "conda", and finally, I set the environmental variables NCARG ROOT (the NCL installation directory) in the .bashrc file.
 

dobbins

Brian Dobbins
CSEG and Liaisons
Staff member
I solved the issue at the moment by installing NCL inside the container. I started the CESM container first, then installed Miniconda inside it, then installed NCL using the conda approach described on their website Installing NCL with "conda", and finally, I set the environmental variables NCARG ROOT (the NCL installation directory) in the .bashrc file.

I'll add NCL to our container builds moving forward so it's easier when you update! Thanks for the catch.

- Brian
 
Top