[gradsusr] Shift in the lattitude while plotting in grads mercator/latlon projction

itesh dash itesh at rimes.int
Tue Jul 16 22:18:16 EDT 2013


Thanks all for the responses. After few days of struggle and yes most of
you are correct. I found easy solution to the problem for using the
Mercator projection. wrf2grads uses constant increment in y. But the
latitudes in the nc output are not equidistant. When we replaced the
constant increment by the latitudes specified by the nc file the problem
seems to disapear.

To incorporate this correction to the original program we replace the line
in the subroutine create_grads in the file module_wrf_to_grads_util.F.
<http://forum.wrfforum.com/viewtopic.php?f=30&t=517#>By replacing the below
section
           write(13,'("ydef ",i4," levels ")')ny                &
                       ny,xlat(1,1),(abs(xlat(1,1)-xlat(nx,ny))/(ny-1))with
         write(13,'("ydef ",i4," levels ")')ny
           do my_var = 1 , ny
              write(13,'(" ",f10.5)')xlat(1,my_var)
           enddoand recompile wrf2grads.

This will just list out all the latitudes. instead of setting linear YDEF
with constant increment. I am not sure why Mercator projection is still not
supported by grads. But this could be a better work-around. This worked
extremely well for me.

regards,
Itesh




On Fri, Jul 12, 2013 at 8:42 PM, Masters.Steve <masters.steve at ensco.com>wrote:

>  I have plotted WRF data in grib format with a Mercator projection and it
> appears to plot correctly.  The grib2ctl.pl script that builds the ctl
> file constructs the YDEF line like****
>
> ** **
>
> YDEF 120 LEVELS  -3.325 -3.305 -3.287 ….. <120 levels given>****
>
> ** **
>
> It calculates and puts in the actual latitudes of the grid points for the
> particular Mercator grid that is defined in the file.  The levels in the
> YDEF (or XDEF) do not need to be at even intervals so this method appears
> to work for the Mercator-projection data.    ****
>
> ** **
>
> For your application, you can pull out the latitudes of the grid points
> from one of the wrfout* files using something like “ncdump –v CLAT wrfout…”
> and build the YDEF line from these values.****
>
> ** **
>
> Steve Masters    masters.steve at ensco.com****
>
> ENSCO, Inc.****
>
> Melbourne, FL****
>
> ** **
>
> *From:* gradsusr-bounces at gradsusr.org [mailto:
> gradsusr-bounces at gradsusr.org] *On Behalf Of *Yaqiang Wang
> *Sent:* Friday, July 12, 2013 1:23 AM
> *To:* GrADS Users Forum
> *Subject:* Re: [gradsusr] Shift in the lattitude while plotting in grads
> mercator/latlon projction****
>
> ** **
>
> Mercator projection is longitude equal-interval but not latitude
> equal-interval. The ctl without PDEF (Mercator is not supported in PDEF at
> present) may approximatively plot the data at low latitude area, but it's
> imposible plot the data at exactly position.
>
> On Friday, July 12, 2013, itesh dash wrote:****
>
>  The information actually were extracted from in the namelist.wps file
> using WRF2GrAGS which generate the control(ctl) file. For the model I only
> provided the grid resolution(9km), no of grid points in both north south
> (640) and east west(460)  and center latitude and longitude (18.0 and
> 91.0). ****
>
> ** **
>
> The XDEF,YDEF and other params were automatically calculated by WRF2Grads.
> But your guessing may be correct as i have changed the start lat from
> -3.1006 to -2.1006 and the shift is minimized. BUt is this correct way?***
> *
>
> ** **
>
> I am currently using the mercator projection. I will change to
> lat-lon projection and see if that makes the difference. ****
>
> ** **
>
> Thanks.****
>
> ** **
>
> ** **
>
> ** **
>
> On Fri, Jul 12, 2013 at 12:40 AM, James T. Potemra <jimp at hawaii.edu>
> wrote:****
>
>  Itesh:
>
> Your model output is 640 x 460, but your descriptor file has
> xdef = 639 and ydef = 459.  These should be 640 and 460,
> respectively.  Also, I think what Mohsen meant was to make
> sure your starting lat/lon is the same in the descriptor file
> and model grid, i.e., you have 61.1815 as the starting lon
> and -3.1006 as the starting lat.  Are these the same as the
> model grid?
>
> Jim****
>
> ** **
>
> On 7/11/13 7:31 AM, itesh dash wrote:****
>
>  Dear Mohsen, ****
>
> ** **
>
> thanks for the response. But I am not even trying to use any script. Just
> by opening and plotting the ctl file.****
>
> ** **
>
> Here is my ctl file****
>
> ** **
>
> dset ^Jul1013_12.dat****
>
> undef 1.e35****
>
> xdef  639 linear   61.1815   0.0935****
>
> ydef  459 linear   -3.1006   0.0873****
>
> zdef    3 levels****
>
>   850.00000****
>
>   500.00000****
>
>   200.00000****
>
> tdef         8 linear 12z10jul2013  6hr****
>
> vars 1****
>
> HGT 0 0 Terrain Height****
>
> endvars****
>
> ** **
>
> The wrf model ran with mercator projection 640 x 460 grid points 9 km
> resolution.****
>
> ** **
>
> I could not figure out why the shift is there. Is there a way i can
> balance the shift.****
>
> ** **
>
> regards,****
>
> itesh****
>
> ** **
>
> On Thu, Jul 11, 2013 at 11:58 PM, Mohsen Soltani <soltani.clima at gmail.com>
> wrote:****
>
>  itesh,****
>
> ** **
>
> Make sure Lat/Lon in your .ctl file are the same as your script!****
>
> ** **
>
> Mohsen****
>
>
> ****
>
> -- ****
>
> April showers bring May flowers!****
>
> --
> *Mohsen Soltani, M.Sc.*
> Climatology Grad Student,
> Department of Climatology, Faculty of Geography,****
>
> University of Tehran, Tehran, Iran****
>
> voice: (+98) 9119772934
> e-mail: soltani.clima at gmail.com****
>
> ** **
>
> On Thu, Jul 11, 2013 at 9:05 AM, itesh dash <itesh at rimes.int> wrote****
>
>
>
> --
> *************************************************
> Dr. Yaqiang Wang
> Chinese Academy of Meteorological Sciences (CAMS)
> 46, Zhong-Guan-Cun South Avenue
> Beijing, 100081
> China
>
> yaqiang.wang at gmail.com
>
> http://www.meteothinker.com
> ******************************************************
>
> ------------------------------
> The information contained in this email message is intended only for the
> use of the individual(s) to whom it is addressed and may contain
> information that is privileged and sensitive. If you are not the intended
> recipient, or otherwise have received this communication in error, please
> notify the sender immediately by email at the above referenced address and
> note that any further dissemination, distribution or copying of this
> communication is strictly prohibited.
>
> The U.S. Export Control Laws regulate the export and re-export of
> technology originating in the United States. This includes the electronic
> transmission of information and software to foreign countries and to
> certain foreign nationals. Recipient agrees to abide by these laws and
> their regulations -- including the U.S. Department of Commerce Export
> Administration Regulations and the U.S. Department of State International
> Traffic in Arms Regulations -- and not to transfer, by electronic
> transmission or otherwise, any content derived from this email to either a
> foreign national or a foreign destination in violation of such laws.
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130717/8f13060b/attachment-0003.html 


More information about the gradsusr mailing list