[Dart-dev] [3705] DART/trunk/observations: The cloud wind converter from Ryan for the SSEC data

nancy at ucar.edu nancy at ucar.edu
Thu Dec 11 14:04:39 MST 2008


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20081211/d7991f6a/attachment.html
-------------- next part --------------
Added: DART/trunk/observations/SSEC/SSEC.html
===================================================================
--- DART/trunk/observations/SSEC/SSEC.html	                        (rev 0)
+++ DART/trunk/observations/SSEC/SSEC.html	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,125 @@
+<HTML>
+<HEAD>
+<TITLE>SSEC Data Center</TITLE>
+<link rel="stylesheet" type="text/css" href="../doc/html/doc.css"></link> 
+</HEAD>
+<BODY>
+<!--
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!                                                                       !!
+!!                   GNU General Public License                          !!
+!!                                                                       !!
+!! This file is part of the Data Assimilation Research Testbed (DART).   !!
+!!                                                                       !!
+!! DART is free software; you can redistribute it and/or modify          !!
+!! it and are expected to follow the terms of the GNU General Public     !!
+!! License as published by the Free Software Foundation.                 !!
+!!                                                                       !!
+!! DART is distributed in the hope that it will be useful,               !!
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of        !!
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         !!
+!! GNU General Public License for more details.                          !!
+!!                                                                       !!
+!! You should have received a copy of the GNU General Public License     !!
+!! along with DART; if not, write to:                                    !!
+!!          Free Software Foundation, Inc.                               !!
+!!          59 Temple Place, Suite 330                                   !!
+!!          Boston, MA  02111-1307  USA                                  !!
+!! or see:                                                               !!
+!!          http://www.gnu.org/licenses/gpl.txt                          !!
+!!                                                                       !!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+-->
+
+<DIV ALIGN=CENTER>
+<A HREF="#Overview">OVERVIEW</A> / 
+<A HREF="#DataSources">DATA SOURCES</A> / 
+<A HREF="#Programs">PROGRAMS</A> /
+<A HREF="#KnownBugs">KNOWN BUGS</A> /
+<A HREF="#FuturePlans">FUTURE PLANS</A> 
+</DIV>
+
+<!--==================================================================-->
+
+<H1>SSEC Data Center</H1>
+<A NAME="HEADER"></A>
+
+<!--==================================================================-->
+
+<A NAME="Overview"></A>
+<H2>OVERVIEW</H2>
+
+<P>
+The Space Science and Engineering Center (SSEC) at University of
+Wisconsin-Madision has an online 
+<A href="http://www.ssec.wisc.edu/data">data center</A> with both
+real-time and archival weather satellite data.
+</P>
+
+<P>The last 2 day's worth of data is available from
+<A href="ftp://cyclone.ssec.wisc.edu/pub/fnoc">
+ftp://cyclone.ssec.wisc.edu/pub/fnoc</A>.
+
+</P>
+
+<!--==================================================================-->
+
+<A NAME="DataSources"></A>
+<BR><HR><BR>
+<H2>DATA SOURCES</H2>
+
+<P>
+
+</P>
+
+<P>
+
+</P>
+
+<!--==================================================================-->
+
+<A NAME="Programs"></A>
+<BR><HR><BR>
+<H2>PROGRAMS</H2>
+
+<P>
+
+</P>
+
+<!--==================================================================-->
+<!-- Describe the bugs.                                               -->
+<!--==================================================================-->
+
+<A NAME="KnownBugs"></A>
+<BR><HR><BR>
+<H2>KNOWN BUGS</H2>
+<P>
+</P>
+
+<!--==================================================================-->
+<!-- Descibe Future Plans.                                            -->
+<!--==================================================================-->
+
+<A NAME="FuturePlans"></A>
+<BR><HR><BR>
+<H2>FUTURE PLANS</H2>
+<P>
+</P>
+
+<BR><HR><BR>
+
+<!--==================================================================-->
+<TABLE summary="">
+<TR><TD>Contact:       </TD><TD> nancy collins </TD></TR>
+<TR><TD>Revision:      </TD><TD> $Revision$ </TD></TR>
+<TR><TD>Source:        </TD><TD> $URL$ </TD></TR>
+<TR><TD>Change Date:   </TD><TD> $Date$ </TD></TR>
+<TR><TD>Change history:</TD><TD> try "svn log" or "svn diff" </TD></TR>
+</TABLE>
+<!--==================================================================-->
+
+<!--==================================================================-->
+
+<HR>
+</BODY>
+</HTML>


