From shea at ucar.edu Tue Nov 1 14:33:22 2022 From: shea at ucar.edu (Dennis Shea) Date: Tue, 1 Nov 2022 14:33:22 -0600 Subject: [ncl-talk] regCoef_n without y-axis intercept In-Reply-To: <40188def.79149.1842f6ea8b6.Webtop.71@tim.it> References: <40188def.79149.1842f6ea8b6.Webtop.71@tim.it> Message-ID: Buongiorni Giorgino, I will look at your code later today [Tuesday]. However, in my previous response to which I attached two sample fortran codes, I should have attached an NCL script which uses the shared object [.sp] file. It [tst_regcoefi.ncl] is now attached. === [5] Create a .so file via %> WRAPIT regcoef_graffino.f will create regcoef_graffino.so %> ncl tst_regcoef.ncl NCAR Command Language Version 6.5.0 (0) rcoef= 0.974561 (0) tval = 38.7429 (0) yint =15.3523 On Mon, Oct 31, 2022 at 1:04 PM Giorgio Graffino wrote: > Hi Dennis, > > > Thanks a lot for taking the time to write the scripts and the > instructions. With your help I managed to make my version of the subroutine > work (see attached) in my NCL script. Using the debug printing part, I > checked that the subroutine version with the intercept gives the same > result of regCoef_n. Now I'm trying to make the subroutine to return all > the calculated variables (and most notably the regression coefficient), but > I can't. Can I do that from NCL or do I have to write a separate Fortran > script? > > > Cheers, > > Giorgio > > > > ------ Messaggio Originale ------ > Da: shea at ucar.edu > A: dave.allured at noaa.gov > Cc: g.graffino at tim.it; ncl-talk at ucar.edu > Inviato: gioved? 27 ottobre 2022 19:30 > Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept > > Oops. I inadvertently did not attach the fortran codes. > > > > On Thu, Oct 27, 2022 at 11:09 AM Dennis Shea wrote: > >> This thread is a bit hard to follow for me. >> >> [1] re: "Now I'm thinking how to make the function to force the >> regression to pass from origin. Any idea on how to do that?" >> I do not know how to accommodate the additional constraint of making the >> regression line'go through the origin. >> Likely, googling something like "regression line through the origin" will >> yield some information. >> >> [2] Make sure your modified fortran subroutine works. Initially, code and >> test this only for one-dimension. We can do multiple dimensions later. >> EG with the 'gfortran' compiler. >> I took NCL's underlying fortran subroutine. I changed the source name to >> RCGRAF/rcgraf to avoid any possible naming conflicts. I wrote a simple >> fortran driver. Any fortran compiler will work >> >> %> gfortran tst_regcoef.f regcoef_graffino.f <=== compile fortran codes >> %> ./a.out <=== execute the compiled codes >> >> rcoef= 0.974561453 >> tval = 38.7428589 >> yint = 15.3522949 >> >> [3] Now, modify the "regcoef_graffino.f " to create a regression line >> where there is no y-intercept >> >> [4] Repeat step [2] with your modified code. >> >> [5] Create a .so file via >> >> %> WRAPIT regcoef_graffino.f >> >> will create regcoef_graffino.so >> >> [6] Create a simple 1D test of invoking the .so file and print results >> >> [7] At this point, we can make a 2nd subroutine that invokes the .so file >> multiple times. >> >> >> >> >> >> >> >> >> >> >> >> If The (hidden) C interface to the f77 subroutine just loops over the >> appropriate dimensions and returns the various results. >> >> --- >> If you have 1D arrays [ X[N], Y[N] ] >> >> >> On Wed, Oct 26, 2022 at 9:10 AM Dave Allured - NOAA Affiliate via >> ncl-talk wrote: >> >>> Giorgio, WRAPIT is capable of handling arrays correctly. I suggest you >>> try some of the working fortran examples in the WRAPIT documentation, so >>> that you can get familiar with WRAPIT and array arguments. Then, get the >>> *original* regcoef_dp.f working with WRAPIT and arrays, but change the >>> function name to prevent conflict. It might be helpful to write external >>> standalone fortran main programs that call the fortran routines you are >>> testing, to ensure those routines are working independently from NCL. >>> >>> Only after that, try interfacing your modified routine with WRAPIT. >>> Please completely avoid regcoefW.c. It is full of internal protocol that is >>> not related to WRAPIT and will continue to confuse you. >>> >>> I do not have time to analyze or debug your code and procedures. If >>> needed, perhaps someone else is available. >>> >>> >>> On Wed, Oct 26, 2022 at 3:09 AM Giorgio Graffino >>> wrote: >>> >>>> Hi Dave, >>>> >>>> Thanks for confirming that. I'm changing the fortran subroutine Dennis >>>> sent last week into a function, but it keeps giving me an error wherever I >>>> try to use arrays as arguments. It only works when X and Y are scalar >>>> numbers. I really don't understand how a linear regression fit can be found >>>> with scalar numbers as arguments. I'm looking at the C interface to see how >>>> to subroutine is called, but there are too many things happening in >>>> regcoefW.c and it's difficult to understand the workflow. Can anyone please >>>> help me understand how to make the fortran subroutine work for 1d and 2d >>>> arrays? >>>> >>>> Cheers, >>>> >>>> Giorgio >>>> >>>> >>>> ------ Messaggio Originale ------ >>>> Da: dave.allured at noaa.gov >>>> A: g.graffino at tim.it >>>> Cc: ncl-talk at ucar.edu >>>> Inviato: luned? 24 ottobre 2022 22:10 >>>> Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept >>>> >>>> Giorgio, you are right, regcoefW.c is an NCL internal interface routine >>>> for regCoef_n. But it uses a different protocol than a WRAPIT interfaced >>>> function. Just ignore regcoefW.c, and follow the WRAPIT fortran >>>> instructions carefully, for your new function. Change the function name, >>>> and do not attempt to replace the built-in regCoef_n function. You can >>>> change the arguments as you like, but follow the documented WRAPIT rules. >>>> >>>> There are two different methods for calling external C functions: >>>> fortran wrapper, and shared object. Please study the WRAPIT documentation >>>> carefully. >>>> >>>> >>>> On Mon, Oct 24, 2022 at 1:35 PM Giorgio Graffino via ncl-talk < >>>> ncl-talk at mailman.ucar.edu> wrote: >>>> >>>>> Hello, >>>>> >>>>> I'm doing some modifications to the regcoef_dp.f file to consider a >>>>> zero y-intercept, but now I don't know how to try it in a script. The >>>>> number of arguments in the fortran subroutine is different than in >>>>> regCoef_n, so the subroutine is probably going through some more steps, >>>>> possibly involving this script ( >>>>> https://github.com/NCAR/ncl/blob/develop/ni/src/lib/nfp/regcoefW.c). >>>>> Am I right? >>>>> >>>>> How can I incorporate both fortran and C scripts in my NCL script? I >>>>> know I can use WRAPIT to read external fortran code, but what about C code? >>>>> >>>>> I need help please. >>>>> >>>>> Giorgio >>>>> >>>>> >>>>> ------ Messaggio Originale ------ >>>>> Da: ncl-talk at mailman.ucar.edu >>>>> A: shea at ucar.edu >>>>> Cc: ncl-talk at ucar.edu >>>>> Inviato: venerd? 21 ottobre 2022 13:14 >>>>> Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept >>>>> >>>>> Hi Dennis, Dave >>>>> >>>>> Thanks for sending the relevant function and for explaining how to >>>>> access the source code. Now I'm thinking how to make the function to force >>>>> the regression to pass from origin. Any idea on how to do that? >>>>> >>>>> Cheers, >>>>> >>>>> Giorgio >>>>> >>>>> >>>>> ------ Messaggio Originale ------ >>>>> Da: shea at ucar.edu >>>>> A: g.graffino at tim.it >>>>> Cc: dave.allured at noaa.gov; ncl-talk at ucar.edu >>>>> Inviato: gioved? 20 ottobre 2022 19:17 >>>>> Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept >>>>> >>>>> The f77 code is attached. >>>>> >>>>> >>>>> On Thu, Oct 20, 2022 at 9:53 AM Giorgio Graffino via ncl-talk < >>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>> >>>>>> Hi Dave, >>>>>> >>>>>> Thanks for the advice. I looked at the examples in >>>>>> https://www.ncl.ucar.edu/Applications/regress.shtml, especially >>>>>> examples 2 and 4, but I couldn't find any supplementary information about >>>>>> regCoef. I also can't find anything under >>>>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl and >>>>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl. >>>>>> >>>>>> Is NCL source code located anywhere in $NCARG_ROOT? Can anyone please >>>>>> point me where it is? >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Giorgio >>>>>> >>>>>> >>>>>> ------ Messaggio Originale ------ >>>>>> Da: dave.allured at noaa.gov >>>>>> A: g.graffino at tim.it >>>>>> Cc: ncl-talk at ucar.edu >>>>>> Inviato: gioved? 13 ottobre 2022 18:47 >>>>>> Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept >>>>>> >>>>>> Giorgio, for your second question, please see this very brief >>>>>> description that I recently wrote, for how to search for functions in the >>>>>> NCL source code. >>>>>> https://mailman.ucar.edu/pipermail/ncl-talk/2022-August/018954.html >>>>>> >>>>>> >>>>>> On Thu, Oct 13, 2022 at 10:38 AM Giorgio Graffino via ncl-talk < >>>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>>> >>>>>>> Hi NCL community, >>>>>>> >>>>>>> I want regCoef_n to find the regression coefficient between two >>>>>>> arrays without y-axis intercept. Do you know how I can change the function >>>>>>> to do that? >>>>>>> >>>>>>> Can you also please tell me where I can find the function? I did a >>>>>>> grep recursive search in my $NCARG_ROOT directory but I couldn't >>>>>>> find it. >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: tst_regcoef.ncl Type: application/octet-stream Size: 1149 bytes Desc: not available URL: From g.graffino at tim.it Wed Nov 2 05:40:11 2022 From: g.graffino at tim.it (Giorgio Graffino) Date: Wed, 2 Nov 2022 12:40:11 +0100 (CET) Subject: [ncl-talk] regCoef_n without y-axis intercept In-Reply-To: <40188def.79149.1842f6ea8b6.Webtop.71@tim.it> References: <40188def.79149.1842f6ea8b6.Webtop.71@tim.it> Message-ID: Thanks a lot lil' (?) Dennis, I managed to make the subroutine work; the problem was that, as you did for your subroutine, the return argument must be declared and given to the subroutine as argument. I attached the fortran script I used as reference, and below is the NCL code snippet to use the subroutine. external REGCOEF_N_ZEROINTERCEPT "./regcoef_dp_zerointercept.so" rcoef = 0.d ; defined in fortran sub as double tval = 0.d xave = 0.d yave = 0.d rstd = 0.d yint = 0.d nptxy = 0 ; defined in fortran sub as integer ier = -9 REGCOEF_N_ZEROINTERCEPT::DREGCOEF_0Y(ndtooned(xoks_allresponse1_notrac),\ ndtooned(xoks_aporesponse1_notrac_multip(0,:,:)),\ nlat*nlon,\ xoks_allresponse1_notrac at _FillValue,\ xoks_aporesponse1_notrac_multip at _FillValue,\ rcoef,tval,nptxy,xave,yave,rstd,yint,ier) xoks_aporesponse1_notrac_nointer_regres = tofloat(rcoef) Cheers, lil' Giorgio (aka Giorgino) ------ Messaggio Originale ------ Da: shea at ucar.edu A: g.graffino at tim.it Cc: ncl-talk at ucar.edu Inviato: marted? 1 novembre 2022 21:33 Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept Buongiorni Giorgino, I will look at your code later today [Tuesday]. However, in my previous response to which I attached two sample fortran codes, I should have attached an NCL script which uses the shared object [.sp] file. It [tst_regcoefi.ncl] is now attached. === [5] Create a .so file via %> WRAPIT regcoef_graffino.f will create regcoef_graffino.so %> ncl tst_regcoef.ncl NCAR Command Language Version 6.5.0 (0) rcoef= 0.974561 (0) tval = 38.7429 (0) yint =15.3523 On Mon, Oct 31, 2022 at 1:04 PM Giorgio Graffino > wrote: Hi Dennis, Thanks a lot for taking the time to write the scripts and the instructions. With your help I managed to make my version of the subroutine work (see attached) in my NCL script. Using the debug printing part, I checked that the subroutine version with the intercept gives the same result of regCoef_n. Now I'm trying to make the subroutine to return all the calculated variables (and most notably the regression coefficient), but I can't. Can I do that from NCL or do I have to write a separate Fortran script? Cheers, Giorgio ------ Messaggio Originale ------ Da: shea at ucar.edu A: dave.allured at noaa.gov Cc: g.graffino at tim.it ; ncl-talk at ucar.edu Inviato: gioved? 27 ottobre 2022 19:30 Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept Oops. I inadvertently did not attach the fortran codes. On Thu, Oct 27, 2022 at 11:09 AM Dennis Shea > wrote: This thread is a bit hard to follow for me. [1] re: "Now I'm thinking how to make the function to force the regression to pass from origin. Any idea on how to do that?" I do not know how to accommodate the additional constraint of making the regression line'go through the origin. Likely, googling something like "regression line through the origin" will yield some information. [2] Make sure your modified fortran subroutine works. Initially, code and test this only for one-dimension. We can do multiple dimensions later. EG with the 'gfortran' compiler. I took NCL's underlying fortran subroutine. I changed the source name to RCGRAF/rcgraf to avoid any possible naming conflicts. I wrote a simple fortran driver. Any fortran compiler will work %> gfortran tst_regcoef.f regcoef_graffino.f <=== compile fortran codes %> ./a.out <=== execute the compiled codes rcoef= 0.974561453 tval = 38.7428589 yint = 15.3522949 [3] Now, modify the "regcoef_graffino.f " to create a regression line where there is no y-intercept [4] Repeat step [2] with your modified code. [5] Create a .so file via %> WRAPIT regcoef_graffino.f will create regcoef_graffino.so [6] Create a simple 1D test of invoking the .so file and print results [7] At this point, we can make a 2nd subroutine that invokes the .so file multiple times. If The (hidden) C interface to the f77 subroutine just loops over the appropriate dimensions and returns the various results. --- If you have 1D arrays [ X[N], Y[N] ] On Wed, Oct 26, 2022 at 9:10 AM Dave Allured - NOAA Affiliate via ncl-talk > wrote: Giorgio, WRAPIT is capable of handling arrays correctly. I suggest you try some of the working fortran examples in the WRAPIT documentation, so that you can get familiar with WRAPIT and array arguments. Then, get the original regcoef_dp.f working with WRAPIT and arrays, but change the function name to prevent conflict. It might be helpful to write external standalone fortran main programs that call the fortran routines you are testing, to ensure those routines are working independently from NCL. Only after that, try interfacing your modified routine with WRAPIT. Please completely avoid regcoefW.c. It is full of internal protocol that is not related to WRAPIT and will continue to confuse you. I do not have time to analyze or debug your code and procedures. If needed, perhaps someone else is available. On Wed, Oct 26, 2022 at 3:09 AM Giorgio Graffino > wrote: Hi Dave, Thanks for confirming that. I'm changing the fortran subroutine Dennis sent last week into a function, but it keeps giving me an error wherever I try to use arrays as arguments. It only works when X and Y are scalar numbers. I really don't understand how a linear regression fit can be found with scalar numbers as arguments. I'm looking at the C interface to see how to subroutine is called, but there are too many things happening in regcoefW.c and it's difficult to understand the workflow. Can anyone please help me understand how to make the fortran subroutine work for 1d and 2d arrays? Cheers, Giorgio ------ Messaggio Originale ------ Da: dave.allured at noaa.gov A: g.graffino at tim.it Cc: ncl-talk at ucar.edu Inviato: luned? 24 ottobre 2022 22:10 Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept Giorgio, you are right, regcoefW.c is an NCL internal interface routine for regCoef_n. But it uses a different protocol than a WRAPIT interfaced function. Just ignore regcoefW.c, and follow the WRAPIT fortran instructions carefully, for your new function. Change the function name, and do not attempt to replace the built-in regCoef_n function. You can change the arguments as you like, but follow the documented WRAPIT rules. There are two different methods for calling external C functions: fortran wrapper, and shared object. Please study the WRAPIT documentation carefully. On Mon, Oct 24, 2022 at 1:35 PM Giorgio Graffino via ncl-talk > wrote: Hello, I'm doing some modifications to the regcoef_dp.f file to consider a zero y-intercept, but now I don't know how to try it in a script. The number of arguments in the fortran subroutine is different than in regCoef_n, so the subroutine is probably going through some more steps, possibly involving this script (https://github.com/NCAR/ncl/blob/develop/ni/src/lib/nfp/regcoefW.c ). Am I right? How can I incorporate both fortran and C scripts in my NCL script? I know I can use WRAPIT to read external fortran code, but what about C code? I need help please. Giorgio ------ Messaggio Originale ------ Da: ncl-talk at mailman.ucar.edu A: shea at ucar.edu Cc: ncl-talk at ucar.edu Inviato: venerd? 21 ottobre 2022 13:14 Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept Hi Dennis, Dave Thanks for sending the relevant function and for explaining how to access the source code. Now I'm thinking how to make the function to force the regression to pass from origin. Any idea on how to do that? Cheers, Giorgio ------ Messaggio Originale ------ Da: shea at ucar.edu A: g.graffino at tim.it Cc: dave.allured at noaa.gov ; ncl-talk at ucar.edu Inviato: gioved? 20 ottobre 2022 19:17 Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept The f77 code is attached. On Thu, Oct 20, 2022 at 9:53 AM Giorgio Graffino via ncl-talk > wrote: Hi Dave, Thanks for the advice. I looked at the examples in https://www.ncl.ucar.edu/Applications/regress.shtml , especially examples 2 and 4, but I couldn't find any supplementary information about regCoef. I also can't find anything under $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl and $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl. Is NCL source code located anywhere in $NCARG_ROOT? Can anyone please point me where it is? Cheers, Giorgio ------ Messaggio Originale ------ Da: dave.allured at noaa.gov A: g.graffino at tim.it Cc: ncl-talk at ucar.edu Inviato: gioved? 13 ottobre 2022 18:47 Oggetto: Re: [ncl-talk] regCoef_n without y-axis intercept Giorgio, for your second question, please see this very brief description that I recently wrote, for how to search for functions in the NCL source code. https://mailman.ucar.edu/pipermail/ncl-talk/2022-August/018954.html On Thu, Oct 13, 2022 at 10:38 AM Giorgio Graffino via ncl-talk > wrote: Hi NCL community, I want regCoef_n to find the regression coefficient between two arrays without y-axis intercept. Do you know how I can change the function to do that? Can you also please tell me where I can find the function? I did a grep recursive search in my $NCARG_ROOT directory but I couldn't find it. Cheers, 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: regcoef_dp_zerointercept.f Type: text/x-fortran Size: 4944 bytes Desc: not available URL: From debasish.hazra5 at gmail.com Thu Nov 3 12:33:00 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Thu, 3 Nov 2022 14:33:00 -0400 Subject: [ncl-talk] plot data in lambert_conformal grid Message-ID: Hi, I am trying to plot variable which is in lambert_conformal grid, but I am not able to generate the plot. Attached is ncl_filedump and ncl script.Can anyone point out how to do it. Thanks Debasish. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Copyright (C) 1995-2018 - All Rights Reserved University Corporation for Atmospheric Research NCAR Command Language Version 6.5.0 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: dynf000 path: /tmpnwprd/2022101400/fcst_fv3lam/dynf000.nc file global attributes: ak : bk : cen_lat : 38.5 cen_lon : -97.5 dx : 3000 dy : 3000 grid : lambert_conformal grid_id : 1 hydrostatic : non-hydrostatic lat1 : 21.13812 lon1 : -122.7195 ncnsto : 15 nx : 1799 ny : 1059 source : FV3GFS stdlat1 : 38.5 stdlat2 : 38.5 dimensions: grid_xt = 1799 grid_yt = 1059 nchars = 20 pfull = 65 phalf = 66 time = 1 variables: float pfull ( pfull ) cartesian_axis : Z edges : phalf long_name : ref full pressure level positive : down units : mb float phalf ( phalf ) cartesian_axis : Z long_name : ref half pressure level positive : down units : mb double time ( time ) calendar : JULIAN calendar_type : JULIAN cartesian_axis : T long_name : time units : hours since 2022-10-14 00:00:00 double grid_xt ( grid_xt ) cartesian_axis : X long_name : x-coordinate of projection units : meters double grid_yt ( grid_yt ) cartesian_axis : Y long_name : y-coordinate of projection units : meters character time_iso ( time, nchars ) long_name : valid time description : ISO 8601 datetime string double lon ( grid_yt, grid_xt ) long_name : T-cell longitude units : degrees_E double lat ( grid_yt, grid_xt ) long_name : T-cell latitude units : degrees_N float clwmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : cloud water mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float delz ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : height thickness missing_value : -1e+10 output_file : dyn units : m float dnvvelmax ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly downdraft velocity missing_value : -1e+10 output_file : dyn units : m/s float dpres ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : pressure thickness missing_value : -1e+10 output_file : dyn units : pa float dust ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : dust mixing ratio missing_value : -1e+10 output_file : dyn units : ug/kg float dzdt ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : vertical wind missing_value : -1e+10 output_file : dyn units : m/sec float grle ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : graupel mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float hgtsfc ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : surface geopotential height missing_value : -1e+10 output_file : dyn units : gpm float icmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : cloud ice mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float maxvort01 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-1km vert. vorticity missing_value : -1e+10 output_file : dyn units : 1/s float maxvort02 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-2km vert. vorticity missing_value : -1e+10 output_file : dyn units : 1/s float maxvorthy1 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly lev 1 vert vort. missing_value : -1e+10 output_file : dyn units : 1/s float o3mr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : ozone mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float pressfc ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : surface pressure missing_value : -1e+10 output_file : dyn units : pa float rwmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : rain water mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float smoke ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : smoke mixing ratio missing_value : -1e+10 output_file : dyn units : ug/kg float snmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : snow water mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float spfh ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : specific humidity missing_value : -1e+10 output_file : dyn units : kg/kg float srh01 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : 0-1km srh missing_value : -1e+10 output_file : dyn units : m/s**2 float srh03 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : 0-3km srh missing_value : -1e+10 output_file : dyn units : m/s**2 float tmp ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : temperature missing_value : -1e+10 output_file : dyn units : K float ugrd ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : zonal wind missing_value : -1e+10 output_file : dyn units : m/sec float uhmax03 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-3km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float uhmax25 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 2-5km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float uhmin03 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-3km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float uhmin25 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 2-5km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float upvvelmax ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly updraft velocity missing_value : -1e+10 output_file : dyn units : m/s float ustm ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : u comp of storm motion missing_value : -1e+10 output_file : dyn units : m/s float vgrd ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : meridional wind missing_value : -1e+10 output_file : dyn units : m/sec float vstm ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : v comp of storm motion missing_value : -1e+10 output_file : dyn units : m/s -------------- next part -------------- A non-text attachment was scrubbed... Name: test.ncl Type: application/octet-stream Size: 4770 bytes Desc: not available URL: From setareh.rahimi at gmail.com Fri Nov 4 08:56:36 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Fri, 4 Nov 2022 18:26:36 +0330 Subject: [ncl-talk] How to convert NCL script to a NetCDF file? In-Reply-To: References: Message-ID: Dear Dennis, Many thanks for your consideration. I executed the script and then imported the new NetCDF file to R software. However, lat/lon did not change. I attached the plot from the R. May I ask you to please advise me in this regard? Best wishes, On Mon, Oct 31, 2022 at 3:17 AM Dennis Shea wrote: > "The [R] software can not recognize the lat/lon. So I need to convert my > NCL script to a NetCDF file in an easily readable way for the R." > ==== > > > ncl-talk does not have much experience with R. > > The description "The [R] software can not recognize the lat/lon." > > Perhaps, the fact the the XLAT and XLONG are three dimensional (Time, > south_north, west_east) causes the problem? > I do not think ncl-talk is going to learn R's reading of netCDF files. > ***That is your responsibility. *** > ====================== > NOT TESTED > ==================== > > > load > "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" > > > inNC = "wef_chem.nc" ; original file > f = addfile(inNC, "r") > > > Times = f->Times ; char Times(Time, DateStrLen) ; > ; > ; https://www.ncl.ucar.edu/Document/Functions/WRF_contributed/wrf_times_c.shtml > ; > *time = wrf_times_c*( Times, 3 ) ; yyyymmddhh (integer) > time!0 = "time" ; name the dimension > > time&time = time > > TAUAER2 = f->TAUAER2 > TAUAER2!0 = "time" > TAUAER2&time = time > > TAUAER3 = f->TAUAER3 > TAUAER3!0 = "time" > TAUAER3&time = time > > xlat_2d = f->XLAT(0,:,:) ; 3D->2D > xlong_2d = f->XLONG(0,:,:) > > printVarSummaary(time) > > printVarSummaary(xlat_2d) > printVarSummaary(xlong_2d) > > printVarSummaary(TAUAER2) > printVarSummaary(TAUAER3) > > ;----------------------------- > > newNC = "setarah.nc" > > *system* ("/bin/rm -f + newNC) ; remove any pre-existing file > ncOUT = *addfile* (newNC ,"c") ; open OUTPUT netCDF file > > ;=================================================================== > ; create global attributes of the file (optional) > ;=================================================================== > fAtt = True ; assign file attributes > fAtt at title = "REWRITE of " + inNC > fAtt at source_file = inNC > ;;fAtt at Conventions = "None" > fAtt at creation_date = *systemfunc* ("date") > *fileattdef* ( ncOUT, fAtt ) ; add new attributes > > ncOUT->time = time > > ncOUT->XLAT = xlat_2d > > ncOUT->XLONG = xlong_2d > > ncOUT->TAUAER2 = TAUAER2 > ncOUT->TAUAER3 = TAUAER3 > > > On Sun, Oct 30, 2022 at 11:31 AM Setareh Rahimi via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Dear all NCL users, >> Using R software, I want to plot aerosol optical depth (AOD) from the >> WRF-chem model. Once import the model output in the R, the software can not >> recognize the lat/lon. So I need to convert my NCL script to a NetCDF file >> in an easily readable way for the R. How can I convert my NCL script (which >> includes converted time, lat/lon, and calculate AOD) to a new NetCDF file, >> please? The script and the model output have been attached. >> wef_chem.nc.gz >> >> >> -- >> S.Rahimi >> >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 29 Jun.png Type: image/png Size: 32412 bytes Desc: not available URL: From shea at ucar.edu Fri Nov 4 09:38:29 2022 From: shea at ucar.edu (Dennis Shea) Date: Fri, 4 Nov 2022 09:38:29 -0600 Subject: [ncl-talk] How to convert NCL script to a NetCDF file? In-Reply-To: References: Message-ID: Hi Setarah, My knowledge of R is rudimentary. I have used R for statistics only. It was used to make sure NCL statistical functions worked correctly. I have never used R's graphics. Hence, I can offer no guidance of the plot. Sorry, D On Fri, Nov 4, 2022 at 8:56 AM Setareh Rahimi wrote: > Dear Dennis, > Many thanks for your consideration. I executed the script and then > imported the new NetCDF file to R software. However, lat/lon did not > change. I attached the plot from the R. May I ask you to please advise me > in this regard? > Best wishes, > > On Mon, Oct 31, 2022 at 3:17 AM Dennis Shea wrote: > >> "The [R] software can not recognize the lat/lon. So I need to convert my >> NCL script to a NetCDF file in an easily readable way for the R." >> ==== >> >> >> ncl-talk does not have much experience with R. >> >> The description "The [R] software can not recognize the lat/lon." >> >> Perhaps, the fact the the XLAT and XLONG are three dimensional (Time, >> south_north, west_east) causes the problem? >> I do not think ncl-talk is going to learn R's reading of netCDF files. >> ***That is your responsibility. *** >> ====================== >> NOT TESTED >> ==================== >> >> >> load >> "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" >> >> >> inNC = "wef_chem.nc" ; original file >> f = addfile(inNC, "r") >> >> >> Times = f->Times ; char Times(Time, DateStrLen) ; >> ; >> ; https://www.ncl.ucar.edu/Document/Functions/WRF_contributed/wrf_times_c.shtml >> ; >> *time = wrf_times_c*( Times, 3 ) ; yyyymmddhh (integer) >> time!0 = "time" ; name the dimension >> >> time&time = time >> >> TAUAER2 = f->TAUAER2 >> TAUAER2!0 = "time" >> TAUAER2&time = time >> >> TAUAER3 = f->TAUAER3 >> TAUAER3!0 = "time" >> TAUAER3&time = time >> >> xlat_2d = f->XLAT(0,:,:) ; 3D->2D >> xlong_2d = f->XLONG(0,:,:) >> >> printVarSummaary(time) >> >> printVarSummaary(xlat_2d) >> printVarSummaary(xlong_2d) >> >> printVarSummaary(TAUAER2) >> printVarSummaary(TAUAER3) >> >> ;----------------------------- >> >> newNC = "setarah.nc" >> >> *system* ("/bin/rm -f + newNC) ; remove any pre-existing file >> ncOUT = *addfile* (newNC ,"c") ; open OUTPUT netCDF file >> >> ;=================================================================== >> ; create global attributes of the file (optional) >> ;=================================================================== >> fAtt = True ; assign file attributes >> fAtt at title = "REWRITE of " + inNC >> fAtt at source_file = inNC >> ;;fAtt at Conventions = "None" >> fAtt at creation_date = *systemfunc* ("date") >> *fileattdef* ( ncOUT, fAtt ) ; add new attributes >> >> ncOUT->time = time >> >> ncOUT->XLAT = xlat_2d >> >> ncOUT->XLONG = xlong_2d >> >> ncOUT->TAUAER2 = TAUAER2 >> ncOUT->TAUAER3 = TAUAER3 >> >> >> On Sun, Oct 30, 2022 at 11:31 AM Setareh Rahimi via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Dear all NCL users, >>> Using R software, I want to plot aerosol optical depth (AOD) from the >>> WRF-chem model. Once import the model output in the R, the software can not >>> recognize the lat/lon. So I need to convert my NCL script to a NetCDF file >>> in an easily readable way for the R. How can I convert my NCL script (which >>> includes converted time, lat/lon, and calculate AOD) to a new NetCDF file, >>> please? The script and the model output have been attached. >>> wef_chem.nc.gz >>> >>> >>> -- >>> S.Rahimi >>> >>> _______________________________________________ >>> ncl-talk mailing list >>> ncl-talk at mailman.ucar.edu >>> List instructions, subscriber options, unsubscribe: >>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>> >> > > -- > S.Rahimi > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From S1073755 at pm.univpm.it Sat Nov 5 04:26:20 2022 From: S1073755 at pm.univpm.it (Mauro Morichetti) Date: Sat, 5 Nov 2022 10:26:20 +0000 Subject: [ncl-talk] Time Latitude Plot problems In-Reply-To: <347AB654-C913-44E8-BC68-C19575831C13@pm.univpm.it> References: <347AB654-C913-44E8-BC68-C19575831C13@pm.univpm.it> Message-ID: Hi again, I have a second poorly formatted data file. The first problem seems to be there are too many Latitude coordinates (circa 4000), and since the latitude variables is not non-monotonic, I can not plot a values subset. The second problem is that the time is not a coordinate, but only a value; this problem should be solved. Could you please help me to decode the data? Thanks Regards Mauro -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RainGauges_Vaia.nc.zip Type: application/zip Size: 240221 bytes Desc: RainGauges_Vaia.nc.zip URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RainGauges_map.ncl Type: application/octet-stream Size: 3725 bytes Desc: RainGauges_map.ncl URL: From debasish.hazra5 at gmail.com Sat Nov 5 10:40:36 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Sat, 5 Nov 2022 12:40:36 -0400 Subject: [ncl-talk] plot data in lambert_conformal grid In-Reply-To: References: Message-ID: Resending my earlier question, if that did not go through. Please see below On Thu, Nov 3, 2022 at 2:33 PM Debasish Hazra wrote: > Hi, > I am trying to plot variable which is in lambert_conformal grid, but I am > not able to generate the plot. Attached is ncl_filedump and ncl script.Can > anyone point out how to do it. Thanks > > Debasish. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From setareh.rahimi at gmail.com Mon Nov 7 02:45:38 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Mon, 7 Nov 2022 13:15:38 +0330 Subject: [ncl-talk] Set desired color map Message-ID: Dear NCL users, I need to set my desired color map for my plot. I defined it this way in NCL: gsn_define_colormap(wks,"GMT_no_green") (CHECK the attached). But NCL used the default color map (https:// www.ncl.ucar.edu/Document/Graphics/ColorTables/ncl_default.shtml). Moreover, I tested this command line: res at cnFillPalette = "GMT_no_green", bud did not work! How can I manage this issue, please? Best wishes, -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From setareh.rahimi at gmail.com Mon Nov 7 02:47:22 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Mon, 7 Nov 2022 13:17:22 +0330 Subject: [ncl-talk] Set desired color map Message-ID: Dear NCL users, I need to set my desired color map for my plot. I defined it this way in NCL: gsn_define_colormap(wks,"GMT_no_green") (CHECK the attached). But NCL used the default color map (https:// www.ncl.ucar.edu/Document/Graphics/ColorTables/ncl_default.shtml). Moreover, I tested this command line: res at cnFillPalette = "GMT_no_green", bud did not work! How can I manage this issue, please? Best wishes, -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" ;*************************************************************************************************************************** f = addfile ("wrfout_d01_2011-06-22_00:00:00", "r") print(f) ; same as "nmcdump -h" Times = f->Times ; [Time | 41] x [DateStrLen | 19] (character) Time_0 = wrf_times_c( Times, 0 ) ; "hours since" initial time on file (double) ; Time_0 is recognized by cd_calendar Time_3 = wrf_times_c( Times, 3 ) ; yyyymmddhh (type "integer") Time_3 = Time_3/100 ; remove 'ss' part of Time_3 Time_3 at units = "yyyymmdd" print("********************************************************************************************************************") wks = gsn_open_wks("png" ,"WRF_aod_Daily-Average") ; ps,pdf,x11,ncgm,eps gsn_define_colormap(wks,"GMT_no_green") ; select color map res = True ; plot mods desired res at cnConstFEnableFill = True res at gsnMaximize = True res at gsnSpreadColors = True res at cnFillOn = True res at cnLinesOn = False res at cnLineLabelsOn = Fals WRF_map_c(f, res, 0) res at tfDoNDCOverlay = True ;************************************************************************************** ;************************************************************************************** res at cnLevelSelectionMode = "ExplicitLevels" res at cnLevels = (/0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2,2.1,2.2,2.3,2.4,2.5/) res at mpFillOn = False res at mpLimitMode = "LatLon" ; choose region of map res at mpLeftCornerLatF = xlat(0,0) res at mpLeftCornerLonF = xlon(0,0) res at mpRightCornerLatF = xlat(nlat-1,mlon-1) res at mpRightCornerLonF = xlon(nlat-1,mlon-1) res at mpDataBaseVersion = "MediumRes" ; better map outlines res at pmTickMarkDisplayMode= "Always" ; turn on tickmarks ;res at mpOutlineBoundarySets = "GeophysicalAndUSStates" res at pmTickMarkDisplayMode = "Always" res at mpMaxLatF = 40 ; choose subregion res at mpMinLatF = 24 res at mpMaxLonF = 63 res at mpMinLonF = 44 ;res at sfXArray = xlon ; equivalently x at lon2d = xlon ;res at sfYArray = xlat ; equivalently x at lat2d = xlat ;*************************************************************************************************************************** ymd = cd_calendar(Time_0, -2) print(ymd) YMD = 20110629 mt = ind(YMD.eq.ymd) wks = gsn_open_wks("png" ,"WRF_aod_Daily-Average"+YMD) ;;print(mt) A2 = f->TAUAER2 ; (Time, south_north, west_east) A2&Time = Time_0 ; associate the 'Time' coordinate with the variable using standard NCL & syntax a2 = A2(mt,:,:,:) ; (Time, south_north, west_east) printVarSummary(a2) ; [Time | 8] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] delete(A2) B3 = f->TAUAER3 ; (Time, south_north, west_east) B3&Time = Time_0 ; associate the 'Time' coordinate with the variable using standard NCL & syntax b3 = B3(mt,:,:,:) ; (Time, south_north, west_east) printVarSummary(b3) ; [Time | 8] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] delete(B3) time_3 = Time_3(mt) ; (Time | 8) print(time_3) print("********************************************************************************************************************") opt_cdv = True ; option for calculate_daily_values (cdv) opt_cdv at nval_crit = 4 ; default is 1 a2Day = calculate_daily_values (a2, "avg", 0, opt_cdv) printVarSummary(a2Day) ; [Time | 1] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] printMinMax (a2Day,1) b3Day = calculate_daily_values (b3, "avg", 0, opt_cdv) printVarSummary(b3Day) ; [Time | 1] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] printMinMax (b3Day,1) print("") print("***********************************************************************************************************") print("") angstrom_exponent = -(log(a2Day)-log(b3Day))/log(400./600.) printVarSummary(angstrom_exponent) ; [1] x [35] x [199] x [199] printMinMax((angstrom_exponent) ; [1] x [35] x [199] x [199] AOD550_3D = a2Day * ((400.0/550.0)^angstrom_exponent) ;AOD550_3D at long_name = "AOD550_3D" AOD550_3D at description = "AOD550_3D" copy_VarCoords(a2Day,AOD550_3D ) printVarSummary(AOD550_3D) ; [Time | 1] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] AOD550_2D = dim_sum_n_Wrap(AOD550_3D,1) ;AOD550_2D at long_name = "AOD550_2D" ;AOD550_2D at description = "AOD550_2D" printVarSummary(AOD550_2D) ; [bottom_top | 35] x [south_north | 199] x [west_east | 199] if (any(isnan_ieee(AOD550_2D))) then value = 9.96921e+36 replace_ieeenan (AOD550_2D,value,0) AOD550_2D at _FillValue = value end if printVarSummary(AOD550_2D) printMinMax (AOD550_2D,1) print("") print("***********************************************************************************************************") print("") res at tiMainString = "AOD-" + time_3(0) ;;res at gsnLeftString = a at description ; ????????????????? res at gsnLeftString = AOD550_2D at description print(res) plot = gsn_csm_contour_map(wks,AOD550_2D(0,:,:),res) shapefile_name1 = "world-administrative-boundaries.shp" shapefile_name2 = "gadm36_IRN_0.shp" lnres = True lnres at gsLineThicknessF = 3.0 lnres at gsLineColor = "Black" shape1 = gsn_add_shapefile_polylines(wks,plot,shapefile_name1,lnres) shape2 = gsn_add_shapefile_polylines(wks,plot,shapefile_name2,lnres) res at gsnDraw = False res at gsnFrame= False draw(plot) frame(wks) From brownrig at ucar.edu Mon Nov 7 07:39:54 2022 From: brownrig at ucar.edu (Rick Brownrigg) Date: Mon, 7 Nov 2022 07:39:54 -0700 Subject: [ncl-talk] Set desired color map In-Reply-To: References: Message-ID: Hi, In your attached script, you open the workstation at around line 20, and call gen_define_colormap(). Then around line 65, you call "wks = gsn_open_wks()" again, thus overwriting all previous settings associated with the variable wks. I don't know why the assignment to cnFillPalette did not work, I don't see it in your script. Hope that helps... Rick On Mon, Nov 7, 2022 at 2:47 AM Setareh Rahimi via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear NCL users, > I need to set my desired color map for my plot. I defined it this way in > NCL: gsn_define_colormap(wks,"GMT_no_green") (CHECK the attached). > But NCL used the default color map (https:// > www.ncl.ucar.edu/Document/Graphics/ColorTables/ncl_default.shtml). > Moreover, I tested this command line: res at cnFillPalette = > "GMT_no_green", bud did not work! > How can I manage this issue, please? > Best wishes, > > > -- > S.Rahimi > > _______________________________________________ > 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 Mon Nov 7 12:34:48 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Mon, 7 Nov 2022 14:34:48 -0500 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data Message-ID: Hi, I am trying to plot variable which is in lambert_conformal grid, but I am not able to generate the plot. Attached is ncl_filedump and ncl script.Can anyone point out how to do it. Thanks Debasish. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Copyright (C) 1995-2018 - All Rights Reserved University Corporation for Atmospheric Research NCAR Command Language Version 6.5.0 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: dynf000 path: /tmpnwprd/2022101400/fcst_fv3lam/dynf000.nc file global attributes: ak : bk : cen_lat : 38.5 cen_lon : -97.5 dx : 3000 dy : 3000 grid : lambert_conformal grid_id : 1 hydrostatic : non-hydrostatic lat1 : 21.13812 lon1 : -122.7195 ncnsto : 15 nx : 1799 ny : 1059 source : FV3GFS stdlat1 : 38.5 stdlat2 : 38.5 dimensions: grid_xt = 1799 grid_yt = 1059 nchars = 20 pfull = 65 phalf = 66 time = 1 variables: float pfull ( pfull ) cartesian_axis : Z edges : phalf long_name : ref full pressure level positive : down units : mb float phalf ( phalf ) cartesian_axis : Z long_name : ref half pressure level positive : down units : mb double time ( time ) calendar : JULIAN calendar_type : JULIAN cartesian_axis : T long_name : time units : hours since 2022-10-14 00:00:00 double grid_xt ( grid_xt ) cartesian_axis : X long_name : x-coordinate of projection units : meters double grid_yt ( grid_yt ) cartesian_axis : Y long_name : y-coordinate of projection units : meters character time_iso ( time, nchars ) long_name : valid time description : ISO 8601 datetime string double lon ( grid_yt, grid_xt ) long_name : T-cell longitude units : degrees_E double lat ( grid_yt, grid_xt ) long_name : T-cell latitude units : degrees_N float clwmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : cloud water mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float delz ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : height thickness missing_value : -1e+10 output_file : dyn units : m float dnvvelmax ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly downdraft velocity missing_value : -1e+10 output_file : dyn units : m/s float dpres ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : pressure thickness missing_value : -1e+10 output_file : dyn units : pa float dust ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : dust mixing ratio missing_value : -1e+10 output_file : dyn units : ug/kg float dzdt ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : vertical wind missing_value : -1e+10 output_file : dyn units : m/sec float grle ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : graupel mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float hgtsfc ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : surface geopotential height missing_value : -1e+10 output_file : dyn units : gpm float icmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : cloud ice mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float maxvort01 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-1km vert. vorticity missing_value : -1e+10 output_file : dyn units : 1/s float maxvort02 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-2km vert. vorticity missing_value : -1e+10 output_file : dyn units : 1/s float maxvorthy1 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly lev 1 vert vort. missing_value : -1e+10 output_file : dyn units : 1/s float o3mr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : ozone mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float pressfc ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : surface pressure missing_value : -1e+10 output_file : dyn units : pa float rwmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : rain water mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float smoke ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : smoke mixing ratio missing_value : -1e+10 output_file : dyn units : ug/kg float snmr ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : snow water mixing ratio missing_value : -1e+10 output_file : dyn units : kg/kg float spfh ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : specific humidity missing_value : -1e+10 output_file : dyn units : kg/kg float srh01 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : 0-1km srh missing_value : -1e+10 output_file : dyn units : m/s**2 float srh03 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : 0-3km srh missing_value : -1e+10 output_file : dyn units : m/s**2 float tmp ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : temperature missing_value : -1e+10 output_file : dyn units : K float ugrd ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : zonal wind missing_value : -1e+10 output_file : dyn units : m/sec float uhmax03 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-3km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float uhmax25 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 2-5km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float uhmin03 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 0-3km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float uhmin25 ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly 2-5km updraft helicity missing_value : -1e+10 output_file : dyn units : m/s**2 float upvvelmax ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : Max hourly updraft velocity missing_value : -1e+10 output_file : dyn units : m/s float ustm ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : u comp of storm motion missing_value : -1e+10 output_file : dyn units : m/s float vgrd ( time, pfull, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : meridional wind missing_value : -1e+10 output_file : dyn units : m/sec float vstm ( time, grid_yt, grid_xt ) _FillValue : -1e+10 cell_methods : time: point long_name : v comp of storm motion missing_value : -1e+10 output_file : dyn units : m/s -------------- next part -------------- A non-text attachment was scrubbed... Name: test.ncl Type: application/octet-stream Size: 4770 bytes Desc: not available URL: From asphilli at ucar.edu Mon Nov 7 14:28:08 2022 From: asphilli at ucar.edu (Adam Phillips) Date: Mon, 7 Nov 2022 14:28:08 -0700 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data In-Reply-To: References: Message-ID: Hi Debasish, I do not have any experience working with lambert_conformal gridded data, but looking at your ncdump output there are variables named lat and lon that are 2D variables that I think you can use to plot the data directly using the lat2d/lon2d assignment method. I would try this: dustsfc = flt2dble(a1->dust) lev = a1->pfull dustsfc2 at lat2d = a1->lat dustsfc2 at lon2d = a1->lon labes = (/"Dust conc(ug/kg) at surface : 00FH"/) wks_type = "png" ..... (continue using the rest of your script) If that does not work I would recommend creating a new netCDF file that only contains a single 3D variable, along with the first 8 variables shown in your ncdump output (pfull->lat), and send that new file to the ncl-talk email list. Include your most recent script and any error messages that you are getting as well. Good luck, Adam On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi, > I am trying to plot variable which is in lambert_conformal grid, but I am > not able to generate the plot. Attached is ncl_filedump and ncl script.Can > anyone point out how to do it. Thanks > > Debasish. > _______________________________________________ > ncl-talk mailing list > ncl-talk at mailman.ucar.edu > List instructions, subscriber options, unsubscribe: > https://mailman.ucar.edu/mailman/listinfo/ncl-talk > -- 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 setareh.rahimi at gmail.com Tue Nov 8 03:04:07 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Tue, 8 Nov 2022 13:34:07 +0330 Subject: [ncl-talk] Set desired color map In-Reply-To: References: Message-ID: Dear Rick, So many thanks for your help. The issue has been resolved now. I used the " cnFillPalette", but it did not work so I removed it from the script. Best wishes, On Mon, Nov 7, 2022 at 6:10 PM Rick Brownrigg wrote: > Hi, > > In your attached script, you open the workstation at around line 20, and > call gen_define_colormap(). Then around line 65, you call "wks = > gsn_open_wks()" again, thus overwriting all previous settings associated > with the variable wks. I don't know why the assignment to cnFillPalette > did not work, I don't see it in your script. > > Hope that helps... > Rick > > > On Mon, Nov 7, 2022 at 2:47 AM Setareh Rahimi via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Dear NCL users, >> I need to set my desired color map for my plot. I defined it this way in >> NCL: gsn_define_colormap(wks,"GMT_no_green") (CHECK the attached). >> But NCL used the default color map (https:// >> www.ncl.ucar.edu/Document/Graphics/ColorTables/ncl_default.shtml). >> Moreover, I tested this command line: res at cnFillPalette = >> "GMT_no_green", bud did not work! >> How can I manage this issue, please? >> Best wishes, >> >> >> -- >> S.Rahimi >> >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From setareh.rahimi at gmail.com Tue Nov 8 03:56:40 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Tue, 8 Nov 2022 14:26:40 +0330 Subject: [ncl-talk] Dust concentration from 5 dust bin sizes Message-ID: Dear NCL users, I am trying to plot the total dust concentration from the WRF-Chem output. To achieve this end, I sum over 5 dust bin sizes (check the attached script) this way: "at= a1+a2+a3+a4+a5". I am not sure if this way of summation over 5 variables work correctly! However, as you can see from the attached screenshot, I received some errors. The first error is weird to me cause I did not define the variable "x" in my script. "fatal:(missing) is not a named dimension in variable (x)". What is wrong with my script that NCL cannot recognize the "(Day)" variable? Please kindly advise me in terms of these issues. Best wishes, DUST_chem.nc.gz -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" ;*************************************************************************************************************************** f = addfile ("wrfout_d01_2011-06-22_00:00:00", "r") ;print(f) ; same as "nmcdump -h" Times = f->Times ; [Time | 41] x [DateStrLen | 19] (character) Time_0 = wrf_times_c( Times, 0 ) ; "hours since" initial time on file (double) ; Time_0 is recognized by cd_calendar Time_3 = wrf_times_c( Times, 3 ) ; yyyymmddhh (type "integer") Time_3 = Time_3/100 ; remove 'ss' part of Time_3 Time_3 at units = "yyyymmdd" ymd = cd_calendar(Time_0, -2) print(ymd) YMD = 20110630 print("********************************************************************************************************************") wks = gsn_open_wks("png" ,"WRF_dust_wind_Daily-Average"+YMD) ; ps,pdf,x11,ncgm,eps ;gsn_define_colormap(wks,"GMT_no_green") ; select color map res = True ; plot mods desired res at cnConstFEnableFill = True res at gsnMaximize = True res at gsnSpreadColors = True res at cnFillOn = True res at cnLinesOn = False res at cnLineLabelsOn = Fals WRF_map_c(f, res, 0) res at tfDoNDCOverlay = True ;********************************************************************************************************************* ;********************************************************************************************************************* ;res at cnLevelSelectionMode = "ExplicitLevels" ;res at cnLevels = (/0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2,2.1,2.2,2.3,2.4,2.5/) res at mpFillOn = False res at mpLimitMode = "LatLon" ; choose region of map res at mpDataBaseVersion = "MediumRes" ; better map outlines res at pmTickMarkDisplayMode= "Always" ; turn on tickmarks res at pmTickMarkDisplayMode = "Always" res at mpMaxLatF = 40 ; choose subregion res at mpMinLatF = 24 res at mpMaxLonF = 63 res at mpMinLonF = 44 ;*************************************************************************************************************************** ;ymd = cd_calendar(Time_0, -2) ;print(ymd) ;YMD = 20110705 mt = ind(YMD.eq.ymd) A1 = f->DUST_1 ; (Time, south_north, west_east) A1&Time = Time_0 ; associate the 'Time' coordinate with the variable using standard NCL & syntax a1 = A1(mt,:,:,:) ; (Time, south_north, west_east) printVarSummary(a1) ; [Time | 8] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] ;*************************************************************************************************************************** A2 =f->DUST_2 A2&Time = Time_0 a2 = A2(mt,:,:,:) A3 =f->DUST_3 A3&Time = Time_0 a3 = A3(mt,:,:,:) A4 =f->DUST_4 A4&Time = Time_0 a4 = A4(mt,:,:,:) A5 =f->DUST_5 A5&Time = Time_0 a5 = A5(mt,:,:,:) ;*************************************************************************************************************************** at= a1+a2+a3+a4+a5 ;sum over all 5 dust bin sizes to get total dust concentration at at time = "Time" at at long_name = "Total dust" at at description = "Total dust from 5 bin dust sizes" if (any(isnan_ieee(at))) then value = 9.96921e+36 replace_ieeenan (at,0) at at _FillValue = value end if printVarSummary(at) ;print(at) ;*************************************************************************************************************************** time_3 = Time_3(mt) ; (Time | 8) print(time_3) print("********************************************************************************************************************") opt_cdv = True ; option for calculate_daily_values (cdv) opt_cdv at nval_crit = 4 ; default is 1 Day = calculate_daily_values (at, "avg", 0, opt_cdv) printVarSummary(Day) ; [Time | 1] x [bottom_top | 35] x [south_north | 199] x [west_east | 199] printMinMax (Day,1) print(Day) dd = dim_sum_n_Wrap( Day(:,0:34,:,:), 1) printVarSummary(dd) ;print(dd) print("") print("***********************************************************************************************************") print("***********************************************************************************************************") print("") res at tiMainString = "DUST- " + time_3(0) plot = gsn_csm_contour_map(wks,dd(0,:,:),res) shapefile_name1 = "world-administrative-boundaries.shp" shapefile_name2 = "gadm36_IRN_0.shp" lnres = True lnres at gsLineThicknessF = 3.0 lnres at gsLineColor = "Black" shape1 = gsn_add_shapefile_polylines(wks,plot,shapefile_name1,lnres) shape2 = gsn_add_shapefile_polylines(wks,plot,shapefile_name2,lnres) res at gsnDraw = False res at gsnFrame= False draw(plot) frame(wks) -------------- next part -------------- A non-text attachment was scrubbed... Name: dust.png Type: image/png Size: 151996 bytes Desc: not available URL: From brownrig at ucar.edu Tue Nov 8 09:36:55 2022 From: brownrig at ucar.edu (Rick Brownrigg) Date: Tue, 8 Nov 2022 09:36:55 -0700 Subject: [ncl-talk] Dust concentration from 5 dust bin sizes In-Reply-To: References: Message-ID: Hi, It appears that something goes awry in the function calculate_daily_values(), and errors cascade from there. The docs for that function state that the input variable must have an associated *time* coordinate variable with units recognizable by cd_calendar: https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml I suspect that is the problem. I didn't have access to look at your data file, and in any case, it would take me more time than I can devote at the moment to figure out the coordinate stuff. But perhaps this gives you a hint on how to move forward. Rick On Tue, Nov 8, 2022 at 3:57 AM Setareh Rahimi via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear NCL users, > > I am trying to plot the total dust concentration from the WRF-Chem output. > To achieve this end, I sum over 5 dust bin sizes (check the attached > script) this way: > "at= a1+a2+a3+a4+a5". > > I am not sure if this way of summation over 5 variables work correctly! > > However, as you can see from the attached screenshot, I received some > errors. The first error is weird to me cause I did not define the > variable "x" in my script. > "fatal:(missing) is not a named dimension in variable (x)". > > What is wrong with my script that NCL cannot recognize the "(Day)" > variable? > > Please kindly advise me in terms of these issues. > Best wishes, > DUST_chem.nc.gz > > > > -- > S.Rahimi > > _______________________________________________ > 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 setareh.rahimi at gmail.com Tue Nov 8 11:52:04 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Tue, 8 Nov 2022 22:22:04 +0330 Subject: [ncl-talk] Dust concentration from 5 dust bin sizes In-Reply-To: References: Message-ID: Dear Rick, So many thanks for your help. Yes, you are right, and I could sort the issue out now! Best wishes, On Tue, Nov 8, 2022 at 8:07 PM Rick Brownrigg wrote: > Hi, > > It appears that something goes awry in the function > calculate_daily_values(), and errors cascade from there. The docs for that > function state that the input variable must have an associated *time* > coordinate variable with units recognizable by cd_calendar: > > > https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml > > I suspect that is the problem. I didn't have access to look at your data > file, and in any case, it would take me more time than I can devote at the > moment to figure out the coordinate stuff. But perhaps this gives you a > hint on how to move forward. > > Rick > > > On Tue, Nov 8, 2022 at 3:57 AM Setareh Rahimi via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Dear NCL users, >> >> I am trying to plot the total dust concentration from the WRF-Chem >> output. To achieve this end, I sum over 5 dust bin sizes (check the >> attached script) this way: >> "at= a1+a2+a3+a4+a5". >> >> I am not sure if this way of summation over 5 variables work correctly! >> >> However, as you can see from the attached screenshot, I received some >> errors. The first error is weird to me cause I did not define the >> variable "x" in my script. >> "fatal:(missing) is not a named dimension in variable (x)". >> >> What is wrong with my script that NCL cannot recognize the "(Day)" >> variable? >> >> Please kindly advise me in terms of these issues. >> Best wishes, >> DUST_chem.nc.gz >> >> >> >> -- >> S.Rahimi >> >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From debasish.hazra5 at gmail.com Wed Nov 9 08:55:59 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Wed, 9 Nov 2022 10:55:59 -0500 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data In-Reply-To: References: Message-ID: Thanks Adam, unfortunately It did not work. I have attached a tried script . I ma trying to put data in ftp, using this link https://www.ncl.ucar.edu/ftp_files.shtml .But is not working. Any help is appreciated. Thanks, Debasish. On Mon, Nov 7, 2022 at 4:28 PM Adam Phillips wrote: > Hi Debasish, > I do not have any experience working with lambert_conformal gridded data, > but looking at your ncdump output there are variables named lat and lon > that are 2D variables that I think you can use to plot the data directly > using the lat2d/lon2d assignment method. > I would try this: > > dustsfc = flt2dble(a1->dust) > lev = a1->pfull > dustsfc2 at lat2d = a1->lat > dustsfc2 at lon2d = a1->lon > labes = (/"Dust conc(ug/kg) at surface : 00FH"/) > > wks_type = "png" > ..... (continue using the rest of your script) > > If that does not work I would recommend creating a new netCDF file that > only contains a single 3D variable, along with the first 8 variables shown > in your ncdump output (pfull->lat), and send that new file to the ncl-talk > email list. Include your most recent script and any error messages that you > are getting as well. > Good luck, > Adam > > On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi, >> I am trying to plot variable which is in lambert_conformal grid, but I am >> not able to generate the plot. Attached is ncl_filedump and ncl script.Can >> anyone point out how to do it. Thanks >> >> Debasish. >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > > > -- > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Test_lambert.ncl Type: application/octet-stream Size: 4177 bytes Desc: not available URL: From debasish.hazra5 at gmail.com Thu Nov 10 09:30:14 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Thu, 10 Nov 2022 11:30:14 -0500 Subject: [ncl-talk] ftp link to put data Message-ID: Hi, I am trying to put sample data following this link : https://www.ncl.ucar.edu/ftp_files.shtml But I am getting following error in incoming directory : put: Access failed: 553 Could not create file. Any suggestions? Thanks Debasish. -------------- next part -------------- An HTML attachment was scrubbed... URL: From asphilli at ucar.edu Fri Nov 11 12:38:05 2022 From: asphilli at ucar.edu (Adam Phillips) Date: Fri, 11 Nov 2022 12:38:05 -0700 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data In-Reply-To: References: Message-ID: Hi Debasish, As a reminder, please do not write to any ncl-talk contributor directly unless asked to do so. This way the community can see the complete discussion. The ftp site seemingly works for some people but fails for others, and there unfortunately is nothing that can be done about it. The best way forward is for ncl-talk participants to reduce the size of their data file to a size less than 15MB, and to email the file to ncl-talk, as you have done here. With regards to the file you sent (simple2.nc): The file does not include variables that are needed to correctly plot the data. For example, the lat and lon arrays were not included. Please include the first 8 variables shown in your ncdump output shown in your original message. Finally, you say the plot did not work, but ncl-talk needs more information to be able to help. What did not work? Was a plot created? If so, was the data displayed incorrectly? Were there any error messages returned to the terminal? If so, what were they? Unfortunately, less folks are participating in ncl-talk discussions, and there are no longer any NCAR staff that are paid to respond. The more information users provide in initial ncl-talk queries, the cleaner/easier the included script is to inspect, the better the odds are that the query will be answered. Adam On Wed, Nov 9, 2022 at 11:11 AM Debasish Hazra wrote: > I am not able to put the full data file on ucar ftp. But extracted the > variable in 2D and attached in the email. > Thanks > Debasish > > On Wed, Nov 9, 2022 at 10:55 AM Debasish Hazra > wrote: > >> Thanks Adam, unfortunately It did not work. I have attached a tried >> script . I ma trying to put data in ftp, using this link >> https://www.ncl.ucar.edu/ftp_files.shtml .But is not working. >> Any help is appreciated. >> Thanks, >> Debasish. >> >> On Mon, Nov 7, 2022 at 4:28 PM Adam Phillips wrote: >> >>> Hi Debasish, >>> I do not have any experience working with lambert_conformal gridded >>> data, but looking at your ncdump output there are variables named lat and >>> lon that are 2D variables that I think you can use to plot the data >>> directly using the lat2d/lon2d assignment method. >>> I would try this: >>> >>> dustsfc = flt2dble(a1->dust) >>> lev = a1->pfull >>> dustsfc2 at lat2d = a1->lat >>> dustsfc2 at lon2d = a1->lon >>> labes = (/"Dust conc(ug/kg) at surface : 00FH"/) >>> >>> wks_type = "png" >>> ..... (continue using the rest of your script) >>> >>> If that does not work I would recommend creating a new netCDF file that >>> only contains a single 3D variable, along with the first 8 variables shown >>> in your ncdump output (pfull->lat), and send that new file to the ncl-talk >>> email list. Include your most recent script and any error messages that you >>> are getting as well. >>> Good luck, >>> Adam >>> >>> On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk < >>> ncl-talk at mailman.ucar.edu> wrote: >>> >>>> Hi, >>>> I am trying to plot variable which is in lambert_conformal grid, but I >>>> am not able to generate the plot. Attached is ncl_filedump and ncl >>>> script.Can anyone point out how to do it. Thanks >>>> >>>> Debasish. >>>> _______________________________________________ >>>> ncl-talk mailing list >>>> ncl-talk at mailman.ucar.edu >>>> List instructions, subscriber options, unsubscribe: >>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>> >>> >>> >>> -- >>> Adam Phillips >>> Associate Scientist IV, Climate Analysis Section >>> Climate and Global Dynamics Laboratory >>> National Center for Atmospheric Research >>> www.cgd.ucar.edu/staff/asphilli/ >>> >>> >>> >> -- 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 laura at ucar.edu Fri Nov 11 17:05:49 2022 From: laura at ucar.edu (Laura Fowler) Date: Fri, 11 Nov 2022 17:05:49 -0700 Subject: [ncl-talk] conversion from loop to array syntax Message-ID: Hello: I have an integer array that includes the index of the PBL top (kpbl). I would like to get the pressure (press) corresponding to the index of the PBL top. A printVarSummary provides the following information: Variable: kpbl Type: integer Total Size: 10485768 bytes 2621442 values Number of Dimensions: 1 Dimensions and sizes: [nCells | 2621442] Coordinates: Number Of Attributes: 2 units : unitless long_name : index level of PBL top Variable: pres Type: float Total Size: 576717240 bytes 144179310 values Number of Dimensions: 2 Dimensions and sizes: [nCells | 2621442] x [nVertLevels | 55] Coordinates: Number Of Attributes: 3 _FillValue : 9.96921e+36 units : hPa long_name : Pressure at layer midpoint where nCells is the number of grid columns and nVertLevels is the number of vertical levels. Below is the loop that I would like to convert to a more compact array syntax: do n = 0,nCells-1 pp(n) = pres(n,kpbl(n)) print("--- n = "+n +" "+kpbl(n) +" "+pres(n,kpbl(n)) +" "+pp(n)) end do When I convert the loop above to the following array syntax (see below), I unfortunately get a "Segmentation Fault". pp(:) = pres(:,kpbl(:)) fatal:VarVarWrite: Number of dimensions on left hand side does not match right hand side fatal:["Execute.c":8637]:Execute: Error occurred at or near line 207 in file plot.pressure.ncl Can somebody help me figure this out. I would really appreciate it. Thanks, Laura note: I posted the same email this morning, but to the address ncl-talk-request at ucar.edu. Not sure which email to use for posts. Sorry about the double email message. -- !------------------------------------------------------------------------------------------------------------- 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 Fri Nov 11 18:03:18 2022 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Fri, 11 Nov 2022 20:03:18 -0500 Subject: [ncl-talk] conversion from loop to array syntax In-Reply-To: References: Message-ID: Laura, I am not sure that will work. But if it does, assign the result to a new variable, not a predefined one. Or else use the replacement operator. Try this, see if you get the expected result dimensions: pp = pres(:,kpbl(:)) Also, it is simply ncl-talk at ucar.edu. On Fri, Nov 11, 2022 at 7:06 PM Laura Fowler via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hello: > I have an integer array that includes the index of the PBL top (kpbl). I > would like to get the pressure (press) corresponding to the index of the > PBL top. A printVarSummary provides the following information: > > Variable: kpbl > > Type: integer > > Total Size: 10485768 bytes > > 2621442 values > > Number of Dimensions: 1 > > Dimensions and sizes: [nCells | 2621442] > > Coordinates: > > Number Of Attributes: 2 > > units : unitless > > long_name : index level of PBL top > > > Variable: pres > > Type: float > > Total Size: 576717240 bytes > > 144179310 values > > Number of Dimensions: 2 > > Dimensions and sizes: [nCells | 2621442] x [nVertLevels | 55] > > Coordinates: > > Number Of Attributes: 3 > > _FillValue : 9.96921e+36 > > units : hPa > > long_name : Pressure at layer midpoint > > > where nCells is the number of grid columns and nVertLevels is the > number of vertical levels. Below is the loop that I would like to convert > to a more compact array syntax: > > > do n = 0,nCells-1 > > pp(n) = pres(n,kpbl(n)) > > print("--- n = "+n +" "+kpbl(n) +" "+pres(n,kpbl(n)) +" "+pp(n)) > > end do > > > When I convert the loop above to the following array syntax (see below), I > unfortunately get a "Segmentation Fault". > > pp(:) = pres(:,kpbl(:)) > > > fatal:VarVarWrite: Number of dimensions on left hand side does not match > right hand side > > fatal:["Execute.c":8637]:Execute: Error occurred at or near line 207 in > file plot.pressure.ncl > > > > Can somebody help me figure this out. I would really appreciate it. > > Thanks, > > Laura > > > note: I posted the same email this morning, but to the address > ncl-talk-request at ucar.edu. Not sure which email to use for posts. Sorry > about the double email message. > > > !------------------------------------------------------------------------------------------------------------- > 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 Nov 11 18:04:23 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Fri, 11 Nov 2022 20:04:23 -0500 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data In-Reply-To: References: Message-ID: Hi Adam, Thanks. I have put first 8 variables as you suggested and put them in google drive (as putting in ftp failed again) : https://drive.google.com/drive/folders/1FCFWNVf95sLpjhBYfMt7zZyqz_hiNZ2i?usp=sharing and shared it among ncl-talk group. I have worked on the ncl script and attached the current code and figure. Any help on this is appreciated. Debasish On Fri, Nov 11, 2022 at 2:38 PM Adam Phillips wrote: > Hi Debasish, > As a reminder, please do not write to any ncl-talk contributor directly > unless asked to do so. This way the community can see the complete > discussion. > The ftp site seemingly works for some people but fails for others, and > there unfortunately is nothing that can be done about it. The best way > forward is for ncl-talk participants to reduce the size of their data file > to a size less than 15MB, and to email the file to ncl-talk, as you have > done here. > > With regards to the file you sent (simple2.nc): The file does not include > variables that are needed to correctly plot the data. For example, the lat > and lon arrays were not included. Please include the first 8 variables > shown in your ncdump output shown in your original message. > > Finally, you say the plot did not work, but ncl-talk needs more > information to be able to help. What did not work? Was a plot created? If > so, was the data displayed incorrectly? Were there any error messages > returned to the terminal? If so, what were they? > > Unfortunately, less folks are participating in ncl-talk discussions, and > there are no longer any NCAR staff that are paid to respond. The more > information users provide in initial ncl-talk queries, the cleaner/easier > the included script is to inspect, the better the odds are that the query > will be answered. > Adam > > > > On Wed, Nov 9, 2022 at 11:11 AM Debasish Hazra > wrote: > >> I am not able to put the full data file on ucar ftp. But extracted the >> variable in 2D and attached in the email. >> Thanks >> Debasish >> >> On Wed, Nov 9, 2022 at 10:55 AM Debasish Hazra >> wrote: >> >>> Thanks Adam, unfortunately It did not work. I have attached a tried >>> script . I ma trying to put data in ftp, using this link >>> https://www.ncl.ucar.edu/ftp_files.shtml .But is not working. >>> Any help is appreciated. >>> Thanks, >>> Debasish. >>> >>> On Mon, Nov 7, 2022 at 4:28 PM Adam Phillips wrote: >>> >>>> Hi Debasish, >>>> I do not have any experience working with lambert_conformal gridded >>>> data, but looking at your ncdump output there are variables named lat and >>>> lon that are 2D variables that I think you can use to plot the data >>>> directly using the lat2d/lon2d assignment method. >>>> I would try this: >>>> >>>> dustsfc = flt2dble(a1->dust) >>>> lev = a1->pfull >>>> dustsfc2 at lat2d = a1->lat >>>> dustsfc2 at lon2d = a1->lon >>>> labes = (/"Dust conc(ug/kg) at surface : 00FH"/) >>>> >>>> wks_type = "png" >>>> ..... (continue using the rest of your script) >>>> >>>> If that does not work I would recommend creating a new netCDF file that >>>> only contains a single 3D variable, along with the first 8 variables shown >>>> in your ncdump output (pfull->lat), and send that new file to the ncl-talk >>>> email list. Include your most recent script and any error messages that you >>>> are getting as well. >>>> Good luck, >>>> Adam >>>> >>>> On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk < >>>> ncl-talk at mailman.ucar.edu> wrote: >>>> >>>>> Hi, >>>>> I am trying to plot variable which is in lambert_conformal grid, but I >>>>> am not able to generate the plot. Attached is ncl_filedump and ncl >>>>> script.Can anyone point out how to do it. Thanks >>>>> >>>>> Debasish. >>>>> _______________________________________________ >>>>> ncl-talk mailing list >>>>> ncl-talk at mailman.ucar.edu >>>>> List instructions, subscriber options, unsubscribe: >>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>> >>>> >>>> >>>> -- >>>> Adam Phillips >>>> Associate Scientist IV, Climate Analysis Section >>>> Climate and Global Dynamics Laboratory >>>> National Center for Atmospheric Research >>>> www.cgd.ucar.edu/staff/asphilli/ >>>> >>>> >>>> >>> > > -- > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Test_sample3.png Type: image/png Size: 343794 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Test_lambert2.ncl Type: application/octet-stream Size: 4245 bytes Desc: not available URL: From laura at ucar.edu Fri Nov 11 18:11:04 2022 From: laura at ucar.edu (Laura Fowler) Date: Fri, 11 Nov 2022 18:11:04 -0700 Subject: [ncl-talk] conversion from loop to array syntax In-Reply-To: References: Message-ID: Hi Dave: Thanks for your reply. I did get the same segmentation fault (see below). I do not know what you mean by "replacement operator". Thanks, Laura (0) --- nCells = 2621442 (0) --- nLevels = 55 fatal:NclMalloc Failed:[errno=12] Segmentation fault (core dumped) On Fri, Nov 11, 2022 at 6:03 PM Dave Allured - NOAA Affiliate < dave.allured at noaa.gov> wrote: > Laura, I am not sure that will work. But if it does, assign the result to > a new variable, not a predefined one. Or else use the replacement > operator. Try this, see if you get the expected result dimensions: > > pp = pres(:,kpbl(:)) > > Also, it is simply ncl-talk at ucar.edu. > > > On Fri, Nov 11, 2022 at 7:06 PM Laura Fowler via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hello: >> I have an integer array that includes the index of the PBL top (kpbl). I >> would like to get the pressure (press) corresponding to the index of the >> PBL top. A printVarSummary provides the following information: >> >> Variable: kpbl >> >> Type: integer >> >> Total Size: 10485768 bytes >> >> 2621442 values >> >> Number of Dimensions: 1 >> >> Dimensions and sizes: [nCells | 2621442] >> >> Coordinates: >> >> Number Of Attributes: 2 >> >> units : unitless >> >> long_name : index level of PBL top >> >> >> Variable: pres >> >> Type: float >> >> Total Size: 576717240 bytes >> >> 144179310 values >> >> Number of Dimensions: 2 >> >> Dimensions and sizes: [nCells | 2621442] x [nVertLevels | 55] >> >> Coordinates: >> >> Number Of Attributes: 3 >> >> _FillValue : 9.96921e+36 >> >> units : hPa >> >> long_name : Pressure at layer midpoint >> >> >> where nCells is the number of grid columns and nVertLevels is the >> number of vertical levels. Below is the loop that I would like to convert >> to a more compact array syntax: >> >> >> do n = 0,nCells-1 >> >> pp(n) = pres(n,kpbl(n)) >> >> print("--- n = "+n +" "+kpbl(n) +" "+pres(n,kpbl(n)) +" "+pp(n)) >> >> end do >> >> >> When I convert the loop above to the following array syntax (see below), >> I unfortunately get a "Segmentation Fault". >> >> pp(:) = pres(:,kpbl(:)) >> >> >> fatal:VarVarWrite: Number of dimensions on left hand side does not match >> right hand side >> >> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 207 in >> file plot.pressure.ncl >> >> >> >> Can somebody help me figure this out. I would really appreciate it. >> >> Thanks, >> >> Laura >> >> >> note: I posted the same email this morning, but to the address >> ncl-talk-request at ucar.edu. Not sure which email to use for posts. Sorry >> about the double email message. >> >> >> !------------------------------------------------------------------------------------------------------------- >> 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 >> > -- !------------------------------------------------------------------------------------------------------------- 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 Fri Nov 11 18:25:06 2022 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Fri, 11 Nov 2022 20:25:06 -0500 Subject: [ncl-talk] conversion from loop to array syntax In-Reply-To: References: Message-ID: I think what is happening is, NCL does not understand the intent to synchronize the two subscript ranges. It tries to run them independently, which means a 2621442 x 2621442 array. Boom! There might be an array syntax for this, but I can't think of one right now. Synchronized ranges work well for separate terms in an expression, but I think not within a single 2+ dimensional subscript expression. You might be stuck with that loop. Just code that as compactly as possible, when N is large. Or maybe, resort to an external helper function. On Fri, Nov 11, 2022 at 8:11 PM Laura Fowler wrote: > Hi Dave: > Thanks for your reply. I did get the same segmentation fault (see below). > I do not know what you mean by "replacement operator". > Thanks, > Laura > > > (0) --- nCells = 2621442 > > (0) --- nLevels = 55 > > fatal:NclMalloc Failed:[errno=12] > > Segmentation fault (core dumped) > > > On Fri, Nov 11, 2022 at 6:03 PM Dave Allured - NOAA Affiliate < > dave.allured at noaa.gov> wrote: > >> Laura, I am not sure that will work. But if it does, assign the result >> to a new variable, not a predefined one. Or else use the replacement >> operator. Try this, see if you get the expected result dimensions: >> >> pp = pres(:,kpbl(:)) >> >> Also, it is simply ncl-talk at ucar.edu. >> >> >> On Fri, Nov 11, 2022 at 7:06 PM Laura Fowler via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Hello: >>> I have an integer array that includes the index of the PBL top (kpbl). I >>> would like to get the pressure (press) corresponding to the index of the >>> PBL top. A printVarSummary provides the following information: >>> >>> Variable: kpbl >>> >>> Type: integer >>> >>> Total Size: 10485768 bytes >>> >>> 2621442 values >>> >>> Number of Dimensions: 1 >>> >>> Dimensions and sizes: [nCells | 2621442] >>> >>> Coordinates: >>> >>> Number Of Attributes: 2 >>> >>> units : unitless >>> >>> long_name : index level of PBL top >>> >>> >>> Variable: pres >>> >>> Type: float >>> >>> Total Size: 576717240 bytes >>> >>> 144179310 values >>> >>> Number of Dimensions: 2 >>> >>> Dimensions and sizes: [nCells | 2621442] x [nVertLevels | 55] >>> >>> Coordinates: >>> >>> Number Of Attributes: 3 >>> >>> _FillValue : 9.96921e+36 >>> >>> units : hPa >>> >>> long_name : Pressure at layer midpoint >>> >>> >>> where nCells is the number of grid columns and nVertLevels is the >>> number of vertical levels. Below is the loop that I would like to convert >>> to a more compact array syntax: >>> >>> >>> do n = 0,nCells-1 >>> >>> pp(n) = pres(n,kpbl(n)) >>> >>> print("--- n = "+n +" "+kpbl(n) +" "+pres(n,kpbl(n)) +" "+pp(n)) >>> >>> end do >>> >>> >>> When I convert the loop above to the following array syntax (see below), >>> I unfortunately get a "Segmentation Fault". >>> >>> pp(:) = pres(:,kpbl(:)) >>> >>> >>> fatal:VarVarWrite: Number of dimensions on left hand side does not match >>> right hand side >>> >>> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 207 in >>> file plot.pressure.ncl >>> >>> >>> >>> Can somebody help me figure this out. I would really appreciate it. >>> >>> Thanks, >>> >>> Laura >>> >>> >>> note: I posted the same email this morning, but to the address >>> ncl-talk-request at ucar.edu. Not sure which email to use for posts. Sorry >>> about the double email message. >>> >>> >>> !------------------------------------------------------------------------------------------------------------- >>> 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 Anieklal at cas.iitd.ac.in Fri Nov 11 22:58:05 2022 From: Anieklal at cas.iitd.ac.in (Anie K Lal) Date: Sat, 12 Nov 2022 11:28:05 +0530 Subject: [ncl-talk] Fwd: libgsl.so.25: cannot open shared object file In-Reply-To: <7adfb361b47bf894ccc160290972d124@cas.iitd.ac.in> References: <7adfb361b47bf894ccc160290972d124@cas.iitd.ac.in> Message-ID: <3f9bd6ceb1d2d05e2a3b609d764ca512@cas.iitd.ac.in> Hi all, I am facing a issue with ncl installation. Please see the forwaded mail below. Kindly help. -------- Original Message -------- Subject: libgsl.so.25: cannot open shared object file Date: 13.08.2022 11:48 From: Anie K Lal To: ncl-install at mailman.ucar.edu Hi all I am trying to install ncl under conda environment. I had anaconda already installed in my system. I tried installing ncl using: "conda create -n ncl_stable -c conda-forge ncl" But while running ncl script I am getting the following error: "ncl: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory" Kindly find the following information regarding my installation: # packages in environment at /home/anaconda3/envs/ncl_stable: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge blosc 1.21.1 h83bc5f7_3 conda-forge boost-cpp 1.74.0 h75c5d50_8 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2022.07.19 h06a4308_0 cairo 1.16.0 ha61ee94_1012 conda-forge cfitsio 4.1.0 hd9d235c_0 conda-forge curl 7.84.0 h5eee18b_0 esmf 8.2.0 nompi_h1ee4d8d_2 conda-forge expat 2.4.8 h27087fc_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.0 h8e229c2_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freeglut 3.2.2 h9c3ff4c_1 conda-forge freetype 2.11.0 h70c0345_0 freexl 1.0.6 h7f98852_0 conda-forge geos 3.11.0 h27087fc_0 conda-forge geotiff 1.7.1 h4fc65e6_3 conda-forge gettext 0.21.0 hf68c758_0 giflib 5.2.1 h36c2ea0_2 conda-forge gsl 2.7.1 h6e86dc7_1 hdf4 4.2.15 h9772cbc_4 conda-forge hdf5 1.12.2 nompi_h2386368_100 conda-forge hdfeos2 2.20 hca1e490_1001 conda-forge hdfeos5 5.1.16 hc2f950b_10 conda-forge icu 70.1 h27087fc_0 conda-forge jasper 2.0.33 ha77e612_0 conda-forge jpeg 9e h166bdaf_2 conda-forge json-c 0.16 hc379101_0 conda-forge kealib 1.4.15 ha7026e8_1 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge krb5 1.19.3 h3790be6_0 conda-forge lcms2 2.12 hddcbb42_0 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libblas 3.9.0 16_linux64_openblas conda-forge libcblas 3.9.0 16_linux64_openblas conda-forge libcurl 7.84.0 h91b91d3_0 libdap4 3.20.6 hd7c4107_2 conda-forge libdeflate 1.13 h166bdaf_0 conda-forge libedit 3.1.20210910 h7f8727e_0 libev 4.33 h516909a_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 12.1.0 h8d9b700_16 conda-forge libgdal 3.5.1 h53011df_2 conda-forge libgfortran-ng 12.1.0 h69a702a_16 conda-forge libgfortran5 12.1.0 hdcd56e2_16 conda-forge libglib 2.72.1 h2d90d5f_0 conda-forge libglu 9.0.0 he1b5a44_1001 conda-forge libgomp 12.1.0 h8d9b700_16 conda-forge libiconv 1.16 h516909a_0 conda-forge libkml 1.3.0 h238a007_1014 conda-forge libnetcdf 4.8.1 nompi_h21705cb_104 conda-forge libnghttp2 1.47.0 h727a467_0 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libopenblas 0.3.21 pthreads_h78a6416_0 conda-forge libpng 1.6.37 h753d276_4 conda-forge libpq 14.5 hd77ab85_0 conda-forge librttopo 1.1.0 hf730bdb_11 conda-forge libspatialite 5.0.1 h38b5f51_18 conda-forge libsqlite 3.39.2 h753d276_1 conda-forge libssh2 1.10.0 haa6b8db_3 conda-forge libstdcxx-ng 12.1.0 ha89aaad_16 conda-forge libtiff 4.4.0 h0e0dad5_3 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libwebp-base 1.2.4 h166bdaf_0 conda-forge libxcb 1.13 h7f98852_1004 conda-forge libxml2 2.9.14 h22db469_4 conda-forge libzip 1.9.2 hc869a4a_1 conda-forge libzlib 1.2.12 h166bdaf_2 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge ncl 6.6.2 hfc90af8_40 conda-forge ncurses 6.3 h27087fc_1 conda-forge netcdf-fortran 4.6.0 nompi_hc402ea5_100 conda-forge nspr 4.33 h295c915_0 nss 3.78 h2350873_0 conda-forge openjpeg 2.4.0 hb52868f_1 conda-forge openssl 1.1.1q h166bdaf_0 conda-forge pcre 8.45 h9c3ff4c_0 conda-forge pixman 0.40.0 h36c2ea0_0 conda-forge poppler 22.04.0 h1434ded_1 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 14.5 hfdbbde3_0 conda-forge proj 9.0.1 h93bde94_1 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge readline 8.1.2 h0f457ee_0 conda-forge snappy 1.1.9 hbd366e4_1 conda-forge sqlite 3.39.2 h4ff8645_1 conda-forge tiledb 2.9.5 h1e4a385_0 conda-forge tzcode 2022b h166bdaf_0 conda-forge tzdata 2022b h191b570_0 conda-forge udunits2 2.2.28 hc3e0081_0 conda-forge xerces-c 3.2.3 h55805fa_5 conda-forge xorg-fixesproto 5.0 h7f98852_1002 conda-forge xorg-imake 1.0.7 0 conda-forge xorg-inputproto 2.3.2 h7f98852_1002 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.7.2 h7f98852_0 conda-forge xorg-libxau 1.0.9 h7f98852_0 conda-forge xorg-libxaw 1.0.14 h7f98852_1 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h7f98852_1 conda-forge xorg-libxfixes 5.0.3 h7f98852_1004 conda-forge xorg-libxi 1.7.10 h7f98852_0 conda-forge xorg-libxmu 1.1.3 h7f98852_0 conda-forge xorg-libxpm 3.5.13 h7f98852_0 conda-forge xorg-libxrender 0.9.10 h7f98852_1003 conda-forge xorg-libxt 1.2.1 h7f98852_2 conda-forge xorg-makedepend 1.0.6 h27087fc_2 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.6 h166bdaf_0 conda-forge zlib 1.2.12 h166bdaf_2 conda-forge zstd 1.5.2 h8a70e8d_4 conda-forge ## conda --version conda 4.13.0 ## which ncl /home/anaconda3/envs/ncl_stable/bin/ncl ## ncl -V ncl: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory ## env | grep NCARG NCARG_ROOT=/home/anaconda3/envs/ncl_stable **************************************************************** I have tried the following: 1. Tried installing GSL using conda "conda install -c conda-forge gsl " . But it didn't work, showing the same error. 2. Uninstalled, then reinstalled NCL using conda. Didn't work. 3. Tried using miniconda instead of anaconda... It also didn't work. Same error persists. NOTE: I was using ncl smoothly in the same system under conda environment earlier. This problem started after a re installation of conda. Kindly help me with this issue since I am struggling with this for some time now. Looking forward to any kind of help and advice. Thank you Anie From brownrig at ucar.edu Sun Nov 13 21:53:31 2022 From: brownrig at ucar.edu (Rick Brownrigg) Date: Sun, 13 Nov 2022 21:53:31 -0700 Subject: [ncl-talk] Fwd: libgsl.so.25: cannot open shared object file In-Reply-To: <3f9bd6ceb1d2d05e2a3b609d764ca512@cas.iitd.ac.in> References: <7adfb361b47bf894ccc160290972d124@cas.iitd.ac.in> <3f9bd6ceb1d2d05e2a3b609d764ca512@cas.iitd.ac.in> Message-ID: Hi, This is hard to diagnose, and I don't really have useful advice for you. I'm presuming you are on a linux machine. I tried a fresh install on my linux box, with "conda create -n ncl_stable -c conda-forge ncl". That library libgsl.*.so is definitely part of the installation, under ~/miniconda3/envs/ncl_stable/lib. The resultant ncl works just fine -- I don't get unresolved library issues. Same with my Mac. Wish I had something more useful to tell you... Rick On Fri, Nov 11, 2022 at 10:58 PM Anie K Lal via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi all, > I am facing a issue with ncl installation. Please see the forwaded mail > below. Kindly help. > > -------- Original Message -------- > Subject: libgsl.so.25: cannot open shared object file > Date: 13.08.2022 11:48 > From: Anie K Lal > To: ncl-install at mailman.ucar.edu > > Hi all > > I am trying to install ncl under conda environment. I had anaconda > already installed in my system. I tried installing ncl using: > "conda create -n ncl_stable -c conda-forge ncl" > > But while running ncl script I am getting the following error: > > "ncl: error while loading shared libraries: libgsl.so.25: cannot open > shared object file: No such file or directory" > > Kindly find the following information regarding my installation: > > # packages in environment at /home/anaconda3/envs/ncl_stable: > # > # Name Version Build Channel > _libgcc_mutex 0.1 conda_forge conda-forge > _openmp_mutex 4.5 2_gnu conda-forge > blosc 1.21.1 h83bc5f7_3 conda-forge > boost-cpp 1.74.0 h75c5d50_8 conda-forge > bzip2 1.0.8 h7f98852_4 conda-forge > c-ares 1.18.1 h7f98852_0 conda-forge > ca-certificates 2022.07.19 h06a4308_0 > cairo 1.16.0 ha61ee94_1012 conda-forge > cfitsio 4.1.0 hd9d235c_0 conda-forge > curl 7.84.0 h5eee18b_0 > esmf 8.2.0 nompi_h1ee4d8d_2 > conda-forge > expat 2.4.8 h27087fc_0 conda-forge > font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge > font-ttf-inconsolata 3.000 h77eed37_0 conda-forge > font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge > font-ttf-ubuntu 0.83 hab24e00_0 conda-forge > fontconfig 2.14.0 h8e229c2_0 conda-forge > fonts-conda-ecosystem 1 0 conda-forge > fonts-conda-forge 1 0 conda-forge > freeglut 3.2.2 h9c3ff4c_1 conda-forge > freetype 2.11.0 h70c0345_0 > freexl 1.0.6 h7f98852_0 conda-forge > geos 3.11.0 h27087fc_0 conda-forge > geotiff 1.7.1 h4fc65e6_3 conda-forge > gettext 0.21.0 hf68c758_0 > giflib 5.2.1 h36c2ea0_2 conda-forge > gsl 2.7.1 h6e86dc7_1 > hdf4 4.2.15 h9772cbc_4 conda-forge > hdf5 1.12.2 nompi_h2386368_100 > conda-forge > hdfeos2 2.20 hca1e490_1001 conda-forge > hdfeos5 5.1.16 hc2f950b_10 conda-forge > icu 70.1 h27087fc_0 conda-forge > jasper 2.0.33 ha77e612_0 conda-forge > jpeg 9e h166bdaf_2 conda-forge > json-c 0.16 hc379101_0 conda-forge > kealib 1.4.15 ha7026e8_1 conda-forge > keyutils 1.6.1 h166bdaf_0 conda-forge > krb5 1.19.3 h3790be6_0 conda-forge > lcms2 2.12 hddcbb42_0 conda-forge > lerc 4.0.0 h27087fc_0 conda-forge > libblas 3.9.0 16_linux64_openblas > conda-forge > libcblas 3.9.0 16_linux64_openblas > conda-forge > libcurl 7.84.0 h91b91d3_0 > libdap4 3.20.6 hd7c4107_2 conda-forge > libdeflate 1.13 h166bdaf_0 conda-forge > libedit 3.1.20210910 h7f8727e_0 > libev 4.33 h516909a_1 conda-forge > libffi 3.4.2 h7f98852_5 conda-forge > libgcc-ng 12.1.0 h8d9b700_16 conda-forge > libgdal 3.5.1 h53011df_2 conda-forge > libgfortran-ng 12.1.0 h69a702a_16 conda-forge > libgfortran5 12.1.0 hdcd56e2_16 conda-forge > libglib 2.72.1 h2d90d5f_0 conda-forge > libglu 9.0.0 he1b5a44_1001 conda-forge > libgomp 12.1.0 h8d9b700_16 conda-forge > libiconv 1.16 h516909a_0 conda-forge > libkml 1.3.0 h238a007_1014 conda-forge > libnetcdf 4.8.1 nompi_h21705cb_104 > conda-forge > libnghttp2 1.47.0 h727a467_0 conda-forge > libnsl 2.0.0 h7f98852_0 conda-forge > libopenblas 0.3.21 pthreads_h78a6416_0 > conda-forge > libpng 1.6.37 h753d276_4 conda-forge > libpq 14.5 hd77ab85_0 conda-forge > librttopo 1.1.0 hf730bdb_11 conda-forge > libspatialite 5.0.1 h38b5f51_18 conda-forge > libsqlite 3.39.2 h753d276_1 conda-forge > libssh2 1.10.0 haa6b8db_3 conda-forge > libstdcxx-ng 12.1.0 ha89aaad_16 conda-forge > libtiff 4.4.0 h0e0dad5_3 conda-forge > libuuid 2.32.1 h7f98852_1000 conda-forge > libwebp-base 1.2.4 h166bdaf_0 conda-forge > libxcb 1.13 h7f98852_1004 conda-forge > libxml2 2.9.14 h22db469_4 conda-forge > libzip 1.9.2 hc869a4a_1 conda-forge > libzlib 1.2.12 h166bdaf_2 conda-forge > lz4-c 1.9.3 h9c3ff4c_1 conda-forge > ncl 6.6.2 hfc90af8_40 conda-forge > ncurses 6.3 h27087fc_1 conda-forge > netcdf-fortran 4.6.0 nompi_hc402ea5_100 > conda-forge > nspr 4.33 h295c915_0 > nss 3.78 h2350873_0 conda-forge > openjpeg 2.4.0 hb52868f_1 conda-forge > openssl 1.1.1q h166bdaf_0 conda-forge > pcre 8.45 h9c3ff4c_0 conda-forge > pixman 0.40.0 h36c2ea0_0 conda-forge > poppler 22.04.0 h1434ded_1 conda-forge > poppler-data 0.4.11 hd8ed1ab_0 conda-forge > postgresql 14.5 hfdbbde3_0 conda-forge > proj 9.0.1 h93bde94_1 conda-forge > pthread-stubs 0.4 h36c2ea0_1001 conda-forge > readline 8.1.2 h0f457ee_0 conda-forge > snappy 1.1.9 hbd366e4_1 conda-forge > sqlite 3.39.2 h4ff8645_1 conda-forge > tiledb 2.9.5 h1e4a385_0 conda-forge > tzcode 2022b h166bdaf_0 conda-forge > tzdata 2022b h191b570_0 conda-forge > udunits2 2.2.28 hc3e0081_0 conda-forge > xerces-c 3.2.3 h55805fa_5 conda-forge > xorg-fixesproto 5.0 h7f98852_1002 conda-forge > xorg-imake 1.0.7 0 conda-forge > xorg-inputproto 2.3.2 h7f98852_1002 conda-forge > xorg-kbproto 1.0.7 h7f98852_1002 conda-forge > xorg-libice 1.0.10 h7f98852_0 conda-forge > xorg-libsm 1.2.3 hd9c2040_1000 conda-forge > xorg-libx11 1.7.2 h7f98852_0 conda-forge > xorg-libxau 1.0.9 h7f98852_0 conda-forge > xorg-libxaw 1.0.14 h7f98852_1 conda-forge > xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge > xorg-libxext 1.3.4 h7f98852_1 conda-forge > xorg-libxfixes 5.0.3 h7f98852_1004 conda-forge > xorg-libxi 1.7.10 h7f98852_0 conda-forge > xorg-libxmu 1.1.3 h7f98852_0 conda-forge > xorg-libxpm 3.5.13 h7f98852_0 conda-forge > xorg-libxrender 0.9.10 h7f98852_1003 conda-forge > xorg-libxt 1.2.1 h7f98852_2 conda-forge > xorg-makedepend 1.0.6 h27087fc_2 conda-forge > xorg-renderproto 0.11.1 h7f98852_1002 conda-forge > xorg-xextproto 7.3.0 h7f98852_1002 conda-forge > xorg-xproto 7.0.31 h7f98852_1007 conda-forge > xz 5.2.6 h166bdaf_0 conda-forge > zlib 1.2.12 h166bdaf_2 conda-forge > zstd 1.5.2 h8a70e8d_4 conda-forge > > ## conda --version > conda 4.13.0 > > ## which ncl > /home/anaconda3/envs/ncl_stable/bin/ncl > > ## ncl -V > ncl: error while loading shared libraries: libgsl.so.25: cannot open > shared object file: No such file or directory > > ## env | grep NCARG > NCARG_ROOT=/home/anaconda3/envs/ncl_stable > > **************************************************************** > > I have tried the following: > > 1. Tried installing GSL using conda "conda install -c conda-forge gsl " > . But it didn't work, showing the same error. > > 2. Uninstalled, then reinstalled NCL using conda. Didn't work. > > 3. Tried using miniconda instead of anaconda... It also didn't work. > Same error persists. > > NOTE: I was using ncl smoothly in the same system under conda > environment earlier. This problem started after a re installation of > conda. > > Kindly help me with this issue since I am struggling with this for some > time now. > > Looking forward to any kind of help and advice. > > Thank you > Anie > _______________________________________________ > 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 markus.mingel at libero.it Mon Nov 14 05:42:27 2022 From: markus.mingel at libero.it (markus.mingel at libero.it) Date: Mon, 14 Nov 2022 13:42:27 +0100 (CET) Subject: [ncl-talk] Computing geopotential height Message-ID: <2091954764.2232987.1668429747775@mail1.libero.it> Hi All, I am trying to derive the geopotential height of a given CMIP6 model from its air temperature and humidity. Firstly, I compute the geopotential in the native hybrid coordinates using the NCL function cz2ccm, then I interpolate the just computed geopotential to some pressure levels using vinth2p_ecmwf. The comparison of the geopotential computed with my script (attached) with the zg downloaded from ESGF shows large differences, so I was wondering if anyone could suggest me what's wrong in my script? Besides, when the variable phis (surface geopotential (m^2/sec^2)) is not available as input, which values I should use? Is it possible to compute it in anyway with NCL? Thanks into advance for help, Best, Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Compute_zg.ncl Type: text/x-ncl Size: 5603 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Surface_Geopotential.png Type: image/png Size: 248298 bytes Desc: not available URL: From cafm at ua.pt Mon Nov 14 06:17:25 2022 From: cafm at ua.pt (Carlos Marques) Date: Mon, 14 Nov 2022 13:17:25 +0000 Subject: [ncl-talk] Computing geopotential height In-Reply-To: <2091954764.2232987.1668429747775@mail1.libero.it> References: <2091954764.2232987.1668429747775@mail1.libero.it> Message-ID: <9028cdcbb1654684bf48691b20a1240a@ua.pt> Hi, Attached there are two scripts that I used to compute Geopotential for CMIP6 model MPI-ESM1.2-LR and to interpolate after to pressure levels. Also attached there are 3 figures that compare the geopotential computed and interpolated to pressure levels with NCL with that provided by MPI. You may see that they compare fairly well. You should check that every variable is what NCL's expects (units, coordinates ordering, etc. ). I think that for example you P0 is in hPa, but NCL expects that to be in Pa. I don't think that you can compute and interpolate to pressure levels without the surface geopotential. Hope that helps. C. A. F. Marques CESAM & Physics Department University of Aveiro 3810-193 Aveiro. Portugal http://www.cesam.ua.pt/cafmarques ________________________________ From: ncl-talk on behalf of markus mingel via ncl-talk Sent: Monday, November 14, 2022 12:42:27 PM To: ncl-talk at ucar.edu Subject: [ncl-talk] Computing geopotential height Hi All, I am trying to derive the geopotential height of a given CMIP6 model from its air temperature and humidity. Firstly, I compute the geopotential in the native hybrid coordinates using the NCL function cz2ccm, then I interpolate the just computed geopotential to some pressure levels using vinth2p_ecmwf. The comparison of the geopotential computed with my script (attached) with the zg downloaded from ESGF shows large differences, so I was wondering if anyone could suggest me what's wrong in my script? Besides, when the variable phis (surface geopotential (m^2/sec^2)) is not available as input, which values I should use? Is it possible to compute it in anyway with NCL? Thanks into advance for help, Best, Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InterpExtrap_zg_MPI_ESM1_2_LR_historical_Hyb2Pres.ncl Type: application/octet-stream Size: 10031 bytes Desc: InterpExtrap_zg_MPI_ESM1_2_LR_historical_Hyb2Pres.ncl URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Z_MPI_ESM1_2_LR_historical.ncl Type: application/octet-stream Size: 17753 bytes Desc: Z_MPI_ESM1_2_LR_historical.ncl URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Z_10 hPa_MPI_ESM1_2_LR.png Type: image/png Size: 46528 bytes Desc: Z_10 hPa_MPI_ESM1_2_LR.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Z_500 hPa_MPI_ESM1_2_LR.png Type: image/png Size: 77078 bytes Desc: Z_500 hPa_MPI_ESM1_2_LR.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Z_1000 hPa_MPI_ESM1_2_LR.png Type: image/png Size: 105673 bytes Desc: Z_1000 hPa_MPI_ESM1_2_LR.png URL: From markus.mingel at libero.it Mon Nov 14 07:01:00 2022 From: markus.mingel at libero.it (markus.mingel at libero.it) Date: Mon, 14 Nov 2022 15:01:00 +0100 (CET) Subject: [ncl-talk] Computing geopotential height In-Reply-To: <9028cdcbb1654684bf48691b20a1240a@ua.pt> References: <2091954764.2232987.1668429747775@mail1.libero.it> <9028cdcbb1654684bf48691b20a1240a@ua.pt> Message-ID: <538630759.2198724.1668434460286@mail1.libero.it> Hi Carlos, thanks for sharing your scripts. I revised my code and finally I found the bug. In vinth2p_ecmwf I used as tbot the surface geopotential instead of bottom temperature. After providing the right surface temperature and surface geopotential as orog*9.81 I get reasonable geopotential heights. Best regards, Markus > Il 14/11/2022 14:17 Carlos Marques ha scritto: > > > > > > Hi, > > > > > Attached there are two scripts that I used to compute Geopotential for CMIP6 model MPI-ESM1.2-LR and to interpolate after to pressure levels. > > Also attached there are 3 figures that compare the geopotential computed and interpolated to pressure levels with NCL with that provided by MPI. You may see that they compare fairly well. > > > > > You should check that every variable is what NCL's expects (units, coordinates ordering, etc. ). I think that for example you P0 is in hPa, but NCL expects that to be in Pa. > > > > > I don't think that you can compute and interpolate to pressure levels without the surface geopotential. > > > > > Hope that helps. > > > > > > > > > C. A. F. Marques > CESAM & Physics Department > > University of Aveiro > 3810-193 Aveiro. Portugal > http://www.cesam.ua.pt/cafmarques > > --------------------------------------------- > > From: ncl-talk on behalf of markus mingel via ncl-talk > Sent: Monday, November 14, 2022 12:42:27 PM > To: ncl-talk at ucar.edu > Subject: [ncl-talk] Computing geopotential height > > > > Hi All, > > > I am trying to derive the geopotential height of a given CMIP6 model from its air temperature and humidity. > > > Firstly, I compute the geopotential in the native hybrid coordinates using the NCL function cz2ccm, then I interpolate the just computed geopotential to some pressure levels using vinth2p_ecmwf. > > The comparison of the geopotential computed with my script (attached) with the zg downloaded from ESGF shows large differences, so I was wondering if anyone could suggest me what's wrong in my script? > > Besides, when the variable phis (surface geopotential (m^2/sec^2)) is not available as input, which values I should use? Is it possible to compute it in anyway with NCL? > > > Thanks into advance for help, > > > Best, > > > Markus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tabishumaransari at gmail.com Mon Nov 14 10:12:40 2022 From: tabishumaransari at gmail.com (Tabish Ansari) Date: Mon, 14 Nov 2022 18:12:40 +0100 Subject: [ncl-talk] ESMF Regridding: one less latitude band in the destination file Message-ID: Hi I have two global emissions datasets: one at a lower resolution of 1.9x2.5 degrees (96x144 grid points) and another at a higher resolution of 0.1x0.1 degrees (1800x3600 grid points). I want to regrid the second dataset to the coarse resolution of the first one. I generated a weights file and followed the recommended procedure using the ESMF regridding function within NCL to achieve the desired output: *load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"begin sfile = addfile("/data/sync/modelinput/HTAPv3-Emissions-tan/edgar_HTAPv3_2018_NOx.nc","r") nox = sfile->HTAPv3_1_International_Shipping(0,:,:) printVarSummary(nox) Opt = True Opt at ForceOverwrite = True Opt at InterpMethod = "conserve" Opt at DstGridType = "1.9x2.5" Opt at DstURCorner = (/ 90, 357.5/) Opt at DstLLCorner = (/ -90, 0/) nox_regrid = ESMF_regrid(nox,Opt) printVarSummary(nox_regrid)end* This leads to a resulting variable with *95x144* grid points, however the first dataset has *96x144* grid points. I have supplied all the information of the first grid through the grid type and corner options here. Still, the resultant grid has one less latitude band. Please let me know if something is obviously wrong here. Perhaps something to do with grid staggering? Thanks a lot. with best regards, Tabish ------------------------------- Dr Tabish Ansari Research Associate Air Quality Modelling Group IASS-Potsdam Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From laura at ucar.edu Mon Nov 14 15:21:27 2022 From: laura at ucar.edu (Laura Fowler) Date: Mon, 14 Nov 2022 15:21:27 -0700 Subject: [ncl-talk] ESMF Regridding: one less latitude band in the destination file In-Reply-To: References: Message-ID: Hi Tabish: When I use ESMF_regrid, I usually specify the longitudes and latitudes of the source (1800x3600) and destination (96x144 grid points) files. So instead of using * Opt at DstGridType = "1.9x2.5" Opt at DstURCorner = (/ 90, 357.5/) Opt at DstLLCorner = (/ -90, 0/)* I use: opt at SrcGridLon = lonCellSrc ; source grid longitude input. opt at SrcGridLat = latCellSrc ; source grid latitude input. opt at DstGridLon = lonDst ; destination grid longitude input. opt at DstGridLat = latDst ; destination grid latitude input. If this does not work, you can also try the default InterpMethod instead of using "conserve". Just a couple of suggestions. Hope this will help, Laura On Mon, Nov 14, 2022 at 10:12 AM Tabish Ansari via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi > > I have two global emissions datasets: one at a lower resolution of 1.9x2.5 > degrees (96x144 grid points) and another at a higher resolution of 0.1x0.1 > degrees (1800x3600 grid points). > > I want to regrid the second dataset to the coarse resolution of the first > one. I generated a weights file and followed the recommended procedure > using the ESMF regridding function within NCL to achieve the desired output: > > > > > > > > > > > > > > > > > > > > *load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"load > "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"begin sfile = > addfile("/data/sync/modelinput/HTAPv3-Emissions-tan/edgar_HTAPv3_2018_NOx.nc","r") > nox = sfile->HTAPv3_1_International_Shipping(0,:,:) > printVarSummary(nox) Opt = True Opt at ForceOverwrite = > True Opt at InterpMethod = "conserve" Opt at DstGridType = "1.9x2.5" > Opt at DstURCorner = (/ 90, 357.5/) Opt at DstLLCorner = (/ -90, > 0/) nox_regrid = ESMF_regrid(nox,Opt) printVarSummary(nox_regrid)end* > > This leads to a resulting variable with *95x144* grid points, however the > first dataset has *96x144* grid points. I have supplied all the > information of the first grid through the grid type and corner options > here. Still, the resultant grid has one less latitude band. Please let me > know if something is obviously wrong here. Perhaps something to do with > grid staggering? > > Thanks a lot. > > with best regards, > > Tabish > > > ------------------------------- > Dr Tabish Ansari > Research Associate > Air Quality Modelling Group > IASS-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 > -- !------------------------------------------------------------------------------------------------------------- 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 tabishumaransari at gmail.com Mon Nov 14 15:33:42 2022 From: tabishumaransari at gmail.com (Tabish Ansari) Date: Mon, 14 Nov 2022 23:33:42 +0100 Subject: [ncl-talk] ESMF Regridding: one less latitude band in the destination file In-Reply-To: References: Message-ID: Hi Laura, Many thanks for your reply. I have a quick follow-up question: Are these supposed to be 1D arrays holding values of lat/lon or 2D variables corresponding to the grid? Thanks again. Tabish ------------------------------- Dr Tabish Ansari Research Associate Air Quality Modelling Group IASS-Potsdam Germany On Mon, 14 Nov 2022 at 23:21, Laura Fowler wrote: > Hi Tabish: > > When I use ESMF_regrid, I usually specify the longitudes and latitudes of > the source (1800x3600) and destination (96x144 grid points) files. So > instead of using > > > > > * Opt at DstGridType = "1.9x2.5" Opt at DstURCorner = (/ 90, > 357.5/) Opt at DstLLCorner = (/ -90, 0/)* > > I use: > > opt at SrcGridLon = lonCellSrc ; source grid longitude input. > > opt at SrcGridLat = latCellSrc ; source grid latitude input. > > > opt at DstGridLon = lonDst ; destination grid longitude input. > > opt at DstGridLat = latDst ; destination grid latitude input. > > If this does not work, you can also try the default InterpMethod instead > of using "conserve". Just a couple of suggestions. > > Hope this will help, > Laura > > > On Mon, Nov 14, 2022 at 10:12 AM Tabish Ansari via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi >> >> I have two global emissions datasets: one at a lower resolution of >> 1.9x2.5 degrees (96x144 grid points) and another at a higher resolution of >> 0.1x0.1 degrees (1800x3600 grid points). >> >> I want to regrid the second dataset to the coarse resolution of the first >> one. I generated a weights file and followed the recommended procedure >> using the ESMF regridding function within NCL to achieve the desired output: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"load >> "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"begin sfile = >> addfile("/data/sync/modelinput/HTAPv3-Emissions-tan/edgar_HTAPv3_2018_NOx.nc","r") >> nox = sfile->HTAPv3_1_International_Shipping(0,:,:) >> printVarSummary(nox) Opt = True Opt at ForceOverwrite = >> True Opt at InterpMethod = "conserve" Opt at DstGridType = "1.9x2.5" >> Opt at DstURCorner = (/ 90, 357.5/) Opt at DstLLCorner = (/ -90, >> 0/) nox_regrid = ESMF_regrid(nox,Opt) printVarSummary(nox_regrid)end* >> >> This leads to a resulting variable with *95x144* grid points, however >> the first dataset has *96x144* grid points. I have supplied all the >> information of the first grid through the grid type and corner options >> here. Still, the resultant grid has one less latitude band. Please let me >> know if something is obviously wrong here. Perhaps something to do with >> grid staggering? >> >> Thanks a lot. >> >> with best regards, >> >> Tabish >> >> >> ------------------------------- >> Dr Tabish Ansari >> Research Associate >> Air Quality Modelling Group >> IASS-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 >> > > > -- > > !------------------------------------------------------------------------------------------------------------- > 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 tabishumaransari at gmail.com Tue Nov 15 05:34:34 2022 From: tabishumaransari at gmail.com (Tabish Ansari) Date: Tue, 15 Nov 2022 13:34:34 +0100 Subject: [ncl-talk] ESMF Regridding: one less latitude band in the destination file In-Reply-To: References: Message-ID: Hi Laura, Your method worked smoothly - thank you. Here's the updated script I used: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl" begin sfile = addfile("/data/nosync/emissions/HTAPv3-Fluxes-tan/edgar_HTAPv3_2018_NOx.nc","r") dfile = addfile("/data/sync/modelinput/CAMS-Emissions-tbu/ HTAP_transient_1.9x2.5_emis_NO_20201217.nc","r") nox_htap = sfile->HTAPv3_1_International_Shipping(0,:,:) printVarSummary(nox_htap) nox_cams = dfile->glseas(0,:,:) printVarSummary(nox_cams) htaplat = nox_htap&lat htaplon = nox_htap&lon camslat = nox_cams&lat camslon = nox_cams&lon Opt = True Opt at ForceOverwrite = True Opt at InterpMethod = "conserve" ; Opt at DstGridType = "1.9x2.5" ; Opt at DstURCorner = (/ 90, 360/) ; Opt at DstLLCorner = (/ -90, 0/) Opt at SrcGridLon = htaplon Opt at SrcGridLat = htaplat Opt at DstGridLon = camslon Opt at DstGridLat = camslat nox_regrid = ESMF_regrid(nox_htap,Opt) printVarSummary(nox_regrid) end best regards, Tabish ------------------------------- Dr Tabish Ansari Research Associate Air Quality Modelling Group IASS-Potsdam Germany On Mon, 14 Nov 2022 at 23:21, Laura Fowler wrote: > Hi Tabish: > > When I use ESMF_regrid, I usually specify the longitudes and latitudes of > the source (1800x3600) and destination (96x144 grid points) files. So > instead of using > > > > > * Opt at DstGridType = "1.9x2.5" Opt at DstURCorner = (/ 90, > 357.5/) Opt at DstLLCorner = (/ -90, 0/)* > > I use: > > opt at SrcGridLon = lonCellSrc ; source grid longitude input. > > opt at SrcGridLat = latCellSrc ; source grid latitude input. > > > opt at DstGridLon = lonDst ; destination grid longitude input. > > opt at DstGridLat = latDst ; destination grid latitude input. > > If this does not work, you can also try the default InterpMethod instead > of using "conserve". Just a couple of suggestions. > > Hope this will help, > Laura > > > On Mon, Nov 14, 2022 at 10:12 AM Tabish Ansari via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi >> >> I have two global emissions datasets: one at a lower resolution of >> 1.9x2.5 degrees (96x144 grid points) and another at a higher resolution of >> 0.1x0.1 degrees (1800x3600 grid points). >> >> I want to regrid the second dataset to the coarse resolution of the first >> one. I generated a weights file and followed the recommended procedure >> using the ESMF regridding function within NCL to achieve the desired output: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"load >> "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"begin sfile = >> addfile("/data/sync/modelinput/HTAPv3-Emissions-tan/edgar_HTAPv3_2018_NOx.nc","r") >> nox = sfile->HTAPv3_1_International_Shipping(0,:,:) >> printVarSummary(nox) Opt = True Opt at ForceOverwrite = >> True Opt at InterpMethod = "conserve" Opt at DstGridType = "1.9x2.5" >> Opt at DstURCorner = (/ 90, 357.5/) Opt at DstLLCorner = (/ -90, >> 0/) nox_regrid = ESMF_regrid(nox,Opt) printVarSummary(nox_regrid)end* >> >> This leads to a resulting variable with *95x144* grid points, however >> the first dataset has *96x144* grid points. I have supplied all the >> information of the first grid through the grid type and corner options >> here. Still, the resultant grid has one less latitude band. Please let me >> know if something is obviously wrong here. Perhaps something to do with >> grid staggering? >> >> Thanks a lot. >> >> with best regards, >> >> Tabish >> >> >> ------------------------------- >> Dr Tabish Ansari >> Research Associate >> Air Quality Modelling Group >> IASS-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 >> > > > -- > > !------------------------------------------------------------------------------------------------------------- > 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 asphilli at ucar.edu Tue Nov 15 11:56:14 2022 From: asphilli at ucar.edu (Adam Phillips) Date: Tue, 15 Nov 2022 11:56:14 -0700 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data In-Reply-To: References: Message-ID: Hi Debasish, I have downloaded your simple3.nc file, and modified and ran your Test_lambert2.ncl file. I believe you were plotting the data correctly, and I am attaching my script and resulting plot. In short, I believe your data spans a very narrow range from 99.9999->100.0001. When I ran your simple3.nc array dust array through a simple statistical function of mine (that is similar to stat_dispersion ), here's what it shows: Type: double Total Size: 15241128 bytes 1905141 values Number of Dimensions: 2 Dimensions and sizes: [grid_yt | 1059] x [grid_xt | 1799] Coordinates: grid_yt: [ 0..3174000] grid_xt: [ 0..5394000] Number Of Attributes: 8 _FillValue : -10000000000 pfull : 3.176593 time : 0.01666666666666667 cell_methods : time: point long_name : dust mixing ratio output_file : dyn units : ug/kg missing_value : -10000000000 (0) Min of array = 99.99990879805409, max = 100.0001006445927, mean = 100.0000030975023, std dev = 9.552738461320711e-06 (0) 1 std dev range =99.99999354476387:100.0000126502408 (68%) (0) 2 std dev range =99.99998399202541:100.0000222029793 (95%) (0) 3 std dev range =99.99997443928694:100.0000317557177 (99%) (0) No missing data is present in this array Hope this helps! Adam On Fri, Nov 11, 2022 at 6:04 PM Debasish Hazra wrote: > Hi Adam, > Thanks. I have put first 8 variables as you suggested and put them in > google drive (as putting in ftp failed again) : > > https://drive.google.com/drive/folders/1FCFWNVf95sLpjhBYfMt7zZyqz_hiNZ2i?usp=sharing > > and shared it among ncl-talk group. I have worked on the ncl script and > attached the current code and figure. > Any help on this is appreciated. > Debasish > > > On Fri, Nov 11, 2022 at 2:38 PM Adam Phillips wrote: > >> Hi Debasish, >> As a reminder, please do not write to any ncl-talk contributor directly >> unless asked to do so. This way the community can see the complete >> discussion. >> The ftp site seemingly works for some people but fails for others, and >> there unfortunately is nothing that can be done about it. The best way >> forward is for ncl-talk participants to reduce the size of their data file >> to a size less than 15MB, and to email the file to ncl-talk, as you have >> done here. >> >> With regards to the file you sent (simple2.nc): The file does not >> include variables that are needed to correctly plot the data. For example, >> the lat and lon arrays were not included. Please include the first 8 >> variables shown in your ncdump output shown in your original message. >> >> Finally, you say the plot did not work, but ncl-talk needs more >> information to be able to help. What did not work? Was a plot created? If >> so, was the data displayed incorrectly? Were there any error messages >> returned to the terminal? If so, what were they? >> >> Unfortunately, less folks are participating in ncl-talk discussions, and >> there are no longer any NCAR staff that are paid to respond. The more >> information users provide in initial ncl-talk queries, the cleaner/easier >> the included script is to inspect, the better the odds are that the query >> will be answered. >> Adam >> >> >> >> On Wed, Nov 9, 2022 at 11:11 AM Debasish Hazra >> wrote: >> >>> I am not able to put the full data file on ucar ftp. But extracted the >>> variable in 2D and attached in the email. >>> Thanks >>> Debasish >>> >>> On Wed, Nov 9, 2022 at 10:55 AM Debasish Hazra < >>> debasish.hazra5 at gmail.com> wrote: >>> >>>> Thanks Adam, unfortunately It did not work. I have attached a tried >>>> script . I ma trying to put data in ftp, using this link >>>> https://www.ncl.ucar.edu/ftp_files.shtml .But is not working. >>>> Any help is appreciated. >>>> Thanks, >>>> Debasish. >>>> >>>> On Mon, Nov 7, 2022 at 4:28 PM Adam Phillips wrote: >>>> >>>>> Hi Debasish, >>>>> I do not have any experience working with lambert_conformal gridded >>>>> data, but looking at your ncdump output there are variables named lat and >>>>> lon that are 2D variables that I think you can use to plot the data >>>>> directly using the lat2d/lon2d assignment method. >>>>> I would try this: >>>>> >>>>> dustsfc = flt2dble(a1->dust) >>>>> lev = a1->pfull >>>>> dustsfc2 at lat2d = a1->lat >>>>> dustsfc2 at lon2d = a1->lon >>>>> labes = (/"Dust conc(ug/kg) at surface : 00FH"/) >>>>> >>>>> wks_type = "png" >>>>> ..... (continue using the rest of your script) >>>>> >>>>> If that does not work I would recommend creating a new netCDF file >>>>> that only contains a single 3D variable, along with the first 8 variables >>>>> shown in your ncdump output (pfull->lat), and send that new file to the >>>>> ncl-talk email list. Include your most recent script and any error messages >>>>> that you are getting as well. >>>>> Good luck, >>>>> Adam >>>>> >>>>> On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk < >>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>> >>>>>> Hi, >>>>>> I am trying to plot variable which is in lambert_conformal grid, but >>>>>> I am not able to generate the plot. Attached is ncl_filedump and ncl >>>>>> script.Can anyone point out how to do it. Thanks >>>>>> >>>>>> Debasish. >>>>>> _______________________________________________ >>>>>> ncl-talk mailing list >>>>>> ncl-talk at mailman.ucar.edu >>>>>> List instructions, subscriber options, unsubscribe: >>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>>> >>>>> >>>>> >>>>> -- >>>>> Adam Phillips >>>>> Associate Scientist IV, Climate Analysis Section >>>>> Climate and Global Dynamics Laboratory >>>>> National Center for Atmospheric Research >>>>> www.cgd.ucar.edu/staff/asphilli/ >>>>> >>>>> >>>>> >>>> >> >> -- >> Adam Phillips >> Associate Scientist IV, Climate Analysis Section >> Climate and Global Dynamics Laboratory >> National Center for Atmospheric Research >> www.cgd.ucar.edu/staff/asphilli/ >> >> >> > -- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: RRFSSD_TestDust.png Type: image/png Size: 122450 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Test_lambert3.ncl Type: application/octet-stream Size: 3606 bytes Desc: not available URL: From jiban_samudra18 at yahoo.com Wed Nov 16 04:26:37 2022 From: jiban_samudra18 at yahoo.com (jayanti pal) Date: Wed, 16 Nov 2022 11:26:37 +0000 (UTC) Subject: [ncl-talk] ncl CODE BUG IN CONVERTING NETCDF FILE IN INTERMEDIATE FORMAT References: <1153486502.704283.1668597997154.ref@mail.yahoo.com> Message-ID: <1153486502.704283.1668597997154@mail.yahoo.com> Sir, I am tryin to convert netcdf file to intermediate format usinf following code f=addfile("gfs_2020160512.nc", "r")TT=f->timesst=f->t_2lat=f->latlon=f->lonprintVarSummary(sst)sst=sst(0,::-1,:)printVarSummary(sst)utc_d=cd_calendar(TT,0)ymdh=cd_calendar(TT,-3)yyyy=tointeger(utc_d(:,0))mm=tointeger(utc_d(:,1))dd=tointeger(utc_d(:,2))hh=tointeger(utc_d(:,3))date=yyyy+"-0"+mm+"-"+dd+"_0"+hhWPS_IM_root_name="SST"output_file_name=WPS_IM_root_name+":"+dateField="sst"units="degC"desc="Sea Surface Temperature"sst=sst(0,:,:)print(sst&lat(0))opt = Trueopt at projection = 0opt at date = dateopt at startloc = "SWCORNER"opt at startlon = sst&lon(0)opt at startlat = sst&lat(0)opt at deltalon = sst&lon(1)-sst&lon(0)opt at deltalat = sst&lat(1)-sst&lat(0)opt at is_wind_earth_relative = Falseopt at level = 1opt at source = "NOAA High-resolution Blended Analysis"printVarSummary(sst)wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt) The above successfully run and create intermediate format which content is as follow================================================ FIELD = TTUNITS = k DESCRIPTION = TemperatureDATE = 2020-05-16_012 FCST = 0.000000SOURCE = Unknown data sourceLEVEL = 1.000000I,J DIMS = 1440, 721IPROJ = 0? PROJECTION = LAT LON? REF_X, REF_Y = 1.000000, 1.000000? REF_LAT, REF_LON = 0.000000, 0.000000? DLAT, DLON = 0.000000, 0.000000? EARTH_RADIUS = 6367.470215DATA(1,1)=230.716217 Errors line is marked in red.?ref lat, ref lon are thought to be start lat and lon and lat lon interval (dlat, dlon are -0.25 and 0.25 respectively) Using ungrib in WRF when same file is used, the folowing content is thereFIELD = TTUNITS = K DESCRIPTION = TemperatureDATE = 2020-05-16_12:00:00 FCST = 0.000000SOURCE = NCEP GFS ModelLEVEL = 200100.000000I,J DIMS = 1440, 721IPROJ = 0? PROJECTION = LAT LON? REF_X, REF_Y = 1.000000, 1.000000? REF_LAT, REF_LON = 90.000000, 0.000000? DLAT, DLON = -0.250000, 0.250000? EARTH_RADIUS = 6371.229492DATA(1,1)=271.702606 pLEASE HELP ME TO RECTIFY THE ncl SCRIPT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiban_samudra18 at yahoo.com Wed Nov 16 04:26:37 2022 From: jiban_samudra18 at yahoo.com (jayanti pal) Date: Wed, 16 Nov 2022 11:26:37 +0000 (UTC) Subject: [ncl-talk] ncl CODE BUG IN CONVERTING NETCDF FILE IN INTERMEDIATE FORMAT References: <1153486502.704283.1668597997154.ref@mail.yahoo.com> Message-ID: <1153486502.704283.1668597997154@mail.yahoo.com> Sir, I am tryin to convert netcdf file to intermediate format usinf following code f=addfile("gfs_2020160512.nc", "r")TT=f->timesst=f->t_2lat=f->latlon=f->lonprintVarSummary(sst)sst=sst(0,::-1,:)printVarSummary(sst)utc_d=cd_calendar(TT,0)ymdh=cd_calendar(TT,-3)yyyy=tointeger(utc_d(:,0))mm=tointeger(utc_d(:,1))dd=tointeger(utc_d(:,2))hh=tointeger(utc_d(:,3))date=yyyy+"-0"+mm+"-"+dd+"_0"+hhWPS_IM_root_name="SST"output_file_name=WPS_IM_root_name+":"+dateField="sst"units="degC"desc="Sea Surface Temperature"sst=sst(0,:,:)print(sst&lat(0))opt = Trueopt at projection = 0opt at date = dateopt at startloc = "SWCORNER"opt at startlon = sst&lon(0)opt at startlat = sst&lat(0)opt at deltalon = sst&lon(1)-sst&lon(0)opt at deltalat = sst&lat(1)-sst&lat(0)opt at is_wind_earth_relative = Falseopt at level = 1opt at source = "NOAA High-resolution Blended Analysis"printVarSummary(sst)wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt) The above successfully run and create intermediate format which content is as follow================================================ FIELD = TTUNITS = k DESCRIPTION = TemperatureDATE = 2020-05-16_012 FCST = 0.000000SOURCE = Unknown data sourceLEVEL = 1.000000I,J DIMS = 1440, 721IPROJ = 0? PROJECTION = LAT LON? REF_X, REF_Y = 1.000000, 1.000000? REF_LAT, REF_LON = 0.000000, 0.000000? DLAT, DLON = 0.000000, 0.000000? EARTH_RADIUS = 6367.470215DATA(1,1)=230.716217 Errors line is marked in red.?ref lat, ref lon are thought to be start lat and lon and lat lon interval (dlat, dlon are -0.25 and 0.25 respectively) Using ungrib in WRF when same file is used, the folowing content is thereFIELD = TTUNITS = K DESCRIPTION = TemperatureDATE = 2020-05-16_12:00:00 FCST = 0.000000SOURCE = NCEP GFS ModelLEVEL = 200100.000000I,J DIMS = 1440, 721IPROJ = 0? PROJECTION = LAT LON? REF_X, REF_Y = 1.000000, 1.000000? REF_LAT, REF_LON = 90.000000, 0.000000? DLAT, DLON = -0.250000, 0.250000? EARTH_RADIUS = 6371.229492DATA(1,1)=271.702606 pLEASE HELP ME TO RECTIFY THE ncl SCRIPT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Lazenby at sussex.ac.uk Wed Nov 16 04:37:53 2022 From: M.Lazenby at sussex.ac.uk (Melissa Lazenby) Date: Wed, 16 Nov 2022 11:37:53 +0000 Subject: [ncl-talk] XY Plot with Precip vs Time Message-ID: Dear All NCL Users I am having trouble displaying my x-axis correctly for an XY plot with precip anomalies vs time. Below is the figure and code: [cid:8e9bc557-0b88-48b3-9336-a13f3597a8c7] I just would like to have my x-axis represent my time data which is in years from 1856-1890. Any help would be greatly appreciated. ;************************************************ ; Concepts illustrated: ; - Drawing a xyplot ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; variable and file handling ;************************************************ in = addfile("/mnt/geog/ml382/ml382_sals000408_home_dir/melsicz/mpwapwa/ENSMEAN/pr_Amon_ENSMEAN_historical_mpwapwa_1856-1890_NDJFMA_NEW_ANOM_YMONMEAN.nc","r") pr = in->pr(:,0,:,:) print(pr) ;************************************************ ; plotting ;************************************************ wks = gsn_open_wks("X11","Figure_Mpwapwa_20CR") ; Opens a ps file res = True res at gsnMaximize = True res at tiXAxisString = "Years 1856-1890 (NDJFMA)" ; x-axis label res at tiYAxisString = "Precipitation Anomaly" ; y-axis label res at xyLineLabelsOn = True ; no contour line labels ;res at trXMinF = 1856 ; min level ;res at trXMaxF = 1890 ; max level res at xyLineThicknessF = 4.0 res at lgLineThicknessF = 2.0 res at gsnDraw = False ; do not draw the plot res at gsnFrame = False ;res at pmLegendDisplayMode = "Always" ; Display a legend. res at pmLegendParallelPosF = 1.25 ; move units right res at pmLegendOrthogonalPosF = -0.9 ; move units down res at lgBoxMinorExtentF = 0.3 res at pmLegendWidthF = 0.1 res at lgLabelFontHeightF = 0.015 ; Change the font size res at pmLegendHeightF = 0.2 res at gsnXYBarChart = True res at xyLineColors = (/"blue", "red"/) res at tiMainString = "CMIP5 ENSMEAN Precipitation Anomalies over Mpwapwa" res at gsnYRefLine = 0. ; reference line plot1=gsn_csm_xy(wks,pr&time,pr(:,0,0),res) draw(plot1) frame(wks) end Kindest Regards Melissa Dr. Melissa Lazenby Lecturer in Climate Change Department of Geography Chichester 1 C150 University of Sussex "Education is the most powerful weapon which you can use to change the world" Nelson Mandela [cid:63fbacc1-0818-44dc-b058-c7360bbf877b] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 57655 bytes Desc: image.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Outlook-v1qhdcap.png Type: image/png Size: 24937 bytes Desc: Outlook-v1qhdcap.png URL: From setareh.rahimi at gmail.com Wed Nov 16 09:36:54 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Wed, 16 Nov 2022 20:06:54 +0330 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO Message-ID: Dear all NCL users, I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO data, like the attached one. But I am not familiar with the type of data. So please advise me in this regard. Thank you so much for your attention and participation. Best wishes, -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VFM.png Type: image/png Size: 70130 bytes Desc: not available URL: From asphilli at ucar.edu Wed Nov 16 10:15:08 2022 From: asphilli at ucar.edu (Adam Phillips) Date: Wed, 16 Nov 2022 10:15:08 -0700 Subject: [ncl-talk] XY Plot with Precip vs Time In-Reply-To: References: Message-ID: Hi Melissa, There are numerous ways to go about it, including setting the tmXBMode/tmXBValues/tmXBLabels resources. In this particular case though, it is likely easiest to just modify the specified x-axis values in the plot call. Try changing this: plot1=gsn_csm_xy(wks,pr&time,pr(:,0,0),res) to this: plot1=gsn_csm_xy(wks,ispan(1856,1890,1),pr(:,0,0),res) If you want to change the labels themselves you will have to use the tmXBMode/tmXBValues/tmXBLabels resources. The values input to tmXBValues must be in the range of values specified in your x-axis input in the plot call. For example, this will work: res at tmXBMode = "Explicit" res at tmXBValues = (/1860,1870,1880,1890/) res at tmXBLabels = res at tmXBValues plot1=gsn_csm_xy(wks,ispan(1856,1890,1),pr(:,0,0),res) but this will not: res at tmXBMode = "Explicit" res at tmXBValues = (/1860,1870,1880,1890/) res at tmXBLabels = res at tmXBValues plot1=gsn_csm_xy(wks,pr&time,pr(:,0,0),res) Finally, if you set tmXBMode = "Explicit" you will lose the minor tick marks. To get them back, set tmXBMinorValues. Hope that helps! Adam On Wed, Nov 16, 2022 at 4:38 AM Melissa Lazenby via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear All NCL Users > > I am having trouble displaying my x-axis correctly for an XY plot with > precip anomalies vs time. > Below is the figure and code: > > > I just would like to have my x-axis represent my time data which is in > years from 1856-1890. > > Any help would be greatly appreciated. > > ;************************************************ > ; Concepts illustrated: > ; - Drawing a xyplot > ;************************************************ > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" > ;************************************************ > begin > ;************************************************ > ; variable and file handling > ;************************************************ > in = > addfile("/mnt/geog/ml382/ml382_sals000408_home_dir/melsicz/mpwapwa/ENSMEAN/pr_Amon_ENSMEAN_historical_mpwapwa_1856-1890_NDJFMA_NEW_ANOM_YMONMEAN.nc","r") > > > pr = in->pr(:,0,:,:) > > print(pr) > > ;************************************************ > ; plotting > ;************************************************ > wks = gsn_open_wks("X11","Figure_Mpwapwa_20CR") ; Opens > a ps file > > res = True > res at gsnMaximize = True > res at tiXAxisString = "Years 1856-1890 (NDJFMA)" ; > x-axis label > res at tiYAxisString = "Precipitation Anomaly" ; y-axis > label > res at xyLineLabelsOn = True ; no contour line > labels > ;res at trXMinF = 1856 ; min level > ;res at trXMaxF = 1890 ; max level > res at xyLineThicknessF = 4.0 > res at lgLineThicknessF = 2.0 > > res at gsnDraw = False ; do not draw the plot > res at gsnFrame = False > ;res at pmLegendDisplayMode = "Always" ; Display a legend. > > res at pmLegendParallelPosF = 1.25 ; move units right > res at pmLegendOrthogonalPosF = -0.9 ; move units down > res at lgBoxMinorExtentF = 0.3 > res at pmLegendWidthF = 0.1 > res at lgLabelFontHeightF = 0.015 ; Change the font size > res at pmLegendHeightF = 0.2 > > res at gsnXYBarChart = True > res at xyLineColors = (/"blue", "red"/) > res at tiMainString = "CMIP5 ENSMEAN Precipitation Anomalies over Mpwapwa" > res at gsnYRefLine = 0. ; reference line > > > plot1=gsn_csm_xy(wks,pr&time,pr(:,0,0),res) > > draw(plot1) > frame(wks) > > end > > Kindest Regards > Melissa > > Dr. Melissa Lazenby > Lecturer in Climate Change > Department of Geography > Chichester 1 C150 > University of Sussex > > *"Education is the most powerful weapon which you can use to change the > world" Nelson Mandela* > > > _______________________________________________ > ncl-talk mailing list > ncl-talk at mailman.ucar.edu > List instructions, subscriber options, unsubscribe: > https://mailman.ucar.edu/mailman/listinfo/ncl-talk > -- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 57655 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Outlook-v1qhdcap.png Type: image/png Size: 24937 bytes Desc: not available URL: From shea at ucar.edu Wed Nov 16 11:06:15 2022 From: shea at ucar.edu (Dennis Shea) Date: Wed, 16 Nov 2022 11:06:15 -0700 Subject: [ncl-talk] ncl CODE BUG IN CONVERTING NETCDF FILE IN INTERMEDIATE FORMAT In-Reply-To: <1153486502.704283.1668597997154@mail.yahoo.com> References: <1153486502.704283.1668597997154.ref@mail.yahoo.com> <1153486502.704283.1668597997154@mail.yahoo.com> Message-ID: You have: *lat=f->lat* *lon=f->lon* *printVarSummary(sst)* *sst=sst(0,::-1,:)* The *lat* array is in the original order. After *sst=sst(0,::-1,:)* the latitude coordinate variable *[sst&lat*] is reversed*. * See *printVarSummary(sst)* Maybe add: * print("opt at deltalat="+opt at deltalat)* to see if this is as *expected* I do not know wh*a*t happens in *wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt)* [I do not want to look at that code] but maybe that is the issue On Wed, Nov 16, 2022 at 4:26 AM jayanti pal via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Sir, > > I am tryin to convert netcdf file to intermediate format usinf following > code > > *f=addfile("gfs_2020160512.nc ", "r")* > *TT=f->time* > *sst=f->t_2* > *lat=f->lat* > *lon=f->lon* > *printVarSummary(sst)* > *sst=sst(0,::-1,:)* > *printVarSummary(sst)* > *utc_d=cd_calendar(TT,0)* > *ymdh=cd_calendar(TT,-3)* > *yyyy=tointeger(utc_d(:,0))* > *mm=tointeger(utc_d(:,1))* > *dd=tointeger(utc_d(:,2))* > *hh=tointeger(utc_d(:,3))* > *date=yyyy+"-0"+mm+"-"+dd+"_0"+hh* > *WPS_IM_root_name="SST"* > *output_file_name=WPS_IM_root_name+":"+date* > *Field="sst"* > *units="degC"* > *desc="Sea Surface Temperature"* > *sst=sst(0,:,:)* > *print(sst&lat(0))* > *opt = True* > *opt at projection = 0* > *opt at date = date* > *opt at startloc = "SWCORNER"* > *opt at startlon = sst&lon(0)* > *opt at startlat = sst&lat(0)* > *opt at deltalon = sst&lon(1)-sst&lon(0)* > *opt at deltalat = sst&lat(1)-sst&lat(0)* > *opt at is_wind_earth_relative = False* > *opt at level = 1* > *opt at source = "NOAA High-resolution Blended Analysis"* > *printVarSummary(sst)* > *wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt)* > > > > The above successfully run and create intermediate format which content is > as follow > *================================================* > *FIELD = TT* > *UNITS = k DESCRIPTION = Temperature* > *DATE = 2020-05-16_012 FCST = 0.000000* > *SOURCE = Unknown data source* > *LEVEL = 1.000000* > *I,J DIMS = 1440, 721* > *IPROJ = 0 PROJECTION = LAT LON* > * REF_X, REF_Y = 1.000000, 1.000000* > * REF_LAT, REF_LON = 0.000000, 0.000000* > * DLAT, DLON = 0.000000, 0.000000* > * EARTH_RADIUS = 6367.470215* > *DATA(1,1)=230.716217* > > > > > Errors line is marked in red. > ref lat, ref lon are thought to be start lat and lon and lat lon interval > (dlat, dlon are -0.25 and 0.25 respectively) > > Using ungrib in WRF when same file is used, the folowing content is there > *FIELD = TT* > *UNITS = K DESCRIPTION = Temperature* > *DATE = 2020-05-16_12:00:00 FCST = 0.000000* > *SOURCE = NCEP GFS Model* > *LEVEL = 200100.000000* > *I,J DIMS = 1440, 721* > *IPROJ = 0 PROJECTION = LAT LON* > * REF_X, REF_Y = 1.000000, 1.000000* > * REF_LAT, REF_LON = 90.000000, 0.000000* > * DLAT, DLON = -0.250000, 0.250000* > * EARTH_RADIUS = 6371.229492* > *DATA(1,1)=271.702606* > > > pLEASE HELP ME TO RECTIFY THE ncl SCRIPT. > > > > > _______________________________________________ > 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 Nov 16 11:06:15 2022 From: shea at ucar.edu (Dennis Shea) Date: Wed, 16 Nov 2022 11:06:15 -0700 Subject: [ncl-talk] ncl CODE BUG IN CONVERTING NETCDF FILE IN INTERMEDIATE FORMAT In-Reply-To: <1153486502.704283.1668597997154@mail.yahoo.com> References: <1153486502.704283.1668597997154.ref@mail.yahoo.com> <1153486502.704283.1668597997154@mail.yahoo.com> Message-ID: You have: *lat=f->lat* *lon=f->lon* *printVarSummary(sst)* *sst=sst(0,::-1,:)* The *lat* array is in the original order. After *sst=sst(0,::-1,:)* the latitude coordinate variable *[sst&lat*] is reversed*. * See *printVarSummary(sst)* Maybe add: * print("opt at deltalat="+opt at deltalat)* to see if this is as *expected* I do not know wh*a*t happens in *wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt)* [I do not want to look at that code] but maybe that is the issue On Wed, Nov 16, 2022 at 4:26 AM jayanti pal via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Sir, > > I am tryin to convert netcdf file to intermediate format usinf following > code > > *f=addfile("gfs_2020160512.nc ", "r")* > *TT=f->time* > *sst=f->t_2* > *lat=f->lat* > *lon=f->lon* > *printVarSummary(sst)* > *sst=sst(0,::-1,:)* > *printVarSummary(sst)* > *utc_d=cd_calendar(TT,0)* > *ymdh=cd_calendar(TT,-3)* > *yyyy=tointeger(utc_d(:,0))* > *mm=tointeger(utc_d(:,1))* > *dd=tointeger(utc_d(:,2))* > *hh=tointeger(utc_d(:,3))* > *date=yyyy+"-0"+mm+"-"+dd+"_0"+hh* > *WPS_IM_root_name="SST"* > *output_file_name=WPS_IM_root_name+":"+date* > *Field="sst"* > *units="degC"* > *desc="Sea Surface Temperature"* > *sst=sst(0,:,:)* > *print(sst&lat(0))* > *opt = True* > *opt at projection = 0* > *opt at date = date* > *opt at startloc = "SWCORNER"* > *opt at startlon = sst&lon(0)* > *opt at startlat = sst&lat(0)* > *opt at deltalon = sst&lon(1)-sst&lon(0)* > *opt at deltalat = sst&lat(1)-sst&lat(0)* > *opt at is_wind_earth_relative = False* > *opt at level = 1* > *opt at source = "NOAA High-resolution Blended Analysis"* > *printVarSummary(sst)* > *wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt)* > > > > The above successfully run and create intermediate format which content is > as follow > *================================================* > *FIELD = TT* > *UNITS = k DESCRIPTION = Temperature* > *DATE = 2020-05-16_012 FCST = 0.000000* > *SOURCE = Unknown data source* > *LEVEL = 1.000000* > *I,J DIMS = 1440, 721* > *IPROJ = 0 PROJECTION = LAT LON* > * REF_X, REF_Y = 1.000000, 1.000000* > * REF_LAT, REF_LON = 0.000000, 0.000000* > * DLAT, DLON = 0.000000, 0.000000* > * EARTH_RADIUS = 6367.470215* > *DATA(1,1)=230.716217* > > > > > Errors line is marked in red. > ref lat, ref lon are thought to be start lat and lon and lat lon interval > (dlat, dlon are -0.25 and 0.25 respectively) > > Using ungrib in WRF when same file is used, the folowing content is there > *FIELD = TT* > *UNITS = K DESCRIPTION = Temperature* > *DATE = 2020-05-16_12:00:00 FCST = 0.000000* > *SOURCE = NCEP GFS Model* > *LEVEL = 200100.000000* > *I,J DIMS = 1440, 721* > *IPROJ = 0 PROJECTION = LAT LON* > * REF_X, REF_Y = 1.000000, 1.000000* > * REF_LAT, REF_LON = 90.000000, 0.000000* > * DLAT, DLON = -0.250000, 0.250000* > * EARTH_RADIUS = 6371.229492* > *DATA(1,1)=271.702606* > > > pLEASE HELP ME TO RECTIFY THE ncl SCRIPT. > > > > > _______________________________________________ > 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 Nov 16 11:13:56 2022 From: shea at ucar.edu (Dennis Shea) Date: Wed, 16 Nov 2022 11:13:56 -0700 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: To me, it looks like NCL was used to generate the plot. *https://www.ncl.ucar.edu/Applications/* Under Datasets: click* Calipso* These types of plots can be 'complicated' Maybe you can contact the person/group that created the VFM.png plot ..... Good Luck On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > > Dear all NCL users, > > I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO data, > like the attached one. But I am not familiar with the type of data. So > please advise me in this regard. > > Thank you so much for your attention and participation. > Best wishes, > -- > S.Rahimi > > _______________________________________________ > 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 setareh.rahimi at gmail.com Wed Nov 16 23:04:21 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Thu, 17 Nov 2022 09:34:21 +0330 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: Dear Dennis, Thank you for your advice. I already visited this section of NCL page, but I need to know how to indicate the names of available particles in the atmosphere (like dust, Black carbon,...) using NCL. I appreciate any suggestions. Best wishes, On Wed, Nov 16, 2022 at 9:44 PM Dennis Shea wrote: > To me, it looks like NCL was used to generate the plot. > > *https://www.ncl.ucar.edu/Applications/* > > > Under Datasets: click* Calipso* > > These types of plots can be 'complicated' > > Maybe you can contact the person/group that created the VFM.png plot > > > ..... Good Luck > > On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> >> Dear all NCL users, >> >> I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO data, >> like the attached one. But I am not familiar with the type of data. So >> please advise me in this regard. >> >> Thank you so much for your attention and participation. >> Best wishes, >> -- >> S.Rahimi >> >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Thu Nov 17 17:12:03 2022 From: shea at ucar.edu (Dennis Shea) Date: Thu, 17 Nov 2022 17:12:03 -0700 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: re: "... need to know how to indicate the names of available particles in the atmosphere (like dust, Black carbon,...) using NCL" === I must admit, I doin't understand "names of available particles" D On Wed, Nov 16, 2022 at 11:04 PM Setareh Rahimi wrote: > Dear Dennis, > Thank you for your advice. I already visited this section of NCL page, but > I need to know how to indicate the names of available particles in the > atmosphere (like dust, Black carbon,...) using NCL. > I appreciate any suggestions. > Best wishes, > > On Wed, Nov 16, 2022 at 9:44 PM Dennis Shea wrote: > >> To me, it looks like NCL was used to generate the plot. >> >> *https://www.ncl.ucar.edu/Applications/* >> >> >> Under Datasets: click* Calipso* >> >> These types of plots can be 'complicated' >> >> Maybe you can contact the person/group that created the VFM.png plot >> >> >> ..... Good Luck >> >> On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> >>> Dear all NCL users, >>> >>> I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO data, >>> like the attached one. But I am not familiar with the type of data. So >>> please advise me in this regard. >>> >>> Thank you so much for your attention and participation. >>> Best wishes, >>> -- >>> S.Rahimi >>> >>> _______________________________________________ >>> ncl-talk mailing list >>> ncl-talk at mailman.ucar.edu >>> List instructions, subscriber options, unsubscribe: >>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>> >> > > -- > S.Rahimi > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From debasish.hazra5 at gmail.com Sat Nov 19 13:38:33 2022 From: debasish.hazra5 at gmail.com (Debasish Hazra) Date: Sat, 19 Nov 2022 15:38:33 -0500 Subject: [ncl-talk] Unable to generate plot from Lambert_conformal grid data In-Reply-To: References: Message-ID: Thanks Adam for all your help. Debasish On Tue, Nov 15, 2022 at 1:56 PM Adam Phillips wrote: > Hi Debasish, > I have downloaded your simple3.nc file, and modified and ran your > Test_lambert2.ncl file. I believe you were plotting the data correctly, > and I am attaching my script and resulting plot. In short, I believe your > data spans a very narrow range from 99.9999->100.0001. When I ran your > simple3.nc array dust array through a simple statistical function of mine > (that is similar to stat_dispersion > ), > here's what it shows: > > Type: double > Total Size: 15241128 bytes > 1905141 values > Number of Dimensions: 2 > Dimensions and sizes: [grid_yt | 1059] x [grid_xt | 1799] > Coordinates: > grid_yt: [ 0..3174000] > grid_xt: [ 0..5394000] > Number Of Attributes: 8 > _FillValue : -10000000000 > pfull : 3.176593 > time : 0.01666666666666667 > cell_methods : time: point > long_name : dust mixing ratio > output_file : dyn > units : ug/kg > missing_value : -10000000000 > (0) Min of array = 99.99990879805409, max = 100.0001006445927, mean = > 100.0000030975023, std dev = 9.552738461320711e-06 > (0) 1 std dev range =99.99999354476387:100.0000126502408 (68%) > (0) 2 std dev range =99.99998399202541:100.0000222029793 (95%) > (0) 3 std dev range =99.99997443928694:100.0000317557177 (99%) > (0) No missing data is present in this array > > Hope this helps! > Adam > > On Fri, Nov 11, 2022 at 6:04 PM Debasish Hazra > wrote: > >> Hi Adam, >> Thanks. I have put first 8 variables as you suggested and put them in >> google drive (as putting in ftp failed again) : >> >> https://drive.google.com/drive/folders/1FCFWNVf95sLpjhBYfMt7zZyqz_hiNZ2i?usp=sharing >> >> and shared it among ncl-talk group. I have worked on the ncl script and >> attached the current code and figure. >> Any help on this is appreciated. >> Debasish >> >> >> On Fri, Nov 11, 2022 at 2:38 PM Adam Phillips wrote: >> >>> Hi Debasish, >>> As a reminder, please do not write to any ncl-talk contributor directly >>> unless asked to do so. This way the community can see the complete >>> discussion. >>> The ftp site seemingly works for some people but fails for others, and >>> there unfortunately is nothing that can be done about it. The best way >>> forward is for ncl-talk participants to reduce the size of their data file >>> to a size less than 15MB, and to email the file to ncl-talk, as you have >>> done here. >>> >>> With regards to the file you sent (simple2.nc): The file does not >>> include variables that are needed to correctly plot the data. For example, >>> the lat and lon arrays were not included. Please include the first 8 >>> variables shown in your ncdump output shown in your original message. >>> >>> Finally, you say the plot did not work, but ncl-talk needs more >>> information to be able to help. What did not work? Was a plot created? If >>> so, was the data displayed incorrectly? Were there any error messages >>> returned to the terminal? If so, what were they? >>> >>> Unfortunately, less folks are participating in ncl-talk discussions, and >>> there are no longer any NCAR staff that are paid to respond. The more >>> information users provide in initial ncl-talk queries, the cleaner/easier >>> the included script is to inspect, the better the odds are that the query >>> will be answered. >>> Adam >>> >>> >>> >>> On Wed, Nov 9, 2022 at 11:11 AM Debasish Hazra < >>> debasish.hazra5 at gmail.com> wrote: >>> >>>> I am not able to put the full data file on ucar ftp. But extracted the >>>> variable in 2D and attached in the email. >>>> Thanks >>>> Debasish >>>> >>>> On Wed, Nov 9, 2022 at 10:55 AM Debasish Hazra < >>>> debasish.hazra5 at gmail.com> wrote: >>>> >>>>> Thanks Adam, unfortunately It did not work. I have attached a tried >>>>> script . I ma trying to put data in ftp, using this link >>>>> https://www.ncl.ucar.edu/ftp_files.shtml .But is not working. >>>>> Any help is appreciated. >>>>> Thanks, >>>>> Debasish. >>>>> >>>>> On Mon, Nov 7, 2022 at 4:28 PM Adam Phillips >>>>> wrote: >>>>> >>>>>> Hi Debasish, >>>>>> I do not have any experience working with lambert_conformal gridded >>>>>> data, but looking at your ncdump output there are variables named lat and >>>>>> lon that are 2D variables that I think you can use to plot the data >>>>>> directly using the lat2d/lon2d assignment method. >>>>>> I would try this: >>>>>> >>>>>> dustsfc = flt2dble(a1->dust) >>>>>> lev = a1->pfull >>>>>> dustsfc2 at lat2d = a1->lat >>>>>> dustsfc2 at lon2d = a1->lon >>>>>> labes = (/"Dust conc(ug/kg) at surface : 00FH"/) >>>>>> >>>>>> wks_type = "png" >>>>>> ..... (continue using the rest of your script) >>>>>> >>>>>> If that does not work I would recommend creating a new netCDF file >>>>>> that only contains a single 3D variable, along with the first 8 variables >>>>>> shown in your ncdump output (pfull->lat), and send that new file to the >>>>>> ncl-talk email list. Include your most recent script and any error messages >>>>>> that you are getting as well. >>>>>> Good luck, >>>>>> Adam >>>>>> >>>>>> On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk < >>>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>>> >>>>>>> Hi, >>>>>>> I am trying to plot variable which is in lambert_conformal grid, but >>>>>>> I am not able to generate the plot. Attached is ncl_filedump and ncl >>>>>>> script.Can anyone point out how to do it. Thanks >>>>>>> >>>>>>> Debasish. >>>>>>> _______________________________________________ >>>>>>> ncl-talk mailing list >>>>>>> ncl-talk at mailman.ucar.edu >>>>>>> List instructions, subscriber options, unsubscribe: >>>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Adam Phillips >>>>>> Associate Scientist IV, Climate Analysis Section >>>>>> Climate and Global Dynamics Laboratory >>>>>> National Center for Atmospheric Research >>>>>> www.cgd.ucar.edu/staff/asphilli/ >>>>>> >>>>>> >>>>>> >>>>> >>> >>> -- >>> Adam Phillips >>> Associate Scientist IV, Climate Analysis Section >>> Climate and Global Dynamics Laboratory >>> National Center for Atmospheric Research >>> www.cgd.ucar.edu/staff/asphilli/ >>> >>> >>> >> > > -- > 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 setareh.rahimi at gmail.com Wed Nov 23 02:11:55 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Wed, 23 Nov 2022 12:41:55 +0330 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: Dear Dennis, I could find the script I was looking for ( http://hdfeos.org/zoo/MORE/LaRC/CALIPSO/CAL_LID_L2_VFM-Standard-V4-10.2009-07-13T08-27-14ZD.hdf.v.ncl ) under this page: http://hdfeos.org/zoo/LaRC_CALIPSO_ncl.php. I need to plot the following latitude: 32 N - 38 N. I should plots CALIPSO data for different months for my study area. However, as CALIPSO overpasses are not the same for a certain area, after setting the below command lines in the script I got plots for another latitude. lat = hdf_file->Latitude(1650:1500,0) profile = fcf(1650:1500,1165:5514) So how can I have plots exactly for latitude between 32 N and 38 N, please? Many thanks in advance, Best wishes, On Fri, Nov 18, 2022 at 3:42 AM Dennis Shea wrote: > re: "... need to know how to indicate the names of available particles in > the atmosphere (like dust, Black carbon,...) using NCL" > === > I must admit, I doin't understand "names of available particles" > > D > > > On Wed, Nov 16, 2022 at 11:04 PM Setareh Rahimi > wrote: > >> Dear Dennis, >> Thank you for your advice. I already visited this section of NCL page, >> but I need to know how to indicate the names of available particles in the >> atmosphere (like dust, Black carbon,...) using NCL. >> I appreciate any suggestions. >> Best wishes, >> >> On Wed, Nov 16, 2022 at 9:44 PM Dennis Shea wrote: >> >>> To me, it looks like NCL was used to generate the plot. >>> >>> *https://www.ncl.ucar.edu/Applications/* >>> >>> >>> Under Datasets: click* Calipso* >>> >>> These types of plots can be 'complicated' >>> >>> Maybe you can contact the person/group that created the VFM.png plot >>> >>> >>> ..... Good Luck >>> >>> On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < >>> ncl-talk at mailman.ucar.edu> wrote: >>> >>>> >>>> Dear all NCL users, >>>> >>>> I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO >>>> data, like the attached one. But I am not familiar with the type of >>>> data. So please advise me in this regard. >>>> >>>> Thank you so much for your attention and participation. >>>> Best wishes, >>>> -- >>>> S.Rahimi >>>> >>>> _______________________________________________ >>>> ncl-talk mailing list >>>> ncl-talk at mailman.ucar.edu >>>> List instructions, subscriber options, unsubscribe: >>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>> >>> >> >> -- >> S.Rahimi >> >> -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From olagueralyndonmark429 at gmail.com Thu Nov 24 21:24:24 2022 From: olagueralyndonmark429 at gmail.com (Lyndz) Date: Fri, 25 Nov 2022 12:24:24 +0800 Subject: [ncl-talk] How to calculate d(anyvariable)/dt from a wrf file in NCL Message-ID: Dear NCL experts, I would like to compute the potential vorticity tendency (dPV/dt) from a wrf file. However, there is no time dimension in the variables (although the "time" variable can be obtained using the wrf_user_getvar) Here's my script so far: filename = "./wrfout_d01_2011-12-12_12_00_00" a = addfile(filename,"r") times = wrf_user_getvar(a,"times",-1) ; get all times in the file it = 89 ; first time step theta = wrf_user_getvar(a,"theta",it) pv = wrf_user_getvar(a,"pvo",it) ;potential vorticity I would like to compute dPV/dt using centered finite difference (center_finite_diff_n). Any ideas/solutions/examples on how can I do this in NCL? I'll appreciate any help on this matter. -Lyndz -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Fri Nov 25 14:56:21 2022 From: shea at ucar.edu (Dennis Shea) Date: Fri, 25 Nov 2022 14:56:21 -0700 Subject: [ncl-talk] How to calculate d(anyvariable)/dt from a wrf file in NCL In-Reply-To: References: Message-ID: I don't understand " there is no time dimension " I----------------- Please see *wrf_times_c* See the examples On Thu, Nov 24, 2022 at 9:24 PM Lyndz via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear NCL experts, > > I would like to compute the potential vorticity tendency (dPV/dt) from a > wrf file. > However, there is no time dimension in the variables (although the "time" > variable can be obtained using the wrf_user_getvar) > > Here's my script so far: > > filename = "./wrfout_d01_2011-12-12_12_00_00" > a = addfile(filename,"r") > times = wrf_user_getvar(a,"times",-1) ; get all times in > the file > it = 89 ; first time step > theta = wrf_user_getvar(a,"theta",it) > pv = wrf_user_getvar(a,"pvo",it) ;potential > vorticity > > I would like to compute dPV/dt using centered finite difference > (center_finite_diff_n). > > Any ideas/solutions/examples on how can I do this in NCL? > > I'll appreciate any help on this matter. > > -Lyndz > _______________________________________________ > 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 Fri Nov 25 15:01:49 2022 From: shea at ucar.edu (Dennis Shea) Date: Fri, 25 Nov 2022 15:01:49 -0700 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: re: "exactly for latitude between 32 N and 38 N, please?" The words "exactly" and "between" makes this unclear to me. Do you mean "exactly" 36N? (32N + 36N)/2 = 36N Do you mean all latitudes "between" 32N and 36N? I am not very familiar with CALIPSO data grids. You may have to interpolate the data to some standard grid which includes the latitude: One dimensional coordinate variable: NCL's coordinate subscripting: {...} x = data(*{*36*}*,:) ; all data at or hear 36N To find indices (subscripts) corresponding to specific 'targets One-dimensional coordinates *ind* il = ind(lat.ge.32 .and. lat.le.36) ; lat(lat) Two-dimensional coordinates *region_ind* *getind_latlon2d* ============= THe HDF EOS group has many examples using Matlab, NCL, Python and IDL * http://hdfeos.org/zoo/* perhaps, one of the NCL examples could help. On Wed, Nov 23, 2022 at 2:12 AM Setareh Rahimi wrote: > Dear Dennis, > I could find the script I was looking for ( > http://hdfeos.org/zoo/MORE/LaRC/CALIPSO/CAL_LID_L2_VFM-Standard-V4-10.2009-07-13T08-27-14ZD.hdf.v.ncl > ) under this page: http://hdfeos.org/zoo/LaRC_CALIPSO_ncl.php. > > I need to plot the following latitude: 32 N - 38 N. > > I should plots CALIPSO data for different months for my study area. > However, as CALIPSO overpasses are not the same for a certain area, after > setting the below command lines in the script I got plots for another > latitude. > > lat = hdf_file->Latitude(1650:1500,0) > profile = fcf(1650:1500,1165:5514) > > So how can I have plots exactly for latitude between 32 N and 38 N, > please? > > Many thanks in advance, > Best wishes, > > > > > > On Fri, Nov 18, 2022 at 3:42 AM Dennis Shea wrote: > >> re: "... need to know how to indicate the names of available particles in >> the atmosphere (like dust, Black carbon,...) using NCL" >> === >> I must admit, I doin't understand "names of available particles" >> >> D >> >> >> On Wed, Nov 16, 2022 at 11:04 PM Setareh Rahimi >> wrote: >> >>> Dear Dennis, >>> Thank you for your advice. I already visited this section of NCL page, >>> but I need to know how to indicate the names of available particles in the >>> atmosphere (like dust, Black carbon,...) using NCL. >>> I appreciate any suggestions. >>> Best wishes, >>> >>> On Wed, Nov 16, 2022 at 9:44 PM Dennis Shea wrote: >>> >>>> To me, it looks like NCL was used to generate the plot. >>>> >>>> *https://www.ncl.ucar.edu/Applications/* >>>> >>>> >>>> Under Datasets: click* Calipso* >>>> >>>> These types of plots can be 'complicated' >>>> >>>> Maybe you can contact the person/group that created the VFM.png plot >>>> >>>> >>>> ..... Good Luck >>>> >>>> On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < >>>> ncl-talk at mailman.ucar.edu> wrote: >>>> >>>>> >>>>> Dear all NCL users, >>>>> >>>>> I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO >>>>> data, like the attached one. But I am not familiar with the type of >>>>> data. So please advise me in this regard. >>>>> >>>>> Thank you so much for your attention and participation. >>>>> Best wishes, >>>>> -- >>>>> S.Rahimi >>>>> >>>>> _______________________________________________ >>>>> ncl-talk mailing list >>>>> ncl-talk at mailman.ucar.edu >>>>> List instructions, subscriber options, unsubscribe: >>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>> >>>> >>> >>> -- >>> S.Rahimi >>> >>> > > -- > S.Rahimi > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From setareh.rahimi at gmail.com Sun Nov 27 03:30:04 2022 From: setareh.rahimi at gmail.com (Setareh Rahimi) Date: Sun, 27 Nov 2022 14:00:04 +0330 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: Dear Dennis, Thanks for your email. I mentioned "exactly for latitude between 32 N and 38 N, please", because when I add one of the CALIPSO files, say file number 1, to the script and set the latitude as follows: lat = hdf_file->Latitude(1650:1500,0) profile = fcf(1650:1500,1165:5514) I gave a plot for, say X to Y. After adding another CALIPSO file, say file number 2, and making no changes to the above command lines I got the plot for another latitude say M-N. That is why I mentioned "exactly for latitude between 32 N and 38 N, please" On Sat, Nov 26, 2022 at 1:32 AM Dennis Shea wrote: > re: "exactly for latitude between 32 N and 38 N, please?" > > The words "exactly" and "between" makes this unclear to me. > > Do you mean "exactly" 36N? (32N + 36N)/2 = 36N > > Do you mean all latitudes "between" 32N and 36N? > > I am not very familiar with CALIPSO data grids. > > You may have to interpolate the data to some standard grid which includes > the latitude: > > One dimensional coordinate variable: > > NCL's coordinate subscripting: {...} > x = data(*{*36*}*,:) ; all data at or hear 36N > > To find indices (subscripts) corresponding to specific 'targets > > One-dimensional coordinates > > *ind* > > il = ind(lat.ge.32 .and. lat.le.36) ; lat(lat) > > Two-dimensional coordinates > *region_ind* > > *getind_latlon2d* > > > ============= > THe HDF EOS group has many examples using Matlab, NCL, Python and IDL > * http://hdfeos.org/zoo/* > perhaps, one of the NCL examples could help. > > > On Wed, Nov 23, 2022 at 2:12 AM Setareh Rahimi > wrote: > >> Dear Dennis, >> I could find the script I was looking for ( >> http://hdfeos.org/zoo/MORE/LaRC/CALIPSO/CAL_LID_L2_VFM-Standard-V4-10.2009-07-13T08-27-14ZD.hdf.v.ncl >> ) under this page: http://hdfeos.org/zoo/LaRC_CALIPSO_ncl.php. >> >> I need to plot the following latitude: 32 N - 38 N. >> >> I should plots CALIPSO data for different months for my study area. >> However, as CALIPSO overpasses are not the same for a certain area, after >> setting the below command lines in the script I got plots for another >> latitude. >> >> lat = hdf_file->Latitude(1650:1500,0) >> profile = fcf(1650:1500,1165:5514) >> >> So how can I have plots exactly for latitude between 32 N and 38 N, >> please? >> >> Many thanks in advance, >> Best wishes, >> >> >> >> >> >> On Fri, Nov 18, 2022 at 3:42 AM Dennis Shea wrote: >> >>> re: "... need to know how to indicate the names of available particles >>> in the atmosphere (like dust, Black carbon,...) using NCL" >>> === >>> I must admit, I doin't understand "names of available particles" >>> >>> D >>> >>> >>> On Wed, Nov 16, 2022 at 11:04 PM Setareh Rahimi < >>> setareh.rahimi at gmail.com> wrote: >>> >>>> Dear Dennis, >>>> Thank you for your advice. I already visited this section of NCL page, >>>> but I need to know how to indicate the names of available particles in the >>>> atmosphere (like dust, Black carbon,...) using NCL. >>>> I appreciate any suggestions. >>>> Best wishes, >>>> >>>> On Wed, Nov 16, 2022 at 9:44 PM Dennis Shea wrote: >>>> >>>>> To me, it looks like NCL was used to generate the plot. >>>>> >>>>> *https://www.ncl.ucar.edu/Applications/* >>>>> >>>>> >>>>> Under Datasets: click* Calipso* >>>>> >>>>> These types of plots can be 'complicated' >>>>> >>>>> Maybe you can contact the person/group that created the VFM.png plot >>>>> >>>>> >>>>> ..... Good Luck >>>>> >>>>> On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < >>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>> >>>>>> >>>>>> Dear all NCL users, >>>>>> >>>>>> I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO >>>>>> data, like the attached one. But I am not familiar with the type of >>>>>> data. So please advise me in this regard. >>>>>> >>>>>> Thank you so much for your attention and participation. >>>>>> Best wishes, >>>>>> -- >>>>>> S.Rahimi >>>>>> >>>>>> _______________________________________________ >>>>>> ncl-talk mailing list >>>>>> ncl-talk at mailman.ucar.edu >>>>>> List instructions, subscriber options, unsubscribe: >>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>>> >>>>> >>>> >>>> -- >>>> S.Rahimi >>>> >>>> >> >> -- >> S.Rahimi >> >> -- S.Rahimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Sun Nov 27 15:52:07 2022 From: shea at ucar.edu (Dennis Shea) Date: Sun, 27 Nov 2022 15:52:07 -0700 Subject: [ncl-talk] Vertical Feature Mask (VFM) diagram using CALIPSO In-Reply-To: References: Message-ID: You are looping over multiple files.and each file has a different lat/lon arrangement? SInce you are using: lat = hdf_file->Latitude(1650:1500,0) ?? Each file has two-dimensional lat/lon arrays with different values?? *rcm2points* : where the output (target) lat/lon include you desired latitude? Maybe others have a clearer idea of what is desired? On Sun, Nov 27, 2022 at 3:30 AM Setareh Rahimi wrote: > Dear Dennis, > Thanks for your email. I mentioned "exactly for latitude between 32 N > and 38 N, please", because when I add one of the CALIPSO files, say file > number 1, to the script and set the latitude as follows: > lat = hdf_file->Latitude(1650:1500,0) > profile = fcf(1650:1500,1165:5514) > > I gave a plot for, say X to Y. After adding another CALIPSO file, say file > number 2, and making no changes to the above command lines I got the plot > for another latitude say M-N. > That is why I mentioned "exactly for latitude between 32 N and 38 N, > please" > > > On Sat, Nov 26, 2022 at 1:32 AM Dennis Shea wrote: > >> re: "exactly for latitude between 32 N and 38 N, please?" >> >> The words "exactly" and "between" makes this unclear to me. >> >> Do you mean "exactly" 36N? (32N + 36N)/2 = 36N >> >> Do you mean all latitudes "between" 32N and 36N? >> >> I am not very familiar with CALIPSO data grids. >> >> You may have to interpolate the data to some standard grid which includes >> the latitude: >> >> One dimensional coordinate variable: >> >> NCL's coordinate subscripting: {...} >> x = data(*{*36*}*,:) ; all data at or hear 36N >> >> To find indices (subscripts) corresponding to specific 'targets >> >> One-dimensional coordinates >> >> *ind* >> >> il = ind(lat.ge.32 .and. lat.le.36) ; lat(lat) >> >> Two-dimensional coordinates >> *region_ind* >> >> *getind_latlon2d* >> >> >> ============= >> THe HDF EOS group has many examples using Matlab, NCL, Python and IDL >> * http://hdfeos.org/zoo/* >> perhaps, one of the NCL examples could help. >> >> >> On Wed, Nov 23, 2022 at 2:12 AM Setareh Rahimi >> wrote: >> >>> Dear Dennis, >>> I could find the script I was looking for ( >>> http://hdfeos.org/zoo/MORE/LaRC/CALIPSO/CAL_LID_L2_VFM-Standard-V4-10.2009-07-13T08-27-14ZD.hdf.v.ncl >>> ) under this page: http://hdfeos.org/zoo/LaRC_CALIPSO_ncl.php. >>> >>> I need to plot the following latitude: 32 N - 38 N. >>> >>> I should plots CALIPSO data for different months for my study area. >>> However, as CALIPSO overpasses are not the same for a certain area, after >>> setting the below command lines in the script I got plots for another >>> latitude. >>> >>> lat = hdf_file->Latitude(1650:1500,0) >>> profile = fcf(1650:1500,1165:5514) >>> >>> So how can I have plots exactly for latitude between 32 N and 38 N, >>> please? >>> >>> Many thanks in advance, >>> Best wishes, >>> >>> >>> >>> >>> >>> On Fri, Nov 18, 2022 at 3:42 AM Dennis Shea wrote: >>> >>>> re: "... need to know how to indicate the names of available particles >>>> in the atmosphere (like dust, Black carbon,...) using NCL" >>>> === >>>> I must admit, I doin't understand "names of available particles" >>>> >>>> D >>>> >>>> >>>> On Wed, Nov 16, 2022 at 11:04 PM Setareh Rahimi < >>>> setareh.rahimi at gmail.com> wrote: >>>> >>>>> Dear Dennis, >>>>> Thank you for your advice. I already visited this section of NCL page, >>>>> but I need to know how to indicate the names of available particles in the >>>>> atmosphere (like dust, Black carbon,...) using NCL. >>>>> I appreciate any suggestions. >>>>> Best wishes, >>>>> >>>>> On Wed, Nov 16, 2022 at 9:44 PM Dennis Shea wrote: >>>>> >>>>>> To me, it looks like NCL was used to generate the plot. >>>>>> >>>>>> *https://www.ncl.ucar.edu/Applications/* >>>>>> >>>>>> >>>>>> Under Datasets: click* Calipso* >>>>>> >>>>>> These types of plots can be 'complicated' >>>>>> >>>>>> Maybe you can contact the person/group that created the VFM.png plot >>>>>> >>>>>> >>>>>> ..... Good Luck >>>>>> >>>>>> On Wed, Nov 16, 2022 at 9:37 AM Setareh Rahimi via ncl-talk < >>>>>> ncl-talk at mailman.ucar.edu> wrote: >>>>>> >>>>>>> >>>>>>> Dear all NCL users, >>>>>>> >>>>>>> I want to plot a Vertical Feature Mask (VFM) diagram using CALIPSO >>>>>>> data, like the attached one. But I am not familiar with the type of >>>>>>> data. So please advise me in this regard. >>>>>>> >>>>>>> Thank you so much for your attention and participation. >>>>>>> Best wishes, >>>>>>> -- >>>>>>> S.Rahimi >>>>>>> >>>>>>> _______________________________________________ >>>>>>> ncl-talk mailing list >>>>>>> ncl-talk at mailman.ucar.edu >>>>>>> List instructions, subscriber options, unsubscribe: >>>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>>>> >>>>>> >>>>> >>>>> -- >>>>> S.Rahimi >>>>> >>>>> >>> >>> -- >>> S.Rahimi >>> >>> > > -- > S.Rahimi > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From olagueralyndonmark429 at gmail.com Sun Nov 27 22:20:59 2022 From: olagueralyndonmark429 at gmail.com (Lyndz) Date: Mon, 28 Nov 2022 13:20:59 +0800 Subject: [ncl-talk] How to calculate d(anyvariable)/dt from a wrf file in NCL In-Reply-To: References: Message-ID: Dear Sir Dennis, my mistake. should be "time coordinate". I was able to solve this using that function in ncl. Many thanks!! -Lyndz -------------- next part -------------- An HTML attachment was scrubbed... URL: From olagueralyndonmark429 at gmail.com Sun Nov 27 22:35:46 2022 From: olagueralyndonmark429 at gmail.com (Lyndz) Date: Mon, 28 Nov 2022 13:35:46 +0800 Subject: [ncl-talk] splitting very large wrfout files Message-ID: Dear NCL-experts, Has anyone tried splitting a large wrfout file using NCL and writing the output to the original wrfout format? I am encountering an nclMalloc issue when processing large wrfout files. Say I just to get specific time steps such as this: load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" filename = "./wrfout_d01_2011-12-12_12_00_00" a = addfile(filename,"r") times = wrf_user_getvar(a,"times",-1) theta_a = wrf_user_getvar(a,"theta",-1) pv_a = wrf_user_getvar(a,"pvo",-1) ;potential vorticity theta = theta_a(80:90,:,:,:) pv = pv_a(80:90,:,:,:) How do I save this to the original wrfout format? I'll appreciate any help on this. -Lyndz -------------- next part -------------- An HTML attachment was scrubbed... URL: From shea at ucar.edu Mon Nov 28 09:19:57 2022 From: shea at ucar.edu (Dennis Shea) Date: Mon, 28 Nov 2022 09:19:57 -0700 Subject: [ncl-talk] splitting very large wrfout files In-Reply-To: References: Message-ID: maybe the netCDF operators (NCO) or Climate Data Operators (CDO) would be best NCO [***untested***] *ncks *-d Time,0,9 wrfout...nc wrfout_..._0-9.nc *ncks *-d Time,10,19 wrfout...nc wrfout_..._10-19.nc CDO [?] On Sun, Nov 27, 2022 at 10:44 PM Lyndz via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Dear NCL-experts, > > Has anyone tried splitting a large wrfout file using NCL and writing the > output to the original wrfout format? I am encountering an nclMalloc issue > when processing large wrfout files. > > Say I just to get specific time steps such as this: > > load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" > filename = "./wrfout_d01_2011-12-12_12_00_00" > a = addfile(filename,"r") > times = wrf_user_getvar(a,"times",-1) > theta_a = wrf_user_getvar(a,"theta",-1) > pv_a = wrf_user_getvar(a,"pvo",-1) ;potential > vorticity > > theta = theta_a(80:90,:,:,:) > pv = pv_a(80:90,:,:,:) > > > How do I save this to the original wrfout format? > > I'll appreciate any help on this. > > -Lyndz > _______________________________________________ > 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 tabishumaransari at gmail.com Wed Nov 30 06:23:41 2022 From: tabishumaransari at gmail.com (Tabish Ansari) Date: Wed, 30 Nov 2022 14:23:41 +0100 Subject: [ncl-talk] Shapefile masking: masks not written out for regions west of greenwich meridian for fixed-offset grid Message-ID: Hi I'm trying to write out masks for 3 distinct regions: Asia (AS), North America (NA) and Europe (EU) for two grids: a high resolution grid with greenwich meridian in the middle and a low resolution grid with greenwich meridian at the left edge. The shapefile mask data function seems to work fine and gives a "success" message in the end, however, while the output file contains correct masks for all the 3 regions for the high-resolution grid, the masks are incomplete for the low-resolution grid - anything west of Greenwich meridian is missing. Can this be due to the low-res grid not being centered at 0deg? The script is copied below: ====================================================================================== load "./shapefile_utils.ncl" begin sname = "/work/users/tan/mask/ref-countries-2020-01m.shp/CNTR_RG_01M_2020_4326.shp/CNTR_RG_01M_2020_4326.shp" correctedlist_AS = (/"Aksai Chin","Arunachal Pradesh","Afghanistan","Bangladesh","Bhutan","Brunei","Cambodia","China","China/India","Jammu Kashmir","Hong Kong","India","Indonesia","Japan","Kazakhstan","Kyrgyzstan","Laos","Macao","Malaysia","Maldives","Mongolia","Myanmar/Burma","Nepal","North Korea","Pakistan","Papua New Guinea","Philippines","Singapore","South Korea","Sri Lanka","Taiwan_Province of China","Tajikistan","Thailand","Timor-Leste","Turkmenistan","Uzbekistan","VietNam"/) correctedlist_NA = (/"Canada","Saint Pierre and Miquelon","United States"/) correctedlist_EU = (/"Albania","Armenia","Austria","Azerbaijan","Belarus","Belgium","Bosnia and Herzegovina","Bulgaria","Croatia","Cyprus","Czechia","Denmark","Estonia","Faroes","Finland","France","Georgia","Germany","Gibraltar","Greece","Greenland","Hungary","Iceland","Ireland","Italy","Latvia","Lithuania","Luxembourg","North Macedonia","Malta","Moldova","Norway","Poland","Portugal","Romania","Russian Federation","Serbia","Slovakia","Slovenia","Spain","Sweden","Switzerland","T?rkiye","Ukraine","United Kingdom"/) areas_of_interest = correctedlist_AS data_lowres = addfile("/data/nosync/emissions/HTAPv3-Emissions-tan_regridMC/edgar_HTAPv3_2006_NMVOC.nc","r") data_highres = addfile("/data/nosync/emissions/HTAPv3-Fluxes-tan/edgar_HTAPv3_2006_NMVOC.nc","r") ;system("rm VOCregionmask2.nc") VOCregionmask = addfile("VOCregionmask.nc","w") ;---Read any 3d variable and lat/lon coordinates off wrfchemi file. emislow = data_lowres->HTAPv3_1_International_Shipping(0,:,:) emishigh = data_highres->HTAPv3_1_International_Shipping(0,:,:) ;---Set all temperature values to 0 except for those over areas of interest which will be equal to 1. opt = True opt at debug = True opt at shape_var = "NAME_ENGL" opt at shape_names = areas_of_interest opt at return_mask = True ; THIS RETURNS A MATRIX OF 0 AND 1 INSTEAD OF MASKED DATA print("masking lowres data...") emislowresmask = shapefile_mask_data(emislow,sname,opt) print("masking highres temperature data...") emishighresmask = shapefile_mask_data(emishigh,sname,opt) VOCregionmask->AS_lowres = (/emislowresmask/) VOCregionmask->AS_highres = (/emishighresmask/) print("Success!!!") end ======================================================================== Thanks a lot. with best regards, Tabish ------------------------------- Dr Tabish Ansari Research Associate Air Quality Modelling Group IASS-Potsdam Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Wed Nov 30 09:02:03 2022 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Wed, 30 Nov 2022 11:02:03 -0500 Subject: [ncl-talk] Shapefile masking: masks not written out for regions west of greenwich meridian for fixed-offset grid In-Reply-To: References: Message-ID: Tabish, on the "Shapefiles" example page, there is a note near the top. I think this might be the problem. Check the latitude ranges on your shapefile and grids. "Important note: The shapefile_mask_data function is a powerful function used by many scripts on this page. In order for your data to be masked correctly using this function, your longitude values must be in the same range as the longitude values on the shapefile. Most shapefile longitude values are in the range -180 to 180. You can use the print_shapefile_info procedure above to print this information." On Wed, Nov 30, 2022 at 8:24 AM Tabish Ansari via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi > > I'm trying to write out masks for 3 distinct regions: Asia (AS), North > America (NA) and Europe (EU) for two grids: a high resolution grid with > greenwich meridian in the middle and a low resolution grid with greenwich > meridian at the left edge. The shapefile mask data function seems to work > fine and gives a "success" message in the end, however, while the output > file contains correct masks for all the 3 regions for the high-resolution > grid, the masks are incomplete for the low-resolution grid - anything west > of Greenwich meridian is missing. Can this be due to the low-res grid not > being centered at 0deg? The script is copied below: > > > ====================================================================================== > load "./shapefile_utils.ncl" > > begin > > sname = > "/work/users/tan/mask/ref-countries-2020-01m.shp/CNTR_RG_01M_2020_4326.shp/CNTR_RG_01M_2020_4326.shp" > > correctedlist_AS = (/"Aksai Chin","Arunachal > Pradesh","Afghanistan","Bangladesh","Bhutan","Brunei","Cambodia","China","China/India","Jammu > Kashmir","Hong > Kong","India","Indonesia","Japan","Kazakhstan","Kyrgyzstan","Laos","Macao","Malaysia","Maldives","Mongolia","Myanmar/Burma","Nepal","North > Korea","Pakistan","Papua New Guinea","Philippines","Singapore","South > Korea","Sri Lanka","Taiwan_Province of > China","Tajikistan","Thailand","Timor-Leste","Turkmenistan","Uzbekistan","VietNam"/) > > correctedlist_NA = (/"Canada","Saint Pierre and Miquelon","United States"/) > > correctedlist_EU = > (/"Albania","Armenia","Austria","Azerbaijan","Belarus","Belgium","Bosnia > and > Herzegovina","Bulgaria","Croatia","Cyprus","Czechia","Denmark","Estonia","Faroes","Finland","France","Georgia","Germany","Gibraltar","Greece","Greenland","Hungary","Iceland","Ireland","Italy","Latvia","Lithuania","Luxembourg","North > Macedonia","Malta","Moldova","Norway","Poland","Portugal","Romania","Russian > Federation","Serbia","Slovakia","Slovenia","Spain","Sweden","Switzerland","T?rkiye","Ukraine","United > Kingdom"/) > > areas_of_interest = correctedlist_AS > > data_lowres = > addfile("/data/nosync/emissions/HTAPv3-Emissions-tan_regridMC/edgar_HTAPv3_2006_NMVOC.nc","r") > data_highres = > addfile("/data/nosync/emissions/HTAPv3-Fluxes-tan/edgar_HTAPv3_2006_NMVOC.nc","r") > > ;system("rm VOCregionmask2.nc") > VOCregionmask = addfile("VOCregionmask.nc","w") > > ;---Read any 3d variable and lat/lon coordinates off wrfchemi file. > emislow = data_lowres->HTAPv3_1_International_Shipping(0,:,:) > emishigh = data_highres->HTAPv3_1_International_Shipping(0,:,:) > > ;---Set all temperature values to 0 except for those over areas of > interest which will be equal to 1. > opt = True > opt at debug = True > opt at shape_var = "NAME_ENGL" > opt at shape_names = areas_of_interest > opt at return_mask = True ; THIS RETURNS A MATRIX OF 0 AND 1 > INSTEAD OF MASKED DATA > > print("masking lowres data...") > emislowresmask = shapefile_mask_data(emislow,sname,opt) > > print("masking highres temperature data...") > emishighresmask = shapefile_mask_data(emishigh,sname,opt) > > VOCregionmask->AS_lowres = (/emislowresmask/) > VOCregionmask->AS_highres = (/emishighresmask/) > > print("Success!!!") > > end > > ======================================================================== > > Thanks a lot. > > with best regards, > > Tabish > ------------------------------- > Dr Tabish Ansari > Research Associate > Air Quality Modelling Group > IASS-Potsdam > Germany > -------------- next part -------------- An HTML attachment was scrubbed... URL: From S1073755 at pm.univpm.it Wed Nov 30 14:01:21 2022 From: S1073755 at pm.univpm.it (Mauro Morichetti) Date: Wed, 30 Nov 2022 22:01:21 +0100 Subject: [ncl-talk] XY plot with 2 Y-axis Message-ID: <62A38232-1372-4BB7-81A0-BEBABD5E7EAE@pm.univpm.it> Hi all, I would like to show a xy plot with a second y axis. Everything needed to show the plot, is in the zipped file, the data I would like to have in the second y-axis is the ?M_dust? (the last plot) the black line. I have tried to show with the function ?gsn_csm_xy2?, but I cannot display the second y-axis values correctly, since the x-axis time step are different. Any ideas? Thanks -------------- next part -------------- A non-text attachment was scrubbed... Name: TEST.zip Type: application/zip Size: 16676 bytes Desc: not available URL: