Change projection of netcdf data and convert from UTM to lat/lon

20 vues (au cours des 30 derniers jours)
Louise Wilson
Louise Wilson le 27 Nov 2021
Commenté : Louise Wilson le 30 Nov 2021
I have a netcdf file
vardata=ncread('TL__Map1_15C_sand1__20mres_-36.265137N_174.790466','TLdata');
ncdisp('TL__Map1_15C_sand1__20mres_-36.265137N_174.790466')
Source:
X:\Matlab Scripts\TL__Map1_15C_sand1__20mres_-36.265137N_174.790466
Format:
netcdf4
Global Attributes:
description = 'TL data set TLmaps/TL__Map1_15C_sand1__20mres_-36.265137N_174.790466'
history = 'Created Fri Nov 12 09:55:31 2021'
source = 'netCDF4 python module tutorial'
Dimensions:
ilat = 280
ilon = 489
ifreq = 91
Variables:
TLdata
Size: 91x489x280
Dimensions: ifreq,ilon,ilat
Datatype: single
Attributes:
least_significant_digit = 2
units = 'dB'
H_latdata
Size: 280x1
Dimensions: ilat
Datatype: single
Attributes:
units = 'degN or m'
H_londata
Size: 489x1
Dimensions: ilon
Datatype: single
Attributes:
units = 'degE or m'
H_freqdata
Size: 91x1
Dimensions: ifreq
Datatype: single
Attributes:
units = 'Hz'
I know that the projection is WGS 1984 Mercator 41 and the lat/lon coordinates are in UTM.
I would like to be able to convert this grid to lat/lon, can anyone help?

Réponse acceptée

Louise Wilson
Louise Wilson le 30 Nov 2021
I have since realised that it is not logical to modify the spatial data in this way as it would break the regularity.

Plus de réponses (1)

Rishabh Singh
Rishabh Singh le 29 Nov 2021
Hey Louise,
If you wish to convert the UTM to lat-lon cordinates I would suggest looking into UTM2LL.
Disclaimer: UTM2LL is a File Exchange submission. Please contact the author of UTM2LL in case of any issue.
  3 commentaires
Rishabh Singh
Rishabh Singh le 30 Nov 2021
Could you provide more insight on this issue of yours regarding lat/lon array of different sizes?
Louise Wilson
Louise Wilson le 30 Nov 2021
My latitude array is 280, and the longitude array is 489. It appears you cannot convert these using utm2ll or utm2deg. I have answered this question as I understand now that it's not appropriate to convert the array in the first place.

Connectez-vous pour commenter.

Tags

Produits


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by