Property changes on: DART/trunk/observations/SSEC/SSEC.html
___________________________________________________________________
Name: svn:mime-type
   + text/html
Name: svn:keywords
   + Date Revision Author HeadURL Id

Added: DART/trunk/observations/SSEC/convert_ssec_clwnd.f90
===================================================================
--- DART/trunk/observations/SSEC/convert_ssec_clwnd.f90	                        (rev 0)
+++ DART/trunk/observations/SSEC/convert_ssec_clwnd.f90	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,201 @@
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+!   convert_ssec_clwnd - program that reads ASCII cloud wind data from 
+!                        CIMSS/SSEC and writes a genertic text file 
+!                        for use in creating obs_seq files.
+!
+!     created Dec. 2007 Ryan Torn, NCAR/MMM
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+program convert_ssec_clwnd
+
+use        types_mod, only : r8
+use    utilities_mod, only : get_unit
+use time_manager_mod, only : time_type, set_calendar_type, GREGORIAN, &
+                             increment_time, get_time, set_date, operator(-)
+use     location_mod, only : VERTISPRESSURE
+use obs_sequence_mod, only : obs_sequence_type, obs_type, read_obs_seq, &
+                             static_init_obs_sequence, init_obs, write_obs_seq, &
+                             append_obs_to_seq, init_obs_sequence, get_num_obs, &
+                             set_copy_meta_data, set_qc_meta_data
+use       meteor_mod, only : wind_dirspd_to_uv
+use ncep_obs_err_mod, only : ncep_cloud_wind_error, ncep_wv_wind_error
+use     obs_kind_mod, only : SAT_U_WIND_COMPONENT, SAT_V_WIND_COMPONENT
+use           netcdf
+
+implicit none
+
+character(len=15),  parameter :: ssec_cloud_file = 'clwnd_input.txt'
+character(len=129), parameter :: cloud_wind_file = 'obs_seq.clwnd'
+
+integer, parameter :: nmaxwnd = 50000,  &  ! maximum number of vectors
+                      num_copies = 1,   &  ! number of copies in sequence
+                      num_qc     = 1       ! number of QC entries
+
+character (len=129) :: meta_data
+character (len=80)  :: junk
+character (len=19)  :: datestr
+character (len=8)   :: datein
+character (len=6)   :: sat
+character (len=4)   :: band, hourin
+
+logical :: iruse, visuse, wvuse, swiruse, file_exist
+
+integer :: in_unit, i, days, secs, nused, iyear, imonth, iday, ihour, & 
+           imin, isec, dsec, dday, dsecobs
+real(r8) :: obs_window, lat, lon, pres, wdir, wspd, uwnd, vwnd, oerr, &
+            latu(nmaxwnd), lonu(nmaxwnd), prsu(nmaxwnd), qc
+
+type(obs_sequence_type) :: obs_seq
+type(obs_type)          :: obs
+type(time_type)         :: time_anal
+
+print*,'Enter the analysis time (yyyy-mm-dd_hh:mm:ss) and window (hours)'
+read*, datestr, obs_window
+print*,'Do you want to include IR, VISIBLE, WV data, and SW IR? (T/F, 4 times)'
+read*, iruse, visuse, wvuse, swiruse 
+dsecobs = nint(obs_window * 3600.0_r8)
+
+call set_calendar_type(GREGORIAN)
+read(datestr(1:4),   fmt='(i4)') iyear
+read(datestr(6:7),   fmt='(i2)') imonth
+read(datestr(9:10),  fmt='(i2)') iday
+read(datestr(12:13), fmt='(i2)') ihour
+read(datestr(15:16), fmt='(i2)') imin
+read(datestr(18:19), fmt='(i2)') isec
+time_anal = set_date(iyear, imonth, iday, ihour, imin, isec)
+call get_time(time_anal, secs, days)
+
+in_unit  = get_unit()
+open(unit=in_unit,  file = ssec_cloud_file,  status='old')
+read(in_unit,*) junk
+
+!  either read existing obs_seq or create a new one
+call static_init_obs_sequence()
+call init_obs(obs, num_copies, num_qc)
+inquire(file=cloud_wind_file, exist=file_exist)
+if ( file_exist ) then
+
+  call read_obs_seq(cloud_wind_file, 0, 0, 2*nmaxwnd, obs_seq)
+
+else
+
+  call init_obs_sequence(obs_seq, num_copies, num_qc, 2*nmaxwnd)
+  do i = 1, num_copies
+    meta_data = 'NCEP BUFR observation'
+    call set_copy_meta_data(obs_seq, i, meta_data)
+  end do
+  do i = 1, num_qc
+    meta_data = 'NCEP QC index'
+    call set_qc_meta_data(obs_seq, i, meta_data)
+  end do
+
+end if
+
+nused = 0
+obsloop: do
+
+  read(in_unit,*,END=200) band, sat, datein, hourin, lat, lon, pres, wspd, wdir
+
+  read(datein(1:4), fmt='(i4)') iyear
+  read(datein(5:6), fmt='(i2)') imonth
+  read(datein(7:8), fmt='(i2)') iday
+  read(hourin(1:2), fmt='(i2)') ihour
+  read(hourin(3:4), fmt='(i2)') imin
+  call get_time((time_anal-set_date(iyear, imonth, iday, ihour, imin, 0)), dsec, dday)
+  if ( (dsec + dday * 86400) > dsecobs ) cycle obsloop
+
+  !  check the satellite channel
+  if ( trim(adjustl(band))      == 'IR'   .and. (.not. iruse)   ) cycle obsloop
+  if ( trim(adjustl(band))      == 'SWIR' .and. (.not. swiruse) ) cycle obsloop
+  if ( trim(adjustl(band))      == 'VIS'  .and. (.not. visuse)  ) cycle obsloop
+  if ( trim(adjustl(band(1:2))) == 'WV'   .and. (.not. wvuse)   ) cycle obsloop
+  lon = -lon  ;  if ( lon < 0.0_r8 )  lon = lon + 360.0_r8
+
+  !  check to make sure this observation has not been used before
+  do i = 1, nused
+    if ( lon == lonu(i) .and. lat == latu(i) .and. pres == prsu(i) ) cycle obsloop
+  end do
+  qc = 1
+
+  if ( trim(adjustl(band(1:2))) == 'WV' ) then
+    oerr = ncep_wv_wind_error(pres)
+  else
+    oerr = ncep_cloud_wind_error(pres)
+  end if
+
+  call wind_dirspd_to_uv(wdir, wspd, uwnd, vwnd)
+
+  call create_obs_type(lat, lon, pres * 100.0_r8, VERTISPRESSURE, uwnd, &
+                       SAT_U_WIND_COMPONENT, oerr, days, secs, qc, obs)
+  call append_obs_to_seq(obs_seq, obs)
+  call create_obs_type(lat, lon, pres * 100.0_r8, VERTISPRESSURE, vwnd, &
+                       SAT_V_WIND_COMPONENT, oerr, days, secs, qc, obs)
+  call append_obs_to_seq(obs_seq, obs)
+
+  nused = nused + 1
+  latu(nused) = lat
+  lonu(nused) = lon
+  prsu(nused) = pres
+
+end do obsloop
+200 continue
+
+close( in_unit)
+
+if ( get_num_obs(obs_seq) > 0 )  call write_obs_seq(obs_seq, cloud_wind_file)
+
+stop
+end
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+!   create_obs_type - subroutine that is used to create an observation
+!                     type from observation data.
+!
+!    lat   - latitude of observation
+!    lon   - longitude of observation
+!    pres  - pressure of observation
+!    vcord - vertical coordinate
+!    obsv  - observation value
+!    okind - observation kind
+!    oerr  - observation error
+!    day   - gregorian day
+!    sec   - gregorian second
+!    qc    - quality control value
+!    obs   - observation type
+!
+!     created Oct. 2007 Ryan Torn, NCAR/MMM
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+subroutine create_obs_type(lat, lon, pres, vcord, obsv, okind, oerr, day, sec, qc, obs)
+
+use types_mod,        only : r8
+use obs_sequence_mod, only : obs_type, set_obs_values, set_qc, set_obs_def
+use obs_def_mod,      only : obs_def_type, set_obs_def_time, set_obs_def_kind, &
+                             set_obs_def_error_variance, set_obs_def_location
+use     location_mod, only : location_type, set_location
+use time_manager_mod, only : time_type, set_time
+
+implicit none
+
+integer, intent(in)           :: okind, vcord, day, sec
+real(r8), intent(in)          :: lat, lon, pres, obsv, oerr, qc
+type(obs_type), intent(inout) :: obs
+
+real(r8)              :: obs_val(1), qc_val(1)
+type(obs_def_type)    :: obs_def
+
+call set_obs_def_location(obs_def, set_location(lon, lat, pres, vcord))
+call set_obs_def_kind(obs_def, okind)
+call set_obs_def_time(obs_def, set_time(sec, day))
+call set_obs_def_error_variance(obs_def, oerr * oerr)
+call set_obs_def(obs, obs_def)
+
+obs_val(1) = obsv
+call set_obs_values(obs, obs_val)
+qc_val(1)  = qc
+call set_qc(obs, qc_val)
+
+return
+end subroutine create_obs_type


