[Dart-dev] [3876] DART/trunk: incorporated comments from WRF/DART presentation
nancy at ucar.edu
nancy at ucar.edu
Fri May 15 09:31:43 MDT 2009
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090515/d7fe76ee/attachment.html
-------------- next part --------------
Modified: DART/trunk/diagnostics/threed_sphere/obs_seq_to_netcdf.f90
===================================================================
--- DART/trunk/diagnostics/threed_sphere/obs_seq_to_netcdf.f90 2009-05-15 14:23:35 UTC (rev 3875)
+++ DART/trunk/diagnostics/threed_sphere/obs_seq_to_netcdf.f90 2009-05-15 15:31:42 UTC (rev 3876)
@@ -31,6 +31,7 @@
use location_mod, only : location_type, get_location, set_location_missing, &
write_location, operator(/=), operator(==), &
set_location, is_location_in_region, VERTISUNDEF, &
+ VERTISSURFACE, VERTISLEVEL, VERTISPRESSURE, VERTISHEIGHT, &
query_location
use time_manager_mod, only : time_type, set_date, set_time, get_time, print_time, &
set_calendar_type, get_calendar_string, print_date, &
@@ -770,7 +771,17 @@
dimids=(/ ObsNumDimID /), varid=VarID), &
'InitNetCDF', 'which_vert:def_var')
call nc_check(nf90_put_att(ncid, VarID, 'long_name', 'vertical coordinate system code'), &
- 'InitNetCDF', 'which_vert:long_name')
+ 'InitNetCDF', 'which_vert:long_name')
+call nc_check(nf90_put_att(ncid, VarID, 'VERTISUNDEF', VERTISUNDEF), &
+ 'InitNetCDF', 'which_vert:VERTISUNDEF')
+call nc_check(nf90_put_att(ncid, VarID, 'VERTISSURFACE', VERTISSURFACE), &
+ 'InitNetCDF', 'which_vert:VERTISSURFACE')
+call nc_check(nf90_put_att(ncid, VarID, 'VERTISLEVEL', VERTISLEVEL), &
+ 'InitNetCDF', 'which_vert:VERTISLEVEL')
+call nc_check(nf90_put_att(ncid, VarID, 'VERTISPRESSURE', VERTISPRESSURE), &
+ 'InitNetCDF', 'which_vert:VERTISPRESSURE')
+call nc_check(nf90_put_att(ncid, VarID, 'VERTISHEIGHT', VERTISHEIGHT), &
+ 'InitNetCDF', 'which_vert:VERTISHEIGHT')
! Define the observation locations
Modified: DART/trunk/diagnostics/threed_sphere/obs_seq_to_netcdf.html
===================================================================
--- DART/trunk/diagnostics/threed_sphere/obs_seq_to_netcdf.html 2009-05-15 14:23:35 UTC (rev 3875)
+++ DART/trunk/diagnostics/threed_sphere/obs_seq_to_netcdf.html 2009-05-15 15:31:42 UTC (rev 3876)
@@ -308,9 +308,76 @@
<!-- type --><TD valign=top> logical </TD>
<!--descript--><TD>Prints the assimilation schedule.<BR>
Default: .false. </TD></TR>
-
</TABLE>
+<H3 class="indent1">Example</H3>
+<P>The following example illustrates the fact the <em class="code">last_bin_end</em>
+does not have to be a 'perfect' bin end - and it gives you an idea of an
+assimilation schedule table. Note that the user input defines the last bin to
+end at 09 Z, but the last bin in the table ends at 06 Z.
+<br />
+<br />
+<div class="routine">
+<pre>
+&schedule_nml
+ calendar = 'Gregorian',
+ first_bin_start = 2006, 8, 1, 0, 0, 0 ,
+ first_bin_end = 2006, 8, 1, 6, 0, 0 ,
+ last_bin_end = 2006, 8, 2, 9, 0, 0 ,
+ bin_interval_days = 0,
+ bin_interval_seconds = 21600,
+ max_num_bins = 1000,
+ print_table = .true.
+ /
+</pre>
+</div>
+<br />
+This is the 'table' part of the run-time output:
+<br />
+<br />
+<div class="unix">
+<pre>
+Requesting 5 assimilation periods.
+
+epoch 1 start day=148135, sec=1
+epoch 1 end day=148135, sec=21600
+epoch 1 start 2006 Aug 01 00:00:01
+epoch 1 end 2006 Aug 01 06:00:00
+
+epoch 2 start day=148135, sec=21601
+epoch 2 end day=148135, sec=43200
+epoch 2 start 2006 Aug 01 06:00:01
+epoch 2 end 2006 Aug 01 12:00:00
+
+epoch 3 start day=148135, sec=43201
+epoch 3 end day=148135, sec=64800
+epoch 3 start 2006 Aug 01 12:00:01
+epoch 3 end 2006 Aug 01 18:00:00
+
+epoch 4 start day=148135, sec=64801
+epoch 4 end day=148136, sec=0
+epoch 4 start 2006 Aug 01 18:00:01
+epoch 4 end 2006 Aug 02 00:00:00
+
+epoch 5 start day=148136, sec=1
+epoch 5 end day=148136, sec=21600
+epoch 5 start 2006 Aug 02 00:00:01
+epoch 5 end 2006 Aug 02 06:00:00
+</pre>
+</div>
+<br />
+Notice that the leading edge of an assimilation window/bin/epoch/period
+is actually 1 second <strong>after</strong> the specified start time.
+This is consistent with the way DART has always worked. If you specify
+assimilation windows that fully occupy the temporal continuum,
+there has to be some decision at the edges. An observation precisely
+ON the edge should only participate in one assimilation window.
+Historically, DART has always taken observations
+precisely on an edge to be part of the subsequent assimilation cycle.
+The smallest amount of time representable to DART is 1 second, so the
+smallest possible delta is added to one of the assimilation edges.
+</P>
+
<!--==================================================================-->
<!-- Describe the Files Used by this module. -->
<!--==================================================================-->
@@ -341,6 +408,8 @@
the bias between 'observation' and 'prior ensemble mean', for example.
Again, more on that in the 'Usage' section below.
</LI>
+ <LI><em class="file">observations/utilities/read_obs_netcdf.m</em> will
+ be coming soon to a repository near you. </LI>
</UL>
<H3 class="indent1">Discussion of obs_sequence_xxx.nc structure</H3>
@@ -472,8 +541,12 @@
<H3 class="indent1">obs_seq_to_netcdf</H3>
<P>
<em class="program">obs_seq_to_netcdf</em> is built and run in
-...<em class="file">/DART/models/</em>your_model<em class="file">/work</em>,
-in the same way as the other DART components. After the program has been run,
+<em class="file">/DART/observations/utilities/threed_sphere</em>
+in the same way as the other DART components. That directory is
+intentionally designed to hold components that are model-insensitive.
+Essentially, we avoid having to populate every <em class="file">model</em>
+directory with identical <em class="file">mkmf_obs_seq_to_netcdf</em> and
+<em class="file">path_names_obs_seq_to_netcdf</em> files. After the program has been run,
<em class="file">/DART/observations/utilities/threed_sphere/</em><em
class="program">plot_obs_netcdf.m</em> can be run to plot the observations.
The only thing that is tricky is the fact that the table of known
@@ -481,6 +554,121 @@
contents of the netCDF file. As a consequence, a dump of <em
class="code">ObsObsTypesMetaData</em> might lead you to try to plot
observation types that do not exist in the file. Stay tuned.
+<br />
+<H4 class="indent1">example</H4>
+<div class="routine">
+<pre>
+&schedule_nml
+ calendar = 'Gregorian',
+ first_bin_start = 2006, 8, 1, 3, 0, 0 ,
+ first_bin_end = 2006, 8, 1, 9, 0, 0 ,
+ last_bin_end = 2006, 8, 3, 3, 0, 0 ,
+ bin_interval_days = 0,
+ bin_interval_seconds = 21600,
+ max_num_bins = 1000,
+ print_table = .true.
+ /
+
+&obs_seq_to_netcdf_nml
+ obs_sequence_name = '/users/thoar/temp/obs_0001/obs_seq.final'
+ lonlim1 = 0.0,
+ lonlim2 = 360.0,
+ latlim1 = -80.0,
+ latlim2 = 80.0,
+ verbose = .false.
+ /
+</pre>
+</div>
+<br />
+<br />
+Here is the pruned run-time output. Note that multiple input observation
+sequence files are queried and the routine ends (in this case) when the
+first observation time in a file is beyond the last time of interest.
+<br />
+<br />
+<div class="unix">
+<pre>
+ --------------------------------------
+ Starting ... at YYYY MM DD HH MM SS =
+ 2009 5 15 9 0 23
+ Program obs_seq_to_netcdf
+ --------------------------------------
+
+ Requesting 8 assimilation periods.
+
+epoch 1 start day=148135, sec=10801
+epoch 1 end day=148135, sec=32400
+epoch 1 start 2006 Aug 01 03:00:01
+epoch 1 end 2006 Aug 01 09:00:00
+
+epoch 2 start day=148135, sec=32401
+epoch 2 end day=148135, sec=54000
+epoch 2 start 2006 Aug 01 09:00:01
+epoch 2 end 2006 Aug 01 15:00:00
+
+epoch 3 start day=148135, sec=54001
+epoch 3 end day=148135, sec=75600
+epoch 3 start 2006 Aug 01 15:00:01
+epoch 3 end 2006 Aug 01 21:00:00
+
+epoch 4 start day=148135, sec=75601
+epoch 4 end day=148136, sec=10800
+epoch 4 start 2006 Aug 01 21:00:01
+epoch 4 end 2006 Aug 02 03:00:00
+
+epoch 5 start day=148136, sec=10801
+epoch 5 end day=148136, sec=32400
+epoch 5 start 2006 Aug 02 03:00:01
+epoch 5 end 2006 Aug 02 09:00:00
+
+epoch 6 start day=148136, sec=32401
+epoch 6 end day=148136, sec=54000
+epoch 6 start 2006 Aug 02 09:00:01
+epoch 6 end 2006 Aug 02 15:00:00
+
+epoch 7 start day=148136, sec=54001
+epoch 7 end day=148136, sec=75600
+epoch 7 start 2006 Aug 02 15:00:01
+epoch 7 end 2006 Aug 02 21:00:00
+
+epoch 8 start day=148136, sec=75601
+epoch 8 end day=148137, sec=10800
+epoch 8 start 2006 Aug 02 21:00:01
+epoch 8 end 2006 Aug 03 03:00:00
+
+ obs_seq_to_netcdf opening /users/thoar/temp/obs_0001/obs_seq.final
+
+ num_obs_in_epoch ( 1 ) = 103223
+ InitNetCDF obs_sequence_001.nc is fortran unit 5
+ num_obs_in_epoch ( 2 ) = 186523
+ InitNetCDF obs_sequence_002.nc is fortran unit 5
+ num_obs_in_epoch ( 3 ) = 110395
+ InitNetCDF obs_sequence_003.nc is fortran unit 5
+ num_obs_in_epoch ( 4 ) = 191957
+ InitNetCDF obs_sequence_004.nc is fortran unit 5
+
+ obs_seq_to_netcdf opening /users/thoar/temp/obs_0002/obs_seq.final
+
+ num_obs_in_epoch ( 5 ) = 90683
+ InitNetCDF obs_sequence_005.nc is fortran unit 5
+ num_obs_in_epoch ( 6 ) = 186316
+ InitNetCDF obs_sequence_006.nc is fortran unit 5
+ num_obs_in_epoch ( 7 ) = 109465
+ InitNetCDF obs_sequence_007.nc is fortran unit 5
+ num_obs_in_epoch ( 8 ) = 197441
+ InitNetCDF obs_sequence_008.nc is fortran unit 5
+
+ obs_seq_to_netcdf opening /users/thoar/temp/obs_0003/obs_seq.final
+
+ --------------------------------------
+ Finished ... at YYYY MM DD HH MM SS =
+ 2009 5 15 9 2 56
+ $URL$
+ $Revision$
+ $Date$
+ --------------------------------------
+</pre>
+</div>
<P/>
<H3 class="indent1">Matlab helper functions</H3>
@@ -542,7 +730,6 @@
N = 6717 ACARS_TEMPERATURE obs (type 12) between levels 17870.00 and 76680.00
N = 20713 SAT_U_WIND_COMPONENT obs (type 22) between levels 10050.00 and 99440.00
N = 20713 SAT_V_WIND_COMPONENT obs (type 23) between levels 10050.00 and 99440.00
-N = 20713 SAT_V_WIND_COMPONENT obs (type 23) between levels 10050.00 and 99440.00
N = 723 GPSRO_REFRACTIVITY obs (type 46) between levels 220.00 and 12000.00
NCEP BUFR observation is copy 1
DART quality control is copy 2
@@ -553,7 +740,12 @@
<br />
you get the plots at the top of this document. If you have a relatively
new version of Matlab, you can dynamically rotate the 3D view ...
-coooool. The vertical levels are reported so you can restrict the area
+coooool. Even spiffier, if you click on the observations (try the BAD
+observations), Matlab reports the lat/lon/level of these observations.
+At least R2008b does, I haven't tried it with all the other variants.
+<br />
+<br />
+The vertical levels are reported so you can restrict the area
of interest with the 'region' variable [minlon maxlon minlat maxlat
minlevel maxlevel]. Only the observations with a QC value less than or
equal to 'maxQC' are plotted in 'Figure 1'. Note the values of 'QCString'
@@ -567,7 +759,9 @@
</div>
<br />
And if you act today, we'll throw in a structure containing the selected
-data AT NO EXTRA CHARGE:
+data AT NO EXTRA CHARGE. Ryan has requested the obvious ... a function
+to simply return the observations without plotting. I'm working on it.
+I am embarrassed I didn't start with that.
<br />
<br />
<div class="unix">
Modified: DART/trunk/doc/images/plot_obs_netcdf_fig1.png
===================================================================
(Binary files differ)
Modified: DART/trunk/doc/images/plot_obs_netcdf_fig2.png
===================================================================
(Binary files differ)
More information about the Dart-dev
mailing list