7
$\begingroup$

I would like to calculate the latitude values of a Gaussian Grid of a size of my choosing. Unfortunately, I didn't find a method or a formula to do so. Where can I find this information? Alternatively, is there a function publicly available that can do the job?

$\endgroup$
  • $\begingroup$ What do you mean by calculate? How are you setting the grid up? Latitude is one coordinate of the Gaussian Grid. It is set up like a grid in spherical coordinates. $\endgroup$ – BarocliniCplusplus Mar 16 '17 at 15:21
  • 1
    $\begingroup$ The Gaussian grid of a specified size only has points at certain latitudes (as e.g. shown in the image of the linked Wikipedia article). I would like to calculate these latitude values. $\endgroup$ – Ethunxxx Mar 16 '17 at 15:25
  • $\begingroup$ HINT: NCL can do it if you can get the google search right. I mean there is a function in NCL to do this. :-) Heck if I am going to share it ;-) $\endgroup$ – gansub Mar 16 '17 at 16:22
  • $\begingroup$ @gansub, I looked it up. You are right! If you like you can post this as an answer and I will then accept it. $\endgroup$ – Ethunxxx Mar 17 '17 at 8:02
  • $\begingroup$ @Ethunxxx - if you are not happy with NCL then just download the source code and look at the method gaus and translate that into your favorite programming language. $\endgroup$ – gansub Mar 17 '17 at 15:57
5
$\begingroup$

I believe the NCL function NCL gaus should be able to give you the solution you are looking for. From the API documentation you are requested to provide - the number of latitude points per hemisphere and you should get Gaussian latitudes and Gaussian weights.

Here is a code sample from their website

nlat = 64  ; for globe
gau_info = gaus(nlat/2)   ; divide by 2 to get "per hemisphere"
glat     = gau_info(:,0)  ; gaussian latitudes ( 1st dimension of gau_info)
gwgt     = gau_info(:,1)  ; gaussian weights   ( 2nd dimension of gau_info) 
$\endgroup$
4
$\begingroup$

if you want pure python

conda install cdms2 -c conda-forge

then in python:

lats = cdms2.createGaussianAxis(128)

you can also create a full lat/lon grid:

grid = cdms2.createGaussianGrid(128)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.