[Dart-dev] DART/branches Revision: 12531
dart at ucar.edu
dart at ucar.edu
Wed Apr 18 11:38:06 MDT 2018
thoar at ucar.edu
2018-04-18 11:38:06 -0600 (Wed, 18 Apr 2018)
68
Using the openggcm_interp_mod as the basis of model_interpolate()
Modified: DART/branches/openggcm/models/openggcm/README
===================================================================
--- DART/branches/openggcm/models/openggcm/README 2018-04-18 15:57:36 UTC (rev 12530)
+++ DART/branches/openggcm/models/openggcm/README 2018-04-18 17:38:06 UTC (rev 12531)
@@ -159,3 +159,13 @@
Right now pmo can run ... but there is no vertical interpolation support yet.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+Tue Apr 3 15:57:05 CEST 2018
+
+I updated this branch to be up-to-date with the rma_trunk and added the
+scripting from Doug Cramer.
+
+There will be confusion with the netcdf_utilities_mod.f90 ... the openggcm/netcdf_utilities_mod.f90 is designed to be used by openggcm, but DART routines will use the assimilation_code/modules/utilities/netcdf_utilities_mod.f90 ... should rename.
+
+The openggcm_interp_mod.f90 has not totally been integrated into the model_mod - and model_mod_check process.
Modified: DART/branches/openggcm/models/openggcm/interp.f90
===================================================================
--- DART/branches/openggcm/models/openggcm/interp.f90 2018-04-18 15:57:36 UTC (rev 12530)
+++ DART/branches/openggcm/models/openggcm/interp.f90 2018-04-18 17:38:06 UTC (rev 12531)
@@ -75,7 +75,7 @@
do_nml_file, do_nml_term, logfileunit, &
finalize_utilities
-use openggcm_interp_mod, only : g_oplus_pre, g_oplus_int, nsearch
+use openggcm_interp_mod, only : g_oplus_pre, g_oplus_int, g_oplus_int_pnt, nsearch
implicit none
@@ -99,15 +99,17 @@
real(r8) :: pi, rad, re, x1, y1, z1, x2, y2, z2
real(r8) :: s, x, y, z, rr
real(r8) :: a1, a2, a3, a4, output
+real(r8) :: tmpz, tmpp, tmpt
integer :: nn
integer :: iz, jz, ilat, jlat, ilon, jlon, i
integer :: iunit, istat
+integer :: good, num
! namelist with default values
character(len=256) :: data_file = '../data/grid-oplus'
-integer :: test_case = 1
+integer :: test_case = 4
integer :: debug = 0
namelist / test_interp_nml / &
@@ -143,10 +145,10 @@
read(10,*)iz,ilat,ilon,a1,a2,a3,a4
- opl_grid_geo_lon(iz,ilat,ilon) = a1
- opl_grid_geo_lat(iz,ilat,ilon) = a2
- opl_grid_geo_hgt(iz,ilat,ilon) = a3
- u(iz,ilat,ilon) = a4
+ opl_grid_geo_lon(iz,ilat,ilon) = a1 ! longitude, degrees
+ opl_grid_geo_lat(iz,ilat,ilon) = a2 ! latitude, degrees
+ opl_grid_geo_hgt(iz,ilat,ilon) = a3 ! height, meters
+ u(iz,ilat,ilon) = a4 ! values
enddo
enddo
enddo
@@ -161,7 +163,37 @@
rad = pi/180.0_r8
re = 6372.0e3
-if (test_case == 1) then
+if (test_case == 4) then
+ do jlon=1,nphi
+ do jlat=1,nthe
+ do jz=1,nnz
+ !u(jz,jlat,jlon)=opl_grid_geo_lon(jz,jlat,jlon)
+ !u(jz,jlat,jlon)=opl_grid_geo_lat(jz,jlat,jlon)
+ u(jz,jlat,jlon)=opl_grid_geo_hgt(jz,jlat,jlon)
+ enddo
+ enddo
+ enddo
+ num=1000
+ good=0
+ do i=1,num
+ tmpz=rand(0)*554635.+100000.
+ tmpp=rand(0)*2.*pi
+ tmpt=rand(0)*pi
+ x=(re+tmpz)*cos(tmpp)*sin(tmpt)
+ y=(re+tmpz)*sin(tmpp)*sin(tmpt)
+ z=(re+tmpz)*cos(tmpt)
+ call g_oplus_int(nphi,nthe,nnz,u,x,y,z,output,istat)
+ if (istat.eq.0) good=good+1
+ write(*,*)'test4 ',x,y,z,sqrt(x**2+y**2+z**2)-re,output,istat
+ enddo
+ write(*,*) 'found ',good,' out of ',num
+ x=6522000.
+ y=0.
+ z=0.
+ call g_oplus_int(nphi,nthe,nnz,u,x,y,z,output,istat)
+ write(*,*)'test4 ',x,y,z,sqrt(x**2+y**2+z**2),output,istat
+
More information about the Dart-dev
mailing list