Project

General

Profile

Help with proj package

Added by Álvaro Sánchez over 3 years ago

Hello everyone nice to be here.
I'm quite new in cdo so maybe my mistakes are stupid but I've been days with this and I'm lost
I'm struggling with cdo and the remaps options.
I'm trying to work with a WRF output, but cdo can't read the grid and it says generic (it is a lambert confortmal projection) so when I try to apply a cdo operator it says:
Warning (cdfScanVarAttr): NetCDF: Variable not found - >XLONG<
Warning (cdfScanVarAttr): NetCDF: Variable not found - >XLAT<
Warning (cdfScanVarAttr): NetCDF: Variable not found - >XTIME<

and the grid desapears
That's my first problem.

So I thought about creating a lambert confortmal grid by myself and do setgrid, and it works but:
gridtype = projection
gridsize = 42966
xsize = 186
ysize = 231
xname = x
xunits = "m"
yname = y
yunits = "m"
xfirst = 00
xinc = 10000
yfirst = 00
yinc = 10000
grid_mapping = Lambert_Conformal
grid_mapping_name = lambert_conformal_conic
false_easting = 0.
false_northing = 0.
standard_parallel = 60.0,50.0
longitude_of_central_meridian = -70.
latitude_of_projection_origin = 52.
earth_radius = 6370000.
longitudeOfFirstGridPointInDegrees = -70.000
latitudeOfFirstGridPointInDegrees = 40.000

No matter which longitud and latitude I put for first grid point it always appears at the same place near those coordinates but not exactly what I want, like at 60lat -80 lon whatever value I give to those two last variables of the grid. So that's another problem

But I thought ok, as far as I want to interpolate those data to the daymet 1km resolution I will just try to remap those data even with a moved grid to the daymet grid which is curvilinear, but this appears:
cdo remapbil (Abort): proj library support not compiled in!

and I don't understand why, because I have proj 7.1.1 and cdo 1.9.8 installed so I don't know what's happening.

I am desperate, please can anyone help me?

Thank you very very much really need help here.


Replies (7)

RE: Help with proj package - Added by Karin Meier-Fleischer over 3 years ago

Hi Alvaro,

can you upload the file? Or upload the output of 'ncdump -h infile'.

-Karin

RE: Help with proj package - Added by Álvaro Sánchez over 3 years ago

Hello Karin really appreciate your help here I really need it.
So this are the ncdump that I attached:
extremos.nc : Here is the ncdump -h for the wrf output, which is lambert conformal and I have projected it in panoply and everything is fine.
tmaxnc.nc: ncdump -h for the file that results when I apply any cdo operator to the wrf output, for example here I just did selname and Warning (cdfScanVarAttr): NetCDF: Variable not found - >XLONG<
Warning (cdfScanVarAttr): NetCDF: Variable not found - >XLAT<
Warning (cdfScanVarAttr): NetCDF: Variable not found - >XTIME<
this happens, so it results in a generic grid which sucks.
mediobueno.nc: Here is my manual fix for the wrfoutput tmax, I just wrote a grid by myself and setgrid the tmax(which has generic grid) and the problem with this is that the longitude and latitude don't fit the reality, and if I change the last two variables of the gridfile that I put on my first question nothing changes, it always is at the same spot, as you can see in the attached .png.
Lastly daylenght: Those are the dates that I want to interpolate to. I have a WRF simulation and I want to validate that simulation and for that I have to compare it with observational data, which comes from daymet. So my boss told me that the best way is to interpolate the wrfout to the daymet grid, so here is the ncdump -h of those data, I did sellonlat for working just near my grid but is data for the whole north america.
But when I try to aplply any remap operator the cdo remapbil (Abort): proj library support not compiled in! appears in the screen so I don't know what to do
So I'm not sure about what I'm doing felt lost.
Thank you very much Karin I wish you could now how relieve feel to me to have some support so I really appreciate your help.
Best wishes.
Alvaro

RE: Help with proj package - Added by Álvaro Sánchez over 3 years ago

Hi Karin.
How is it going?
Can you find the mistake?
Thank you very much, I don't want to bother you but I'm really deperate
Cheers

RE: Help with proj package - Added by Álvaro Sánchez over 3 years ago

Hiiii someone please help me I need it.
:)

RE: Help with proj package - Added by Karin Meier-Fleischer over 3 years ago

I'll have a look at it today.

RE: Help with proj package - Added by Karin Meier-Fleischer over 3 years ago

  1. In extremos.nc the coordinate variables XLAT, XLONG, XTIME are missing. they are used in the attribute coordinates of the variables.
    Without the correct XLAT, XLONG and XTIME you won't be able to get a correct result. You should get it where you got the WRF data file from.
  2. The CDO program is not compiled with the proj library. Please, send the output of 'cdo -V'.

You have to solve the coordinates problem first and maybe upgrade to the newest CDO version (with proj).

RE: Help with proj package - Added by Álvaro Sánchez over 3 years ago

I don't really understand the first part, that's a wrf output but I think I can manage it, once I find it how can I set it to the data?
And this is my cdo -V
Climate Data Operators version 1.9.8 (https://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: g++ -std=gnu++11 -g -O2 -fopenmp
CXX version : g++ (GCC) 4.9.3
C Compiler: gcc -std=gnu99 -g -O2 -fopenmp
C version : gcc (GCC) 4.9.3
F77 Compiler: gfortran -g -O2
F77 version : GNU Fortran (GCC) 4.9.3
Features: 62GB 64threads C++11 Fortran DATA PTHREADS OpenMP HDF5 NC4/HDF5 OPeNDAP SZ SSE2
Libraries: HDF5/1.8.21
Filetypes: srv ext ieg grb1 nc1 nc2 nc4 nc4c nc5
CDI library version : 1.9.8
cgribex library version : 1.9.4
NetCDF library version : 4.7.4 of Sep 30 2020 12:57:48 $
hdf5 library version : 1.8.21
exse library version : 1.4.1
FILE library version : 1.8.3

And I have proj 7.1.1 load so I don't understand why is not compiled

    (1-7/7)