Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:19:21+00:00 2026-06-17T23:19:21+00:00

how can I do a inverse coordinate transformation in the netcdf file ? I

  • 0

how can I do a inverse coordinate transformation in the netcdf file ?
I have a grid with 75 longitude values and 36 latitude values:

nc<-create.n("filename.nc")
#Dimentions
dim.def.nc(nc,"lon",75)
dim.def.nc(nc,"lat",36)
dim.def.nc(nc,"time",365)
#Vars
var.def.nc(nc,"Observation","NC_FLOAT", c(1,0,2))
var.def.nc(nc,"lon","NC_FLOAT", c(0))
var.def.nc(nc,"lat","NC_FLOAT", c(1))
var.def.nc(nc,"time","NC_FLOAT", c(2))
(...)

According to the documentation in unidata, it should be possible to have the netcdf doing the inverse transformation from (lat,lon) to (x,y), but I don’t have any idea how I can perform this. I want to transfor my lat long grid to a Lambert Conformal grid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:19:22+00:00Added an answer on June 17, 2026 at 11:19 pm

    This is the way I proceed myself to reproject a netCDF file: basically I grab the longitude, the latitude and the data I want and create a shapefile that I can then work with with packages rgdal, sp and maptools. (The example here uses data from NOAA downloaded here)

    library(ncdf)
    library(rgdal)
    library(sp)
    library(maptools)
    nc <- open.ncdf("20130128-ABOM-L4HRfnd-AUS-v01-fv01_0-RAMSSA_09km.nc")
    
    # Grab the longitude, latitude and data
    lon <- nc$dim$lon$vals
    lat <- nc$dim$lat$vals
    sst <- get.var.ncdf(nc,"analysed_sst")
    
    # Create a SpatialPointsDataFrame object
    lonlat <- expand.grid(lon,lat)
    sst <- as.data.frame(matrix(sst,ncol=1))
    dat <- SpatialPointsDataFrame(lonlat, data=sst,
                                  proj4string=CRS("+proj=longlat +datum=WGS84 "))
    
    # And then reproject
    dat2 <- spTransform(dat,CRS("+proj=lcc"))  
    # Of course you have to write the proj4 string that corresponds exactly to the desired projection.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain the use of inverse in the xml mapping file, I am
Can a Core Data relationship be its own inverse relationship? I have a generalized
Can anyone provide/refer to the inverse of the 'indices -> offset'* transformation for Multi-Dimensional
Am new to ruby. Can any one tell me how to find inverse of
Can I order my users in the database, so I don't have to say
How can I take the reciprocal (inverse) of floats with SSE instructions, but only
The inverse question of How can I transform XML into a List or String[]?
I can't find the type of problem I have and I was wondering if
I have an entity called User which can have a list of other Users
Basically I have the inverse of this problem: Python Time Seconds to h:m:s I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.