Re: wrf global plot problem with gWRF_merc.ncl

From: Eddy <eddycarl_at_nyahnyahspammersnyahnyah>
Date: Sun Sep 15 2013 - 23:43:13 MDT

Hi Mary,

I've followed your instruction 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:

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
Received on Sun Sep 15 23:43:31 2013

This archive was generated by hypermail 2.1.8 : Mon Sep 16 2013 - 13:43:52 MDT