Problem with diurnal cycle of shortwave radiation

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
wiltonwang

Problem with diurnal cycle of shortwave radiation

#1 Unread post by wiltonwang »

It seems that the option "DIURNAL_SRFLUX" is necessary to be enabled when I focus the mix layer depth.
ROMS calculats the diurnal cycle of shortwave radiation with the formula

cff1=SIN(LatRad)*SIN(Dangle)
cff2=COS(LatRad)*COS(Dangle)
and cff=(cff1*ACOS(-cff1/cff2)+SQRT(cff2*cff2-cff1*cff1))/pi

My problem is the cff1/cff2 is a value great than 1 that means the ACOS() is invalid in this time.

my region is from 78S to 70N and 0E to 360, how to resolve this problem ?

By the way, the reference paper to calculated the diurnal cycle of shortwave radiation is not listed in ROMS.

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Problem with diurnal cycle of shortwave radiation

#2 Unread post by wilkin »

ygwang_FIO wrote:It seems that the option "DIURNAL_SRFLUX" is necessary to be enabled when I focus the mix layer depth.
ROMS calculats the diurnal cycle of shortwave radiation with the formula

cff1=SIN(LatRad)*SIN(Dangle)
cff2=COS(LatRad)*COS(Dangle)
and cff=(cff1*ACOS(-cff1/cff2)+SQRT(cff2*cff2-cff1*cff1))/pi

My problem is the cff1/cff2 is a value great than 1 that means the ACOS() is invalid in this time.

my region is from 78S to 70N and 0E to 360, how to resolve this problem ?

By the way, the reference paper to calculated the diurnal cycle of shortwave radiation is not listed in ROMS.
If cff2 < cff1 the sun is below the horizon. This can be seen in the ALBEDO code for analytical shortwave radiation based on latitude and year-day. While this does lead to a complex ACOS result the case is trapped by the srflx = max(0,...) statement.

The code notes that the so-called 'albedo' calculation is documented in

! ALBEDO option: Compute shortwave radiation flux using the Laevastu
! cloud correction to the Zillman equation for cloudless
! radiation (Parkinson and Washington 1979, JGR, 84, 311-337). Notice
! that flux is scaled from W/m2 to degC m/s by dividing by (rho0*Cp).

The subsequent calculation of DIRUNAL_SRFLUX modulation is just a bit of math.

John.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Problem with diurnal cycle of shortwave radiation

#3 Unread post by kate »

I'm now getting a problem when the sun is very near the horizon (December in the Chukchi Sea). In the code:

Code: Select all

            cff=(cff1*ACOS(-cff1/cff2)+SQRT(cff2*cff2-cff1*cff1))/pi
            srflx(i,j)=MAX(0.0_r8,                                      &
     &                     srflx(i,j)/cff*                              &
     &                     (cff1+cff2*COS(Hangle-lonr(i,j)*deg2rad)))
I have
  • cff=-1.5890952880675496E-013
  • cff1=-0.3648175112485696
  • cff2=0.3648175119668081
  • srflx(i,j)=174166.8878345824
Dividing by such a small number as cff seems like a bad idea - any suggestions?

Asuk
Posts: 1
Joined: Thu Jun 09, 2011 2:10 pm
Location: University of Copenhagen

Re: Problem with diurnal cycle of shortwave radiation

#4 Unread post by Asuk »

kate wrote:I'm now getting a problem when the sun is very near the horizon (December in the Chukchi Sea). In the code:

Code: Select all

            cff=(cff1*ACOS(-cff1/cff2)+SQRT(cff2*cff2-cff1*cff1))/pi
            srflx(i,j)=MAX(0.0_r8,                                      &
     &                     srflx(i,j)/cff*                              &
     &                     (cff1+cff2*COS(Hangle-lonr(i,j)*deg2rad)))
I have
  • cff=-1.5890952880675496E-013
  • cff1=-0.3648175112485696
  • cff2=0.3648175119668081
  • srflx(i,j)=174166.8878345824
Dividing by such a small number as cff seems like a bad idea - any suggestions?
Hi Kate
I am currently experiencing a similar problem and was wondering if you remember how you approached this problem. Did you just set cff to a more reasonable fixed value?

Marc

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Problem with diurnal cycle of shortwave radiation

#5 Unread post by kate »

Something like that:

Code: Select all

            cff=(cff1*ACOS(-cff1/cff2)+SQRT((cff2+cff1)*(cff2-cff1)))/pi
            IF (cff .lt. 10.e-10) THEN
              srflx(i,j)=0.0_r8
            ELSE
              srflx(i,j)=MAX(0.0_r8,                                      &   
     &                     srflx(i,j)/cff*                              &   
     &                     (cff1+cff2*COS(Hangle-lonr(i,j)*deg2rad)))
            END IF

Post Reply