[Met_help] [rt.rap.ucar.edu #88544] History for PCP Combine Error
John Halley Gotway via RT
met_help at ucar.edu
Tue Jan 22 13:41:42 MST 2019
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
John, am having a difficult time setting up the string syntax to get PCP to run. When I use python to build the command string, I get the following:
['/h/WXQC/met-6.1/bin/pcp_combine', '-add', ' /h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc \'name="CFSR_MEANINCHES_6HOUR_00"; level="(*,*)";\'', '/home/qcteam/test', '-v', '4']
If I run this through a call to MET, I get a usage error from MET.
If I run the command manually:
/h/WXQC/met-6.1/bin/pcp_combine -add /h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc 'name="CFSR_MEANINCHES_6HOUR_00"; level="(*,*)";' /h/data/global/WXQC/data/met/tmp/1edd0008-e7c2-4f51-8d8c-14d7f762c641 -v 2
It works fine.
So the question - is the \ escape character the problem. How can I get python to place a single quote ahead of name= and after the last semi colon in such a way that MET would be happy. The line am using to build the string is:
field = ' {0} \'name="{1}"; level="(*,*)";\''.format(filename,field_prefix + newtime.strftime("%H"))
Thanks
Bob
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: PCP Combine Error
From: John Halley Gotway
Time: Fri Jan 18 11:15:49 2019
Bob,
These pesky little details are the worst!
Here's the command you sent to me:
['/h/WXQC/met-6.1/bin/pcp_combine', '-add', '
/h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc\'name="CFSR_MEANINCHES_6HOUR_00";
level="(*,*)";\'', '/home/qcteam/test', '-v', '4']
Breaking this out into multiple lines where there are commas, I see:
(1) '/h/WXQC/met-6.1/bin/pcp_combine'
(2) '-add'
(3) '
/h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc\'name="CFSR_MEANINCHES_6HOUR_00";
level="(*,*)";\''
(4) '/home/qcteam/test'
(5) '-v'
(6) '4'
Looks like there may be a problem on line (3). There's no space
between ...
12_mean.nc and \'name. That might be causing a parsing problem
because MET
uses whitespace to parse the command line options.
John
On Wed, Jan 16, 2019 at 3:24 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:
>
> Wed Jan 16 15:24:10 2019: Request 88544 was acted upon.
> Transaction: Ticket created by robert.craig.2 at us.af.mil
> Queue: met_help
> Subject: PCP Combine Error
> Owner: Nobody
> Requestors: robert.craig.2 at us.af.mil
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88544 >
>
>
> John, am having a difficult time setting up the string syntax to get
PCP
> to run. When I use python to build the command string, I get the
following:
>
> ['/h/WXQC/met-6.1/bin/pcp_combine', '-add', '
> /h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc
> \'name="CFSR_MEANINCHES_6HOUR_00"; level="(*,*)";\'',
'/home/qcteam/test',
> '-v', '4']
> If I run this through a call to MET, I get a usage error from MET.
>
> If I run the command manually:
>
> /h/WXQC/met-6.1/bin/pcp_combine -add
/h/data/global/WXQC/data/climo/cfsr/
> cfsr_freq_p6_world_mo_12_mean.nc 'name="CFSR_MEANINCHES_6HOUR_00";
> level="(*,*)";'
> /h/data/global/WXQC/data/met/tmp/1edd0008-e7c2-4f51-8d8c-
14d7f762c641 -v 2
>
> It works fine.
>
> So the question - is the \ escape character the problem. How can I
get
> python to place a single quote ahead of name= and after the last
semi colon
> in such a way that MET would be happy. The line am using to build
the
> string is:
>
> field = ' {0} \'name="{1}";
level="(*,*)";\''.format(filename,field_prefix
> + newtime.strftime("%H"))
>
> Thanks
> Bob
>
>
------------------------------------------------
Subject: PCP Combine Error
From: John Halley Gotway
Time: Fri Jan 18 11:18:38 2019
Bob,
Testing on the command line, I see:
*bin/pcp_combine -add
data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212
'name="TMP"; level="P500";' test*
And that runs fine. But when I remove the space between G212 and
'name, I
get a parsing error:
*bin/pcp_combine -add
data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212'name="TMP";
level="P500";' test*
I'll keep my fingers crossed that it's just a spacing issue.
John
On Fri, Jan 18, 2019 at 11:15 AM John Halley Gotway <johnhg at ucar.edu>
wrote:
> Bob,
>
> These pesky little details are the worst!
>
> Here's the command you sent to me:
> ['/h/WXQC/met-6.1/bin/pcp_combine', '-add', '
>
/h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc\'name="CFSR_MEANINCHES_6HOUR_00";
> level="(*,*)";\'', '/home/qcteam/test', '-v', '4']
>
> Breaking this out into multiple lines where there are commas, I see:
> (1) '/h/WXQC/met-6.1/bin/pcp_combine'
> (2) '-add'
> (3) '
/h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc\'name="CFSR_MEANINCHES_6HOUR_00";
> level="(*,*)";\''
> (4) '/home/qcteam/test'
> (5) '-v'
> (6) '4'
>
> Looks like there may be a problem on line (3). There's no space
between
> ...12_mean.nc and \'name. That might be causing a parsing problem
> because MET uses whitespace to parse the command line options.
>
> John
>
> On Wed, Jan 16, 2019 at 3:24 PM robert.craig.2 at us.af.mil via RT <
> met_help at ucar.edu> wrote:
>
>>
>> Wed Jan 16 15:24:10 2019: Request 88544 was acted upon.
>> Transaction: Ticket created by robert.craig.2 at us.af.mil
>> Queue: met_help
>> Subject: PCP Combine Error
>> Owner: Nobody
>> Requestors: robert.craig.2 at us.af.mil
>> Status: new
>> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88544 >
>>
>>
>> John, am having a difficult time setting up the string syntax to
get PCP
>> to run. When I use python to build the command string, I get the
following:
>>
>> ['/h/WXQC/met-6.1/bin/pcp_combine', '-add', '
>>
/h/data/global/WXQC/data/climo/cfsr/cfsr_freq_p6_world_mo_12_mean.nc
>> \'name="CFSR_MEANINCHES_6HOUR_00"; level="(*,*)";\'',
'/home/qcteam/test',
>> '-v', '4']
>> If I run this through a call to MET, I get a usage error from MET.
>>
>> If I run the command manually:
>>
>> /h/WXQC/met-6.1/bin/pcp_combine -add
/h/data/global/WXQC/data/climo/cfsr/
>> cfsr_freq_p6_world_mo_12_mean.nc 'name="CFSR_MEANINCHES_6HOUR_00";
>> level="(*,*)";'
>> /h/data/global/WXQC/data/met/tmp/1edd0008-e7c2-4f51-8d8c-
14d7f762c641 -v 2
>>
>> It works fine.
>>
>> So the question - is the \ escape character the problem. How can I
get
>> python to place a single quote ahead of name= and after the last
semi colon
>> in such a way that MET would be happy. The line am using to build
the
>> string is:
>>
>> field = ' {0} \'name="{1}";
>> level="(*,*)";\''.format(filename,field_prefix +
newtime.strftime("%H"))
>>
>> Thanks
>> Bob
>>
>>
------------------------------------------------
More information about the Met_help
mailing list