[ncl-talk] [ncl-install] About Sum of variable
Dennis Shea
shea at ucar.edu
Wed Sep 11 08:20:22 MDT 2019
[1] Please remove the: [ncl-install]
[2] Look at:
*systemfunc*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml> :
Examples 3 and 4
*addfiles*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml> :
Example 2
*dim_sum_n_Wrap*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/dim_sum_n_Wrap.shtml>
On Wed, Sep 11, 2019 at 4:43 AM Govind Jha <govind_jha65 at yahoo.com> wrote:
> Dear Sir,
>
> Thank you very much. It works for me.
>
> Also,
>
> I wish to calculate monthly rain from daily file. I have 365 daily .nc
> file naming GPM_2017_01_01.nc, GPM_2017_01_02.nc ,........., GPM_2017_12_31.nc.
> I have attached sample .nc file for one month only. I am wonder how to add
> all those files in ncl and calculate monthly rainfall from daily data. The
> description of a file is all follow:
>
>
>
> gopi at gopi:~/Build_WRF/work/MODE_analyis/Nirmala/UPDATED_FINAL/
> daily_2017.nc$ ncdump -h GPM_2017_01_01.nc
> netcdf GPM_2017_01_01 {
> dimensions:
> lon = 92 ;
> lat = 67 ;
> variables:
> double lon(lon) ;
> lon:units = "degrees_east" ;
> lon:long_name = "Longitude" ;
> double lat(lat) ;
> lat:units = "degrees_north" ;
> lat:long_name = "Latitude" ;
> double rain(lat, lon) ;
> rain:_FillValue = -999000000. ;
>
>
>
>
>
> Any help and suggestion would be highly appreciated.
>
> Thank you in advance.
>
>
>
> With Regards
> ..................................................
> *Govind Kumar Jha*
> ...................................................
> Assistant Meteorologist
> (Agro-Meteorology Section)
> Department of Hydrology and Meteorology (DHM)
> P.O. Box 406 Naxal, Nagpokhari, Kathmandu, Nepal
> Tel: +977 1 4436272, 4432409
> Fax: +977 1 4429919, 4432137
> www.dhm.gov.np, www.hydrology.gov.np, www.mfd.gov.np
>
> .............................................................................
> Mobile Number: 9779846265433
> Email Id: govind_jha65 at yahoo.com
> ..........................................................
> Secretary
> .......................................
> Student Organization Of Meteorology (SOM) , Tri -Chandra Campus
> Ghantaghar,kathmandu
>
>
> On Monday, September 9, 2019, 8:37:05 AM GMT+5:45, Dennis Shea <
> shea at ucar.edu> wrote:
>
>
> There are several ways to do this. A simple approach is attached.
>
> *%>* ncl GovindJha_1.ncl
>
>
> On Sun, Sep 8, 2019 at 5:12 AM Govind Jha via ncl-install <
> ncl-install at ucar.edu> wrote:
>
> Dear Sir,
>
> I have 12 monthly netcdf files having variable called rain .I wish to
> calculate seasonal rainfall from monthly rainfall in NCL.
> for eg: monsoon season= sum of jun,july,aug and sept.
>
> How could I calculate it.
>
> Here the the monthly netcdf files.
>
> a = "/home/gopi/Build_WRF/work/MODE_analyis/Nirmala/GPM_july_2016" ; or
> manual precipitaiton same will work
> a1 = addfile(a+".nc","r")
> gp = a1 ->rain
>
>
> gsrc_lat = a1->lat ;;---Change (maybe)
> gsrc_lon = a1->lon ;;---Change (maybe)
>
> APCP = gp
> APCP!0 = "lat"
> APCP!1 = "lon"
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> a2 = "/home/gopi/Build_WRF/work/MODE_analyis/Nirmala/GPM_jun_2016" ; or
> manual precipitaiton same will work
> a3 = addfile(a2+".nc","r")
> gp1 = a3 ->rain
>
> gsrc_lat = a3->lat ;;---Change (maybe)
> gsrc_lon = a3->lon ;;---Change (maybe)
>
> APCP1 = gp1
> APCP1!0 = "lat"
> APCP1!1 = "lon"
>
>
> g = array_append_record (APCP, APCP1, 0)
>
>
> gp3 = g
> gp3!0 = "lat"
> gp3!1 = "lon"
>
> Any help and suggestion would be highly appreciated.
>
> Thank you in advance.
>
>
>
> With Regards
> ..................................................
> *Govind Kumar Jha*
> ...................................................
> Assistant Meteorologist
> (Agro-Meteorology Section)
> Department of Hydrology and Meteorology (DHM)
> P.O. Box 406 Naxal, Nagpokhari, Kathmandu, Nepal
> Tel: +977 1 4436272, 4432409
> Fax: +977 1 4429919, 4432137
> www.dhm.gov.np, www.hydrology.gov.np, www.mfd.gov.np
>
> .............................................................................
> Mobile Number: 9779846265433
> Email Id: govind_jha65 at yahoo.com
> ..........................................................
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190911/c5c9fcd6/attachment.html>
More information about the ncl-talk
mailing list