Re: ncl talk

From: Omary, Mohammad <omary_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 10 2014 - 08:40:11 MDT

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 on
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 discussed
>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, and
>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 to
>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 Tue Jun 10 02:40:21 2014

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