[ncl-talk] ncl-talk Digest, Vol 165, Issue 49-Message 4

Liu, Xiaoli xiaoli.liu at ou.edu
Wed Aug 30 09:04:09 MDT 2017


Liu, Xiaoli has shared OneDrive for Business files with you. To view them, click the links below.


<https://sooners-my.sharepoint.com/personal/xiaoli_liu_ou_edu/_layouts/15/guestaccess.aspx?docid=043cc05571c414a5db1454ae19a28cc36&authkey=AYoZc-0X9kH7gkzGJO7GBMM&expiration=2017-09-29T15%3a03%3a51.000Z>
[https://r1.res.office365.com/owa/prem/images/dc-png_20.png]<https://sooners-my.sharepoint.com/personal/xiaoli_liu_ou_edu/_layouts/15/guestaccess.aspx?docid=043cc05571c414a5db1454ae19a28cc36&authkey=AYoZc-0X9kH7gkzGJO7GBMM&expiration=2017-09-29T15%3a03%3a51.000Z>

Orbit View.png<https://sooners-my.sharepoint.com/personal/xiaoli_liu_ou_edu/_layouts/15/guestaccess.aspx?docid=043cc05571c414a5db1454ae19a28cc36&authkey=AYoZc-0X9kH7gkzGJO7GBMM&expiration=2017-09-29T15%3a03%3a51.000Z>

<https://sooners-my.sharepoint.com/personal/xiaoli_liu_ou_edu/_layouts/15/guestaccess.aspx?docid=1a7f340c75074400a8b8d8c29d359140d&authkey=AaHal-OUvrqFxwfnh5iAIpE&expiration=2017-09-29T15%3a03%3a56.000Z>
[https://r1.res.office365.com/owa/prem/images/dc-generic_20.png]<https://sooners-my.sharepoint.com/personal/xiaoli_liu_ou_edu/_layouts/15/guestaccess.aspx?docid=1a7f340c75074400a8b8d8c29d359140d&authkey=AaHal-OUvrqFxwfnh5iAIpE&expiration=2017-09-29T15%3a03%3a56.000Z>

file.out<https://sooners-my.sharepoint.com/personal/xiaoli_liu_ou_edu/_layouts/15/guestaccess.aspx?docid=1a7f340c75074400a8b8d8c29d359140d&authkey=AaHal-OUvrqFxwfnh5iAIpE&expiration=2017-09-29T15%3a03%3a56.000Z>




Hello,

I tried to print the max and min value, and found them all zero. But when I use the Orbit Viewer software, I found there shoul be some values not equal zero. So I don't know why. I sent the data file "2A.GPM.DPR.V7-20170308.20150627-S000754-E014026.007536.V05A", the NCL scripy"gpm.ncl" via ftp.

 And I aosl attached the printscreen of Orbit viewer and the output file of ncl_filedump command.
Thanks!
Xiaoli

________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of ncl-talk-request at ucar.edu <ncl-talk-request at ucar.edu>
Sent: Wednesday, August 30, 2017 4:39 PM
To: ncl-talk at ucar.edu
Subject: ncl-talk Digest, Vol 165, Issue 49

Send ncl-talk mailing list submissions to
        ncl-talk at ucar.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.ucar.edu/mailman/listinfo/ncl-talk
ncl-talk Info Page - University Corporation for ...<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
mailman.ucar.edu
This email list is for NCL users to exchange information, ask questions, and report bugs on NCL or other related software if appropriate. It is also for the ...



or, via email, send a message with subject or body 'help' to
        ncl-talk-request at ucar.edu

You can reach the person managing the list at
        ncl-talk-owner at ucar.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ncl-talk digest..."


Today's Topics:

   1. Re: fatal:["Execute.c":8640]:Execute: Error occurred at or
      near line 897 in file
      $NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl (Dennis Shea)
   2. Fw: Can't got value of variables other than Lat and Lon
      (Liu, Xiaoli)
   3. Re: problem with adding file (Mary Haley)
   4. Re: Fw: Can't got value of variables other than Lat and   Lon
      (Mary Haley)
   5. Remove SST data for specific area (Dinuka Silva)
   6. Re: problem with adding file (Setareh Rahimi)


----------------------------------------------------------------------

Message: 1
Date: Tue, 29 Aug 2017 14:57:53 -0600
From: Dennis Shea <shea at ucar.edu>
To: Guido Cioni <guidocioni at gmail.com>
Cc: ncl-talk <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] fatal:["Execute.c":8640]:Execute: Error
        occurred at or near line 897 in file
        $NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl
Message-ID:
        <CAOF1d_4aUYmTyaL+DHvAxhaMpVfhvHwM0bzUQBNNQbGeNG4sxw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I fixed an error and added writing a netCDF file.

http://www.ncl.ucar.edu/Document/Functions/Crop/refevt_hargreaves_fao56.shtml
refevt_hargreaves_fao56 - CISL's NCAR Command Language (NCL)<http://www.ncl.ucar.edu/Document/Functions/Crop/refevt_hargreaves_fao56.shtml>
www.ncl.ucar.edu
NCL Home > Documentation > Functions > Meteorology, Crop refevt_hargreaves_fao56. Use the Hargreaves ETo equation to derive reference evapotranspiration as described ...



Example 2

On Tue, Aug 29, 2017 at 8:37 AM, Dennis Shea <shea at ucar.edu> wrote:

> THX for sending the files. I have added Example 2 for
>
>    http://www.ncl.ucar.edu/Document/Functions/Crop/
crop.ncl functions<http://www.ncl.ucar.edu/Document/Functions/Crop/>
www.ncl.ucar.edu
Description of crop functions in crop.ncl



> refevt_hargreaves_fao56.shtml
>
> ----
> Note: Given the size of the files (each > 4GB), this calculation takes
> some time (about 5 minutes)
>
> radext = radext_fao56(jday, lat2d, radunit)
> ; <=== 186 seconds
>
> refevt = refevt_hargreaves_fao56( tmin, tmax, radext, (/0,0,0/) )   ; <===
> 113 seconds
>
> =============
> A tip when testing scripts on large files, it may be best to implement a
> 'TEST' option:
>
>  TEST   = True
>  ...
>   if (TEST) then
>       tStrt= 0
>       tLast= 100
>       time = fmin->time(tStrt:tLast) ; small subset
>   else
>       time = fmin->time                   ; entire file
>   end if
>
> ...
>
> ;---Read daily min & max
>   if (TEST) then
>       tmin = fmin->tasmin(tStrt:tLast,:,:)
>       tmax = fmax->tasmax(tStrt:tLast,:,:)
>   else
>       tmin = fmin->tasmin
>       tmax = fmax->tasmax
>   end if
>
> ====
>
> This would provide musch faster turn around for debugging.
>
> Good Luck
>
>
>
>
> On Wed, Aug 23, 2017 at 10:30 AM, Dennis Shea <shea at ucar.edu> wrote:
>
>> Guido's response is correct.
>>
>> Still, a 'trick' when encountering a malloc error is to use a small
>> subset of the data
>>
>> Rather than:
>>
>>   tasmax = a->tasmax
>>
>>   tasmin = b->tasmin
>>
>>   Pr_annual_total  = c->pr
>>
>>   lon = a->longitude
>>
>>   lat = a->latitude
>>   time = a->time
>>
>> Use
>>   NT = 100                                    ; arbitrary
>>
>>   tasmax = a->tasmax(0:NT,:,:)
>>
>>   tasmin  = b->tasmin(0:NT,:,:)
>>
>>   Pr_annual_total  = c->pr(0:NT,:,:)
>>
>>   lon = a->longitude
>>
>>   lat = a->latitude
>>
>>
>> Note: rather than reading the 'time' variable directly
>>   time = a->time(0:NT)
>> I suggest using the 'time' coordinate associated with the variable
>>    time = tasmax&time
>>
>>
>> ====
>>
>>
>> On Wed, Aug 23, 2017 at 5:15 AM, Guido Cioni <guidocioni at gmail.com>
>> wrote:
>>
>>> You have to increase the maximum memory (ws maximum size) used by ncl to
>>> plot. See here (https://www.ncl.ucar.edu/Document/Graphics/hlures.shtml
>>> ).
>>>
>>> Additionally, depending on the machine, you may need to increase the
>>> maximum memory available for ncl at execution time (like ulimit in Linux).
>>> Cheers
>>>
>>> Il 23 ago 2017 1:09 PM, "Be?ta Szab?-Tak?cs" <szabo.b at czechglobe.cz> ha
>>> scritto:
>>>
>>>> Dear NCL Users,
>>>>
>>>>
>>>>
>>>> I would like to calculate Aridity index base on Hargreaves ETo
>>>> equation. I use daily maximum and minimum temperature data from 1971 to
>>>> 2000 and yearly sum precipitation (30 years). The dimension of latitude is
>>>> (201x464) and the day of year is (10957) vector for radext_fao56 function.
>>>> When I run the scipt I get the following error message:
>>>>
>>>> fatal:NclMalloc Failed:[errno=12]
>>>>
>>>> fatal:New: could not create new array:[errno=12]
>>>>
>>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 897
>>>> in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl
>>>>
>>>>
>>>>
>>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 162
>>>> in file lambert_PET.ncl
>>>>
>>>>
>>>>
>>>> ; Main code.
>>>>
>>>> ;----------------------------------------------------------------------
>>>>
>>>> begin
>>>>
>>>> ;************************************************
>>>>
>>>> ; read in netCDF file
>>>>
>>>> ;************************************************
>>>>
>>>>   a = addfile("E-OBS_tasmax.nc","r")
>>>>
>>>>   b = addfile("E-OBS_tasmin.nc","r")
>>>>
>>>>   c = addfile("E-OBS_1971-2000_ys.nc","r")
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>   tasmax = a->tasmax
>>>>
>>>>   tasmin = b->tasmin
>>>>
>>>>   Pr_annual_total  = c->pr
>>>>
>>>>   lon = a->longitude
>>>>
>>>>   lat = a->latitude
>>>>
>>>>   time = a->time
>>>>
>>>>   minlat             =  30                ; min lat to mask
>>>>
>>>>   maxlat             =  75                ; max lat to mask
>>>>
>>>>   minlon             = -20                ; min lon to mask
>>>>
>>>>   maxlon             =  40                ; max lon to mask
>>>>
>>>>
>>>>
>>>>   nlat = dimsizes(lat)
>>>>
>>>>   mlon = dimsizes(lon)
>>>>
>>>>
>>>>
>>>>   lat_new=conform_dims( (/nlat,mlon/), lat, 0)
>>>>
>>>>
>>>>
>>>>   time2 = calendar_decode2(time,-5)
>>>>
>>>>   doy = day_of_year(time2(:,0),time2(:,1),time2(:,2))
>>>>
>>>>    print(doy)
>>>>
>>>>     radext = radext_fao56(doy, lat_new, 0)
>>>>
>>>>     radext = where(ismissing(radext), 0, radext)
>>>>
>>>>
>>>>
>>>>     evtH_0 = refevt_hargreaves_fao56( tmin, tmax, radext, (/0,0,0/) )
>>>>
>>>>
>>>>
>>>>    print(evtH_0)
>>>>
>>>>    opt = True
>>>>
>>>>    opt at nval_crit = 12
>>>>
>>>>
>>>>
>>>>    PET_m = calculate_monthly_values (evtH_0, "sum", 0,opt)
>>>>
>>>>    print(PET_m)
>>>>
>>>>
>>>>
>>>>     PET_annual_total = month_to_annual(PET_m, 0)
>>>>
>>>> ;    Pr_annual_total = month_to_annual(Pr_m, 0)
>>>>
>>>>
>>>>
>>>>       AI = Pr_annual_total/PET_annual_total
>>>>
>>>>      AI2 = dim_avg_n(AI,0)
>>>>
>>>>   IM =  new(dimsizes(AI2),typeof(AI2))
>>>>
>>>>
>>>>
>>>>    IM = where(AI2 .lt. 0.03,1.0,IM)
>>>>
>>>>    IM = where(AI2 .ge. 0.03 .and. AI2 .lt. 0.2,2.0,IM)
>>>>
>>>>    IM = where(AI2 .ge. 0.2 .and. AI2 .lt. 0.5,3.0,IM)
>>>>
>>>>    IM = where(AI2 .ge. 0.5 .and. AI2 .lt. 0.65,4.0,IM)
>>>>
>>>>    IM = where(AI2 .ge. 0.65,5.0,IM)
>>>>
>>>>
>>>>
>>>> The error refer to the radext_fao56 in my script which is attached as
>>>> well. Could someone suggest a solution?
>>>>
>>>>
>>>>
>>>> Thank you for your help in advance!
>>>>
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Beata
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/d0d92219/attachment-0001.html>

------------------------------

Message: 2
Date: Tue, 29 Aug 2017 21:38:25 +0000
From: "Liu, Xiaoli" <xiaoli.liu at ou.edu>
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: [ncl-talk] Fw: Can't got value of variables other than Lat
        and Lon
Message-ID:
        <DM5PR03MB31776AD4934CF7B8F7B5DDE7FE9F0 at DM5PR03MB3177.namprd03.prod.outlook.com>

Content-Type: text/plain; charset="iso-2022-jp"




________________________________
From: Liu, Xiaoli <xiaoli.liu at ou.edu>
Sent: Wednesday, August 30, 2017 6:18 AM
To: ncl-talk at ucar.edu
Subject: Can't got value of variables other than Lat and Lon


Hello,

I want use the data of GPM 2A.GPM.DPR.V7 with NCL. I found that I can get the value of Lat and lon correctlly. But as to the other variables, the value got is very unusal. When I use orbit view, I found there are normal values for these variables.

Here is my script?

 dir="/scratch/liu4119/gpm/data/"
  FILES=systemfunc(" ls -1 "+dir+"*.HDF5")
  numFILES = dimsizes(FILES)
;  print("numFILES = " + numFILES)
;  print(FILES)
;  print (" ")
  do i=32,32
    h5_file = addfile(FILES(i),"r")
;  g = h5_file=>/NS
;   print(g)
;  g1=g=>/SLV
;   print(g1)
;  list_filevars(g)
  data_raw = h5_file->/NS/SLV/precipRateESurface
  print(data_raw(5396,:))
  data = data_raw
  data at long_name = "precipRate"
  data at _FillValue = -9999.9
  data at units = data_raw at Units
  longitude=h5_file->/NS/Longitude
  printVarSummary(longitude)
  latitude=h5_file->/NS/Latitude
  print(latitude(5396,:))
  print(longitude(5396,:))
  printVarSummary(latitude)

[cid:c1ec0f44-513a-44d6-964c-a1000a7b32ce]
[cid:891609e8-6d88-4b50-ace4-52853a685e3f]
[cid:ab77d561-deb8-4ef8-82d6-06293786eb5d]
Thanks!

Xiaoli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/fd739654/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data_raw.png
Type: image/png
Size: 25095 bytes
Desc: data_raw.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/fd739654/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: latitude.png
Type: image/png
Size: 33981 bytes
Desc: latitude.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/fd739654/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: longitude.png
Type: image/png
Size: 32193 bytes
Desc: longitude.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/fd739654/attachment-0005.png>

------------------------------

Message: 3
Date: Tue, 29 Aug 2017 15:54:03 -0600
From: Mary Haley <haley at ucar.edu>
To: Setareh Rahimi <setareh.rahimi at gmail.com>
Cc: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] problem with adding file
Message-ID:
        <CACNN_CJAeJ9g4sCNizTh4x=EHMTwS7PEmZ6XvvHinX-U1EkUAg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

