Re: wrf global plot problem with gWRF_merc.ncl

From: Eddy <eddycarl_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 16 2013 - 19:07:01 MDT

Hello Mary,

Maybe I am not clear in describing my question, sorry... I mean I can zoom in using the wrf_contour_map_template.ncl script. My question is on the wrf_Cloud.ncl code (http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/LEVELS_MODEL/wrf_Cloud.ncl). Looks like I can not zoom in there.

Thanks,
Eddy

At 2013-09-17 07:55:45,"Mary Haley" <haley@ucar.edu> wrote:
>
>On Sep 16, 2013, at 2:14 PM, Eddy <eddycarl@126.com> wrote:
>
>> Hello Mary,
>>
>> Thank you for the information! This is very useful. I can use the gsn_csm_XXXX functions to plot now. So, we can wait to see whether wrfhelp will fix this problem.
>>
>> Another question: since the wrf_XXX.ncl codes use the map information provided in the wrfoutputs, how do I zoom-in to a region in a global simulation result? I've tried setting "res@mpMinLatF" etc, but it doesn't work
>
>Eddy,
>
>You should be able to zoom in using mpMin/MaxLat/LonF, but you also have to make sure you set res@mpLimitMode to = "LatLon". I assume you are also setting sfXArray and sfYArray as described in the template script?
>
>--Mary
>
>>
>> Thank you!
>>
>> Eddy
>>
>>
>> At 2013-09-17 01:51:44,"Mary Haley" <haley@ucar.edu> wrote:
>> Hi Eddy,
>>
>> There is something wrong with the lat/lon limits on the file or else the code that sets the map projection for the type of file you have ( MAP_PROJ=6) is not correct.
>>
>> I've CC'ed wrfhelp as I think this is something they need to fix. In "set_mp_resources" in WRFUserARW.ncl it looks like the four corners of the projection are being set to:
>>
>> mpRightCornerLonF : 179.5489
>> mpRightCornerLatF : 89.54774
>> mpLeftCornerLonF : 180.4511
>> mpLeftCornerLatF : -89.54774
>>
>>
>> Note that the right and left corner longitudes are very close to 180, and that the left corner actually goes over 180. I think the left corner s hould be closer to -180 and not 180.
>>
>> If you want to try plotting this using gsn_csm_xxxx functions instead, (until a fix is available), then see the "wrf_contour_map_template.ncl" template script at:
>>
>> http://www.ncl.ucar.edu/Applications/Templates/
>>
>> You want to set USE_WRF_MAP_PROJECTION to False, so it doesn't try to use the map projection on the file. This example plots HGT, but you should be able to subsitute the QXXX variables.
>>
>> --Mary
>>
>> On Sep 15, 2013, at 11:43 PM, Eddy <eddycarl@126.com> wrote:
>>
>>> Hi Mary,
>>>
>>> I've followed your in struction to create a NetCDF file which is a subset of the wrf output (contain only a variable "QCLOUD"). The file name is called "wrfout_subset_1.nc". Please discard the "wrfout_subset.nc" as it is not transfered correctly. The ncl code to plot is also uploaded to your FTP called "wrf_Cloud.ncl". Thank you!
>>>
>>> Best,
>>> Eddy
>>>
>>> At 2013-09-16 12:58:03,"Mary Haley" <haley@ucar.edu> wrote:
>>>
>>> Hi,
>>>
>>> The 5 GB file is a bit large. Do you know how to write NetCDF files? Perhaps you could just write out the variables that you are plotting, the XLAT and XLONG arrays (or whatever they are called on the file), and the file attributes.
>>>
>>> The file writing code would look something like this:
>>> < div>
>> infile = "wrfout_d03_2012-10-28_12:00:00.nc"
>> outfile = "wrfout_subset.nc"
>>
>> ;---Open file for reading
>> fin = addfile(infile,"r")
>>
>> ;---Open file for writing
>> system("rm " + outfile)
>> fout = addfile(outfile,"c")
>>
>> ;---Variables to read, and then write
>> vars_to_write = (/"HLAT","HLON","Times","QVAPOR","QICE"/)
>>
>> ;---Get file global attributes and write these to file.
>> fatts = getvaratts(fin)
>> do i=0,dimsizes(fatts)-1
>> fout@$fatts(i)$ = fin@$fatts(i)$
>> end do
>>
>> ;---Write desired variables to file
>> do i=0,dimsizes(vars_to_write)-1
>> fout->$vars_to_write(i)$ = fin->$vars_to_write(i)$
>> end do
>>
>> I've CC'ed wrfhelp on this, in case they have any ideas about why this script is not working.
>>
>> --Mary
>>
>> On Sep 15, 2013, at 10:14 PM, Eddy <eddycarl@126.com> wrote:
>>
>>> Hello Mary,
>>>
>>> Thanks for your prompt reply!
>>> The gWRF_merc.ncl file is available at http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/gWRF_merc.htm
>>> My WRF ARW output information with ncl_filedump is as follows:
>>>
>>> DX : 100310.5
>>> DY : 100562.5
>>> STOCH_FORCE_OPT : 0
>>> GRIDTYPE : C
>>> DIFF_OPT : 0
>>> KM_OPT : 0
>>> DAMP_OPT : 3
>>> DAMPCOEF : 0.2
>>> KHDIF : 0
>>> KVDIF : 0
>>> SWRAD_SCAT : 1
>>> &nb sp; WEST-EAST_PATCH_START_UNSTAG : 1
>>> WEST-EAST_PATCH_END_UNSTAG : 399
>>> WEST-EAST_PATCH_START_STAG : 1
>>> WEST-EAST_PATCH_END_STAG : 400
>>> SOUTH-NORTH_PATCH_START_UNSTAG : 1
>>> SOUTH-NORTH_PATCH_END_UNSTAG : 199
>>> SOUTH-NORTH_PATCH_START_STAG : 1
>>> SOUTH-NORTH_PATCH_END_STAG : 200
>>> BOTTOM-TOP_PATCH_START_UNSTAG : 1
>>> BOTTOM-TOP_PATCH_END_UNSTAG : 40
>>> BOTTOM-TOP_PATCH_START_STAG : 1
>>> BOTTOM-TOP_PATCH_END_STAG : 41
>>> GRID_ID : 1
>>> PARENT_ID : 1
>>> I_PARENT_START : 1
>>> J_PARENT_START : 1
>>> PARENT_GRID_RATIO : 1
>>> DT : 300
>>> CEN_LAT : 0
>>> CEN_LON : 0
>>> TRUELAT1 : 1e+20
>>> TRUELAT2 : 1e+20
>>> MOAD_CEN_LAT : 0
>>> STAND_LON : 180
>>> POLE_LAT : 90
>>> POLE_LON : 0
>>> GMT : 0
>>> JULYR : 2009
>>> JULDAY : 24
>>> MAP_PROJ : 6
>>> MAP_PROJ_CHAR : Cylindrical Equidistant
>>> MMINLU : USGS
>>> NUM_LAND_CAT : 24
>>> ISWATER : 16
>>> ISLAKE : -1
>>> ISICE : 24
>>> ISURBAN : 1
>>> ISOILWATER : 14
>>>
>>> I think cylindrical equidistant map projection should be OK for those scripts, right?
>>> I've made no changes to the wrf_Cloud.ncl script, except for the input filename.
>>> My whole output file is large ~5GB. Is it appropriate to upload the data to your FTP?
>>>
>>> Thank you!
>>>
>>> Best,
>>> Eddy
>>>
>>>
>>>
>>>
>>>
>>> At 2013-09-16 10:26:48,"Mary Haley" <haley@ucar.edu> wrote:
>>> Hi Eddy,
>>>
>>> I don't know what the "gWRF_merc.ncl" file is.
>>>
>>> The wrf_Cloud.ncl and other scripts on that page depend on WRF ARW output files in order to work properly, and especially to have the correct map projectio n information.
>>>
>>> Did you look at your WRF ARW output file with "ncdump -c" or "ncl_filedump" to make sure it has valid map projection information via the file's global attributes?
>>>
>>> A typical WRF-ARW should have these kind of file attributes:
>>>
>>> . . .
>>> DX : 0.02
>>> DY : 0.02
>>> DT : 5
>>> CEN_LAT : 25
>>> CEN_LON : -75
>>> TRUELAT1 : 1e+20
>>> TRUELAT2 : 1e+20
>>> MOAD_CEN_LAT : 0
>>> STAND_LON : 1e+20
>>> MAP_PROJ : 203
>>>
>>> Did you make any kind of modifications to the wrf_Cloud.ncl script?
>>>
>>> If you are unable to solve the problem, it would help if you could provide the script and data via ftp. Please see:
>>>
>>> http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
>>>
>>> --Mary
>>>
>>>
>>> On Sep 15, 2013, at 5:20 PM, Eddy <eddycarl@126.com> wrote:
>>>
>>>> Hi there,
>>>>
>>>> I found I could not get the correct global lat-lon plot using the gWRF_merc.ncl (or other script, like wrf_Cloud.ncl at http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm). The same problem has been found before (however, without solving it), dated back to 2009 (http:// www.ncl.ucar.edu/Support/talk_archives/2009/1743.html), which shows only a thin vertical bar at 180 degree (longitude) instead of the global view.
>>>> I've tested using the simple script that Mary Haley suggested (http://www.ncl.ucar.edu/Support/talk_archives/2009/1751.html). The 1st frame shows the exact problem described above (see attached figure). The 2nd frame is fine, while the 3rd frame is very large and only part of the map is shown.
>>>> I've also tested the same code on regional simulation, which shows no problem. That's very strange. Could you please help on this?
>>>> P.S I used ncl version 6.1.2 and WRF v3.5 for a global simulation.
>>>>
>>>> Thanks,
>>>>
>>>> Best,
>>>> Eddy
>>>>
>>>>
>>>> <test-0.png>_______________________________________________
>>>> 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
>>
>>
>>
>> _______________________________________________
>> 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 Sep 16 19:07:22 2013

This archive was generated by hypermail 2.1.8 : Wed Sep 18 2013 - 17:07:30 MDT