[ncl-talk] ESMF_regrid - SrcGridLat/SrcGridLon not recognised
Will Hobbs
will.hobbs at utas.edu.au
Mon Aug 20 17:15:20 MDT 2018
Hi Mary
You’re absolutely correct; I was reading a slightly different input domain for the variable ‘var’ and the source latitude. All fixed now; sorry to waste your time on such a silly little error.
Will
From: Mary Haley <haley at ucar.edu>
Date: Tuesday, 21 August 2018 at 6:19 AM
To: Will Hobbs <will.hobbs at utas.edu.au>
Cc: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] ESMF_regrid - SrcGridLat/SrcGridLon not recognised
Hi Will,
Were there any other errors with this script?
The reason I ask is that it looks like your source grid is dimensioned 59 x 360 according to your printVarSummary statement, but the SrcGridLat says it is an array of 54 elements. I'm assuming that "var" is the variable you are regridding? If so, then you will need to make sure the lat/lon arrays are set to the same lat/lon arrays as "var". In fact, since "var" is a rectilinear grid and has lat/lon attached as coordinate arrays, you shouldn't need to set SrcGridLat or SrcGridLon at all.
I've attached a very simple example of regridding data that is on a rectilinear grid. You'll see that I'm not setting SrcGridLat/Lon at all. The data is attached too since it's small.
--Mary
On Sun, Aug 19, 2018 at 6:53 PM, Will Hobbs <will.hobbs at utas.edu.au<mailto:will.hobbs at utas.edu.au>> wrote:
Hi all
I am using ESMF_regrid to regrid a number of different ocean models (some rectilinear, some not) onto a common lat/lon grid. To do this I explicitly set the SrcGridLat and SrcGridLon attributes, but sometimes I get the following error message:
(0) get_src_grid_info: SrcGridType and/or SrcGridLat/SrcGridLon were not set.
(0) Cannot determine the source grid type.
I’ve done a printVarSummary of both the variable to regrid and the ‘Opt’ (i.e. options variable – see below) and it’s clear that both attributes are there on the Opt file, just not being recognised by ESMF_regrid. I can’t find any reason why they wouldn’t be.
Any ideas?
Will
Variable: var
Type: float
Total Size: 4893696000 bytes
1223424000 values
Number of Dimensions: 4
Dimensions and sizes: [time | 1920] x [lev | 30] x [lat | 59] x [lon | 360]
Coordinates:
time: [674900.5..733269.5]
lev: [ 5..5243.5966796875]
lat: [-78.5..-20.5]
lon: [ 0.5..359.5]
Number Of Attributes: 9
standard_name : sea_water_salinity
long_name : Sea Water Salinity
units : psu
cell_methods : time: mean (interval: 60 seconds)
cell_measures : area: areacello volume: volcello
history : 2011-12-26T07:02:13Z altered by CMOR: replaced missing value flag (1e+35) with standard missing value (1e+20). 2011-12-26T07:02:15Z altered by CMOR: Converted type from 'd' to 'f'. 2011-12-26T07:02:15Z altered by CMOR: Inverted axis: lat.
missing_value : 1e+20
_FillValue : 1e+20
associated_files : baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation<http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation> gridspecFile: gridspec_ocean_fx_FGOALS-g2_historical_r0i0p0.nc<http://historical_r0i0p0.nc> areacello: areacello_fx_FGOALS-g2_historical_r0i0p0.nc<http://historical_r0i0p0.nc> volcello: volcello_fx_FGOALS-g2_historical_r0i0p0.nc<http://historical_r0i0p0.nc>
Variable: Opt
Type: logical
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 18
WgtFileName : /g/data1/ua8/CMIP5_ocean_processing/masks/FGOALS-g2/FGOALS-g2_-80--25_1x1_level0_weights.nc<http://weights.nc>
SrcGridMask : <ARRAY of 21240 elements>
RemovePETLog : True
RemoveWgtFile : False
RemoveDstFile : True
RemoveSrcFile : True
DstRegional : True
DstURCorner : ( -25, 359 )
DstLLCorner : ( -80, 0 )
DstGridLon : <ARRAY of 360 elements>
DstGridLat : <ARRAY of 56 elements>
SrcRegional : True
SrcGridLon : <ARRAY of 360 elements>
SrcGridLat : <ARRAY of 54 elements>
ForceOverwrite : True
InterpMethod : bilinear
DstFileName : tmp2.nc<http://tmp2.nc>
SrcFileName : tmp1.nc<http://tmp1.nc>
University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180820/c4601d99/attachment.html>
More information about the ncl-talk
mailing list