| 1 | module surfdat_h |
|---|
| 2 | |
|---|
| 3 | ! arrays are allocated in conf_phys |
|---|
| 4 | real,save,allocatable :: albedodat(:) ! albedo of bare ground |
|---|
| 5 | real,save,allocatable :: phisfi(:) ! geopotential at ground level |
|---|
| 6 | real,save :: albedice(2) ! default albedo for ice (1: North H. 2: South H.) |
|---|
| 7 | real,save :: emisice(2) ! ice emissivity; 1:Northern hemisphere 2:Southern hemisphere |
|---|
| 8 | real,save :: emissiv ! emissivity of bare ground |
|---|
| 9 | logical,save :: TESicealbedo ! use TES ice cap albedoes (if set to .true.) |
|---|
| 10 | logical,save,allocatable :: watercaptag(:) ! flag for water ice surface |
|---|
| 11 | real, save, allocatable :: dryness(:) |
|---|
| 12 | |
|---|
| 13 | !$OMP THREADPRIVATE(albedodat, phisfi,albedice,emisice,emissiv,TESicealbedo, & |
|---|
| 14 | !$OMP watercaptag,dryness) |
|---|
| 15 | |
|---|
| 16 | logical,save :: temptag !temp tag for water caps |
|---|
| 17 | |
|---|
| 18 | !$OMP THREADPRIVATE(temptag) |
|---|
| 19 | |
|---|
| 20 | real,save :: albedo_h2o_cap ! water cap albedo |
|---|
| 21 | real,save :: albedo_h2o_frost ! water frost albedo |
|---|
| 22 | real,save :: inert_h2o_ice ! water ice thermal inertia |
|---|
| 23 | real,save :: frost_albedo_threshold ! water frost thickness on the ground (kg.m^-2, ie mm) |
|---|
| 24 | real,save :: frost_metam_threshold ! water frost threshold before conversion to ice (kg.m^-2, ie mm) |
|---|
| 25 | real,save :: TESice_Ncoef ! coefficient for TES ice albedo in Northern hemisphere |
|---|
| 26 | real,save :: TESice_Scoef ! coefficient for TES ice albedo in Southern hemisphere |
|---|
| 27 | real,save :: iceradius(2) , dtemisice(2) |
|---|
| 28 | real,save,allocatable :: zmea(:),zstd(:),zsig(:),zgam(:),zthe(:) |
|---|
| 29 | real,save,allocatable :: hmons(:),summit(:),base(:) |
|---|
| 30 | real,save,allocatable :: z0(:) ! surface roughness length (m) |
|---|
| 31 | real,save :: z0_default ! default (constant over planet) surface roughness (m) |
|---|
| 32 | |
|---|
| 33 | !$OMP THREADPRIVATE(albedo_h2o_cap,albedo_h2o_frost,inert_h2o_ice, & |
|---|
| 34 | !$OMP frost_albedo_threshold,frost_metam_threshold,TESice_Ncoef, & |
|---|
| 35 | !$OMP TESice_Scoef,iceradius,dtemisice, & |
|---|
| 36 | !$OMP zmea,zstd,zsig,zgam,zthe,hmons,summit,base,z0,z0_default ) |
|---|
| 37 | |
|---|
| 38 | !! mountain top dust flows |
|---|
| 39 | REAL,SAVE,ALLOCATABLE :: alpha_hmons(:) ! sub-grid scale mountain mesh fraction |
|---|
| 40 | REAL,SAVE,ALLOCATABLE :: hsummit(:) ! mountain height above the GCM surface |
|---|
| 41 | LOGICAL,SAVE,ALLOCATABLE :: contains_mons(:) ! is there a mountain in the grid mesh ? |
|---|
| 42 | |
|---|
| 43 | !$OMP THREADPRIVATE(alpha_hmons,hsummit,contains_mons) |
|---|
| 44 | |
|---|
| 45 | !! variables |
|---|
| 46 | REAL,SAVE,ALLOCATABLE :: tsurf(:) ! Surface temperature (K) |
|---|
| 47 | REAL,SAVE,ALLOCATABLE :: co2ice(:) ! co2 ice surface layer (kg.m-2) |
|---|
| 48 | REAL,SAVE,ALLOCATABLE :: emis(:) ! Thermal IR surface emissivity |
|---|
| 49 | REAL,SAVE,ALLOCATABLE :: capcal(:) ! surface heat capacity (J m-2 K-1) |
|---|
| 50 | REAL,SAVE,ALLOCATABLE :: fluxgrd(:) ! surface conduction flux (W.m-2) |
|---|
| 51 | REAL,ALLOCATABLE,SAVE :: qsurf(:,:) ! tracer on surface (e.g. kg.m-2) |
|---|
| 52 | REAL,SAVE,ALLOCATABLE :: watercap(:) ! Surface water ice (kg.m-2) |
|---|
| 53 | |
|---|
| 54 | !$OMP THREADPRIVATE(tsurf,co2ice,emis,capcal,fluxgrd,qsurf,watercap) |
|---|
| 55 | |
|---|
| 56 | contains |
|---|
| 57 | |
|---|
| 58 | subroutine ini_surfdat_h(ngrid,nq) |
|---|
| 59 | |
|---|
| 60 | implicit none |
|---|
| 61 | integer,intent(in) :: ngrid ! number of atmospheric columns |
|---|
| 62 | integer,intent(in) :: nq ! number of tracers |
|---|
| 63 | |
|---|
| 64 | allocate(albedodat(ngrid)) |
|---|
| 65 | allocate(phisfi(ngrid)) |
|---|
| 66 | allocate(watercaptag(ngrid)) |
|---|
| 67 | allocate(dryness(ngrid)) |
|---|
| 68 | allocate(zmea(ngrid)) |
|---|
| 69 | allocate(zstd(ngrid)) |
|---|
| 70 | allocate(zsig(ngrid)) |
|---|
| 71 | allocate(zgam(ngrid)) |
|---|
| 72 | allocate(zthe(ngrid)) |
|---|
| 73 | allocate(z0(ngrid)) |
|---|
| 74 | allocate(qsurf(ngrid,nq)) |
|---|
| 75 | allocate(tsurf(ngrid)) |
|---|
| 76 | allocate(co2ice(ngrid)) |
|---|
| 77 | allocate(watercap(ngrid)) |
|---|
| 78 | allocate(emis(ngrid)) |
|---|
| 79 | allocate(capcal(ngrid)) |
|---|
| 80 | allocate(fluxgrd(ngrid)) |
|---|
| 81 | allocate(hmons(ngrid)) |
|---|
| 82 | allocate(summit(ngrid)) |
|---|
| 83 | allocate(base(ngrid)) |
|---|
| 84 | allocate(alpha_hmons(ngrid)) |
|---|
| 85 | allocate(hsummit(ngrid)) |
|---|
| 86 | allocate(contains_mons(ngrid)) |
|---|
| 87 | |
|---|
| 88 | end subroutine ini_surfdat_h |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | subroutine end_surfdat_h |
|---|
| 92 | |
|---|
| 93 | implicit none |
|---|
| 94 | |
|---|
| 95 | if (allocated(albedodat)) deallocate(albedodat) |
|---|
| 96 | if (allocated(phisfi)) deallocate(phisfi) |
|---|
| 97 | if (allocated(watercaptag)) deallocate(watercaptag) |
|---|
| 98 | if (allocated(dryness)) deallocate(dryness) |
|---|
| 99 | if (allocated(zmea)) deallocate(zmea) |
|---|
| 100 | if (allocated(zstd)) deallocate(zstd) |
|---|
| 101 | if (allocated(zsig)) deallocate(zsig) |
|---|
| 102 | if (allocated(zgam)) deallocate(zgam) |
|---|
| 103 | if (allocated(zthe)) deallocate(zthe) |
|---|
| 104 | if (allocated(z0)) deallocate(z0) |
|---|
| 105 | if (allocated(qsurf)) deallocate(qsurf) |
|---|
| 106 | if (allocated(tsurf)) deallocate(tsurf) |
|---|
| 107 | if (allocated(co2ice)) deallocate(co2ice) |
|---|
| 108 | if (allocated(watercap)) deallocate(watercap) |
|---|
| 109 | if (allocated(emis)) deallocate(emis) |
|---|
| 110 | if (allocated(capcal)) deallocate(capcal) |
|---|
| 111 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
|---|
| 112 | if (allocated(hmons)) deallocate(hmons) |
|---|
| 113 | if (allocated(summit)) deallocate(summit) |
|---|
| 114 | if (allocated(base)) deallocate(base) |
|---|
| 115 | if (allocated(alpha_hmons)) deallocate(alpha_hmons) |
|---|
| 116 | if (allocated(hsummit)) deallocate(hsummit) |
|---|
| 117 | if (allocated(contains_mons)) deallocate(contains_mons) |
|---|
| 118 | |
|---|
| 119 | end subroutine end_surfdat_h |
|---|
| 120 | |
|---|
| 121 | end module surfdat_h |
|---|