gnomonic_dist Subroutine

private subroutine gnomonic_dist(im, lamda, theta)

Arguments

Type IntentOptional Attributes Name
integer :: im
real(kind=ESMF_KIND_R8) :: lamda(im+1,im+1)
real(kind=ESMF_KIND_R8) :: theta(im+1,im+1)

Calls

proc~~gnomonic_dist~~CallsGraph proc~gnomonic_dist gnomonic_dist proc~cart_to_latlon cart_to_latlon proc~gnomonic_dist->proc~cart_to_latlon

Called by

proc~~gnomonic_dist~~CalledByGraph proc~gnomonic_dist gnomonic_dist proc~gnomonic_grids gnomonic_grids proc~gnomonic_grids->proc~gnomonic_dist proc~esmf_utilcreatecscoords ESMF_UtilCreateCSCoords proc~esmf_utilcreatecscoords->proc~gnomonic_grids proc~esmf_utilcreatecscoordspar ESMF_UtilCreateCSCoordsPar proc~esmf_utilcreatecscoordspar->proc~gnomonic_grids proc~esmf_gridcreatecubedsphereireg ESMF_GridCreateCubedSphereIReg proc~esmf_gridcreatecubedsphereireg->proc~esmf_utilcreatecscoordspar proc~esmf_gridcreatecubedspherereg ESMF_GridCreateCubedSphereReg proc~esmf_gridcreatecubedspherereg->proc~esmf_utilcreatecscoordspar proc~esmf_meshcreatecubedsphere ESMF_MeshCreateCubedSphere proc~esmf_meshcreatecubedsphere->proc~esmf_utilcreatecscoords interface~esmf_gridcreatecubedsphere ESMF_GridCreateCubedSphere interface~esmf_gridcreatecubedsphere->proc~esmf_gridcreatecubedsphereireg interface~esmf_gridcreatecubedsphere->proc~esmf_gridcreatecubedspherereg proc~test_bilinear_regrid_csmesh test_bilinear_regrid_csmesh proc~test_bilinear_regrid_csmesh->proc~esmf_meshcreatecubedsphere proc~test_conserve_regrid_csmesh test_conserve_regrid_csmesh proc~test_conserve_regrid_csmesh->proc~esmf_meshcreatecubedsphere proc~test_nearest_regrid_csmesh test_nearest_regrid_csmesh proc~test_nearest_regrid_csmesh->proc~esmf_meshcreatecubedsphere proc~test_patch_regrid_csmesh test_patch_regrid_csmesh proc~test_patch_regrid_csmesh->proc~esmf_meshcreatecubedsphere program~esmf_meshex ESMF_MeshEx program~esmf_meshex->proc~esmf_meshcreatecubedsphere

Source Code

 subroutine gnomonic_dist(im, lamda, theta)
! This is the commonly known equi-distance grid
 integer im
 real(ESMF_KIND_R8) lamda(im+1,im+1)
 real(ESMF_KIND_R8) theta(im+1,im+1)
 real(ESMF_KIND_R8) p(3,im+1,im+1)
! Local
 real(ESMF_KIND_R8) rsq3, xf, y0, z0, y, x, z, ds
 real(ESMF_KIND_R8) dy, dz
 integer j,k

! Face-2

 rsq3 = 1./sqrt(3.) 
 xf = -rsq3
 y0 =  rsq3;  dy = -2.*rsq3/im 
 z0 = -rsq3;  dz =  2.*rsq3/im

 do k=1,im+1
    do j=1,im+1
       p(1,j,k) = xf
       p(2,j,k) = y0 + (j-1)*dy
       p(3,j,k) = z0 + (k-1)*dz
    enddo
 enddo
 call cart_to_latlon( (im+1)*(im+1), p, lamda, theta)

 end subroutine gnomonic_dist