As another test, please see if you can look at the file using
"ncl_filedump" from the UNIX command  line. But, first make sure you have
the file correctly spelled:

ls precip.mon.total.v6.nc

then:

ncl_filedump precip.mon.total.v6.nc

?This is the same thing as the 2-line script that Dennis asked you to try.
If this works, then you can also verify at the same time if "precip" is a
variable in that file.

If you get any errors from the ncl_filedump command, respond back to
ncl-talk with all of the error messages included.

--Mary



On Tue, Aug 29, 2017 at 11:45 AM, Dennis Shea <shea at ucar.edu> wrote:

> Hello ... Please respond to ncl-talk and not directly to me.
>
> Your script has:
>
>     *f *     = addfile("precip.mon.total.v6.nc","r")
>     prc    =* f*->precip({tStrt:tLast},:,:)         ; whole grid
>
> The error message is:
>
> fatal: file (*f*) isn't defined
>
> I am not sure what the problem would be. Someone else will have to respond.
>
> ---
> What does the following yoeld? Likely the same error.
>
>   *f *     = addfile("precip.mon.total.v6.nc","r")
>   print(*f*)
>
> =====================================================
> NOTE:
> You do *not* have to load the following libraries from NCL 6.2.0 onward.
> So for 6.3.0, they are *automatically loaded.*
>
> 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/csm/contributed.ncl"
>
> From 6.4.0, the following are automatically loaded:
>
>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/bootstrap.ncl"
>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/extval.ncl"
>     "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
>
> On Tue, Aug 29, 2017 at 9:27 AM, Setareh Rahimi <setareh.rahimi at gmail.com>
> wrote:
>
>> dear Dennis,
>>
>> Thank you for your advice, but  both data file and script are in the same
>> directory.
>>
>> Regards,
>>
>> On Tue 29 Aug 2017 at 19:12, Dennis Shea <shea at ucar.edu> wrote:
>>
>>> By default, NCL always looks in the 'current directory'.
>>> My guess is that the data file is not in the same directory as the NCL
>>> script.
>>>
>>> dirp = "/some/path/to/file/"
>>> filp   = "precip.mon.total.v6.nc"
>>>
>>> pthp = dirp + filp
>>> f       = addfile(pthp, "r")
>>>
>>> or
>>>
>>> f = addfile(dirp + filp, "r")
>>>
>>>
>>> On Tue, Aug 29, 2017 at 8:26 AM, Setareh Rahimi <
>>> setareh.rahimi at gmail.com> wrote:
>>>
>>>> Dear all,
>>>>
>>>> Once I put my NCL command line in NCL environment, it returns me an
>>>> error.
>>>>
>>>>  Please have a look at the attached files, which contain a screenshot
>>>> of the error and my script.
>>>>
>>>> Please help me as soon as possible.
>>>>
>>>> Best wishes,
>>>> --
>>>> S.Rahimi
>>>>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>> --
>> S.Rahimi
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/262ac813/attachment-0001.html>