Property changes on: DART/trunk/observations/SSEC/convert_ssec_clwnd.f90
___________________________________________________________________
Name: svn:keywords
   + Date Revision Author HeadURL Id

Added: DART/trunk/observations/SSEC/data/2005082600_clwnd.txt.gz
===================================================================
(Binary files differ)


Property changes on: DART/trunk/observations/SSEC/data/2005082600_clwnd.txt.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: DART/trunk/observations/SSEC/data/README
===================================================================
--- DART/trunk/observations/SSEC/data/README	                        (rev 0)
+++ DART/trunk/observations/SSEC/data/README	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,5 @@
+Unzip the data file.  Link or rename it
+to clwnd_input.txt in the work directory, 
+and run the convert program with tdata.in 
+as input.  It will create a DART obs sequence
+file called obs_seq.clwnd.

Added: DART/trunk/observations/SSEC/data/tdata.in
===================================================================
--- DART/trunk/observations/SSEC/data/tdata.in	                        (rev 0)
+++ DART/trunk/observations/SSEC/data/tdata.in	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,2 @@
+2005-08-25_22:45:00 6
+T T T T

Added: DART/trunk/observations/SSEC/work/input.nml
===================================================================
--- DART/trunk/observations/SSEC/work/input.nml	                        (rev 0)
+++ DART/trunk/observations/SSEC/work/input.nml	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,22 @@
+
+&preprocess_nml
+    input_obs_kind_mod_file = '../../../obs_kind/DEFAULT_obs_kind_mod.F90',
+   output_obs_kind_mod_file = '../../../obs_kind/obs_kind_mod.f90',
+     input_obs_def_mod_file = '../../../obs_def/DEFAULT_obs_def_mod.F90',
+    output_obs_def_mod_file = '../../../obs_def/obs_def_mod.f90',
+   input_files              = '../../../obs_def/obs_def_altimeter_mod.f90',
+                              '../../../obs_def/obs_def_reanalysis_bufr_mod.f90',
+ /
+
+&obs_kind_nml
+ /
+
+&location_nml
+ /
+
+&utilities_nml
+ /
+
+&obs_sequence_nml
+   write_binary_obs_sequence = .false.  /
+


