[Wrf-users] Plotting a gridpoint with a the radius of influence

Bart Brashers bbrashers at environcorp.com
Wed Oct 16 13:09:46 MDT 2013


If you mean you'd like to plot the output from OBSGRID (as opposed to WRFDA) then this script will make a file with location extracted from a qc_obs_used* file that can be written by OBSGRID.  You could plot it with a symbol scaled to your radius.  It was re-projected from lon,lat to LCC coordinates using cs2cs from the PROJ package.


$ cat obsgrid_locations.csh

#!/bin/csh -f

if ($#argv == 0 | "$1" =~ -*h*) then

    echo "Usage: $0:t path/to/geo_em_d03.nc path/to/qc_obs_used_file"

    exit

endif



set domain = $1

set inp = $2



set sites = (`grep "[A-Za-z]" $inp | cut -c41-46 | sort | uniq`)



set ref_lon  = `ncdump -h $domain | grep STAND_LON    | cut -d= -f2 | cut -df -f1`

set ref_lat  = `ncdump -h $domain | grep MOAD_CEN_LAT | cut -d= -f2 | cut -df -f1`

set truelat1 = `ncdump -h $domain | grep TRUELAT1     | cut -d= -f2 | cut -df -f1`

set truelat2 = `ncdump -h $domain | grep TRUELAT2     | cut -d= -f2 | cut -df -f1`



echo "Lon, Lat, Xlcc, Ylcc, Site"

foreach site ($sites)

    set lat = `grep $site $inp | head -1 | cut -c1-20`

    set lon = `grep $site $inp | head -1 | cut -c21-40`

    set tmp = (`echo "$lat $lon" | proj -r -f '"%.5f"' +proj=lcc +lat_1=$truelat1 +lat_2=$truelat2 +lat_0=$ref_lat +lon_0=$ref_lon +ellip=sphere +a=6370000 +b=6370000 +units="km" | tr -d '"'`)

    set Xlcc = $tmp[1]

    set Ylcc = $tmp[2]



    echo "$lon, $lat, $Xlcc, $Ylcc, $site"

end

Bart Brashers

From: wrf-users-bounces at ucar.edu [mailto:wrf-users-bounces at ucar.edu] On Behalf Of Lyndon Mark Olaguera
Sent: Wednesday, October 16, 2013 7:15 AM
To: wrfhelp; wrf-users
Subject: [Wrf-users] Plotting a gridpoint with a the radius of influence

Hi all,

I'd like to know how to plot the radius of influence for a grid point for the objective analysis in WRF. Any suggestion on how to do this?

Ill appreciate any help.Thanks


Lyndon Mark P. Olaguera


________________________________
This message contains information that may be confidential, privileged or otherwise protected by law from disclosure. It is intended for the exclusive use of the Addressee(s). Unless you are the addressee or authorized agent of the addressee, you may not review, copy, distribute or disclose to anyone the message or any information contained within. If you have received this message in error, please contact the sender by electronic reply to email at environcorp.com and immediately delete all copies of the message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20131016/6e1c0b14/attachment.html 


More information about the Wrf-users mailing list