From tao.zhang at colorado.edu Mon Jun 5 16:15:07 2023 From: tao.zhang at colorado.edu (Tao Zhang) Date: Mon, 5 Jun 2023 16:15:07 -0600 Subject: [ncl-talk] Subscribing to ncl-talk does not work In-Reply-To: <96947efc-c3a9-fc24-6b6b-a9b8bdd7f487@colorado.edu> References: <65c20126-6087-b2c2-db8f-5dcbc29c7ef0@colorado.edu> <96947efc-c3a9-fc24-6b6b-a9b8bdd7f487@colorado.edu> Message-ID: Hi, ?I am asking whether the following "Subscribing to ncl-talk" still works? ?I have tried to subscribe the NCL-talk using a different email for many times, but never receive the confirmation email. ?I am asking if NCL-talk will not accept new user any more? ?Thanks ?Tao https://mailman.ucar.edu/mailman/listinfo/ncl-talk From tzhang0616 at gmail.com Tue Jun 13 12:17:53 2023 From: tzhang0616 at gmail.com (TAO ZHANG) Date: Tue, 13 Jun 2023 12:17:53 -0600 Subject: [ncl-talk] test Message-ID: Sorry to bother, Just a test. Tao -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayantkp2979 at gmail.com Thu Jun 15 08:06:54 2023 From: jayantkp2979 at gmail.com (Jayant) Date: Thu, 15 Jun 2023 11:06:54 -0300 Subject: [ncl-talk] reading files hosted online Message-ID: Hi! Is it possible to read files hosted on an ftp server or website from inside ncl script? I get following error: syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR context: 404 Not Found

Not Found

The requested URL was not found on this server.

-------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Thu Jun 15 08:37:02 2023 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Thu, 15 Jun 2023 08:37:02 -0600 Subject: [ncl-talk] reading files hosted online In-Reply-To: References: Message-ID: Jayant, yes, you can open a remote file with the addfile function, but only if the file is served by an OPeNDAP server. Your current error message specifically means "file not found", which could mean either a mistake in your filename string, or the remote host is not an OPeNDAP server. Ignore the part about a SCAN error. That is merely some internal diagnostics about the remote file error. First ensure that the remote is really an OPeNDAP server. Then check your filename string outside of NCL, with *ncdump -h "filename"* on the linux command line. Read more about remote file access in example 4 on the addfile function page, on the NCL website. On Thu, Jun 15, 2023 at 8:08?AM Jayant via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi! > Is it possible to read files hosted on an ftp server or website from > inside ncl script? > I get following error: > syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or > SCAN_ERROR > context: 2.0//EN">404 Not Found

Not > Found

The requested URL was not found on this > server.

> -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayantkp2979 at gmail.com Thu Jun 15 08:45:00 2023 From: jayantkp2979 at gmail.com (Jayant) Date: Thu, 15 Jun 2023 11:45:00 -0300 Subject: [ncl-talk] reading files hosted online In-Reply-To: References: Message-ID: Thanks Dave, I've checked and found that's not the case. The only ways appears to download locally for analysis. I wonder it would be the same with using python! On Thu, Jun 15, 2023 at 11:37?AM Dave Allured - NOAA Affiliate < dave.allured at noaa.gov> wrote: > Jayant, yes, you can open a remote file with the addfile function, but > only if the file is served by an OPeNDAP server. Your current error > message specifically means "file not found", which could mean either a > mistake in your filename string, or the remote host is not an OPeNDAP > server. Ignore the part about a SCAN error. That is merely some internal > diagnostics about the remote file error. > > First ensure that the remote is really an OPeNDAP server. Then check your > filename string outside of NCL, with *ncdump -h "filename"* on the linux > command line. Read more about remote file access in example 4 on the > addfile function page, on the NCL website. > > > On Thu, Jun 15, 2023 at 8:08?AM Jayant via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi! >> Is it possible to read files hosted on an ftp server or website from >> inside ncl script? >> I get following error: >> syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET >> or SCAN_ERROR >> context: > 2.0//EN">404 Not Found

Not >> Found

The requested URL was not found on this >> server.