Property changes on: DART/trunk/observations/SSEC/work/input.nml
___________________________________________________________________
Name: svn:mime-type
   + text/text
Name: svn:keywords
   + Date Revision Author HeadURL Id

Added: DART/trunk/observations/SSEC/work/mkmf_convert_ssec_clwnd
===================================================================
--- DART/trunk/observations/SSEC/work/mkmf_convert_ssec_clwnd	                        (rev 0)
+++ DART/trunk/observations/SSEC/work/mkmf_convert_ssec_clwnd	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,15 @@
+#!/bin/csh
+#
+# Data Assimilation Research Testbed -- DART
+# Copyright 2004-2007, Data Assimilation Research Section
+# University Corporation for Atmospheric Research
+# Licensed under the GPL -- www.gpl.org/licenses/gpl.html
+#
+# <next few lines under version control, do not edit>
+# $URL: http://subversion.ucar.edu/DAReS/DART/branches/nancy_work/models/wrf/work/mkmf_preprocess $
+# $Id: mkmf_preprocess 2691 2007-03-11 18:18:09Z thoar $
+# $Revision: 2691 $
+# $Date: 2007-03-11 12:18:09 -0600 (Sun, 11 Mar 2007) $
+#
+../../../mkmf/mkmf -p convert_ssec_clwnd -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_convert_ssec_clwnd


Property changes on: DART/trunk/observations/SSEC/work/mkmf_convert_ssec_clwnd
___________________________________________________________________
Name: svn:executable
   + *

