[Thread Prev][Thread Next][Index]

[ferret_users] scat2gridlaplace used to work



Dear Ferreters,

Long time no post, but I have a question now. I usually solve technical issues by myself or following the documentation and the awesome mailing list archive.

There was this attached script (based on the scat2gridlaplace function) which used to work in Ferret earlier, but now the same script is not working within Pyferret under Conda and using "conda activate FERRET".

The goal is to get a large ASCII file with many time (7305) steps into a netCDF format. The file is on a regular lat-lon grid (resolution of 0.1°), but not covering a "perfect" rectangle (6161 points) and using only masked coordinates from COORDS.dat file (5895 points). I attach the masked region (CARPATCLIM_area.png) as well and the first two timesteps of the big data file (CCLIM_sund_19912010_2X.dat).

I am positive this method worked earlier without the following error message:
 ! NOAA/PMEL TMAP
 ! PyFerret v7.6 (optimized)
 ! Linux 4.15.0-1089-azure - 06/25/20
 ! 10-Nov-20 18:07   
Bailing out of external function "scat2gridlaplace_xy":
Input scattered XPTS, F(X) have different # of points    5895 43062975
 **ERROR: error in external function
LIST/FORMAT=CDF/file="/media/sf_D_DRIVE/szabop/CARPATCLIM/CCLIM_sund19912010XX.nc"/append/clobber/llimits=1:7305/l=1 sundx
Command file, command group, or REPEAT execution aborted

Does anyone know why I get the error message now that worked earlier in Ferret?
I know that the xpts and the read-in file have a different number of points. Setting a grid when reading in a file (/grid=girdlonslats instead of /form=free/col=5895) also does not change this.

Kind regards,
Peter Szabo

!---
file/var="lon,lat,height" "/media/sf_D_DRIVE/szabop/CARPATCLIM/COORDS.dat"  !the used coordinates of lon and lat

def ax/x=17.0:27.0:0.1 lons !this is the definition of the full rectangle, 101*61=6161 points
def ax/y=44.0:50.0:0.1 lats
def axis/t="1-JAN-1991:12:00":"31-DEC-2010:12:00":1/t0="1-jan-1991:00:00"/units=days time !the 7305 daily time steps, not adjusted to the attached 2 timesteps

let ff=0*t[gt=time]

repeat/name=ll/range=1:7305:1 (file/form=free/col=5895/skip=`ll-1`/var=sundxx "/media/sf_D_DRIVE/szabop/CARPATCLIM/CCLIM_sund_19912010_2X.dat";\
let var = scat2gridlaplace_xy(lon[d=1],lat[d=1],sundxx[d=2],x[gx=lons],y[gy=lats],0,1); let sundx=var+0*ff;\
save/file="/media/sf_D_DRIVE/szabop/CARPATCLIM/CCLIM_sund19912010XX.nc"/append/clobber/llimits=1:7305/l=`ll` sundx; set memory/size=1000) !reading in and writing out the values on a daily basis

!following this step a mask should be applied to cut out the extra points as scat2gridlaplace adds some extra values over the corner of the region, but this is not an issue

Attachment: COORDS.dat
Description: Binary data

Attachment: CARPATCLIM_area.png
Description: PNG image

Attachment: CCLIM_sund_19912010_2X.dat
Description: Binary data


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement