<html><body>
<div style="font-size: 13.3333px; font-family: serif; color: rgb(0, 0, 0);
font-weight: 400; font-style: normal;">
To whom it may concern,</div>
<div style="font-size: 13.3333px; font-family: serif; color: rgb(0, 0, 0);
font-weight: 400; font-style: normal;">
I decided to use wrf outputs and a tropical cyclone center location (from
JTWC) to define some circular nests around TC center with fixed radiuses. To
this aim, I used nggcog and gc_inout functions to define the circular nest
and determine the points that are in the defined circle. Now I need to now
which points are located on the circle. So I used gc_onarc function, but
defining the inputs for this function confused me. the two rightmost inputs
for gc_onarc are nggcog out puts with (/72,2/)dimension and dimension of the
last two left gc_onarc inputs are 3600. I do highly appreciate if help me.
The sample of code are attached as below:<br />
<br />
<br />
<br />
;oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo***************<br
/>
;<br />
;<br />
load "/usr/share/ncarg/nclscripts/csm/gsn_code.ncl"<br />
load "/usr/share/ncarg/nclscripts/csm/gsn_csm.ncl"<br />
load "/usr/share/ncarg/nclscripts/csm/contributed.ncl"<br />
load "/usr/share/ncarg/nclscripts/csm/shea_util.ncl"<br />
load "/usr/share/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br />
load "/usr/share/ncarg/nclscripts/csm/skewt_func.ncl"<br />
<br />
begin<br />
;oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo**************<br
/>
; add data from file<br />
;ooooooooooooooooooooooooooooo*********<br />
DATADir =
"/home/pegahfar/inio/haiyan/data/wrfout_18_6_haiyan_MPI_8/"<br />
FILES = systemfunc (" ls -1 " + DATADir +"wrfout*")<br
/>
print ("FILES="+FILES)<br />
<br />
lat_center = (/(/5.8, 5.8, 6.1, 6.1,6.1, 6.2, 6.3, 6.5,6.5, 6.5, 6.9,
7.1,7.3, 7.6, 7.9, 8.2,8.7, 9.3, 10.2, 10.6,11.0, 11.4, 11.9, 12.2,12.3,
13.5, 14.4, 15.4,16.5, 17.9, 19.4, 20.4,21.5, 22.4, 22.4 , 22.4/)/)<br />
;;;print (lat_center)<br />
<br />
lon_center =
(/(/157.2,157.2,155.5,153.3,152.2,150.4,148.8,147.2,145.9,144.6,142.9,141.3,139.7,138.0,136.2,134.4,132.8,131.1,129.1,126.9,124.8,122.5,120.5,118.0,116.6,114.8,113.1,111.4,110.3,109.0,108.0,107.5,107.1,107.7,107.7,107.7/)/)<br
/>
<br />
do ifil =1,35,1<br />
<br />
a= addfile(FILES(ifil),"r") ; Open the next file<br />
times := wrf_user_getvar(a,"times",-1) ; get all times in
the file<br />
ntimes = dimsizes(times) ;
number of times in the file<br />
<br />
lat_wrf := a->XLAT(0,:,:)<br />
lon_wrf := a->XLONG(0,:,:)<br />
<br />
radius_outer_core=(7*RMW_km(ifil))/110<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br
/>
;;;;;;;;; /\ /\ /\ /\ start of define circle sized structure /\
/\ /\ /\ /\;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br
/>
<br />
npoint_outer_core=144<br />
<br />
clat_outer_core = new(npoint_outer_core,float) ; arrays
to hold great circle<br />
clon_outer_core = new(npoint_outer_core,float)<br />
<br />
lat_location = lat_center(ifil) <br />
lon_location = lon_center(ifil)<br />
<br />
nggcog(lat_location,lon_location,radius_outer_core,clat_outer_core,clon_outer_core)
; Calculate great circle<br />
<br />
min_lat_outer_core = min(clat_outer_core)
<br />
min_lon_outer_core = min(clon_outer_core)<br />
max_lat_outer_core = max(clat_outer_core)<br />
max_lon_outer_core = max(clon_outer_core)<br />
<br />
extrem_outer_core_lat=(/min_lat_outer_core , max_lat_outer_core /)<br />
extrem_outer_core_lon=(/min_lon_outer_core , max_lon_outer_core /)<br />
<br />
extrem_outer_core_inds=getind_latlon2d (lat_wrf,lon_wrf,
extrem_outer_core_lat, extrem_outer_core_lon)<br />
<br />
;---Subset the desired rectagle of data<br />
<br />
loc_outer_core_circle:= getind_latlon2d (lat_wrf,lon_wrf, clat_outer_core,
clon_outer_core)<br />
<br />
lat_ind_over_c=loc_outer_core_circle(:,0)<br />
lon_ind_over_c=loc_outer_core_circle(:,1)<br />
<br />
;---Set points that are outside of the circle of data to missing<br />
<br />
lat_2d_outer_core:=lat_wrf(extrem_outer_core_inds
(0,0):extrem_outer_core_inds(1,0),extrem_outer_core_inds(0,1):extrem_outer_core_inds(1,1))<br
/>
lon_2d_outer_core:=lon_wrf(extrem_outer_core_inds
(0,0):extrem_outer_core_inds(1,0),extrem_outer_core_inds(0,1):extrem_outer_core_inds(1,1))<br
/>
<br />
in_circle_outer_core :=
gc_inout(lat_2d_outer_core,lon_2d_outer_core,clat_outer_core,clon_outer_core)<br
/>
<br />
size_in_circle_outer_core=dimsizes(in_circle_outer_core)<br />
<br />
;;;;;;;;;;;;;; on arc ;;;;;;;;;;;<br />
<br />
clat_outer_core_size = dimsizes(clat_outer_core)<br />
print("clat_outer_core_size="+clat_outer_core_size)<br />
<br />
clat_outer_core_2d=reshape(clat_outer_core,(/floattointeger(clat_outer_core_size/2),2/))<br
/>
clon_outer_core_2d=reshape(clon_outer_core,(/floattointeger(clat_outer_core_size/2),2/))<br
/>
<br />
size_lat_2d_outer_core=dimsizes(lat_2d_outer_core)<br />
<br />
lat_2d_outer_core_reshape =
reshape(lat_2d_outer_core,(/size_lat_2d_outer_core(0)*size_lat_2d_outer_core(1),2/))<br
/>
lon_2d_outer_core_reshape =
reshape(lon_2d_outer_core,(/size_lat_2d_outer_core(0)*size_lat_2d_outer_core(1),2/))<br
/>
<br />
lat_2d_outer_core_to_1d = ndtooned(lat_2d_outer_core)<br />
lon_2d_outer_core_to_1d = ndtooned(lon_2d_outer_core)<br />
<br />
onarc_outer_core =
gc_onarc(lat_2d_outer_core_to_1d,lon_2d_outer_core_to_1d,clat_outer_core_2d,clon_outer_core_2d)<br
/>
<br />
;;;;;;;;;;;;; on arc ;;;;;;;;;;;<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br
/>
;;;;;;;;; /\ /\ /\ /\ end of define circle sized structure /\
/\ /\ /\ /\;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br
/>
end</div>
<div style="font-size: 13.3333px; font-family: serif; color: rgb(0, 0, 0);
font-weight: 400; font-style: normal;">
</div>
<div style="font-size: 13.3333px; font-family: serif; color: rgb(0, 0, 0);
font-weight: 400; font-style: normal;">
</div>
<div style="font-size: 13.3333px; font-family: serif; color: rgb(0, 0, 0);
font-weight: 400; font-style: normal;">
</div>
<div style="font-size: 13.3333px; font-family: serif; color: rgb(0, 0, 0);
font-weight: 400; font-style: normal;">
</div>
<div style="font-family: serif; color: rgb(0, 0, 0); font-size: 13.3333px;
font-weight: 400; font-style: normal;">
Best Regards<br />
=================================<br />
Nafiseh Pegahfar<br />
Assistant Professor<br />
Iranian National Institute for Oceanography and Atmospheric Science<br />
(http://www.inio.ac.ir)<br />
Phone: (0098)21- 66944873-5 Ext. 224<br />
Fax: (0098)21- 66944869<br />
Email: (pegahfar@inio.ac.ir)<br />
(pegahfar@ut.ac.ir)<br />
=================================</div>
</body></html>