[Dart-dev] [6042] DART/branches/development/models/CESM: Replaced the references to POP with CESM.

nancy at ucar.edu nancy at ucar.edu
Wed Apr 3 15:50:48 MDT 2013


Revision: 6042
Author:   thoar
Date:     2013-04-03 15:50:48 -0600 (Wed, 03 Apr 2013)
Log Message:
-----------
Replaced the references to POP with CESM.
Using dart_ics and dart_restart instead of they mysterious dart.ic dart.ud ...

Modified Paths:
--------------
    DART/branches/development/models/CESM/cesm_to_dart.f90
    DART/branches/development/models/CESM/cesm_to_dart.nml
    DART/branches/development/models/CESM/dart_to_cesm.f90
    DART/branches/development/models/CESM/dart_to_cesm.nml

-------------- next part --------------
Modified: DART/branches/development/models/CESM/cesm_to_dart.f90
===================================================================
--- DART/branches/development/models/CESM/cesm_to_dart.f90	2013-04-03 15:59:44 UTC (rev 6041)
+++ DART/branches/development/models/CESM/cesm_to_dart.f90	2013-04-03 21:50:48 UTC (rev 6042)
@@ -2,7 +2,7 @@
 ! provided by UCAR, "as is", without charge, subject to all terms of use at
 ! http://www.image.ucar.edu/DAReS/DART/DART_download
 
-program pop_to_dart
+program cesm_to_dart
 
 ! <next few lines under version control, do not edit>
 ! $URL$
@@ -11,25 +11,26 @@
 ! $Date$
 
 !----------------------------------------------------------------------
-! purpose: interface between POP and DART
+! purpose: interface between CESM and DART
 !
-! method: Read POP "restart" files of model state
+! method: Read CESM "restart" files of model state
 !         Reform fields into a DART state vector (control vector).
 !         Write out state vector in "proprietary" format for DART.
 !         The output is a "DART restart file" format.
-! 
-! USAGE:  The POP filename is read from the pop_in namelist
-!         <edit pop_to_dart_output_file in input.nml:pop_to_dart_nml>
-!         pop_to_dart
 !
+! USAGE:  The CESM filename is read from the cesm_in namelist
+!         <edit cesm_to_dart_output_file in input.nml:cesm_to_dart_nml>
+!         cesm_to_dart
+!
 ! author: Tim Hoar 6/24/09
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : initialize_utilities, timestamp, &
-                             find_namelist_in_file, check_namelist_read
+use    utilities_mod, only : initialize_utilities, finalize_utilities, &
+                             find_namelist_in_file, check_namelist_read, &
+                             error_handler, E_MSG
 use        model_mod, only : restart_file_to_sv, static_init_model, &
-                             get_model_size, get_pop_restart_filename
+                             get_model_size, get_cesm_restart_filename
 use  assim_model_mod, only : awrite_state_restart, open_restart_write, close_restart
 use time_manager_mod, only : time_type, print_time, print_date
 
@@ -46,9 +47,9 @@
 ! namelist parameters with default values.
 !-----------------------------------------------------------------------
 
-character (len = 128) :: pop_to_dart_output_file  = 'dart.ud'
+character (len = 128) :: cesm_to_dart_output_file  = 'dart_ics'
 
-namelist /pop_to_dart_nml/ pop_to_dart_output_file
+namelist /cesm_to_dart_nml/ cesm_to_dart_output_file
 
 !----------------------------------------------------------------------
 ! global storage
@@ -57,12 +58,11 @@
 integer               :: io, iunit, x_size
 type(time_type)       :: model_time
 real(r8), allocatable :: statevector(:)
-character (len = 128) :: pop_restart_filename = 'no_pop_restart_filename' 
-logical               :: verbose = .FALSE.
+character (len = 128) :: cesm_restart_filename = 'no_cesm_restart_filename'
 
 !----------------------------------------------------------------------
 
-call initialize_utilities(progname='pop_to_dart', output_flag=verbose)
+call initialize_utilities(progname='cesm_to_dart')
 
 !----------------------------------------------------------------------
 ! Call model_mod:static_init_model(), which reads the namelists
@@ -75,16 +75,16 @@
 ! Read the namelist to get the input and output filenames.
 !----------------------------------------------------------------------
 
-call find_namelist_in_file("input.nml", "pop_to_dart_nml", iunit)
-read(iunit, nml = pop_to_dart_nml, iostat = io)
-call check_namelist_read(iunit, io, "pop_to_dart_nml") ! closes, too.
+call find_namelist_in_file("input.nml", "cesm_to_dart_nml", iunit)
+read(iunit, nml = cesm_to_dart_nml, iostat = io)
+call check_namelist_read(iunit, io, "cesm_to_dart_nml") ! closes, too.
 
-call get_pop_restart_filename( pop_restart_filename )
+call get_cesm_restart_filename( cesm_restart_filename )
 
 write(*,*)
