本帖最后由 taotao0718 于 2015-2-16 09:00 编辑
编译时发生这样错误fortcom: Error: mod_random_forcing.F, line 59: This entity cannot be PUBLIC since its derived type is PRIVATE. [RAN] type(forcing_fields) ,save :: ran, ran1
-----------------------------------^
原程序的一部分:
[Fortran] 纯文本查看 复制代码 module mod_random_forcing
#define FFTW
use mod_xc
implicit none
c --- shield everything
private
type forcing_fields
character(len=5) tforce
real slp (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! Sea level pressure
real taux (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! wind stress in x direction
real tauy (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! wind stress in y direction
real wndspd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! wind speed (tke source)
real airtmp (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! pseudo air temperature
real relhum (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! relative humidity
real clouds (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! cloud cover
real precip (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! precipitation
real sss (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! SSS for relax
real sst (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! SST for relax
real uwind (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! u-component of wind
real vwind (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! v-component of wind
real tauxice(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! ice stress on water in x dir
real tauyice(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) ! ice stress on water in y dir
end type forcing_fields
c
...................
...................
...................
c --- These will hold the forcing fields (dim and nondimensional)
type(forcing_fields) ,save :: ran, ran1
我改为 type(forcing_fields) ,save,private :: ran, ran1
依旧是一样的错误,不知道有没有高手可以指点一下,谢谢
|