From tabishumaransari at gmail.com Mon Sep 1 11:03:54 2025 From: tabishumaransari at gmail.com (Tabish Ansari) Date: Mon, 1 Sep 2025 19:03:54 +0200 Subject: [ncl-talk] Printing the +- sign on a plot in NCL Message-ID: Dear NCL folks, I'm posting here after a long time, partly because I've gotten better at using NCL over the years and partly because nowadays the AI LLMs are able to answer most of my queries on NCL and solve the errors. However, I finally have a question at which all the LLMs failed: How do I print the +- sign (+ on top of -) in an NCL plot? What's the appropriate function code to use inside the string? Thank you very much in advance! best regards, Tabish -------------------------------------------------------------------------------------- Dr Tabish Ansari Research Associate Air Quality Modelling Group Research Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam Potsdam, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From ehsantaghizadeh at yahoo.com Mon Sep 1 14:13:02 2025 From: ehsantaghizadeh at yahoo.com (Ehsan Taghizadeh) Date: Mon, 1 Sep 2025 20:13:02 +0000 (UTC) Subject: [ncl-talk] Printing the +- sign on a plot in NCL In-Reply-To: References: Message-ID: <2006081059.554121.1756757582182@mail.yahoo.com> Hello Dr. Tabish, I came across a few lines from the eqn_3.ncl example on the NCL Applications page (https://www.ncl.ucar.edu/Applications/eqn.shtml) that demonstrate how to plot a - over +.I thought you might find it relevant or useful. txres = True txres at txFuncCode = ":" gsn_text_ndc(wks,":F34:t",.6,.8,txres) ----------------------------------------------------------------------------- Best regards,Ehsan Taghizadeh On Monday, September 1, 2025 at 10:04:13 AM PDT, Tabish Ansari via ncl-talk wrote: Dear NCL folks, I'm posting here after a long time, partly because I've gotten better at using NCL over the years and partly because nowadays the AI LLMs are able to answer most of my queries on NCL and solve the errors. However, I finally have a question at which all the LLMs failed: How do I print the?+- sign (+ on top of -) in an NCL plot? What's the appropriate function code to use inside the string? Thank you very much in advance! best regards, Tabish -------------------------------------------------------------------------------------- Dr Tabish AnsariResearch Associate?Air Quality Modelling GroupResearch Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam?Potsdam, Germany_______________________________________________ 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 dave.allured at noaa.gov Mon Sep 1 14:14:18 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Mon, 1 Sep 2025 14:14:18 -0600 Subject: [ncl-talk] Printing the +- sign on a plot in NCL In-Reply-To: References: Message-ID: Tabish, NCL uses font tables for special symbols. https://www.ncl.ucar.edu/Document/Graphics/font_tables.shtml There are two different plus/minus signs in the math symbol tables. I did not look in the other tables. Symbols are added to plot strings with the documented encoding method. Try this NCL example. Change one line as follows, to show the two different plus/minus symbols. https://www.ncl.ucar.edu/Applications/Scripts/eqn_5.ncl eqn2 = "Table 18 selector 'S' is :F18:S:F: symbol:C:" \ + "Table 34 selector '1' is :F34:1:F: symbol" On Mon, Sep 1, 2025 at 11:04?AM Tabish Ansari via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear NCL folks, > > I'm posting here after a long time, partly because I've gotten better at > using NCL over the years and partly because nowadays the AI LLMs are able > to answer most of my queries on NCL and solve the errors. However, I > finally have a question at which all the LLMs failed: How do I print the +- > sign (+ on top of -) in an NCL plot? What's the appropriate function code > to use inside the string? > > Thank you very much in advance! > > best regards, > Tabish > > -------------------------------------------------------------------------------------- > Dr Tabish Ansari > Research Associate > Air Quality Modelling Group > Research Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam > Potsdam, Germany > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tabishumaransari at gmail.com Tue Sep 2 07:36:45 2025 From: tabishumaransari at gmail.com (Tabish Ansari) Date: Tue, 2 Sep 2025 15:36:45 +0200 Subject: [ncl-talk] Printing the +- sign on a plot in NCL In-Reply-To: References: Message-ID: Dear Ehsan and Dave, Many thanks for your replies. I managed to get the desired output by using "~F34~1~F21~" inside the string. best regards, Tabish -------------------------------------------------------------------------------------- Dr Tabish Ansari Research Associate Air Quality Modelling Group Research Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam Potsdam, Germany On Mon, 1 Sept 2025 at 22:14, Dave Allured - NOAA Affiliate < dave.allured at noaa.gov> wrote: > Tabish, NCL uses font tables for special symbols. > https://www.ncl.ucar.edu/Document/Graphics/font_tables.shtml > > There are two different plus/minus signs in the math symbol tables. I did > not look in the other tables. Symbols are added to plot strings with the > documented encoding method. Try this NCL example. Change one line as > follows, to show the two different plus/minus symbols. > https://www.ncl.ucar.edu/Applications/Scripts/eqn_5.ncl > > eqn2 = "Table 18 selector 'S' is :F18:S:F: symbol:C:" \ > + "Table 34 selector '1' is :F34:1:F: symbol" > > > On Mon, Sep 1, 2025 at 11:04?AM Tabish Ansari via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Dear NCL folks, >> >> I'm posting here after a long time, partly because I've gotten better at >> using NCL over the years and partly because nowadays the AI LLMs are able >> to answer most of my queries on NCL and solve the errors. However, I >> finally have a question at which all the LLMs failed: How do I print the +- >> sign (+ on top of -) in an NCL plot? What's the appropriate function code >> to use inside the string? >> >> Thank you very much in advance! >> >> best regards, >> Tabish >> >> -------------------------------------------------------------------------------------- >> Dr Tabish Ansari >> Research Associate >> Air Quality Modelling Group >> Research Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam >> Potsdam, Germany >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Tue Sep 2 10:54:10 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Tue, 2 Sep 2025 10:54:10 -0600 Subject: [ncl-talk] Printing the +- sign on a plot in NCL In-Reply-To: References: Message-ID: Tabish, I am glad that you got it working. The default text function code was changed from *":"* to *"~"* in recent versions of NCL, and it looks like you are using the new default. The cited example set the older text function code explicitly: *txres at txFuncCode = ":"* I recommend *~F34~1~F~* rather than *~F34~1~F21~* so that the left and right sides of your output string will use exactly the same font. If you like your current version, then of course keep it the way it is now. On Tue, Sep 2, 2025 at 7:37?AM Tabish Ansari wrote: > Dear Ehsan and Dave, > > Many thanks for your replies. I managed to get the desired output by using > "~F34~1~F21~" inside the string. > > best regards, > Tabish > > > On Mon, 1 Sept 2025 at 22:14, Dave Allured - NOAA Affiliate < > dave.allured at noaa.gov> wrote: > >> Tabish, NCL uses font tables for special symbols. >> https://www.ncl.ucar.edu/Document/Graphics/font_tables.shtml >> >> There are two different plus/minus signs in the math symbol tables. I >> did not look in the other tables. Symbols are added to plot strings with >> the documented encoding method. Try this NCL example. Change one line as >> follows, to show the two different plus/minus symbols. >> https://www.ncl.ucar.edu/Applications/Scripts/eqn_5.ncl >> >> eqn2 = "Table 18 selector 'S' is :F18:S:F: symbol:C:" \ >> + "Table 34 selector '1' is :F34:1:F: symbol" >> >> >> On Mon, Sep 1, 2025 at 11:04?AM Tabish Ansari via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Dear NCL folks, >>> >>> I'm posting here after a long time, partly because I've gotten better at >>> using NCL over the years and partly because nowadays the AI LLMs are able >>> to answer most of my queries on NCL and solve the errors. However, I >>> finally have a question at which all the LLMs failed: How do I print the +- >>> sign (+ on top of -) in an NCL plot? What's the appropriate function code >>> to use inside the string? >>> >>> Thank you very much in advance! >>> >>> best regards, >>> Tabish >>> >>> -------------------------------------------------------------------------------------- >>> Dr Tabish Ansari >>> Research Associate >>> Air Quality Modelling Group >>> Research Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam >>> Potsdam, Germany >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From yangzf01 at gmail.com Thu Sep 4 14:36:44 2025 From: yangzf01 at gmail.com (Zhifeng Yang) Date: Thu, 4 Sep 2025 16:36:44 -0400 Subject: [ncl-talk] CNL read CALIPSO v4.51 data Message-ID: Hi all, I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") lath = fh->Latitude(:, 0) lonh = fh->Longitude(:, 0) vfmh = fh->Feature_Classification_Flags However, I got the error below fatal:HDF: An error occurred while attempting to read variable (Feature_Classification_Flags) from file (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) Do you have any idea about this? Thanks, Best, Zhifeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From ehsantaghizadeh at yahoo.com Thu Sep 4 15:15:57 2025 From: ehsantaghizadeh at yahoo.com (Ehsan Taghizadeh) Date: Thu, 4 Sep 2025 21:15:57 +0000 (UTC) Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: Message-ID: <260533885.48697.1757020557930@mail.yahoo.com> Hi Zhifeng, Could you please add the following commands before your addfile command: exists = isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf")print (exists) I wonder if your ncl script and the file are in the same place.In case it returns True, could you please add the following commands just after reading your file (after addfile command): names = getfilevarnames( "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf")print (names) ----------------------------------------------------------------------------- Best regards,Ehsan Taghizadeh On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via ncl-talk wrote: Hi all,? I am using NCL 6.6.2 to read CALIPSO?latitude, longitude, and Feature_Classification_Flags variable from?CAL_LID_L2_VFM-Standard-V4-51.? ? fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r")? ?lath ? ? ?= fh->Latitude(:, 0) ? ?lonh ? ? ?= fh->Longitude(:, 0) ? ?vfmh ? ? ?= fh->Feature_Classification_Flags However, I got the error belowfatal:HDF: An error occurred while attempting to read variable (Feature_Classification_Flags) from file (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) Do you have any idea about this? Thanks, Best,Zhifeng _______________________________________________ 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 brownrig at ucar.edu Thu Sep 4 15:22:47 2025 From: brownrig at ucar.edu (Rick Brownrigg) Date: Thu, 4 Sep 2025 15:22:47 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: <260533885.48697.1757020557930@mail.yahoo.com> References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: Hi, As that file resides on /glade, I was able to access it and duplicate the problem. I can print() that variable, but I can't load it into an NCL variable. Its rather large -- 699MB. Perhaps that's the problem? Interestingly, if I run "ncdump" on that file, I get: ncdump /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf ncdump: /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: NetCDF: Attempt to use feature that was not turned on when netCDF was built. Rick On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi Zhifeng, > > Could you please add the following commands before your addfile command: > > exists = > isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") > print (exists) > > I wonder if your ncl script and the file are in the same place. > In case it returns True, could you please add the following commands just > after reading your file (after addfile command): > > names = getfilevarnames( > "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") > print (names) > > > *-----------------------------------------------------------------------------* > *Best regards,* > *Ehsan Taghizadeh* > > > On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via > ncl-talk wrote: > > > Hi all, > > I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and > Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. > > fh = > addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") > lath = fh->Latitude(:, 0) > lonh = fh->Longitude(:, 0) > vfmh = fh->Feature_Classification_Flags > > However, I got the error below > fatal:HDF: An error occurred while attempting to read variable > (Feature_Classification_Flags) from file > (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) > > Do you have any idea about this? Thanks, > > Best, > Zhifeng > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Thu Sep 4 15:30:18 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Thu, 4 Sep 2025 15:30:18 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: More diagnostics needed. Someone please show output from: NCL: fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") print (fh) Linux: h5dump -BH CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf On Thu, Sep 4, 2025 at 3:23?PM Rick Brownrigg via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi, > > As that file resides on /glade, I was able to access it and duplicate the > problem. I can print() that variable, but I can't load it into an NCL > variable. Its rather large -- 699MB. Perhaps that's the problem? > Interestingly, if I run "ncdump" on that file, I get: > > ncdump > /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf > > ncdump: > /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: > NetCDF: Attempt to use feature that was not turned on when netCDF was built. > > Rick > > > On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi Zhifeng, >> >> Could you please add the following commands before your addfile command: >> >> exists = >> isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >> print (exists) >> >> I wonder if your ncl script and the file are in the same place. >> In case it returns True, could you please add the following commands >> just after reading your file (after addfile command): >> >> names = getfilevarnames( >> "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >> print (names) >> >> >> *-----------------------------------------------------------------------------* >> *Best regards,* >> *Ehsan Taghizadeh* >> >> >> On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via >> ncl-talk wrote: >> >> >> Hi all, >> >> I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and >> Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. >> >> fh = >> addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") >> lath = fh->Latitude(:, 0) >> lonh = fh->Longitude(:, 0) >> vfmh = fh->Feature_Classification_Flags >> >> However, I got the error below >> fatal:HDF: An error occurred while attempting to read variable >> (Feature_Classification_Flags) from file >> (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) >> >> Do you have any idea about this? Thanks, >> >> Best, >> Zhifeng >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brownrig at ucar.edu Thu Sep 4 15:39:26 2025 From: brownrig at ucar.edu (Rick Brownrigg) Date: Thu, 4 Sep 2025 15:39:26 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: h5dump can't open it. Running "strings" on that filename indicates its an HDF4.2 file? On Thu, Sep 4, 2025 at 3:30?PM Dave Allured - NOAA Affiliate via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > More diagnostics needed. Someone please show output from: > > NCL: > fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14- > 00-11ZD.hdf","r") > print (fh) > > Linux: > h5dump -BH CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf > > > On Thu, Sep 4, 2025 at 3:23?PM Rick Brownrigg via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi, >> >> As that file resides on /glade, I was able to access it and duplicate the >> problem. I can print() that variable, but I can't load it into an NCL >> variable. Its rather large -- 699MB. Perhaps that's the problem? >> Interestingly, if I run "ncdump" on that file, I get: >> >> ncdump >> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >> >> ncdump: >> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: >> NetCDF: Attempt to use feature that was not turned on when netCDF was built. >> >> Rick >> >> >> On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Hi Zhifeng, >>> >>> Could you please add the following commands before your addfile command: >>> >>> exists = >>> isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>> print (exists) >>> >>> I wonder if your ncl script and the file are in the same place. >>> In case it returns True, could you please add the following commands >>> just after reading your file (after addfile command): >>> >>> names = getfilevarnames( >>> "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>> print (names) >>> >>> >>> *-----------------------------------------------------------------------------* >>> *Best regards,* >>> *Ehsan Taghizadeh* >>> >>> >>> On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via >>> ncl-talk wrote: >>> >>> >>> Hi all, >>> >>> I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and >>> Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. >>> >>> fh = >>> addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") >>> lath = fh->Latitude(:, 0) >>> lonh = fh->Longitude(:, 0) >>> vfmh = fh->Feature_Classification_Flags >>> >>> However, I got the error below >>> fatal:HDF: An error occurred while attempting to read variable >>> (Feature_Classification_Flags) from file >>> (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) >>> >>> Do you have any idea about this? Thanks, >>> >>> Best, >>> Zhifeng >>> >> _______________________________________________ > 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 dave.allured at noaa.gov Thu Sep 4 16:03:40 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Thu, 4 Sep 2025 16:03:40 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: HDF4, that is a good clue. The dump utility for HDF4 is "hdp". Do you have it? There are many options. To start, try "hdp -H list" and go from there. https://support.hdfgroup.org/hdf4/ Note that HDF4 tools include an HDF4 to HDF5 converter, which they recommend. NCL addfile might be identifying this file as HDF-EOS, which is based on HDF4. See addfile documentation. Try switching the filename extension from .hdf to .he4 and see if that improves NCL readability. On Thu, Sep 4, 2025 at 3:39?PM Rick Brownrigg wrote: > h5dump can't open it. Running "strings" on that filename indicates its an > HDF4.2 file? > > > On Thu, Sep 4, 2025 at 3:30?PM Dave Allured - NOAA Affiliate via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> More diagnostics needed. Someone please show output from: >> >> NCL: >> fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14- >> 00-11ZD.hdf","r") >> print (fh) >> >> Linux: >> h5dump -BH CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >> >> >> On Thu, Sep 4, 2025 at 3:23?PM Rick Brownrigg via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Hi, >>> >>> As that file resides on /glade, I was able to access it and duplicate >>> the problem. I can print() that variable, but I can't load it into an NCL >>> variable. Its rather large -- 699MB. Perhaps that's the problem? >>> Interestingly, if I run "ncdump" on that file, I get: >>> >>> ncdump >>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>> >>> ncdump: >>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: >>> NetCDF: Attempt to use feature that was not turned on when netCDF was built. >>> >>> Rick >>> >>> >>> On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < >>> ncl-talk at mailman.ucar.edu> wrote: >>> >>>> Hi Zhifeng, >>>> >>>> Could you please add the following commands before your addfile >>>> command: >>>> >>>> exists = >>>> isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>> print (exists) >>>> >>>> I wonder if your ncl script and the file are in the same place. >>>> In case it returns True, could you please add the following commands >>>> just after reading your file (after addfile command): >>>> >>>> names = getfilevarnames( >>>> "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>> print (names) >>>> >>>> >>>> *-----------------------------------------------------------------------------* >>>> *Best regards,* >>>> *Ehsan Taghizadeh* >>>> >>>> On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via >>>> ncl-talk wrote: >>>> Hi all, >>>> >>>> I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and >>>> Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. >>>> >>>> fh = >>>> addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") >>>> lath = fh->Latitude(:, 0) >>>> lonh = fh->Longitude(:, 0) >>>> vfmh = fh->Feature_Classification_Flags >>>> >>>> However, I got the error below >>>> fatal:HDF: An error occurred while attempting to read variable >>>> (Feature_Classification_Flags) from file >>>> (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) >>>> >>>> Do you have any idea about this? Thanks, >>>> >>>> Best, >>>> Zhifeng >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Thu Sep 4 16:05:45 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Thu, 4 Sep 2025 16:05:45 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: Where is the documentation for CALIPSO files? On Thu, Sep 4, 2025 at 4:03?PM Dave Allured - NOAA Affiliate < dave.allured at noaa.gov> wrote: > HDF4, that is a good clue. The dump utility for HDF4 is "hdp". Do you > have it? There are many options. To start, try "hdp -H list" and go from > there. > https://support.hdfgroup.org/hdf4/ > > Note that HDF4 tools include an HDF4 to HDF5 converter, which they > recommend. > > NCL addfile might be identifying this file as HDF-EOS, which is based on > HDF4. See addfile documentation. Try switching the filename extension > from .hdf to .he4 and see if that improves NCL readability. > > > On Thu, Sep 4, 2025 at 3:39?PM Rick Brownrigg wrote: > >> h5dump can't open it. Running "strings" on that filename indicates its >> an HDF4.2 file? >> >> >> On Thu, Sep 4, 2025 at 3:30?PM Dave Allured - NOAA Affiliate via ncl-talk >> wrote: >> >>> More diagnostics needed. Someone please show output from: >>> >>> NCL: >>> fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14- >>> 00-11ZD.hdf","r") >>> print (fh) >>> >>> Linux: >>> h5dump -BH CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>> >>> >>> On Thu, Sep 4, 2025 at 3:23?PM Rick Brownrigg via ncl-talk < >>> ncl-talk at mailman.ucar.edu> wrote: >>> >>>> Hi, >>>> >>>> As that file resides on /glade, I was able to access it and duplicate >>>> the problem. I can print() that variable, but I can't load it into an NCL >>>> variable. Its rather large -- 699MB. Perhaps that's the problem? >>>> Interestingly, if I run "ncdump" on that file, I get: >>>> >>>> ncdump >>>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>>> >>>> ncdump: >>>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: >>>> NetCDF: Attempt to use feature that was not turned on when netCDF was built. >>>> >>>> Rick >>>> >>>> >>>> On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < >>>> ncl-talk at mailman.ucar.edu> wrote: >>>> >>>>> Hi Zhifeng, >>>>> >>>>> Could you please add the following commands before your addfile >>>>> command: >>>>> >>>>> exists = >>>>> isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>>> print (exists) >>>>> >>>>> I wonder if your ncl script and the file are in the same place. >>>>> In case it returns True, could you please add the following commands >>>>> just after reading your file (after addfile command): >>>>> >>>>> names = getfilevarnames( >>>>> "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>>> print (names) >>>>> >>>>> >>>>> *-----------------------------------------------------------------------------* >>>>> *Best regards,* >>>>> *Ehsan Taghizadeh* >>>>> >>>>> On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via >>>>> ncl-talk wrote: >>>>> Hi all, >>>>> >>>>> I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and >>>>> Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. >>>>> >>>>> fh = >>>>> addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") >>>>> lath = fh->Latitude(:, 0) >>>>> lonh = fh->Longitude(:, 0) >>>>> vfmh = fh->Feature_Classification_Flags >>>>> >>>>> However, I got the error below >>>>> fatal:HDF: An error occurred while attempting to read variable >>>>> (Feature_Classification_Flags) from file >>>>> (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) >>>>> >>>>> Do you have any idea about this? Thanks, >>>>> >>>>> Best, >>>>> Zhifeng >>>>> >>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From brownrig at ucar.edu Thu Sep 4 16:26:10 2025 From: brownrig at ucar.edu (Rick Brownrigg) Date: Thu, 4 Sep 2025 16:26:10 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: Thanks for that tip about hdp, Dave. Using NCL to print(f->Feature_Classification_Flags) indicates it has dimensions Dimensions and sizes: [fakeDim18 | 63360] x [fakeDim19 | 5515] But hdp shows: Variable Name = Feature_Classification_Flags Index = 9 Type= 16-bit unsigned integer Ref. = 11 Compression method = NONE Rank = 2 Number of attributes = 3 Dim0: Name=fakeDim18 Size = UNLIMITED (currently 4224) Scale Type = number-type not set Number of attributes = 0 Dim1: Name=fakeDim19 Size = 5515 Scale Type = number-type not set Number of attributes = 0 So if I have NCL read the variables as: foo = f->Feature_Classification_Flags(:4223, :) It seems to load fine. If I say foo = f->Feature_Classification_Flags(:4224, :) it errs out. The same is true of some of the other variables, ex. Latitude's 1st dimension is only 4224, not 63360. Rick On Thu, Sep 4, 2025 at 4:06?PM Dave Allured - NOAA Affiliate via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Where is the documentation for CALIPSO files? > > > On Thu, Sep 4, 2025 at 4:03?PM Dave Allured - NOAA Affiliate < > dave.allured at noaa.gov> wrote: > >> HDF4, that is a good clue. The dump utility for HDF4 is "hdp". Do you >> have it? There are many options. To start, try "hdp -H list" and go from >> there. >> https://support.hdfgroup.org/hdf4/ >> >> Note that HDF4 tools include an HDF4 to HDF5 converter, which they >> recommend. >> >> NCL addfile might be identifying this file as HDF-EOS, which is based on >> HDF4. See addfile documentation. Try switching the filename extension >> from .hdf to .he4 and see if that improves NCL readability. >> >> >> On Thu, Sep 4, 2025 at 3:39?PM Rick Brownrigg wrote: >> >>> h5dump can't open it. Running "strings" on that filename indicates its >>> an HDF4.2 file? >>> >>> >>> On Thu, Sep 4, 2025 at 3:30?PM Dave Allured - NOAA Affiliate via >>> ncl-talk wrote: >>> >>>> More diagnostics needed. Someone please show output from: >>>> >>>> NCL: >>>> fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14- >>>> 00-11ZD.hdf","r") >>>> print (fh) >>>> >>>> Linux: >>>> h5dump -BH CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>>> >>>> >>>> On Thu, Sep 4, 2025 at 3:23?PM Rick Brownrigg via ncl-talk < >>>> ncl-talk at mailman.ucar.edu> wrote: >>>> >>>>> Hi, >>>>> >>>>> As that file resides on /glade, I was able to access it and duplicate >>>>> the problem. I can print() that variable, but I can't load it into an NCL >>>>> variable. Its rather large -- 699MB. Perhaps that's the problem? >>>>> Interestingly, if I run "ncdump" on that file, I get: >>>>> >>>>> ncdump >>>>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>>>> >>>>> ncdump: >>>>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: >>>>> NetCDF: Attempt to use feature that was not turned on when netCDF was built. >>>>> >>>>> Rick >>>>> >>>>> >>>>> On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < >>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>> >>>>>> Hi Zhifeng, >>>>>> >>>>>> Could you please add the following commands before your addfile >>>>>> command: >>>>>> >>>>>> exists = >>>>>> isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>>>> print (exists) >>>>>> >>>>>> I wonder if your ncl script and the file are in the same place. >>>>>> In case it returns True, could you please add the following commands >>>>>> just after reading your file (after addfile command): >>>>>> >>>>>> names = getfilevarnames( >>>>>> "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>>>> print (names) >>>>>> >>>>>> >>>>>> *-----------------------------------------------------------------------------* >>>>>> *Best regards,* >>>>>> *Ehsan Taghizadeh* >>>>>> >>>>>> On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via >>>>>> ncl-talk wrote: >>>>>> Hi all, >>>>>> >>>>>> I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and >>>>>> Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. >>>>>> >>>>>> fh = >>>>>> addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") >>>>>> lath = fh->Latitude(:, 0) >>>>>> lonh = fh->Longitude(:, 0) >>>>>> vfmh = fh->Feature_Classification_Flags >>>>>> >>>>>> However, I got the error below >>>>>> fatal:HDF: An error occurred while attempting to read variable >>>>>> (Feature_Classification_Flags) from file >>>>>> (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) >>>>>> >>>>>> Do you have any idea about this? Thanks, >>>>>> >>>>>> Best, >>>>>> Zhifeng >>>>>> >>>>> _______________________________________________ > 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 dave.allured at noaa.gov Thu Sep 4 18:43:07 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Thu, 4 Sep 2025 18:43:07 -0600 Subject: [ncl-talk] CNL read CALIPSO v4.51 data In-Reply-To: References: <260533885.48697.1757020557930@mail.yahoo.com> Message-ID: Rick, that is more good info. It looks like NCL 6.6.2 can read this file directly, by providing one or more explicit dimension sizes as needed. It would be good to examine the array data and metadata (attributes) carefully, before using these data for other work. NCO utilities says it can easily convert HDF4 files to Netcdf. Please see section *1.6 netCDF2/3/4 and HDF4/5 Support* in the current NCO manual. This might be the simplest and safest way -- if it works in this case. Again, verify the results. https://nco.sourceforge.net/nco.html On Thu, Sep 4, 2025 at 4:26?PM Rick Brownrigg wrote: > Thanks for that tip about hdp, Dave. Using NCL to > print(f->Feature_Classification_Flags) indicates it has dimensions > > Dimensions and sizes: [fakeDim18 | 63360] x [fakeDim19 | 5515] > > But hdp shows: > > Variable Name = Feature_Classification_Flags > Index = 9 > Type= 16-bit unsigned integer > Ref. = 11 > Compression method = NONE > Rank = 2 > Number of attributes = 3 > Dim0: Name=fakeDim18 > Size = UNLIMITED (currently 4224) > Scale Type = number-type not set > Number of attributes = 0 > Dim1: Name=fakeDim19 > Size = 5515 > Scale Type = number-type not set > Number of attributes = 0 > > So if I have NCL read the variables as: > > foo = f->Feature_Classification_Flags(:4223, :) > > It seems to load fine. If I say > > foo = f->Feature_Classification_Flags(:4224, :) > > it errs out. The same is true of some of the other variables, ex. > Latitude's 1st dimension is only 4224, not 63360. > > Rick > > > On Thu, Sep 4, 2025 at 4:06?PM Dave Allured - NOAA Affiliate via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Where is the documentation for CALIPSO files? >> >> >> On Thu, Sep 4, 2025 at 4:03?PM Dave Allured - NOAA Affiliate < >> dave.allured at noaa.gov> wrote: >> >>> HDF4, that is a good clue. The dump utility for HDF4 is "hdp". Do you >>> have it? There are many options. To start, try "hdp -H list" and go from >>> there. >>> https://support.hdfgroup.org/hdf4/ >>> >>> Note that HDF4 tools include an HDF4 to HDF5 converter, which they >>> recommend. >>> >>> NCL addfile might be identifying this file as HDF-EOS, which is based on >>> HDF4. See addfile documentation. Try switching the filename extension >>> from .hdf to .he4 and see if that improves NCL readability. >>> >>> >>> On Thu, Sep 4, 2025 at 3:39?PM Rick Brownrigg wrote: >>> >>>> h5dump can't open it. Running "strings" on that filename indicates its >>>> an HDF4.2 file? >>>> >>>> >>>> On Thu, Sep 4, 2025 at 3:30?PM Dave Allured - NOAA Affiliate via >>>> ncl-talk wrote: >>>> >>>>> More diagnostics needed. Someone please show output from: >>>>> >>>>> NCL: >>>>> fh = addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14- >>>>> 00-11ZD.hdf","r") >>>>> print (fh) >>>>> >>>>> Linux: >>>>> h5dump -BH CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>>>> >>>>> >>>>> On Thu, Sep 4, 2025 at 3:23?PM Rick Brownrigg via ncl-talk < >>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> As that file resides on /glade, I was able to access it and duplicate >>>>>> the problem. I can print() that variable, but I can't load it into an NCL >>>>>> variable. Its rather large -- 699MB. Perhaps that's the problem? >>>>>> Interestingly, if I run "ncdump" on that file, I get: >>>>>> >>>>>> ncdump >>>>>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf >>>>>> >>>>>> ncdump: >>>>>> /glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf: >>>>>> NetCDF: Attempt to use feature that was not turned on when netCDF was built. >>>>>> >>>>>> Rick >>>>>> >>>>>> >>>>>> On Thu, Sep 4, 2025 at 3:16?PM Ehsan Taghizadeh via ncl-talk < >>>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>>> >>>>>>> Hi Zhifeng, >>>>>>> >>>>>>> Could you please add the following commands before your addfile >>>>>>> command: >>>>>>> >>>>>>> exists = >>>>>>> isfilepresent("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>>>>> print (exists) >>>>>>> >>>>>>> I wonder if your ncl script and the file are in the same place. >>>>>>> In case it returns True, could you please add the following >>>>>>> commands just after reading your file (after addfile command): >>>>>>> >>>>>>> names = getfilevarnames( >>>>>>> "CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf") >>>>>>> print (names) >>>>>>> >>>>>>> >>>>>>> *-----------------------------------------------------------------------------* >>>>>>> *Best regards,* >>>>>>> *Ehsan Taghizadeh* >>>>>>> >>>>>>> On Thursday, September 4, 2025 at 01:37:05 PM PDT, Zhifeng Yang via >>>>>>> ncl-talk wrote: >>>>>>> Hi all, >>>>>>> >>>>>>> I am using NCL 6.6.2 to read CALIPSO latitude, longitude, and >>>>>>> Feature_Classification_Flags variable from CAL_LID_L2_VFM-Standard-V4-51. >>>>>>> >>>>>>> fh = >>>>>>> addfile("CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf","r") >>>>>>> lath = fh->Latitude(:, 0) >>>>>>> lonh = fh->Longitude(:, 0) >>>>>>> vfmh = fh->Feature_Classification_Flags >>>>>>> >>>>>>> However, I got the error below >>>>>>> fatal:HDF: An error occurred while attempting to read variable >>>>>>> (Feature_Classification_Flags) from file >>>>>>> (/glade/derecho/scratch/zhifengy/data/experiment_input/doe_cloud_africa/CALIPSO/CAL_LID_L2_VFM-Standard-V4-51/test/CAL_LID_L2_VFM-Standard-V4-51.2017-08-21T14-00-11ZD.hdf) >>>>>>> >>>>>>> Do you have any idea about this? Thanks, >>>>>>> >>>>>>> Best, >>>>>>> Zhifeng >>>>>>> >>>>>> _______________________________________________ >> 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: