Notes about RADIA
LR/SN 27.9.2005


Possible structure in HFS and IFS



PHCALL
(or higher?) at each time step:

call SOLAR(in: date, time, geographic coordinates,
                   out: solar height and azimuth angles)

...

call PHYS/APLPAR (in: solar height and azimut angles, geographic coordinates, ...) at each time step:
                                      orography information ...                                                                          
                                      surface information from data assimilation ... (like analysed albedo??)
           or should this surface-related info enter in some other way from the external surface blok?

-------------------------------

call CLOUDIAG(in:         qc(1:nclo),q,totcov,T,nclo,
                          out:       qc(1:4),totcov))
                          using COMCONDS where prbice is defined
                          containing functions for frice(T), totcov(q), cq(1)(q)

- to diagnose (for radiation) four condensate species
- cloud water (1), cloud ice(2), precipitating water(3), precipitating ice(4) -
and three-dimensional cloud cover when
a) only humidity is given (ALADIN) , nqc = 0 or
b) only total cloud condensate is given (present HIRLAM STRACO, KFRK), nqc=1
c) cloud water and cloud ice are given (new STRACO), nqc =2
d) all three/four are given (future Schultz, Lopez  or similar), nqc=3 or 4

--------------------

call ARADIA(in: qc(1:4), totcov, solar height and azimuth angles,
                           surface/orography data...
                           gp albedo, emissivity, Tskin ...
                     out: gp salb, emsurf,sswdndf,
- do the remaining ALADIN-remaining preparations for RADIA call, if needed in IFS framework
        
       call RADIA(in:  qc(1:4), totcov - transmitted from CLOUDHIR
                                solar height and azimuth angles - calculated by SOLAR
                                gp albedo, gp emissivity, gp T_skin - from previous time step SURF2RAD
                                                                             (from initialization with SURF2RAD at 1.time step)
                          out: dtdtrad (full levels), netlwflx, netswflx (half levels),
                                  sswnet, sswdn, sswdndf, slwnet, slwdn, tswnet, tswdn, tlwnet,
                                  salbcorr
                                  ...

- atmospheric radiation calculations assuming flat and homogeneous surface
- note: no astronomic calculations


       call RAD2ORO(in:  solar height and azimuth angles - calculated ty SOLAR
                                      phis,radoro(x,y,rtype) - subgridscale orography information from climate files
                                      sswnet, sswdn, sswdndf, slwnet, slwdn - from RADIA
                                      gp albedo, emissivity, Tskin - from SURF2RAD
                             out: sswnet, sswdn, sswdndf, slwnet, slwdn - gp values updated for sloping surfaces

- surface radiation flux processing for sloping surfaces using subgridscale orography information

------------------------------------      

call AISBA (in:  sswnet, sswdn, sswdndf, slwnet, slwdn from RADOROCAL
                          ...
                   out: gp albedo, gp emissivity, gp T_skin as pseudopredicted fields for next time step

      call RAD2SURF( in: sswnet, sswdn, sswdndf, slwnet, slwdn , salbcorr - gp values from RAD2ORO
                                       subtype albedo, emissivity, fractions, snow - from previous time step SURF2RAD           
                               ...
                                out: sswneti,sswdni,sswdndfi,slwneti,slwdni and similar subtype fluxes (at sloping surface!)

- prepare subtype radiation fluxes for surface energy balance calculations

... ( a lot of ISBA subroutines) ...

       call SURF2RAD(in: vegi, fraci, tsi, snowinfo
                                out: albi, emsurfi, snowalb, snowem
                                       gp albedo, emissivity, Tskin for RADIA)
                                using INI_VEG.f/VEG_DAT.inc

  now these two are called at PHYS/APLPAR level - is the best place for them
  - there (many calls of small subroutines)
  - within ARADIA (more parameters to pass)
  - within ISBA/SURFEX (maybe most logical)?


Cleaning of radiation: remaining tasks


- what is still required for ALADIN-interface in IFS
- the problem of level definition (hybf, hybh - to be carried higher from PHYS, does RADIA use them reasonably)
- removing unused fields and variables
- real cleaning in F90: check names, standards, initialization etc