wrf_td

From: Brandon Fisel <bjfisel_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Feb 2009 14:43:32 -0600

Hi,

I'm receiving a fatal error:
fatal:Undefined identifier: (wrf_td) is undefined, can't continue
fatal:Execute: Error occurred at or near line 532 in file /WRFUserARW.ncl
fatal:Execute: Error occurred at or near line 507 in file wrfout_to_nc.ncl

The line in my WRFUserARW.ncl is as follows:

  if( variable .eq. "td2" ) then
       ;; function wrf_td needs qv and pressure (Pa) on input and
returns dewpoint temperature on return
       Q2 = nc_file->Q2(time,:,:)

       Q2 = Q2 > 0.0
       P = nc_file->P(time,0,:,:) ; get only the lowest level,
to match Q2
       PB = nc_file->PB(time,0,:,:) ; get only the lowest level,
to match Q2
       p = P + PB

       td2 = wrf_td( p , Q2 )
       td2_at_description = "2m Dewpoint Temperature" ; Overwrite
return description
       return(td2)
  end if

The line in the wrfout_to_nc.ncl, which is similar to the script found at
http://www.mmm.ucar.edu/wrf/src/utils/wrfout_to_cf.ncl is:

      if (out2dMet_at_Td_2m) then
        Td_2m(n,:,:) = (/wrf_user_getvar(wrfout,"td2",n)/)
      end if

I have looked around inside the libraries and haven't found the function
wrf_td to be defined anywhere. I've tried creating the function inside the
WRFUserARW.ncl script that was similar to:
     function wrf_td ( P:numeric, qv:numeric );
however, this led to an additional error where NCL was expecting a 'begin'
or 'local'.

Am I on the right track and if so how else can I define wrf_td?

FYI: The version of NCL is v4.2.0.a034.

Cheers,

Brandon Fisel

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 12 2009 - 13:43:32 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 19 2009 - 09:54:51 MST