[ncl-talk] Solar Irradiation help

Dennis Shea shea at ucar.edu
Mon Dec 14 09:04:14 MST 2015


[1]
Please look at Example 1 at:
   http://www.ncl.ucar.edu/Document/Functions/Crop/radsol_fao56.shtml
It prints out a value. Not an image.

However, it has nothing to do with what you want.

---
[2]
>From *your* netCDF dump

float COSZEN(Time, south_north, west_east) ;
COSZEN:FieldType = 104 ;
COSZEN:MemoryOrder = "XY " ;
COSZEN:description = "COS of SOLAR ZENITH ANGLE" ;
COSZEN:units = "dimensionless" ;
COSZEN:stagger = "" ;
COSZEN:coordinates = "XLONG XLAT" ;


'COSZEN' is a variable on the file containing the cosine (COS) of the
(presumably) solar zenith angle.

if you want to print (ascii) the output the

    f = addfile("...",'r")
    cz = f->COSZEN   ; cosine of the zenith angle
    print(cz)

or
   rad = 4.0*atan(1)/180.
   cza = acos(cz)/rad
   cza at long_name = "zenith angle in degrees"
   print(cza)

https://www.ncl.ucar.edu/Document/Functions/Built-in/acos.shtml

You could print both

  print(cz+"   "+cza)

You could add (say) latitude to the print

  xlat = f->XLAT

print(xlat+"  "+cz+"   "+cza)

The above will print out all 25 time stems ate every grid point.

If you want a specific time

   nt = 5     ; example
   print(xlat(nt,:,:)+"  "+cz(nt,:,:)+"   "+cza(nt,:,:))

If at a specific grid point

   nl = 3
   ml = 4
   print(xlat(nt,nl,ml)+"  "+cz(nt,nl,ml)+"   "+cza(nt,nl.ml))  ; one time

all times at specifed grid point
   print(xlat(:,nl,ml)+"  "+cz(:,nl,ml)+"   "+cza(:,nl,ml))

---
[3]
ncl-talk people voluntarily like to help people. We are *not* paid to
answer questions.
We have our own jobs to do also. The above is basic NCL.

Please expend some time reading: https://www.ncl.ucar.edu/Document/Manuals/

(a) Mini-Language Manual
(b) the DKRZ tutorials

Good Luck




On Wed, Dec 9, 2015 at 6:59 PM, isakhar sakhar isakhar
<isakhar.inside13 at gmail.com> wrote:
> Dear Mrs.Mary
> How are you?
>
> Actually I am really interesting want to see the result of solar radiation
> in ASCII output file in one day simulation like I did  for wind speed and
> wind direction inside my script (attached file: script.txt)
> I wrote COSZEN inside my script because I only see COSZEN inside my ncdump
> file (attached file: ncdump.txt) which explain about SOLAR.
>
> By looking at the tutorial page about crop, the output of simulation will be
> image, but what I want is TEXT or ASCII in one day simulation. I really want
> to see the output of solar radiation in TEXT file. So, I really hope that
> you can help me to fix my script.
>
> Thank you. Have a nice day.
>
> Regards,
> Soares
>
>
> On Wed, Dec 9, 2015 at 5:01 PM, Mary Haley <haley at ucar.edu> wrote:
>>
>> What is the error message?  Also, what is COSZEN? This is not one of our
>> functions.
>>
>> These functions are part of an unreleased version of NCL. You can get the
>> a version of the code from this page:
>>
>> http://www.ncl.ucar.edu/Applications/crop.shtml
>>
>> --Mary
>>
>>
>> On Wed, Dec 9, 2015 at 2:04 AM, isakhar sakhar isakhar
>> <isakhar.inside13 at gmail.com> wrote:
>>>
>>> Dear NCL Team
>>>
>>> I just  read tutoarial page
>>> http://www.ncl.ucar.edu/Document/Functions/Crop/radsol_fao56.shtml  about
>>> solar irradiation. I just input the code below to my script but after
>>> running simulation I get error. I am really interesting to find solar
>>> irradiation.
>>>
>>>
>>>
>>> ;*************************************************************************************
>>>     ;  - Radiation SOlar
>>>
>>> ;*************************************************************************************
>>>
>>>   jday   = 135
>>>   lat    = -8.550740
>>>   sunhr  = 220.0/31.0   ; average daily sunshine hours
>>>   radsol = COSZEN(jday, lat, sunhr, 0, False)
>>>
>>>   printVarSummary(radsol)
>>>
>>>
>>>
>>> I will apreciate for your help,
>>>
>>> regards,
>>> Soares
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list