[ncl-talk] (I)PV units?

Kacie Shourd Kacie.Shourd at dri.edu
Thu Sep 8 10:35:33 MDT 2016


Hey, Dennis!

We did discuss this at the workshop, and I have made all of the appropriate (or I thought I had) changes. In the version(s) of the script that I have, my “load "/grid-scratch/kshourd/code/potVortCFD.ncl” is not commented out. Would there be any other reason this is not working for me? As far as I can tell, the potential vorticity function doesn’t work at all unless the “grad_latlon_cfd” function is used, because I had previously tried that and received a ton of errors.

I will give the functions you have attached a try and see if that works instead!!

I appreciate your help!

Best regards,
Kacie

From: Dennis Shea [mailto:shea at ucar.edu]
Sent: Thursday, September 08, 2016 8:13 AM
To: Kacie Shourd <Kacie.Shourd at dri.edu>
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] (I)PV units?

Hi Kacie,
I see the  issue.
As noted in the documentation:
   http://www.ncl.ucar.edu/Document/Functions/Contributed/pot_vort_isobaric.shtml

   "Compute potential vorticity on isobaric levels and a global rectilinear grid."
----
After you regrid, you have a rectilinear grid. However, it is not "global." EG:

Variable: tkReGr
Number of Dimensions: 3
Dimensions and sizes:   [lv_ISBL3 | 29] x [lat | 337] x [lon | 831]
Coordinates:
            lv_ISBL3: [100..1000]
            lat: [   1..  85]                         <====   Regional grid
            lon: [ 150..358.5]                   <====
The 'pot_vort_isobaric' function uses spherical harmonic functions to calculate the required meridional and zonal gradients. The spherical harmonic functions are "highly accurate" however they require global grids.

===
As I recall, in the summer NCL Workshop, we discussed this issue. :-)
As an exercise, I suggested that you copy and modify 'pot_vort_isobaric' to use the 6.4.0 'grad_latlon_cfd' function to replace the spherical harmonic gradient functions.

   http://www.ncl.ucar.edu/Document/Functions/Contributed/grad_latlon_cfd.shtml
Some gradient examples are at: http://www.ncl.ucar.edu/Applications/gradients.shtml

Actually, in your script, you have a commented line:
   ;load "/grid-scratch/kshourd/code/potVortCFD.ncl"
So .... it looks like you have a created a function but you did not use it???

===
I decided to create a function 'pot_vort_isobaric_cfd'. It has slightly different arguments.
See attached.
Likely, I will include 'pot_vort_isobaric_cfd' in the 6.4.0 release as part of contributed.ncl

D


On Wed, Sep 7, 2016 at 12:31 PM, Kacie Shourd <Kacie.Shourd at dri.edu<mailto:Kacie.Shourd at dri.edu>> wrote:
Hi all,

I am encountering some problems with my potential vorticity (PV) and subsequent isentropic potential vorticity calculations (IPV). The patterns I am getting look right, but the magnitude of the values does not make sense. I assume pot_vort_isobaric() function outputs in raw units rather than PVUs?

I have checked my units/script over and over and over again, and cannot figure out why the values are a few orders of magnitude off. It seems as though maybe my pressure values are being input into the equations wrong (or some other variable is). The patterns of PV make sense for the event, but the magnitude is most certainly wrong.

Any insight into what I am doing wrong or any other reasons the calculated PV values are coming out  really large. Scripts, output, and necessary files to run script can be found here: ftp://pubfiles.dri.edu/pub/kshourd/nclTalkIPVHelp/ , and variable summaries are as follows:

---
Variable: tkReGr
Type: float
Total Size: 32485452 bytes
            8121363 values
Number of Dimensions: 3
Dimensions and sizes:   [lv_ISBL3 | 29] x [lat | 337] x [lon | 831]
Coordinates:
            lv_ISBL3: [100..1000]
            lat: [   1..  85]
            lon: [ 150..358.5]
Number Of Attributes: 15
  sub_center :  The North American Regional Reanalysis (NARR) Project
  center :      US National Weather Service - NCEP (WMC)
  long_name :   Temperature
  units :       K
  _FillValue :  1e+20
  level_indicator :     100
  grid_number : 221
  parameter_table_version :     131
  parameter_number :    11
  model :       North American Regional Reanalysis (NARR)
  forecast_time :       0
  forecast_time_units : hours
  initial_time :        09/26/2010 (18:00)
  remap :       remapped via ESMF_regrid_with_weights: Bilinear
  missing_value :       1e+20

