[ncl-talk] DSSAT input preparation from WRF output

jagan TNAU jagan at tnau.ac.in
Sun Apr 19 11:14:58 MDT 2015


Dear Raja,

As suggested by Mary try reading the variables required by DSSAT either
using NCL or Python and write each of the variable in ascii format for the
respective grid. Then write separate DSSAT weather files for each grid
using fortran programmes, shell script or any other language you are
familiar. We can correspond about use in DSSAT personally

On Sun, Apr 19, 2015 at 12:21 AM, Mary Haley <haley at ucar.edu> wrote:

> I don't know anything about the DSSAT format, but to see how to read WRF
> variables, visit the NCL/WRF pages:
>
> http://www.ncl.ucar.edu/Applications/wrf.shtml
>
> Any one of these links shows various ways for reading data from a WRF
> file.
>
> As a quick example, you can either read a variable directly:
>
> a     = addfile("wrfout_xxxxx.nc","r")
> rainc = a->RAINC
>
> "rainc" will contain all the data and the metadata.
>
> or you can use the "wrf_user_getvar" function, which calculates specific
> diagnostics by reading required WRF variables and doing the specified
> calculation.
>
> http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml
>
> If you want to stay in the Python world, then you can use PyNIO to read a
> WRF output variable.  The syntax is different than NCL:
>
> import Nio as nio
> a     = nio.open_file("wrfout_xxxx.nc")
> rainc = a.variables['RAINC']      # this is a NioVariable with
> metadataT[:] to access values
> # rainc = a.variables['RAINC'][:]  # this is a numpy array with the
> actual values.
>
> You can learn more about PyNIO at http://www.pyngl.ucar.edu/Nio.shtml
>
> There may be some WRF PyNIO/PyNGL examples at:
> http://www.pyngl.ucar.edu/gallery.shtml
> <http://www.pyngl.ucar.edu/Nio.shtml>
> I can't check at the moment because the NCAR websites are down due to
> semi-annual maintenance.
>
> --Mary
>
>
> On Mon, Apr 13, 2015 at 5:15 AM, Raja Sivaranjan <
> rajasivaranjan92 at gmail.com> wrote:
>
>> Dear all,
>>
>> I need to prepare weather file for DSSAT model from wrf output. Rainfall,
>> Min and Max temperature, solar radiation and weed speed are variable i need
>> to extract. I'm using python for handling netcdf file which very difficult
>> to work with big file. I did some coding to convert wrf output to DSSAT
>> weather file format. Now i want to learn NCL, since it is more powerful to
>> work with nc files.
>>
>> Below are the things i need to do in NCL:
>>
>> 1. Extract variables such as  Rainfall, Min and Max Temperature, solar
>> radiation and weed speed for required time
>> 2. Write the extracted variable in DSSAT format.
>>
>> Things i have done in python:
>>
>> 1. convert wrfnc to excel
>> 2. excel to Dssat format.
>>
>> Can anyone help me out in this.
>>
>>
>>
>> _______________________________________________
>> 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
>
>


-- 
With regards

Dr.R.Jagannathan
Professor of Agronomy
Agro Climate Research Centre
Tamil Nadu Agricultural University
Coimbatore - 641 003 India

PHONE:  Mob: +91 94438 89891

DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US ALL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150419/c7469351/attachment.html 


More information about the ncl-talk mailing list