>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.graffino at tim.it Tue Jun 20 11:34:52 2023 From: g.graffino at tim.it (Giorgio Graffino) Date: Tue, 20 Jun 2023 19:34:52 +0200 (CEST) Subject: [ncl-talk] Unable to read files with addfiles Message-ID: <4f6fae99.16c1.188d9dfa477.Webtop.64@tim.it> Hello NCL people, ? I'm trying to read files from the MPI-ESM1.1 large ensemble with addfiles. I'm always getting the same error, regardless of the sample size, so it shouldn't be an actual memory issue. ? mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc") mslp_file = addfiles(mslp_list,"r") ListSetType(mslp_file,"join") fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] ? I can't even use functions like getfiledimsizes or getfileatts, because I get the following error.? dsizes = getfileatts(mslp_file(0))? fatal:Argument type mismatch on argument (0) of (getfileatts) can not coerce? ? Both mslp_file and mslp_list have 10 elements as they should. ? printVarSummary(mslp_file) ? ? ? ? ? Variable: mslp_file Type: list Total items: 10 printVarSummary(mslp_list) Variable: mslp_list Type: string Total Size: 80 bytes ? ? ? ? ? ?10 values Number of Dimensions: 1 Dimensions and sizes:????[10] Coordinates:? ? I'm sure it's a file-dependent issue, because addfiles works fine on subset of files from other sources. I'm asking for suggestions about things I can try so I can understand what's going on. Here is the file dump of one of the files. ? 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 http://www.ncl.ucar.edu/ for more details. Variable: f Type: file filename:????MPI-ESM1.1_historical_lkm0110_mslp_commongrid path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc ? file global attributes: ? ? ?CDI : Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi) ? ? ?Conventions : CF-1.4 ? ? ?history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Tue Apr 18 17:40:30 2023: ncks -v slp /storage/basic/baobab/jonathan/thorsten/MPI-ESM1.1_historical_lkm0110_yearmean.nc /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean /scratch/m/m300057/historical_ensemble/lkm0110_BOT /scratch/m/m300057/historical_ensemble/MPI-ESM1.1_historical_lkm0110_yearmean.nc ? ? ?source : ECHAM6 ? ? ?institution : Max-Planck-Institute for Meteorology ? ? ?NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco) ? ? ?CDO : Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo) ? dimensions: ? ? ?time = 156 ?// unlimited ? ? ?bnds = 2 ? ? ?lon = 180 ? ? ?lat = 120 ? variables: ? ? ?float time ( time ) ? ? ? ? axis :????T ? ? ? ? bounds :????time_bnds ? ? ? ? calendar :????proleptic_gregorian ? ? ? ? standard_name :????time ? ? ? ? units :????day as %Y%m%d.%f ? ? ?double time_bnds ( time, bnds ) ? ? ?double lon ( lon ) ? ? ? ? standard_name :????longitude ? ? ? ? long_name :????longitude ? ? ? ? units :????degrees_east ? ? ? ? axis :????X ? ? ?double lat ( lat ) ? ? ? ? standard_name :????latitude ? ? ? ? long_name :????latitude ? ? ? ? units :????degrees_north ? ? ? ? axis :????Y ? ? ?float slp ( time, lat, lon ) ? ? ? ? long_name :????mean sea level pressure ? ? ? ? units :????Pa ? ? ? ? code :????151 ? ? ? ? table :????128 ? Thanks a lot. ? Giorgio -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Tue Jun 20 12:40:26 2023 From: shea at ucar.edu (Dennis Shea) Date: Tue, 20 Jun 2023 12:40:26 -0600 Subject: [ncl-talk] Unable to read files with addfiles In-Reply-To: <4f6fae99.16c1.188d9dfa477.Webtop.64@tim.it> References: <4f6fae99.16c1.188d9dfa477.Webtop.64@tim.it> Message-ID: I can not see an obvious issue. Given and the "join" option time = 156 // unlimited bnds = 2 lon = 180 lat = 120 and, say, 10 ensembles, the slp variable should be slp(ncl_join , time, lat , lon ) => slp(10,156,120,180) ================================================ What do the following 'print' statements show? mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* mslp_commongrid.nc") print(mslp_list) ; <======== mslp_file = addfiles(mslp_list,"r") print(mslp_file) ; <======== ListSetType(mslp_file,"join") On Tue, Jun 20, 2023 at 11:37?AM Giorgio Graffino via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hello NCL people, > > > > I'm trying to read files from the MPI-ESM1.1 large ensemble with addfiles. > I'm always getting the same error, regardless of the sample size, so it > shouldn't be an actual memory issue. > > > > mslp_list = systemfunc("ls > /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* > mslp_commongrid.nc") > > mslp_file = addfiles(mslp_list,"r") > > ListSetType(mslp_file,"join") > > fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 > fatal:Memory allocation failure:[errno=12] > > > > I can't even use functions like getfiledimsizes or getfileatts, because I > get the following error. > > dsizes = getfileatts(mslp_file(0)) > fatal:Argument type mismatch on argument (0) of (getfileatts) can not > coerce > > > > Both mslp_file and mslp_list have 10 elements as they should. > > > > printVarSummary(mslp_file) > > Variable: mslp_file > Type: list > Total items: 10 > > printVarSummary(mslp_list) > > Variable: mslp_list > Type: string > Total Size: 80 bytes > 10 values > Number of Dimensions: 1 > Dimensions and sizes: [10] > Coordinates: > > > I'm sure it's a file-dependent issue, because addfiles works fine on > subset of files from other sources. I'm asking for suggestions about things > I can try so I can understand what's going on. Here is the file dump of one > of the files. > > > > 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 http://www.ncl.ucar.edu/ for more details. > > Variable: f > Type: file > filename: MPI-ESM1.1_historical_lkm0110_mslp_commongrid > path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc > file global attributes: > CDI : Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi) > Conventions : CF-1.4 > history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) > /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc > /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc > Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt > /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_year.nc > /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc > Tue Apr 18 17:40:30 2023: ncks -v slp > /storage/basic/baobab/jonathan/thorsten/ > MPI-ESM1.1_historical_lkm0110_yearmean.nc > /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_year.nc > Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean > /scratch/m/m300057/historical_ensemble/lkm0110_BOT > /scratch/m/m300057/historical_ensemble/ > MPI-ESM1.1_historical_lkm0110_yearmean.nc > source : ECHAM6 > institution : Max-Planck-Institute for Meteorology > NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net, > Code = http://github.com/nco/nco) > CDO : Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo) > dimensions: > time = 156 // unlimited > bnds = 2 > lon = 180 > lat = 120 > variables: > float time ( time ) > axis : T > bounds : time_bnds > calendar : proleptic_gregorian > standard_name : time > units : day as %Y%m%d.%f > > double time_bnds ( time, bnds ) > > double lon ( lon ) > standard_name : longitude > long_name : longitude > units : degrees_east > axis : X > > double lat ( lat ) > standard_name : latitude > long_name : latitude > units : degrees_north > axis : Y > > float slp ( time, lat, lon ) > long_name : mean sea level pressure > units : Pa > code : 151 > table : 128 > > > > Thanks a lot. > > > > Giorgio > _______________________________________________ > ncl-talk mailing list > ncl-talk at mailman.ucar.edu > List instructions, subscriber options, unsubscribe: > https://mailman.ucar.edu/mailman/listinfo/ncl-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.graffino at tim.it Wed Jun 21 11:42:20 2023 From: g.graffino at tim.it (Giorgio Graffino) Date: Wed, 21 Jun 2023 19:42:20 +0200 (CEST) Subject: [ncl-talk] Unable to read files with addfiles In-Reply-To: <4f6fae99.16c1.188d9dfa477.Webtop.64@tim.it> References: <4f6fae99.16c1.188d9dfa477.Webtop.64@tim.it> Message-ID: <3734696e.25b7.188df0cd5da.Webtop.50@tim.it> Hi Dennis, ? Thanks for your reply. I just realized that I skipped one line in the list of commands, which is the one actually triggering the error. Please see the list of commands below, plus the one you asked me to run. ? dir = "/home/users/ggraffin/CMIP5/" ? mslp_list = systemfunc("ls "+dir+"historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc") ? print(mslp_list) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Variable: mslp_list Type: string Total Size: 80 bytes ? ? ? ? ? ?10 values Number of Dimensions: 1 Dimensions and sizes:????[10] Coordinates:? (0)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc (1)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc (2)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc (3)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc (4)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc (5)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc (6)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc (7)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc (8)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc (9)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc ? mslp_file = addfiles(mslp_list,"r") ? print(mslp_file) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Variable: mslp_file Type: list Total Size: 4 bytes ? ? ? ? ? ?1 values Number of Dimensions: 1 Dimensions and sizes:????[1] Coordinates:? Type: list Total items: 10 List Item 0:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 1:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 2:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 3:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 4:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 5:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 6:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 7:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 8:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 9:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 ListSetType(mslp_file,"join") mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) ? fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 ? Cheers, Giorgio ? ------ Messaggio Originale ------ Da: shea at ucar.edu A: g.graffino at tim.it Cc: ncl-talk at ucar.edu Inviato: marted? 20 giugno 2023 19:40 Oggetto: Re: [ncl-talk] Unable to read files with addfiles ? I can not see an obvious issue. ? Given and the "join" option? ? ? ???? time = 156 ?// unlimited ? ? ?bnds = 2 ? ? ?lon = 180 ? ? ?lat = 120 ? and, say, 10 ensembles, the slp variable should be ? ?? slp(ncl_join , time, lat , lon )? ?? => slp(10,156,120,180)? ? ================================================ ? What do the following 'print' statements show? ? ? mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc ") print(mslp_list)??? ; <========??? ? mslp_file = addfiles(mslp_list,"r") print(mslp_file)??? ; <======== ListSetType(mslp_file,"join") ? ? On Tue, Jun 20, 2023 at 11:37?AM Giorgio Graffino via ncl-talk > wrote: ? Hello NCL people, ? I'm trying to read files from the MPI-ESM1.1 large ensemble with addfiles. I'm always getting the same error, regardless of the sample size, so it shouldn't be an actual memory issue. ? mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc ") mslp_file = addfiles(mslp_list,"r") ListSetType(mslp_file,"join") fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] ? I can't even use functions like getfiledimsizes or getfileatts, because I get the following error.? dsizes = getfileatts(mslp_file(0))? fatal:Argument type mismatch on argument (0) of (getfileatts) can not coerce? ? Both mslp_file and mslp_list have 10 elements as they should. ? printVarSummary(mslp_file) ? ? ? ? ? Variable: mslp_file Type: list Total items: 10 printVarSummary(mslp_list) Variable: mslp_list Type: string Total Size: 80 bytes ? ? ? ? ? ?10 values Number of Dimensions: 1 Dimensions and sizes:????[10] Coordinates:? ? I'm sure it's a file-dependent issue, because addfiles works fine on subset of files from other sources. I'm asking for suggestions about things I can try so I can understand what's going on. Here is the file dump of one of the files. ? 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 http://www.ncl.ucar.edu/ for more details. Variable: f Type: file filename:????MPI-ESM1.1_historical_lkm0110_mslp_commongrid path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc ? file global attributes: ? ? ?CDI : Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi ) ? ? ?Conventions : CF-1.4 ? ? ?history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Tue Apr 18 17:40:30 2023: ncks -v slp /storage/basic/baobab/jonathan/thorsten/MPI-ESM1.1_historical_lkm0110_yearmean.nc /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean /scratch/m/m300057/historical_ensemble/lkm0110_BOT /scratch/m/m300057/historical_ensemble/MPI-ESM1.1_historical_lkm0110_yearmean.nc ? ? ?source : ECHAM6 ? ? ?institution : Max-Planck-Institute for Meteorology ? ? ?NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net , Code = http://github.com/nco/nco ) ? ? ?CDO : Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo ) ? dimensions: ? ? ?time = 156 ?// unlimited ? ? ?bnds = 2 ? ? ?lon = 180 ? ? ?lat = 120 ? variables: ? ? ?float time ( time ) ? ? ? ? axis :????T ? ? ? ? bounds :????time_bnds ? ? ? ? calendar :????proleptic_gregorian ? ? ? ? standard_name :????time ? ? ? ? units :????day as %Y%m%d.%f ? ? ?double time_bnds ( time, bnds ) ? ? ?double lon ( lon ) ? ? ? ? standard_name :????longitude ? ? ? ? long_name :????longitude ? ? ? ? units :????degrees_east ? ? ? ? axis :????X ? ? ?double lat ( lat ) ? ? ? ? standard_name :????latitude ? ? ? ? long_name :????latitude ? ? ? ? units :????degrees_north ? ? ? ? axis :????Y ? ? ?float slp ( time, lat, lon ) ? ? ? ? long_name :????mean sea level pressure ? ? ? ? units :????Pa ? ? ? ? code :????151 ? ? ? ? table :????128 ? Thanks a lot. ? Giorgio _______________________________________________ ncl-talk mailing list ncl-talk at mailman.ucar.edu List instructions, subscriber options, unsubscribe: https://mailman.ucar.edu/mailman/listinfo/ncl-talk ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Wed Jun 21 20:12:49 2023 From: shea at ucar.edu (Dennis Shea) Date: Wed, 21 Jun 2023 20:12:49 -0600 Subject: [ncl-talk] Unable to read files with addfiles In-Reply-To: <3734696e.25b7.188df0cd5da.Webtop.50@tim.it> References: <4f6fae99.16c1.188d9dfa477.Webtop.64@tim.it> <3734696e.25b7.188df0cd5da.Webtop.50@tim.it> Message-ID: mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 ------------------------------ Ummmm .... subscript #0 is the leftmost subscript The ":" means all of the leftmost indices. It should not be "out of range" Sorry but more information is needed. SLP = mslp_file[:]->slp printVarSummary(SLP) ; I assume 4 subscripts; SLP(ncl_join , time, lat , lon ) slp = SLP(:,:,{-10:10},{135:270}) printVarSummary(slp) ==== MSLP= mslp_file[:]->slp(:, :,{-10:10},{135:270}) mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) On Wed, Jun 21, 2023 at 11:42?AM Giorgio Graffino wrote: > Hi Dennis, > > > > Thanks for your reply. I just realized that I skipped one line in the list > of commands, which is the one actually triggering the error. Please see the > list of commands below, plus the one you asked me to run. > > > > dir = "/home/users/ggraffin/CMIP5/" > > > mslp_list = systemfunc("ls > "+dir+"historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* > mslp_commongrid.nc") > > > print(mslp_list) > > > > Variable: mslp_list > Type: string > Total Size: 80 bytes > 10 values > Number of Dimensions: 1 > Dimensions and sizes: [10] > Coordinates: > (0) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc > (1) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc > (2) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc > (3) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc > (4) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc > (5) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc > (6) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc > (7) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc > (8) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc > (9) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc > > > mslp_file = addfiles(mslp_list,"r") > > > print(mslp_file) > > > > Variable: mslp_file > Type: list > Total Size: 4 bytes > 1 values > Number of Dimensions: 1 > Dimensions and sizes: [1] > Coordinates: > Type: list > Total items: 10 > > List Item 0: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 1: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 2: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 3: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 4: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 5: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 6: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 7: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 8: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > List Item 9: NclFileVarClass > Variable: unnamed > Type: file > File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ > MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc > Number of global attributes: 7 > Number of dimensions: 4 > Number of variables: 5 > > > ListSetType(mslp_file,"join") > > > mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) > > > fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 > fatal:Memory allocation failure:[errno=12] > fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 > > > > Cheers, > > Giorgio > > > ------ Messaggio Originale ------ > Da: shea at ucar.edu > A: g.graffino at tim.it Cc: ncl-talk at ucar.edu > Inviato: marted? 20 giugno 2023 19:40 > Oggetto: Re: [ncl-talk] Unable to read files with addfiles > > I can not see an obvious issue. > > Given and the "join" option > > > time = 156 // unlimited > bnds = 2 > lon = 180 > lat = 120 > > > and, say, 10 ensembles, the slp variable should be > > > slp(ncl_join , time, lat , lon ) => slp(10,156,120,180) > > ================================================ > > What do the following 'print' statements show? > > > mslp_list = systemfunc("ls > /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* > mslp_commongrid.nc") > > print(mslp_list) ; <======== > > > mslp_file = addfiles(mslp_list,"r") > > print(mslp_file) ; <======== > > ListSetType(mslp_file,"join") > > > > > On Tue, Jun 20, 2023 at 11:37?AM Giorgio Graffino via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > > >> Hello NCL people, >> >> >> >> I'm trying to read files from the MPI-ESM1.1 large ensemble with >> addfiles. I'm always getting the same error, regardless of the sample size, >> so it shouldn't be an actual memory issue. >> >> >> >> mslp_list = systemfunc("ls >> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* >> mslp_commongrid.nc") >> >> mslp_file = addfiles(mslp_list,"r") >> >> ListSetType(mslp_file,"join") >> >> fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 >> fatal:Memory allocation failure:[errno=12] >> >> >> >> I can't even use functions like getfiledimsizes or getfileatts, because I >> get the following error. >> >> dsizes = getfileatts(mslp_file(0)) >> fatal:Argument type mismatch on argument (0) of (getfileatts) can not >> coerce >> >> >> >> Both mslp_file and mslp_list have 10 elements as they should. >> >> >> >> printVarSummary(mslp_file) >> >> Variable: mslp_file >> Type: list >> Total items: 10 >> >> printVarSummary(mslp_list) >> >> Variable: mslp_list >> Type: string >> Total Size: 80 bytes >> 10 values >> Number of Dimensions: 1 >> Dimensions and sizes: [10] >> Coordinates: >> >> >> I'm sure it's a file-dependent issue, because addfiles works fine on >> subset of files from other sources. I'm asking for suggestions about things >> I can try so I can understand what's going on. Here is the file dump of one >> of the files. >> >> >> >> 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 http://www.ncl.ucar.edu/ for more details. >> >> Variable: f >> Type: file >> filename: MPI-ESM1.1_historical_lkm0110_mslp_commongrid >> path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >> file global attributes: >> CDI : Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi >> ) >> Conventions : CF-1.4 >> history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) >> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >> Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt >> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_year.nc >> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >> Tue Apr 18 17:40:30 2023: ncks -v slp >> /storage/basic/baobab/jonathan/thorsten/ >> MPI-ESM1.1_historical_lkm0110_yearmean.nc >> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_year.nc >> Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean >> /scratch/m/m300057/historical_ensemble/lkm0110_BOT >> /scratch/m/m300057/historical_ensemble/ >> MPI-ESM1.1_historical_lkm0110_yearmean.nc >> source : ECHAM6 >> institution : Max-Planck-Institute for Meteorology >> NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net, >> Code = http://github.com/nco/nco) >> CDO : Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo >> ) >> dimensions: >> time = 156 // unlimited >> bnds = 2 >> lon = 180 >> lat = 120 >> variables: >> float time ( time ) >> axis : T >> bounds : time_bnds >> calendar : proleptic_gregorian >> standard_name : time >> units : day as %Y%m%d.%f >> >> double time_bnds ( time, bnds ) >> >> double lon ( lon ) >> standard_name : longitude >> long_name : longitude >> units : degrees_east >> axis : X >> >> double lat ( lat ) >> standard_name : latitude >> long_name : latitude >> units : degrees_north >> axis : Y >> >> float slp ( time, lat, lon ) >> long_name : mean sea level pressure >> units : Pa >> code : 151 >> table : 128 >> >> >> >> Thanks a lot. >> >> >> >> Giorgio >> >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.graffino at tim.it Thu Jun 22 04:10:00 2023 From: g.graffino at tim.it (Giorgio Graffino) Date: Thu, 22 Jun 2023 12:10:00 +0200 (CEST) Subject: [ncl-talk] Unable to read files with addfiles In-Reply-To: <3734696e.25b7.188df0cd5da.Webtop.50@tim.it> References: <3734696e.25b7.188df0cd5da.Webtop.50@tim.it> Message-ID: <1a9b6c9a.4831.188e2951230.Webtop.64@tim.it> Sorry Dennis, ? I forgot your golden rule: always look at your data! I was trying to open a 156 annual-mean time steps file believing it was a 1752 monthly-mean time steps file. That's why the subscript was out of range. The command slp ?= SLP(:,:,{-10:10},{135:270}) works perfectly. ? Thanks for your help, Giorgio ? ------ Messaggio Originale ------ Da: shea at ucar.edu A: g.graffino at tim.it Cc: ncl-talk at ucar.edu Inviato: gioved? 22 giugno 2023 03:12 Oggetto: Re: [ncl-talk] Unable to read files with addfiles ? mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) ? fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 ?------------------------------ Ummmm ....? subscript #0 is the leftmost subscript The ":" means all of the leftmost indices.? It should not be "out of range" Sorry but more information is needed. SLP = mslp_file[:]->slp printVarSummary(SLP)?? ;?? I assume 4 subscripts; SLP(ncl_join , time, lat , lon ) slp? = SLP(:,:,{-10:10},{135:270}) printVarSummary(slp)? ? ==== ? ? MSLP= mslp_file[:]->slp(:, :,{-10:10},{135:270}) ? mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) ? ? ? On Wed, Jun 21, 2023 at 11:42?AM Giorgio Graffino > wrote: ? Hi Dennis, ? Thanks for your reply. I just realized that I skipped one line in the list of commands, which is the one actually triggering the error. Please see the list of commands below, plus the one you asked me to run. ? dir = "/home/users/ggraffin/CMIP5/" ? mslp_list = systemfunc("ls "+dir+"historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc ") ? print(mslp_list) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Variable: mslp_list Type: string Total Size: 80 bytes ? ? ? ? ? ?10 values Number of Dimensions: 1 Dimensions and sizes:????[10] Coordinates:? (0)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc (1)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc (2)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc (3)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc (4)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc (5)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc (6)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc (7)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc (8)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc (9)????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc ? mslp_file = addfiles(mslp_list,"r") ? print(mslp_file) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Variable: mslp_file Type: list Total Size: 4 bytes ? ? ? ? ? ?1 values Number of Dimensions: 1 Dimensions and sizes:????[1] Coordinates:? Type: list Total items: 10 List Item 0:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 1:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 2:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 3:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 4:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 5:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 6:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 7:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 8:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 List Item 9:????NclFileVarClass Variable: unnamed Type: file File path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc Number of global attributes:???? 7 Number of dimensions:???? 4 Number of variables:???? 5 ListSetType(mslp_file,"join") mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) ? fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 ? Cheers, Giorgio ? ------ Messaggio Originale ------ Da: shea at ucar.edu A: g.graffino at tim.it Cc: ncl-talk at ucar.edu Inviato: marted? 20 giugno 2023 19:40 Oggetto: Re: [ncl-talk] Unable to read files with addfiles ? I can not see an obvious issue. ? Given and the "join" option? ? ? ???? time = 156 ?// unlimited ? ? ?bnds = 2 ? ? ?lon = 180 ? ? ?lat = 120 ? and, say, 10 ensembles, the slp variable should be ? ?? slp(ncl_join , time, lat , lon )? ?? => slp(10,156,120,180)? ? ================================================ ? What do the following 'print' statements show? ? ? mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc ") print(mslp_list)??? ; <========??? ? mslp_file = addfiles(mslp_list,"r") print(mslp_file)??? ; <======== ListSetType(mslp_file,"join") ? ? On Tue, Jun 20, 2023 at 11:37?AM Giorgio Graffino via ncl-talk > wrote: ? Hello NCL people, ? I'm trying to read files from the MPI-ESM1.1 large ensemble with addfiles. I'm always getting the same error, regardless of the sample size, so it shouldn't be an actual memory issue. ? mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc ") mslp_file = addfiles(mslp_list,"r") ListSetType(mslp_file,"join") fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 fatal:Memory allocation failure:[errno=12] ? I can't even use functions like getfiledimsizes or getfileatts, because I get the following error.? dsizes = getfileatts(mslp_file(0))? fatal:Argument type mismatch on argument (0) of (getfileatts) can not coerce? ? Both mslp_file and mslp_list have 10 elements as they should. ? printVarSummary(mslp_file) ? ? ? ? ? Variable: mslp_file Type: list Total items: 10 printVarSummary(mslp_list) Variable: mslp_list Type: string Total Size: 80 bytes ? ? ? ? ? ?10 values Number of Dimensions: 1 Dimensions and sizes:????[10] Coordinates:? ? I'm sure it's a file-dependent issue, because addfiles works fine on subset of files from other sources. I'm asking for suggestions about things I can try so I can understand what's going on. Here is the file dump of one of the files. ? 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 http://www.ncl.ucar.edu/ for more details. Variable: f Type: file filename:????MPI-ESM1.1_historical_lkm0110_mslp_commongrid path:????/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc ? file global attributes: ? ? ?CDI : Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi ) ? ? ?Conventions : CF-1.4 ? ? ?history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc Tue Apr 18 17:40:30 2023: ncks -v slp /storage/basic/baobab/jonathan/thorsten/MPI-ESM1.1_historical_lkm0110_yearmean.nc /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean /scratch/m/m300057/historical_ensemble/lkm0110_BOT /scratch/m/m300057/historical_ensemble/MPI-ESM1.1_historical_lkm0110_yearmean.nc ? ? ?source : ECHAM6 ? ? ?institution : Max-Planck-Institute for Meteorology ? ? ?NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net , Code = http://github.com/nco/nco ) ? ? ?CDO : Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo ) ? dimensions: ? ? ?time = 156 ?// unlimited ? ? ?bnds = 2 ? ? ?lon = 180 ? ? ?lat = 120 ? variables: ? ? ?float time ( time ) ? ? ? ? axis :????T ? ? ? ? bounds :????time_bnds ? ? ? ? calendar :????proleptic_gregorian ? ? ? ? standard_name :????time ? ? ? ? units :????day as %Y%m%d.%f ? ? ?double time_bnds ( time, bnds ) ? ? ?double lon ( lon ) ? ? ? ? standard_name :????longitude ? ? ? ? long_name :????longitude ? ? ? ? units :????degrees_east ? ? ? ? axis :????X ? ? ?double lat ( lat ) ? ? ? ? standard_name :????latitude ? ? ? ? long_name :????latitude ? ? ? ? units :????degrees_north ? ? ? ? axis :????Y ? ? ?float slp ( time, lat, lon ) ? ? ? ? long_name :????mean sea level pressure ? ? ? ? units :????Pa ? ? ? ? code :????151 ? ? ? ? table :????128 ? Thanks a lot. ? Giorgio _______________________________________________ ncl-talk mailing list ncl-talk at mailman.ucar.edu List instructions, subscriber options, unsubscribe: https://mailman.ucar.edu/mailman/listinfo/ncl-talk ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Thu Jun 22 10:19:19 2023 From: shea at ucar.edu (Dennis Shea) Date: Thu, 22 Jun 2023 10:19:19 -0600 Subject: [ncl-talk] Unable to read files with addfiles In-Reply-To: <1a9b6c9a.4831.188e2951230.Webtop.64@tim.it> References: <3734696e.25b7.188df0cd5da.Webtop.50@tim.it> <1a9b6c9a.4831.188e2951230.Webtop.64@tim.it> Message-ID: Glad you found the issue. Buona Fortuna On Thu, Jun 22, 2023 at 4:10?AM Giorgio Graffino wrote: > Sorry Dennis, > > > > I forgot your golden rule: always look at your data! I was trying to open > a 156 annual-mean time steps file believing it was a 1752 monthly-mean time > steps file. That's why the subscript was out of range. The command slp = > SLP(:,:,{-10:10},{135:270}) works perfectly. > > > > Thanks for your help, > > Giorgio > > > > ------ Messaggio Originale ------ > Da: shea at ucar.edu > A: g.graffino at tim.it Cc: ncl-talk at ucar.edu > Inviato: gioved? 22 giugno 2023 03:12 > Oggetto: Re: [ncl-talk] Unable to read files with addfiles > > > mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) > > > fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 > fatal:Memory allocation failure:[errno=12] > fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 > > ------------------------------ > > Ummmm .... subscript #0 is the leftmost subscript > > The ":" means all of the leftmost indices. It should not be "out of range" > > Sorry but more information is needed. > > SLP = mslp_file[:]->slp > > printVarSummary(SLP) ; I assume 4 subscripts; SLP(ncl_join , time, > lat , lon ) > > slp = SLP(:,:,{-10:10},{135:270}) > > printVarSummary(slp) > > > ==== > > > > > > > > MSLP= mslp_file[:]->slp(:, :,{-10:10},{135:270}) > > > > > mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) > > > > > > > > > > On Wed, Jun 21, 2023 at 11:42?AM Giorgio Graffino > wrote: > > >> Hi Dennis, >> >> >> >> Thanks for your reply. I just realized that I skipped one line in the >> list of commands, which is the one actually triggering the error. Please >> see the list of commands below, plus the one you asked me to run. >> >> >> >> dir = "/home/users/ggraffin/CMIP5/" >> >> >> mslp_list = systemfunc("ls >> "+dir+"historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* >> mslp_commongrid.nc") >> >> >> print(mslp_list) >> >> >> >> Variable: mslp_list >> Type: string >> Total Size: 80 bytes >> 10 values >> Number of Dimensions: 1 >> Dimensions and sizes: [10] >> Coordinates: >> (0) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >> (1) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc >> (2) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc >> (3) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc >> (4) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc >> (5) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc >> (6) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc >> (7) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc >> (8) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc >> (9) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc >> >> >> mslp_file = addfiles(mslp_list,"r") >> >> >> print(mslp_file) >> >> >> >> Variable: mslp_file >> Type: list >> Total Size: 4 bytes >> 1 values >> Number of Dimensions: 1 >> Dimensions and sizes: [1] >> Coordinates: >> Type: list >> Total items: 10 >> >> List Item 0: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 1: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0111_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 2: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0112_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 3: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0113_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 4: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0114_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 5: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0115_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 6: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0116_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 7: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0117_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 8: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0118_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> List Item 9: NclFileVarClass >> Variable: unnamed >> Type: file >> File path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >> MPI-ESM1.1_historical_lkm0119_mslp_commongrid.nc >> Number of global attributes: 7 >> Number of dimensions: 4 >> Number of variables: 5 >> >> >> ListSetType(mslp_file,"join") >> >> >> mslp = mslp_file[:]->slp(:,20*12:155*12+12-1,{-10:10},{135:270}) >> >> >> fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 >> fatal:Memory allocation failure:[errno=12] >> fatal:["Execute.c":8635]:Execute: Error occurred at or near line 36 >> >> >> >> Cheers, >> >> Giorgio >> >> >> ------ Messaggio Originale ------ >> Da: shea at ucar.edu >> A: g.graffino at tim.it Cc: ncl-talk at ucar.edu >> Inviato: marted? 20 giugno 2023 19:40 >> Oggetto: Re: [ncl-talk] Unable to read files with addfiles >> >> I can not see an obvious issue. >> >> Given and the "join" option >> >> >> time = 156 // unlimited >> bnds = 2 >> lon = 180 >> lat = 120 >> >> >> and, say, 10 ensembles, the slp variable should be >> >> >> slp(ncl_join , time, lat , lon ) => slp(10,156,120,180) >> >> ================================================ >> >> What do the following 'print' statements show? >> >> >> mslp_list = systemfunc("ls >> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* >> mslp_commongrid.nc") >> >> print(mslp_list) ; <======== >> >> >> mslp_file = addfiles(mslp_list,"r") >> >> print(mslp_file) ; <======== >> >> ListSetType(mslp_file,"join") >> >> >> >> >> On Tue, Jun 20, 2023 at 11:37?AM Giorgio Graffino via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >> >>> Hello NCL people, >>> >>> >>> >>> I'm trying to read files from the MPI-ESM1.1 large ensemble with >>> addfiles. I'm always getting the same error, regardless of the sample size, >>> so it shouldn't be an actual memory issue. >>> >>> >>> >>> mslp_list = systemfunc("ls >>> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011* >>> mslp_commongrid.nc") >>> >>> mslp_file = addfiles(mslp_list,"r") >>> >>> ListSetType(mslp_file,"join") >>> >>> fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0 >>> fatal:Memory allocation failure:[errno=12] >>> >>> >>> >>> I can't even use functions like getfiledimsizes or getfileatts, because >>> I get the following error. >>> >>> dsizes = getfileatts(mslp_file(0)) >>> fatal:Argument type mismatch on argument (0) of (getfileatts) can not >>> coerce >>> >>> >>> >>> Both mslp_file and mslp_list have 10 elements as they should. >>> >>> >>> >>> printVarSummary(mslp_file) >>> >>> Variable: mslp_file >>> Type: list >>> Total items: 10 >>> >>> printVarSummary(mslp_list) >>> >>> Variable: mslp_list >>> Type: string >>> Total Size: 80 bytes >>> 10 values >>> Number of Dimensions: 1 >>> Dimensions and sizes: [10] >>> Coordinates: >>> >>> >>> I'm sure it's a file-dependent issue, because addfiles works fine on >>> subset of files from other sources. I'm asking for suggestions about things >>> I can try so I can understand what's going on. Here is the file dump of one >>> of the files. >>> >>> >>> >>> 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 http://www.ncl.ucar.edu/ for more details. >>> >>> Variable: f >>> Type: file >>> filename: MPI-ESM1.1_historical_lkm0110_mslp_commongrid >>> path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >>> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >>> file global attributes: >>> CDI : Climate Data Interface version 1.9.5 ( >>> http://mpimet.mpg.de/cdi) >>> Conventions : CF-1.4 >>> history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) >>> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >>> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >>> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/ >>> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >>> Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt >>> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ >>> MPI-ESM1.1_historical_lkm0110_mslp_year.nc >>> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ >>> MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc >>> Tue Apr 18 17:40:30 2023: ncks -v slp >>> /storage/basic/baobab/jonathan/thorsten/ >>> MPI-ESM1.1_historical_lkm0110_yearmean.nc >>> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/ >>> MPI-ESM1.1_historical_lkm0110_mslp_year.nc >>> Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean >>> /scratch/m/m300057/historical_ensemble/lkm0110_BOT >>> /scratch/m/m300057/historical_ensemble/ >>> MPI-ESM1.1_historical_lkm0110_yearmean.nc >>> source : ECHAM6 >>> institution : Max-Planck-Institute for Meteorology >>> NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net, >>> Code = http://github.com/nco/nco) >>> CDO : Climate Data Operators version 1.9.5 ( >>> http://mpimet.mpg.de/cdo) >>> dimensions: >>> time = 156 // unlimited >>> bnds = 2 >>> lon = 180 >>> lat = 120 >>> variables: >>> float time ( time ) >>> axis : T >>> bounds : time_bnds >>> calendar : proleptic_gregorian >>> standard_name : time >>> units : day as %Y%m%d.%f >>> >>> double time_bnds ( time, bnds ) >>> >>> double lon ( lon ) >>> standard_name : longitude >>> long_name : longitude >>> units : degrees_east >>> axis : X >>> >>> double lat ( lat ) >>> standard_name : latitude >>> long_name : latitude >>> units : degrees_north >>> axis : Y >>> >>> float slp ( time, lat, lon ) >>> long_name : mean sea level pressure >>> units : Pa >>> code : 151 >>> table : 128 >>> >>> >>> >>> Thanks a lot. >>> >>> >>> >>> Giorgio >>> >>> _______________________________________________ >>> ncl-talk mailing list >>> ncl-talk at mailman.ucar.edu >>> List instructions, subscriber options, unsubscribe: >>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From hding101 at googlemail.com Thu Jun 22 15:54:34 2023 From: hding101 at googlemail.com (Hui Ding) Date: Thu, 22 Jun 2023 15:54:34 -0600 Subject: [ncl-talk] Calculating significance of forecast skill (ACC) after considering effective degree of freedom Message-ID: Dear Madam/Sir, Are there any scripts or functions for calculating hindcast skill, measured by anomaly correlation? I need to consider effective degrees of freedom because SST hindcasts are initialized from each month over the years 1950-2020. Thank you very much! Best regards, Hui Ding -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Thu Jun 22 19:10:43 2023 From: shea at ucar.edu (Dennis Shea) Date: Thu, 22 Jun 2023 19:10:43 -0600 Subject: [ncl-talk] Calculating significance of forecast skill (ACC) after considering effective degree of freedom In-Reply-To: References: Message-ID: Sorry, NCL does not have functions for "calculating hindcast skill!" On Thu, Jun 22, 2023 at 3:54?PM Hui Ding via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear Madam/Sir, > > Are there any scripts or functions for calculating hindcast skill, > measured by anomaly correlation? I need to consider effective degrees of > freedom because SST hindcasts are initialized from each month over the > years 1950-2020. > > Thank you very much! > Best regards, > Hui Ding > > > > _______________________________________________ > ncl-talk mailing list > ncl-talk at mailman.ucar.edu > List instructions, subscriber options, unsubscribe: > https://mailman.ucar.edu/mailman/listinfo/ncl-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From debasish.hazra5 at gmail.com Thu Jun 29 12:00:57 2023 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Thu, 29 Jun 2023 14:00:57 -0400 Subject: [ncl-talk] getting latitude writing on axis wrong Message-ID: Hi, I am trying to plot grib2 file with Lambert projection and getting wrong latitude markers (0-25 N) on the y-axis. Attached is figure and code and also highlighting attributes from the file. file global attributes: dimensions: ygrid_0 = 3268 xgrid_0 = 5200 float gridrot_0 ( ygrid_0, xgrid_0 ) long_name : vector rotation angle GridType : Polar Sterographic Projection (North or South) units : radians formula_u : Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid formula_v : Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid note1 : u and v components of vector quantities are resolved relative to grid note2 : apply formulas to derive u and v components relative to earth float gridlat_0 ( ygrid_0, xgrid_0 ) corners : ( -4, -5.706548, 18.53903, 22.48842 ) long_name : latitude grid_type : Polar Sterographic Projection (North or South) units : degrees_north Dy : 3.17 Dx : 3.17 Lov : 245 Lo1 : 206.5 La1 : -4 float gridlon_0 ( ygrid_0, xgrid_0 ) corners : ( -153.5, -74.4254, -22.46207, 152.2681 ) long_name : longitude grid_type : Polar Sterographic Projection (North or South) units : degrees_east Dy : 3.17 Dx : 3.17 Lov : 245 Lo1 : 206.5 La1 : -4 Any help on this is appreciated. Thanks Deba -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Test_Lambertfigure.png Type: image/png Size: 112507 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Test_NADomainplot.ncl Type: application/octet-stream Size: 4611 bytes Desc: not available URL: From brownrig at ucar.edu Thu Jun 29 12:13:10 2023 From: brownrig at ucar.edu (Rick Brownrigg) Date: Thu, 29 Jun 2023 12:13:10 -0600 Subject: [ncl-talk] getting latitude writing on axis wrong In-Reply-To: References: Message-ID: Hi Debasish, I'm a little confused by this line: res at tfDoNDCOverlay = True Should that be False? If that doesn't help, if you can send me the dataset, I'll try to figure out what is going on. Rick On Thu, Jun 29, 2023 at 12:01?PM Debasish Hazra via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi, > I am trying to plot grib2 file with Lambert projection and getting wrong > latitude markers (0-25 N) on the y-axis. Attached is figure and code and > also highlighting attributes from the file. > > file global attributes: > dimensions: > ygrid_0 = 3268 > xgrid_0 = 5200 > > float gridrot_0 ( ygrid_0, xgrid_0 ) > long_name : vector rotation angle > GridType : Polar Sterographic Projection (North or South) > units : radians > formula_u : Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid > formula_v : Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid > note1 : u and v components of vector quantities are > resolved relative to grid > note2 : apply formulas to derive u and v components > relative to earth > > float gridlat_0 ( ygrid_0, xgrid_0 ) > corners : ( -4, -5.706548, 18.53903, 22.48842 ) > long_name : latitude > grid_type : Polar Sterographic Projection (North or South) > units : degrees_north > Dy : 3.17 > Dx : 3.17 > Lov : 245 > Lo1 : 206.5 > La1 : -4 > > float gridlon_0 ( ygrid_0, xgrid_0 ) > corners : ( -153.5, -74.4254, -22.46207, 152.2681 ) > long_name : longitude > grid_type : Polar Sterographic Projection (North or South) > units : degrees_east > Dy : 3.17 > Dx : 3.17 > Lov : 245 > Lo1 : 206.5 > La1 : -4 > > Any help on this is appreciated. > Thanks > Deba > _______________________________________________ > ncl-talk mailing list > ncl-talk at mailman.ucar.edu > List instructions, subscriber options, unsubscribe: > https://mailman.ucar.edu/mailman/listinfo/ncl-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From debasish.hazra5 at gmail.com Thu Jun 29 12:27:26 2023 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Thu, 29 Jun 2023 14:27:26 -0400 Subject: [ncl-talk] getting latitude writing on axis wrong In-Reply-To: References: Message-ID: Hi Rick, Thanks for your reply. When I turned res at tfDoNDCOverlay = False got the following error check_for_y_lat_coord: Warning: Data either does not contain (0) a valid latitude coordinate array or doesn't contain one at all. (0) A valid latitude coordinate array should have a 'units' (0) attribute equal to one of the following values: (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north' (0) check_for_lon_coord: Warning: Data either does not contain (0) a valid longitude coordinate array or doesn't contain one at all. (0) A valid longitude coordinate array should have a 'units' (0) attribute equal to one of the following values: (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east' warning:ContourPlotDraw: out of range coordinates encountered; standard AreaFill rendering method may be unreliable; consider setting the resource trGridType to "TriangularMesh" if coordinates contain missing values Debasish On Thu, Jun 29, 2023 at 2:13?PM Rick Brownrigg wrote: > Hi Debasish, > > I'm a little confused by this line: > > res at tfDoNDCOverlay = True > > Should that be False? If that doesn't help, if you can send me the > dataset, I'll try to figure out what is going on. > > Rick > > > On Thu, Jun 29, 2023 at 12:01?PM Debasish Hazra via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi, >> I am trying to plot grib2 file with Lambert projection and getting wrong >> latitude markers (0-25 N) on the y-axis. Attached is figure and code and >> also highlighting attributes from the file. >> >> file global attributes: >> dimensions: >> ygrid_0 = 3268 >> xgrid_0 = 5200 >> >> float gridrot_0 ( ygrid_0, xgrid_0 ) >> long_name : vector rotation angle >> GridType : Polar Sterographic Projection (North or South) >> units : radians >> formula_u : Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid >> formula_v : Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid >> note1 : u and v components of vector quantities are >> resolved relative to grid >> note2 : apply formulas to derive u and v components >> relative to earth >> >> float gridlat_0 ( ygrid_0, xgrid_0 ) >> corners : ( -4, -5.706548, 18.53903, 22.48842 ) >> long_name : latitude >> grid_type : Polar Sterographic Projection (North or South) >> units : degrees_north >> Dy : 3.17 >> Dx : 3.17 >> Lov : 245 >> Lo1 : 206.5 >> La1 : -4 >> >> float gridlon_0 ( ygrid_0, xgrid_0 ) >> corners : ( -153.5, -74.4254, -22.46207, 152.2681 ) >> long_name : longitude >> grid_type : Polar Sterographic Projection (North or South) >> units : degrees_east >> Dy : 3.17 >> Dx : 3.17 >> Lov : 245 >> Lo1 : 206.5 >> La1 : -4 >> >> Any help on this is appreciated. >> Thanks >> Deba >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From laura at ucar.edu Thu Jun 29 14:49:40 2023 From: laura at ucar.edu (Laura Fowler) Date: Thu, 29 Jun 2023 14:49:40 -0600 Subject: [ncl-talk] issue with gsn_csm_xy Message-ID: Hello: I am totally baffled about the error message I get when using the function gsn_csm_xy (see error below). fatal:Argument type mismatch on argument (3) of (gsn_csm_xy) can not coerce fatal:["Execute.c":8637]:Execute: Error occurred at or near line 263 in file var3_profile.ncl Here are the few lines that are causing me trouble: hres = True qco_area_avg!0 = "nFixed" qco_area_avg&nFixed = zFixed printVarSummary(qco_area_avg) wks = gsn_open_wks("png","test_mpas") plot = gsn_csm_xy(wks,qco_area_avg&nFixed,qco_area_avg,hres) The output from these few lines are: Variable: qco_area_avg Type: float Total Size: 280 bytes 70 values Number of Dimensions: 1 Dimensions and sizes: [nFixed | 70] Coordinates: nFixed: [8000..14900] Number Of Attributes: 2 _FillValue : 9.96921e+36 average_op_ncl : dim_avg_n over dimension(s): nLoc I do not understand where the mismatch between plot and argument (3), i.e. qco_area_avg comes from? Thanks for your help, Laura -- !------------------------------------------------------------------------------------------------------------- Laura D. Fowler Mesoscale and Microscale Meteorology Division (MMM) National Center for Atmospheric Research P.O. Box 3000, Boulder CO 80307-3000 e-mail: laura at ucar.edu phone: 303-497-1628 !------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Thu Jun 29 15:30:57 2023 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Thu, 29 Jun 2023 15:30:57 -0600 Subject: [ncl-talk] issue with gsn_csm_xy In-Reply-To: References: Message-ID: I think NCL arg numbering is zero based, so arg (3) is hres. Now there might be something going on with hres, elsewhere in your code. printVarSummary (hres) Also note that you are setting hres to True, but not attaching any attributes. Perhaps try False. If that doesn't get it, then look at printVarSummary for all four args. Compare with the documented function prototype. On Thu, Jun 29, 2023 at 2:50?PM Laura Fowler via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hello: > I am totally baffled about the error message I get when using the function > gsn_csm_xy (see error below). > > fatal:Argument type mismatch on argument (3) of (gsn_csm_xy) can not coerce > > fatal:["Execute.c":8637]:Execute: Error occurred at or near line 263 in > file var3_profile.ncl > > Here are the few lines that are causing me trouble: > > hres = True > > qco_area_avg!0 = "nFixed" > > qco_area_avg&nFixed = zFixed > > printVarSummary(qco_area_avg) > > wks = gsn_open_wks("png","test_mpas") > plot = gsn_csm_xy(wks,qco_area_avg&nFixed,qco_area_avg,hres) > > The output from these few lines are: > > Variable: qco_area_avg > > Type: float > > Total Size: 280 bytes > > 70 values > > Number of Dimensions: 1 > > Dimensions and sizes: [nFixed | 70] > > Coordinates: > > nFixed: [8000..14900] > > Number Of Attributes: 2 > > _FillValue : 9.96921e+36 > average_op_ncl : dim_avg_n over dimension(s): nLoc > > I do not understand where the mismatch between plot and argument (3), i.e. > qco_area_avg comes from? > > Thanks for your help, > Laura > -- > > !------------------------------------------------------------------------------------------------------------- > Laura D. Fowler > > Mesoscale and Microscale Meteorology Division (MMM) > National Center for Atmospheric Research > P.O. Box 3000, Boulder CO 80307-3000 > > e-mail: laura at ucar.edu > phone: 303-497-1628 > > > !------------------------------------------------------------------------------------------------------------- > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From debasish.hazra5 at gmail.com Fri Jun 30 05:53:54 2023 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Fri, 30 Jun 2023 07:53:54 -0400 Subject: [ncl-talk] getting latitude writing on axis wrong In-Reply-To: References: Message-ID: Looking at previous examples with RAP files, I found the following defined in resources as res at mpLambertParallel1F = lon2d at Latin1 res at mpLambertParallel2F = lon2d at Latin2 res at mpLambertMeridianF = lon2d at Lov res at mpCenterLonF = lon2d at Lo1 res at mpCenterLatF = lon2d at La1 There is no Latin1 or Latin2 info in the grib2 file I am dealing with, but has Lov, Lo1 and La1 . Any suggestion where to get that info ? Thanks Deba On Thu, Jun 29, 2023 at 2:27?PM Debasish Hazra wrote: > Hi Rick, > Thanks for your reply. When I turned > res at tfDoNDCOverlay = False > got the following error > > check_for_y_lat_coord: Warning: Data either does not contain > (0) a valid latitude coordinate array or doesn't contain one at all. > (0) A valid latitude coordinate array should have a 'units' > (0) attribute equal to one of the following values: > (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' > 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north' > (0) check_for_lon_coord: Warning: Data either does not contain > (0) a valid longitude coordinate array or doesn't contain one at all. > (0) A valid longitude coordinate array should have a 'units' > (0) attribute equal to one of the following values: > (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' > 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east' > warning:ContourPlotDraw: out of range coordinates encountered; standard > AreaFill rendering method may be unreliable; > consider setting the resource trGridType to "TriangularMesh" if > coordinates contain missing values > > Debasish > > On Thu, Jun 29, 2023 at 2:13?PM Rick Brownrigg wrote: > >> Hi Debasish, >> >> I'm a little confused by this line: >> >> res at tfDoNDCOverlay = True >> >> Should that be False? If that doesn't help, if you can send me the >> dataset, I'll try to figure out what is going on. >> >> Rick >> >> >> On Thu, Jun 29, 2023 at 12:01?PM Debasish Hazra via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Hi, >>> I am trying to plot grib2 file with Lambert projection and getting wrong >>> latitude markers (0-25 N) on the y-axis. Attached is figure and code and >>> also highlighting attributes from the file. >>> >>> file global attributes: >>> dimensions: >>> ygrid_0 = 3268 >>> xgrid_0 = 5200 >>> >>> float gridrot_0 ( ygrid_0, xgrid_0 ) >>> long_name : vector rotation angle >>> GridType : Polar Sterographic Projection (North or South) >>> units : radians >>> formula_u : Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid >>> formula_v : Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid >>> note1 : u and v components of vector quantities are >>> resolved relative to grid >>> note2 : apply formulas to derive u and v components >>> relative to earth >>> >>> float gridlat_0 ( ygrid_0, xgrid_0 ) >>> corners : ( -4, -5.706548, 18.53903, 22.48842 ) >>> long_name : latitude >>> grid_type : Polar Sterographic Projection (North or South) >>> units : degrees_north >>> Dy : 3.17 >>> Dx : 3.17 >>> Lov : 245 >>> Lo1 : 206.5 >>> La1 : -4 >>> >>> float gridlon_0 ( ygrid_0, xgrid_0 ) >>> corners : ( -153.5, -74.4254, -22.46207, 152.2681 ) >>> long_name : longitude >>> grid_type : Polar Sterographic Projection (North or South) >>> units : degrees_east >>> Dy : 3.17 >>> Dx : 3.17 >>> Lov : 245 >>> Lo1 : 206.5 >>> La1 : -4 >>> >>> Any help on this is appreciated. >>> Thanks >>> Deba >>> _______________________________________________ >>> ncl-talk mailing list >>> ncl-talk at mailman.ucar.edu >>> List instructions, subscriber options, unsubscribe: >>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From barry.h.lynn at gmail.com Fri Jun 30 05:56:27 2023 From: barry.h.lynn at gmail.com (Barry Lynn) Date: Fri, 30 Jun 2023 14:56:27 +0300 Subject: [ncl-talk] getting latitude writing on axis wrong In-Reply-To: References: Message-ID: Hi: You can try to estimate these values from the domain configuration. Each RAP forecast requires these values to set up the input files. (e.g., 33 and 45, respectively). Barry On Fri, Jun 30, 2023 at 2:54?PM Debasish Hazra via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Looking at previous examples with RAP files, I found the following defined > in resources as > res at mpLambertParallel1F = lon2d at Latin1 > res at mpLambertParallel2F = lon2d at Latin2 > res at mpLambertMeridianF = lon2d at Lov > res at mpCenterLonF = lon2d at Lo1 > res at mpCenterLatF = lon2d at La1 > > There is no Latin1 or Latin2 info in the grib2 file I am dealing with, but > has Lov, Lo1 and La1 . Any suggestion where to get that info ? > > Thanks > Deba > > On Thu, Jun 29, 2023 at 2:27?PM Debasish Hazra > wrote: > >> Hi Rick, >> Thanks for your reply. When I turned >> res at tfDoNDCOverlay = False >> got the following error >> >> check_for_y_lat_coord: Warning: Data either does not contain >> (0) a valid latitude coordinate array or doesn't contain one at all. >> (0) A valid latitude coordinate array should have a 'units' >> (0) attribute equal to one of the following values: >> (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees >> north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg >> north' >> (0) check_for_lon_coord: Warning: Data either does not contain >> (0) a valid longitude coordinate array or doesn't contain one at all. >> (0) A valid longitude coordinate array should have a 'units' >> (0) attribute equal to one of the following values: >> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' >> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east' >> warning:ContourPlotDraw: out of range coordinates encountered; standard >> AreaFill rendering method may be unreliable; >> consider setting the resource trGridType to "TriangularMesh" if >> coordinates contain missing values >> >> Debasish >> >> On Thu, Jun 29, 2023 at 2:13?PM Rick Brownrigg wrote: >> >>> Hi Debasish, >>> >>> I'm a little confused by this line: >>> >>> res at tfDoNDCOverlay = True >>> >>> Should that be False? If that doesn't help, if you can send me the >>> dataset, I'll try to figure out what is going on. >>> >>> Rick >>> >>> >>> On Thu, Jun 29, 2023 at 12:01?PM Debasish Hazra via ncl-talk < >>> ncl-talk at mailman.ucar.edu> wrote: >>> >>>> Hi, >>>> I am trying to plot grib2 file with Lambert projection and getting >>>> wrong latitude markers (0-25 N) on the y-axis. Attached is figure and code >>>> and also highlighting attributes from the file. >>>> >>>> file global attributes: >>>> dimensions: >>>> ygrid_0 = 3268 >>>> xgrid_0 = 5200 >>>> >>>> float gridrot_0 ( ygrid_0, xgrid_0 ) >>>> long_name : vector rotation angle >>>> GridType : Polar Sterographic Projection (North or South) >>>> units : radians >>>> formula_u : Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid >>>> formula_v : Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid >>>> note1 : u and v components of vector quantities are >>>> resolved relative to grid >>>> note2 : apply formulas to derive u and v components >>>> relative to earth >>>> >>>> float gridlat_0 ( ygrid_0, xgrid_0 ) >>>> corners : ( -4, -5.706548, 18.53903, 22.48842 ) >>>> long_name : latitude >>>> grid_type : Polar Sterographic Projection (North or South) >>>> units : degrees_north >>>> Dy : 3.17 >>>> Dx : 3.17 >>>> Lov : 245 >>>> Lo1 : 206.5 >>>> La1 : -4 >>>> >>>> float gridlon_0 ( ygrid_0, xgrid_0 ) >>>> corners : ( -153.5, -74.4254, -22.46207, 152.2681 ) >>>> long_name : longitude >>>> grid_type : Polar Sterographic Projection (North or South) >>>> units : degrees_east >>>> Dy : 3.17 >>>> Dx : 3.17 >>>> Lov : 245 >>>> Lo1 : 206.5 >>>> La1 : -4 >>>> >>>> Any help on this is appreciated. >>>> Thanks >>>> Deba >>>> _______________________________________________ >>>> ncl-talk mailing list >>>> ncl-talk at mailman.ucar.edu >>>> List instructions, subscriber options, unsubscribe: >>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>> >>> _______________________________________________ > ncl-talk mailing list > ncl-talk at mailman.ucar.edu > List instructions, subscriber options, unsubscribe: > https://mailman.ucar.edu/mailman/listinfo/ncl-talk > -- Barry H. Lynn, Ph.D Senior Scientist, Lecturer, The Institute of Earth Sciences, The Hebrew University of Jerusalem, Givat Ram, Jerusalem 91904, Israel Tel: 972 547 231 170 Fax: (972)-25662581 Weather It Is, LTD Weather and Climate Focus https://weather-it-is.com Jerusalem, Israel Local: 02 930 9525 Cell: 054 7 231 170 Int-IS: x972 2 930 9525 -------------- next part -------------- An HTML attachment was scrubbed... URL: