FMS
2024.03
Flexible Modeling System
|
Provides astronomical variables for use by other modules within fms. The only currently used interface is for determination of astronomical values needed by the shortwave radiation packages. More...
Data Types | |
interface | annual_mean_solar |
Calculates the annual mean of solar information for a given latitude and time. More... | |
interface | daily_mean_solar |
Calculates the daily mean solar information for a given time and latitude. More... | |
interface | diurnal_solar |
Calculates solar information for the given location(lat & lon) and time. More... | |
interface | get_orbital_parameters |
interface | get_period |
Gets the length of year for current calendar. More... | |
interface | half_day |
Private interface for internal use by dirunal_solar and daily_mean_solar. More... | |
interface | set_period |
Sets the length of a year for the calendar in use. More... | |
Functions/Subroutines | |
real(kind=fms_ast_kind_) function | angle_ (t) |
angle determines the position within the earth's orbit at time t in the year (t = 0 at NH autumnal equinox) by interpolating into the orbital position table. More... | |
subroutine | annual_mean_solar_1d_ (jst, jnd, lat, cosz, solar, fracday, rrsun_out) |
annual_mean_solar_1d creates 2-d input fields from 1-d input fields and then calls annual_mean_solar_2d to obtain 2-d output fields which are then stored into 1-d fields for return to the calling subroutine. More... | |
subroutine | annual_mean_solar_2d_ (js, je, lat, cosz, solar, fracday, rrsun) |
annual_mean_solar_2d returns 2d fields of annual mean values of the cosine of zenith angle, daylight fraction and earth-sun distance at the specified latitude. More... | |
subroutine | annual_mean_solar_2level_ (lat, cosz, solar) |
annual_mean_solar_2level creates 2-d input fields from 1-d input fields and then calls annual_mean_solar_2d to obtain 2-d output fields which are then stored into 1-d fields for return to the calling subroutine. This subroutine will be called during model initialization. More... | |
subroutine, public | astronomy_end |
astronomy_end is the destructor for astronomy_mod. More... | |
subroutine, public | astronomy_init (latb, lonb) |
astronomy_init is the constructor for astronomy_mod. More... | |
subroutine | daily_mean_solar_0d_ (lat, time_since_ae, cosz, h_out, rr_out) |
daily_mean_solar_1d takes 1-d input fields, adds a second dimension and calls daily_mean_solar_2d. on return, the 2d fields are returned to the original 1d fields. More... | |
subroutine | daily_mean_solar_1d_ (lat, time_since_ae, cosz, h_out, rr_out) |
daily_mean_solar_1d takes 1-d input fields, adds a second dimension and calls daily_mean_solar_2d. on return, the 2d fields are returned to the original 1d fields. More... | |
subroutine | daily_mean_solar_2d_ (lat, time_since_ae, cosz, h_out, rr_out) |
daily_mean_solar_2d computes the daily mean astronomical parameters for the input points at latitude lat and time of year time_since_ae. More... | |
subroutine | daily_mean_solar_2level_ (lat, time_since_ae, cosz, solar) |
daily_mean_solar_2level takes 1-d input fields, adds a second dimension and calls daily_mean_solar_2d. on return, the 2d fields are returned to the original 1d fields. More... | |
subroutine | daily_mean_solar_cal_0d_ (lat, time, cosz, fracday, rrsun) |
daily_mean_solar_cal_0d converts scalar input fields to real, 2d variables and then calls daily_mean_solar_2d to compute desired astronomical variables. More... | |
subroutine | daily_mean_solar_cal_1d_ (lat, time, cosz, fracday, rrsun) |
daily_mean_solar_cal_1d receives time_type inputs, converts them to real, 2d variables and then calls daily_mean_solar_2d to compute desired astronomical variables. More... | |
subroutine | daily_mean_solar_cal_2d_ (lat, time, cosz, fracday, rrsun) |
daily_mean_solar_cal_2d receives time_type inputs, converts them to real variables and then calls daily_mean_solar_2d to compute desired astronomical variables. More... | |
subroutine | daily_mean_solar_cal_2level_ (lat, time, cosz, solar) |
daily_mean_solar_cal_2level receives 1d arrays and time_type input, converts them to real, 2d variables and then calls daily_mean_solar_2d to compute desired astronomical variables. More... | |
real(kind=fms_ast_kind_) function | declination_ (ang) |
Declination returns the solar declination angle at orbital position ang in earth's orbit. More... | |
subroutine | diurnal_solar_0d_ (lat, lon, gmt, time_since_ae, cosz, fracday, rrsun, dt, allow_negative_cosz, half_day_out) |
diurnal_solar_0d takes scalar input fields, makes them into 2d arrays dimensioned (1,1), and calls diurnal_solar_2d. on return, the 2d fields are converted back to the desired scalar output. More... | |
subroutine | diurnal_solar_1d_ (lat, lon, gmt, time_since_ae, cosz, fracday, rrsun, dt, allow_negative_cosz, half_day_out) |
diurnal_solar_1d takes 1-d input fields, adds a second dimension and calls diurnal_solar_2d. on return, the 2d fields are returned to the original 1d fields. More... | |
subroutine | diurnal_solar_2d_ (lat, lon, gmt, time_since_ae, cosz, fracday, rrsun, dt, allow_negative_cosz, half_day_out) |
diurnal_solar_2d returns 2d fields of cosine of zenith angle, daylight fraction and earth-sun distance at the specified latitudes, longitudes and time. These values may be instantaneous or averaged over a specified time interval. More... | |
subroutine | diurnal_solar_cal_0d_ (lat, lon, time, cosz, fracday, rrsun, dt_time, allow_negative_cosz, half_day_out) |
diurnal_solar_cal_0d receives time_type inputs, converts them to real variables and then calls diurnal_solar_2d to compute desired astronomical variables. More... | |
subroutine | diurnal_solar_cal_1d_ (lat, lon, time, cosz, fracday, rrsun, dt_time, allow_negative_cosz, half_day_out) |
diurnal_solar_cal_1d receives time_type inputs, converts them to real variables and then calls diurnal_solar_2d to compute desired astronomical variables. More... | |
subroutine | diurnal_solar_cal_2d_ (lat, lon, time, cosz, fracday, rrsun, dt_time, allow_negative_cosz, half_day_out) |
diurnal_solar_cal_2d receives time_type inputs, converts them to real variables and then calls diurnal_solar_2d to compute desired astronomical variables. More... | |
subroutine | get_orbital_parameters_ (ecc_out, obliq_out, per_out) |
get_orbital_parameters retrieves the orbital parameters for use by another module. More... | |
get_orbital_parameters_r4 | |
get_orbital_parameters_r8 | |
subroutine | get_period_integer (period_out) |
get_period_integer returns the length of the year as an integer number of seconds. More... | |
subroutine | get_period_time_type (period_out) |
get_period_time_type returns the length of the year as a time_type variable. More... | |
subroutine, public | get_ref_date_of_ae (day_out, month_out, year_out, second_out, minute_out, hour_out) |
get_ref_date_of_ae retrieves the reference date of the autumnal equinox as integer variables. More... | |
real(kind=fms_ast_kind_) function | half_day_0d_ (latitude, dec) |
half_day_0d takes scalar input fields, makes them into 2-d fields dimensioned (1,1), and calls half_day_2d. On return, the 2-d fields are converted to the desired scalar output. More... | |
real(kind=fms_ast_kind_) function, dimension(size(latitude, 1), size(latitude, 2)) | half_day_2d_ (latitude, dec) |
half_day_2d returns a 2-d array of half-day lengths at the latitudes and declination provided. More... | |
subroutine, private | orbit |
Orbit computes and stores a table of value of orbital angles as a function of orbital time (both the angle and time are zero at autumnal equinox in the NH, and range from 0 to 2*pi). More... | |
real(kind=r8_kind) function, public | orbital_time (time) |
Orbital time returns the time (1 year = 2*pi) since autumnal equinox. More... | |
real(kind=fms_ast_kind_) function | r_inv_squared_ (ang) |
r_inv_squared returns the inverse of the square of the earth-sun distance relative to the mean distance at angle ang in the Earth's orbit. More... | |
subroutine | set_orbital_parameters_ (ecc_in, obliq_in, per_in) |
set_orbital_parameters saves the input values of eccentricity, obliquity and perihelion time as module variables for use by astronomy_mod. More... | |
set_orbital_parameters_r4 | |
set_orbital_parameters_r8 | |
subroutine | set_period_integer (period_in) |
set_period_integer saves as the input length of the year (an integer) in a time_type module variable. More... | |
subroutine | set_period_time_type (period_in) |
Set_period_time_type saves the length of the year (input as a time_type variable) into a time_type module variable. More... | |
subroutine, public | set_ref_date_of_ae (day_in, month_in, year_in, second_in, minute_in, hour_in) |
set_ref_date_of_ae provides a means of specifying the reference date of the NH autumnal equinox for a particular year. More... | |
real(kind=r8_kind) function, public | universal_time (time) |
universal_time returns the time of day at longitude = 0.0 (1 day = 2*pi) More... | |
Variables | |
logical | annual_mean_calculated =.false. |
have the annual mean values been calculated? | |
type(time_type) | autumnal_eq_ref |
time_type variable containing specified time of reference NH autumnal equinox | |
real(r8_kind), dimension(:,:), allocatable | cosz_ann |
annual mean cos of zenith angle | |
integer | day_ae = 23 |
Day of specified autumnal equinox. | |
real(r8_kind) | deg_to_rad |
conversion from degrees to radians | |
real(r8_kind) | ecc = 0.01671_r8_kind |
Eccentricity of Earth's orbit [dimensionless]. | |
real(r8_kind), dimension(:,:), allocatable | fracday_ann |
annual mean daylight fraction | |
integer | hour_ae = 5 |
Hour of specified autumnal equinox. | |
integer | minute_ae = 37 |
Minute of specified autumnal equinox. | |
logical | module_is_initialized =.false. |
has the module been initialized ? | |
integer | month_ae = 9 |
Month of specified autumnal equinox. | |
integer | num_angles = 3600 |
Number of intervals into which the year is divided to compute orbital positions. | |
integer | num_pts = 0 |
count of grid_boxes for which annual mean astronomy values have been calculated | |
real(r8_kind) | obliq = 23.439_r8_kind |
Obliquity [degrees]. | |
real(r8_kind), dimension(:), allocatable | orb_angle |
table of orbital positions (0 to 2*pi) as a function of time used to find actual orbital position via interpolation | |
real(r8_kind) | per = 102.932_r8_kind |
Longitude of perihelion with respect to autumnal equinox in NH [degrees]. | |
integer | period = 0 |
Specified length of year [seconds]; must be specified to override default value given by length_of_year in time_manager_mod. | |
type(time_type) | period_time_type |
time_type variable containing period of one orbit | |
real(r8_kind) | rrsun_ann |
annual mean earth-sun distance | |
integer | second_ae = 0 |
Second of specified autumnal equinox. | |
real(r8_kind) | seconds_per_day = 86400.0_r8_kind |
seconds in a day | |
real(r8_kind), dimension(:,:), allocatable | solar_ann |
annual mean solar factor | |
integer | total_pts |
number of grid boxes owned by the processor | |
real(r8_kind) | twopi |
2 *PI | |
integer | year_ae = 1998 |
Year of specified autumnal equinox. | |
Provides astronomical variables for use by other modules within fms. The only currently used interface is for determination of astronomical values needed by the shortwave radiation packages.
interface astronomy_mod::annual_mean_solar |
Calculates the annual mean of solar information for a given latitude and time.
The second interface above is used by the spectral 2-layer model, which requires only cosz and solar as output arguments, and which makes this call during the initialization phase of the model. Separate routines exist within this interface for 1D or 2D input and output fields:
[in] | <jst> | Starting subdomain j indices of data in the physics wiondow being integrated |
[in] | <jnd> | Ending subdomain j indices of data in the physics wiondow being integrated |
[in] | <lat> | Latitudes of model grid points [radians] |
[out] | <cosz> | cosz is the average over the year of the cosine of an effective zenith angle that would produce the correct daily solar flux if the sun were fixed at that single position for the period of daylight on the given day. in this average, the daily mean effective cosz is weighted by the daily mean solar flux. [dimensionless] |
[out] | <solar> | Normalized solar flux, averaged over the year, equal to the product of fracday*cosz*rrsun [dimensionless] |
[out] | <fracday> | Daylight fraction calculated so as to make the average flux (solar) equal to the product of the flux-weighted avg cosz * this fracday * assumed annual mean avg Earth-Sun distance of 1.0. [dimensionless] |
[out] | <rrsun> | Annual mean Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 [dimensionless] |
Definition at line 253 of file astronomy.F90.
Private Member Functions | |
annual_mean_solar_1d_r4 | |
annual_mean_solar_1d_r8 | |
annual_mean_solar_2d_r4 | |
annual_mean_solar_2d_r8 | |
annual_mean_solar_2level_r4 | |
annual_mean_solar_2level_r8 | |
interface astronomy_mod::daily_mean_solar |
Calculates the daily mean solar information for a given time and latitude.
The first option (used in conjunction with time_manager_mod) generates the real variable time_since_ae from the time_type input time, and then calls daily_mean_solar with this real input (option 2). The third and fourth options correspond to the first and second and are used with then spectral 2-layer model, where only cosz and solar are desired as output. These routines generate dummy arguments and then call option 2, where the calculation is done.
The time of year is set by
With time_type input, the time of year is extracted from
Separate routines exist within this interface for scalar, 1D or 2D input and output fields:
[in] | <lat> | Latitudes of model grid points [radians] |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi [radians] |
[in] | <time> | Time at which astronomical values are desired (time_type variable) [seconds, days] |
[out] | <cosz> | Cosine of solar zenith angle, set to zero when entire period is in darkness [dimensionless] |
[out] | <fracday> | Daylight fraction of time interval [dimensionless] |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 [dimensionless] |
[out] | <solar> | shortwave flux factor: cosine of zenith angle * daylight fraction / (earth-sun distance squared) [dimensionless] |
Definition at line 206 of file astronomy.F90.
interface astronomy_mod::diurnal_solar |
Calculates solar information for the given location(lat & lon) and time.
The first option (used in conjunction with time_manager_mod) generates the real variables gmt and time_since_ae from the time_type input, and then calls diurnal_solar with these real inputs.
The time of day is set by
The time of year is set by
with time_type input, both of these are extracted from
Separate routines exist within this interface for scalar, 1D or 2D input and output fields:
One may also average the output fields over the time interval between gmt and gmt + dt by including the optional argument dt (or dt_time). dt is measured in radians and must be less than pi (1/2 day). This average is computed analytically, and should be exact except for the fact that changes in earth-sun distance over the time interval dt are ignored. In the context of a diurnal GCM, this option should always be employed to insure that the total flux at the top of the atmosphere is not modified by time truncation error.
[in] | <lat> | Latitudes of model grid points [radians] |
[in] | <lon> | Longitudes of model grid points [radians] |
[in] | <gmt> | Time of day at longitude 0.0; midnight = 0.0, one day = 2 * pi [radians] |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi [radians] |
[in] | <time> | Time at which astronomical values are desired (time_type variable) [seconds, days] |
[out] | <cosz> | Cosine of solar zenith angle, set to zero when entire period is in darkness [dimensionless] |
[out] | <fracday> | Daylight fraction of time interval [dimensionless] |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 [dimensionless] |
[in] | <dt> | OPTIONAL: Time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. [radians], (1 day = 2 * pi) |
[in] | <dt_time> | OPTIONAL: Time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. time_type, [days, seconds] |
[in] | <allow_negative_cosz> | Allow negative values for cosz? |
[out] | <half_day_out> | half_day_out |
Definition at line 148 of file astronomy.F90.
interface astronomy_mod::get_orbital_parameters |
Definition at line 74 of file astronomy.F90.
Private Member Functions | |
get_orbital_parameters_r4 | |
get_orbital_parameters_r8 | |
interface astronomy_mod::get_period |
Gets the length of year for current calendar.
Separate routines exist within this interface for integer and time_type output:
[out] | <period_out> | Length of year for calendar in use |
Definition at line 275 of file astronomy.F90.
Private Member Functions | |
subroutine | get_period_integer (period_out) |
get_period_integer returns the length of the year as an integer number of seconds. More... | |
subroutine | get_period_time_type (period_out) |
get_period_time_type returns the length of the year as a time_type variable. More... | |
|
private |
get_period_integer returns the length of the year as an integer number of seconds.
FATAL,astronomy_mod module has not been initialized |
[out] | period_out | Length of year [seconds] |
Definition at line 572 of file astronomy.F90.
|
private |
get_period_time_type returns the length of the year as a time_type variable.
FATAL,astronomy_mod module has not been initialized |
[in,out] | period_out | Length of year as time_type variable |
Definition at line 600 of file astronomy.F90.
interface astronomy_mod::half_day |
Private interface for internal use by dirunal_solar and daily_mean_solar.
Example usage:
Separate routines exist within this interface for scalar, or 2D input and output fields:
[in] | <latitude> | Latitudes of model grid points [radians] |
[in] | <dec> | Solar declination [radians] |
[out] | <h> | Half of the length of daylight at the given latitude and orbital position (dec); value ranges between 0 (all darkness) and pi (all daylight) [dimensionless] |
Definition at line 342 of file astronomy.F90.
Private Member Functions | |
half_day_0d_r4 | |
half_day_0d_r8 | |
half_day_2d_r4 | |
half_day_2d_r8 | |
interface astronomy_mod::set_period |
Sets the length of a year for the calendar in use.
Separate routines exist within this interface for integer and time_type output:
[in] | <period_in> | Length of year for calendar in use |
Definition at line 295 of file astronomy.F90.
Private Member Functions | |
subroutine | set_period_integer (period_in) |
set_period_integer saves as the input length of the year (an integer) in a time_type module variable. More... | |
subroutine | set_period_time_type (period_in) |
Set_period_time_type saves the length of the year (input as a time_type variable) into a time_type module variable. More... | |
|
private |
set_period_integer saves as the input length of the year (an integer) in a time_type module variable.
FATAL,astronomy_mod module has not been initialized |
[in] | period_in | Length of year as a time_type |
Definition at line 621 of file astronomy.F90.
|
private |
Set_period_time_type saves the length of the year (input as a time_type variable) into a time_type module variable.
FATAL,astronomy_mod module has not been initialized |
Definition at line 644 of file astronomy.F90.
real(kind=fms_ast_kind_) function angle_ | ( | real(kind=fms_ast_kind_), intent(in) | t | ) |
angle determines the position within the earth's orbit at time t in the year (t = 0 at NH autumnal equinox) by interpolating into the orbital position table.
[in] | t | time of year (between 0 and 2*pi; t=0 at NH autumnal equinox |
Define orbital tables indices bracketing current orbital time (int and int_1). Define table index distance between the lower table value (int) and the actual orbital time (x). Define orbital position as being x of the way between int and int_1. Renormalize angle to be within the range 0 to 2*pi.
Definition at line 1436 of file astronomy.inc.
subroutine annual_mean_solar_1d_ | ( | integer, intent(in) | jst, |
integer, intent(in) | jnd, | ||
real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | solar, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun_out | ||
) |
annual_mean_solar_1d creates 2-d input fields from 1-d input fields and then calls annual_mean_solar_2d to obtain 2-d output fields which are then stored into 1-d fields for return to the calling subroutine.
[in] | <jst> | Starting index of latitude window |
[in] | <jnd> | Ending index of latitude window |
[in] | <lat> | Latitudes of model grid points |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <solar> | Shortwave flux factor: cosine of zenith angle * daylight fraction / (earth-sun distance squared) |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun_out> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
define 2-d versions of input data array.
call annual_mean_solar_2d to calculate the astronomy fields.
place output fields into 1-D arrays for return to calling routine.
if the calculation has been done, simply return the module variables contain the results at the desired latitudes.
Definition at line 1267 of file astronomy.inc.
subroutine annual_mean_solar_2d_ | ( | integer, intent(in) | js, |
integer, intent(in) | je, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lat, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | solar, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun | ||
) |
annual_mean_solar_2d returns 2d fields of annual mean values of the cosine of zenith angle, daylight fraction and earth-sun distance at the specified latitude.
[in] | <jst> | Starting index of latitude window |
[in] | <jnd> | Ending index of latitude window |
[in] | <lat> | Latitudes of model grid points |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <solar> | Shortwave flux factor: cosine of zenith angle * daylight fraction / (earth-sun distance squared) |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
determine annual mean values of solar flux and product of cosz and solar flux by integrating the annual cycle in num_angles orbital increments.
define the flux-weighted annual mean cosine of the zenith angle.
define avg fracday such as to make the avg flux (solar) equal to the product of the avg cosz * avg fracday * assumed mean avg radius of 1.0. it is unlikely that these avg fracday and avg rr will ever be used.
save the values that have been calculated as module variables, if those variables are present; i.e., not the spectral 2-layer model.
increment the points computed counter. set flag to end execution once values have been calculated for all points owned by the processor.
if the calculation has been done, return the appropriate module variables.
Definition at line 1150 of file astronomy.inc.
subroutine annual_mean_solar_2level_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
real(kind=fms_ast_kind_), dimension(:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | solar | ||
) |
annual_mean_solar_2level creates 2-d input fields from 1-d input fields and then calls annual_mean_solar_2d to obtain 2-d output fields which are then stored into 1-d fields for return to the calling subroutine. This subroutine will be called during model initialization.
FATAL,astronomy_mod annual_mean_solar_2level should be called only once |
[in] | lat | Latitudes of model grid points |
[out] | cosz | Cosine of solar zenith angle |
[out] | solar | shortwave flux factor: cosine of zenith angle * daylight fraction / (earth-sun distance squared) |
define 2-d versions of input data array.
call annual_mean_solar_2d to calculate the astronomy fields.
place output fields into 1-D arrays for return to calling routine.
if the calculation has been done, print an error message since this subroutine should be called only once.
Definition at line 1333 of file astronomy.inc.
subroutine, public astronomy_mod::astronomy_end |
astronomy_end is the destructor for astronomy_mod.
check if the module has been initialized.
deallocate module variables.
mark the module as uninitialized.
Definition at line 759 of file astronomy.F90.
subroutine, public astronomy_mod::astronomy_init | ( | class(*), dimension(:,:), intent(in), optional | latb, |
class(*), dimension(:,:), intent(in), optional | lonb | ||
) |
astronomy_init is the constructor for astronomy_mod.
FATAL,astronomy_mod ecc must be between 0 and 0.99 | |
FATAL,astronomy_mod obliquity must be between -90 and 90 degrees | |
FATAL,astronomy_mod perihelion must be between 0 and 360 degrees |
[in] | latb | 2d array of model latitudes at cell corners [radians] |
[in] | lonb | 2d array of model longitudes at cell corners [radians] |
This routine will: Verify that modules used by this module have been initialized.
Read namelist.
Write version number and namelist to logfile.
Be sure input values are within valid ranges.
Set up time-type variable defining specified time of autumnal equinox.
Set up time-type variable defining length of year.
Define useful module variables.
Call orbit to define table of orbital angles as function of orbital time.
If annual mean radiation is desired, then latb will be present. allocate arrays to hold the needed astronomical factors. define the total number of points that the processor is responsible for.
Mark the module as initialized.
Definition at line 431 of file astronomy.F90.
subroutine daily_mean_solar_0d_ | ( | real(kind=fms_ast_kind_), intent(in) | lat, |
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), intent(out) | h_out, | ||
real(kind=fms_ast_kind_), intent(out) | rr_out | ||
) |
daily_mean_solar_1d takes 1-d input fields, adds a second dimension and calls daily_mean_solar_2d. on return, the 2d fields are returned to the original 1d fields.
[in] | <lat> | Latitudes of model grid points |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <h_out> | 2-d array of half-day lengths at the latitudes |
[out] | <rr_out> | the inverse of the square of the earth-sun distance relative to the mean distance at angle ang in the earth's orbit. |
define 2-d versions of input data array.
call daily_mean_solar_2d to calculate astronomy fields.
return output fields to scalars for return to calling routine.
Definition at line 918 of file astronomy.inc.
subroutine daily_mean_solar_1d_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), dimension(size(lat(:))), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(size(lat(:))), intent(out) | h_out, | ||
real(kind=fms_ast_kind_), intent(out) | rr_out | ||
) |
daily_mean_solar_1d takes 1-d input fields, adds a second dimension and calls daily_mean_solar_2d. on return, the 2d fields are returned to the original 1d fields.
[in] | <lat> | Latitudes of model grid points |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <h_out> | 2-d array of half-day lengths at the latitudes |
[out] | <rr_out> | the inverse of the square of the earth-sun distance relative to the mean distance at angle ang in the earth's orbit. |
define 2-d versions of input data array.
call daily_mean_solar_2d to calculate astronomy fields.
place output fields into 1-d arguments for return to calling routine.
Definition at line 816 of file astronomy.inc.
subroutine daily_mean_solar_2d_ | ( | real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lat, |
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | h_out, | ||
real(kind=fms_ast_kind_), intent(out) | rr_out | ||
) |
daily_mean_solar_2d computes the daily mean astronomical parameters for the input points at latitude lat and time of year time_since_ae.
[in] | <lat> | Latitudes of model grid points |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <h_out> | 2-d array of half-day lengths at the latitudes |
[out] | <rr_out> | the inverse of the square of the earth-sun distance relative to the mean distance at angle ang in the earth's orbit. |
FATAL,astronomy_mod time_since_ae not between 0 and 2pi |
Define the orbital angle (location in year), solar declination, half-day length and earth sun distance factor. Use functions contained in this module.
Where the entire day is dark, define cosz to be zero. otherwise use the standard formula. Define the daylight fraction and earth- sun distance.
Definition at line 753 of file astronomy.inc.
subroutine daily_mean_solar_2level_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), dimension(size(lat(:))), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(size(lat(:))), intent(out) | solar | ||
) |
daily_mean_solar_2level takes 1-d input fields, adds a second dimension and calls daily_mean_solar_2d. on return, the 2d fields are returned to the original 1d fields.
[in] | <lat> | Latitudes of model grid points |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <solar> | Shortwave flux factor: cosine of zenith angle * daylight fraction / (earth-sun distance squared) |
define 2-d versions of input data array.
call daily_mean_solar_2d to calculate astronomy fields.
place output fields into 1-d arguments for return to calling routine.
Definition at line 867 of file astronomy.inc.
subroutine daily_mean_solar_cal_0d_ | ( | real(kind=fms_ast_kind_), intent(in) | lat, |
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun | ||
) |
daily_mean_solar_cal_0d converts scalar input fields to real, 2d variables and then calls daily_mean_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
define 2-d versions of input data array.
call daily_mean_solar_cal_2d to convert the time_types to reals and then calculate the astronomy fields.
place output fields into scalar arguments for return to calling routine.
Definition at line 1100 of file astronomy.inc.
subroutine daily_mean_solar_cal_1d_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun | ||
) |
daily_mean_solar_cal_1d receives time_type inputs, converts them to real, 2d variables and then calls daily_mean_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
define 2-d versions of input data array.
call daily_mean_solar_cal_2d to convert the time_types to reals and then calculate the astronomy fields.
place output fields into 1-d arguments for return to calling routine.
Definition at line 1007 of file astronomy.inc.
subroutine daily_mean_solar_cal_2d_ | ( | real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lat, |
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun | ||
) |
daily_mean_solar_cal_2d receives time_type inputs, converts them to real variables and then calls daily_mean_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
FATAL,astronomy_mod time_since_ae not between 0 and 2pi |
Definition at line 964 of file astronomy.inc.
subroutine daily_mean_solar_cal_2level_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | solar | ||
) |
daily_mean_solar_cal_2level receives 1d arrays and time_type input, converts them to real, 2d variables and then calls daily_mean_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <solar> | Shortwave flux factor: cosine of zenith angle * daylight fraction / (earth-sun distance squared) |
define 2-d versions of input data array.
call daily_mean_solar_cal_2d to convert the time_types to reals and then calculate the astronomy fields.
place output fields into 1-d arguments for return to calling routine.
Definition at line 1054 of file astronomy.inc.
real(kind=fms_ast_kind_) function declination_ | ( | real(kind=fms_ast_kind_), intent(in) | ang | ) |
Declination returns the solar declination angle at orbital position ang in earth's orbit.
[in] | ang | solar orbital position ang in earth's orbit |
Definition at line 1477 of file astronomy.inc.
subroutine diurnal_solar_0d_ | ( | real(kind=fms_ast_kind_), intent(in) | lat, |
real(kind=fms_ast_kind_), intent(in) | lon, | ||
real(kind=fms_ast_kind_), intent(in) | gmt, | ||
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun, | ||
real(kind=fms_ast_kind_), intent(in), optional | dt, | ||
logical, intent(in), optional | allow_negative_cosz, | ||
real(kind=fms_ast_kind_), intent(out), optional | half_day_out | ||
) |
diurnal_solar_0d takes scalar input fields, makes them into 2d arrays dimensioned (1,1), and calls diurnal_solar_2d. on return, the 2d fields are converted back to the desired scalar output.
[in] | <lat> | Latitudes of model grid points |
[in] | <lon> | Longitudes of model grid points |
[in] | <gmt> | Time of day at longitude 0.0; midnight = 0.0, one day = 2 * pi |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | earth-sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
[in] | <dt> | OPTIONAL: time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. |
[in] | <allow_negative_cosz> | Allow negative values for cosz? |
[out] | <half_day_out> | half_day_out |
create 2d arrays from the scalar input fields.
call diurnal_solar_2d to calculate astronomy fields.
place output fields into scalars for return to calling routine.
Definition at line 456 of file astronomy.inc.
subroutine diurnal_solar_1d_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
real(kind=fms_ast_kind_), dimension(:), intent(in) | lon, | ||
real(kind=fms_ast_kind_), intent(in) | gmt, | ||
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun, | ||
real(kind=fms_ast_kind_), intent(in), optional | dt, | ||
logical, intent(in), optional | allow_negative_cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out), optional | half_day_out | ||
) |
diurnal_solar_1d takes 1-d input fields, adds a second dimension and calls diurnal_solar_2d. on return, the 2d fields are returned to the original 1d fields.
[in] | <lat> | Latitudes of model grid points |
[in] | <lon> | Longitudes of model grid points |
[in] | <gmt> | Time of day at longitude 0.0; midnight = 0.0, one day = 2 * pi |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | earth-sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
[in] | <dt> | OPTIONAL: time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. |
[in] | <allow_negative_cosz> | Allow negative values for cosz? |
[out] | <half_day_out> | half_day_out |
define 2-d versions of input data arrays.
call diurnal_solar_2d to calculate astronomy fields.
place output fields into 1-d arguments for return to calling routine.
Definition at line 384 of file astronomy.inc.
subroutine diurnal_solar_2d_ | ( | real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lat, |
real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lon, | ||
real(kind=fms_ast_kind_), intent(in) | gmt, | ||
real(kind=fms_ast_kind_), intent(in) | time_since_ae, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun, | ||
real(kind=fms_ast_kind_), intent(in), optional | dt, | ||
logical, intent(in), optional | allow_negative_cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out), optional | half_day_out | ||
) |
diurnal_solar_2d returns 2d fields of cosine of zenith angle, daylight fraction and earth-sun distance at the specified latitudes, longitudes and time. These values may be instantaneous or averaged over a specified time interval.
[in] | <lat> | Latitudes of model grid points |
[in] | <lon> | Longitudes of model grid points |
[in] | <gmt> | Time of day at longitude 0.0; midnight = 0.0, one day = 2 * pi |
[in] | <time_since_ae> | Time of year; autumnal equinox = 0.0, one year = 2 * pi |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | earth-sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
[in] | <dt> | OPTIONAL: time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. |
[in] | <allow_negative_cosz> | Allow negative values for cosz? |
[out] | <half_day_out> | half_day_out |
FATAL,astronomy_mod time_since_ae not between 0 and 2pi | |
FATAL,astronomy_mod gmt not between 0 and 2pi |
define the orbital angle (location in year), solar declination and earth sun distance factor. use functions contained in this module.
define terms needed in the cosine zenith angle equation.
define local time. force it to be between -pi and pi.
perform a time integration to obtain cosz and fracday if desired. output is valid over the period from t to t + dt.
if instantaneous values are desired, define cosz at time t.
Check that cosz is not negative, if desired.
Definition at line 142 of file astronomy.inc.
subroutine diurnal_solar_cal_0d_ | ( | real(kind=fms_ast_kind_), intent(in) | lat, |
real(kind=fms_ast_kind_), intent(in) | lon, | ||
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun, | ||
type(time_type), intent(in), optional | dt_time, | ||
logical, intent(in), optional | allow_negative_cosz, | ||
real(kind=fms_ast_kind_), intent(out), optional | half_day_out | ||
) |
diurnal_solar_cal_0d receives time_type inputs, converts them to real variables and then calls diurnal_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <lon> | Longitudes of model grid points |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | Earth-Sun distance (r) relative to semi-major axis of orbital ellipse (a) : (a/r)**2 |
[out] | <dt_time> | OPTIONAL: time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. |
[in] | <allow_negative_cosz> | allow_negative_cosz |
[out] | <half_day_out> | half_day_out |
Define 2-d versions of input data arrays.
Call diurnal_solar_cal_2d to convert the time_types to reals and then calculate the astronomy fields.
Place output fields into 1-d arguments for return to calling routine.
Definition at line 683 of file astronomy.inc.
subroutine diurnal_solar_cal_1d_ | ( | real(kind=fms_ast_kind_), dimension(:), intent(in) | lat, |
real(kind=fms_ast_kind_), dimension(:), intent(in) | lon, | ||
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun, | ||
type(time_type), intent(in), optional | dt_time, | ||
logical, intent(in), optional | allow_negative_cosz, | ||
real(kind=fms_ast_kind_), dimension(:), intent(out), optional | half_day_out | ||
) |
diurnal_solar_cal_1d receives time_type inputs, converts them to real variables and then calls diurnal_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <lon> | Longitudes of model grid points |
[in] | <gmt> | Time of day at longitude 0.0; midnight = 0.0, one day = 2 * pi |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | earth-sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
[in] | <dt> | OPTIONAL: time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. |
[in] | <allow_negative_cosz> | Allow negative values for cosz? |
[out] | <half_day_out> | half_day_out |
Define 2-d versions of input data arrays.
Call diurnal_solar_cal_2d to convert the time_types to reals and then calculate the astronomy fields.
Place output fields into 1-d arguments for return to calling routine.
Definition at line 610 of file astronomy.inc.
subroutine diurnal_solar_cal_2d_ | ( | real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lat, |
real(kind=fms_ast_kind_), dimension(:,:), intent(in) | lon, | ||
type(time_type), intent(in) | time, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out) | fracday, | ||
real(kind=fms_ast_kind_), intent(out) | rrsun, | ||
type(time_type), intent(in), optional | dt_time, | ||
logical, intent(in), optional | allow_negative_cosz, | ||
real(kind=fms_ast_kind_), dimension(:,:), intent(out), optional | half_day_out | ||
) |
diurnal_solar_cal_2d receives time_type inputs, converts them to real variables and then calls diurnal_solar_2d to compute desired astronomical variables.
[in] | <lat> | Latitudes of model grid points |
[in] | <lon> | Longitudes of model grid points |
[in] | <gmt> | Time of day at longitude 0.0; midnight = 0.0, one day = 2 * pi |
[in] | <time> | Time of year (time_type) |
[out] | <cosz> | Cosine of solar zenith angle |
[out] | <fracday> | Daylight fraction of time interval |
[out] | <rrsun> | earth-sun distance (r) relative to semi-major axis of orbital ellipse (a):(a/r)**2 |
[in] | <dt> | OPTIONAL: time interval after gmt over which the astronomical variables are to be averaged. this produces averaged output rather than instantaneous. |
[in] | <allow_negative_cosz> | Allow negative values for cosz? |
[out] | <half_day_out> | half_day_out |
FATAL,astronomy_mod radiation time step must be no longer than 12 hrs | |
FATAL,astronomy_mod radiation time step must not be an integral number of days |
Extract time of day (gmt) from time_type variable time with function universal_time.
Extract the time of year (time_since_ae) from time_type variable time using the function orbital_time.
Convert optional time_type variable dt_time (length of averaging period) to a real variable dt with the function universal_time.
Call diurnal_solar_2d to calculate astronomy fields, with or without the optional argument dt.
Definition at line 524 of file astronomy.inc.
subroutine get_orbital_parameters_ | ( | real(kind=fms_ast_kind_), intent(out) | ecc_out, |
real(kind=fms_ast_kind_), intent(out) | obliq_out, | ||
real(kind=fms_ast_kind_), intent(out) | per_out | ||
) |
get_orbital_parameters retrieves the orbital parameters for use by another module.
FATAL,astronomy_mod module has not been initialized |
[out] | ecc_out | Eccentricity of orbital ellipse [dimensionless] |
[out] | obliq_out | Obliquity [degrees] |
[out] | per_out | Longitude of perihelion with respect to autumnal equinox in northern hemisphere [degrees] |
Definition at line 90 of file astronomy.inc.
|
private |
get_period_integer returns the length of the year as an integer number of seconds.
FATAL,astronomy_mod module has not been initialized |
[out] | period_out | Length of year [seconds] |
Definition at line 572 of file astronomy.F90.
|
private |
get_period_time_type returns the length of the year as a time_type variable.
FATAL,astronomy_mod module has not been initialized |
[in,out] | period_out | Length of year as time_type variable |
Definition at line 600 of file astronomy.F90.
subroutine, public astronomy_mod::get_ref_date_of_ae | ( | integer, intent(out) | day_out, |
integer, intent(out) | month_out, | ||
integer, intent(out) | year_out, | ||
integer, intent(out) | second_out, | ||
integer, intent(out) | minute_out, | ||
integer, intent(out) | hour_out | ||
) |
get_ref_date_of_ae retrieves the reference date of the autumnal equinox as integer variables.
FATAL,astronomy_mod module has not been initialized |
[out] | <day_out> | Day of reference autumnal equinox |
[out] | <month_out> | Month of reference autumnal equinox |
[out] | <year_out> | Year of reference autumnal equinox |
[out] | <second_out> | Second of reference autumnal equinox |
[out] | <minute_out> | Minute of reference autumnal equinox |
[out] | <hour_out> | Hour of reference autumnal equinox |
Definition at line 733 of file astronomy.F90.
real(kind=fms_ast_kind_) function half_day_0d_ | ( | real(kind=fms_ast_kind_), intent(in) | latitude, |
real(kind=fms_ast_kind_), intent(in) | dec | ||
) |
half_day_0d takes scalar input fields, makes them into 2-d fields dimensioned (1,1), and calls half_day_2d. On return, the 2-d fields are converted to the desired scalar output.
[in] | <latitude> | Latitutde of view point |
[in] | <dec> | Solar declination angle at view point |
Definition at line 1562 of file astronomy.inc.
real(kind=fms_ast_kind_) function, dimension(size(latitude,1),size(latitude,2)) half_day_2d_ | ( | real(kind=fms_ast_kind_), dimension(:,:), intent(in) | latitude, |
real(kind=fms_ast_kind_), intent(in) | dec | ||
) |
half_day_2d returns a 2-d array of half-day lengths at the latitudes and declination provided.
[in] | latitude | Latitutde of view point |
[in] | dec | Solar declination angle at view point |
define tangent of the declination.
adjust latitude so that its tangent will be defined.
define the cosine of the half-day length. adjust for cases of all daylight or all night.
Definition at line 1507 of file astronomy.inc.
|
private |
Orbit computes and stores a table of value of orbital angles as a function of orbital time (both the angle and time are zero at autumnal equinox in the NH, and range from 0 to 2*pi).
allocate the orbital angle array, sized by the namelist parameter num_angles, defining the annual cycle resolution of the earth's orbit. define some constants to be used.
define the orbital angle at each of the num_angles locations in the orbit.
Definition at line 794 of file astronomy.F90.
real(kind=r8_kind) function, public astronomy_mod::orbital_time | ( | type(time_type), intent(in) | time | ) |
Orbital time returns the time (1 year = 2*pi) since autumnal equinox.
Orbital time returns the time (1 year = 2*pi) since autumnal equinox; autumnal_eq_ref is a module variable of time_type and will have been defined by default or by a call to set_ref_date_of_ae; length_of_year is available through the time manager and is set at the value approriate for the calandar being used
[in] | time | time (1 year = 2*pi) since autumnal equinox |
Definition at line 837 of file astronomy.F90.
real(kind=fms_ast_kind_) function r_inv_squared_ | ( | real(kind=fms_ast_kind_), intent(in) | ang | ) |
r_inv_squared returns the inverse of the square of the earth-sun distance relative to the mean distance at angle ang in the Earth's orbit.
[in] | ang | angular position of earth in its orbit, relative to a value of 0.0 at the NH autumnal equinox, value between 0.0 and 2 * pi [radians] |
define the earth-sun distance (r) and then return the inverse of its square (r_inv_squared) to the calling routine.
Definition at line 1400 of file astronomy.inc.
subroutine set_orbital_parameters_ | ( | real(kind=fms_ast_kind_), intent(in) | ecc_in, |
real(kind=fms_ast_kind_), intent(in) | obliq_in, | ||
real(kind=fms_ast_kind_), intent(in) | per_in | ||
) |
set_orbital_parameters saves the input values of eccentricity, obliquity and perihelion time as module variables for use by astronomy_mod.
FATAL,astronomy_mod module has not been initialized | |
FATAL,astronomy_mod ecc must be between 0 and 0.99 | |
FATAL,astronomy_mod obliquity must be between -90. and 90. degrees | |
FATAL,astronomy_mod perihelion must be between 0.0 and 360. degrees |
[in] | ecc_in | Eccentricity of orbital ellipse [dimensionless] |
[in] | obliq_in | Obliquity [degrees] |
[in] | per_in | Longitude of perihelion with respect to autumnal equinox in northern hemisphere [degrees] |
Definition at line 39 of file astronomy.inc.
|
private |
set_period_integer saves as the input length of the year (an integer) in a time_type module variable.
FATAL,astronomy_mod module has not been initialized |
[in] | period_in | Length of year as a time_type |
Definition at line 621 of file astronomy.F90.
|
private |
Set_period_time_type saves the length of the year (input as a time_type variable) into a time_type module variable.
FATAL,astronomy_mod module has not been initialized |
Definition at line 644 of file astronomy.F90.
subroutine, public astronomy_mod::set_ref_date_of_ae | ( | integer, intent(in) | day_in, |
integer, intent(in) | month_in, | ||
integer, intent(in) | year_in, | ||
integer, intent(in), optional | second_in, | ||
integer, intent(in), optional | minute_in, | ||
integer, intent(in), optional | hour_in | ||
) |
set_ref_date_of_ae provides a means of specifying the reference date of the NH autumnal equinox for a particular year.
set_ref_date_of_ae provides a means of specifying the reference date of the NH autumnal equinox for a particular year. It is only used if calls are made to the calandar versions of the routines diurnal_solar and daily_mean_solar. If the NOLEAP calendar is used, then the date of autumnal equinox will be the same every year. If JULIAN is used, then the date of autumnal equinox will return to the same value every 4th year.
[in] | <day_in> | Day of reference autumnal equinox |
[in] | <month_in> | Month of reference autumnal equinox |
[in] | <year_in> | Year of reference autumnal equinox |
[out] | <second_in> | OPTIONAL: Second of reference autumnal equinox |
[out] | <minute_in> | OPTIONAL: Minute of reference autumnal equinox |
[out] | <hour_in> | OPTIONAL: Hour of reference autumnal equinox |
FATAL,astronomy_mod module has not been initialized |
Definition at line 683 of file astronomy.F90.
real(kind=r8_kind) function, public astronomy_mod::universal_time | ( | type(time_type), intent(in) | time | ) |
universal_time returns the time of day at longitude = 0.0 (1 day = 2*pi)
[in] | time | Time (1 year = 2*pi) since autumnal equinox |
Definition at line 851 of file astronomy.F90.