From asphilli at ucar.edu Mon Dec 16 12:16:20 2024 From: asphilli at ucar.edu (Adam Phillips) Date: Mon, 16 Dec 2024 12:16:20 -0700 Subject: [ncl-talk] about the error message 'can not combine character or string types with numeric types' In-Reply-To: References: Message-ID: Hi Zhuxiao, Does the error message happen when the plot is created at this line: plot = gsn_csm_xy(wks, day(0:100), kp(0:100) ,res) ; create plot I have seen this type of error message before where NCL is trying to automatically set one of the gsn*String, or ti*AxisString resources. To test this, you can set: res at gsnLeftString = "" res at gsnCenterString = "" res at gsnRightString = "" res at tiXAxisString = "" res at tiYAxisString = "" and see if the error message continues. Best, Adam On Sat, Dec 14, 2024 at 7:19?PM Zhuxiao Li - NOAA Affiliate < zhuxiao.li at noaa.gov> wrote: > Hi there, > When I run a simple NCL code, I get the error message 'can not combine > character or string types with numeric types, can't continue' > Actually, day are integers and kp includes float values, and I printed out > each value. > there are no strings in the two arrays, I don't know where the error > message comes from. Could you please help me with this? > Thanks! > Zhuxiao > > NCL code are as follows, > > >begin > > Dir= "/scratch1/NCEPDEV/swpc/WAM-IPE_DATA/INPUT_PARAMETERS/KP_AP/" > > fil1 = "kp_ap_19320101-2024.nc" > > f1 = addfile(Dir+fil1,"r") > kp = f1->Kp(222072:222072+5844*8-1) > printVarSummary(kp) > printMinMax(kp,False) > nt0 = 5844*8 > day = ispan(0, nt0-1 , 1) > printVarSummary(day) > printMinMax(day,False) > kp!0 = "day" > kp at day = day > printVarSummary(kp) > printMinMax(kp,False) > print(day(0:100)) > print(kp(0:100)) > wks = gsn_open_wks ("png","kp_for_2008-2023") > res = True ; plot mods desired > plot = gsn_csm_xy(wks, day(0:100), kp(0:100) ,res) ; create plot > exit > end > > -- > Dr. Zhuxiao Li > NOAA/NWS/NCEP/SWPC > 325 Broadway, > Boulder, Colorado 80305 > 303-497-4649 > > -- Adam Phillips Associate Scientist IV, Climate Analysis Section Climate and Global Dynamics Laboratory National Center for Atmospheric Research www.cgd.ucar.edu/staff/asphilli/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From asphilli at ucar.edu Wed Dec 18 14:21:14 2024 From: asphilli at ucar.edu (Adam Phillips) Date: Wed, 18 Dec 2024 14:21:14 -0700 Subject: [ncl-talk] about the error message 'can not combine character or string types with numeric types' In-Reply-To: References: Message-ID: Hi Zhuxiao, Can you send me the .nc file you used (offline) so I can try running it? Best, Adam On Wed, Dec 18, 2024 at 1:00?PM Zhuxiao Li - NOAA Affiliate < zhuxiao.li at noaa.gov> wrote: > Hi Adam, > Would like you know that the problem is still there. > Thanks, > Zhuxiao > > On Mon, Dec 16, 2024 at 12:20?PM Zhuxiao Li - NOAA Affiliate < > zhuxiao.li at noaa.gov> wrote: > >> Hi Adam, >> Thanks for the response and nice info. >> >>> >>> Does the error message happen when the plot is created at this line: >>> plot = gsn_csm_xy(wks, day(0:100), kp(0:100) ,res) ; create plot >>> >>> yes. >> >> >>> I have seen this type of error message before where NCL is trying to >>> automatically set one of the gsn*String, or ti*AxisString resources. To >>> test this, you can set: >>> res at gsnLeftString = "" >>> res at gsnCenterString = "" >>> res at gsnRightString = "" >>> res at tiXAxisString = "" >>> res at tiYAxisString = "" >>> and see if the error message continues. >>> >> Will give it a try. >> >> Thanks again. >> Zhuxiao >> >> >> >>> >>> On Sat, Dec 14, 2024 at 7:19?PM Zhuxiao Li - NOAA Affiliate < >>> zhuxiao.li at noaa.gov> wrote: >>> >>>> Hi there, >>>> When I run a simple NCL code, I get the error message 'can not combine >>>> character or string types with numeric types, can't continue' >>>> Actually, day are integers and kp includes float values, and I printed >>>> out each value. >>>> there are no strings in the two arrays, I don't know where the error >>>> message comes from. Could you please help me with this? >>>> Thanks! >>>> Zhuxiao >>>> >>>> NCL code are as follows, >>>> >>>> >begin >>>> > Dir= "/scratch1/NCEPDEV/swpc/WAM-IPE_DATA/INPUT_PARAMETERS/KP_AP/" >>>> > fil1 = "kp_ap_19320101-2024.nc" >>>> > f1 = addfile(Dir+fil1,"r") >>>> kp = f1->Kp(222072:222072+5844*8-1) >>>> printVarSummary(kp) >>>> printMinMax(kp,False) >>>> nt0 = 5844*8 >>>> day = ispan(0, nt0-1 , 1) >>>> printVarSummary(day) >>>> printMinMax(day,False) >>>> kp!0 = "day" >>>> kp at day = day >>>> printVarSummary(kp) >>>> printMinMax(kp,False) >>>> print(day(0:100)) >>>> print(kp(0:100)) >>>> wks = gsn_open_wks ("png","kp_for_2008-2023") >>>> res = True ; plot mods desired >>>> plot = gsn_csm_xy(wks, day(0:100), kp(0:100) ,res) ; create plot >>>> exit >>>> end >>>> >>>> -- >>>> Dr. Zhuxiao Li >>>> NOAA/NWS/NCEP/SWPC >>>> 325 Broadway, >>>> Boulder, Colorado 80305 >>>> 303-497-4649 >>>> >>>> >>> >>> -- >>> Adam Phillips >>> Associate Scientist IV, Climate Analysis Section >>> Climate and Global Dynamics Laboratory >>> National Center for Atmospheric Research >>> www.cgd.ucar.edu/staff/asphilli/ >>> >>> >>> >> >> >> -- >> Dr. Zhuxiao Li >> NOAA/NWS/NCEP/SWPC >> 325 Broadway, >> Boulder, Colorado 80305 >> 303-497-4649 >> >> > > -- > Dr. Zhuxiao Li > NOAA/NWS/NCEP/SWPC > 325 Broadway, > Boulder, Colorado 80305 > 303-497-4649 > > -- Adam Phillips Associate Scientist IV, Climate Analysis Section Climate and Global Dynamics Laboratory National Center for Atmospheric Research www.cgd.ucar.edu/staff/asphilli/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From asphilli at ucar.edu Thu Dec 19 16:27:30 2024 From: asphilli at ucar.edu (Adam Phillips) Date: Thu, 19 Dec 2024 16:27:30 -0700 Subject: [ncl-talk] about the error message 'can not combine character or string types with numeric types' In-Reply-To: References: Message-ID: Hi Zhuxiao, If you delete kp at units the script works. The error is occurring in gsn_csm.ncl at line 816: return((/valid_units(n),data@$valid_units(n)$/)) I *think* it is because the units were set to an integer (=1) and not a string, but I am not certain. Best, Adam On Thu, Dec 19, 2024 at 11:47?AM Zhuxiao Li - NOAA Affiliate < zhuxiao.li at noaa.gov> wrote: > Hi Adam, > The attached is the netcdf file I used in the code. > Thanks for the great help! > Zhuxiao > > On Wed, Dec 18, 2024 at 2:21?PM Adam Phillips wrote: > >> Hi Zhuxiao, >> Can you send me the .nc file you used (offline) so I can try running it? >> Best, >> Adam >> >> On Wed, Dec 18, 2024 at 1:00?PM Zhuxiao Li - NOAA Affiliate < >> zhuxiao.li at noaa.gov> wrote: >> >>> Hi Adam, >>> Would like you know that the problem is still there. >>> Thanks, >>> Zhuxiao >>> >>> On Mon, Dec 16, 2024 at 12:20?PM Zhuxiao Li - NOAA Affiliate < >>> zhuxiao.li at noaa.gov> wrote: >>> >>>> Hi Adam, >>>> Thanks for the response and nice info. >>>> >>>>> >>>>> Does the error message happen when the plot is created at this line: >>>>> plot = gsn_csm_xy(wks, day(0:100), kp(0:100) ,res) ; create plot >>>>> >>>>> yes. >>>> >>>> >>>>> I have seen this type of error message before where NCL is trying to >>>>> automatically set one of the gsn*String, or ti*AxisString resources. To >>>>> test this, you can set: >>>>> res at gsnLeftString = "" >>>>> res at gsnCenterString = "" >>>>> res at gsnRightString = "" >>>>> res at tiXAxisString = "" >>>>> res at tiYAxisString = "" >>>>> and see if the error message continues. >>>>> >>>> Will give it a try. >>>> >>>> Thanks again. >>>> Zhuxiao >>>> >>>> >>>> >>>>> >>>>> On Sat, Dec 14, 2024 at 7:19?PM Zhuxiao Li - NOAA Affiliate < >>>>> zhuxiao.li at noaa.gov> wrote: >>>>> >>>>>> Hi there, >>>>>> When I run a simple NCL code, I get the error message 'can not >>>>>> combine character or string types with numeric types, can't continue' >>>>>> Actually, day are integers and kp includes float values, and I >>>>>> printed out each value. >>>>>> there are no strings in the two arrays, I don't know where the error >>>>>> message comes from. Could you please help me with this? >>>>>> Thanks! >>>>>> Zhuxiao >>>>>> >>>>>> NCL code are as follows, >>>>>> >>>>>> >begin >>>>>> > Dir= "/scratch1/NCEPDEV/swpc/WAM-IPE_DATA/INPUT_PARAMETERS/KP_AP/" >>>>>> > fil1 = "kp_ap_19320101-2024.nc" >>>>>> > f1 = addfile(Dir+fil1,"r") >>>>>> kp = f1->Kp(222072:222072+5844*8-1) >>>>>> printVarSummary(kp) >>>>>> printMinMax(kp,False) >>>>>> nt0 = 5844*8 >>>>>> day = ispan(0, nt0-1 , 1) >>>>>> printVarSummary(day) >>>>>> printMinMax(day,False) >>>>>> kp!0 = "day" >>>>>> kp at day = day >>>>>> printVarSummary(kp) >>>>>> printMinMax(kp,False) >>>>>> print(day(0:100)) >>>>>> print(kp(0:100)) >>>>>> wks = gsn_open_wks ("png","kp_for_2008-2023") >>>>>> res = True ; plot mods desired >>>>>> plot = gsn_csm_xy(wks, day(0:100), kp(0:100) ,res) ; create plot >>>>>> exit >>>>>> end >>>>>> >>>>>> -- >>>>>> Dr. Zhuxiao Li >>>>>> NOAA/NWS/NCEP/SWPC >>>>>> 325 Broadway, >>>>>> Boulder, Colorado 80305 >>>>>> 303-497-4649 >>>>>> >>>>>> >>>>> >>>>> -- >>>>> Adam Phillips >>>>> Associate Scientist IV, Climate Analysis Section >>>>> Climate and Global Dynamics Laboratory >>>>> National Center for Atmospheric Research >>>>> www.cgd.ucar.edu/staff/asphilli/ >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Dr. Zhuxiao Li >>>> NOAA/NWS/NCEP/SWPC >>>> 325 Broadway, >>>> Boulder, Colorado 80305 >>>> 303-497-4649 >>>> >>>> >>> >>> -- >>> Dr. Zhuxiao Li >>> NOAA/NWS/NCEP/SWPC >>> 325 Broadway, >>> Boulder, Colorado 80305 >>> 303-497-4649 >>> >>> >> >> -- >> Adam Phillips >> Associate Scientist IV, Climate Analysis Section >> Climate and Global Dynamics Laboratory >> National Center for Atmospheric Research >> www.cgd.ucar.edu/staff/asphilli/ >> >> >> > > > -- > Dr. Zhuxiao Li > NOAA/NWS/NCEP/SWPC > 325 Broadway, > Boulder, Colorado 80305 > 303-497-4649 > > -- Adam Phillips Associate Scientist IV, Climate Analysis Section Climate and Global Dynamics Laboratory National Center for Atmospheric Research www.cgd.ucar.edu/staff/asphilli/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ehsantaghizadeh at yahoo.com Wed Dec 25 07:23:04 2024 From: ehsantaghizadeh at yahoo.com (Ehsan Taghizadeh) Date: Wed, 25 Dec 2024 14:23:04 +0000 (UTC) Subject: [ncl-talk] Issue with ploting shapefile References: <1287918329.2167480.1735136585472.ref@mail.yahoo.com> Message-ID: <1287918329.2167480.1735136585472@mail.yahoo.com> Hello everyone, I am trying to add a shapefile to my plot, but the location of the shapefile is incorrect as it appears to be rotated 90 degrees clockwise. Previously, I had an issue with NCL installed via Conda. I attempted to install NCL using a precompiled version, but encountered the following error: ?ncl: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory.? Since I do not have root access, I cannot install libssl.so.10. Attached are the incorrect and correct output maps. The desired shapefile is shown in tan.?The correct version is the output from running NCL on another Linux version (Rocky), which I do not have access to. The code I used to plot these maps is quite long and may not be helpful for this issue, but I can provide a shorter version if necessary. As I am unsure if this issue is directly related to the NCL installation, I am sending this to both emails. Apologies for any inconvenience caused. The output of the command "conda list -n ncl_stable" is attached (condalist.txt). Some additional information is provided below:$?conda --version? ?conda 24.11.2$?which ncl? ?~/miniconda3/envs/ncl_stable/bin/ncl$?ncl -V? ?6.6.2 $?env? | grep NCARG? ?NCARG_ROOT=/home/taghizade/miniconda3/envs/ncl_stable Any help would be appreciated. Happy holidays! ----------------------------------------------------------------------------- Best regards,Ehsan Taghizade -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IncorrectVersion.png Type: image/png Size: 312818 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: era5sl_2021011400.png Type: image/png Size: 243225 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: condalist.txt URL: From dave.allured at noaa.gov Sun Dec 29 15:17:13 2024 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Sun, 29 Dec 2024 15:17:13 -0700 Subject: [ncl-talk] [ncl-install] Issue with ploting shapefile In-Reply-To: <1287918329.2167480.1735136585472@mail.yahoo.com> References: <1287918329.2167480.1735136585472.ref@mail.yahoo.com> <1287918329.2167480.1735136585472@mail.yahoo.com> Message-ID: Ehsan, this is a known issue with recent NCL versions. The lat and lon coordinates are swapped in some shape files, causing missing images, or mirror images along a 45 degree fold line. That is what I see in your plots. This is discussed in Github issues #151 and #176. In #176 I show a diagnostic method to determine swapped coordinates. I also provide a modified NCL library file that should render plots correctly for any shape file. Please give these suggestions a try, and let us know the results. On Wed, Dec 25, 2024 at 7:23?AM Ehsan Taghizadeh via ncl-install < ncl-install at mailman.ucar.edu> wrote: > Hello everyone, > > I am trying to add a shapefile to my plot, but the location of the > shapefile is incorrect as it appears to be rotated 90 degrees clockwise. > Previously, I had an issue with NCL installed via Conda. I attempted to > install NCL using a precompiled version, but encountered the following > error: ?ncl: error while loading shared libraries: libssl.so.10: cannot > open shared object file: No such file or directory.? Since I do not have > root access, I cannot install libssl.so.10. > > Attached are the incorrect and correct output maps. The desired shapefile > is shown in tan. The correct version is the output from running NCL on > another Linux version (Rocky), which I do not have access to. The code I > used to plot these maps is quite long and may not be helpful for this > issue, but I can provide a shorter version if necessary. > > As I am unsure if this issue is directly related to the NCL installation, > I am sending this to both emails. Apologies for any inconvenience caused. > > The output of the command "conda list -n ncl_stable" is attached ( > condalist.txt). Some additional information is provided below: > $ conda --version > *conda 24.11.2* > $ which ncl > *~/miniconda3/envs/ncl_stable/bin/ncl* > $ ncl -V > *6.6.2* > $ env | grep NCARG > *NCARG_ROOT=/home/taghizade/miniconda3/envs/ncl_stable* > > Any help would be appreciated. Happy holidays! > > *-----------------------------------------------------------------------------* > *Best regards,* > *Ehsan Taghizade* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ehsantaghizadeh at yahoo.com Tue Dec 31 07:13:36 2024 From: ehsantaghizadeh at yahoo.com (Ehsan Taghizadeh) Date: Tue, 31 Dec 2024 14:13:36 +0000 (UTC) Subject: [ncl-talk] [ncl-install] Issue with ploting shapefile In-Reply-To: References: <1287918329.2167480.1735136585472.ref@mail.yahoo.com> <1287918329.2167480.1735136585472@mail.yahoo.com> Message-ID: <662257043.3994056.1735654416453@mail.yahoo.com> Dear Dave,Thank you for your helpful reply. First, I should mention the GDAL version on our server: $ ogrinfo ?versionGDAL 3.9.2, released 2024/08/13 Additionally, the NCL version installed by Conda on our server appears to be "h7cb714c_54". I tried to find the versions h8482486_9, h9ce15c7_1, or h7290063_6 mentioned as working well in issue #56, but I couldn't locate them in the build details from conda-forge. It seems some shapefiles work well with the default NCL version from Conda. For instance, gadm41_CAN_shp falls into this category. However, some shapefiles do not work with the default NCL in Conda. For example, "englandshp" (attached file) does not work well with the default NCL in Conda. When I replaced $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl with the one mentioned in issue #176, the situation changed. The "englandshp" worked well with the new gsn_code, but for gadm41_CAN_shp, the following error was displayed: (0)? ? ?shapefile_order_lat_lon: Error: Cannot parse.(0)? ? ? ?Unexpected output from 'ogrinfo -al $shapefile'....(0)? ? ? ?Assume order of coordinates = lon/lat.(0)(0)? ? ?Diagnostics 1 for 'ogrinfo':GDAL 3.9.2, released 2024/08/13(0)(0)? ? ?Diagnostics 2 for 'ogrinfo':...(0)? ? ?Diagnostics 3 for 'ogrinfo':(0)? ? ?Parse results = False missing False False False False(0)? ? ?Number of lines in result = 1(0)? ? ?missing(0)? ? ?----------------------------(0)? ? ? ?Assume order of coordinates = lon/lat.(0)? ? ?--- Working on time 2019020106 ---(0)? ? ?shapefile_order_lat_lon: Error: Cannot parse.(0)? ? ? ?Unexpected output from 'ogrinfo -al $shapefile'. However, when I tried to run the simple NCL script from the NCL website to plot them, nothing was displayed for both shapefiles with the new gsn_code. load "./shapefile_utils.ncl" sname = "your_shapefile.shp" print_shapefile_info(sname) plot_shapefile(sname) For the "englandshp", nothing was displayed. For the CAN shapefile, nothing was displayed, and the following error occurred: (0)? ? ?Diagnostics 3 for 'ogrinfo':(0)? ? ?Parse results = False missing False False False False(0)? ? ?Number of lines in result = 1(0)? ? ?missing(0)? ? ?----------------------------(0)? ? ? ?Assume order of coordinates = lon/lat. In summary, it seems that for some shape files, we should use the default gsn_code.ncl, while for others, we should use your gsn_code.ncl. This is my understanding. I would appreciate your thoughts on this. ----------------------------------------------------------------------------- Best regards,Ehsan Taghizade On Sunday, December 29, 2024 at 02:17:40 PM PST, Dave Allured - NOAA Affiliate wrote: Ehsan, this is a known issue with recent NCL versions.? The lat and lon coordinates are swapped in some shape files, causing missing images, or mirror images along a 45 degree fold line.? That is what I see in your plots. This is discussed in Github issues?#151 and?#176.? In #176 I show a diagnostic method to determine swapped coordinates.? I also provide a modified NCL library file that should render plots correctly for any shape file.? Please give these suggestions a try, and let us know the results. On Wed, Dec 25, 2024 at 7:23?AM Ehsan Taghizadeh via ncl-install wrote: Hello everyone, I am trying to add a shapefile to my plot, but the location of the shapefile is incorrect as it appears to be rotated 90 degrees clockwise. Previously, I had an issue with NCL installed via Conda. I attempted to install NCL using a precompiled version, but encountered the following error: ?ncl: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory.? Since I do not have root access, I cannot install libssl.so.10. Attached are the incorrect and correct output maps. The desired shapefile is shown in tan.?The correct version is the output from running NCL on another Linux version (Rocky), which I do not have access to. The code I used to plot these maps is quite long and may not be helpful for this issue, but I can provide a shorter version if necessary. As I am unsure if this issue is directly related to the NCL installation, I am sending this to both emails. Apologies for any inconvenience caused. The output of the command "conda list -n ncl_stable" is attached (condalist.txt). Some additional information is provided below:$?conda --version? ?conda 24.11.2$?which ncl? ?~/miniconda3/envs/ncl_stable/bin/ncl$?ncl -V? ?6.6.2 $?env? | grep NCARG? ?NCARG_ROOT=/home/taghizade/miniconda3/envs/ncl_stable Any help would be appreciated. Happy holidays!----------------------------------------------------------------------------- Best regards,Ehsan Taghizade -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: england_gor_2011.tar.gz Type: application/x-gzip Size: 203056 bytes Desc: not available URL: From dave.allured at noaa.gov Tue Dec 31 07:45:19 2024 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Tue, 31 Dec 2024 07:45:19 -0700 Subject: [ncl-talk] [ncl-install] Issue with ploting shapefile In-Reply-To: <662257043.3994056.1735654416453@mail.yahoo.com> References: <1287918329.2167480.1735136585472.ref@mail.yahoo.com> <1287918329.2167480.1735136585472@mail.yahoo.com> <662257043.3994056.1735654416453@mail.yahoo.com> Message-ID: Ehsan, thank you for testing. It looks like my changes for "gsn_code.ncl" need further debugging. It is a good sign that "englandshp" worked with the new code, because that demonstrated mostly working infrastructure for X/Y swapping. Let us move the debugging conversation off of the mailing lists. Please reply on Github issue #176 . I need the following details: 1. Full printed output of those diagnostic messages when trying to plot "gadm41_CAN_shp" with the new gsn_code.ncl. 2. Attach a zip file with the complete file set for the shapefile "gadm41_CAN_shp". On Tue, Dec 31, 2024 at 7:13?AM Ehsan Taghizadeh wrote: > Dear Dave, > Thank you for your helpful reply. > > First, I should mention the GDAL version on our server: > > *$ ogrinfo ?version* > *GDAL 3.9.2, released 2024/08/13* > > Additionally, the NCL version installed by Conda on our server appears to > be "h7cb714c_54". I tried to find the versions h8482486_9, h9ce15c7_1, or > h7290063_6 mentioned as working well in issue *#56* > , but I couldn't > locate them in the *build details from conda-forge* > . > > It seems some shapefiles work well with the default NCL version from > Conda. For instance, gadm41_CAN_shp > falls > into this category. However, some shapefiles do not work with the default > NCL in Conda. For example, "englandshp" (attached file) does not work well > with the default NCL in Conda. > > When I replaced $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl with the > one mentioned in issue #176 , the > situation changed. The "englandshp" worked well with the new gsn_code, but > for gadm41_CAN_shp > , the > following error was displayed: > > *(0) shapefile_order_lat_lon: Error: Cannot parse.* > *(0) Unexpected output from 'ogrinfo -al $shapefile'.* > *...* > *(0) Assume order of coordinates = lon/lat.* > *(0)* > *(0) Diagnostics 1 for 'ogrinfo':* > *GDAL 3.9.2, released 2024/08/13* > *(0)* > *(0) Diagnostics 2 for 'ogrinfo':* > *...* > *(0) Diagnostics 3 for 'ogrinfo':* > *(0) Parse results = False missing False False False False* > *(0) Number of lines in result = 1* > *(0) missing* > *(0) ----------------------------* > *(0) Assume order of coordinates = lon/lat.* > *(0) --- Working on time 2019020106 ---* > *(0) shapefile_order_lat_lon: Error: Cannot parse.* > *(0) Unexpected output from 'ogrinfo -al $shapefile'.* > > However, when I tried to run the simple NCL script from the NCL website to > plot them, nothing was displayed for both shapefiles with the new gsn_code. > > load "./shapefile_utils.ncl" > sname = "your_shapefile.shp" > print_shapefile_info(sname) > plot_shapefile(sname) > > For the "englandshp", nothing was displayed. For the CAN shapefile, > nothing was displayed, and the following error occurred: > > *(0) Diagnostics 3 for 'ogrinfo':* > *(0) Parse results = False missing False False False False* > *(0) Number of lines in result = 1* > *(0) missing* > *(0) ----------------------------* > *(0) Assume order of coordinates = lon/lat.* > > In summary, it seems that for some shape files, we should use the default > gsn_code.ncl, while for others, we should use your gsn_code.ncl. This is my > understanding. I would appreciate your thoughts on this. > > *-----------------------------------------------------------------------------* > *Best regards,* > *Ehsan Taghizade* > > > On Sunday, December 29, 2024 at 02:17:40 PM PST, Dave Allured - NOAA > Affiliate wrote: > > > Ehsan, this is a known issue with recent NCL versions. The lat and lon > coordinates are swapped in some shape files, causing missing images, or > mirror images along a 45 degree fold line. That is what I see in your > plots. > > This is discussed in Github issues #151 > and #176. In #176 I show a > diagnostic method to determine swapped coordinates. I also provide a > modified NCL library file that should render plots correctly for any shape > file. Please give these suggestions a try, and let us know the results. > > > On Wed, Dec 25, 2024 at 7:23?AM Ehsan Taghizadeh via ncl-install < > ncl-install at mailman.ucar.edu> wrote: > > Hello everyone, > > I am trying to add a shapefile to my plot, but the location of the > shapefile is incorrect as it appears to be rotated 90 degrees clockwise. > Previously, I had an issue with NCL installed via Conda. I attempted to > install NCL using a precompiled version, but encountered the following > error: ?ncl: error while loading shared libraries: libssl.so.10: cannot > open shared object file: No such file or directory.? Since I do not have > root access, I cannot install libssl.so.10. > > Attached are the incorrect and correct output maps. The desired shapefile > is shown in tan. The correct version is the output from running NCL on > another Linux version (Rocky), which I do not have access to. The code I > used to plot these maps is quite long and may not be helpful for this > issue, but I can provide a shorter version if necessary. > > As I am unsure if this issue is directly related to the NCL installation, > I am sending this to both emails. Apologies for any inconvenience caused. > > The output of the command "conda list -n ncl_stable" is attached ( > condalist.txt). Some additional information is provided below: > $ conda --version > *conda 24.11.2* > $ which ncl > *~/miniconda3/envs/ncl_stable/bin/ncl* > $ ncl -V > *6.6.2* > $ env | grep NCARG > *NCARG_ROOT=/home/taghizade/miniconda3/envs/ncl_stable* > > Any help would be appreciated. Happy holidays! > > *-----------------------------------------------------------------------------* > *Best regards,* > *Ehsan Taghizade* > > -------------- next part -------------- An HTML attachment was scrubbed... URL: