cell_center2 Subroutine

private subroutine cell_center2(q11, q12, q21, q22, q31, q32, q41, q42, e2)

Arguments

Type IntentOptional Attributes Name
real(kind=ESMF_KIND_R8), intent(in) :: q11
real(kind=ESMF_KIND_R8), intent(in) :: q12
real(kind=ESMF_KIND_R8), intent(in) :: q21
real(kind=ESMF_KIND_R8), intent(in) :: q22
real(kind=ESMF_KIND_R8), intent(in) :: q31
real(kind=ESMF_KIND_R8), intent(in) :: q32
real(kind=ESMF_KIND_R8), intent(in) :: q41
real(kind=ESMF_KIND_R8), intent(in) :: q42
real(kind=ESMF_KIND_R8), intent(out) :: e2(2)

Calls

proc~~cell_center2~~CallsGraph proc~cell_center2 cell_center2 proc~cart_to_latlon cart_to_latlon proc~cell_center2->proc~cart_to_latlon proc~latlon2xyz2 latlon2xyz2 proc~cell_center2->proc~latlon2xyz2 proc~latlon2xyz latlon2xyz proc~latlon2xyz2->proc~latlon2xyz

Called by

proc~~cell_center2~~CalledByGraph proc~cell_center2 cell_center2 proc~esmf_utilcreatecscoords ESMF_UtilCreateCSCoords proc~esmf_utilcreatecscoords->proc~cell_center2 proc~esmf_utilcreatecscoordspar ESMF_UtilCreateCSCoordsPar proc~esmf_utilcreatecscoordspar->proc~cell_center2 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_nearest_regrid_csmesh->interface~esmf_gridcreatecubedsphere 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 proc~createfields createFields proc~createfields->interface~esmf_gridcreatecubedsphere proc~f_esmf_gridcreatecubedsphere f_esmf_gridcreatecubedsphere proc~f_esmf_gridcreatecubedsphere->interface~esmf_gridcreatecubedsphere proc~iocomputestsetup IOCompUTestSetup proc~iocomputestsetup->interface~esmf_gridcreatecubedsphere proc~test_bilinear_regrid_csgrid test_bilinear_regrid_csgrid proc~test_bilinear_regrid_csgrid->interface~esmf_gridcreatecubedsphere proc~test_bilinear_regrid_csgrid_sph_rad test_bilinear_regrid_csgrid_sph_rad proc~test_bilinear_regrid_csgrid_sph_rad->interface~esmf_gridcreatecubedsphere proc~test_conserve_regrid_csgrid test_conserve_regrid_csgrid proc~test_conserve_regrid_csgrid->interface~esmf_gridcreatecubedsphere proc~test_csgridtogrid test_CSGridToGrid proc~test_csgridtogrid->interface~esmf_gridcreatecubedsphere proc~test_csgridtogrid_2nd test_CSGridToGrid_2nd proc~test_csgridtogrid_2nd->interface~esmf_gridcreatecubedsphere proc~test_csgridtogridwmasks test_CSGridToGridWMasks proc~test_csgridtogridwmasks->interface~esmf_gridcreatecubedsphere proc~test_mesh_dual_w_bilinear test_mesh_dual_w_bilinear proc~test_mesh_dual_w_bilinear->interface~esmf_gridcreatecubedsphere proc~test_nearest_regrid_csgrid test_nearest_regrid_csgrid proc~test_nearest_regrid_csgrid->interface~esmf_gridcreatecubedsphere proc~test_patch_regrid_csgrid test_patch_regrid_csgrid proc~test_patch_regrid_csgrid->interface~esmf_gridcreatecubedsphere proc~test_sph_vec_blnr_csg_to_llg test_sph_vec_blnr_csG_to_llG proc~test_sph_vec_blnr_csg_to_llg->interface~esmf_gridcreatecubedsphere proc~test_sph_vec_blnr_csg_to_llg_p test_sph_vec_blnr_csG_to_llG_p proc~test_sph_vec_blnr_csg_to_llg_p->interface~esmf_gridcreatecubedsphere program~esmf_gridcreateex ESMF_GridCreateEx program~esmf_gridcreateex->interface~esmf_gridcreatecubedsphere program~esmf_gridcreateutest ESMF_GridCreateUTest program~esmf_gridcreateutest->interface~esmf_gridcreatecubedsphere

Source Code

 subroutine cell_center2(q11, q12, q21, q22, q31, q32, q41, q42, e2)
      real(ESMF_KIND_R8) , intent(in)  :: q11, q12, q21, q22, q31, q32, q41, q42
      real(ESMF_KIND_R8) , intent(out) :: e2(2)
! Local
      real(ESMF_KIND_R8) p1(3), p2(3), p3(3), p4(3)
      real(ESMF_KIND_R8) ec(3)
      real(ESMF_KIND_R8) dd
      integer k
      
      call latlon2xyz2(q11, q12, p1)
      call latlon2xyz2(q21, q22, p2)
      call latlon2xyz2(q31, q32, p3)
      call latlon2xyz2(q41, q42, p4)

      do k=1,3
         ec(k) = p1(k) + p2(k) + p3(k) + p4(k)
      enddo
      dd = sqrt( ec(1)**2 + ec(2)**2 + ec(3)**2 )

      do k=1,3
         ec(k) = ec(k) / dd
      enddo

      call cart_to_latlon(1, ec, e2(1), e2(2))

 end subroutine cell_center2