fortran怎样写一个将一个数据对象中的内容复制到另一个对象中去的函数 5
数据对象是这样定义的typemetgrid_infointeger::num_metgrid_levels,num_metgrid_soil_levels,iprojin...
数据对象是这样定义的
type metgrid_info
integer :: num_metgrid_levels, num_metgrid_soil_levels,iproj
integer :: ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, &
imsx, imex, jmsx, jmex, kmsx, kmex, &
imsy, imey, jmsy, jmey, kmsy, kmey, &
ips, ipe, jps, jpe, kps, kpe, &
ipsx, ipex, jpsx, jpex, kpsx, kpex, &
ipsy, ipey, jpsy, jpey, kpsy, kpey
real, pointer, dimension(:,:):: xlat,xlon
real, pointer, dimension(:,:):: tsk,sst,snow,xice,pslv,psfc,&
xland,ht,sstold,xiceold
real, pointer, dimension(:,:,:):: u3d,v3d,w3d,q3d,z3d,t3d,p3d,rh3d
real, pointer, dimension(:,:,:):: soilt,soilm,soildepth,soilthick
end type metgrid_info
现在想要编写一个函数实现把mgrid1的内容复制到mgrid2中去
( type metgrid_info :: mgrid1, mgrid2) 展开
type metgrid_info
integer :: num_metgrid_levels, num_metgrid_soil_levels,iproj
integer :: ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, &
imsx, imex, jmsx, jmex, kmsx, kmex, &
imsy, imey, jmsy, jmey, kmsy, kmey, &
ips, ipe, jps, jpe, kps, kpe, &
ipsx, ipex, jpsx, jpex, kpsx, kpex, &
ipsy, ipey, jpsy, jpey, kpsy, kpey
real, pointer, dimension(:,:):: xlat,xlon
real, pointer, dimension(:,:):: tsk,sst,snow,xice,pslv,psfc,&
xland,ht,sstold,xiceold
real, pointer, dimension(:,:,:):: u3d,v3d,w3d,q3d,z3d,t3d,p3d,rh3d
real, pointer, dimension(:,:,:):: soilt,soilm,soildepth,soilthick
end type metgrid_info
现在想要编写一个函数实现把mgrid1的内容复制到mgrid2中去
( type metgrid_info :: mgrid1, mgrid2) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询