[1047] | 1 | module surfdat_h |
---|
| 2 | |
---|
[1224] | 3 | ! arrays are allocated in conf_phys |
---|
[1047] | 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 |
---|
[1224] | 11 | real, save, allocatable :: dryness(:) |
---|
[2578] | 12 | |
---|
| 13 | !$OMP THREADPRIVATE(albedodat, phisfi,albedice,emisice,emissiv,TESicealbedo, & |
---|
| 14 | !$OMP watercaptag,dryness) |
---|
[1047] | 15 | |
---|
| 16 | logical,save :: temptag !temp tag for water caps |
---|
[2578] | 17 | |
---|
| 18 | !$OMP THREADPRIVATE(temptag) |
---|
[1047] | 19 | |
---|
[2508] | 20 | real,save :: albedo_h2o_cap ! water cap albedo |
---|
| 21 | real,save :: albedo_h2o_frost ! water frost albedo |
---|
[1047] | 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) |
---|
[2561] | 24 | real,save :: frost_metam_threshold ! water frost threshold before conversion to ice (kg.m^-2, ie mm) |
---|
[1047] | 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(:) |
---|
[2079] | 29 | real,save,allocatable :: hmons(:),summit(:),base(:) |
---|
[1047] | 30 | real,save,allocatable :: z0(:) ! surface roughness length (m) |
---|
| 31 | real,save :: z0_default ! default (constant over planet) surface roughness (m) |
---|
| 32 | |
---|
[3111] | 33 | LOGICAL, SAVE :: old_wsublimation_scheme ! TEMPORARY : TO USE THE OLD WATER SUBLIMATION SCHEME (i.e., using Cd instead of Ch), true by default |
---|
| 34 | |
---|
[2578] | 35 | !$OMP THREADPRIVATE(albedo_h2o_cap,albedo_h2o_frost,inert_h2o_ice, & |
---|
| 36 | !$OMP frost_albedo_threshold,frost_metam_threshold,TESice_Ncoef, & |
---|
| 37 | !$OMP TESice_Scoef,iceradius,dtemisice, & |
---|
[3111] | 38 | !$OMP zmea,zstd,zsig,zgam,zthe,hmons,summit,base,z0,z0_default, & |
---|
| 39 | !$OMP old_wsublimation_scheme) |
---|
[2578] | 40 | |
---|
[2628] | 41 | !! mountain top dust flows |
---|
| 42 | REAL,SAVE,ALLOCATABLE :: alpha_hmons(:) ! sub-grid scale mountain mesh fraction |
---|
| 43 | REAL,SAVE,ALLOCATABLE :: hsummit(:) ! mountain height above the GCM surface |
---|
| 44 | LOGICAL,SAVE,ALLOCATABLE :: contains_mons(:) ! is there a mountain in the grid mesh ? |
---|
| 45 | |
---|
| 46 | !$OMP THREADPRIVATE(alpha_hmons,hsummit,contains_mons) |
---|
| 47 | |
---|
[1224] | 48 | !! variables |
---|
[2900] | 49 | REAL,SAVE,ALLOCATABLE :: tsurf(:,:) ! Surface temperature (K) |
---|
| 50 | REAL,SAVE,ALLOCATABLE :: emis(:,:) ! Thermal IR surface emissivity |
---|
| 51 | REAL,SAVE,ALLOCATABLE :: capcal(:,:) ! surface heat capacity (J m-2 K-1) |
---|
| 52 | REAL,SAVE,ALLOCATABLE :: fluxgrd(:,:) ! surface conduction flux (W.m-2) |
---|
| 53 | REAL,ALLOCATABLE,SAVE :: qsurf(:,:,:) ! tracer on surface (e.g. kg.m-2) |
---|
| 54 | REAL,SAVE,ALLOCATABLE :: watercap(:,:) ! Surface water ice (kg.m-2) |
---|
[3130] | 55 | REAL,SAVE,ALLOCATABLE :: perennial_co2ice(:,:) ! Perennial CO2 ice (kg.m-2) |
---|
| 56 | !$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perennial_co2ice) |
---|
[1224] | 57 | |
---|
[1047] | 58 | contains |
---|
| 59 | |
---|
[2900] | 60 | subroutine ini_surfdat_h(ngrid,nq,nslope) |
---|
[1047] | 61 | |
---|
| 62 | implicit none |
---|
| 63 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
[1224] | 64 | integer,intent(in) :: nq ! number of tracers |
---|
[2900] | 65 | integer,intent(in) :: nslope ! number of sub-grid scale slope |
---|
[1047] | 66 | allocate(albedodat(ngrid)) |
---|
| 67 | allocate(phisfi(ngrid)) |
---|
| 68 | allocate(watercaptag(ngrid)) |
---|
[1224] | 69 | allocate(dryness(ngrid)) |
---|
[1047] | 70 | allocate(zmea(ngrid)) |
---|
| 71 | allocate(zstd(ngrid)) |
---|
| 72 | allocate(zsig(ngrid)) |
---|
| 73 | allocate(zgam(ngrid)) |
---|
| 74 | allocate(zthe(ngrid)) |
---|
| 75 | allocate(z0(ngrid)) |
---|
[2900] | 76 | allocate(qsurf(ngrid,nq,nslope)) |
---|
| 77 | allocate(tsurf(ngrid,nslope)) |
---|
| 78 | allocate(watercap(ngrid,nslope)) |
---|
[3130] | 79 | allocate(perennial_co2ice(ngrid,nslope)) |
---|
[2900] | 80 | allocate(emis(ngrid,nslope)) |
---|
| 81 | allocate(capcal(ngrid,nslope)) |
---|
| 82 | allocate(fluxgrd(ngrid,nslope)) |
---|
[1974] | 83 | allocate(hmons(ngrid)) |
---|
[2079] | 84 | allocate(summit(ngrid)) |
---|
| 85 | allocate(base(ngrid)) |
---|
[2628] | 86 | allocate(alpha_hmons(ngrid)) |
---|
| 87 | allocate(hsummit(ngrid)) |
---|
| 88 | allocate(contains_mons(ngrid)) |
---|
| 89 | |
---|
[1047] | 90 | end subroutine ini_surfdat_h |
---|
| 91 | |
---|
[1770] | 92 | |
---|
| 93 | subroutine end_surfdat_h |
---|
| 94 | |
---|
| 95 | implicit none |
---|
| 96 | |
---|
[2999] | 97 | if (allocated(albedodat)) deallocate(albedodat) |
---|
| 98 | if (allocated(phisfi)) deallocate(phisfi) |
---|
| 99 | if (allocated(watercaptag)) deallocate(watercaptag) |
---|
| 100 | if (allocated(dryness)) deallocate(dryness) |
---|
| 101 | if (allocated(zmea)) deallocate(zmea) |
---|
| 102 | if (allocated(zstd)) deallocate(zstd) |
---|
| 103 | if (allocated(zsig)) deallocate(zsig) |
---|
| 104 | if (allocated(zgam)) deallocate(zgam) |
---|
| 105 | if (allocated(zthe)) deallocate(zthe) |
---|
| 106 | if (allocated(z0)) deallocate(z0) |
---|
| 107 | if (allocated(qsurf)) deallocate(qsurf) |
---|
| 108 | if (allocated(tsurf)) deallocate(tsurf) |
---|
| 109 | if (allocated(watercap)) deallocate(watercap) |
---|
[3130] | 110 | if (allocated(perennial_co2ice)) deallocate(perennial_co2ice) |
---|
[2999] | 111 | if (allocated(emis)) deallocate(emis) |
---|
| 112 | if (allocated(capcal)) deallocate(capcal) |
---|
| 113 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
| 114 | if (allocated(hmons)) deallocate(hmons) |
---|
| 115 | if (allocated(summit)) deallocate(summit) |
---|
| 116 | if (allocated(base)) deallocate(base) |
---|
| 117 | if (allocated(alpha_hmons)) deallocate(alpha_hmons) |
---|
| 118 | if (allocated(hsummit)) deallocate(hsummit) |
---|
| 119 | if (allocated(contains_mons)) deallocate(contains_mons) |
---|
[2079] | 120 | |
---|
[1770] | 121 | end subroutine end_surfdat_h |
---|
| 122 | |
---|
[2909] | 123 | subroutine ini_surfdat_h_slope_var(ngrid,nq,nslope) |
---|
| 124 | |
---|
| 125 | implicit none |
---|
| 126 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
| 127 | integer,intent(in) :: nq ! number of tracers |
---|
| 128 | integer,intent(in) :: nslope ! number of sub-grid scale slope |
---|
| 129 | allocate(qsurf(ngrid,nq,nslope)) |
---|
| 130 | allocate(tsurf(ngrid,nslope)) |
---|
| 131 | allocate(watercap(ngrid,nslope)) |
---|
[3130] | 132 | allocate(perennial_co2ice(ngrid,nslope)) |
---|
[2909] | 133 | allocate(emis(ngrid,nslope)) |
---|
| 134 | allocate(capcal(ngrid,nslope)) |
---|
| 135 | allocate(fluxgrd(ngrid,nslope)) |
---|
| 136 | |
---|
| 137 | end subroutine ini_surfdat_h_slope_var |
---|
| 138 | |
---|
| 139 | subroutine end_surfdat_h_slope_var |
---|
| 140 | |
---|
| 141 | implicit none |
---|
| 142 | |
---|
[2999] | 143 | if (allocated(qsurf)) deallocate(qsurf) |
---|
| 144 | if (allocated(tsurf)) deallocate(tsurf) |
---|
| 145 | if (allocated(watercap)) deallocate(watercap) |
---|
[3130] | 146 | if (allocated(perennial_co2ice)) deallocate(perennial_co2ice) |
---|
[2999] | 147 | if (allocated(emis)) deallocate(emis) |
---|
| 148 | if (allocated(capcal)) deallocate(capcal) |
---|
| 149 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
[2909] | 150 | |
---|
| 151 | end subroutine end_surfdat_h_slope_var |
---|
| 152 | |
---|
[1047] | 153 | end module surfdat_h |
---|