From barry.h.lynn at gmail.com Mon Jul 11 05:46:46 2022 From: barry.h.lynn at gmail.com (Barry Lynn) Date: Mon, 11 Jul 2022 14:46:46 +0300 Subject: [ncl-talk] Turning off "Contour from X to Y by ..." Message-ID: Hi: Does anyone remember how to run off this boxed information, which appears below the map on the right hand side? Barry -- Barry H. Lynn, Ph.D Senior Scientist, Lecturer, The Institute of Earth Sciences, The Hebrew University of Jerusalem, Givat Ram, Jerusalem 91904, Israel Tel: 972 547 231 170 Fax: (972)-25662581 Weather It Is, LTD Weather and Climate Focus https://weather-it-is.com Jerusalem, Israel Local: 02 930 9525 Cell: 054 7 231 170 Int-IS: x972 2 930 9525 -------------- next part -------------- An HTML attachment was scrubbed... URL: From barry.h.lynn at gmail.com Mon Jul 11 05:49:00 2022 From: barry.h.lynn at gmail.com (Barry Lynn) Date: Mon, 11 Jul 2022 14:49:00 +0300 Subject: [ncl-talk] Turning off "Contour from X to Y by ..." In-Reply-To: References: Message-ID: Found this note is from 2012: res at cnInfoLabelOn = False On Mon, Jul 11, 2022 at 2:46 PM Barry Lynn wrote: > Hi: > > Does anyone remember how to run off this boxed information, which appears > below the map on the right hand side? > > Barry > > -- > > Barry H. Lynn, Ph.D > Senior Scientist, Lecturer, > The Institute of Earth Sciences, > The Hebrew University of Jerusalem, > Givat Ram, Jerusalem 91904, Israel > Tel: 972 547 231 170 > Fax: (972)-25662581 > > Weather It Is, LTD > Weather and Climate Focus > https://weather-it-is.com > Jerusalem, Israel > Local: 02 930 9525 > Cell: 054 7 231 170 > Int-IS: x972 2 930 9525 > > -- Barry H. Lynn, Ph.D Senior Scientist, Lecturer, The Institute of Earth Sciences, The Hebrew University of Jerusalem, Givat Ram, Jerusalem 91904, Israel Tel: 972 547 231 170 Fax: (972)-25662581 Weather It Is, LTD Weather and Climate Focus https://weather-it-is.com Jerusalem, Israel Local: 02 930 9525 Cell: 054 7 231 170 Int-IS: x972 2 930 9525 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.kren at noaa.gov Wed Jul 13 10:52:24 2022 From: andrew.kren at noaa.gov (Andrew Kren - NOAA Federal) Date: Wed, 13 Jul 2022 12:52:24 -0400 Subject: [ncl-talk] Question on ocean/inland water fill Message-ID: Hi there, I have a random question. I am plotting surface smoke from the HRRR but decided to add color to the ocean and inland water. When I plotted data for Alaska, since the HRRR domain only extends so far, the "cyan" color I chose ends up becoming noticeable outside the plotted region. I believe the reason the color shade is off is because I set a fill opacity less than 1, which makes the ocean in the plotted region lighter. See plotted image of the discrepancy. My question is, is there a way to get these two to match up without having to change the fill opacity? Alternatively, I tried to set the ocean fill color to the RGB triplet of the lighter ocean from the contour fill, but NCL gave an error. Any feedback is appreciated! Thanks. -- Andrew Kren Meteorologist NOAA's National Weather Service Raleigh Forecast Office 1005 Capability Drive, Suite 300 Raleigh, North Carolina 27606 voice: 919-326-1035 mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smoke.png Type: image/png Size: 1268472 bytes Desc: not available URL: From brownrig at ucar.edu Wed Jul 13 11:29:46 2022 From: brownrig at ucar.edu (Rick Brownrigg) Date: Wed, 13 Jul 2022 11:29:46 -0600 Subject: [ncl-talk] Question on ocean/inland water fill In-Reply-To: References: Message-ID: Hi Andrew, How did you try to set the ocean color, and what was the error NCL gave? Rick On Wed, Jul 13, 2022 at 10:53 AM Andrew Kren - NOAA Federal via ncl-talk < ncl-talk at mailman.ucar.edu> wrote: > Hi there, > > I have a random question. I am plotting surface smoke from the HRRR but > decided to add color to the ocean and inland water. When I plotted data for > Alaska, since the HRRR domain only extends so far, the "cyan" color I chose > ends up becoming noticeable outside the plotted region. I believe the > reason the color shade is off is because I set a fill opacity less than 1, > which makes the ocean in the plotted region lighter. See plotted image of > the discrepancy. > > My question is, is there a way to get these two to match up without having > to change the fill opacity? Alternatively, I tried to set the ocean fill > color to the RGB triplet of the lighter ocean from the contour fill, but > NCL gave an error. > > Any feedback is appreciated! Thanks. > > -- > > Andrew Kren > Meteorologist > NOAA's National Weather Service > Raleigh Forecast Office > 1005 Capability Drive, Suite 300 > Raleigh, North Carolina 27606 > voice: 919-326-1035 > mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah > > > _______________________________________________ > 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 andrew.kren at noaa.gov Wed Jul 13 11:36:05 2022 From: andrew.kren at noaa.gov (Andrew Kren - NOAA Federal) Date: Wed, 13 Jul 2022 13:36:05 -0400 Subject: [ncl-talk] Question on ocean/inland water fill In-Reply-To: References: Message-ID: Hi Rick, I set the ocean color as this: res at mpOceanFillColor = (/205.,255.,255./) I got this error message: fatal:Mul: operation not supported on type (string) Thanks! On Wed, Jul 13, 2022 at 1:30 PM Rick Brownrigg wrote: > Hi Andrew, > > How did you try to set the ocean color, and what was the error NCL gave? > > Rick > > On Wed, Jul 13, 2022 at 10:53 AM Andrew Kren - NOAA Federal via ncl-talk < > ncl-talk at mailman.ucar.edu> wrote: > >> Hi there, >> >> I have a random question. I am plotting surface smoke from the HRRR but >> decided to add color to the ocean and inland water. When I plotted data for >> Alaska, since the HRRR domain only extends so far, the "cyan" color I chose >> ends up becoming noticeable outside the plotted region. I believe the >> reason the color shade is off is because I set a fill opacity less than 1, >> which makes the ocean in the plotted region lighter. See plotted image of >> the discrepancy. >> >> My question is, is there a way to get these two to match up without >> having to change the fill opacity? Alternatively, I tried to set the ocean >> fill color to the RGB triplet of the lighter ocean from the contour fill, >> but NCL gave an error. >> >> Any feedback is appreciated! Thanks. >> >> -- >> >> Andrew Kren >> Meteorologist >> NOAA's National Weather Service >> Raleigh Forecast Office >> 1005 Capability Drive, Suite 300 >> Raleigh, North Carolina 27606 >> voice: 919-326-1035 >> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah >> >> >> _______________________________________________ >> ncl-talk mailing list >> ncl-talk at mailman.ucar.edu >> List instructions, subscriber options, unsubscribe: >> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > -- Andrew Kren Meteorologist NOAA's National Weather Service Raleigh Forecast Office 1005 Capability Drive, Suite 300 Raleigh, North Carolina 27606 voice: 919-326-1035 mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah -------------- next part -------------- An HTML attachment was scrubbed... URL: From brownrig at ucar.edu Wed Jul 13 11:47:23 2022 From: brownrig at ucar.edu (Rick Brownrigg) Date: Wed, 13 Jul 2022 11:47:23 -0600 Subject: [ncl-talk] Question on ocean/inland water fill In-Reply-To: References: Message-ID: Not sure why it thinks there's a string involved. Perhaps use the re-assignment operator ":=" Or, perhaps wrap the color in a call to rgba_to_color_index: res at mpOceanFillColor = rgba_to_color_index((/205.,255.,255.,1.0/)) ; note the added opacity value HTH... Rick On Wed, Jul 13, 2022 at 11:36 AM Andrew Kren - NOAA Federal < andrew.kren at noaa.gov> wrote: > Hi Rick, > > I set the ocean color as this: > > res at mpOceanFillColor = (/205.,255.,255./) > > > I got this error message: > > fatal:Mul: operation not supported on type (string) > > > Thanks! > > > > On Wed, Jul 13, 2022 at 1:30 PM Rick Brownrigg wrote: > >> Hi Andrew, >> >> How did you try to set the ocean color, and what was the error NCL gave? >> >> Rick >> >> On Wed, Jul 13, 2022 at 10:53 AM Andrew Kren - NOAA Federal via ncl-talk < >> ncl-talk at mailman.ucar.edu> wrote: >> >>> Hi there, >>> >>> I have a random question. I am plotting surface smoke from the HRRR but >>> decided to add color to the ocean and inland water. When I plotted data for >>> Alaska, since the HRRR domain only extends so far, the "cyan" color I chose >>> ends up becoming noticeable outside the plotted region. I believe the >>> reason the color shade is off is because I set a fill opacity less than 1, >>> which makes the ocean in the plotted region lighter. See plotted image of >>> the discrepancy. >>> >>> My question is, is there a way to get these two to match up without >>> having to change the fill opacity? Alternatively, I tried to set the ocean >>> fill color to the RGB triplet of the lighter ocean from the contour fill, >>> but NCL gave an error. >>> >>> Any feedback is appreciated! Thanks. >>> >>> -- >>> >>> Andrew Kren >>> Meteorologist >>> NOAA's National Weather Service >>> Raleigh Forecast Office >>> 1005 Capability Drive, Suite 300 >>> Raleigh, North Carolina 27606 >>> voice: 919-326-1035 >>> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah >>> >>> >>> _______________________________________________ >>> ncl-talk mailing list >>> ncl-talk at mailman.ucar.edu >>> List instructions, subscriber options, unsubscribe: >>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>> >> > > -- > > Andrew Kren > Meteorologist > NOAA's National Weather Service > Raleigh Forecast Office > 1005 Capability Drive, Suite 300 > Raleigh, North Carolina 27606 > voice: 919-326-1035 > mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.kren at noaa.gov Wed Jul 13 12:44:45 2022 From: andrew.kren at noaa.gov (Andrew Kren - NOAA Federal) Date: Wed, 13 Jul 2022 14:44:45 -0400 Subject: [ncl-talk] Question on ocean/inland water fill In-Reply-To: References: Message-ID: That worked, but I set the last value to 0.8 opacity and it said fatal:_NhlCvtScalarToIndex:Value -16777471 is less than index min -1 Alternatively, is there a way to make a contour where the lowest value is transparent? This would fix the transparency issue where it plots values less than 1 as white. Thanks so much for your help! On Wed, Jul 13, 2022 at 1:47 PM Rick Brownrigg wrote: > Not sure why it thinks there's a string involved. > > Perhaps use the re-assignment operator ":=" > > Or, perhaps wrap the color in a call to rgba_to_color_index: > > res at mpOceanFillColor = rgba_to_color_index((/205.,255.,255.,1.0/)) > ; note the added opacity value > > HTH... > Rick > > On Wed, Jul 13, 2022 at 11:36 AM Andrew Kren - NOAA Federal < > andrew.kren at noaa.gov> wrote: > >> Hi Rick, >> >> I set the ocean color as this: >> >> res at mpOceanFillColor = (/205.,255.,255./) >> >> >> I got this error message: >> >> fatal:Mul: operation not supported on type (string) >> >> >> Thanks! >> >> >> >> On Wed, Jul 13, 2022 at 1:30 PM Rick Brownrigg wrote: >> >>> Hi Andrew, >>> >>> How did you try to set the ocean color, and what was the error NCL gave? >>> >>> Rick >>> >>> On Wed, Jul 13, 2022 at 10:53 AM Andrew Kren - NOAA Federal via ncl-talk >>> wrote: >>> >>>> Hi there, >>>> >>>> I have a random question. I am plotting surface smoke from the HRRR but >>>> decided to add color to the ocean and inland water. When I plotted data for >>>> Alaska, since the HRRR domain only extends so far, the "cyan" color I chose >>>> ends up becoming noticeable outside the plotted region. I believe the >>>> reason the color shade is off is because I set a fill opacity less than 1, >>>> which makes the ocean in the plotted region lighter. See plotted image of >>>> the discrepancy. >>>> >>>> My question is, is there a way to get these two to match up without >>>> having to change the fill opacity? Alternatively, I tried to set the ocean >>>> fill color to the RGB triplet of the lighter ocean from the contour fill, >>>> but NCL gave an error. >>>> >>>> Any feedback is appreciated! Thanks. >>>> >>>> -- >>>> >>>> Andrew Kren >>>> Meteorologist >>>> NOAA's National Weather Service >>>> Raleigh Forecast Office >>>> 1005 Capability Drive, Suite 300 >>>> Raleigh, North Carolina 27606 >>>> voice: 919-326-1035 >>>> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah >>>> >>>> >>>> _______________________________________________ >>>> ncl-talk mailing list >>>> ncl-talk at mailman.ucar.edu >>>> List instructions, subscriber options, unsubscribe: >>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>> >>> >> >> -- >> >> Andrew Kren >> Meteorologist >> NOAA's National Weather Service >> Raleigh Forecast Office >> 1005 Capability Drive, Suite 300 >> Raleigh, North Carolina 27606 >> voice: 919-326-1035 >> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah >> >> >> -- Andrew Kren Meteorologist NOAA's National Weather Service Raleigh Forecast Office 1005 Capability Drive, Suite 300 Raleigh, North Carolina 27606 voice: 919-326-1035 mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah -------------- next part -------------- An HTML attachment was scrubbed... URL: From brownrig at ucar.edu Wed Jul 13 13:02:16 2022 From: brownrig at ucar.edu (Rick Brownrigg) Date: Wed, 13 Jul 2022 13:02:16 -0600 Subject: [ncl-talk] Question on ocean/inland water fill In-Reply-To: References: Message-ID: Oh, I see -- rgba_to_color_index() expects normalized values between 0..1: res at mpOceanFillColor = rgba_to_color_index((/ 205./255. ,255./255. ,255./255., 0.8/)) This does not return a negative value. On Wed, Jul 13, 2022 at 12:45 PM Andrew Kren - NOAA Federal < andrew.kren at noaa.gov> wrote: > That worked, but I set the last value to 0.8 opacity and it said > > fatal:_NhlCvtScalarToIndex:Value -16777471 is less than index min -1 > > > Alternatively, is there a way to make a contour where the lowest value is > transparent? This would fix the transparency issue where it plots values > less than 1 as white. > > > Thanks so much for your help! > > On Wed, Jul 13, 2022 at 1:47 PM Rick Brownrigg wrote: > >> Not sure why it thinks there's a string involved. >> >> Perhaps use the re-assignment operator ":=" >> >> Or, perhaps wrap the color in a call to rgba_to_color_index: >> >> res at mpOceanFillColor = rgba_to_color_index((/205.,255.,255.,1.0/)) >> ; note the added opacity value >> >> HTH... >> Rick >> >> On Wed, Jul 13, 2022 at 11:36 AM Andrew Kren - NOAA Federal < >> andrew.kren at noaa.gov> wrote: >> >>> Hi Rick, >>> >>> I set the ocean color as this: >>> >>> res at mpOceanFillColor = (/205.,255.,255./) >>> >>> >>> I got this error message: >>> >>> fatal:Mul: operation not supported on type (string) >>> >>> >>> Thanks! >>> >>> >>> >>> On Wed, Jul 13, 2022 at 1:30 PM Rick Brownrigg >>> wrote: >>> >>>> Hi Andrew, >>>> >>>> How did you try to set the ocean color, and what was the error NCL gave? >>>> >>>> Rick >>>> >>>> On Wed, Jul 13, 2022 at 10:53 AM Andrew Kren - NOAA Federal via >>>> ncl-talk wrote: >>>> >>>>> Hi there, >>>>> >>>>> I have a random question. I am plotting surface smoke from the HRRR >>>>> but decided to add color to the ocean and inland water. When I plotted data >>>>> for Alaska, since the HRRR domain only extends so far, the "cyan" color I >>>>> chose ends up becoming noticeable outside the plotted region. I believe the >>>>> reason the color shade is off is because I set a fill opacity less than 1, >>>>> which makes the ocean in the plotted region lighter. See plotted image of >>>>> the discrepancy. >>>>> >>>>> My question is, is there a way to get these two to match up without >>>>> having to change the fill opacity? Alternatively, I tried to set the ocean >>>>> fill color to the RGB triplet of the lighter ocean from the contour fill, >>>>> but NCL gave an error. >>>>> >>>>> Any feedback is appreciated! Thanks. >>>>> >>>>> -- >>>>> >>>>> Andrew Kren >>>>> Meteorologist >>>>> NOAA's National Weather Service >>>>> Raleigh Forecast Office >>>>> 1005 Capability Drive, Suite 300 >>>>> Raleigh, North Carolina 27606 >>>>> voice: 919-326-1035 >>>>> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah >>>>> >>>>> >>>>> _______________________________________________ >>>>> ncl-talk mailing list >>>>> ncl-talk at mailman.ucar.edu >>>>> List instructions, subscriber options, unsubscribe: >>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk >>>>> >>>> >>> >>> -- >>> >>> Andrew Kren >>> Meteorologist >>> NOAA's National Weather Service >>> Raleigh Forecast Office >>> 1005 Capability Drive, Suite 300 >>> Raleigh, North Carolina 27606 >>> voice: 919-326-1035 >>> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah >>> >>> >>> > > -- > > Andrew Kren > Meteorologist > NOAA's National Weather Service > Raleigh Forecast Office > 1005 Capability Drive, Suite 300 > Raleigh, North Carolina 27606 > voice: 919-326-1035 > mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1271634064 at qq.com Wed Jul 20 04:10:46 2022 From: 1271634064 at qq.com (=?gb18030?B?wO7H79H0?=) Date: Wed, 20 Jul 2022 18:10:46 +0800 Subject: [ncl-talk] the source code of the function wrf_tk Message-ID: Hi ncl-talk? Do you know where the source code of the function wrf_tk is? wrf_tk is used in $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl, but I didn't find the definition code in it. Any suggestions on how to get around this problem? Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.allured at noaa.gov Wed Jul 20 10:58:51 2022 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Wed, 20 Jul 2022 10:58:51 -0600 Subject: [ncl-talk] the source code of the function wrf_tk In-Reply-To: References: Message-ID: The source code for wrf_tk is in the NCL source code, in ni/src/lib/nfpfort/wrf_user.f90, in a subroutine named DCOMPUTETK. That subroutine is called by an NCL wrapper function in ni/src/lib/nfp/wrfW.c. On Wed, Jul 20, 2022 at 4:11 AM ??? via ncl-talk wrote: > Hi ncl-talk? > > Do you know where the source code of the function wrf_tk is? > > wrf_tk is used in $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl, but > I didn't find the definition code in it. > > Any suggestions on how to get around this problem? > > Thank you! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmumba at gmail.com Thu Jul 21 12:18:02 2022 From: zmumba at gmail.com (Zilore Mumba) Date: Thu, 21 Jul 2022 20:18:02 +0200 Subject: [ncl-talk] Plotting WRF 24hr total rainfall Message-ID: I have hourly output files in my WRF runs, running up to 6 days. I would like to plot daily total rainfal at D+00(at T+24), D+01(at T+48), up to D+05. My understnding is that WRF rainfall is accumulated over the entire run. I have run the model to T+48 over equatorial Africa, and it apparent that the rainfall field at T+48 is very much wetter than at T+24, suggesting T+48 is accumulation from the beginning of the run (attached graphics). My search indicates that it is best to do a difference in cdo or nco. So I tried cdo sub wrfoutT+48.nc wrfoutT+24.nc wrfout_cdodiff.nc ncdiff wrfoutT+48.nc wrfoutT+24.nc wrfout_nc0diff.nc Then I do a plot of wrfout_new.nc in ncl. I used the script WRF_pcp_1.cnl, except I removed the plotting of terrain height. With cdodiff.nc I get the following message and error: fatal:Number of subscripts do not match number of dimensions of variable, (3) subscripts used, (2) subscripts expected fatal:["Execute.c":6377]:variable (XLAT) is not in file (in_file) fatal:["Execute.c":8637]:Execute: Error occurred at or near line 5140 in file /home/zmumba/anaconda3/envs/py39/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl fatal:["Execute.c":8637]:Execute: Error occurred at or near line 5241 in file /home/zmumba/anaconda3/envs/py39/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl fatal:["Execute.c":8637]:Execute: Error occurred at or near line 5324 in file /home/zmumba/anaconda3/envs/py39/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl fatal:["Execute.c":8637]:Execute: Error occurred at or near line 289 in file WRF_pcp_1.ncl wrfout_ncodiff plots ok. The problem is the scale used which goes from 40 to 440 (attached graphic). I do not know where this scale is coming from. rpntVarSumaary(rain_tot) for both files shows reasonable values, which do not exceed 200mm. If there is anyone who is able to plot 24hr WRF rainfall at day1, day2, ..., I will appreciate if they are able to share their method. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WRF_pcp1.png Type: image/png Size: 207133 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WRF_pcp2.png Type: image/png Size: 218718 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WRF_pcp3.png Type: image/png Size: 116882 bytes Desc: not available URL: From minwookim.9120 at gmail.com Tue Jul 26 02:28:26 2022 From: minwookim.9120 at gmail.com (Min-Woo Kim) Date: Tue, 26 Jul 2022 17:28:26 +0900 Subject: [ncl-talk] compute stream-function using NCL Message-ID: Dear NCL experts, For calculation stream-function using NCL, maybe there are two methods. 1st, using the ncl function "uv2sfvpf". 2nd, inverts the Laplacian from vorticity. (we can use the ncl function "ilapsG_Wrap") At this moment, I wonder about the stream-function definition. * d() : partial differential, psi : stream-function A. u=d(psi)/dy, v=-d(psi)/dx or B. u=-d(psi)/dy, v=d(psi)/dx If A, maximum of stream-function means cyclonic rotation. If B, however, minimum of stream-function means cyclonic rotation. So, it's confusing. Thank you, Minwoo -------------- next part -------------- An HTML attachment was scrubbed... URL: From yang.yang816 at gmail.com Tue Jul 26 14:51:10 2022 From: yang.yang816 at gmail.com (yang yang) Date: Wed, 27 Jul 2022 08:51:10 +1200 Subject: [ncl-talk] Transition Guide NCL to PyNGL Message-ID: Dear Sir/Madam: I am trying to learn the guide about transitioning from NCL to Python. To practice, I need to install PyNIO and PyNIO locally. I found two commands at the beginning of this document: conda create -n ncl_to_python -c conda-forge xarray netcdf4 scipy pyngl pynio ncl source activate ncl_to_python Are these the only required steps so that PyNIO and PyNIO can be installed locally on a linux server? If not, can you please tell me the right steps to do it? Thanks very much! Regards! Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: From yang.yang816 at gmail.com Tue Jul 26 21:26:23 2022 From: yang.yang816 at gmail.com (yang yang) Date: Wed, 27 Jul 2022 15:26:23 +1200 Subject: [ncl-talk] read multiple nc files Message-ID: Dear Sir/Madam: I met a problem when I read multiple nc files in Python. I am wondering if anyone here can help sort this out. Many thanks in advance. Cheers! Ed The errors are: (ncl_to_python)yangy at w-nwp01 $python read_nc_1.py Traceback (most recent call last): File "/scale_wlg_nobackup/filesets/nobackup/niwa00004/yangy/Ln-Python/read_nc_1.py", line 5, in f = nc.MFDataset(file_list) File "src/netCDF4/_netCDF4.pyx", line 6552, in netCDF4._netCDF4.MFDataset.__init__ OSError: master dataset /nesi/nobackup/niwa00004/yangy/output/DATA-cylc-run/NZLAM_rerun/ umnsaa_pa000.nc does not have a aggregation dimension The script is listed below: import netCDF4 as nc #-- list of files file_list = "umnsaa*.nc" #-- open file f = nc.MFDataset(file_list) #-- read variable var = f.variables['air_press'] print(var.dimensions) #-- read dimension time variable time = f.variables['time0'] print(time0[:]) #-- read dimensions lat and lon variables lat = f.variables['latitude'] print(lat[:]) lon = f.variables['longitude'] print(lon[:]) exit() ncdump -h of this file shows: netcdf umnsaa_pa000 { dimensions: time0 = 7 ; time1 = 1 ; time2 = 1 ; ntb = 2 ; rlat = 324 ; rlon = 324 ; nllb = 4 ; hybridr70 = 70 ; hybridt70 = 70 ; pressure22 = 22 ; num_etaT_levels = 71 ; num_etaR_levels = 70 ; variables: float time0(time0) ; time0:standard_name = "time" ; time0:long_name = "forecast period" ; time0:calendar = "gregorian" ; time0:units = "hours since 2014-06-28 12:00:00" ; time0:axis = "T" ; float time1(time1) ; time1:standard_name = "time" ; time1:long_name = "forecast period" ; time1:calendar = "gregorian" ; time1:units = "hours since 2014-06-28 12:00:00" ; time1:axis = "T" ; float time2(time2) ; time2:standard_name = "time" ; time2:long_name = "forecast period (end of reporting period)" ; time2:calendar = "gregorian" ; time2:units = "hours since 2014-06-28 12:00:00" ; time2:axis = "T" ; time2:bounds = "time2_bnds" ; float time2_bnds(time2, ntb) ; float rlat(rlat) ; rlat:standard_name = "grid_latitude" ; rlat:long_name = "latitude on rotated pole grid at cell centres" ; rlat:units = "degrees" ; rlat:axis = "Y" ; rlat:valid_min = -90.f ; rlat:valid_max = 90.f ; float rlon(rlon) ; rlon:standard_name = "grid_longitude" ; rlon:long_name = "longitude on rotated pole grid at cell centres" ; rlon:units = "degrees" ; rlon:axis = "X" ; rlon:valid_min = 0.f ; rlon:valid_max = 360.f ; float latitude(rlat, rlon) ; latitude:standard_name = "latitude" ; latitude:long_name = "geographic latitude at cell centres" ; latitude:units = "degrees_north" ; latitude:valid_min = -90.f ; latitude:valid_max = 90.f ; latitude:bounds = "latitude_bnds" ; float longitude(rlat, rlon) ; longitude:standard_name = "longitude" ; longitude:long_name = "geographic longitude at cell centres" ; longitude:units = "degrees_east" ; longitude:valid_min = 0.f ; longitude:valid_max = 360.f ; longitude:bounds = "longitude_bnds" ; float latitude_bnds(rlat, rlon, nllb) ; float longitude_bnds(rlat, rlon, nllb) ; char rotated_pole ; rotated_pole:grid_mapping_name = "rotated_latitude_longitude" ; rotated_pole:grid_north_pole_latitude = 50.1515f ; rotated_pole:grid_north_pole_longitude = 172.5319f ; rotated_pole:north_pole_grid_longitude = 0.f ; float hybridr70(hybridr70) ; hybridr70:long_name = "height above sea level (rho levels used)" ; hybridr70:units = "meters" ; hybridr70:positive = "up" ; hybridr70:axis = "Z" ; ..................................... -------------- next part -------------- An HTML attachment was scrubbed... URL: From kunal.bali9 at gmail.com Fri Jul 29 03:09:03 2022 From: kunal.bali9 at gmail.com (Kunal Bali) Date: Fri, 29 Jul 2022 01:09:03 -0800 Subject: [ncl-talk] hdf_to_nc_and_mergetime Message-ID: Dear NCL users, I am trying to convert the .nc4 (or hdf) to .nc (or classic .nc) and then merge with timesteps by using the attached script (create_time.ncl). But, it's not working. I am getting error messages as [image: Screen Shot 2022-07-29 at 1.04.39 AM.png] If you need samples data, you can find over https://www.dropbox.com/s/978vyxtttutwcq0/Archive.zip?dl=0 Desired variable is "FinalAerosolOpticalDepth" Thanks --- Kunal -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2022-07-29 at 1.04.39 AM.png Type: image/png Size: 1273023 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: create_time.ncl Type: application/octet-stream Size: 4405 bytes Desc: not available URL: