Re: fatal:Div: operator failed, can't continue

From: Andrea Hahmann <ahah_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 31 2011 - 09:26:32 MST

Dear Wei

Your code is not exactly like the one on the example.

  TK = wrf_tk (P, theta)
  RH = wrf_rh (qv, P, TK)

You are missing the first of these lines.
Perhaps, Tk does not have the right units?

Good luck,
Andrea

-- 
Andrea N. Hahmann
Senior Scientist
Wind Energy Division
Risø DTU
Technical University of Denmark
Risø National Laboratory for Sustainable Energy
Frederikborgvej 399, P.O. Box 49
4000 Roskilde, Denmark
Direct +45 4677 5471
Mobil: +45 2133 0550
ahah@risoe.dtu.dk 
www.risoe.dtu.dk
From: wei huang <whua27@gmail.com>
Date: Tue, 01 Feb 2011 00:07:23 +0800
To: <ncl-talk@ucar.edu>
Subject: Re: fatal:Div: operator failed, can't continue
Thanks for your cooperation, kindly, I have changed the pressure hPa to Pa
but still it does not working and giving the same error: Any help will be
appreciated.
thanks
 
   P  = a->P                     ; perturbation; Pa
   Pb = a->PB                    ; base state pressure; Pa
   P  = P + Pb                   ; total pressure
   T = a->T                      ; perturbation potential temperature
   tk = T + 300.
 
   qv = a->QVAPOR                ; water vapor mixing ratio(kg/kg)
   RH = wrf_rh (qv, P, tk)
   printVarSummary(RH)
   qs = (qv/RH)*100
   printVarSummary(qs)
 
Error: 
fatal:divide: Division by 0, Can't continue
fatal:Div: operator failed, can't continue
fatal:Execute: Error occurred at or near line 17 in file
On Mon, Jan 31, 2011 at 11:36 PM, Dennis Shea <shea@ucar.edu> wrote:
> Please read the documentation:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_rh.shtml
> 
> ==
> "qv" must be kg/kg , you are passing "g/kg"
> "P" must be "Pa", you are passing "hPa"
> 
> 
> 
> On 1/31/11 7:09 AM, wei huang wrote:
>> Dear NCL users,
>> 
>> I got an error to calculating saturated mixing ratio from the wrf water
>> vapor mixing ratio. I don¹t know my assumption is correct or not. Could
>> anyone help me to figure out the problem or any advice about it?
>> 
>> Thanks
>> 
>> wei
>> a = addfile("wrfout_02.nc <http://wrfout_02.nc/>  <http://wrfout_02.nc
>> <http://wrfout_02.nc/> >","r")
>> 
>> 
>> P= a->P; perturbation
>> 
>> Pb = a->PB; base state pressure
>> 
>> P= P + Pb; total pressure
>> 
>> T = a->T; perturbation potential temperature
>> 
>> tk = T + 300.
>> 
>> qv = a->QVAPOR/1000; water vapor mixing ratio(g/kg)
>> 
>> RH = wrf_rh (qv, P*.01, tk) ;P*0.01 converts Pa to hPa
>> 
>> printVarSummary(RH)
>> 
>> qvs = (qv/RH)*100; saturated water vapor mixing ratio(g/kg)
>> 
>> printVarSummary(qvs)
>> 
>> end
>> 
>> ;*****************************************
>> 
>> Variable: RH
>> 
>> Type: float
>> 
>> Total Size: 102667500 bytes
>> 
>> 25666875 values
>> 
>> Number of Dimensions: 4
>> 
>> Dimensions and sizes:[24] x [39] x [south_north | 160] x [west_east | 105]
>> 
>> Coordinates:
>> 
>> Number Of Attributes: 2
>> 
>> units :%
>> 
>> description : Relative Humidity
>> 
>> fatal:divide: Division by 0, Can't continue
>> 
>> fatal:Div: operator failed, can't continue
>> 
>> fatal:Execute: Error occurred at or near line 16 in file
>> 
>> 
>> 
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 31 09:26:56 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST