[ncl-talk] writing a WPS intermediate file from netcdf
Deniz Bozkurt
bozkurtd at itu.edu.tr
Mon Aug 6 14:06:08 MDT 2018
Hi,
I have progressed on this issue using byte2flt function, but now I am stuck with the projection and/or something regarding map information.
I have a reference WPS (XICE) file containing this metadata:
(0) Field #1
(0) name : 'XICE'
(0) description : 'Bootstrap sea ice, daily'
(0) units : 'fraction'
(0) min/max value : 0 / 1
(0) date : '2010-01-01_00:00:00'
(0) map source : 'NSIDC'
(0) version : 5
(0) forecast hour : 0
(0) level : 200100
(0) ny x nx : 332 x 316
(0) projection : 5
(0) startlat : -41.45
(0) startlon : 225
(0) dy x dx : 25 x 25
(0) center lon : 0
(0) truelat1 : -70
(0) earth_radius : 6378.27
(0) There were 1 fields in the XICE:2010-01-01_00 WPS file.
Now, based on this information I am trying to convert a netcdf file to the WPS intermediate format, script is attached. But somehow I am missing something regarding projection/map info because the map of WPS data (SEAICE) converted from netcdf file does not match with the reference WPS file (XICE) (attached).
I put the data in ftp: Reference WPS file is "XICE:2010-01-01_00" and netcdf file "seaice_conc_daily_sh_f17_20100101_v03r01.nc <http://seaice_conc_daily_sh_f17_20100101_v03r01.nc/>”. NCL version is 6.4.0.
Can anyone help me what I am missing?
Thanks,
--
Deniz Bozkurt, PhD
Postdoctoral Researcher
Center for Climate and Resilience Research (CR2) <www.cr2.cl <http://www.cr2.cl/>>
Department of Geophysics, University of Chile
Blanco Encalada 2002, Santiago, Chile
Mobil: +56 (9) 56107310
https://sites.google.com/site/deniboz <https://sites.google.com/site/deniboz/>
> On Jul 27, 2018, at 11:46 AM, Deniz Bozkurt <bozkurtd at itu.edu.tr> wrote:
>
> Dear All,
>
> I think this is more WRF related issue but in any case I am writing to both group.
>
> I have downloaded sea-ice data from NOAA/NSIDC in netcdf format from this page:
>
> http://nsidc.org/data/G02202 <http://nsidc.org/data/G02202>
>
> I am trying to convert and write this data to a WPS intermediate file format so that I can produce required met files for WRF simulation. I am following the steps described in NCL functions page:
>
> https://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_wps_write_int.shtml <https://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_wps_write_int.shtml>
>
> and my script is given at the end of this email. Everything seems to work fine and WPS intermediate file for sea-ice is produced with logical values however all sea-ice values in the final met_em files are 0. My question is has anyone successfully tried to convert one of these data set to WPS intermediate file, and then produced met_em files properly?
>
> I would be grateful if someone could help me address my problem.
>
> Thanks in advance,
> Deniz
>
> --
> Deniz Bozkurt, PhD
> Postdoctoral Researcher
> Center for Climate and Resilience Research (CR2) <www.cr2.cl <http://www.cr2.cl/>>
> Department of Geophysics, University of Chile
> Blanco Encalada 2002, Santiago, Chile
>
> Mobil: +56 (9) 56107310
> https://sites.google.com/site/deniboz <https://sites.google.com/site/deniboz>
>
>
>
>
> f=addfile("seaice_conc_daily_sh_n07_19810103_v03r01.nc <http://seaice_conc_daily_sh_n07_19810103_v03r01.nc/>","r")
> dd=f->goddard_bt_seaice_conc
> printVarSummary(dd)
> latd = f->latitude
> lond = f->longitude
> printVarSummary(lond)
> FIELD_T = "SEAICE"
> UNITS_T = "%"
> DESC_T = "Sea Ice Fraction"
> DATE = "1981-01-03"
> WPS_IM_root_name = "SEAICE"
>
> output_file_name = WPS_IM_root_name + ":" + DATE
> earth_radius = 6367.470
>
>
> opt = True
> opt at level = (/200100/)
> opt at projection = 0
> opt at date = DATE
> opt at map_source = "NSIDC"
> opt at startloc = "SWCORNER" ; 8 chars exact
> opt at startlon = lond(0,0);0
> opt at startlat = latd(0,0);90
> opt at deltalon = lond(0,1)-latd(0,0);0.25
> opt at deltalat = latd(1,0)-lond(0,0);-0.25
> opt at is_wind_earth_relative = False
>
> wrf_wps_write_int(WPS_IM_root_name,FIELD_T,UNITS_T,DESC_T,dd(0,:,:),opt)
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seaice_ref.png
Type: image/png
Size: 31674 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seaice_wps.png
Type: image/png
Size: 34374 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment-0001.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WPS_TEST_FINAL.ncl
Type: application/octet-stream
Size: 3733 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180806/f707af2d/attachment-0003.html>
More information about the ncl-talk
mailing list