[Dart-dev] DART/branches Revision: 10862

dart at ucar.edu dart at ucar.edu
Tue Jan 3 16:04:33 MST 2017


raeder at ucar.edu
2017-01-03 16:04:30 -0700 (Tue, 03 Jan 2017)
2595
This is the second iteration of an interface between cesm1_5 and RMA DART.
Helen Kershaw did the first, quick and simple, iteration while developing RMA.
This version continues with the specialization of model_mod for a particular
CAM dynamical core; finite volume in this case.  This is apparent in the new
models/cam... directory structure.  This new model is cam-fv.  Later there
will be cam-se (spectral element), and more for any other needed dynamical
cores (and other components of CESM?).

Within each new model directory will be a series of scripts directories,
one for each version of CESM to which there is an interface.
These are named scripts_cesm#_#...
Within these directories are the familiar setup and run scripts,
but renamed to omit 'CESM' from their names.
In summary:
 /models/cam-fv/
     scripts_cesm1_5/
        setup_hybrid
        setup_advanced
        DART_config
        assimilate.csh
        ...
     scripts_cesm2_0/
        setup_hybrid
        setup_advanced
        DART_config
        assimilate.csh
        ...
The main remaining variable characteristics of building a CAM,
besides dycore and CESM setup environment, are horizontal resolution
and CAM flavor (4.0, 5.5, and/or WACCM, CAM-Chem, ...), which determine
vertical resolution and affect the choice of variables in the DART
state vector.   All those remaining options will be handled in
EVERY models/cam-$dycore/scripts_$cesm/  set of scripts.

In addition to the change toward dycore-focused model_mods (and scripts),
this interface also adapts to DART2.0's adoption of fixed input/output
file names, and a larger number of them.  These files are now uniformly put
into the CESM file naming format by assimilate.csh.  This is handled by using
the DART fixed file names as new CESM 'file types'.  Existing file types
are .i.(initial), .r.(restart), ...  New types consist of a stage name
and a data type, e.g. preassim_priorinf_mean.

This 2nd iteration has been tested for 4 cycles with a 3 member ensemble,
starting from an existing ensemble.  Inflation was started from input.nml
values to begin with, and then the inflation restart files were used.
Innovations and inflation values look reasonable, so assimilation setup
and file motion seems to be correct.

The perfect_model directory has not been added, since it has not been
updated yet.  Same for scripts_cesm1_5/setup_advanced.

CESM's st_archive has not been updated (either DART or in CESM) to handle
the new file types yet.
Most of the cam-fv/files have not been updated.  The focus is on scripts
and committing a usable model_mod.f90.




Added: DART/branches/rma_fixed_filenames/models/cam-fv/column_rand.f90
===================================================================
--- DART/branches/rma_fixed_filenames/models/cam-fv/column_rand.f90	                        (rev 0)
+++ DART/branches/rma_fixed_filenames/models/cam-fv/column_rand.f90	2017-01-03 23:04:30 UTC (rev 10862)
@@ -0,0 +1,161 @@
+! DART software - Copyright 2004 - 2013 UCAR. This open source software is
+! provided by UCAR, "as is", without charge, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+!
+! $Id$
+
+program column_rand
+
+! Allows creation of input file for generating a set of randomly located
+! observation stations with full column of obs for CAM model. 
+
+use      types_mod, only : r8, PI
+use  utilities_mod, only : get_unit, initialize_utilities, finalize_utilities
+use random_seq_mod, only : random_seq_type, init_random_seq, random_uniform
+
+implicit none
+
+! version controlled file description for error handling, do not edit
+character(len=256), parameter :: source   = &
+   "$URL$"
+character(len=32 ), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate  = "$Date$"
+
+integer, allocatable :: levels(:)
+integer  :: level, num_cols, num_levs, i, iunit
+real(r8) :: lat, lon, t_err_var, uv_err_var, ps_err_var, q_err_var
+type(random_seq_type) :: r
+
+! Initialize the utilities
+call initialize_utilities('Column_rand')
+
+! Initialize the random sequence
+call init_random_seq(r)
+
+! Open an output file and write header info
+iunit = get_unit()
+open(unit = iunit, file = 'cam_column_rand.out')
+
+write(*, *) 'input the number of columns per set'
+read(*, *) num_cols
+
+write(*, *) 'input the number of model levels in column'
+read(*, *) num_levs
+
+allocate(levels(num_levs))
+do i = 1, num_levs
+   write(*, *) 'Input vertical level ', i
+   read(*, *) levels(i)
+end do
+
+! Output the total number of obs in set; Q is being observed, too
+write(*, *) 'total num is ', num_cols * (num_levs * 4 + 1)
+write(iunit, *) num_cols * (num_levs * 4 + 1)
+
+! No copies or qc
+write(iunit, *) 0
+write(iunit, *) 0
+
+! First get error variance for surface pressure
+write(*, *) 'Input error VARIANCE for surface pressure obs'
+read(*, *) ps_err_var
+
+! Get error variance for t, and u and v
+write(*, *) 'Input error VARIANCE for T obs'
+read(*, *) t_err_var
+write(*, *) 'Input error VARIANCE for U and V obs'
+read(*, *) uv_err_var
+write(*, *) 'Input error VARIANCE for Q obs'
+read(*, *) q_err_var
+
+
+! Loop through each column
+do i = 1, num_cols
+
+   ! Get a random lon lat location for this column
+   ! Longitude is random from 0 to 360
+   lon = random_uniform(r) * 360.0_r8
+
+   ! Latitude must be area weighted
+   lat = asin(random_uniform(r) * 2.0_r8 - 1.0_r8)
+
+   ! Now convert from radians to degrees latitude
+   lat = lat * 360.0_r8 / (2.0_r8 * PI)
+
+   ! Do ps ob
+   write(iunit, *) 0
+   ! Kind for surface pressure is 3
+   write(iunit, *) 3
+   write(iunit, *) 1
+   ! Level is -1 for ps
+   write(iunit, *) -1
+   write(iunit, *) lon
+   write(iunit, *) lat
+   write(iunit, *) 0, 0
+   write(iunit, *) ps_err_var
+


More information about the Dart-dev mailing list