[ncl-talk] WRAPIT_input data change its value
Chang Liu
changliu at uark.edu
Thu Aug 11 20:08:27 MDT 2016
Hi,
I try to use WRAPIT to call a Fortran function, The problem is the input data change its value.
For example ,input data: 1,2,3,4,5
But when use it in the Fortran ,the value is 1103626240 1104150528 1104674816 1105199104 1105723392
The code is very simple
Ncl :
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
external AWSSI "./awssi.so"
f=addfile("/data/cliu/noram_v04_1960_2009.grid.nc","r")
time= cd_calendar(f&time,0)
day=time(:,2)
print(day) ;output is 1,2,3,4
AWSSI::awssi(day)
Fortran 90:
SUBROUTINE awssi(day)
integer,intent(in) ::day(18263)
print*,day ;output is 1103626240 1104150528 1104674816 1105199104 1105723392
end
I don't know what happens, could you give me some advices?
Best,
Chang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160812/7384e401/attachment.html
More information about the ncl-talk
mailing list