[Dart-dev] DART/branches Revision: 11902

dart at ucar.edu dart at ucar.edu
Wed Aug 16 21:33:30 MDT 2017


thoar at ucar.edu
2017-08-16 21:33:25 -0600 (Wed, 16 Aug 2017)
191
Uses fully 3D coordinate arrays.
get_state_meta_data() needs to be tested with these arrays.
there is no model_interpolate() yet.
Executables have a .exe extension as per Jimmy's tradition.




Modified: DART/branches/openggcm/models/openggcm/model_mod.f90
===================================================================
--- DART/branches/openggcm/models/openggcm/model_mod.f90	2017-08-16 16:17:54 UTC (rev 11901)
+++ DART/branches/openggcm/models/openggcm/model_mod.f90	2017-08-17 03:33:25 UTC (rev 11902)
@@ -32,7 +32,8 @@
                              close_file
 
 use  netcdf_utilities_mod, only : nc_add_global_attribute, nc_check, nc_sync,  &
-                                  nc_add_global_creation_time, nc_redef, nc_enddef
+                                  nc_add_global_creation_time, nc_redef, nc_enddef, &
+                                  nc_get_variable
 
 use          obs_kind_mod, only : QTY_ELECTRON_DENSITY, QTY_ELECTRIC_POTENTIAL, &
                                   get_index_for_quantity, get_name_for_quantity
@@ -94,15 +95,8 @@
 character(len=32 ), parameter :: revision = "$Revision$"
 character(len=128), parameter :: revdate  = "$Date$"
 
-! Return netcdf data array given a variable name
-interface get_data
-   module procedure get_data_1d
-   module procedure get_data_2d
-   module procedure get_data_3d
-end interface get_data
-
 ! Transform type openggcm, this come directly from the 
-! openggmc source code that had been modified and put
+! openggcm source code that had been modified and put
 ! as a subroutine in cotr_mod.nml
 type(transform) :: openggcm_transform
 
@@ -175,7 +169,7 @@
 ! Although the grid is static, I suggest that we compute and write 
 ! out all for DART.
 
-!>@ since the grid is static, it should be written ONCE by openggcm
+!>@todo since the grid is static, it should be written ONCE by openggcm
 !> at startup ... to a separate file from the data.
 
 ! Generic grid type to hold CTIM and Magnetic grid information
@@ -184,9 +178,9 @@
    integer :: nlon, nlat, nheight
 
    ! grid information
-   real(r8), allocatable :: longitude(:)
-   real(r8), allocatable :: latitude(:)
-   real(r8), allocatable :: height(:,:,:)
+   real(r8), allocatable :: longitude(:,:,:)
+   real(r8), allocatable ::  latitude(:,:,:)
+   real(r8), allocatable ::    height(:,:,:)
    logical :: uses_colatitude
 
    ! optional conversion grid - 2d arrays: (lon, lat)
@@ -226,7 +220,6 @@
 integer :: iunit, io, ncid
 integer :: ss, dd
 
-
 if ( module_initialized ) return ! only need to do this once.
 
 ! Print module information to log file and stdout.
@@ -248,9 +241,6 @@
 ! set calendar type
 call set_calendar_type(GREGORIAN)
 
-! Set the time step ... causes openggcm namelists to be read.
-! Ensures model_timestep is multiple of 'ocean_dynamics_timestep'
-
 model_timestep = set_time(assimilation_period_days,assimilation_period_seconds)
 
 call get_time(model_timestep,ss,dd) ! set_time() assures the seconds [0,86400)
@@ -274,12 +264,9 @@
 ! read in geographic and magnetic grids, and for the mag grid read
 ! in the 2d conversion arrays to go to geographic coords
 
-call read_horiz_grid(ncid, geo_grid, 'geo_lon', 'geo_lat', is_conv=.false., is_co_latitude=.false.)
-! call read_horiz_grid(ncid, mag_grid, 'ig_lon',  'ig_lat',  is_conv=.false., is_co_latitude=.true.) 
+call read_grid(ncid, geo_grid, 'geo_lon', 'geo_lat', 'geo_height', is_conv=.false., is_co_latitude=.false.)
+! call read_grid(ncid, mag_grid, 'ig_lon',  'ig_lat', 'ig_height', is_conv=.false., is_co_latitude=.true.) 
 
-call read_vert_levels(ncid, geo_grid, 'geo_height')
-! call read_vert_levels(ncid, mag_grid, 'ig_height')
-
 ! verify that the model_state_variables namelist was filled in correctly.  
 ! returns variable_table which has variable names, kinds and update strings, 
 ! and grid information.
@@ -304,7 +291,7 @@
 
 model_size = get_domain_size(domain_id)
 write(string1,*)'model_size = ', model_size
-call error_handler(E_MSG,'model_interpolate',string1,source,revision,revdate)
+call error_handler(E_MSG,'static_init_model',string1,source,revision,revdate)
 
 ! set the transform geo -> magnetic grid
 call initialize_openggcm_transform(openggcm_template)
@@ -553,19 +540,22 @@
 ! Local storage
 integer  :: i
 
-do i = 2, grid_handle%nlon
-   if (lon <= grid_handle%longitude(i)) then


More information about the Dart-dev mailing list