Re: ncl talk

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 19 2014 - 11:40:03 MDT

Sorry for the late response on this. I was in a workshop last week and then
on vacation.

There's no reason to do this:

x = x(:,:,:,:)

Remove this line and see what happens.

If you continue to have problems, I will need to see the full script, and
maybe your data too. It's hard to debug this with only seeing partial code.

Thanks,

--Mary


On Tue, Jun 10, 2014 at 8:40 AM, Omary, Mohammad <omary@email.unc.edu>
wrote:

> Mary,
> I adapted the script "ESMF_wgts_2.ncl", but when I run it I get:
>
> fatal:["Execute.c":7454]:performASSIGN_VAR_VAR_OP: Number of subscripts o=
n
> rhs do not match
> number of dimensions of variable, (3) Subscripts
> used, (4) `*
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 85 in
> file ESMF_wgts_2.ncl
>
>
> Line 85 is x = x(:,::-1,:) ; required to be
> S->N
>
> If I change that to x = x(:,:,:,:)
>
> I get:
> (0) Writing results to 'weight_file.nc'...
> warning:Dimension (0) has not been defined
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 59 in
> file ESMF_wgts_2.ncl
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 141 in
> file ESMF_wgts_2.ncl
>
>
>
> Line 59: filedimdef( ofile,var_regrid!0,-1,True) ; force an
> unlimited dimension
> Line 141: write_netcdf(sfile, out_filename, x_regrid_2x2, "precip",
> methods(i))
>
> In my input nc input file I have:
>
> float aircraft(time, altitude, lon, lat) ;
> aircraft:long_name = "Aircraft Emissions
> " ;
> aircraft:units = "molecules/cm^3/s
>
>
>
> Any help?
>
> Thanks,
> MO
> -------------------
> Mohammad Omary
> Institute for the Environment
> University of North Carolina
> http://www.ie.unc.edu/cempd
> voice:951-789-6284
> omary@unc.edu
>
>
>
>
>
>
> On 6/3/14 7:11 AM, "Mary Haley" <haley@ucar.edu> wrote:
>
> >MO,
> >
> >You should check out our ESMF regridding examples at:
> >
> >http://www.ncl.ucar.edu/Applications/ESMF.shtml
> >
> >There is more than one interpolation option available, which is discusse=
d
> >in the "more detailed description of ESMF regridding" section near the
> >top of the page.
> >
> >Since you are going from a 1deg grid to a 1.95x2.5deg grid, you'll want
> >to set the "DstGridType" option to "1.95x25".
> >
> >The best examples to look at are ESMF_regrid1.ncl, ESMF_regrid_2.ncl, an=
d
> >ESMF_regrid_4.ncl. These examples also have scripts that show you how to
> >regrid the variable once you have a weights file, since you don't need t=
o
> >keep regenerating it for the same type of source and destination grid.
> >See the corresponding ESMF_wgts_n.ncl file.
> >
> >--Mary
> >
> >
> >
> >
> >On Jun 1, 2014, at 6:14 PM, "Omary, Mohammad" <omary@email.unc.edu>
> wrote:
> >
> >> Rubin,
> >> The cdo regridding functions do not preserve the mass in case of
> >>regridding emissions netCDF file.
> >>
> >> When I regrid 1x1 degree to
> >> € 1.9x2.5 ----> ratio old/new 4.8
> >> € 2x2 ----> ratio old/new 4
> >> € 1x1 -----> ratio old/new 1
> >> € 0.5x0.5 -----> ratio old/new 0.25
> >> Do you have any idea how preserve the mass or if there any other
> >>program/function to do that?
> >>
> >> Thanks,
> >> MO
> >> -------------------
> >> Mohammad Omary
> >> Institute for the Environment
> >> University of North Carolina
> >> http://www.ie.unc.edu/cempd
> >> voice:951-789-6284
> >> omary@unc.edu
> >>
> >>
> >> From: Ruben van Hooidonk <rubski@gmail.com>
> >> Date: Friday, May 23, 2014 8:29 AM
> >> To: Mohammad Omary <omary@email.unc.edu>, "ncl-talk@ucar.edu"
> >><ncl-talk@ucar.edu>
> >> Subject: ncl talk
> >>
> >>> Hi,
> >>>
> >>> In regards to this question:
> >>>
> >>> I am new into global emissions (expert in SMOKE and CAMQ emissions)
> >>>and have mozart emissions in 1x1 degree grid. Is there a utility out
> >>>there to regrid the netCDF from 1x1 degree to lower resolution
> >>>(1.95x2.5 degree)?
> >>>
> >>> For regridding I use the Climate Data Operators (CDO
> >>>https://code.zmaw.de/projects/cdo)
> >>>
> >>> It is easy and super fast!
> >>>
> >>> On the command line I would do:
> >>>
> >>> cdo remapbil,r92x144 file_in.nc file_out.nc
> >>>
> >>> Hope this helps!
> >>>
> >>> Ruben
> >>>
> >>> Date: Thu, 22 May 2014 17:19:02 +0000
> >>> From: "Omary, Mohammad" <omary@email.unc.edu>
> >>> Subject: regridding 1x1 degree to 1.9x2.5
> >>> To: "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
> >>> Message-ID: <CFA37F6D.155AD%omary@email.unc.edu>
> >>> Content-Type: text/plain; charset="us-ascii"
> >>>
> >>>
> >>> I am new into global emissions (expert in SMOKE and CAMQ emissions)
> >>>and have mozart emissions in 1x1 degree grid. Is there a utility out
> >>>there to regrid the netCDF from 1x1 degree to lower resolution
> >>>(1.95x2.5 degree)?
> >>>
> >>> Thanks,
> >>> MO
> >>> -------------------
> >>> Mohammad Omary
> >>> Institute for the Environment
> >>> University of North Carolina
> >>> http://www.ie.unc.edu/cempd
> >>> voice:951-789-6284
> >>> omary@unc.edu<mailto:omary@unc.edu>
> >>>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>
>

Received on Thu Jun 19 05:40:03 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT