[ncl-talk] About pass missing code and error code to to function in obsp1_mult_time_dp.f?
Dennis Shea
shea at ucar.edu
Mon Jan 23 09:49:26 MST 2017
[1]
Your implementation is wrong on multiple levels. Please carefully read the
WRAPIT documentation. Also, you are using f90 syntax within the NCL script.
===
So I need to use the subroutine dobjanlx like this
grid = average::dobjanlx(plon,plat,pval,ntim,npts,grid,mlon,nlat
& ,xmsg,pmsg ,rscan,nscan,glat,glon,smwgt,opt
& ,zval,zlat,zlon,ip,work,lwork,ier)
====
It should be something like ....
grid = new( ....) ; preallocate for the return array
work = nes(...) ; preallocate a work array spaceMissing values
:
average::dobjanlx(plon,plat,pval,ntim,npts,grid,mlon,nlat \
,xmsg,pmsg ,rscan,nscan,glat,glon,smwgt,opt \
,zval,zlat,zlon,ip,work,lwork,ier)
[2] The plon[*], plat[*],pval[*] triplet could have pval at _FillValue=1e20
plat(0)=10 ... plon(0)=20, pval(0)=30
plat(1)=31.3 ... plon(1)=135.8, pval(2)=1e20 <=== would be ignored
On Mon, Jan 23, 2017 at 9:06 AM, Tao Lu <hakufu.asano at gmail.com> wrote:
> Dear ncl-talk
>
> I got the obj_anal_ic code from *[ncl-talk] process underlying
> obj_anal_ic_Wrap()*
> You can get it also from https://github.com/yyr/
> ncl/blob/master/ni/src/lib/nfpfort/obsp1_mult_time_dp.f
>
> The subroutine infomation is shown below:
> C NCLFORTSTART
> subroutine dobjanlx(plon,plat,pval,ntim,npts,grid,mlon,nlat
> & ,xmsg,pmsg ,rscan,nscan,glat,glon,smwgt,opt
> & ,zval,zlat,zlon,ip,work,lwork,ier)
> implicit none
> c
> c Objective Analysis via 'iterative improvement' [driver]
> c
> c NCL: grid = objanalii(plon,plat,pval,rscan,glat,glon,opt)
> c
> c nomenclature :
> c . plat,plon - coordinates of observation in degrees
> c . -90.<= plat =>90. ; {-180, 0}<= plon >=(180, 360}
> c . pval - value of obs. [*] or ... [ntim][*]
> c . grid - array which will hold the interpolated grid
> c . mlon,nlat - no. of lon and lat points
> c . glon,glat - vectors containing the lat/lon coords of the grid
> c . longitudes must have same range as plon
> c . rscan - vector containing scan radii (in degrees)
> c . rscan(1)> rscan(2)> ...>rscan(nscan)
> c . nscan - no. of scans to be performed (length of rscan)
> c . it is recommended that multiple scans be
> c . performed. the max number of scans is currently
> c . 10. this may easily be adjusted by changing the
> c . parameter nscmax and changing the length of the
> c . data statement for smwgt. this routine was tested
> c . with nscan=4 : rscan(1,2,3,4)=20.,15.,10.,7.5
> c . rscan(nscan) should be .ge. the grid spacing.
> c . xmsg - missing code for plat and plon
> c . pmsg - missing code for pval
> c . value to which grid points with no data
> c . within rscan(1) degrees will be set
> c . opt - option flag
> c . ier - error code
> c
> c INPU
>
>
> I did some changes to the code and use
>
> WRAPIT obsp1_mult_time_dp.f
>
> Get shared object obsp1_mult_time_dp.o
> So I need to use the subroutine dobjanlx like this
> grid = average::dobjanlx(plon,plat,pval,ntim,npts,grid,mlon,nlat
> & ,xmsg,pmsg ,rscan,nscan,glat,glon,smwgt,opt
> & ,zval,zlat,zlon,ip,work,lwork,ier)
>
> But I am confused with the how the xmsg, pmsg and ier are passed to the
> subroutine dobjanlx.
> What does missing code exactly mean?
> And what is parameter ip is? How should I pass value to it?
>
> Thank you,
> Tao
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170123/048416e2/attachment.html
More information about the ncl-talk
mailing list