------------------------------

Message: 4
Date: Tue, 29 Aug 2017 16:02:50 -0600
From: Mary Haley <haley at ucar.edu>
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] Fw: Can't got value of variables other than
        Lat and Lon
Message-ID:
        <CACNN_CKZgYJGMZLw9iupKzofhmy8SmKH014DgqNvDe_YUgD2-g at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Xiaoli,

Just because you have a bunch of values equal to 0.0, it doesn't mean your
data is incorrect.
? You should ?
also look at the min/max of your
?whole ?
data
?variable ?
with:

printMinMax(data_raw,0)

Also, to be on the safe side, rather than hard-coding data at _FillValue to
-9999.9, you should use the attribute that is attached to data:

data at _FillValue = data at CodeMissingValue
?data_raw = data?

Please do this before the "printMinMax" call.

?If you still think something is wron?g with your data after looking at the
printMinMax output, then respond back to this message and cc
ncl-talk at ucar.edu.  It helps if you can provide more information about why
you think the data is incorrect.

Also, if you continue to have problems, then it also helps if you can
provide your data file. You can put it on our anonymous ftp:

http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP

?Thanks,
?

--Mary

On Tue, Aug 29, 2017 at 3:38 PM, Liu, Xiaoli <xiaoli.liu at ou.edu> wrote:

>
>
>
> ------------------------------
> *From:* Liu, Xiaoli <xiaoli.liu at ou.edu>
> *Sent:* Wednesday, August 30, 2017 6:18 AM
> *To:* ncl-talk at ucar.edu
> *Subject:* Can't got value of variables other than Lat and Lon
>
>
> Hello,
>
> I want use the data of GPM 2A.GPM.DPR.V7 with NCL. I found that I can get
> the value of Lat and lon correctlly. But as to the other variables, the
> value got is very unusal. When I use orbit view, I found there are
> normal values for these variables.
>
> Here is my script?
>
>  dir="/scratch/liu4119/gpm/data/"
>   FILES=systemfunc(" ls -1 "+dir+"*.HDF5")
>   numFILES = dimsizes(FILES)
> ;  print("numFILES = " + numFILES)
> ;  print(FILES)
> ;  print (" ")
>   do i=32,32
>     h5_file = addfile(FILES(i),"r")
> ;  g = h5_file=>/NS
> ;   print(g)
> ;  g1=g=>/SLV
> ;   print(g1)
> ;  list_filevars(g)
>   data_raw = h5_file->/NS/SLV/precipRateESurface
>   print(data_raw(5396,:))
>   data = data_raw
>   data at long_name = "precipRate"
>   data at _FillValue = -9999.9
>   data at units = data_raw at Units
>   longitude=h5_file->/NS/Longitude
>   printVarSummary(longitude)
>   latitude=h5_file->/NS/Latitude
>   print(latitude(5396,:))
>   print(longitude(5396,:))
>   printVarSummary(latitude)
>
>
>
>
> Thanks!
>
> Xiaoli
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/d43fa209/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data_raw.png
Type: image/png
Size: 25095 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/d43fa209/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: longitude.png
Type: image/png
Size: 32193 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/d43fa209/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: latitude.png
Type: image/png
Size: 33981 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/d43fa209/attachment-0005.png>

