Short wave radiation

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
DanielThewes
Posts: 3
Joined: Sun Mar 26, 2017 7:15 pm
Location: Institut für Chemie und Biologie der Meere

Short wave radiation

#1 Unread post by DanielThewes »

Hello,
I've encountered a problem with shortwave radiation. There is a semidiurnal cycle, with a peak, about 2-3hours wide.

At first, I used analytical SWR, with only the flags ALBEDO and ANA_SRFLUX, then I put DIURNAL_SRFLUX as well, seeing no change. Then I replaced the cloud forcing (from NCEP) by analytical clouds (ANA_CLOUD), again no change, then I replaced ANA_SRFLUX with SWR data from NCEP, which also brought no change to the cycle period, although the peaks appear to be wider. I've tried all thinkable flag combinations I came across. The results qualitatively remain the same

I wonder what I'm doing wrong. Has anyone got an idea?
Thank you in advance,
Daniel

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

Re: Short wave radiation

#2 Unread post by wilkin »

How do you know you are running with a semidiurnal cycle in shortwave radiation? Is it because you have

Code: Select all

Hout(idSrad) == T       ! swrad              shortwave radiation flux
and relatively frequent output intervals (set with NHIS). That's the quickest way to see what ROMS is reading or computing internally.

There are other things to check. Look carefully at stdout (the "log file") to see what inputs ROMS is processing. If you have asked to read from a netcdf file (you said you tried NCEP) then stdout should show every record read from the netcdf file and the min and max values of the data.

Reading from netcdf is the default if you have not defined ANA_SRFLUX.

However, to activate the use of shortwave radiation penetration into the water column separate from the net heat flux you also need to #define SOLAR_SOURCE. If that is not defined then ROMS won't read from netcdf.

Using #define ANA_SRFLUX you'll need to customize the Functional ana_srflux.h.

At the end of a run ROMS reports the Functionals that it compiled. This is at the very end of the stdout. You'll see something like:

Code: Select all

 Analytical header files used:
     ROMS/Functionals/ana_btflux.h
     ROMS/Functionals/ana_srflux.h
Make sure you see the path to the version of ana_srflux.h that you configured for you application.

If that is all good, then you can also check how the preprocessed code appears - the code that goes to the compiler.

This will be in Build/analytical.f90

Search for the string ana_srflux_tile and check that your customized code is there. Since you have #define DIURNAL_SRFLUX you should see that code, but you'll also want to see whatever is setting the daily average value of srflux that gets modulated by the DIURNAL_SRFLUX option.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

DanielThewes
Posts: 3
Joined: Sun Mar 26, 2017 7:15 pm
Location: Institut für Chemie und Biologie der Meere

Re: Short wave radiation

#3 Unread post by DanielThewes »

Hi,
thanks for replying!
How do you know you are running with a semidiurnal cycle in shortwave radiation? Is it because you have
Code:
Hout(idSrad) == T ! swrad shortwave radiation flux

and relatively frequent output intervals (set with NHIS). That's the quickest way to see what ROMS is reading or computing internally.
Yes, I see the variable in NCVIEW and NHIS == 15, so it writes out every half hour in model time.
At the end of a run ROMS reports the Functionals that it compiled. This is at the very end of the stdout. You'll see something like:
Code:
Analytical header files used:
ROMS/Functionals/ana_btflux.h
ROMS/Functionals/ana_srflux.h

Make sure you see the path to the version of ana_srflux.h that you configured for you application.
I checked this, and it's 'ROMS/Functionals/ana_srflux.h'.
There are other things to check. Look carefully at stdout (the "log file") to see what inputs ROMS is processing. If you have asked to read from a netcdf file (you said you tried NCEP) then stdout should show every record read from the netcdf file and the min and max values of the data.
I've checked this and it says that (as expected) cloud fraction is read in every 6 hours starting at 3am, so the second data point is read in after the swrad peaks have decayed to zero. Turning off ANA_SRFLUX and SOLAR_SOURCE meant that the SWR-file is read in, according to the stdout. However, while stdout says:
GET_2DFLD - solar shortwave radiation flux, 2012-01-01 00:00:00.00
(Grid=01, Rec=0000001, Index=1, File: NWS_meteo_SWR_forcing.nc)
(Tmin= 0.0000 Tmax= 181.7500) t = 0.0000
(Min = 1.00000000E+35 Max = -1.00000000E+35) regrid = T
,
the swrad variable now is all 0. I find this really confusing. The file format should be fine and there is data in the files. The stdout says Tmax=181.75, which is in the right orders, but the global max in the file is 216Wm-2.

Also, if it would work with NCEP-files, I still wonder why the analytical SWR is semidiurnal.

Thank you for your help.

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

Re: Short wave radiation

#4 Unread post by kate »

Tmax is a time, not the value. For values, you have:
(Min = 1.00000000E+35 Max = -1.00000000E+35)
which looks like it didn't find any valid values.

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

Re: Short wave radiation

#5 Unread post by wilkin »

GET_2DFLD - solar shortwave radiation flux, 2012-01-01 00:00:00.00
(Grid=01, Rec=0000001, Index=1, File: NWS_meteo_SWR_forcing.nc)
(Tmin= 0.0000 Tmax= 181.7500) t = 0.0000
(Min = 1.00000000E+35 Max = -1.00000000E+35) regrid = T
Tmin/Tmax are the times in days.

The values are the Min/Max and you have 1.00000000E+35 !!!
so there are some missing values /NaNs in there which will give trouble.

If ROMS has read solar shortwave radiation flux then it didn't use code in ana_srflux.h. That Functional was only used because of DIURNAL_SRFLUX. Look in Build/analytical.f90 and you'll see only the default code to set the actual radiation.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

DanielThewes
Posts: 3
Joined: Sun Mar 26, 2017 7:15 pm
Location: Institut für Chemie und Biologie der Meere

Re: Short wave radiation

#6 Unread post by DanielThewes »

I see! Well this is wrong...
I rechecked the file a few times and it turns out I had the latitude upside down. Now it works with NCEP. Thank you for the advice! It helped a lot!

Daniel

Post Reply