Added: DART/trunk/observations/SSEC/work/mkmf_preprocess
===================================================================
--- DART/trunk/observations/SSEC/work/mkmf_preprocess	                        (rev 0)
+++ DART/trunk/observations/SSEC/work/mkmf_preprocess	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,15 @@
+#!/bin/csh
+#
+# Data Assimilation Research Testbed -- DART
+# Copyright 2004-2007, Data Assimilation Research Section
+# University Corporation for Atmospheric Research
+# Licensed under the GPL -- www.gpl.org/licenses/gpl.html
+#
+# <next few lines under version control, do not edit>
+# $URL: http://subversion.ucar.edu/DAReS/DART/branches/nancy_work/models/wrf/work/mkmf_preprocess $
+# $Id: mkmf_preprocess 2691 2007-03-11 18:18:09Z thoar $
+# $Revision: 2691 $
+# $Date: 2007-03-11 12:18:09 -0600 (Sun, 11 Mar 2007) $
+#
+../../../mkmf/mkmf -p preprocess -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_preprocess


Property changes on: DART/trunk/observations/SSEC/work/mkmf_preprocess
___________________________________________________________________
Name: svn:executable
   + *

Added: DART/trunk/observations/SSEC/work/path_names_convert_ssec_clwnd
===================================================================
--- DART/trunk/observations/SSEC/work/path_names_convert_ssec_clwnd	                        (rev 0)
+++ DART/trunk/observations/SSEC/work/path_names_convert_ssec_clwnd	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,15 @@
+observations/SSEC/convert_ssec_clwnd.f90
+observations/MADIS/ncep_obs_err_mod.f90
+observations/MADIS/meteor_mod.f90
+location/threed_sphere/location_mod.f90
+obs_sequence/obs_sequence_mod.f90
+obs_kind/obs_kind_mod.f90
+obs_def/obs_def_mod.f90
+assim_model/assim_model_mod.f90
+models/template/model_mod.f90
+common/types_mod.f90
+random_seq/random_seq_mod.f90
+random_nr/random_nr_mod.f90
+utilities/utilities_mod.f90
+time_manager/time_manager_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90

Added: DART/trunk/observations/SSEC/work/path_names_preprocess
===================================================================
--- DART/trunk/observations/SSEC/work/path_names_preprocess	                        (rev 0)
+++ DART/trunk/observations/SSEC/work/path_names_preprocess	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,5 @@
+preprocess/preprocess.f90
+common/types_mod.f90
+utilities/utilities_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+time_manager/time_manager_mod.f90

Added: DART/trunk/observations/SSEC/work/quickbuild.csh
===================================================================
--- DART/trunk/observations/SSEC/work/quickbuild.csh	                        (rev 0)
+++ DART/trunk/observations/SSEC/work/quickbuild.csh	2008-12-11 21:04:38 UTC (rev 3705)
@@ -0,0 +1,68 @@
+#!/bin/csh
+#
+# Data Assimilation Research Testbed -- DART
+# Copyright 2004-2007, Data Assimilation Research Section
+# University Corporation for Atmospheric Research
+# Licensed under the GPL -- www.gpl.org/licenses/gpl.html
+#
+# <next few lines under version control, do not edit>
+# $URL$
+# $Id$
+# $Revision$
+# $Date$
+
+# compile all converter programs
+
+#----------------------------------------------------------------------
+# 'preprocess' is a program that culls the appropriate sections of the
+# observation module for the observations types in 'input.nml'; the 
+# resulting source file is used by all the remaining programs, 
+# so this MUST be run first.
+#----------------------------------------------------------------------
+
+\rm -f preprocess *.o *.mod
+\rm -f ../../../obs_def/obs_def_mod.f90
+\rm -f ../../../obs_kind/obs_kind_mod.f90
+
+set MODEL = "SSEC converters"
+
+@ n = 1
+
+echo
+echo
+echo "---------------------------------------------------------------"
+echo "${MODEL} build number ${n} is preprocess"
+
+csh  mkmf_preprocess
+make || exit $n
+
+./preprocess || exit 99
+
+#----------------------------------------------------------------------
+# Build all the single-threaded targets
+#----------------------------------------------------------------------
+
+foreach TARGET ( mkmf_* )
+
+   set PROG = `echo $TARGET | sed -e 's#mkmf_##'`
+
+   switch ( $TARGET )
+   case mkmf_preprocess:
+      breaksw
+   default:
+      @ n = $n + 1
+      echo
+      echo "---------------------------------------------------"
+      echo "${MODEL} build number ${n} is ${PROG}" 
+      \rm -f ${PROG}
+      csh $TARGET || exit $n
+      make        || exit $n
+      breaksw
+   endsw
+end
+
+\rm -f *.o *.mod
+
+echo "Success: All ${MODEL} programs compiled."  
+
+


Property changes on: DART/trunk/observations/SSEC/work/quickbuild.csh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Date Revision Author HeadURL Id


More information about the Dart-dev mailing list