------------------------------

Message: 5
Date: Wed, 30 Aug 2017 14:30:12 +0900
From: Dinuka Silva <dinu.kera at gmail.com>
To: ncl-talk at ucar.edu
Subject: [ncl-talk] Remove SST data for specific area
Message-ID:
        <CAOjtyXkBfSPhsUstxzsMVxtibOvDfR1y0yqtdTGc_0jXXpVhng at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi all,

I want to remove SST data of one box ({03N - 12N}, {90E- 140E}) and then
find the correlation between remaining SST data and rainfall index. I want
to know how can I remove the SST data of that box. SST data has 3
dimensions. I used mask function but I got error message.

x =  fin2->sst(:,:,:)

    x at lat2d = fin2->latitude
    x at lon2d = fin2->longitude


    latMin  = 03
    latMax  = 12
    lonMin  = 90
    lonMax  = 140

  x   = mask (x, conform(x, (x at lat2d.ge.latMin .and.x at lat2d.le.latMax
.and.x at lon2d.ge.lonMin .and.x at lon2d.le.lonMax), (/1,2/)), True)
printVarSummary(x)


The error message : Dimension size, for dimension number 0, of operands
does not match, can't continue


Thanks for your help.
Dinuka


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com<http://www.avast.com>
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170830/53da195e/attachment-0001.html>

