[Dart-dev] DART/branches Revision: 12467
dart at ucar.edu
dart at ucar.edu
Mon Mar 26 23:42:48 MDT 2018
thoar at ucar.edu
2018-03-26 23:42:48 -0600 (Mon, 26 Mar 2018)
124
Support for updating the CLM restart files to replace the DART missing_r8
with the native CLM missing/fillvalue. untested.
Modified: DART/branches/cesm_clm/models/clm/dart_to_clm.f90
===================================================================
--- DART/branches/cesm_clm/models/clm/dart_to_clm.f90 2018-03-26 21:48:10 UTC (rev 12466)
+++ DART/branches/cesm_clm/models/clm/dart_to_clm.f90 2018-03-27 05:42:48 UTC (rev 12467)
@@ -1,8 +1,8 @@
-! 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
+! DART software - Copyright 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$
+! DART $Id$
program dart_to_clm
@@ -10,106 +10,53 @@
! purpose: interface between DART and the CLM model
!
! method: Read DART state vector and overwrite values in a CLM restart file.
-! If the DART state vector has an 'advance_to_time' present,
-! it is read ... but nothing happens with it at this time.
-! DART is NEVER expected to advance CLM.
!
-! The dart_to_clm_nml namelist setting for advance_time_present
-! determines whether or not the input file has an 'advance_to_time'.
-! Typically, only temporary files like 'assim_model_state_ic' have
-! an 'advance_to_time'.
-!
-! author: Tim Hoar 12 July 2011
+! author: Tim Hoar 12 Jul 2011
+! modified: Tim Hoar 26 Mar 2018
!----------------------------------------------------------------------
use types_mod, only : r8
use utilities_mod, only : initialize_utilities, finalize_utilities, &
find_namelist_in_file, check_namelist_read, &
- logfileunit, open_file, close_file, &
error_handler, E_MSG
-use time_manager_mod, only : time_type, print_time, print_date, operator(-), get_time
-use model_mod, only : static_init_model, fill_missing_r8_with_orig, &
- get_model_size, get_clm_restart_filename, &
- read_model_time
+use model_mod, only : static_init_model, fill_missing_r8_with_orig
implicit none
! version controlled file description for error handling, do not edit
-character(len=256), parameter :: source = &
+character(len=*), parameter :: source = &
"$URL$"
-character(len=32 ), parameter :: revision = "$Revision$"
-character(len=128), parameter :: revdate = "$Date$"
+character(len=*), parameter :: revision = "$Revision$"
+character(len=*), parameter :: revdate = "$Date$"
+integer :: iunit, io
+character(len=512) :: string1, string2, string3
+
!------------------------------------------------------------------
! The namelist variables
!------------------------------------------------------------------
-character (len = 128) :: dart_to_clm_input_file = 'model_restart.nc'
-logical :: advance_time_present = .false.
+character(len=256) :: input_dart_file = 'dart_posterior.nc'
+character(len=256) :: clm_file_to_update = 'clm_restart_file.nc'
-namelist /dart_to_clm_nml/ dart_to_clm_input_file, &
- advance_time_present
+namelist /dart_to_clm_nml/ input_dart_file, clm_file_to_update
-!----------------------------------------------------------------------
+!======================================================================
-character(len=256) :: clm_restart_filename
-integer :: iunit, io
-type(time_type) :: model_time, adv_to_time
-
-!----------------------------------------------------------------------
-
call initialize_utilities(progname='dart_to_clm')
-!----------------------------------------------------------------------
-! Call model_mod:static_init_model() which reads the clm namelists
-! to set grid sizes, etc.
-!----------------------------------------------------------------------
-
call static_init_model()
-! Read the namelist to get the input filename.
-
call find_namelist_in_file("input.nml", "dart_to_clm_nml", iunit)
read(iunit, nml = dart_to_clm_nml, iostat = io)
call check_namelist_read(iunit, io, "dart_to_clm_nml")
-call get_clm_restart_filename( clm_restart_filename )
+write(string1,'("converting DART file "",A,""")') trim(input_dart_file)
+write(string2,'("to clm restart file "",A,""")') trim(clm_file_to_update)
+call error_handler(E_MSG,'dart_to_clm',string1,text2=string2)
More information about the Dart-dev
mailing list