-write(*,'(''pop_to_dart:converting POP restart file '',A, &
+write(*,'(''cesm_to_dart:converting CESM restart file '',A, &
       &'' to DART file '',A)') &
-       trim(pop_restart_filename), trim(pop_to_dart_output_file)
+       trim(cesm_restart_filename), trim(cesm_to_dart_output_file)
 
 !----------------------------------------------------------------------
 ! Now that we know the names, get to work.
@@ -92,20 +92,20 @@
 
 x_size = get_model_size()
 allocate(statevector(x_size))
-call restart_file_to_sv(pop_restart_filename, statevector, model_time) 
+call restart_file_to_sv(cesm_restart_filename, statevector, model_time)
 
-iunit = open_restart_write(pop_to_dart_output_file)
+iunit = open_restart_write(cesm_to_dart_output_file)
 
 call awrite_state_restart(model_time, statevector, iunit)
 call close_restart(iunit)
 
 !----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
+! Call finalize_utilities()
 !----------------------------------------------------------------------
 
-call print_date(model_time, str='pop_to_dart:POP  model date')
-call print_time(model_time, str='pop_to_dart:DART model time')
-call timestamp(string1=source, pos='end')
+call print_date(model_time, str='cesm_to_dart:CESM model date')
+call print_time(model_time, str='cesm_to_dart:DART model time')
+call finalize_utilities('cesm_to_dart')
 
-end program pop_to_dart
+end program cesm_to_dart
 

Modified: DART/branches/development/models/CESM/cesm_to_dart.nml
===================================================================
--- DART/branches/development/models/CESM/cesm_to_dart.nml	2013-04-03 15:59:44 UTC (rev 6041)
+++ DART/branches/development/models/CESM/cesm_to_dart.nml	2013-04-03 21:50:48 UTC (rev 6042)
@@ -1,3 +1,4 @@
-&pop_to_dart_nml
-   pop_to_dart_output_file = 'dart.ud'  /
+&cesm_to_dart_nml
+   cesm_to_dart_output_file = 'dart_ics'
+   /
 

Modified: DART/branches/development/models/CESM/dart_to_cesm.f90
===================================================================
--- DART/branches/development/models/CESM/dart_to_cesm.f90	2013-04-03 15:59:44 UTC (rev 6041)
+++ DART/branches/development/models/CESM/dart_to_cesm.f90	2013-04-03 21:50:48 UTC (rev 6042)
@@ -2,7 +2,7 @@
 ! provided by UCAR, "as is", without charge, subject to all terms of use at
 ! http://www.image.ucar.edu/DAReS/DART/DART_download
 
-program dart_to_pop
+program dart_to_cesm
 
 ! <next few lines under version control, do not edit>
 ! $URL$
@@ -11,14 +11,14 @@
 ! $Date$
 
 !----------------------------------------------------------------------
-! purpose: interface between DART and the POP model
+! purpose: interface between DART and the CESM model
 !
-! method: Read DART state vector and overwrite values in a POP restart file.
+! method: Read DART state vector and overwrite values in a CESM restart file.
 !         If the DART state vector has an 'advance_to_time' present, a
-!         file called pop_in.DART is created with a time_manager_nml namelist 
-!         appropriate to advance POP to the requested time.
+!         file called cesm_in.DART is created with a time_manager_nml namelist
+!         appropriate to advance CESM to the requested time.
 !
-!         The dart_to_pop_nml namelist setting for advance_time_present 
+!         The dart_to_cesm_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'.
@@ -27,14 +27,14 @@
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : initialize_utilities, timestamp, &
+use    utilities_mod, only : initialize_utilities, finalize_utilities, &
                              find_namelist_in_file, check_namelist_read, &
-                             logfileunit
+                             logfileunit, error_handler, E_MSG
 use  assim_model_mod, only : open_restart_read, aread_state_restart, close_restart
 use time_manager_mod, only : time_type, print_time, print_date, operator(-)
 use        model_mod, only : static_init_model, sv_to_restart_file, &
-                             get_model_size, get_pop_restart_filename
-use     dart_pop_mod, only : write_pop_namelist
+                             get_model_size, get_cesm_restart_filename
+use     dart_cesm_mod, only : write_cesm_namelist
 
 implicit none
 
@@ -48,10 +48,10 @@
 ! The namelist variables
 !------------------------------------------------------------------
 
-character (len = 128) :: dart_to_pop_input_file   = 'dart.ic'
+character (len = 128) :: dart_to_cesm_input_file  = 'dart_restart'
 logical               :: advance_time_present     = .false.
 
-namelist /dart_to_pop_nml/ dart_to_pop_input_file, &
+namelist /dart_to_cesm_nml/ dart_to_cesm_input_file, &
                            advance_time_present
 
 !----------------------------------------------------------------------
@@ -59,15 +59,14 @@
 integer               :: iunit, io, x_size
 type(time_type)       :: model_time, adv_to_time
 real(r8), allocatable :: statevector(:)
-character (len = 128) :: pop_restart_filename = 'no_pop_restart_file'
-logical               :: verbose              = .FALSE.
+character (len = 128) :: cesm_restart_filename = 'no_cesm_restart_file'
 
 !----------------------------------------------------------------------
 
-call initialize_utilities(progname='dart_to_pop', output_flag=verbose)
+call initialize_utilities(progname='dart_to_cesm')
 
 !----------------------------------------------------------------------
-! Call model_mod:static_init_model() which reads the POP namelists
+! Call model_mod:static_init_model() which reads the CESM namelists
 ! to set grid sizes, etc.
 !----------------------------------------------------------------------
 
@@ -76,24 +75,24 @@
 x_size = get_model_size()
 allocate(statevector(x_size))
 
-! Read the namelist to get the input filename. 
+! Read the namelist to get the input filename.
 
-call find_namelist_in_file("input.nml", "dart_to_pop_nml", iunit)
-read(iunit, nml = dart_to_pop_nml, iostat = io)
-call check_namelist_read(iunit, io, "dart_to_pop_nml")
+call find_namelist_in_file("input.nml", "dart_to_cesm_nml", iunit)
+read(iunit, nml = dart_to_cesm_nml, iostat = io)
+call check_namelist_read(iunit, io, "dart_to_cesm_nml")
 
-call get_pop_restart_filename( pop_restart_filename )
+call get_cesm_restart_filename( cesm_restart_filename )
 
 write(*,*)
-write(*,'(''dart_to_pop:converting DART file '',A, &
-      &'' to POP restart file '',A)') &
-     trim(dart_to_pop_input_file), trim(pop_restart_filename)
+write(*,'(''dart_to_cesm:converting DART file '',A, &
+      &'' to CESM restart file '',A)') &
+     trim(dart_to_cesm_input_file), trim(cesm_restart_filename)
 
 !----------------------------------------------------------------------
 ! Reads the valid time, the state, and the target time.
 !----------------------------------------------------------------------
 
-iunit = open_restart_read(dart_to_pop_input_file)
+iunit = open_restart_read(dart_to_cesm_input_file)
 
 if ( advance_time_present ) then
    call aread_state_restart(model_time, statevector, iunit, adv_to_time)
@@ -103,34 +102,33 @@
 call close_restart(iunit)
 
 !----------------------------------------------------------------------
-! update the current POP state vector
+! update the current CESM state vector
 ! Convey the amount of time to integrate the model ...
 ! time_manager_nml: stop_option, stop_count increments
 !----------------------------------------------------------------------
 
-call sv_to_restart_file(statevector, pop_restart_filename, model_time)
+call sv_to_restart_file(statevector, cesm_restart_filename, model_time)
 
 if ( advance_time_present ) then
-   call write_pop_namelist(model_time, adv_to_time)
+   call write_cesm_namelist(model_time, adv_to_time)
 endif
 
 !----------------------------------------------------------------------
 ! Log what we think we're doing, and exit.
 !----------------------------------------------------------------------
 
-call print_date( model_time,'dart_to_pop:POP  model date')
-call print_time( model_time,'dart_to_pop:DART model time')
-call print_date( model_time,'dart_to_pop:POP  model date',logfileunit)
-call print_time( model_time,'dart_to_pop:DART model time',logfileunit)
+call print_date( model_time,'dart_to_cesm:CESM model date')
+call print_time( model_time,'dart_to_cesm:DART model time')
+call print_date( model_time,'dart_to_cesm:CESM model date',logfileunit)
+call print_time( model_time,'dart_to_cesm:DART model time',logfileunit)
 
 if ( advance_time_present ) then
-call print_time(adv_to_time,'dart_to_pop:advance_to time')
-call print_date(adv_to_time,'dart_to_pop:advance_to date')
-call print_time(adv_to_time,'dart_to_pop:advance_to time',logfileunit)
-call print_date(adv_to_time,'dart_to_pop:advance_to date',logfileunit)
+call print_time(adv_to_time,'dart_to_cesm:advance_to time')
+call print_date(adv_to_time,'dart_to_cesm:advance_to date')
+call print_time(adv_to_time,'dart_to_cesm:advance_to time',logfileunit)
+call print_date(adv_to_time,'dart_to_cesm:advance_to date',logfileunit)
 endif
 
-! When called with 'end', timestamp will call finalize_utilities()
-call timestamp(string1=source, pos='end')
+call finalize_utilities('dart_to_cesm')
 
-end program dart_to_pop
+end program dart_to_cesm

Modified: DART/branches/development/models/CESM/dart_to_cesm.nml
===================================================================
--- DART/branches/development/models/CESM/dart_to_cesm.nml	2013-04-03 15:59:44 UTC (rev 6041)
+++ DART/branches/development/models/CESM/dart_to_cesm.nml	2013-04-03 21:50:48 UTC (rev 6042)
@@ -1,4 +1,5 @@
-&dart_to_pop_nml
-   dart_to_pop_input_file = 'dart.ic',
-   advance_time_present   = .false.  /
+&dart_to_cesm_nml
+   dart_to_cesm_input_file = 'dart_restart',
+   advance_time_present    = .false.
+   /
 


More information about the Dart-dev mailing list