------------------------------

Message: 6
Date: Wed, 30 Aug 2017 11:09:06 +0430
From: Setareh Rahimi <setareh.rahimi at gmail.com>
Cc: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] problem with adding file
Message-ID:
        <CAN+DFgzHevxBcc6XZWEu_4kJ3ArpHsTc4tCVSViKEApUoP_ATg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear all,

Please have a look at the attached file, which is a screenshot of
ncl_filedump command .

what is your idea?

Best wishes,

On Wed, Aug 30, 2017 at 2:24 AM, Mary Haley <haley at ucar.edu> wrote:

> As another test, please see if you can look at the file using
> "ncl_filedump" from the UNIX command  line. But, first make sure you have
> the file correctly spelled:
>
> ls precip.mon.total.v6.nc
>
> then:
>
> ncl_filedump precip.mon.total.v6.nc
>
> ?This is the same thing as the 2-line script that Dennis asked you to try.
> If this works, then you can also verify at the same time if "precip" is a
> variable in that file.
>
> If you get any errors from the ncl_filedump command, respond back to
> ncl-talk with all of the error messages included.
>
> --Mary
>
>
>
> On Tue, Aug 29, 2017 at 11:45 AM, Dennis Shea <shea at ucar.edu> wrote:
>
>> Hello ... Please respond to ncl-talk and not directly to me.
>>
>> Your script has:
>>
>>     *f *     = addfile("precip.mon.total.v6.nc","r")
>>     prc    =* f*->precip({tStrt:tLast},:,:)         ; whole grid
>>
>> The error message is:
>>
>> fatal: file (*f*) isn't defined
>>
>> I am not sure what the problem would be. Someone else will have to
>> respond.
>>
>> ---
>> What does the following yoeld? Likely the same error.
>>
>>   *f *     = addfile("precip.mon.total.v6.nc","r")
>>   print(*f*)
>>
>> =====================================================
>> NOTE:
>> You do *not* have to load the following libraries from NCL 6.2.0 onward.
>> So for 6.3.0, they are *automatically loaded.*
>>
>> 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/csm/contributed.ncl"
>>
>> From 6.4.0, the following are automatically loaded:
>>
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/bootstrap.ncl"
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/csm/extval.ncl"
>>     "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>>
>>
>> On Tue, Aug 29, 2017 at 9:27 AM, Setareh Rahimi <setareh.rahimi at gmail.com
>> > wrote:
>>
>>> dear Dennis,
>>>
>>> Thank you for your advice, but  both data file and script are in the
>>> same directory.
>>>
>>> Regards,
>>>
>>> On Tue 29 Aug 2017 at 19:12, Dennis Shea <shea at ucar.edu> wrote:
>>>
>>>> By default, NCL always looks in the 'current directory'.
>>>> My guess is that the data file is not in the same directory as the NCL
>>>> script.
>>>>
>>>> dirp = "/some/path/to/file/"
>>>> filp   = "precip.mon.total.v6.nc"
>>>>
>>>> pthp = dirp + filp
>>>> f       = addfile(pthp, "r")
>>>>
>>>> or
>>>>
>>>> f = addfile(dirp + filp, "r")
>>>>
>>>>
>>>> On Tue, Aug 29, 2017 at 8:26 AM, Setareh Rahimi <
>>>> setareh.rahimi at gmail.com> wrote:
>>>>
>>>>> Dear all,
>>>>>
>>>>> Once I put my NCL command line in NCL environment, it returns me an
>>>>> error.
>>>>>
>>>>>  Please have a look at the attached files, which contain a screenshot
>>>>> of the error and my script.
>>>>>
>>>>> Please help me as soon as possible.
>>>>>
>>>>> Best wishes,
>>>>> --
>>>>> S.Rahimi
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>> --
>>> S.Rahimi
>>>
>>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>


--
S.Rahimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170830/9e4394ae/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2017-08-30 11-00-59.png
Type: image/png
Size: 69507 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170830/9e4394ae/attachment.png>

------------------------------

Subject: Digest Footer

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


------------------------------

End of ncl-talk Digest, Vol 165, Issue 49
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170830/e715607d/attachment.html>


More information about the ncl-talk mailing list