---
Variable: uN
Type: float
Total Size: 32485452 bytes
            8121363 values
Number of Dimensions: 3
Dimensions and sizes:   [lv_ISBL3 | 29] x [lat | 337] x [lon | 831]
Coordinates:
            lv_ISBL3: [100..1000]
            lat: [   1..  85]
            lon: [ 150..358.5]
Number Of Attributes: 15
  sub_center :  The North American Regional Reanalysis (NARR) Project
  center :      US National Weather Service - NCEP (WMC)
  long_name :   u-component of wind
  units :       m/s
  _FillValue :  1e+20
  level_indicator :     100
  grid_number : 221
  parameter_table_version :     131
  parameter_number :    33
  model :       North American Regional Reanalysis (NARR)
  forecast_time :       0
  forecast_time_units : hours
  initial_time :        09/26/2010 (18:00)
  remap :       remapped via ESMF_regrid_with_weights: Bilinear
  missing_value :       1e+20

---
Variable: vN
Type: float
Total Size: 32485452 bytes
            8121363 values
Number of Dimensions: 3
Dimensions and sizes:   [lv_ISBL3 | 29] x [lat | 337] x [lon | 831]
Coordinates:
            lv_ISBL3: [100..1000]
            lat: [   1..  85]
            lon: [ 150..358.5]
Number Of Attributes: 15
  sub_center :  The North American Regional Reanalysis (NARR) Project
  center :      US National Weather Service - NCEP (WMC)
  long_name :   v-component of wind
  units :       m/s
  _FillValue :  1e+20
  level_indicator :     100
  grid_number : 221
  parameter_table_version :     131
  parameter_number :    34
  model :       North American Regional Reanalysis (NARR)
  forecast_time :       0
  forecast_time_units : hours
  initial_time :        09/26/2010 (18:00)
  remap :       remapped via ESMF_regrid_with_weights: Bilinear
  missing_value :       1e+20

---
Variable: p
Type: integer
Total Size: 116 bytes
            29 values
Number of Dimensions: 1
Dimensions and sizes:   [lv_ISBL3 | 29]
Coordinates:
            lv_ISBL3: [100..1000]
Number Of Attributes: 2
  long_name :   isobaric level
  units :       Pa

---
Variable: thetaN
Type: float
Total Size: 32485452 bytes
            8121363 values
Number of Dimensions: 3
Dimensions and sizes:   [lv_ISBL3 | 29] x [lat | 337] x [lon | 831]
Coordinates:
            lv_ISBL3: [100..1000]
            lat: [   1..  85]
            lon: [ 150..358.5]
Number Of Attributes: 5
  _FillValue :  1e+20
  long_name :   potential temperature
  units :       K
  remap :       remapped via ESMF_regrid_with_weights: Bilinear
  missing_value :       1e+20

--- (FROM tkReGr&lv_ISBL3)
Variable: p
Type: integer
Total Size: 116 bytes
            29 values
Number of Dimensions: 1
Dimensions and sizes:   [lv_ISBL3 | 29]
Coordinates:
Number Of Attributes: 2
  long_name :   isobaric level
  units :       Pa

---
Variable: ipv
Type: float
Total Size: 4480752 bytes
            1120188 values
Number of Dimensions: 3
Dimensions and sizes:   [thlev | 4] x [lat | 337] x [lon | 831]
Coordinates:
            thlev: [325..370]
            lat: [   1..  85]
            lon: [ 150..358.5]
Number Of Attributes: 4
  _FillValue :  1e+20
  long_name :   Isentropic Potential Vorticity at 325K
  short_name :  IPV
  units :       K m2/kg/s


Thanks!!
Best,
Kacie
---
Kacie N. Shourd
드림

Graduate Research Assistant
Desert Research Institute
Kacie.Shourd at dri.edu<mailto:Kacie.Shourd at dri.edu>
Work: (775) 674-7049<tel:%28775%29%20674-7049>


PUBLIC RECORDS NOTICE: In accordance with NRS Chapter 239, this email and responses, unless otherwise made confidential by law, may be subject to the Nevada Public Records laws and may be disclosed to the public upon request.

_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160908/5623343f/attachment.html 


More information about the ncl-talk mailing list