Changeset 5117 for LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d
- Timestamp:
- Jul 24, 2024, 4:23:34 PM (11 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_decl_cases.h
r5103 r5117 4 4 ! integer nlev_prof 5 5 ! parameter (nlev_prof = 41) 6 integernlev_toga, nt_toga6 INTEGER nlev_toga, nt_toga 7 7 parameter (nlev_toga=41, nt_toga=480) 8 integeryear_ini_toga, day_ini_toga, mth_ini_toga9 realday_ju_ini_toga ! Julian day of toga coare first day8 INTEGER year_ini_toga, day_ini_toga, mth_ini_toga 9 REAL day_ju_ini_toga ! Julian day of toga coare first day 10 10 parameter (year_ini_toga=1992) 11 11 parameter (mth_ini_toga=11) 12 12 parameter (day_ini_toga=1) ! 1erNov1992 13 realdt_toga13 REAL dt_toga 14 14 parameter (dt_toga=6.*3600.) 15 15 !! 16 integeryear_print, month_print, day_print16 INTEGER year_print, month_print, day_print 17 17 real sec_print 18 18 !! 19 realts_toga(nt_toga)20 realplev_toga(nlev_toga,nt_toga),w_toga(nlev_toga,nt_toga)21 realt_toga(nlev_toga,nt_toga),q_toga(nlev_toga,nt_toga)22 realu_toga(nlev_toga,nt_toga),v_toga(nlev_toga,nt_toga)23 realht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga)24 realhq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga)25 26 realts_prof27 realplev_prof(nlev_toga),w_prof(nlev_toga)28 realt_prof(nlev_toga),q_prof(nlev_toga)29 realu_prof(nlev_toga),v_prof(nlev_toga)30 realht_prof(nlev_toga),vt_prof(nlev_toga)31 realhq_prof(nlev_toga),vq_prof(nlev_toga)32 33 realw_mod(llm), t_mod(llm),q_mod(llm)34 realu_mod(llm),v_mod(llm), ht_mod(llm),vt_mod(llm),ug_mod(llm),vg_mod(llm)19 REAL ts_toga(nt_toga) 20 REAL plev_toga(nlev_toga,nt_toga),w_toga(nlev_toga,nt_toga) 21 REAL t_toga(nlev_toga,nt_toga),q_toga(nlev_toga,nt_toga) 22 REAL u_toga(nlev_toga,nt_toga),v_toga(nlev_toga,nt_toga) 23 REAL ht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga) 24 REAL hq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga) 25 26 REAL ts_prof 27 REAL plev_prof(nlev_toga),w_prof(nlev_toga) 28 REAL t_prof(nlev_toga),q_prof(nlev_toga) 29 REAL u_prof(nlev_toga),v_prof(nlev_toga) 30 REAL ht_prof(nlev_toga),vt_prof(nlev_toga) 31 REAL hq_prof(nlev_toga),vq_prof(nlev_toga) 32 33 REAL w_mod(llm), t_mod(llm),q_mod(llm) 34 REAL u_mod(llm),v_mod(llm), ht_mod(llm),vt_mod(llm),ug_mod(llm),vg_mod(llm) 35 35 real temp_nudg_mod(llm),qv_nudg_mod(llm),u_nudg_mod(llm),v_nudg_mod(llm) 36 realhq_mod(llm),vq_mod(llm),qv_mod(llm),ql_mod(llm),qt_mod(llm)37 realth_mod(llm)36 REAL hq_mod(llm),vq_mod(llm),qv_mod(llm),ql_mod(llm),qt_mod(llm) 37 REAL th_mod(llm) 38 38 39 39 ! EV comment these lines … … 43 43 ! Declarations specifiques au cas RICO 44 44 character*80 :: fich_rico 45 integernlev_rico45 INTEGER nlev_rico 46 46 47 47 parameter (nlev_rico=81) 48 realts_rico,ps_rico49 realw_rico(llm)50 realt_rico(llm),q_rico(llm)51 realu_rico(llm),v_rico(llm)52 realdth_rico(llm)53 realdqh_rico(llm)48 REAL ts_rico,ps_rico 49 REAL w_rico(llm) 50 REAL t_rico(llm),q_rico(llm) 51 REAL u_rico(llm),v_rico(llm) 52 REAL dth_rico(llm) 53 REAL dqh_rico(llm) 54 54 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 55 55 ! Declarations specifiques au cas TWPice 56 56 character*80 :: fich_twpice 57 integernlev_twpi, nt_twpi57 INTEGER nlev_twpi, nt_twpi 58 58 parameter (nlev_twpi=40, nt_twpi=215) 59 integeryear_ini_twpi, day_ini_twpi, mth_ini_twpi60 realheure_ini_twpi61 realday_ju_ini_twpi ! Julian day of twpice first day59 INTEGER year_ini_twpi, day_ini_twpi, mth_ini_twpi 60 REAL heure_ini_twpi 61 REAL day_ju_ini_twpi ! Julian day of twpice first day 62 62 parameter (year_ini_twpi=2006) 63 63 parameter (mth_ini_twpi=1) 64 64 parameter (day_ini_twpi=17) ! 17 = 17Jan2006 65 65 parameter (heure_ini_twpi=10800.) !3h en secondes 66 realdt_twpi66 REAL dt_twpi 67 67 parameter (dt_twpi=3.*3600.) 68 68 69 realts_twpi(nt_twpi)70 realplev_twpi(nlev_twpi,nt_twpi),w_twpi(nlev_twpi,nt_twpi)71 realt_twpi(nlev_twpi,nt_twpi),q_twpi(nlev_twpi,nt_twpi)72 realu_twpi(nlev_twpi,nt_twpi),v_twpi(nlev_twpi,nt_twpi)73 realht_twpi(nlev_twpi,nt_twpi),vt_twpi(nlev_twpi,nt_twpi)74 realhq_twpi(nlev_twpi,nt_twpi),vq_twpi(nlev_twpi,nt_twpi)75 76 realts_proftwp77 realplev_proftwp(nlev_twpi),w_proftwp(nlev_twpi)78 realt_proftwp(nlev_twpi),q_proftwp(nlev_twpi)79 realu_proftwp(nlev_twpi),v_proftwp(nlev_twpi)80 realht_proftwp(nlev_twpi),vt_proftwp(nlev_twpi)81 realhq_proftwp(nlev_twpi),vq_proftwp(nlev_twpi)69 REAL ts_twpi(nt_twpi) 70 REAL plev_twpi(nlev_twpi,nt_twpi),w_twpi(nlev_twpi,nt_twpi) 71 REAL t_twpi(nlev_twpi,nt_twpi),q_twpi(nlev_twpi,nt_twpi) 72 REAL u_twpi(nlev_twpi,nt_twpi),v_twpi(nlev_twpi,nt_twpi) 73 REAL ht_twpi(nlev_twpi,nt_twpi),vt_twpi(nlev_twpi,nt_twpi) 74 REAL hq_twpi(nlev_twpi,nt_twpi),vq_twpi(nlev_twpi,nt_twpi) 75 76 REAL ts_proftwp 77 REAL plev_proftwp(nlev_twpi),w_proftwp(nlev_twpi) 78 REAL t_proftwp(nlev_twpi),q_proftwp(nlev_twpi) 79 REAL u_proftwp(nlev_twpi),v_proftwp(nlev_twpi) 80 REAL ht_proftwp(nlev_twpi),vt_proftwp(nlev_twpi) 81 REAL hq_proftwp(nlev_twpi),vq_proftwp(nlev_twpi) 82 82 83 83 … … 85 85 !Declarations specifiques au cas FIRE 86 86 character*80 :: fich_fire 87 integernlev_fire, nt_fire87 INTEGER nlev_fire, nt_fire 88 88 parameter (nlev_fire=120, nt_fire=1) 89 integeryear_ini_fire, day_ini_fire, mth_ini_fire90 realheure_ini_fire89 INTEGER year_ini_fire, day_ini_fire, mth_ini_fire 90 REAL heure_ini_fire 91 91 parameter (year_ini_fire=1987) 92 92 parameter (mth_ini_fire=7) … … 133 133 !Declarations specifiques au cas DICE (MPL 02072013) 134 134 character*80 :: fich_dice 135 integernlev_dice, nt_dice135 INTEGER nlev_dice, nt_dice 136 136 parameter (nlev_dice=70, nt_dice=145) 137 integeryear_ini_dice, day_ini_dice, mth_ini_dice138 realheure_ini_dice139 realday_ju_ini_dice ! Julian day of dice first day137 INTEGER year_ini_dice, day_ini_dice, mth_ini_dice 138 REAL heure_ini_dice 139 REAL day_ju_ini_dice ! Julian day of dice first day 140 140 parameter (year_ini_dice=1999) 141 141 parameter (mth_ini_dice=10) 142 142 parameter (day_ini_dice=23) ! 23 = 23 october 1999 143 143 parameter (heure_ini_dice=68400.) !19UTC en secondes 144 realdt_dice144 REAL dt_dice 145 145 parameter (dt_dice=0.5*3600.) ! 1 forcage ttes les demi-heures 146 146 147 147 !profils initiaux: 148 realplev_dice(nlev_dice)148 REAL plev_dice(nlev_dice) 149 149 150 realzz_dice(nlev_dice)151 realt_dice(nlev_dice),qv_dice(nlev_dice)152 realu_dice(nlev_dice), v_dice(nlev_dice),o3_dice(nlev_dice)153 realht_dice(nlev_dice,nt_dice)154 realhq_dice(nlev_dice,nt_dice), hu_dice(nlev_dice,nt_dice)155 realhv_dice(nlev_dice,nt_dice)156 realw_dice(nlev_dice,nt_dice),omega_dice(nlev_dice,nt_dice)157 realo3_mod(llm),hu_mod(llm),hv_mod(llm)158 realt_dicei(nlev_dice),qv_dicei(nlev_dice)159 realu_dicei(nlev_dice), v_dicei(nlev_dice),o3_dicei(nlev_dice)160 realht_dicei(nlev_dice)161 realhq_dicei(nlev_dice), hu_dicei(nlev_dice)162 realhv_dicei(nlev_dice)163 realw_dicei(nlev_dice),omega_dicei(nlev_dice)150 REAL zz_dice(nlev_dice) 151 REAL t_dice(nlev_dice),qv_dice(nlev_dice) 152 REAL u_dice(nlev_dice), v_dice(nlev_dice),o3_dice(nlev_dice) 153 REAL ht_dice(nlev_dice,nt_dice) 154 REAL hq_dice(nlev_dice,nt_dice), hu_dice(nlev_dice,nt_dice) 155 REAL hv_dice(nlev_dice,nt_dice) 156 REAL w_dice(nlev_dice,nt_dice),omega_dice(nlev_dice,nt_dice) 157 REAL o3_mod(llm),hu_mod(llm),hv_mod(llm) 158 REAL t_dicei(nlev_dice),qv_dicei(nlev_dice) 159 REAL u_dicei(nlev_dice), v_dicei(nlev_dice),o3_dicei(nlev_dice) 160 REAL ht_dicei(nlev_dice) 161 REAL hq_dicei(nlev_dice), hu_dicei(nlev_dice) 162 REAL hv_dicei(nlev_dice) 163 REAL w_dicei(nlev_dice),omega_dicei(nlev_dice) 164 164 165 165 166 166 !forcings 167 realshf_dice(nt_dice),lhf_dice(nt_dice)168 reallwup_dice(nt_dice),swup_dice(nt_dice)169 realtg_dice(nt_dice),ustar_dice(nt_dice),psurf_dice(nt_dice)170 realug_dice(nt_dice),vg_dice(nt_dice)171 172 realshf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof173 realustar_prof,psurf_prof,cdrag174 realht_profd(nlev_dice),hq_profd(nlev_dice),hu_profd(nlev_dice)175 realhv_profd(nlev_dice),w_profd(nlev_dice)176 realomega_profd(nlev_dice),ug_profd,vg_profd167 REAL shf_dice(nt_dice),lhf_dice(nt_dice) 168 REAL lwup_dice(nt_dice),swup_dice(nt_dice) 169 REAL tg_dice(nt_dice),ustar_dice(nt_dice),psurf_dice(nt_dice) 170 REAL ug_dice(nt_dice),vg_dice(nt_dice) 171 172 REAL shf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof 173 REAL ustar_prof,psurf_prof,cdrag 174 REAL ht_profd(nlev_dice),hq_profd(nlev_dice),hu_profd(nlev_dice) 175 REAL hv_profd(nlev_dice),w_profd(nlev_dice) 176 REAL omega_profd(nlev_dice),ug_profd,vg_profd 177 177 178 178 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 187 187 real Ts_gcssold 188 188 real dtime_frcg 189 logical:: Turb_fcg_gcssold189 LOGICAL :: Turb_fcg_gcssold 190 190 191 191 common /turb_forcing/ & … … 196 196 197 197 198 integernlev_armcu, nt_armcu198 INTEGER nlev_armcu, nt_armcu 199 199 parameter (nlev_armcu=40, nt_armcu=31) 200 integeryear_ini_armcu, day_ini_armcu, mth_ini_armcu200 INTEGER year_ini_armcu, day_ini_armcu, mth_ini_armcu 201 201 real heure_ini_armcu 202 realday_ju_ini_armcu ! Julian day of armcu case first day202 REAL day_ju_ini_armcu ! Julian day of armcu case first day 203 203 parameter (year_ini_armcu=1997) 204 204 parameter (mth_ini_armcu=6) 205 205 parameter (day_ini_armcu=21) ! 172 = 21 juin 1997 206 206 parameter (heure_ini_armcu=41400) ! 11:30 en secondes 207 realdt_armcu207 REAL dt_armcu 208 208 parameter (dt_armcu=1.*1800.) ! forcages donnes ttes les demi-heures par ifa_armcu.txt 209 realsens_armcu(nt_armcu),flat_armcu(nt_armcu)210 realadv_theta_armcu(nt_armcu),rad_theta_armcu(nt_armcu)211 realadv_qt_armcu(nt_armcu)212 realtheta_mod(llm),rv_mod(llm),play_mod(llm)209 REAL sens_armcu(nt_armcu),flat_armcu(nt_armcu) 210 REAL adv_theta_armcu(nt_armcu),rad_theta_armcu(nt_armcu) 211 REAL adv_qt_armcu(nt_armcu) 212 REAL theta_mod(llm),rv_mod(llm),play_mod(llm) 213 213 ! profc comme "profil armcu" 214 214 215 215 ! forcages interpoles dans le temps 216 realadv_theta_prof,rad_theta_prof,adv_qt_prof217 realsens_prof,flat_prof,fact216 REAL adv_theta_prof,rad_theta_prof,adv_qt_prof 217 REAL sens_prof,flat_prof,fact 218 218 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 219 219 ! declarations specifiques au cas Sandu … … 221 221 ! integer nlev_prof 222 222 ! parameter (nlev_prof = 41) 223 integernlev_sandu, nt_sandu223 INTEGER nlev_sandu, nt_sandu 224 224 parameter (nlev_sandu=87, nt_sandu=13) 225 integeryear_ini_sandu, day_ini_sandu, mth_ini_sandu226 realday_ju_ini_sandu ! Julian day of sandu case first day225 INTEGER year_ini_sandu, day_ini_sandu, mth_ini_sandu 226 REAL day_ju_ini_sandu ! Julian day of sandu case first day 227 227 parameter (year_ini_sandu=2006) 228 228 parameter (mth_ini_sandu=7) 229 229 parameter (day_ini_sandu=15) ! 196 = 15 juillet 2006 230 realdt_sandu, tau_sandu230 REAL dt_sandu, tau_sandu 231 231 logical :: trouve_700=.TRUE. 232 232 parameter (dt_sandu=6.*3600.) ! forcages donnes ttes les 6 heures par ifa_sandu.txt 233 233 parameter (tau_sandu=30000*3600.) ! temps de relaxation u,v,thetal,qt vers profil init et au dessus 700hPa 234 234 !! 235 realts_sandu(nt_sandu)235 REAL ts_sandu(nt_sandu) 236 236 ! profs comme "profil sandu" 237 realplev_profs(nlev_sandu)238 realt_profs(nlev_sandu),thl_profs(nlev_sandu)239 realq_profs(nlev_sandu)240 realu_profs(nlev_sandu),v_profs(nlev_sandu),w_profs(nlev_sandu)241 realomega_profs(nlev_sandu),o3mmr_profs(nlev_sandu)242 243 real, dimension(llm) :: relax_u,relax_v,relax_thl244 real, dimension(llm,2) :: relax_q245 246 realthl_mod(llm),omega_mod(llm),o3mmr_mod(llm),tke_mod(llm)237 REAL plev_profs(nlev_sandu) 238 REAL t_profs(nlev_sandu),thl_profs(nlev_sandu) 239 REAL q_profs(nlev_sandu) 240 REAL u_profs(nlev_sandu),v_profs(nlev_sandu),w_profs(nlev_sandu) 241 REAL omega_profs(nlev_sandu),o3mmr_profs(nlev_sandu) 242 243 REAL, DIMENSION(llm) :: relax_u,relax_v,relax_thl 244 REAL, DIMENSION(llm,2) :: relax_q 245 246 REAL thl_mod(llm),omega_mod(llm),o3mmr_mod(llm),tke_mod(llm) 247 247 !vertical advection computation 248 reald_t_z(llm),d_th_z(llm), d_q_z(llm)249 reald_t_dyn_z(llm),d_th_dyn_z(llm), d_q_dyn_z(llm)250 reald_u_z(llm),d_v_z(llm)251 reald_u_dyn(llm),d_v_dyn(llm)252 reald_u_dyn_z(llm),d_v_dyn_z(llm)253 reald_u_adv(llm),d_v_adv(llm)254 realzz(llm)255 realzfact248 REAL d_t_z(llm),d_th_z(llm), d_q_z(llm) 249 REAL d_t_dyn_z(llm),d_th_dyn_z(llm), d_q_dyn_z(llm) 250 REAL d_u_z(llm),d_v_z(llm) 251 REAL d_u_dyn(llm),d_v_dyn(llm) 252 REAL d_u_dyn_z(llm),d_v_dyn_z(llm) 253 REAL d_u_adv(llm),d_v_adv(llm) 254 REAL zz(llm) 255 REAL zfact 256 256 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 257 257 ! Declarations specifiques au cas Astex 258 258 character*80 :: fich_astex 259 integernlev_astex, nt_astex259 INTEGER nlev_astex, nt_astex 260 260 parameter (nlev_astex=34, nt_astex=49) 261 integeryear_ini_astex, day_ini_astex, mth_ini_astex262 realday_ju_ini_astex ! Julian day of astex case first day261 INTEGER year_ini_astex, day_ini_astex, mth_ini_astex 262 REAL day_ju_ini_astex ! Julian day of astex case first day 263 263 parameter (year_ini_astex=1992) 264 264 parameter (mth_ini_astex=6) 265 265 parameter (day_ini_astex=13) ! 165 = 13 juin 1992 266 realdt_astex266 REAL dt_astex 267 267 parameter (dt_astex=3600.) ! forcages donnes ttes les heures par ifa_astex.txt 268 realts_astex(nt_astex),div_astex(nt_astex),ug_astex(nt_astex)269 realvg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex)270 realdiv_prof,ug_prof,vg_prof,ufa_prof,vfa_prof268 REAL ts_astex(nt_astex),div_astex(nt_astex),ug_astex(nt_astex) 269 REAL vg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex) 270 REAL div_prof,ug_prof,vg_prof,ufa_prof,vfa_prof 271 271 ! profa comme "profil astex" 272 realplev_profa(nlev_astex)273 realt_profa(nlev_astex),thl_profa(nlev_astex)274 realqv_profa(nlev_astex),ql_profa(nlev_astex)275 realqt_profa(nlev_astex),o3mmr_profa(nlev_astex)276 realu_profa(nlev_astex),v_profa(nlev_astex),w_profa(nlev_astex)277 realtke_profa(nlev_astex)272 REAL plev_profa(nlev_astex) 273 REAL t_profa(nlev_astex),thl_profa(nlev_astex) 274 REAL qv_profa(nlev_astex),ql_profa(nlev_astex) 275 REAL qt_profa(nlev_astex),o3mmr_profa(nlev_astex) 276 REAL u_profa(nlev_astex),v_profa(nlev_astex),w_profa(nlev_astex) 277 REAL tke_profa(nlev_astex) 278 278 279 279 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 280 280 !Declarations specifiques au cas standard 281 281 282 realw_mod_cas(llm), t_mod_cas(llm),q_mod_cas(llm)283 realtheta_mod_cas(llm),thl_mod_cas(llm),thv_mod_cas(llm)284 realqv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm)285 realug_mod_cas(llm),vg_mod_cas(llm)286 realtemp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm),v_nudg_mod_cas(llm),u_nudg_mod_cas(llm)287 realinvtau_temp_nudg_mod_cas(llm),invtau_qv_nudg_mod_cas(llm),invtau_v_nudg_mod_cas(llm),invtau_u_nudg_mod_cas(llm)288 realu_mod_cas(llm),v_mod_cas(llm)289 realomega_mod_cas(llm),tke_mod_cas(llm+1)290 realht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm)291 realhth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm)292 realhq_mod_cas(llm),vq_mod_cas(llm),dq_mod_cas(llm)293 realhu_mod_cas(llm),vu_mod_cas(llm),du_mod_cas(llm)294 realhv_mod_cas(llm),vv_mod_cas(llm),dv_mod_cas(llm)295 integerday_ini_cas296 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 297 298 282 REAL w_mod_cas(llm), t_mod_cas(llm),q_mod_cas(llm) 283 REAL theta_mod_cas(llm),thl_mod_cas(llm),thv_mod_cas(llm) 284 REAL qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm) 285 REAL ug_mod_cas(llm),vg_mod_cas(llm) 286 REAL temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm),v_nudg_mod_cas(llm),u_nudg_mod_cas(llm) 287 REAL invtau_temp_nudg_mod_cas(llm),invtau_qv_nudg_mod_cas(llm),invtau_v_nudg_mod_cas(llm),invtau_u_nudg_mod_cas(llm) 288 REAL u_mod_cas(llm),v_mod_cas(llm) 289 REAL omega_mod_cas(llm),tke_mod_cas(llm+1) 290 REAL ht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm) 291 REAL hth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm) 292 REAL hq_mod_cas(llm),vq_mod_cas(llm),dq_mod_cas(llm) 293 REAL hu_mod_cas(llm),vu_mod_cas(llm),du_mod_cas(llm) 294 REAL hv_mod_cas(llm),vv_mod_cas(llm),dv_mod_cas(llm) 295 INTEGER day_ini_cas 296 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 297 298 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_interp_cases.h
r5116 r5117 32 32 ! EV tg instead of ts_cur 33 33 tg = ts_prof_cas 34 if ((tg .eq. 0.) .and. (tskin_prof_cas .ne. 0.)) THEN34 IF ((tg .EQ. 0.) .AND. (tskin_prof_cas .NE. 0.)) THEN 35 35 tg=tskin_prof_cas 36 36 endif … … 78 78 d_u_dyn_z(:)=0. 79 79 d_v_dyn_z(:)=0. 80 if(1==0) THEN80 IF (1==0) THEN 81 81 DO l=2,llm-1 82 82 d_t_z(l)=(temp(l+1)-temp(l-1))/(play(l+1)-play(l-1)) … … 132 132 133 133 !geostrophic wind 134 if (forc_geo.eq.1) THEN134 IF (forc_geo.EQ.1) THEN 135 135 do l=1,llm 136 136 ug(l) = ug_mod_cas(l) … … 168 168 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 169 169 170 if (trad.eq.1) THEN170 IF (trad.EQ.1) THEN 171 171 tend_rayo=1 172 172 dt_cooling(l) = dtrad_mod_cas(l) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_read_forc_cases.h
r5116 r5117 12 12 13 13 PRINT*,'FORCING ,forcing_SCM',forcing_SCM 14 if(forcing_SCM) THEN14 IF (forcing_SCM) THEN 15 15 WRITE(*,*),'avant CALL read_SCM' 16 16 CALL read_SCM_cas … … 76 76 77 77 !initial surface temperature 78 if(tskin_prof_cas .NE. 0.) THEN78 IF (tskin_prof_cas .NE. 0.) THEN 79 79 ! we take the first value of the prescribed ts 80 80 tsurf=tskin_prof_cas 81 else if(ts_prof_cas .NE. 0) THEN81 ELSE IF (ts_prof_cas .NE. 0) THEN 82 82 ! if an initial ts value is present, we take it 83 83 tsurf=ts_prof_cas … … 86 86 ! ts forcing during the run (if any) 87 87 tg = ts_prof_cas 88 if ((tg .eq. 0.) .and. (tskin_prof_cas .NE. 0.)) THEN88 IF ((tg .EQ. 0.) .AND. (tskin_prof_cas .NE. 0.)) THEN 89 89 tg=tskin_prof_cas 90 90 endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/compar1d.h
r5116 r5117 30 30 REAL :: zpicinp 31 31 32 logical:: restart33 logical:: ok_old_disvert32 LOGICAL :: restart 33 LOGICAL :: ok_old_disvert 34 34 35 35 ! Pour les forcages communs: ces entiers valent 0 ou 1 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/fcg_racmo.h
r5116 r5117 3 3 4 4 real :: a_guide 5 logical :: ok_invertp5 LOGICAL :: ok_invertp 6 6 INTEGER :: forc_trb 7 7 character*31 :: fich_racmo -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_1dutils.f90
r5116 r5117 62 62 SUBROUTINE conf_unicol 63 63 64 useIOIPSL64 USE IOIPSL 65 65 USE lmdz_print_control, ONLY: lunout 66 66 !----------------------------------------------------------------------- … … 97 97 lunout = 6 98 98 ! CALL getin('lunout', lunout) 99 IF (lunout /= 5 . and. lunout /= 6) THEN99 IF (lunout /= 5 .AND. lunout /= 6) THEN 100 100 OPEN(lunout, FILE = 'lmdz.out') 101 101 ENDIF … … 711 711 USE lmdz_write_field_phy 712 712 USE infotrac 713 usecontrol_mod713 USE control_mod 714 714 USE comconst_mod, ONLY: im, jm, lllm 715 715 USE logic_mod, ONLY: fxyhypb, ysinus … … 844 844 USE iostart 845 845 USE infotrac 846 usecontrol_mod846 USE control_mod 847 847 USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad 848 848 USE logic_mod, ONLY: fxyhypb, ysinus … … 1032 1032 1033 1033 CHARACTER(LEN = *) modname 1034 integerierr1034 INTEGER ierr 1035 1035 CHARACTER(LEN = *) message 1036 1036 … … 1046 1046 CALL getin_dump 1047 1047 1048 if(ierr == 0) THEN1048 IF (ierr == 0) THEN 1049 1049 WRITE(*, *) 'Everything is cool' 1050 1050 else … … 1248 1248 IMPLICIT NONE 1249 1249 ! arguments 1250 integerllm1251 realw(llm + 1), q(llm), plev(llm + 1), dt1250 INTEGER llm 1251 REAL w(llm + 1), q(llm), plev(llm + 1), dt 1252 1252 1253 1253 ! local 1254 integerl1255 realzwq(llm + 1), zm(llm + 1), zw(llm + 1)1256 realqold1254 INTEGER l 1255 REAL zwq(llm + 1), zm(llm + 1), zw(llm + 1) 1256 REAL qold 1257 1257 1258 1258 !--------------------------------------------------------------- … … 1285 1285 include "YOMCST.h" 1286 1286 ! argument 1287 integerllm1287 INTEGER llm 1288 1288 real omega(llm + 1), d_t_va(llm), d_q_va(llm, 3) 1289 1289 real d_u_va(llm), d_v_va(llm) … … 1292 1292 real play(llm) 1293 1293 ! interne 1294 integerl1295 realalpha, omgdown, omgup1294 INTEGER l 1295 REAL alpha, omgdown, omgup 1296 1296 1297 1297 do l = 1, llm … … 1357 1357 include "YOMCST.h" 1358 1358 ! argument 1359 integerllm, nqtot1359 INTEGER llm, nqtot 1360 1360 real omega(llm + 1), d_t_va(llm), d_q_va(llm, nqtot) 1361 1361 ! real d_u_va(llm), d_v_va(llm) … … 1363 1363 real u(llm), v(llm) 1364 1364 real play(llm) 1365 realcor(llm)1365 REAL cor(llm) 1366 1366 ! real dph(llm),dudp(llm),dvdp(llm),dqdp(llm),dtdp(llm) 1367 realdph(llm), dqdp(llm), dtdp(llm)1367 REAL dph(llm), dqdp(llm), dtdp(llm) 1368 1368 ! interne 1369 integerk1370 realomdn, omup1369 INTEGER k 1370 REAL omdn, omup 1371 1371 1372 1372 ! dudp=0. … … 1673 1673 !------------------------------------------------------------------------- 1674 1674 1675 integernlevmax1675 INTEGER nlevmax 1676 1676 parameter (nlevmax = 41) 1677 integernlev_cas, mxcalc1677 INTEGER nlev_cas, mxcalc 1678 1678 ! real play(llm), plev_prof(nlevmax) 1679 1679 ! real t_prof(nlevmax),q_prof(nlevmax) … … 1682 1682 ! real hq_prof(nlevmax),vq_prof(nlevmax) 1683 1683 1684 realplay(llm), plev_prof_cas(nlev_cas)1685 realt_prof_cas(nlev_cas), th_prof_cas(nlev_cas), thv_prof_cas(nlev_cas), thl_prof_cas(nlev_cas)1686 realqv_prof_cas(nlev_cas), ql_prof_cas(nlev_cas), qi_prof_cas(nlev_cas)1687 realu_prof_cas(nlev_cas), v_prof_cas(nlev_cas)1688 realug_prof_cas(nlev_cas), vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas), omega_prof_cas(nlev_cas)1689 realdu_prof_cas(nlev_cas), hu_prof_cas(nlev_cas), vu_prof_cas(nlev_cas)1690 realdv_prof_cas(nlev_cas), hv_prof_cas(nlev_cas), vv_prof_cas(nlev_cas)1691 realdt_prof_cas(nlev_cas), ht_prof_cas(nlev_cas), vt_prof_cas(nlev_cas), dtrad_prof_cas(nlev_cas)1692 realdth_prof_cas(nlev_cas), hth_prof_cas(nlev_cas), vth_prof_cas(nlev_cas)1693 realdq_prof_cas(nlev_cas), hq_prof_cas(nlev_cas), vq_prof_cas(nlev_cas)1694 1695 realt_mod_cas(llm), theta_mod_cas(llm), thv_mod_cas(llm), thl_mod_cas(llm)1696 realqv_mod_cas(llm), ql_mod_cas(llm), qi_mod_cas(llm)1697 realu_mod_cas(llm), v_mod_cas(llm)1698 realug_mod_cas(llm), vg_mod_cas(llm), w_mod_cas(llm), omega_mod_cas(llm)1699 realdu_mod_cas(llm), hu_mod_cas(llm), vu_mod_cas(llm)1700 realdv_mod_cas(llm), hv_mod_cas(llm), vv_mod_cas(llm)1701 realdt_mod_cas(llm), ht_mod_cas(llm), vt_mod_cas(llm), dtrad_mod_cas(llm)1702 realdth_mod_cas(llm), hth_mod_cas(llm), vth_mod_cas(llm)1703 realdq_mod_cas(llm), hq_mod_cas(llm), vq_mod_cas(llm)1704 1705 integerl, k, k1, k21706 realfrac, frac1, frac2, fact1684 REAL play(llm), plev_prof_cas(nlev_cas) 1685 REAL t_prof_cas(nlev_cas), th_prof_cas(nlev_cas), thv_prof_cas(nlev_cas), thl_prof_cas(nlev_cas) 1686 REAL qv_prof_cas(nlev_cas), ql_prof_cas(nlev_cas), qi_prof_cas(nlev_cas) 1687 REAL u_prof_cas(nlev_cas), v_prof_cas(nlev_cas) 1688 REAL ug_prof_cas(nlev_cas), vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas), omega_prof_cas(nlev_cas) 1689 REAL du_prof_cas(nlev_cas), hu_prof_cas(nlev_cas), vu_prof_cas(nlev_cas) 1690 REAL dv_prof_cas(nlev_cas), hv_prof_cas(nlev_cas), vv_prof_cas(nlev_cas) 1691 REAL dt_prof_cas(nlev_cas), ht_prof_cas(nlev_cas), vt_prof_cas(nlev_cas), dtrad_prof_cas(nlev_cas) 1692 REAL dth_prof_cas(nlev_cas), hth_prof_cas(nlev_cas), vth_prof_cas(nlev_cas) 1693 REAL dq_prof_cas(nlev_cas), hq_prof_cas(nlev_cas), vq_prof_cas(nlev_cas) 1694 1695 REAL t_mod_cas(llm), theta_mod_cas(llm), thv_mod_cas(llm), thl_mod_cas(llm) 1696 REAL qv_mod_cas(llm), ql_mod_cas(llm), qi_mod_cas(llm) 1697 REAL u_mod_cas(llm), v_mod_cas(llm) 1698 REAL ug_mod_cas(llm), vg_mod_cas(llm), w_mod_cas(llm), omega_mod_cas(llm) 1699 REAL du_mod_cas(llm), hu_mod_cas(llm), vu_mod_cas(llm) 1700 REAL dv_mod_cas(llm), hv_mod_cas(llm), vv_mod_cas(llm) 1701 REAL dt_mod_cas(llm), ht_mod_cas(llm), vt_mod_cas(llm), dtrad_mod_cas(llm) 1702 REAL dth_mod_cas(llm), hth_mod_cas(llm), vth_mod_cas(llm) 1703 REAL dq_mod_cas(llm), hq_mod_cas(llm), vq_mod_cas(llm) 1704 1705 INTEGER l, k, k1, k2 1706 REAL frac, frac1, frac2, fact 1707 1707 1708 1708 ! do l = 1, llm … … 1715 1715 do l = 1, llm 1716 1716 1717 if(play(l)>=plev_prof_cas(nlev_cas)) THEN1717 IF (play(l)>=plev_prof_cas(nlev_cas)) THEN 1718 1718 mxcalc = l 1719 1719 ! print *,'debut interp2, mxcalc=',mxcalc … … 1721 1721 k2 = 0 1722 1722 1723 if(play(l)<=plev_prof_cas(1)) THEN1723 IF (play(l)<=plev_prof_cas(1)) THEN 1724 1724 do k = 1, nlev_cas - 1 1725 if (play(l)<=plev_prof_cas(k).and. play(l)>plev_prof_cas(k + 1)) THEN1725 IF (play(l)<=plev_prof_cas(k).AND. play(l)>plev_prof_cas(k + 1)) THEN 1726 1726 k1 = k 1727 1727 k2 = k + 1 … … 1729 1729 enddo 1730 1730 1731 if (k1==0 .or. k2==0) THEN1731 IF (k1==0 .OR. k2==0) THEN 1732 1732 WRITE(*, *) 'PB! k1, k2 = ', k1, k2 1733 1733 WRITE(*, *) 'l,play(l) = ', l, play(l) / 100 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_old_1dconv.f90
r5116 r5117 27 27 REAL hplaym(100) !pression en hPa milieux des couches Meso-NH 28 28 29 integeri, j, k, ll, in29 INTEGER i, j, k, ll, in 30 30 31 31 CHARACTER*80 file_forctl, file_fordat … … 45 45 ! dt :pas de temps du meso_NH (en secondes) 46 46 !---------------------------------------------------------------------- 47 integerpasmax, dt47 INTEGER pasmax, dt 48 48 save pasmax, dt 49 49 !---------------------------------------------------------------------- … … 60 60 ! hv : idem le long de y. 61 61 ! Ts : Temperature de surface (K) 62 ! imp_fcg: var. logical .eq. T si forcage en impulsion63 ! ts_fcg: var. logical .eq. T si forcage en Ts present dans fichier64 ! Tp_fcg: var. logical .eq. T si forcage donne en Temp potentielle65 ! Turb_fcg: var. logical .eq. T si forcage turbulent present dans fichier66 !---------------------------------------------------------------------- 67 integeritap68 realdtime69 realht(100)70 realhq(100)71 realhu(100)72 realhv(100)73 realhw(100)74 realhthturb(100)75 realhqturb(100)76 realTs, Ts_subr77 logicalimp_fcg78 logicalts_fcg79 logicalTp_fcg80 logicalTurb_fcg62 ! imp_fcg: var. LOGICAL .EQ. T si forcage en impulsion 63 ! ts_fcg: var. LOGICAL .EQ. T si forcage en Ts present dans fichier 64 ! Tp_fcg: var. LOGICAL .EQ. T si forcage donne en Temp potentielle 65 ! Turb_fcg: var. LOGICAL .EQ. T si forcage turbulent present dans fichier 66 !---------------------------------------------------------------------- 67 INTEGER itap 68 REAL dtime 69 REAL ht(100) 70 REAL hq(100) 71 REAL hu(100) 72 REAL hv(100) 73 REAL hw(100) 74 REAL hthturb(100) 75 REAL hqturb(100) 76 REAL Ts, Ts_subr 77 LOGICAL imp_fcg 78 LOGICAL ts_fcg 79 LOGICAL Tp_fcg 80 LOGICAL Turb_fcg 81 81 !---------------------------------------------------------------------- 82 82 ! Variables internes de get_uvd (note : l interpolation temporelle … … 100 100 ! tsbef : surface temperature 'before time step' 101 101 !---------------------------------------------------------------------- 102 integertime0, pas, pasprev102 INTEGER time0, pas, pasprev 103 103 save time0, pas, pasprev 104 realtime105 realhtaft(100), hqaft(100), hwaft(100), huaft(100), hvaft(100)106 realhthturbaft(100), hqturbaft(100)107 realTsaft104 REAL time 105 REAL htaft(100), hqaft(100), hwaft(100), huaft(100), hvaft(100) 106 REAL hthturbaft(100), hqturbaft(100) 107 REAL Tsaft 108 108 save htaft, hqaft, hwaft, huaft, hvaft, hthturbaft, hqturbaft 109 realhtbef(100), hqbef(100), hwbef(100), hubef(100), hvbef(100)110 realhthturbbef(100), hqturbbef(100)111 realTsbef109 REAL htbef(100), hqbef(100), hwbef(100), hubef(100), hvbef(100) 110 REAL hthturbbef(100), hqturbbef(100) 111 REAL Tsbef 112 112 save htbef, hqbef, hwbef, hubef, hvbef, hthturbbef, hqturbbef 113 113 114 realtimeaft, timebef114 REAL timeaft, timebef 115 115 save timeaft, timebef 116 integertemps116 INTEGER temps 117 117 character*4 string 118 118 !---------------------------------------------------------------------- 119 119 ! variables arguments de la subroutine rdgrads 120 120 !--------------------------------------------------------------------- 121 integericompt, icomp1 !compteurs de rdgrads122 realz(100) ! altitude (grille Meso)123 realht_mes(100) !convergence horizontale de temperature121 INTEGER icompt, icomp1 !compteurs de rdgrads 122 REAL z(100) ! altitude (grille Meso) 123 REAL ht_mes(100) !convergence horizontale de temperature 124 124 !-(grille Meso) 125 realhq_mes(100) !convergence horizontale d humidite125 REAL hq_mes(100) !convergence horizontale d humidite 126 126 !(grille Meso) 127 realhw_mes(100) !vitesse verticale moyenne127 REAL hw_mes(100) !vitesse verticale moyenne 128 128 !(grille Meso) 129 realhu_mes(100), hv_mes(100) !convergence horizontale d impulsion129 REAL hu_mes(100), hv_mes(100) !convergence horizontale d impulsion 130 130 !(grille Meso) 131 realhthturb_mes(100) !tendance horizontale de T_pot, due aux131 REAL hthturb_mes(100) !tendance horizontale de T_pot, due aux 132 132 !flux turbulents 133 realhqturb_mes(100) !tendance horizontale d humidite, due aux133 REAL hqturb_mes(100) !tendance horizontale d humidite, due aux 134 134 !flux turbulents 135 135 … … 143 143 !--------------------------------------------------------------------- 144 144 character*80 aaa, atemps, spaces, apasmax 145 integernch, imn, ipa145 INTEGER nch, imn, ipa 146 146 !--------------------------------------------------------------------- 147 147 ! procedures appelees … … 220 220 !*** gcm . on obtient le nouveau champ after *** 221 221 do k = 1, klev 222 if(JM(k) == 0) THEN222 IF (JM(k) == 0) THEN 223 223 htaft(k) = ht_mes(jm(k) + 1) 224 224 hqaft(k) = hq_mes(jm(k) + 1) … … 232 232 hqTurbaft(k) = hqTurb_mes(jm(k) + 1) 233 233 endif ! Turb_fcg 234 else ! JM(k) . eq. 0234 else ! JM(k) .EQ. 0 235 235 htaft(k) = coef1(k) * ht_mes(jm(k)) + coef2(k) * ht_mes(jm(k) + 1) 236 236 hqaft(k) = coef1(k) * hq_mes(jm(k)) + coef2(k) * hq_mes(jm(k) + 1) … … 246 246 & + coef2(k) * hqTurb_mes(jm(k) + 1) 247 247 endif ! Turb_fcg 248 endif ! JM(k) . eq. 0248 endif ! JM(k) .EQ. 0 249 249 enddo 250 250 tsaft = ts_subr … … 323 323 read(97, 1000, end = 999) string 324 324 1000 format (a4) 325 if(string == 'TDEF') go to 50325 IF (string == 'TDEF') go to 50 326 326 enddo 327 327 50 backspace(97) … … 397 397 !----------------------------------------------------------------------- 398 398 do k = 1, klev 399 if(JM(k) == 0) THEN399 IF (JM(k) == 0) THEN 400 400 !FKC bug? ne faut il pas convertir tsol en tendance ???? 401 401 !RT bug taken care of by removing the stuff … … 411 411 hqTurbaft(k) = hqTurb_mes(jm(k) + 1) 412 412 endif ! Turb_fcg 413 else ! JM(k) . eq. 0413 else ! JM(k) .EQ. 0 414 414 htaft(k) = coef1(k) * ht_mes(jm(k)) + coef2(k) * ht_mes(jm(k) + 1) 415 415 hqaft(k) = coef1(k) * hq_mes(jm(k)) + coef2(k) * hq_mes(jm(k) + 1) … … 425 425 & + coef2(k) * hqTurb_mes(jm(k) + 1) 426 426 endif ! Turb_fcg 427 endif ! JM(k) . eq. 0427 endif ! JM(k) .EQ. 0 428 428 enddo 429 429 tsaft = ts_subr … … 457 457 SUBROUTINE advect_tvl(dtime, zt, zq, vu_f, vv_f, t_f, q_f & 458 458 &, d_t_adv, d_q_adv) 459 usedimphy459 USE dimphy 460 460 IMPLICIT NONE 461 461 … … 463 463 !cccc INCLUDE "dimphy.h" 464 464 465 integerk466 realdtime, fact, du, dv, cx, cy, alx, aly467 realzt(klev), zq(klev, 3)468 realvu_f(klev), vv_f(klev), t_f(klev), q_f(klev, 3)469 470 reald_t_adv(klev), d_q_adv(klev, 3)465 INTEGER k 466 REAL dtime, fact, du, dv, cx, cy, alx, aly 467 REAL zt(klev), zq(klev, 3) 468 REAL vu_f(klev), vv_f(klev), t_f(klev), q_f(klev, 3) 469 470 REAL d_t_adv(klev), d_q_adv(klev, 3) 471 471 472 472 ! Velocity of moving cell … … 509 509 COMMON/com2_phys_gcss/playm, hplaym, nblvlm 510 510 511 integerk, klevgcm512 realplaygcm(klevgcm) ! pression en milieu de couche du gcm513 realpsolgcm511 INTEGER k, klevgcm 512 REAL playgcm(klevgcm) ! pression en milieu de couche du gcm 513 REAL psolgcm 514 514 character*80 file_forctl 515 515 … … 584 584 character*4 a 585 585 character*80 aaa, anblvl, spaces 586 integernch586 INTEGER nch 587 587 588 588 lu = 9 … … 591 591 do i = 1, 1000 592 592 read(lu, 1000, end = 999) a 593 if(a == 'ZDEF') go to 100593 IF (a == 'ZDEF') go to 100 594 594 enddo 595 595 … … 610 610 read(lu, *) (playm(mlz), mlz = 1, nblvlm) 611 611 ! Si la pression est en HPa, la multiplier par 100 612 if(playm(1) < 10000.) THEN612 IF (playm(1) < 10000.) THEN 613 613 do mlz = 1, nblvlm 614 614 playm(mlz) = playm(mlz) * 100. … … 637 637 IMPLICIT none 638 638 INTEGER itape, icount, icomp, nl 639 realz(nl), ht(nl), hq(nl), hw(nl), hu(nl), hv(nl)640 realhthtur(nl), hqtur(nl)641 realts639 REAL z(nl), ht(nl), hq(nl), hw(nl), hu(nl), hv(nl) 640 REAL hthtur(nl), hqtur(nl) 641 REAL ts 642 642 643 643 INTEGER k … … 729 729 do k = 1, klev 730 730 val = play(k) 731 if(val > playm(1)) THEN731 IF (val > playm(1)) THEN 732 732 mlz = 0 733 733 JM(1) = mlz 734 734 coef1(1) = (playm(mlz + 1) - val) / (playm(mlz + 1) - psol) 735 735 coef2(1) = (val - psol) / (playm(mlz + 1) - psol) 736 else if(val > playm(nblvlm)) THEN736 ELSE IF (val > playm(nblvlm)) THEN 737 737 do mlz = 1, nblvlm 738 if (val <= playm(mlz).and. val > playm(mlz + 1))THEN738 IF (val <= playm(mlz).AND. val > playm(mlz + 1))THEN 739 739 JM(k) = mlz 740 740 coef1(k) = (playm(mlz + 1) - val) / (playm(mlz + 1) - playm(mlz)) … … 807 807 IF(END==BEG - 2) END = LENGTH 808 808 !* PRINT *,'NTH,LENGTH,N,BEG,END=',NTH,LENGTH,N,BEG,END 809 end do809 end DO 810 810 NCH = END - BEG + 1 811 811 IF(NCH>0) SST = STR(BEG:END) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_old_lmdz1d.F90
r5116 r5117 67 67 !--------------------------------------------------------------------- 68 68 69 integer, parameter :: ngrid = 169 INTEGER, parameter :: ngrid = 1 70 70 REAL :: zcufi = 1. 71 71 REAL :: zcvfi = 1. 72 72 73 73 !- REAL :: nat_surf 74 !- logical:: ok_flux_surf74 !- LOGICAL :: ok_flux_surf 75 75 !- REAL :: fsens 76 76 !- REAL :: flat … … 107 107 108 108 INTEGER :: kmax = llm 109 integerllm700, nq1, nq2109 INTEGER llm700, nq1, nq2 110 110 INTEGER, PARAMETER :: nlev_max = 1000, nqmx = 1000 111 realtimestep, frac112 realheight(nlev_max), tttprof(nlev_max), qtprof(nlev_max)111 REAL timestep, frac 112 REAL height(nlev_max), tttprof(nlev_max), qtprof(nlev_max) 113 113 real uprof(nlev_max), vprof(nlev_max), e12prof(nlev_max) 114 114 real ugprof(nlev_max), vgprof(nlev_max), wfls(nlev_max) … … 118 118 119 119 ! INTEGER :: forcing_type 120 logical:: forcing_les = .FALSE.121 logical:: forcing_armcu = .FALSE.122 logical:: forcing_rico = .FALSE.123 logical:: forcing_radconv = .FALSE.124 logical:: forcing_toga = .FALSE.125 logical:: forcing_twpice = .FALSE.126 logical:: forcing_amma = .FALSE.127 logical:: forcing_dice = .FALSE.128 logical:: forcing_gabls4 = .FALSE.129 130 logical:: forcing_GCM2SCM = .FALSE.131 logical:: forcing_GCSSold = .FALSE.132 logical:: forcing_sandu = .FALSE.133 logical:: forcing_astex = .FALSE.134 logical:: forcing_fire = .FALSE.135 logical:: forcing_case = .FALSE.136 logical:: forcing_case2 = .FALSE.137 logical:: forcing_SCM = .FALSE.120 LOGICAL :: forcing_les = .FALSE. 121 LOGICAL :: forcing_armcu = .FALSE. 122 LOGICAL :: forcing_rico = .FALSE. 123 LOGICAL :: forcing_radconv = .FALSE. 124 LOGICAL :: forcing_toga = .FALSE. 125 LOGICAL :: forcing_twpice = .FALSE. 126 LOGICAL :: forcing_amma = .FALSE. 127 LOGICAL :: forcing_dice = .FALSE. 128 LOGICAL :: forcing_gabls4 = .FALSE. 129 130 LOGICAL :: forcing_GCM2SCM = .FALSE. 131 LOGICAL :: forcing_GCSSold = .FALSE. 132 LOGICAL :: forcing_sandu = .FALSE. 133 LOGICAL :: forcing_astex = .FALSE. 134 LOGICAL :: forcing_fire = .FALSE. 135 LOGICAL :: forcing_case = .FALSE. 136 LOGICAL :: forcing_case2 = .FALSE. 137 LOGICAL :: forcing_SCM = .FALSE. 138 138 INTEGER :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file 139 139 ! (cf read_tsurf1d.F) 140 140 141 realwwww141 REAL wwww 142 142 !vertical advection computation 143 143 ! real d_t_z(llm), d_q_z(llm) … … 147 147 148 148 !flag forcings 149 logical:: nudge_wind = .TRUE.150 logical:: nudge_thermo = .FALSE.151 logical:: cptadvw = .TRUE.149 LOGICAL :: nudge_wind = .TRUE. 150 LOGICAL :: nudge_thermo = .FALSE. 151 LOGICAL :: cptadvw = .TRUE. 152 152 !===================================================================== 153 153 ! DECLARATIONS FOR EACH CASE … … 163 163 INTEGER :: inudge_RHT = 1 164 164 INTEGER :: inudge_UV = 2 165 logical:: nudge(nudge_max)165 LOGICAL :: nudge(nudge_max) 166 166 REAL :: t_targ(llm) 167 167 REAL :: rh_targ(llm) … … 214 214 ! Call to phyredem 215 215 !--------------------------------------------------------------------- 216 logical:: ok_writedem = .TRUE.216 LOGICAL :: ok_writedem = .TRUE. 217 217 REAL :: sollw_in = 0. 218 218 REAL :: solsw_in = 0. … … 221 221 ! Call to physiq 222 222 !--------------------------------------------------------------------- 223 logical:: firstcall = .TRUE.224 logical:: lastcall = .FALSE.223 LOGICAL :: firstcall = .TRUE. 224 LOGICAL :: lastcall = .FALSE. 225 225 REAL :: phis(1) = 0.0 226 226 REAL :: dpsrf(1) … … 229 229 ! Initializations of boundary conditions 230 230 !--------------------------------------------------------------------- 231 real, allocatable:: phy_nat (:) ! 0=ocean libre,1=land,2=glacier,3=banquise232 real, allocatable:: phy_alb (:) ! Albedo land only (old value condsurf_jyg=0.3)233 real, allocatable:: phy_sst (:) ! SST (will not be used; cf read_tsurf1d.F)234 real, allocatable:: phy_bil (:) ! Ne sert que pour les slab_ocean235 real, allocatable:: phy_rug (:) ! Longueur rugosite utilisee sur land only236 real, allocatable:: phy_ice (:) ! Fraction de glace237 real, allocatable:: phy_fter(:) ! Fraction de terre238 real, allocatable:: phy_foce(:) ! Fraction de ocean239 real, allocatable:: phy_fsic(:) ! Fraction de glace240 real, allocatable:: phy_flic(:) ! Fraction de glace231 REAL, ALLOCATABLE :: phy_nat (:) ! 0=ocean libre,1=land,2=glacier,3=banquise 232 REAL, ALLOCATABLE :: phy_alb (:) ! Albedo land only (old value condsurf_jyg=0.3) 233 REAL, ALLOCATABLE :: phy_sst (:) ! SST (will not be used; cf read_tsurf1d.F) 234 REAL, ALLOCATABLE :: phy_bil (:) ! Ne sert que pour les slab_ocean 235 REAL, ALLOCATABLE :: phy_rug (:) ! Longueur rugosite utilisee sur land only 236 REAL, ALLOCATABLE :: phy_ice (:) ! Fraction de glace 237 REAL, ALLOCATABLE :: phy_fter(:) ! Fraction de terre 238 REAL, ALLOCATABLE :: phy_foce(:) ! Fraction de ocean 239 REAL, ALLOCATABLE :: phy_fsic(:) ! Fraction de glace 240 REAL, ALLOCATABLE :: phy_flic(:) ! Fraction de glace 241 241 242 242 !--------------------------------------------------------------------- … … 245 245 INTEGER :: k, l, i, it = 1, mxcalc 246 246 INTEGER :: nsrf 247 integerjcode247 INTEGER jcode 248 248 INTEGER read_climoz 249 249 250 250 INTEGER :: it_end ! iteration number of the last call 251 251 !Al1 252 integerecrit_slab_oc !1=ecrit,-1=lit,0=no file252 INTEGER ecrit_slab_oc !1=ecrit,-1=lit,0=no file 253 253 data ecrit_slab_oc/-1/ 254 254 … … 355 355 ! Radiation to be switched off 356 356 357 if(forcing_type <=0) THEN357 IF (forcing_type <=0) THEN 358 358 forcing_les = .TRUE. 359 359 elseif (forcing_type ==1) THEN … … 446 446 447 447 type_ts_forcing = 0 448 if (forcing_toga.or.forcing_sandu.or.forcing_astex .or. forcing_dice) &448 IF (forcing_toga.OR.forcing_sandu.OR.forcing_astex .OR. forcing_dice) & 449 449 type_ts_forcing = 1 450 450 451 ! Initialization of the logicalswitch for nudging451 ! Initialization of the LOGICAL switch for nudging 452 452 jcode = iflag_nudge 453 453 do i = 1, nudge_max … … 484 484 485 485 ! calend = 'earth_365d' 486 if(calend == 'earth_360d') THEN486 IF (calend == 'earth_360d') THEN 487 487 CALL ioconf_calendar('360_day') 488 488 WRITE(*, *)'CALENDRIER CHOISI: Terrestre a 360 jours/an' 489 else if(calend == 'earth_365d') THEN489 ELSE IF (calend == 'earth_365d') THEN 490 490 CALL ioconf_calendar('noleap') 491 491 WRITE(*, *)'CALENDRIER CHOISI: Terrestre a 365 jours/an' 492 else if(calend == 'earth_366d') THEN492 ELSE IF (calend == 'earth_366d') THEN 493 493 CALL ioconf_calendar('all_leap') 494 494 WRITE(*, *)'CALENDRIER CHOISI: Terrestre bissextile' 495 else if(calend == 'gregorian') THEN495 ELSE IF (calend == 'gregorian') THEN 496 496 stop 'gregorian calend should not be used by normal user' 497 497 CALL ioconf_calendar('gregorian') ! not to be used by normal users … … 509 509 ! Le numero du jour est dans "day". L heure est traitee separement. 510 510 ! La date complete est dans "daytime" (l'unite est le jour). 511 if(nday>0) THEN511 IF (nday>0) THEN 512 512 fnday = nday 513 513 else … … 606 606 CALL init_infotrac 607 607 608 if(nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F'608 IF (nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F' 609 609 allocate(q(llm, nqtot)) ; q(:, :) = 0. 610 610 allocate(dq(llm, nqtot)) … … 627 627 CALL phys_state_var_init(read_climoz) 628 628 629 if(ngrid/=klon) THEN629 IF (ngrid/=klon) THEN 630 630 PRINT*, 'stop in inifis' 631 631 PRINT*, 'Probleme de dimensions :' … … 655 655 !! mpl et jyg le 22/08/2012 : 656 656 !! pour que les cas a flux de surface imposes marchent 657 IF(.NOT.ok_flux_surf. or.max(abs(wtsurf), abs(wqsurf))>0.) THEN657 IF(.NOT.ok_flux_surf.OR.max(abs(wtsurf), abs(wqsurf))>0.) THEN 658 658 fsens = -wtsurf * rcpd * rho(1) 659 659 flat = -wqsurf * rlvtt * rho(1) … … 695 695 do l = 1, llm 696 696 WRITE(*, *) 'l,play(l),presnivs(l): ', l, play(l), presnivs(l) 697 if (trouve_700 .and. play(l)<=70000) THEN697 IF (trouve_700 .AND. play(l)<=70000) THEN 698 698 llm700 = l 699 699 print *, 'llm700,play=', llm700, play(l) / 100. … … 812 812 PRINT*, 'avant phyredem' 813 813 pctsrf(1, :) = 0. 814 if(nat_surf==0.) THEN814 IF (nat_surf==0.) THEN 815 815 pctsrf(1, is_oce) = 1. 816 816 pctsrf(1, is_ter) = 0. 817 817 pctsrf(1, is_lic) = 0. 818 818 pctsrf(1, is_sic) = 0. 819 else if(nat_surf == 1) THEN819 ELSE IF (nat_surf == 1) THEN 820 820 pctsrf(1, is_oce) = 0. 821 821 pctsrf(1, is_ter) = 1. 822 822 pctsrf(1, is_lic) = 0. 823 823 pctsrf(1, is_sic) = 0. 824 else if(nat_surf == 2) THEN824 ELSE IF (nat_surf == 2) THEN 825 825 pctsrf(1, is_oce) = 0. 826 826 pctsrf(1, is_ter) = 0. 827 827 pctsrf(1, is_lic) = 1. 828 828 pctsrf(1, is_sic) = 0. 829 else if(nat_surf == 3) THEN829 ELSE IF (nat_surf == 3) THEN 830 830 pctsrf(1, is_oce) = 0. 831 831 pctsrf(1, is_ter) = 0. … … 856 856 pbl_tke(:, 2, :) = 1.e-2 857 857 PRINT *, ' pbl_tke dans lmdz1d ' 858 if(prt_level >= 5) THEN858 IF (prt_level >= 5) THEN 859 859 DO nsrf = 1, 4 860 860 PRINT *, 'pbl_tke(1,:,', nsrf, ') ', pbl_tke(1, :, nsrf) … … 936 936 CALL getin('iflag_physiq', iflag_physiq) 937 937 938 if (.not.restart) THEN938 IF (.NOT.restart) THEN 939 939 iflag_pbl = 5 940 940 CALL phyredem ("startphy.nc") … … 1033 1033 DO while(it<=it_end) 1034 1034 1035 if(prt_level>=1) THEN1035 IF (prt_level>=1) THEN 1036 1036 PRINT*, 'XXXXXXXXXXXXXXXXXXX ITAP,day,time=', & 1037 1037 it, day, time, it_end, day_step … … 1039 1039 endif 1040 1040 !Al1 demande de restartphy.nc 1041 if(it==it_end) lastcall = .True.1041 IF (it==it_end) lastcall = .True. 1042 1042 1043 1043 !--------------------------------------------------------------------- … … 1125 1125 1126 1126 fcoriolis = 2. * sin(rpi * xlat / 180.) * romega 1127 IF (forcing_radconv . or. forcing_fire) THEN1127 IF (forcing_radconv .OR. forcing_fire) THEN 1128 1128 fcoriolis = 0.0 1129 1129 dt_cooling = 0.0 … … 1133 1133 ! PRINT*, 'calcul de fcoriolis ', fcoriolis 1134 1134 1135 IF (forcing_toga . or. forcing_GCSSold .or. forcing_twpice &1136 . or.forcing_amma .or. forcing_type==101) THEN1135 IF (forcing_toga .OR. forcing_GCSSold .OR. forcing_twpice & 1136 .OR.forcing_amma .OR. forcing_type==101) THEN 1137 1137 fcoriolis = 0.0 ; ug = 0. ; vg = 0. 1138 1138 END IF … … 1149 1149 !on calcule dt_cooling 1150 1150 do l = 1, llm 1151 if(play(l)>=20000.) THEN1151 IF (play(l)>=20000.) THEN 1152 1152 dt_cooling(l) = -1.5 / 86400. 1153 elseif ((play(l)>=10000.). and.((play(l)<20000.))) THEN1153 elseif ((play(l)>=10000.).AND.((play(l)<20000.))) THEN 1154 1154 dt_cooling(l) = -1.5 / 86400. * (play(l) - 10000.) / (10000.) - 1. / 86400. * (20000. - play(l)) / 10000. * (temp(l) - 200.) 1155 1155 else … … 1217 1217 d_q_adv = 0. 1218 1218 do l = 2, llm - 1 1219 if(zlay(l)<=1100) THEN1219 IF (zlay(l)<=1100) THEN 1220 1220 wwww = -0.00001 * zlay(l) 1221 1221 d_t_adv(l) = -wwww * (teta(l) - teta(l + 1)) / (zlay(l) - zlay(l + 1)) / (pzero / play(l))**rkappa … … 1242 1242 ! pour les cas sandu et astex, on reclacule u,v,q,temp et teta dans 1D_nudge_sandu_astex.h 1243 1243 ! au dessus de 700hpa, on relaxe vers les profils initiaux 1244 if(forcing_sandu .OR. forcing_astex) THEN1244 IF (forcing_sandu .OR. forcing_astex) THEN 1245 1245 INCLUDE "1D_nudge_sandu_astex.h" 1246 1246 else … … 1258 1258 + d_q_nudge(1:mxcalc, :)) 1259 1259 1260 if(prt_level>=3) THEN1260 IF (prt_level>=3) THEN 1261 1261 print *, & 1262 1262 'physiq-> temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1) ', & -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_scm.F90
r5116 r5117 64 64 !--------------------------------------------------------------------- 65 65 66 integer, parameter :: ngrid = 166 INTEGER, parameter :: ngrid = 1 67 67 REAL :: zcufi = 1. 68 68 REAL :: zcvfi = 1. … … 80 80 81 81 INTEGER :: kmax = llm 82 integerllm700, nq1, nq282 INTEGER llm700, nq1, nq2 83 83 INTEGER, PARAMETER :: nlev_max = 1000, nqmx = 1000 84 realtimestep, frac85 realheight(nlev_max), tttprof(nlev_max), qtprof(nlev_max)84 REAL timestep, frac 85 REAL height(nlev_max), tttprof(nlev_max), qtprof(nlev_max) 86 86 real uprof(nlev_max), vprof(nlev_max), e12prof(nlev_max) 87 87 real ugprof(nlev_max), vgprof(nlev_max), wfls(nlev_max) … … 91 91 92 92 ! INTEGER :: forcing_type 93 logical:: forcing_les = .FALSE.94 logical:: forcing_armcu = .FALSE.95 logical:: forcing_rico = .FALSE.96 logical:: forcing_radconv = .FALSE.97 logical:: forcing_toga = .FALSE.98 logical:: forcing_twpice = .FALSE.99 logical:: forcing_amma = .FALSE.100 logical:: forcing_dice = .FALSE.101 logical:: forcing_gabls4 = .FALSE.102 103 logical:: forcing_GCM2SCM = .FALSE.104 logical:: forcing_GCSSold = .FALSE.105 logical:: forcing_sandu = .FALSE.106 logical:: forcing_astex = .FALSE.107 logical:: forcing_fire = .FALSE.108 logical:: forcing_case = .FALSE.109 logical:: forcing_case2 = .FALSE.110 logical:: forcing_SCM = .FALSE.93 LOGICAL :: forcing_les = .FALSE. 94 LOGICAL :: forcing_armcu = .FALSE. 95 LOGICAL :: forcing_rico = .FALSE. 96 LOGICAL :: forcing_radconv = .FALSE. 97 LOGICAL :: forcing_toga = .FALSE. 98 LOGICAL :: forcing_twpice = .FALSE. 99 LOGICAL :: forcing_amma = .FALSE. 100 LOGICAL :: forcing_dice = .FALSE. 101 LOGICAL :: forcing_gabls4 = .FALSE. 102 103 LOGICAL :: forcing_GCM2SCM = .FALSE. 104 LOGICAL :: forcing_GCSSold = .FALSE. 105 LOGICAL :: forcing_sandu = .FALSE. 106 LOGICAL :: forcing_astex = .FALSE. 107 LOGICAL :: forcing_fire = .FALSE. 108 LOGICAL :: forcing_case = .FALSE. 109 LOGICAL :: forcing_case2 = .FALSE. 110 LOGICAL :: forcing_SCM = .FALSE. 111 111 112 112 !flag forcings 113 logical:: nudge_wind = .TRUE.114 logical:: nudge_thermo = .FALSE.115 logical:: cptadvw = .TRUE.113 LOGICAL :: nudge_wind = .TRUE. 114 LOGICAL :: nudge_thermo = .FALSE. 115 LOGICAL :: cptadvw = .TRUE. 116 116 117 117 … … 129 129 INTEGER :: inudge_RHT = 1 130 130 INTEGER :: inudge_UV = 2 131 logical:: nudge(nudge_max)131 LOGICAL :: nudge(nudge_max) 132 132 REAL :: t_targ(llm) 133 133 REAL :: rh_targ(llm) … … 181 181 ! Call to phyredem 182 182 !--------------------------------------------------------------------- 183 logical:: ok_writedem = .TRUE.183 LOGICAL :: ok_writedem = .TRUE. 184 184 REAL :: sollw_in = 0. 185 185 REAL :: solsw_in = 0. … … 188 188 ! Call to physiq 189 189 !--------------------------------------------------------------------- 190 logical:: firstcall = .TRUE.191 logical:: lastcall = .FALSE.190 LOGICAL :: firstcall = .TRUE. 191 LOGICAL :: lastcall = .FALSE. 192 192 REAL :: phis(1) = 0.0 193 193 REAL :: dpsrf(1) … … 196 196 ! Initializations of boundary conditions 197 197 !--------------------------------------------------------------------- 198 real, allocatable:: phy_nat (:) ! 0=ocean libre,1=land,2=glacier,3=banquise199 real, allocatable:: phy_alb (:) ! Albedo land only (old value condsurf_jyg=0.3)200 real, allocatable:: phy_sst (:) ! SST (will not be used; cf read_tsurf1d.F)201 real, allocatable:: phy_bil (:) ! Ne sert que pour les slab_ocean202 real, allocatable:: phy_rug (:) ! Longueur rugosite utilisee sur land only203 real, allocatable:: phy_ice (:) ! Fraction de glace204 real, allocatable:: phy_fter(:) ! Fraction de terre205 real, allocatable:: phy_foce(:) ! Fraction de ocean206 real, allocatable:: phy_fsic(:) ! Fraction de glace207 real, allocatable:: phy_flic(:) ! Fraction de glace198 REAL, ALLOCATABLE :: phy_nat (:) ! 0=ocean libre,1=land,2=glacier,3=banquise 199 REAL, ALLOCATABLE :: phy_alb (:) ! Albedo land only (old value condsurf_jyg=0.3) 200 REAL, ALLOCATABLE :: phy_sst (:) ! SST (will not be used; cf read_tsurf1d.F) 201 REAL, ALLOCATABLE :: phy_bil (:) ! Ne sert que pour les slab_ocean 202 REAL, ALLOCATABLE :: phy_rug (:) ! Longueur rugosite utilisee sur land only 203 REAL, ALLOCATABLE :: phy_ice (:) ! Fraction de glace 204 REAL, ALLOCATABLE :: phy_fter(:) ! Fraction de terre 205 REAL, ALLOCATABLE :: phy_foce(:) ! Fraction de ocean 206 REAL, ALLOCATABLE :: phy_fsic(:) ! Fraction de glace 207 REAL, ALLOCATABLE :: phy_flic(:) ! Fraction de glace 208 208 209 209 !--------------------------------------------------------------------- … … 212 212 INTEGER :: k, l, i, it = 1, mxcalc 213 213 INTEGER :: nsrf 214 integerjcode214 INTEGER jcode 215 215 INTEGER read_climoz 216 216 217 217 INTEGER :: it_end ! iteration number of the last call 218 218 !Al1,plev,play,phi,phis,presnivs, 219 integerecrit_slab_oc !1=ecrit,-1=lit,0=no file219 INTEGER ecrit_slab_oc !1=ecrit,-1=lit,0=no file 220 220 data ecrit_slab_oc/-1/ 221 221 … … 277 277 PRINT*, 'NATURE DE LA SURFACE ', nat_surf 278 278 279 ! Initialization of the logicalswitch for nudging279 ! Initialization of the LOGICAL switch for nudging 280 280 281 281 jcode = iflag_nudge … … 315 315 316 316 ! calend = 'earth_365d' 317 if(calend == 'earth_360d') THEN317 IF (calend == 'earth_360d') THEN 318 318 CALL ioconf_calendar('360_day') 319 319 WRITE(*, *)'CALENDRIER CHOISI: Terrestre a 360 jours/an' 320 else if(calend == 'earth_365d') THEN320 ELSE IF (calend == 'earth_365d') THEN 321 321 CALL ioconf_calendar('noleap') 322 322 WRITE(*, *)'CALENDRIER CHOISI: Terrestre a 365 jours/an' 323 else if(calend == 'earth_366d') THEN323 ELSE IF (calend == 'earth_366d') THEN 324 324 CALL ioconf_calendar('all_leap') 325 325 WRITE(*, *)'CALENDRIER CHOISI: Terrestre bissextile' 326 else if(calend == 'gregorian') THEN326 ELSE IF (calend == 'gregorian') THEN 327 327 stop 'gregorian calend should not be used by normal user' 328 328 CALL ioconf_calendar('gregorian') ! not to be used by normal users … … 341 341 ! La date complete est dans "daytime" (l'unite est le jour). 342 342 343 if(nday>0) THEN343 IF (nday>0) THEN 344 344 fnday = nday 345 345 else … … 383 383 CALL init_infotrac 384 384 385 if(nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F'385 IF (nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F' 386 386 allocate(q(llm, nqtot)) ; q(:, :) = 0. 387 387 allocate(dq(llm, nqtot)) … … 404 404 CALL phys_state_var_init(read_climoz) 405 405 406 if(ngrid/=klon) THEN406 IF (ngrid/=klon) THEN 407 407 PRINT*, 'stop in inifis' 408 408 PRINT*, 'Probleme de dimensions :' … … 425 425 !! mpl et jyg le 22/08/2012 : 426 426 !! pour que les cas a flux de surface imposes marchent 427 IF(.NOT.ok_flux_surf. or.max(abs(wtsurf), abs(wqsurf))>0.) THEN427 IF(.NOT.ok_flux_surf.OR.max(abs(wtsurf), abs(wqsurf))>0.) THEN 428 428 fsens = -wtsurf * rcpd * rho(1) 429 429 flat = -wqsurf * rlvtt * rho(1) … … 461 461 do l = 1, llm 462 462 WRITE(*, *) 'l,play(l),presnivs(l): ', l, play(l), presnivs(l) 463 if (trouve_700 .and. play(l)<=70000) THEN463 IF (trouve_700 .AND. play(l)<=70000) THEN 464 464 llm700 = l 465 465 print *, 'llm700,play=', llm700, play(l) / 100. … … 477 477 PRINT*, 'A d_t_adv ', d_t_adv(1:20)*86400 478 478 479 if(forcing_GCM2SCM) THEN479 IF (forcing_GCM2SCM) THEN 480 480 write (*, *) 'forcing_GCM2SCM not yet implemented' 481 481 stop 'in initialization' 482 endif! forcing_GCM2SCM482 ENDIF ! forcing_GCM2SCM 483 483 484 484 … … 536 536 ! On le met juste avant pour avoir acces a tous les champs 537 537 538 if(ok_writedem) THEN538 IF (ok_writedem) THEN 539 539 !-------------------------------------------------------------------------- 540 540 ! pbl_surface_init (called here) and pbl_surface_final (called by phyredem) … … 574 574 PRINT*, 'avant phyredem' 575 575 pctsrf(1, :) = 0. 576 if(nat_surf==0.) THEN576 IF (nat_surf==0.) THEN 577 577 pctsrf(1, is_oce) = 1. 578 578 pctsrf(1, is_ter) = 0. 579 579 pctsrf(1, is_lic) = 0. 580 580 pctsrf(1, is_sic) = 0. 581 else if(nat_surf == 1) THEN581 ELSE IF (nat_surf == 1) THEN 582 582 pctsrf(1, is_oce) = 0. 583 583 pctsrf(1, is_ter) = 1. 584 584 pctsrf(1, is_lic) = 0. 585 585 pctsrf(1, is_sic) = 0. 586 else if(nat_surf == 2) THEN586 ELSE IF (nat_surf == 2) THEN 587 587 pctsrf(1, is_oce) = 0. 588 588 pctsrf(1, is_ter) = 0. 589 589 pctsrf(1, is_lic) = 1. 590 590 pctsrf(1, is_sic) = 0. 591 else if(nat_surf == 3) THEN591 ELSE IF (nat_surf == 3) THEN 592 592 pctsrf(1, is_oce) = 0. 593 593 pctsrf(1, is_ter) = 0. … … 693 693 CALL getin('iflag_physiq', iflag_physiq) 694 694 695 if (.not.restart) THEN695 IF (.NOT.restart) THEN 696 696 iflag_pbl = 5 697 697 CALL phyredem ("startphy.nc") … … 735 735 CALL phys_state_var_end 736 736 !Al1 737 if(restart) THEN737 IF (restart) THEN 738 738 PRINT*, 'CALL to restart dyn 1d' 739 739 Call dyn1deta0("start1dyn.nc", plev, play, phi, phis,presnivs, & … … 782 782 do while(it<=it_end) 783 783 784 if(prt_level>=1) THEN784 IF (prt_level>=1) THEN 785 785 PRINT*, 'XXXXXXXXXXXXXXXXXXX ITAP,day,time=', & 786 786 it, day, time, it_end, day_step 787 787 PRINT*,'PAS DE TEMPS ', timestep 788 788 endif 789 if(it==it_end) lastcall = .True.789 IF (it==it_end) lastcall = .True. 790 790 791 791 !--------------------------------------------------------------------- … … 842 842 ! Listing output for debug prt_level>=1 843 843 !--------------------------------------------------------------------- 844 if(prt_level>=1) THEN844 IF (prt_level>=1) THEN 845 845 print *, ' avant physiq : -------- day time ', day, time 846 846 WRITE(*, *) 'firstcall,lastcall,phis', & 847 847 firstcall, lastcall, phis 848 848 end if 849 if(prt_level>=5) THEN849 IF (prt_level>=5) THEN 850 850 WRITE(*, '(a10,2a4,4a13)') 'BEFOR1 IT=', 'it', 'l', & 851 851 'presniv', 'plev','play', 'phi' … … 871 871 ! Listing output for debug 872 872 !--------------------------------------------------------------------- 873 if(prt_level>=5) THEN873 IF (prt_level>=5) THEN 874 874 WRITE(*, '(a11,2a4,4a13)') 'AFTER1 IT=', 'it', 'l', & 875 875 'presniv', 'plev','play', 'phi' … … 1017 1017 +d_q_nudge(1:mxcalc, :)) 1018 1018 1019 if(prt_level>=3) THEN1019 IF (prt_level>=3) THEN 1020 1020 print *, & 1021 1021 'physiq-> temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1) ', & … … 1072 1072 ! Air temperature : 1073 1073 !--------------------------------------------------------------------- 1074 if(lastcall) THEN1074 IF (lastcall) THEN 1075 1075 PRINT*, 'Pas de temps final ', it 1076 1076 CALL ju2ymds(daytime, an, mois, jour, heure) … … 1089 1089 enddo 1090 1090 1091 if(ecrit_slab_oc/=-1) close(97)1091 IF (ecrit_slab_oc/=-1) close(97) 1092 1092 1093 1093 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90
r5116 r5117 6 6 character*80 :: fich_amma 7 7 ! Option du cas AMMA ou on impose la discretisation verticale (Ap,Bp) 8 integernlev_amma, nt_amma9 10 integeryear_ini_amma, day_ini_amma, mth_ini_amma11 realheure_ini_amma12 realday_ju_ini_amma ! Julian day of amma first day8 INTEGER nlev_amma, nt_amma 9 10 INTEGER year_ini_amma, day_ini_amma, mth_ini_amma 11 REAL heure_ini_amma 12 REAL day_ju_ini_amma ! Julian day of amma first day 13 13 parameter (year_ini_amma=2006) 14 14 parameter (mth_ini_amma=7) 15 15 parameter (day_ini_amma=10) ! 10 = 10Juil2006 16 16 parameter (heure_ini_amma=0.) !0h en secondes 17 realdt_amma17 REAL dt_amma 18 18 parameter (dt_amma=1800.) 19 19 20 20 !profils initiaux: 21 real, allocatable:: plev_amma(:)22 23 real, allocatable:: z_amma(:)24 real, allocatable:: th_amma(:),q_amma(:)25 real, allocatable:: u_amma(:)26 real, allocatable:: v_amma(:)27 28 real, allocatable:: th_ammai(:),q_ammai(:)29 real, allocatable:: u_ammai(:)30 real, allocatable:: v_ammai(:)31 real, allocatable:: vitw_ammai(:)32 real, allocatable:: ht_ammai(:)33 real, allocatable:: hq_ammai(:)34 real, allocatable:: vt_ammai(:)35 real, allocatable:: vq_ammai(:)21 REAL, ALLOCATABLE:: plev_amma(:) 22 23 REAL, ALLOCATABLE:: z_amma(:) 24 REAL, ALLOCATABLE:: th_amma(:),q_amma(:) 25 REAL, ALLOCATABLE:: u_amma(:) 26 REAL, ALLOCATABLE:: v_amma(:) 27 28 REAL, ALLOCATABLE:: th_ammai(:),q_ammai(:) 29 REAL, ALLOCATABLE:: u_ammai(:) 30 REAL, ALLOCATABLE:: v_ammai(:) 31 REAL, ALLOCATABLE:: vitw_ammai(:) 32 REAL, ALLOCATABLE:: ht_ammai(:) 33 REAL, ALLOCATABLE:: hq_ammai(:) 34 REAL, ALLOCATABLE:: vt_ammai(:) 35 REAL, ALLOCATABLE:: vq_ammai(:) 36 36 37 37 !forcings 38 real, allocatable:: ht_amma(:,:)39 real, allocatable:: hq_amma(:,:)40 real, allocatable:: vitw_amma(:,:)41 real, allocatable:: lat_amma(:),sens_amma(:)38 REAL, ALLOCATABLE:: ht_amma(:,:) 39 REAL, ALLOCATABLE:: hq_amma(:,:) 40 REAL, ALLOCATABLE:: vitw_amma(:,:) 41 REAL, ALLOCATABLE:: lat_amma(:),sens_amma(:) 42 42 43 43 !champs interpoles 44 real, allocatable:: vitw_profamma(:)45 real, allocatable:: ht_profamma(:)46 real, allocatable:: hq_profamma(:)47 reallat_profamma,sens_profamma48 real, allocatable:: vt_profamma(:)49 real, allocatable:: vq_profamma(:)50 real, allocatable:: th_profamma(:)51 real, allocatable:: q_profamma(:)52 real, allocatable:: u_profamma(:)53 real, allocatable:: v_profamma(:)44 REAL, ALLOCATABLE:: vitw_profamma(:) 45 REAL, ALLOCATABLE:: ht_profamma(:) 46 REAL, ALLOCATABLE:: hq_profamma(:) 47 REAL lat_profamma,sens_profamma 48 REAL, ALLOCATABLE:: vt_profamma(:) 49 REAL, ALLOCATABLE:: vq_profamma(:) 50 REAL, ALLOCATABLE:: th_profamma(:) 51 REAL, ALLOCATABLE:: q_profamma(:) 52 REAL, ALLOCATABLE:: u_profamma(:) 53 REAL, ALLOCATABLE:: v_profamma(:) 54 54 55 55 … … 65 65 ierr = nf90_open(fich_amma,nf90_nowrite,nid) 66 66 PRINT*,'fich_amma,nf90_nowrite,nid ',fich_amma,nf90_nowrite,nid 67 if(ierr/=nf90_noerr) THEN67 IF (ierr/=nf90_noerr) THEN 68 68 WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file ' 69 69 WRITE(*,*) nf90_strerror(ierr) … … 178 178 IMPLICIT NONE 179 179 180 integerntime,nlevel181 182 realzz(nlevel)183 realtemp(nlevel),pp(nlevel)184 realqv(nlevel),u(nlevel)185 realv(nlevel)186 realdw(nlevel,ntime)187 realdt(nlevel,ntime)188 realdq(nlevel,ntime)189 realflat(ntime),sens(ntime)190 191 192 integernid, ierr,rid193 integernbvar3d180 INTEGER ntime,nlevel 181 182 REAL zz(nlevel) 183 REAL temp(nlevel),pp(nlevel) 184 REAL qv(nlevel),u(nlevel) 185 REAL v(nlevel) 186 REAL dw(nlevel,ntime) 187 REAL dt(nlevel,ntime) 188 REAL dq(nlevel,ntime) 189 REAL flat(ntime),sens(ntime) 190 191 192 INTEGER nid, ierr,rid 193 INTEGER nbvar3d 194 194 parameter(nbvar3d=30) 195 integervar3didin(nbvar3d)195 INTEGER var3didin(nbvar3d) 196 196 197 197 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) … … 362 362 363 363 ! inputs: 364 integerannee_ref365 integernt_amma,nlev_amma366 integeryear_ini_amma367 realday, day1,day_ini_amma,dt_amma368 realvitw_amma(nlev_amma,nt_amma)369 realht_amma(nlev_amma,nt_amma)370 realhq_amma(nlev_amma,nt_amma)371 reallat_amma(nt_amma)372 realsens_amma(nt_amma)364 INTEGER annee_ref 365 INTEGER nt_amma,nlev_amma 366 INTEGER year_ini_amma 367 REAL day, day1,day_ini_amma,dt_amma 368 REAL vitw_amma(nlev_amma,nt_amma) 369 REAL ht_amma(nlev_amma,nt_amma) 370 REAL hq_amma(nlev_amma,nt_amma) 371 REAL lat_amma(nt_amma) 372 REAL sens_amma(nt_amma) 373 373 ! outputs: 374 realvitw_prof(nlev_amma)375 realht_prof(nlev_amma)376 realhq_prof(nlev_amma)377 reallat_prof,sens_prof374 REAL vitw_prof(nlev_amma) 375 REAL ht_prof(nlev_amma) 376 REAL hq_prof(nlev_amma) 377 REAL lat_prof,sens_prof 378 378 ! local: 379 integerit_amma1, it_amma2,k380 realtimeit,time_amma1,time_amma2,frac381 382 383 if(forcing_type==6) THEN379 INTEGER it_amma1, it_amma2,k 380 REAL timeit,time_amma1,time_amma2,frac 381 382 383 IF (forcing_type==6) THEN 384 384 ! Check that initial day of the simulation consistent with AMMA case: 385 if(annee_ref/=2006) THEN385 IF (annee_ref/=2006) THEN 386 386 PRINT*,'Pour AMMA, annee_ref doit etre 2006' 387 387 PRINT*,'Changer annee_ref dans run.def' 388 388 stop 389 389 endif 390 if (annee_ref==2006 .and. day1<day_ini_amma) THEN390 IF (annee_ref==2006 .AND. day1<day_ini_amma) THEN 391 391 PRINT*,'AMMA a débuté le 10 juillet 2006',day1,day_ini_amma 392 392 PRINT*,'Changer dayref dans run.def' 393 393 stop 394 394 endif 395 if (annee_ref==2006 .and. day1>day_ini_amma+1) THEN395 IF (annee_ref==2006 .AND. day1>day_ini_amma+1) THEN 396 396 PRINT*,'AMMA a fini le 11 juillet' 397 397 PRINT*,'Changer dayref ou nday dans run.def' … … 402 402 ! Determine timestep relative to the 1st day of AMMA: 403 403 ! timeit=(day-day1)*86400. 404 ! if (annee_ref. eq.1992) THEN404 ! if (annee_ref.EQ.1992) THEN 405 405 ! timeit=(day-day_ini_toga)*86400. 406 406 ! else … … 424 424 time_amma2=(it_amma2-1)*dt_amma 425 425 426 if(it_amma1 > nt_amma) THEN426 IF (it_amma1 > nt_amma) THEN 427 427 WRITE(*,*) 'PB-stop: day, it_amma1, it_amma2, timeit: ' & 428 428 ,day,day_ini_amma,it_amma1,it_amma2,timeit/86400. -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90
r5116 r5117 7 7 character*80 :: fich_cas 8 8 ! Discr?tisation 9 integernlev_cas, nt_cas9 INTEGER nlev_cas, nt_cas 10 10 11 11 … … 31 31 32 32 !profils environnementaux 33 real, allocatable:: plev_cas(:,:)34 35 real, allocatable:: z_cas(:,:)36 real, allocatable:: t_cas(:,:),q_cas(:,:),rh_cas(:,:)37 real, allocatable:: th_cas(:,:),rv_cas(:,:)38 real, allocatable:: u_cas(:,:)39 real, allocatable:: v_cas(:,:)33 REAL, ALLOCATABLE:: plev_cas(:,:) 34 35 REAL, ALLOCATABLE:: z_cas(:,:) 36 REAL, ALLOCATABLE:: t_cas(:,:),q_cas(:,:),rh_cas(:,:) 37 REAL, ALLOCATABLE:: th_cas(:,:),rv_cas(:,:) 38 REAL, ALLOCATABLE:: u_cas(:,:) 39 REAL, ALLOCATABLE:: v_cas(:,:) 40 40 41 41 !forcing 42 real, allocatable:: ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:)43 real, allocatable:: hth_cas(:,:),vth_cas(:,:),dth_cas(:,:)44 real, allocatable:: hq_cas(:,:),vq_cas(:,:),dq_cas(:,:)45 real, allocatable:: hr_cas(:,:),vr_cas(:,:),dr_cas(:,:)46 real, allocatable:: hu_cas(:,:),vu_cas(:,:),du_cas(:,:)47 real, allocatable:: hv_cas(:,:),vv_cas(:,:),dv_cas(:,:)48 real, allocatable:: vitw_cas(:,:)49 real, allocatable:: ug_cas(:,:),vg_cas(:,:)50 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:),ustar_cas(:)51 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:)42 REAL, ALLOCATABLE:: ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:) 43 REAL, ALLOCATABLE:: hth_cas(:,:),vth_cas(:,:),dth_cas(:,:) 44 REAL, ALLOCATABLE:: hq_cas(:,:),vq_cas(:,:),dq_cas(:,:) 45 REAL, ALLOCATABLE:: hr_cas(:,:),vr_cas(:,:),dr_cas(:,:) 46 REAL, ALLOCATABLE:: hu_cas(:,:),vu_cas(:,:),du_cas(:,:) 47 REAL, ALLOCATABLE:: hv_cas(:,:),vv_cas(:,:),dv_cas(:,:) 48 REAL, ALLOCATABLE:: vitw_cas(:,:) 49 REAL, ALLOCATABLE:: ug_cas(:,:),vg_cas(:,:) 50 REAL, ALLOCATABLE:: lat_cas(:),sens_cas(:),ts_cas(:),ustar_cas(:) 51 REAL, ALLOCATABLE:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:) 52 52 53 53 !champs interpoles 54 real, allocatable:: plev_prof_cas(:)55 real, allocatable:: t_prof_cas(:)56 real, allocatable:: q_prof_cas(:)57 real, allocatable:: u_prof_cas(:)58 real, allocatable:: v_prof_cas(:)59 60 real, allocatable:: vitw_prof_cas(:)61 real, allocatable:: ug_prof_cas(:)62 real, allocatable:: vg_prof_cas(:)63 real, allocatable:: ht_prof_cas(:)64 real, allocatable:: hq_prof_cas(:)65 real, allocatable:: vt_prof_cas(:)66 real, allocatable:: vq_prof_cas(:)67 real, allocatable:: dt_prof_cas(:)68 real, allocatable:: dtrad_prof_cas(:)69 real, allocatable:: dq_prof_cas(:)70 real, allocatable:: hu_prof_cas(:)71 real, allocatable:: hv_prof_cas(:)72 real, allocatable:: vu_prof_cas(:)73 real, allocatable:: vv_prof_cas(:)74 real, allocatable:: du_prof_cas(:)75 real, allocatable:: dv_prof_cas(:)76 real, allocatable:: uw_prof_cas(:)77 real, allocatable:: vw_prof_cas(:)78 real, allocatable:: q1_prof_cas(:)79 real, allocatable:: q2_prof_cas(:)80 81 82 reallat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas54 REAL, ALLOCATABLE:: plev_prof_cas(:) 55 REAL, ALLOCATABLE:: t_prof_cas(:) 56 REAL, ALLOCATABLE:: q_prof_cas(:) 57 REAL, ALLOCATABLE:: u_prof_cas(:) 58 REAL, ALLOCATABLE:: v_prof_cas(:) 59 60 REAL, ALLOCATABLE:: vitw_prof_cas(:) 61 REAL, ALLOCATABLE:: ug_prof_cas(:) 62 REAL, ALLOCATABLE:: vg_prof_cas(:) 63 REAL, ALLOCATABLE:: ht_prof_cas(:) 64 REAL, ALLOCATABLE:: hq_prof_cas(:) 65 REAL, ALLOCATABLE:: vt_prof_cas(:) 66 REAL, ALLOCATABLE:: vq_prof_cas(:) 67 REAL, ALLOCATABLE:: dt_prof_cas(:) 68 REAL, ALLOCATABLE:: dtrad_prof_cas(:) 69 REAL, ALLOCATABLE:: dq_prof_cas(:) 70 REAL, ALLOCATABLE:: hu_prof_cas(:) 71 REAL, ALLOCATABLE:: hv_prof_cas(:) 72 REAL, ALLOCATABLE:: vu_prof_cas(:) 73 REAL, ALLOCATABLE:: vv_prof_cas(:) 74 REAL, ALLOCATABLE:: du_prof_cas(:) 75 REAL, ALLOCATABLE:: dv_prof_cas(:) 76 REAL, ALLOCATABLE:: uw_prof_cas(:) 77 REAL, ALLOCATABLE:: vw_prof_cas(:) 78 REAL, ALLOCATABLE:: q1_prof_cas(:) 79 REAL, ALLOCATABLE:: q2_prof_cas(:) 80 81 82 REAL lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas 83 83 84 84 … … 95 95 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 96 96 PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 97 if(ierr/=nf90_noerr) THEN97 IF (ierr/=nf90_noerr) THEN 98 98 WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file ' 99 99 WRITE(*,*) nf90_strerror(ierr) … … 261 261 !program reading forcing of the case study 262 262 263 integerntime,nlevel264 265 realzz(nlevel,ntime)266 realpp(nlevel,ntime)267 realtemp(nlevel,ntime),qv(nlevel,ntime),rh(nlevel,ntime)268 realtheta(nlevel,ntime),rv(nlevel,ntime)269 realu(nlevel,ntime)270 realv(nlevel,ntime)271 realug(nlevel,ntime)272 realvg(nlevel,ntime)273 realw(nlevel,ntime)274 realdu(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)275 realdv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)276 realdt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)277 realdtrad(nlevel,ntime)278 realdq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)279 realdth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime)280 realdr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)281 realflat(ntime),sens(ntime),ts(ntime),ustar(ntime)282 realuw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)283 284 285 integernid, ierr,rid286 integernbvar3d263 INTEGER ntime,nlevel 264 265 REAL zz(nlevel,ntime) 266 REAL pp(nlevel,ntime) 267 REAL temp(nlevel,ntime),qv(nlevel,ntime),rh(nlevel,ntime) 268 REAL theta(nlevel,ntime),rv(nlevel,ntime) 269 REAL u(nlevel,ntime) 270 REAL v(nlevel,ntime) 271 REAL ug(nlevel,ntime) 272 REAL vg(nlevel,ntime) 273 REAL w(nlevel,ntime) 274 REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 275 REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) 276 REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime) 277 REAL dtrad(nlevel,ntime) 278 REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime) 279 REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime) 280 REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime) 281 REAL flat(ntime),sens(ntime),ts(ntime),ustar(ntime) 282 REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime) 283 284 285 INTEGER nid, ierr,rid 286 INTEGER nbvar3d 287 287 parameter(nbvar3d=39) 288 integervar3didin(nbvar3d)288 INTEGER var3didin(nbvar3d) 289 289 290 290 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) … … 834 834 835 835 ! inputs: 836 integerannee_ref837 integernt_cas,nlev_cas838 realday, day1,day_cas839 realts_cas(nt_cas)840 realplev_cas(nlev_cas,nt_cas)841 realt_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas)842 realu_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)843 realug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)844 realvitw_cas(nlev_cas,nt_cas)845 realdu_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)846 realdv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)847 realdt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)848 realdtrad_cas(nlev_cas,nt_cas)849 realdq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)850 reallat_cas(nt_cas)851 realsens_cas(nt_cas)852 realustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)853 realq1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)836 INTEGER annee_ref 837 INTEGER nt_cas,nlev_cas 838 REAL day, day1,day_cas 839 REAL ts_cas(nt_cas) 840 REAL plev_cas(nlev_cas,nt_cas) 841 REAL t_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas) 842 REAL u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas) 843 REAL ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas) 844 REAL vitw_cas(nlev_cas,nt_cas) 845 REAL du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) 846 REAL dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas) 847 REAL dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas) 848 REAL dtrad_cas(nlev_cas,nt_cas) 849 REAL dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas) 850 REAL lat_cas(nt_cas) 851 REAL sens_cas(nt_cas) 852 REAL ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas) 853 REAL q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas) 854 854 855 855 ! outputs: 856 realplev_prof_cas(nlev_cas)857 realt_prof_cas(nlev_cas),q_prof_cas(nlev_cas)858 realu_prof_cas(nlev_cas),v_prof_cas(nlev_cas)859 realug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)860 realvitw_prof_cas(nlev_cas)861 realdu_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)862 realdv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)863 realdt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)864 realdtrad_prof_cas(nlev_cas)865 realdq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)866 reallat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas867 realuw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)856 REAL plev_prof_cas(nlev_cas) 857 REAL t_prof_cas(nlev_cas),q_prof_cas(nlev_cas) 858 REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 859 REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas) 860 REAL vitw_prof_cas(nlev_cas) 861 REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 862 REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) 863 REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas) 864 REAL dtrad_prof_cas(nlev_cas) 865 REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 866 REAL lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas 867 REAL uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas) 868 868 ! local: 869 integerit_cas1, it_cas2,k870 realtimeit,time_cas1,time_cas2,frac869 INTEGER it_cas1, it_cas2,k 870 REAL timeit,time_cas1,time_cas2,frac 871 871 872 872 … … 877 877 ! sont censes etre corrects. 878 878 ! A supprimer a terme (MPL 20150623) 879 ! if ((forcing_type. eq.10).and.(1.eq.0)) THEN879 ! if ((forcing_type.EQ.10).AND.(1.EQ.0)) THEN 880 880 ! Check that initial day of the simulation consistent with AMMA case: 881 ! if (annee_ref. ne.2006) THEN881 ! if (annee_ref.NE.2006) THEN 882 882 ! PRINT*,'Pour AMMA, annee_ref doit etre 2006' 883 883 ! PRINT*,'Changer annee_ref dans run.def' 884 884 ! stop 885 885 ! endif 886 ! if (annee_ref. eq.2006 .and. day1.lt.day_cas) THEN886 ! if (annee_ref.EQ.2006 .AND. day1.lt.day_cas) THEN 887 887 ! PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas 888 888 ! PRINT*,'Changer dayref dans run.def' 889 889 ! stop 890 890 ! endif 891 ! if (annee_ref. eq.2006 .and. day1.gt.day_cas+1) THEN891 ! if (annee_ref.EQ.2006 .AND. day1.gt.day_cas+1) THEN 892 892 ! PRINT*,'AMMA a fini le 11 juillet' 893 893 ! PRINT*,'Changer dayref ou nday dans run.def' … … 898 898 ! Determine timestep relative to the 1st day: 899 899 ! timeit=(day-day1)*86400. 900 ! if (annee_ref. eq.1992) THEN900 ! if (annee_ref.EQ.1992) THEN 901 901 ! timeit=(day-day_cas)*86400. 902 902 ! else … … 929 929 print *,'time_cas2=',time_cas2 930 930 931 if(it_cas1 > nt_cas) THEN931 IF (it_cas1 > nt_cas) THEN 932 932 WRITE(*,*) 'PB-stop: day, day_ju_ini_cas,it_cas1, it_cas2, timeit: ' & 933 933 ,day,day_ju_ini_cas,it_cas1,it_cas2,timeit -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
r5116 r5117 9 9 character*80 :: fich_cas 10 10 ! Discr?tisation 11 integernlev_cas, nt_cas11 INTEGER nlev_cas, nt_cas 12 12 13 13 14 14 !profils environnementaux 15 real, allocatable:: plev_cas(:,:),plevh_cas(:)16 real, allocatable:: ap_cas(:),bp_cas(:)17 18 real, allocatable:: z_cas(:,:),zh_cas(:)19 real, allocatable:: t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:)20 real, allocatable:: th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:)21 real, allocatable:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:)15 REAL, ALLOCATABLE:: plev_cas(:,:),plevh_cas(:) 16 REAL, ALLOCATABLE:: ap_cas(:),bp_cas(:) 17 18 REAL, ALLOCATABLE:: z_cas(:,:),zh_cas(:) 19 REAL, ALLOCATABLE:: t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:) 20 REAL, ALLOCATABLE:: th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:) 21 REAL, ALLOCATABLE:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:) 22 22 23 23 !forcing 24 real, allocatable:: ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:)25 real, allocatable:: hth_cas(:,:),vth_cas(:,:),dth_cas(:,:)26 real, allocatable:: hq_cas(:,:),vq_cas(:,:),dq_cas(:,:)27 real, allocatable:: hr_cas(:,:),vr_cas(:,:),dr_cas(:,:)28 real, allocatable:: hu_cas(:,:),vu_cas(:,:),du_cas(:,:)29 real, allocatable:: hv_cas(:,:),vv_cas(:,:),dv_cas(:,:)30 real, allocatable:: ug_cas(:,:),vg_cas(:,:)31 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:)32 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke_cas(:)24 REAL, ALLOCATABLE:: ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:) 25 REAL, ALLOCATABLE:: hth_cas(:,:),vth_cas(:,:),dth_cas(:,:) 26 REAL, ALLOCATABLE:: hq_cas(:,:),vq_cas(:,:),dq_cas(:,:) 27 REAL, ALLOCATABLE:: hr_cas(:,:),vr_cas(:,:),dr_cas(:,:) 28 REAL, ALLOCATABLE:: hu_cas(:,:),vu_cas(:,:),du_cas(:,:) 29 REAL, ALLOCATABLE:: hv_cas(:,:),vv_cas(:,:),dv_cas(:,:) 30 REAL, ALLOCATABLE:: ug_cas(:,:),vg_cas(:,:) 31 REAL, ALLOCATABLE:: lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:) 32 REAL, ALLOCATABLE:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke_cas(:) 33 33 34 34 !champs interpoles 35 real, allocatable:: plev_prof_cas(:)36 real, allocatable:: t_prof_cas(:)37 real, allocatable:: theta_prof_cas(:)38 real, allocatable:: thl_prof_cas(:)39 real, allocatable:: thv_prof_cas(:)40 real, allocatable:: q_prof_cas(:)41 real, allocatable:: qv_prof_cas(:)42 real, allocatable:: ql_prof_cas(:)43 real, allocatable:: qi_prof_cas(:)44 real, allocatable:: rh_prof_cas(:)45 real, allocatable:: rv_prof_cas(:)46 real, allocatable:: u_prof_cas(:)47 real, allocatable:: v_prof_cas(:)48 real, allocatable:: vitw_prof_cas(:)49 real, allocatable:: omega_prof_cas(:)50 real, allocatable:: ug_prof_cas(:)51 real, allocatable:: vg_prof_cas(:)52 real, allocatable:: ht_prof_cas(:)53 real, allocatable:: hth_prof_cas(:)54 real, allocatable:: hq_prof_cas(:)55 real, allocatable:: vt_prof_cas(:)56 real, allocatable:: vth_prof_cas(:)57 real, allocatable:: vq_prof_cas(:)58 real, allocatable:: dt_prof_cas(:)59 real, allocatable:: dth_prof_cas(:)60 real, allocatable:: dtrad_prof_cas(:)61 real, allocatable:: dq_prof_cas(:)62 real, allocatable:: hu_prof_cas(:)63 real, allocatable:: hv_prof_cas(:)64 real, allocatable:: vu_prof_cas(:)65 real, allocatable:: vv_prof_cas(:)66 real, allocatable:: du_prof_cas(:)67 real, allocatable:: dv_prof_cas(:)68 real, allocatable:: uw_prof_cas(:)69 real, allocatable:: vw_prof_cas(:)70 real, allocatable:: q1_prof_cas(:)71 real, allocatable:: q2_prof_cas(:)72 73 74 reallat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke_prof_cas75 realo3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas35 REAL, ALLOCATABLE:: plev_prof_cas(:) 36 REAL, ALLOCATABLE:: t_prof_cas(:) 37 REAL, ALLOCATABLE:: theta_prof_cas(:) 38 REAL, ALLOCATABLE:: thl_prof_cas(:) 39 REAL, ALLOCATABLE:: thv_prof_cas(:) 40 REAL, ALLOCATABLE:: q_prof_cas(:) 41 REAL, ALLOCATABLE:: qv_prof_cas(:) 42 REAL, ALLOCATABLE:: ql_prof_cas(:) 43 REAL, ALLOCATABLE:: qi_prof_cas(:) 44 REAL, ALLOCATABLE:: rh_prof_cas(:) 45 REAL, ALLOCATABLE:: rv_prof_cas(:) 46 REAL, ALLOCATABLE:: u_prof_cas(:) 47 REAL, ALLOCATABLE:: v_prof_cas(:) 48 REAL, ALLOCATABLE:: vitw_prof_cas(:) 49 REAL, ALLOCATABLE:: omega_prof_cas(:) 50 REAL, ALLOCATABLE:: ug_prof_cas(:) 51 REAL, ALLOCATABLE:: vg_prof_cas(:) 52 REAL, ALLOCATABLE:: ht_prof_cas(:) 53 REAL, ALLOCATABLE:: hth_prof_cas(:) 54 REAL, ALLOCATABLE:: hq_prof_cas(:) 55 REAL, ALLOCATABLE:: vt_prof_cas(:) 56 REAL, ALLOCATABLE:: vth_prof_cas(:) 57 REAL, ALLOCATABLE:: vq_prof_cas(:) 58 REAL, ALLOCATABLE:: dt_prof_cas(:) 59 REAL, ALLOCATABLE:: dth_prof_cas(:) 60 REAL, ALLOCATABLE:: dtrad_prof_cas(:) 61 REAL, ALLOCATABLE:: dq_prof_cas(:) 62 REAL, ALLOCATABLE:: hu_prof_cas(:) 63 REAL, ALLOCATABLE:: hv_prof_cas(:) 64 REAL, ALLOCATABLE:: vu_prof_cas(:) 65 REAL, ALLOCATABLE:: vv_prof_cas(:) 66 REAL, ALLOCATABLE:: du_prof_cas(:) 67 REAL, ALLOCATABLE:: dv_prof_cas(:) 68 REAL, ALLOCATABLE:: uw_prof_cas(:) 69 REAL, ALLOCATABLE:: vw_prof_cas(:) 70 REAL, ALLOCATABLE:: q1_prof_cas(:) 71 REAL, ALLOCATABLE:: q2_prof_cas(:) 72 73 74 REAL lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke_prof_cas 75 REAL o3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas 76 76 77 77 … … 89 89 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 90 90 PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 91 if(ierr/=nf90_noerr) THEN91 IF (ierr/=nf90_noerr) THEN 92 92 WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file ' 93 93 WRITE(*,*) nf90_strerror(ierr) … … 198 198 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 199 199 PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 200 if(ierr/=nf90_noerr) THEN200 IF (ierr/=nf90_noerr) THEN 201 201 WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file ' 202 202 WRITE(*,*) nf90_strerror(ierr) … … 326 326 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 327 327 PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 328 if(ierr/=nf90_noerr) THEN328 IF (ierr/=nf90_noerr) THEN 329 329 WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file ' 330 330 WRITE(*,*) nf90_strerror(ierr) … … 537 537 IMPLICIT NONE 538 538 539 integerntime,nlevel540 541 realzz(nlevel,ntime)542 realpp(nlevel,ntime)543 realtemp(nlevel,ntime),qv(nlevel,ntime),rh(nlevel,ntime)544 realtheta(nlevel,ntime),rv(nlevel,ntime)545 realu(nlevel,ntime)546 realv(nlevel,ntime)547 realug(nlevel,ntime)548 realvg(nlevel,ntime)549 realw(nlevel,ntime)550 realdu(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)551 realdv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)552 realdt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)553 realdtrad(nlevel,ntime)554 realdq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)555 realdth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime)556 realdr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)557 realflat(ntime),sens(ntime),ts(ntime),ustar(ntime)558 realuw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime),resul(nlevel,ntime),resul1(ntime)559 560 561 integernid, ierr, ierr1,ierr2,rid,i562 integernbvar3d539 INTEGER ntime,nlevel 540 541 REAL zz(nlevel,ntime) 542 REAL pp(nlevel,ntime) 543 REAL temp(nlevel,ntime),qv(nlevel,ntime),rh(nlevel,ntime) 544 REAL theta(nlevel,ntime),rv(nlevel,ntime) 545 REAL u(nlevel,ntime) 546 REAL v(nlevel,ntime) 547 REAL ug(nlevel,ntime) 548 REAL vg(nlevel,ntime) 549 REAL w(nlevel,ntime) 550 REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 551 REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) 552 REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime) 553 REAL dtrad(nlevel,ntime) 554 REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime) 555 REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime) 556 REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime) 557 REAL flat(ntime),sens(ntime),ts(ntime),ustar(ntime) 558 REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime),resul(nlevel,ntime),resul1(ntime) 559 560 561 INTEGER nid, ierr, ierr1,ierr2,rid,i 562 INTEGER nbvar3d 563 563 parameter(nbvar3d=39) 564 integervar3didin(nbvar3d)564 INTEGER var3didin(nbvar3d) 565 565 character*5 name_var(1:nbvar3d) 566 566 data name_var/'zz','pp','temp','qv','rh','theta','rv','u','v','ug','vg','w','advu','hu','vu',& … … 652 652 IMPLICIT NONE 653 653 654 integerntime,nlevel655 656 realap(nlevel+1),bp(nlevel+1)657 realzz(nlevel,ntime),zzh(nlevel+1)658 realpp(nlevel,ntime),pph(nlevel+1)659 realtemp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)660 realtheta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)661 realu(nlevel,ntime),v(nlevel,ntime)662 realug(nlevel,ntime),vg(nlevel,ntime)663 realvitw(nlevel,ntime),omega(nlevel,ntime)664 realdu(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)665 realdv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)666 realdt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)667 realdtrad(nlevel,ntime)668 realdq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)669 realdth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)670 realdr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)671 realflat(ntime),sens(ntime),ustar(ntime)672 realuw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)673 realts(ntime),ps(ntime),tke(ntime)674 realorog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas675 realapbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3676 677 678 integernid, ierr,ierr1,ierr2,rid,i679 integernbvar3d654 INTEGER ntime,nlevel 655 656 REAL ap(nlevel+1),bp(nlevel+1) 657 REAL zz(nlevel,ntime),zzh(nlevel+1) 658 REAL pp(nlevel,ntime),pph(nlevel+1) 659 REAL temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime) 660 REAL theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime) 661 REAL u(nlevel,ntime),v(nlevel,ntime) 662 REAL ug(nlevel,ntime),vg(nlevel,ntime) 663 REAL vitw(nlevel,ntime),omega(nlevel,ntime) 664 REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 665 REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) 666 REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime) 667 REAL dtrad(nlevel,ntime) 668 REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime) 669 REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime) 670 REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime) 671 REAL flat(ntime),sens(ntime),ustar(ntime) 672 REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime) 673 REAL ts(ntime),ps(ntime),tke(ntime) 674 REAL orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas 675 REAL apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3 676 677 678 INTEGER nid, ierr,ierr1,ierr2,rid,i 679 INTEGER nbvar3d 680 680 parameter(nbvar3d=62) 681 integervar3didin(nbvar3d),missing_var(nbvar3d)681 INTEGER var3didin(nbvar3d),missing_var(nbvar3d) 682 682 character*12 name_var(1:nbvar3d) 683 683 data name_var/'coor_par_a','coor_par_b','height_h','pressure_h',& … … 709 709 endif 710 710 !----------------------------------------------------------------------- 711 else IF(i>4. and.i<=45) then ! Lecture des variables en (time,nlevel,lat,lon)711 else IF(i>4.AND.i<=45) then ! Lecture des variables en (time,nlevel,lat,lon) 712 712 ierr = nf90_get_var(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 713 713 print *,'read2_cas(resul), on a lu ',i,name_var(i) … … 717 717 endif 718 718 !----------------------------------------------------------------------- 719 else if (i>45.and.i<=51) then ! Lecture des variables en (time,lat,lon)719 ELSE IF (i>45.AND.i<=51) then ! Lecture des variables en (time,lat,lon) 720 720 ierr = nf90_get_var(nid,var3didin(i),resul2, count = [1, 1, ntime]) 721 721 print *,'read2_cas(resul2), on a lu ',i,name_var(i) … … 821 821 IMPLICIT NONE 822 822 823 integerntime,nlevel,k,t824 825 realap(nlevel+1),bp(nlevel+1)826 realzz(nlevel,ntime),zzh(nlevel+1)827 realpp(nlevel,ntime),pph(nlevel+1)823 INTEGER ntime,nlevel,k,t 824 825 REAL ap(nlevel+1),bp(nlevel+1) 826 REAL zz(nlevel,ntime),zzh(nlevel+1) 827 REAL pp(nlevel,ntime),pph(nlevel+1) 828 828 !profils initiaux 829 realtemp0(nlevel),qv0(nlevel),ql0(nlevel),qi0(nlevel),u0(nlevel),v0(nlevel),tke0(nlevel)830 real pp0(nlevel)831 realtemp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)832 realtheta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)833 realu(nlevel,ntime),v(nlevel,ntime),tke(nlevel,ntime)834 realug(nlevel,ntime),vg(nlevel,ntime)835 realvitw(nlevel,ntime),omega(nlevel,ntime)836 realdu(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)837 realdv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)838 realdt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)839 realdtrad(nlevel,ntime)840 realdq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)841 realdth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)842 realdr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)843 realflat(ntime),sens(ntime),ustar(ntime)844 realuw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)845 realts(ntime),ps(ntime)846 realorog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas847 realapbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3848 849 850 integernid, ierr,ierr1,ierr2,rid,i851 integernbvar3d829 REAL temp0(nlevel),qv0(nlevel),ql0(nlevel),qi0(nlevel),u0(nlevel),v0(nlevel),tke0(nlevel) 830 REAL pp0(nlevel) 831 REAL temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime) 832 REAL theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime) 833 REAL u(nlevel,ntime),v(nlevel,ntime),tke(nlevel,ntime) 834 REAL ug(nlevel,ntime),vg(nlevel,ntime) 835 REAL vitw(nlevel,ntime),omega(nlevel,ntime) 836 REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 837 REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) 838 REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime) 839 REAL dtrad(nlevel,ntime) 840 REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime) 841 REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime) 842 REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime) 843 REAL flat(ntime),sens(ntime),ustar(ntime) 844 REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime) 845 REAL ts(ntime),ps(ntime) 846 REAL orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas 847 REAL apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3 848 849 850 INTEGER nid, ierr,ierr1,ierr2,rid,i 851 INTEGER nbvar3d 852 852 parameter(nbvar3d=70) 853 integervar3didin(nbvar3d),missing_var(nbvar3d)853 INTEGER var3didin(nbvar3d),missing_var(nbvar3d) 854 854 character*13 name_var(1:nbvar3d) 855 855 data name_var/'coor_par_a','coor_par_b','height_h','pressure_h',& … … 884 884 endif 885 885 !----------------------------------------------------------------------- 886 else IF(i>4. and.i<=12) then ! Lecture des variables en (time,nlevel,lat,lon)886 else IF(i>4.AND.i<=12) then ! Lecture des variables en (time,nlevel,lat,lon) 887 887 ierr = nf90_get_var(nid,var3didin(i),resul1) 888 888 print *,'read2_cas(resul1), on a lu ',i,name_var(i) … … 893 893 PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1) 894 894 !----------------------------------------------------------------------- 895 else IF(i>12. and.i<=54) then ! Lecture des variables en (time,nlevel,lat,lon)895 else IF(i>12.AND.i<=54) then ! Lecture des variables en (time,nlevel,lat,lon) 896 896 ierr = nf90_get_var(nid,var3didin(i),resul) 897 897 print *,'read2_cas(resul), on a lu ',i,name_var(i) … … 902 902 PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul) 903 903 !----------------------------------------------------------------------- 904 else if (i>54.and.i<=65) then ! Lecture des variables en (time,lat,lon)904 ELSE IF (i>54.AND.i<=65) then ! Lecture des variables en (time,lat,lon) 905 905 ierr = nf90_get_var(nid,var3didin(i),resul2) 906 906 print *,'read2_cas(resul2), on a lu ',i,name_var(i) … … 1053 1053 1054 1054 ! inputs: 1055 integerannee_ref1056 integernt_cas,nlev_cas1057 realday, day1,day_cas1058 realts_cas(nt_cas),ps_cas(nt_cas)1059 realplev_cas(nlev_cas,nt_cas)1060 realt_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas)1061 realu_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)1062 realug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)1063 realvitw_cas(nlev_cas,nt_cas)1064 realdu_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)1065 realdv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)1066 realdt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)1067 realdtrad_cas(nlev_cas,nt_cas)1068 realdq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)1069 reallat_cas(nt_cas)1070 realsens_cas(nt_cas)1071 realustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)1072 realq1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)1055 INTEGER annee_ref 1056 INTEGER nt_cas,nlev_cas 1057 REAL day, day1,day_cas 1058 REAL ts_cas(nt_cas),ps_cas(nt_cas) 1059 REAL plev_cas(nlev_cas,nt_cas) 1060 REAL t_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas) 1061 REAL u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas) 1062 REAL ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas) 1063 REAL vitw_cas(nlev_cas,nt_cas) 1064 REAL du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) 1065 REAL dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas) 1066 REAL dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas) 1067 REAL dtrad_cas(nlev_cas,nt_cas) 1068 REAL dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas) 1069 REAL lat_cas(nt_cas) 1070 REAL sens_cas(nt_cas) 1071 REAL ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas) 1072 REAL q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas) 1073 1073 1074 1074 ! outputs: 1075 realplev_prof_cas(nlev_cas)1076 realt_prof_cas(nlev_cas),q_prof_cas(nlev_cas)1077 realu_prof_cas(nlev_cas),v_prof_cas(nlev_cas)1078 realug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)1079 realvitw_prof_cas(nlev_cas)1080 realdu_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)1081 realdv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)1082 realdt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)1083 realdtrad_prof_cas(nlev_cas)1084 realdq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)1085 reallat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas1086 realuw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)1075 REAL plev_prof_cas(nlev_cas) 1076 REAL t_prof_cas(nlev_cas),q_prof_cas(nlev_cas) 1077 REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 1078 REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas) 1079 REAL vitw_prof_cas(nlev_cas) 1080 REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 1081 REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) 1082 REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas) 1083 REAL dtrad_prof_cas(nlev_cas) 1084 REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 1085 REAL lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas 1086 REAL uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas) 1087 1087 ! local: 1088 integerit_cas1, it_cas2,k1089 realtimeit,time_cas1,time_cas2,frac1088 INTEGER it_cas1, it_cas2,k 1089 REAL timeit,time_cas1,time_cas2,frac 1090 1090 1091 1091 … … 1096 1096 ! sont censes etre corrects. 1097 1097 ! A supprimer a terme (MPL 20150623) 1098 ! if ((forcing_type. eq.10).and.(1.eq.0)) THEN1098 ! if ((forcing_type.EQ.10).AND.(1.EQ.0)) THEN 1099 1099 ! Check that initial day of the simulation consistent with AMMA case: 1100 ! if (annee_ref. ne.2006) THEN1100 ! if (annee_ref.NE.2006) THEN 1101 1101 ! PRINT*,'Pour AMMA, annee_ref doit etre 2006' 1102 1102 ! PRINT*,'Changer annee_ref dans run.def' 1103 1103 ! stop 1104 1104 ! endif 1105 ! if (annee_ref. eq.2006 .and. day1.lt.day_cas) THEN1105 ! if (annee_ref.EQ.2006 .AND. day1.lt.day_cas) THEN 1106 1106 ! PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas 1107 1107 ! PRINT*,'Changer dayref dans run.def' 1108 1108 ! stop 1109 1109 ! endif 1110 ! if (annee_ref. eq.2006 .and. day1.gt.day_cas+1) THEN1110 ! if (annee_ref.EQ.2006 .AND. day1.gt.day_cas+1) THEN 1111 1111 ! PRINT*,'AMMA a fini le 11 juillet' 1112 1112 ! PRINT*,'Changer dayref ou nday dans run.def' … … 1117 1117 ! Determine timestep relative to the 1st day: 1118 1118 ! timeit=(day-day1)*86400. 1119 ! if (annee_ref. eq.1992) THEN1119 ! if (annee_ref.EQ.1992) THEN 1120 1120 ! timeit=(day-day_cas)*86400. 1121 1121 ! else … … 1145 1145 !print *,'it_cas1,it_cas2,time_cas1,time_cas2=',it_cas1,it_cas2,time_cas1,time_cas2 1146 1146 1147 if(it_cas1 > nt_cas) THEN1147 IF (it_cas1 > nt_cas) THEN 1148 1148 WRITE(*,*) 'PB-stop: day, day_ju_ini_cas,it_cas1, it_cas2, timeit: ' & 1149 1149 ,day,day_ju_ini_cas,it_cas1,it_cas2,timeit 1150 1150 stop 1151 endif1151 ENDIF 1152 1152 1153 1153 ! time interpolation: … … 1262 1262 1263 1263 ! inputs: 1264 integerannee_ref1265 integernt_cas,nlev_cas1266 realday, day1,day_cas1267 realts_cas(nt_cas),ps_cas(nt_cas)1268 realplev_cas(nlev_cas,nt_cas)1269 realt_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas)1270 realqv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas)1271 realu_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)1272 realug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)1273 realvitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas)1274 realdu_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)1275 realdv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)1276 realdt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)1277 realdth_cas(nlev_cas,nt_cas),hth_cas(nlev_cas,nt_cas),vth_cas(nlev_cas,nt_cas)1278 realdtrad_cas(nlev_cas,nt_cas)1279 realdq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)1280 reallat_cas(nt_cas),sens_cas(nt_cas),tke_cas(nt_cas)1281 realustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)1282 realq1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)1264 INTEGER annee_ref 1265 INTEGER nt_cas,nlev_cas 1266 REAL day, day1,day_cas 1267 REAL ts_cas(nt_cas),ps_cas(nt_cas) 1268 REAL plev_cas(nlev_cas,nt_cas) 1269 REAL t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas) 1270 REAL qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas) 1271 REAL u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas) 1272 REAL ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas) 1273 REAL vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas) 1274 REAL du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) 1275 REAL dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas) 1276 REAL dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas) 1277 REAL dth_cas(nlev_cas,nt_cas),hth_cas(nlev_cas,nt_cas),vth_cas(nlev_cas,nt_cas) 1278 REAL dtrad_cas(nlev_cas,nt_cas) 1279 REAL dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas) 1280 REAL lat_cas(nt_cas),sens_cas(nt_cas),tke_cas(nt_cas) 1281 REAL ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas) 1282 REAL q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas) 1283 1283 1284 1284 ! outputs: 1285 realplev_prof_cas(nlev_cas)1286 realt_prof_cas(nlev_cas),theta_prof_cas(nlev_cas),thl_prof_cas(nlev_cas),thv_prof_cas(nlev_cas)1287 realqv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)1288 realu_prof_cas(nlev_cas),v_prof_cas(nlev_cas)1289 realug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)1290 realvitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas)1291 realdu_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)1292 realdv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)1293 realdt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)1294 realdth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas)1295 realdtrad_prof_cas(nlev_cas)1296 realdq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)1297 reallat_prof_cas,sens_prof_cas,tke_prof_cas,ts_prof_cas,ustar_prof_cas1298 realuw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)1285 REAL plev_prof_cas(nlev_cas) 1286 REAL t_prof_cas(nlev_cas),theta_prof_cas(nlev_cas),thl_prof_cas(nlev_cas),thv_prof_cas(nlev_cas) 1287 REAL qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas) 1288 REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 1289 REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas) 1290 REAL vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas) 1291 REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 1292 REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) 1293 REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas) 1294 REAL dth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas) 1295 REAL dtrad_prof_cas(nlev_cas) 1296 REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 1297 REAL lat_prof_cas,sens_prof_cas,tke_prof_cas,ts_prof_cas,ustar_prof_cas 1298 REAL uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas) 1299 1299 ! local: 1300 integerit_cas1, it_cas2,k1301 realtimeit,time_cas1,time_cas2,frac1300 INTEGER it_cas1, it_cas2,k 1301 REAL timeit,time_cas1,time_cas2,frac 1302 1302 1303 1303 … … 1311 1311 ! sont censes etre corrects. 1312 1312 ! A supprimer a terme (MPL 20150623) 1313 ! if ((forcing_type. eq.10).and.(1.eq.0)) THEN1313 ! if ((forcing_type.EQ.10).AND.(1.EQ.0)) THEN 1314 1314 ! Check that initial day of the simulation consistent with AMMA case: 1315 ! if (annee_ref. ne.2006) THEN1315 ! if (annee_ref.NE.2006) THEN 1316 1316 ! PRINT*,'Pour AMMA, annee_ref doit etre 2006' 1317 1317 ! PRINT*,'Changer annee_ref dans run.def' 1318 1318 ! stop 1319 1319 ! endif 1320 ! if (annee_ref. eq.2006 .and. day1.lt.day_cas) THEN1320 ! if (annee_ref.EQ.2006 .AND. day1.lt.day_cas) THEN 1321 1321 ! PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas 1322 1322 ! PRINT*,'Changer dayref dans run.def' 1323 1323 ! stop 1324 1324 ! endif 1325 ! if (annee_ref. eq.2006 .and. day1.gt.day_cas+1) THEN1325 ! if (annee_ref.EQ.2006 .AND. day1.gt.day_cas+1) THEN 1326 1326 ! PRINT*,'AMMA a fini le 11 juillet' 1327 1327 ! PRINT*,'Changer dayref ou nday dans run.def' … … 1332 1332 ! Determine timestep relative to the 1st day: 1333 1333 ! timeit=(day-day1)*86400. 1334 ! if (annee_ref. eq.1992) THEN1334 ! if (annee_ref.EQ.1992) THEN 1335 1335 ! timeit=(day-day_cas)*86400. 1336 1336 ! else … … 1361 1361 !print *,'it_cas1,it_cas2,time_cas1,time_cas2=',it_cas1,it_cas2,time_cas1,time_cas2 1362 1362 1363 if(it_cas1 > nt_cas) THEN1363 IF (it_cas1 > nt_cas) THEN 1364 1364 WRITE(*,*) 'PB-stop: day, day_ju_ini_cas,it_cas1, it_cas2, timeit: ' & 1365 1365 ,day,day_ju_ini_cas,it_cas1,it_cas2,timeit 1366 1366 stop 1367 endif1367 ENDIF 1368 1368 1369 1369 ! time interpolation: -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r5116 r5117 10 10 character*80 :: fich_cas 11 11 ! Discr?tisation 12 integernlev_cas, nt_cas12 INTEGER nlev_cas, nt_cas 13 13 14 14 15 15 !profils environnementaux 16 real, allocatable:: plev_cas(:,:),plevh_cas(:)17 real, allocatable:: ap_cas(:),bp_cas(:)18 19 real, allocatable:: z_cas(:,:),zh_cas(:)20 real, allocatable:: t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:)21 real, allocatable:: th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:)22 real, allocatable:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:),tke_cas(:,:)16 REAL, ALLOCATABLE:: plev_cas(:,:),plevh_cas(:) 17 REAL, ALLOCATABLE:: ap_cas(:),bp_cas(:) 18 19 REAL, ALLOCATABLE:: z_cas(:,:),zh_cas(:) 20 REAL, ALLOCATABLE:: t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:) 21 REAL, ALLOCATABLE:: th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:) 22 REAL, ALLOCATABLE:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:),tke_cas(:,:) 23 23 24 24 !forcing 25 real, allocatable:: ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:)26 real, allocatable:: hth_cas(:,:),vth_cas(:,:),dth_cas(:,:)27 real, allocatable:: hq_cas(:,:),vq_cas(:,:),dq_cas(:,:)28 real, allocatable:: hr_cas(:,:),vr_cas(:,:),dr_cas(:,:)29 real, allocatable:: hu_cas(:,:),vu_cas(:,:),du_cas(:,:)30 real, allocatable:: hv_cas(:,:),vv_cas(:,:),dv_cas(:,:)31 real, allocatable:: ug_cas(:,:),vg_cas(:,:)32 real, allocatable:: temp_nudg_cas(:,:),qv_nudg_cas(:,:),u_nudg_cas(:,:),v_nudg_cas(:,:)33 real, allocatable:: invtau_temp_nudg_cas(:,:),invtau_qv_nudg_cas(:,:),invtau_u_nudg_cas(:,:),invtau_v_nudg_cas(:,:)34 real, allocatable:: lat_cas(:),sens_cas(:),tskin_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:)35 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tkes_cas(:)25 REAL, ALLOCATABLE:: ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:) 26 REAL, ALLOCATABLE:: hth_cas(:,:),vth_cas(:,:),dth_cas(:,:) 27 REAL, ALLOCATABLE:: hq_cas(:,:),vq_cas(:,:),dq_cas(:,:) 28 REAL, ALLOCATABLE:: hr_cas(:,:),vr_cas(:,:),dr_cas(:,:) 29 REAL, ALLOCATABLE:: hu_cas(:,:),vu_cas(:,:),du_cas(:,:) 30 REAL, ALLOCATABLE:: hv_cas(:,:),vv_cas(:,:),dv_cas(:,:) 31 REAL, ALLOCATABLE:: ug_cas(:,:),vg_cas(:,:) 32 REAL, ALLOCATABLE:: temp_nudg_cas(:,:),qv_nudg_cas(:,:),u_nudg_cas(:,:),v_nudg_cas(:,:) 33 REAL, ALLOCATABLE:: invtau_temp_nudg_cas(:,:),invtau_qv_nudg_cas(:,:),invtau_u_nudg_cas(:,:),invtau_v_nudg_cas(:,:) 34 REAL, ALLOCATABLE:: lat_cas(:),sens_cas(:),tskin_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:) 35 REAL, ALLOCATABLE:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tkes_cas(:) 36 36 37 37 !champs interpoles 38 real, allocatable:: plev_prof_cas(:)39 real, allocatable:: t_prof_cas(:)40 real, allocatable:: theta_prof_cas(:)41 real, allocatable:: thl_prof_cas(:)42 real, allocatable:: thv_prof_cas(:)43 real, allocatable:: q_prof_cas(:)44 real, allocatable:: qv_prof_cas(:)45 real, allocatable:: ql_prof_cas(:)46 real, allocatable:: qi_prof_cas(:)47 real, allocatable:: rh_prof_cas(:)48 real, allocatable:: rv_prof_cas(:)49 real, allocatable:: u_prof_cas(:)50 real, allocatable:: v_prof_cas(:)51 real, allocatable:: vitw_prof_cas(:)52 real, allocatable:: omega_prof_cas(:)53 real, allocatable:: tke_prof_cas(:)54 real, allocatable:: ug_prof_cas(:)55 real, allocatable:: vg_prof_cas(:)56 real, allocatable:: temp_nudg_prof_cas(:),qv_nudg_prof_cas(:),u_nudg_prof_cas(:),v_nudg_prof_cas(:)57 real, allocatable:: invtau_temp_nudg_prof_cas(:),invtau_qv_nudg_prof_cas(:),invtau_u_nudg_prof_cas(:),invtau_v_nudg_prof_cas(:)58 59 real, allocatable:: ht_prof_cas(:)60 real, allocatable:: hth_prof_cas(:)61 real, allocatable:: hq_prof_cas(:)62 real, allocatable:: vt_prof_cas(:)63 real, allocatable:: vth_prof_cas(:)64 real, allocatable:: vq_prof_cas(:)65 real, allocatable:: dt_prof_cas(:)66 real, allocatable:: dth_prof_cas(:)67 real, allocatable:: dtrad_prof_cas(:)68 real, allocatable:: dq_prof_cas(:)69 real, allocatable:: hu_prof_cas(:)70 real, allocatable:: hv_prof_cas(:)71 real, allocatable:: vu_prof_cas(:)72 real, allocatable:: vv_prof_cas(:)73 real, allocatable:: du_prof_cas(:)74 real, allocatable:: dv_prof_cas(:)75 real, allocatable:: uw_prof_cas(:)76 real, allocatable:: vw_prof_cas(:)77 real, allocatable:: q1_prof_cas(:)78 real, allocatable:: q2_prof_cas(:)79 80 81 realo3_cas,lat_prof_cas,sens_prof_cas,ts_prof_cas,tskin_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas82 realorog_cas,albedo_cas,emiss_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas38 REAL, ALLOCATABLE:: plev_prof_cas(:) 39 REAL, ALLOCATABLE:: t_prof_cas(:) 40 REAL, ALLOCATABLE:: theta_prof_cas(:) 41 REAL, ALLOCATABLE:: thl_prof_cas(:) 42 REAL, ALLOCATABLE:: thv_prof_cas(:) 43 REAL, ALLOCATABLE:: q_prof_cas(:) 44 REAL, ALLOCATABLE:: qv_prof_cas(:) 45 REAL, ALLOCATABLE:: ql_prof_cas(:) 46 REAL, ALLOCATABLE:: qi_prof_cas(:) 47 REAL, ALLOCATABLE:: rh_prof_cas(:) 48 REAL, ALLOCATABLE:: rv_prof_cas(:) 49 REAL, ALLOCATABLE:: u_prof_cas(:) 50 REAL, ALLOCATABLE:: v_prof_cas(:) 51 REAL, ALLOCATABLE:: vitw_prof_cas(:) 52 REAL, ALLOCATABLE:: omega_prof_cas(:) 53 REAL, ALLOCATABLE:: tke_prof_cas(:) 54 REAL, ALLOCATABLE:: ug_prof_cas(:) 55 REAL, ALLOCATABLE:: vg_prof_cas(:) 56 REAL, ALLOCATABLE:: temp_nudg_prof_cas(:),qv_nudg_prof_cas(:),u_nudg_prof_cas(:),v_nudg_prof_cas(:) 57 REAL, ALLOCATABLE:: invtau_temp_nudg_prof_cas(:),invtau_qv_nudg_prof_cas(:),invtau_u_nudg_prof_cas(:),invtau_v_nudg_prof_cas(:) 58 59 REAL, ALLOCATABLE:: ht_prof_cas(:) 60 REAL, ALLOCATABLE:: hth_prof_cas(:) 61 REAL, ALLOCATABLE:: hq_prof_cas(:) 62 REAL, ALLOCATABLE:: vt_prof_cas(:) 63 REAL, ALLOCATABLE:: vth_prof_cas(:) 64 REAL, ALLOCATABLE:: vq_prof_cas(:) 65 REAL, ALLOCATABLE:: dt_prof_cas(:) 66 REAL, ALLOCATABLE:: dth_prof_cas(:) 67 REAL, ALLOCATABLE:: dtrad_prof_cas(:) 68 REAL, ALLOCATABLE:: dq_prof_cas(:) 69 REAL, ALLOCATABLE:: hu_prof_cas(:) 70 REAL, ALLOCATABLE:: hv_prof_cas(:) 71 REAL, ALLOCATABLE:: vu_prof_cas(:) 72 REAL, ALLOCATABLE:: vv_prof_cas(:) 73 REAL, ALLOCATABLE:: du_prof_cas(:) 74 REAL, ALLOCATABLE:: dv_prof_cas(:) 75 REAL, ALLOCATABLE:: uw_prof_cas(:) 76 REAL, ALLOCATABLE:: vw_prof_cas(:) 77 REAL, ALLOCATABLE:: q1_prof_cas(:) 78 REAL, ALLOCATABLE:: q2_prof_cas(:) 79 80 81 REAL o3_cas,lat_prof_cas,sens_prof_cas,ts_prof_cas,tskin_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas 82 REAL orog_cas,albedo_cas,emiss_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas 83 83 84 84 … … 101 101 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 102 102 PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 103 if(ierr/=nf90_noerr) THEN103 IF (ierr/=nf90_noerr) THEN 104 104 WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file ' 105 105 WRITE(*,*) nf90_strerror(ierr) … … 332 332 INCLUDE "compar1d.h" 333 333 334 integerntime,nlevel,k,t335 336 realap(nlevel+1),bp(nlevel+1)337 realzz(nlevel,ntime),zzh(nlevel+1)338 realpp(nlevel,ntime),pph(nlevel+1)334 INTEGER ntime,nlevel,k,t 335 336 REAL ap(nlevel+1),bp(nlevel+1) 337 REAL zz(nlevel,ntime),zzh(nlevel+1) 338 REAL pp(nlevel,ntime),pph(nlevel+1) 339 339 !profils initiaux 340 realtemp0(nlevel),qv0(nlevel),ql0(nlevel),qi0(nlevel),u0(nlevel),v0(nlevel),tke0(nlevel)341 real pp0(nlevel)342 realtemp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)343 realtheta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)344 realu(nlevel,ntime),v(nlevel,ntime),tkes(ntime)345 realtemp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime)346 realinvtau_temp_nudg(nlevel,ntime),invtau_qv_nudg(nlevel,ntime),invtau_u_nudg(nlevel,ntime),invtau_v_nudg(nlevel,ntime)347 realug(nlevel,ntime),vg(nlevel,ntime)348 realvitw(nlevel,ntime),omega(nlevel,ntime),tke(nlevel,ntime)349 realdu(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)350 realdv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)351 realdt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)352 realdtrad(nlevel,ntime)353 realdq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)354 realdth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)355 realdr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)356 realflat(ntime),sens(ntime),ustar(ntime)357 realuw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)358 realts(ntime),tskin(ntime),ps(ntime)359 realorog_cas,albedo_cas,emiss_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas360 realapbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3361 362 363 integernid, ierr,ierr1,ierr2,rid,i,int_test364 integernbvar3d340 REAL temp0(nlevel),qv0(nlevel),ql0(nlevel),qi0(nlevel),u0(nlevel),v0(nlevel),tke0(nlevel) 341 REAL pp0(nlevel) 342 REAL temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime) 343 REAL theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime) 344 REAL u(nlevel,ntime),v(nlevel,ntime),tkes(ntime) 345 REAL temp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime) 346 REAL invtau_temp_nudg(nlevel,ntime),invtau_qv_nudg(nlevel,ntime),invtau_u_nudg(nlevel,ntime),invtau_v_nudg(nlevel,ntime) 347 REAL ug(nlevel,ntime),vg(nlevel,ntime) 348 REAL vitw(nlevel,ntime),omega(nlevel,ntime),tke(nlevel,ntime) 349 REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 350 REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) 351 REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime) 352 REAL dtrad(nlevel,ntime) 353 REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime) 354 REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime) 355 REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime) 356 REAL flat(ntime),sens(ntime),ustar(ntime) 357 REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime) 358 REAL ts(ntime),tskin(ntime),ps(ntime) 359 REAL orog_cas,albedo_cas,emiss_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas 360 REAL apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3 361 362 363 INTEGER nid, ierr,ierr1,ierr2,rid,i,int_test 364 INTEGER nbvar3d 365 365 parameter(nbvar3d=78) 366 integervar3didin(nbvar3d),missing_var(nbvar3d)366 INTEGER var3didin(nbvar3d),missing_var(nbvar3d) 367 367 character*13 name_var(1:nbvar3d) 368 368 … … 440 440 ! Activating keys depending on the presence of specific variables in cas.nc 441 441 !----------------------------------------------------------------------- 442 if( 1 == 1 ) THEN442 IF ( 1 == 1 ) THEN 443 443 ! A MODIFIER: il faudrait dire nudging_temp mais faut le declarer dans compar1d.h etc... 444 ! if ( name_var(i) == 'temp_nudging' . and. nint(nudging_t)==0) stop 'Nudging inconsistency temp'445 if ( name_var(i) == 'qv_nud' .and. nint(nudging_qv)==0) stop 'Nudging inconsistency qv'446 if ( name_var(i) == 'ua_nud' .and. nint(nudging_u)==0) stop 'Nudging inconsistency u'447 if ( name_var(i) == 'va_nud' .and. nint(nudging_v)==0) stop 'Nudging inconsistency v'444 ! if ( name_var(i) == 'temp_nudging' .AND. nint(nudging_t)==0) stop 'Nudging inconsistency temp' 445 IF ( name_var(i) == 'qv_nud' .AND. nint(nudging_qv)==0) stop 'Nudging inconsistency qv' 446 IF ( name_var(i) == 'ua_nud' .AND. nint(nudging_u)==0) stop 'Nudging inconsistency u' 447 IF ( name_var(i) == 'va_nud' .AND. nint(nudging_v)==0) stop 'Nudging inconsistency v' 448 448 ELSE 449 449 PRINT*,'GUIDAGE : CONSISTENCY CHECK DEACTIVATED FOR TESTS of SANDU/REF' … … 464 464 ! Reading 1D (N) vertical varialbes (nlevel,lat,lon) 465 465 !----------------------------------------------------------------------- 466 else IF(i>4. and.i<=12) THEN466 else IF(i>4.AND.i<=12) THEN 467 467 ierr = nf90_get_var(nid,var3didin(i),resul1) 468 468 print *,'read_SCM(resul1), on a lu ',i,name_var(i) … … 477 477 ! TBD : seems to be the same as above. 478 478 !----------------------------------------------------------------------- 479 else IF(i>12. and.i<=61) THEN479 else IF(i>12.AND.i<=61) THEN 480 480 ierr = nf90_get_var(nid,var3didin(i),resul) 481 481 print *,'read_SCM(resul), on a lu ',i,name_var(i) … … 489 489 ! Reading 1D time variables (time,lat,lon) 490 490 !----------------------------------------------------------------------- 491 else if (i>62.and.i<=75) THEN491 ELSE IF (i>62.AND.i<=75) THEN 492 492 ierr = nf90_get_var(nid,var3didin(i),resul2) 493 493 print *,'read_SCM(resul2), on a lu ',i,name_var(i) … … 673 673 674 674 ! inputs: 675 integerannee_ref676 integernt_cas,nlev_cas677 realday, day1,day_cas678 realts_cas(nt_cas),tskin_cas(nt_cas),ps_cas(nt_cas)679 realplev_cas(nlev_cas,nt_cas)680 realt_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas)681 realthv_cas(nlev_cas,nt_cas), thl_cas(nlev_cas,nt_cas)682 realqv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas)683 realu_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)684 realug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)685 realtemp_nudg_cas(nlev_cas,nt_cas),qv_nudg_cas(nlev_cas,nt_cas)686 realu_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas)687 688 realinvtau_temp_nudg_cas(nlev_cas,nt_cas),invtau_qv_nudg_cas(nlev_cas,nt_cas)689 realinvtau_u_nudg_cas(nlev_cas,nt_cas),invtau_v_nudg_cas(nlev_cas,nt_cas)690 691 realvitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas),tke_cas(nlev_cas,nt_cas)692 realdu_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)693 realdv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)694 realdt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)695 realdth_cas(nlev_cas,nt_cas),hth_cas(nlev_cas,nt_cas),vth_cas(nlev_cas,nt_cas)696 realdtrad_cas(nlev_cas,nt_cas)697 realdq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)698 reallat_cas(nt_cas),sens_cas(nt_cas),tkes_cas(nt_cas)699 realustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)700 realq1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)675 INTEGER annee_ref 676 INTEGER nt_cas,nlev_cas 677 REAL day, day1,day_cas 678 REAL ts_cas(nt_cas),tskin_cas(nt_cas),ps_cas(nt_cas) 679 REAL plev_cas(nlev_cas,nt_cas) 680 REAL t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas) 681 REAL thv_cas(nlev_cas,nt_cas), thl_cas(nlev_cas,nt_cas) 682 REAL qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas) 683 REAL u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas) 684 REAL ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas) 685 REAL temp_nudg_cas(nlev_cas,nt_cas),qv_nudg_cas(nlev_cas,nt_cas) 686 REAL u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas) 687 688 REAL invtau_temp_nudg_cas(nlev_cas,nt_cas),invtau_qv_nudg_cas(nlev_cas,nt_cas) 689 REAL invtau_u_nudg_cas(nlev_cas,nt_cas),invtau_v_nudg_cas(nlev_cas,nt_cas) 690 691 REAL vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas),tke_cas(nlev_cas,nt_cas) 692 REAL du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) 693 REAL dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas) 694 REAL dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas) 695 REAL dth_cas(nlev_cas,nt_cas),hth_cas(nlev_cas,nt_cas),vth_cas(nlev_cas,nt_cas) 696 REAL dtrad_cas(nlev_cas,nt_cas) 697 REAL dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas) 698 REAL lat_cas(nt_cas),sens_cas(nt_cas),tkes_cas(nt_cas) 699 REAL ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas) 700 REAL q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas) 701 701 702 702 ! outputs: 703 realplev_prof_cas(nlev_cas)704 realt_prof_cas(nlev_cas),theta_prof_cas(nlev_cas),thl_prof_cas(nlev_cas),thv_prof_cas(nlev_cas)705 realqv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)706 realu_prof_cas(nlev_cas),v_prof_cas(nlev_cas)707 realug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)708 realtemp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas)709 realu_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas)710 711 realinvtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas)712 realinvtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas)713 714 realvitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas)715 realdu_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)716 realdv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)717 realdt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)718 realdth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas)719 realdtrad_prof_cas(nlev_cas)720 realdq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)721 reallat_prof_cas,sens_prof_cas,tkes_prof_cas,ts_prof_cas,tskin_prof_cas,ps_prof_cas,ustar_prof_cas722 realuw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)703 REAL plev_prof_cas(nlev_cas) 704 REAL t_prof_cas(nlev_cas),theta_prof_cas(nlev_cas),thl_prof_cas(nlev_cas),thv_prof_cas(nlev_cas) 705 REAL qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas) 706 REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 707 REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas) 708 REAL temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas) 709 REAL u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) 710 711 REAL invtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas) 712 REAL invtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas) 713 714 REAL vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) 715 REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 716 REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) 717 REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas) 718 REAL dth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas) 719 REAL dtrad_prof_cas(nlev_cas) 720 REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 721 REAL lat_prof_cas,sens_prof_cas,tkes_prof_cas,ts_prof_cas,tskin_prof_cas,ps_prof_cas,ustar_prof_cas 722 REAL uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas) 723 723 ! local: 724 integerit_cas1, it_cas2,k725 realtimeit,time_cas1,time_cas2,frac724 INTEGER it_cas1, it_cas2,k 725 REAL timeit,time_cas1,time_cas2,frac 726 726 727 727 … … 735 735 ! sont censes etre corrects. 736 736 ! A supprimer a terme (MPL 20150623) 737 ! if ((forcing_type. eq.10).and.(1.eq.0)) THEN737 ! if ((forcing_type.EQ.10).AND.(1.EQ.0)) THEN 738 738 ! Check that initial day of the simulation consistent with AMMA case: 739 ! if (annee_ref. ne.2006) THEN739 ! if (annee_ref.NE.2006) THEN 740 740 ! PRINT*,'Pour AMMA, annee_ref doit etre 2006' 741 741 ! PRINT*,'Changer annee_ref dans run.def' 742 742 ! stop 743 743 ! endif 744 ! if (annee_ref. eq.2006 .and. day1.lt.day_cas) THEN744 ! if (annee_ref.EQ.2006 .AND. day1.lt.day_cas) THEN 745 745 ! PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas 746 746 ! PRINT*,'Changer dayref dans run.def' 747 747 ! stop 748 748 ! endif 749 ! if (annee_ref. eq.2006 .and. day1.gt.day_cas+1) THEN749 ! if (annee_ref.EQ.2006 .AND. day1.gt.day_cas+1) THEN 750 750 ! PRINT*,'AMMA a fini le 11 juillet' 751 751 ! PRINT*,'Changer dayref ou nday dans run.def' … … 756 756 ! Determine timestep relative to the 1st day: 757 757 ! timeit=(day-day1)*86400. 758 ! if (annee_ref. eq.1992) THEN758 ! if (annee_ref.EQ.1992) THEN 759 759 ! timeit=(day-day_cas)*86400. 760 760 ! else … … 785 785 ! print *,'it_cas1,it_cas2,time_cas1,time_cas2=',it_cas1,it_cas2,time_cas1,time_cas2 786 786 787 if(it_cas1 > nt_cas) THEN787 IF (it_cas1 > nt_cas) THEN 788 788 WRITE(*,*) 'PB-stop: day, day_ju_ini_cas,it_cas1, it_cas2, timeit: ' & 789 789 ,day,day_ju_ini_cas,it_cas1,it_cas2,timeit … … 939 939 !------------------------------------------------------------------------- 940 940 941 integernlevmax941 INTEGER nlevmax 942 942 parameter (nlevmax=41) 943 integernlev_cas,mxcalc943 INTEGER nlev_cas,mxcalc 944 944 ! real play(llm), plev_prof(nlevmax) 945 945 ! real t_prof(nlevmax),q_prof(nlevmax) … … 948 948 ! real hq_prof(nlevmax),vq_prof(nlevmax) 949 949 950 real play(llm), plev(llm+1), plev_prof_cas(nlev_cas)951 realt_prof_cas(nlev_cas),th_prof_cas(nlev_cas),thv_prof_cas(nlev_cas),thl_prof_cas(nlev_cas)952 realqv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)953 realu_prof_cas(nlev_cas),v_prof_cas(nlev_cas)954 realug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas)955 realtemp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas)956 realu_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas)957 realinvtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas)958 realinvtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas)959 960 realdu_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)961 realdv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)962 realdt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas),dtrad_prof_cas(nlev_cas)963 realdth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas)964 realdq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)965 966 realt_mod_cas(llm),theta_mod_cas(llm),thv_mod_cas(llm),thl_mod_cas(llm)967 realqv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm)968 realu_mod_cas(llm),v_mod_cas(llm)969 realug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm),tke_mod_cas(llm+1)970 realtemp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm)971 realu_nudg_mod_cas(llm),v_nudg_mod_cas(llm)972 realinvtau_temp_nudg_mod_cas(llm),invtau_qv_nudg_mod_cas(llm)973 realinvtau_u_nudg_mod_cas(llm),invtau_v_nudg_mod_cas(llm)974 realdu_mod_cas(llm),hu_mod_cas(llm),vu_mod_cas(llm)975 realdv_mod_cas(llm),hv_mod_cas(llm),vv_mod_cas(llm)976 realdt_mod_cas(llm),ht_mod_cas(llm),vt_mod_cas(llm),dtrad_mod_cas(llm)977 realdth_mod_cas(llm),hth_mod_cas(llm),vth_mod_cas(llm)978 realdq_mod_cas(llm),hq_mod_cas(llm),vq_mod_cas(llm)979 980 integerl,k,k1,k2981 realfrac,frac1,frac2,fact950 REAL play(llm), plev(llm+1), plev_prof_cas(nlev_cas) 951 REAL t_prof_cas(nlev_cas),th_prof_cas(nlev_cas),thv_prof_cas(nlev_cas),thl_prof_cas(nlev_cas) 952 REAL qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas) 953 REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 954 REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) 955 REAL temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas) 956 REAL u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) 957 REAL invtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas) 958 REAL invtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas) 959 960 REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 961 REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) 962 REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas),dtrad_prof_cas(nlev_cas) 963 REAL dth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas) 964 REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 965 966 REAL t_mod_cas(llm),theta_mod_cas(llm),thv_mod_cas(llm),thl_mod_cas(llm) 967 REAL qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm) 968 REAL u_mod_cas(llm),v_mod_cas(llm) 969 REAL ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm),tke_mod_cas(llm+1) 970 REAL temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm) 971 REAL u_nudg_mod_cas(llm),v_nudg_mod_cas(llm) 972 REAL invtau_temp_nudg_mod_cas(llm),invtau_qv_nudg_mod_cas(llm) 973 REAL invtau_u_nudg_mod_cas(llm),invtau_v_nudg_mod_cas(llm) 974 REAL du_mod_cas(llm),hu_mod_cas(llm),vu_mod_cas(llm) 975 REAL dv_mod_cas(llm),hv_mod_cas(llm),vv_mod_cas(llm) 976 REAL dt_mod_cas(llm),ht_mod_cas(llm),vt_mod_cas(llm),dtrad_mod_cas(llm) 977 REAL dth_mod_cas(llm),hth_mod_cas(llm),vth_mod_cas(llm) 978 REAL dq_mod_cas(llm),hq_mod_cas(llm),vq_mod_cas(llm) 979 980 INTEGER l,k,k1,k2 981 REAL frac,frac1,frac2,fact 982 982 983 983 … … 987 987 do l = 1, llm 988 988 989 if(play(l)>=plev_prof_cas(nlev_cas)) THEN989 IF (play(l)>=plev_prof_cas(nlev_cas)) THEN 990 990 mxcalc=l 991 991 ! print *,'debut interp2, mxcalc=',mxcalc … … 993 993 k2=0 994 994 995 if(play(l)<=plev_prof_cas(1)) THEN995 IF (play(l)<=plev_prof_cas(1)) THEN 996 996 do k = 1, nlev_cas-1 997 if (play(l)<=plev_prof_cas(k).and. play(l)>plev_prof_cas(k+1)) THEN997 IF (play(l)<=plev_prof_cas(k).AND. play(l)>plev_prof_cas(k+1)) THEN 998 998 k1=k 999 999 k2=k+1 … … 1001 1001 enddo 1002 1002 1003 if (k1==0 .or. k2==0) THEN1003 IF (k1==0 .OR. k2==0) THEN 1004 1004 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 1005 1005 WRITE(*,*) 'l,play(l) = ',l,play(l)/100 … … 1161 1161 do l = 1, llm+1 1162 1162 1163 if(plev(l)>=plev_prof_cas(nlev_cas)) THEN1163 IF (plev(l)>=plev_prof_cas(nlev_cas)) THEN 1164 1164 mxcalc=l 1165 1165 k1=0 1166 1166 k2=0 1167 1167 1168 if(plev(l)<=plev_prof_cas(1)) THEN1168 IF (plev(l)<=plev_prof_cas(1)) THEN 1169 1169 do k = 1, nlev_cas-1 1170 if (plev(l)<=plev_prof_cas(k).and. plev(l)>plev_prof_cas(k+1)) THEN1170 IF (plev(l)<=plev_prof_cas(k).AND. plev(l)>plev_prof_cas(k+1)) THEN 1171 1171 k1=k 1172 1172 k2=k+1 … … 1174 1174 enddo 1175 1175 1176 if (k1==0 .or. k2==0) THEN1176 IF (k1==0 .OR. k2==0) THEN 1177 1177 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 1178 1178 WRITE(*,*) 'l,plev(l) = ',l,plev(l)/100 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h
r5116 r5117 9 9 !------------------------------------------------------------------------- 10 10 11 integernlev_toga,nt_toga12 realts_toga(nt_toga),plev_toga(nlev_toga,nt_toga)13 realt_toga(nlev_toga,nt_toga),q_toga(nlev_toga,nt_toga)14 realu_toga(nlev_toga,nt_toga),v_toga(nlev_toga,nt_toga)15 realw_toga(nlev_toga,nt_toga)16 realht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga)17 realhq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga)11 INTEGER nlev_toga,nt_toga 12 REAL ts_toga(nt_toga),plev_toga(nlev_toga,nt_toga) 13 REAL t_toga(nlev_toga,nt_toga),q_toga(nlev_toga,nt_toga) 14 REAL u_toga(nlev_toga,nt_toga),v_toga(nlev_toga,nt_toga) 15 REAL w_toga(nlev_toga,nt_toga) 16 REAL ht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga) 17 REAL hq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga) 18 18 character*80 fich_toga 19 19 20 integerk,ip21 realbid22 23 integeriy,im,id,ih20 INTEGER k,ip 21 REAL bid 22 23 INTEGER iy,im,id,ih 24 24 25 realplev_min25 REAL plev_min 26 26 27 27 plev_min = 55. ! pas de tendance de vap. d eau au-dessus de 55 hPa … … 46 46 w_toga(k,ip)=w_toga(k,ip)*100./3600. ! Pa/s 47 47 ! no water vapour tendency above 55 hPa 48 if(plev_toga(k,ip) .lt. plev_min) THEN48 IF (plev_toga(k,ip) .lt. plev_min) THEN 49 49 q_toga(k,ip) = 0. 50 50 hq_toga(k,ip) = 0. … … 71 71 !------------------------------------------------------------------------- 72 72 73 integernlev_sandu,nt_sandu74 realts_sandu(nt_sandu)73 INTEGER nlev_sandu,nt_sandu 74 REAL ts_sandu(nt_sandu) 75 75 character*80 fich_sandu 76 76 77 integerip78 integeriy,im,id,ih79 80 realplev_min77 INTEGER ip 78 INTEGER iy,im,id,ih 79 80 REAL plev_min 81 81 82 82 PRINT*,'nlev_sandu',nlev_sandu … … 108 108 !------------------------------------------------------------------------- 109 109 110 integernlev_astex,nt_astex111 realdiv_astex(nt_astex),ts_astex(nt_astex),ug_astex(nt_astex)112 realvg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex)110 INTEGER nlev_astex,nt_astex 111 REAL div_astex(nt_astex),ts_astex(nt_astex),ug_astex(nt_astex) 112 REAL vg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex) 113 113 character*80 fich_astex 114 114 115 integerip116 integeriy,im,id,ih117 118 realplev_min115 INTEGER ip 116 INTEGER iy,im,id,ih 117 118 REAL plev_min 119 119 120 120 PRINT*,'nlev_astex',nlev_astex … … 146 146 !program reading forcings of the TWP-ICE experiment 147 147 148 usenetcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,&148 USE netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 149 149 nf90_inq_dimid,nf90_inquire_dimension 150 150 … … 152 152 IMPLICIT NONE 153 153 154 integerntime,nlevel155 integerl,k154 INTEGER ntime,nlevel 155 INTEGER l,k 156 156 character*80 :: fich_twpice 157 157 real*8 time(ntime) … … 172 172 real*8 T_srf(ntime) 173 173 174 integernid, ierr175 integernbvar3d174 INTEGER nid, ierr 175 INTEGER nbvar3d 176 176 parameter(nbvar3d=20) 177 integervar3didin(nbvar3d)177 INTEGER var3didin(nbvar3d) 178 178 179 179 ierr = nf90_open(fich_twpice,nf90_nowrite,nid) 180 if(ierr.NE.nf90_noerr) THEN180 IF (ierr.NE.nf90_noerr) THEN 181 181 WRITE(*,*) 'ERROR: Pb opening forcings cdf file ' 182 182 WRITE(*,*) nf90_strerror(ierr) … … 492 492 subroutine catchaxis(nid,ttm,llm,time,lev,ierr) 493 493 494 usenetcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,&494 USE netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 495 495 nf90_inq_dimid,nf90_inquire_dimension 496 496 497 497 IMPLICIT NONE 498 integernid,ttm,llm498 INTEGER nid,ttm,llm 499 499 real*8 time(ttm) 500 500 real*8 lev(llm) 501 integerierr502 503 integertimevar,levvar504 integertimelen,levlen505 integertimedimin,levdimin501 INTEGER ierr 502 503 INTEGER timevar,levvar 504 INTEGER timelen,levlen 505 INTEGER timedimin,levdimin 506 506 507 507 ! Control & lecture on dimensions … … 509 509 ierr=nf90_inq_dimid(nid,"time",timedimin) 510 510 ierr=nf90_inq_varid(nid,"time",timevar) 511 if(ierr.NE.nf90_noerr) THEN511 IF (ierr.NE.nf90_noerr) THEN 512 512 WRITE(*,*) 'ERROR: Field <time> is missing' 513 513 stop "" … … 517 517 ierr=nf90_inq_dimid(nid,"lev",levdimin) 518 518 ierr=nf90_inq_varid(nid,"lev",levvar) 519 if(ierr.NE.nf90_noerr) THEN519 IF (ierr.NE.nf90_noerr) THEN 520 520 WRITE(*,*) 'ERROR: Field <lev> is lacking' 521 521 stop "" … … 523 523 ierr=nf90_inquire_dimension(nid,levdimin,len=levlen) 524 524 525 if((timelen/=ttm).or.(levlen/=llm)) THEN525 IF((timelen/=ttm).OR.(levlen/=llm)) THEN 526 526 WRITE(*,*) 'ERROR: Not the good lenght for axis' 527 527 WRITE(*,*) 'longitude: ',timelen,ttm+1 … … 551 551 !------------------------------------------------------------------------- 552 552 553 integernlevmax553 INTEGER nlevmax 554 554 parameter (nlevmax=41) 555 integernlev_sandu,mxcalc555 INTEGER nlev_sandu,mxcalc 556 556 ! real play(llm), plev_prof(nlevmax) 557 557 ! real t_prof(nlevmax),q_prof(nlevmax) … … 560 560 ! real hq_prof(nlevmax),vq_prof(nlevmax) 561 561 562 realplay(llm), plev_prof(nlev_sandu)563 realt_prof(nlev_sandu),thl_prof(nlev_sandu),q_prof(nlev_sandu)564 realu_prof(nlev_sandu),v_prof(nlev_sandu), w_prof(nlev_sandu)565 realomega_prof(nlev_sandu),o3mmr_prof(nlev_sandu)566 567 realt_mod(llm),thl_mod(llm),q_mod(llm)568 realu_mod(llm),v_mod(llm), w_mod(llm)569 realomega_mod(llm),o3mmr_mod(llm)570 571 integerl,k,k1,k2572 realfrac,frac1,frac2,fact562 REAL play(llm), plev_prof(nlev_sandu) 563 REAL t_prof(nlev_sandu),thl_prof(nlev_sandu),q_prof(nlev_sandu) 564 REAL u_prof(nlev_sandu),v_prof(nlev_sandu), w_prof(nlev_sandu) 565 REAL omega_prof(nlev_sandu),o3mmr_prof(nlev_sandu) 566 567 REAL t_mod(llm),thl_mod(llm),q_mod(llm) 568 REAL u_mod(llm),v_mod(llm), w_mod(llm) 569 REAL omega_mod(llm),o3mmr_mod(llm) 570 571 INTEGER l,k,k1,k2 572 REAL frac,frac1,frac2,fact 573 573 574 574 do l = 1, llm 575 575 576 if(play(l).ge.plev_prof(nlev_sandu)) THEN576 IF (play(l).ge.plev_prof(nlev_sandu)) THEN 577 577 mxcalc=l 578 578 k1=0 579 579 k2=0 580 580 581 if(play(l).le.plev_prof(1)) THEN581 IF (play(l).le.plev_prof(1)) THEN 582 582 do k = 1, nlev_sandu-1 583 if (play(l).le.plev_prof(k).and. play(l).gt.plev_prof(k+1)) THEN583 IF (play(l).le.plev_prof(k).AND. play(l).gt.plev_prof(k+1)) THEN 584 584 k1=k 585 585 k2=k+1 … … 587 587 enddo 588 588 589 if (k1.eq.0 .or. k2.eq.0) THEN589 IF (k1.EQ.0 .OR. k2.EQ.0) THEN 590 590 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 591 591 WRITE(*,*) 'l,play(l) = ',l,play(l)/100 … … 663 663 !------------------------------------------------------------------------- 664 664 665 integernlevmax665 INTEGER nlevmax 666 666 parameter (nlevmax=41) 667 integernlev_astex,mxcalc667 INTEGER nlev_astex,mxcalc 668 668 ! real play(llm), plev_prof(nlevmax) 669 669 ! real t_prof(nlevmax),qv_prof(nlevmax) … … 672 672 ! real hq_prof(nlevmax),vq_prof(nlevmax) 673 673 674 realplay(llm), plev_prof(nlev_astex)675 realt_prof(nlev_astex),thl_prof(nlev_astex),qv_prof(nlev_astex)676 realu_prof(nlev_astex),v_prof(nlev_astex), w_prof(nlev_astex)677 realo3mmr_prof(nlev_astex),ql_prof(nlev_astex)678 realqt_prof(nlev_astex),tke_prof(nlev_astex)679 680 realt_mod(llm),thl_mod(llm),qv_mod(llm)681 realu_mod(llm),v_mod(llm), w_mod(llm),tke_mod(llm)682 realo3mmr_mod(llm),ql_mod(llm),qt_mod(llm)683 684 integerl,k,k1,k2685 realfrac,frac1,frac2,fact674 REAL play(llm), plev_prof(nlev_astex) 675 REAL t_prof(nlev_astex),thl_prof(nlev_astex),qv_prof(nlev_astex) 676 REAL u_prof(nlev_astex),v_prof(nlev_astex), w_prof(nlev_astex) 677 REAL o3mmr_prof(nlev_astex),ql_prof(nlev_astex) 678 REAL qt_prof(nlev_astex),tke_prof(nlev_astex) 679 680 REAL t_mod(llm),thl_mod(llm),qv_mod(llm) 681 REAL u_mod(llm),v_mod(llm), w_mod(llm),tke_mod(llm) 682 REAL o3mmr_mod(llm),ql_mod(llm),qt_mod(llm) 683 684 INTEGER l,k,k1,k2 685 REAL frac,frac1,frac2,fact 686 686 687 687 do l = 1, llm 688 688 689 if(play(l).ge.plev_prof(nlev_astex)) THEN689 IF (play(l).ge.plev_prof(nlev_astex)) THEN 690 690 mxcalc=l 691 691 k1=0 692 692 k2=0 693 693 694 if(play(l).le.plev_prof(1)) THEN694 IF (play(l).le.plev_prof(1)) THEN 695 695 do k = 1, nlev_astex-1 696 if (play(l).le.plev_prof(k).and. play(l).gt.plev_prof(k+1)) THEN696 IF (play(l).le.plev_prof(k).AND. play(l).gt.plev_prof(k+1)) THEN 697 697 k1=k 698 698 k2=k+1 … … 700 700 enddo 701 701 702 if (k1.eq.0 .or. k2.eq.0) THEN702 IF (k1.EQ.0 .OR. k2.EQ.0) THEN 703 703 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 704 704 WRITE(*,*) 'l,play(l) = ',l,play(l)/100 … … 780 780 781 781 782 integernlev_rico783 realts_rico,ps_rico784 realt_rico(llm),q_rico(llm)785 realu_rico(llm),v_rico(llm)786 realw_rico(llm)787 realdth_dyn(llm)788 realdqh_dyn(llm)782 INTEGER nlev_rico 783 REAL ts_rico,ps_rico 784 REAL t_rico(llm),q_rico(llm) 785 REAL u_rico(llm),v_rico(llm) 786 REAL w_rico(llm) 787 REAL dth_dyn(llm) 788 REAL dqh_dyn(llm) 789 789 790 790 791 realplay(llm),zlay(llm)791 REAL play(llm),zlay(llm) 792 792 793 793 794 realprico(nlev_rico),zrico(nlev_rico)794 REAL prico(nlev_rico),zrico(nlev_rico) 795 795 796 796 character*80 fich_rico 797 797 798 integerk,l798 INTEGER k,l 799 799 800 800 … … 827 827 PRINT*,k,zlay(k) 828 828 ! U 829 IF(0 < zlay(k) . and. zlay(k) < 4000) THEN829 IF(0 < zlay(k) .AND. zlay(k) < 4000) THEN 830 830 u_rico(k)=-9.9 + (-1.9 + 9.9)*zlay(k)/4000 831 elseif(4000 < zlay(k) . and. zlay(k) < 12000) THEN831 elseif(4000 < zlay(k) .AND. zlay(k) < 12000) THEN 832 832 u_rico(k)= -1.9 + (30.0 + 1.9) / & 833 833 & (12000 - 4000) * (zlay(k) - 4000) 834 elseif(12000 < zlay(k) . and. zlay(k) < 13000) THEN834 elseif(12000 < zlay(k) .AND. zlay(k) < 13000) THEN 835 835 u_rico(k)=30.0 836 elseif(13000 < zlay(k) . and. zlay(k) < 20000) THEN836 elseif(13000 < zlay(k) .AND. zlay(k) < 20000) THEN 837 837 u_rico(k)=30.0 - (30.0) / & 838 838 & (20000 - 13000) * (zlay(k) - 13000) … … 842 842 843 843 !Q_v 844 IF(0 < zlay(k) . and. zlay(k) < 740) THEN844 IF(0 < zlay(k) .AND. zlay(k) < 740) THEN 845 845 q_rico(k)=16.0 + (13.8 - 16.0) / (740) * zlay(k) 846 elseif(740 < zlay(k) . and. zlay(k) < 3260) THEN846 elseif(740 < zlay(k) .AND. zlay(k) < 3260) THEN 847 847 q_rico(k)=13.8 + (2.4 - 13.8) / & 848 848 & (3260 - 740) * (zlay(k) - 740) 849 elseif(3260 < zlay(k) . and. zlay(k) < 4000) THEN849 elseif(3260 < zlay(k) .AND. zlay(k) < 4000) THEN 850 850 q_rico(k)=2.4 + (1.8 - 2.4) / & 851 851 & (4000 - 3260) * (zlay(k) - 3260) 852 elseif(4000 < zlay(k) . and. zlay(k) < 9000) THEN852 elseif(4000 < zlay(k) .AND. zlay(k) < 9000) THEN 853 853 q_rico(k)=1.8 + (0 - 1.8) / & 854 854 & (9000 - 4000) * (zlay(k) - 4000) … … 858 858 859 859 !T 860 IF(0 < zlay(k) . and. zlay(k) < 740) THEN860 IF(0 < zlay(k) .AND. zlay(k) < 740) THEN 861 861 t_rico(k)=299.2 + (292.0 - 299.2) / (740) * zlay(k) 862 elseif(740 < zlay(k) . and. zlay(k) < 4000) THEN862 elseif(740 < zlay(k) .AND. zlay(k) < 4000) THEN 863 863 t_rico(k)=292.0 + (278.0 - 292.0) / & 864 864 & (4000 - 740) * (zlay(k) - 740) 865 elseif(4000 < zlay(k) . and. zlay(k) < 15000) THEN865 elseif(4000 < zlay(k) .AND. zlay(k) < 15000) THEN 866 866 t_rico(k)=278.0 + (203.0 - 278.0) / & 867 867 & (15000 - 4000) * (zlay(k) - 4000) 868 elseif(15000 < zlay(k) . and. zlay(k) < 17500) THEN868 elseif(15000 < zlay(k) .AND. zlay(k) < 17500) THEN 869 869 t_rico(k)=203.0 + (194.0 - 203.0) / & 870 870 & (17500 - 15000)* (zlay(k) - 15000) 871 elseif(17500 < zlay(k) . and. zlay(k) < 20000) THEN871 elseif(17500 < zlay(k) .AND. zlay(k) < 20000) THEN 872 872 t_rico(k)=194.0 + (206.0 - 194.0) / & 873 873 & (20000 - 17500)* (zlay(k) - 17500) 874 elseif(20000 < zlay(k) . and. zlay(k) < 60000) THEN874 elseif(20000 < zlay(k) .AND. zlay(k) < 60000) THEN 875 875 t_rico(k)=206.0 + (270.0 - 206.0) / & 876 876 & (60000 - 20000)* (zlay(k) - 20000) … … 878 878 879 879 ! W 880 IF(0 < zlay(k) . and. zlay(k) < 2260 ) THEN880 IF(0 < zlay(k) .AND. zlay(k) < 2260 ) THEN 881 881 w_rico(k)=- (0.005/2260) * zlay(k) 882 elseif(2260 < zlay(k) . and. zlay(k) < 4000 ) THEN882 elseif(2260 < zlay(k) .AND. zlay(k) < 4000 ) THEN 883 883 w_rico(k)=- 0.005 884 elseif(4000 < zlay(k) . and. zlay(k) < 5000 ) THEN884 elseif(4000 < zlay(k) .AND. zlay(k) < 5000 ) THEN 885 885 w_rico(k)=- 0.005 + (0.005/ (5000 - 4000)) * (zlay(k) - 4000) 886 886 else … … 889 889 890 890 ! dThrz+dTsw0+dTlw0 891 IF(0 < zlay(k) . and. zlay(k) < 4000) THEN891 IF(0 < zlay(k) .AND. zlay(k) < 4000) THEN 892 892 dth_dyn(k)=- 2.51 / 86400 + (-2.18 + 2.51 )/ & 893 893 & (86400*4000) * zlay(k) 894 elseif(4000 < zlay(k) . and. zlay(k) < 5000) THEN894 elseif(4000 < zlay(k) .AND. zlay(k) < 5000) THEN 895 895 dth_dyn(k)=- 2.18 / 86400 + ( 2.18 ) / & 896 896 & (86400*(5000 - 4000)) * (zlay(k) - 4000) … … 899 899 endif 900 900 ! dQhrz 901 IF(0 < zlay(k) . and. zlay(k) < 3000) THEN901 IF(0 < zlay(k) .AND. zlay(k) < 3000) THEN 902 902 dqh_dyn(k)=-1.0 / 86400 + (0.345 + 1.0)/ & 903 903 & (86400*3000) * (zlay(k)) 904 elseif(3000 < zlay(k) . and. zlay(k) < 4000) THEN904 elseif(3000 < zlay(k) .AND. zlay(k) < 4000) THEN 905 905 dqh_dyn(k)=0.345 / 86400 906 elseif(4000 < zlay(k) . and. zlay(k) < 5000) THEN906 elseif(4000 < zlay(k) .AND. zlay(k) < 5000) THEN 907 907 dqh_dyn(k)=0.345 / 86400 + & 908 908 & (-0.345)/(86400 * (5000 - 4000)) * (zlay(k)-4000) … … 913 913 !? IF(play(k)>6e4) THEN 914 914 !? ratqs0(1,k)=ratqsbas*(plev(1)-play(k))/(plev(1)-6e4) 915 !? elseif((play(k)>3e4). and.(play(k)<6e4)) THEN915 !? elseif((play(k)>3e4).AND.(play(k)<6e4)) THEN 916 916 !? ratqs0(1,k)=ratqsbas+(ratqshaut-ratqsbas)& 917 917 !? *(6e4-play(k))/(6e4-3e4) … … 946 946 !--------------------------------------------------------------------------------------- 947 947 ! inputs: 948 integerannee_ref949 integernt_sandu,nlev_sandu950 integeryear_ini_sandu951 realday, day1,day_ini_sandu,dt_sandu952 realts_sandu(nt_sandu)948 INTEGER annee_ref 949 INTEGER nt_sandu,nlev_sandu 950 INTEGER year_ini_sandu 951 REAL day, day1,day_ini_sandu,dt_sandu 952 REAL ts_sandu(nt_sandu) 953 953 ! outputs: 954 realts_prof954 REAL ts_prof 955 955 ! local: 956 integerit_sandu1, it_sandu2957 realtimeit,time_sandu1,time_sandu2,frac956 INTEGER it_sandu1, it_sandu2 957 REAL timeit,time_sandu1,time_sandu2,frac 958 958 ! Check that initial day of the simulation consistent with SANDU period: 959 if (annee_ref.ne.2006 ) THEN959 IF (annee_ref.NE.2006 ) THEN 960 960 PRINT*,'Pour SANDUREF, annee_ref doit etre 2006 ' 961 961 PRINT*,'Changer annee_ref dans run.def' 962 962 stop 963 963 endif 964 ! if (annee_ref. eq.2006 .and. day1.lt.day_ini_sandu) THEN964 ! if (annee_ref.EQ.2006 .AND. day1.lt.day_ini_sandu) THEN 965 965 ! PRINT*,'SANDUREF debute le 15 Juillet 2006 (jour julien=196)' 966 966 ! PRINT*,'Changer dayref dans run.def' … … 970 970 ! Determine timestep relative to the 1st day of TOGA-COARE: 971 971 ! timeit=(day-day1)*86400. 972 ! if (annee_ref. eq.1992) THEN972 ! if (annee_ref.EQ.1992) THEN 973 973 ! timeit=(day-day_ini_sandu)*86400. 974 974 ! else … … 986 986 & it_sandu1,it_sandu2,time_sandu1,time_sandu2 987 987 988 if(it_sandu1 .ge. nt_sandu) THEN988 IF (it_sandu1 .ge. nt_sandu) THEN 989 989 WRITE(*,*) 'PB-stop: day, it_sandu1, it_sandu2, timeit: ' & 990 990 & ,day,it_sandu1,it_sandu2,timeit/86400. … … 1016 1016 !------------------------------------------------------------------------- 1017 1017 1018 integernlev_armcu,nt_armcu1019 realsens(nt_armcu),flat(nt_armcu)1020 realadv_theta(nt_armcu),rad_theta(nt_armcu),adv_qt(nt_armcu)1018 INTEGER nlev_armcu,nt_armcu 1019 REAL sens(nt_armcu),flat(nt_armcu) 1020 REAL adv_theta(nt_armcu),rad_theta(nt_armcu),adv_qt(nt_armcu) 1021 1021 character*80 fich_armcu 1022 1022 1023 integerip1024 1025 integeriy,im,id,ih,in1023 INTEGER ip 1024 1025 INTEGER iy,im,id,ih,in 1026 1026 1027 1027 PRINT*,'nlev_armcu',nlev_armcu … … 1059 1059 !------------------------------------------------------------------------- 1060 1060 1061 integernlevmax1061 INTEGER nlevmax 1062 1062 parameter (nlevmax=41) 1063 integernlev_toga,mxcalc1063 INTEGER nlev_toga,mxcalc 1064 1064 ! real play(llm), plev_prof(nlevmax) 1065 1065 ! real t_prof(nlevmax),q_prof(nlevmax) … … 1068 1068 ! real hq_prof(nlevmax),vq_prof(nlevmax) 1069 1069 1070 real play(llm), plev_prof(nlev_toga)1071 realt_prof(nlev_toga),q_prof(nlev_toga)1072 realu_prof(nlev_toga),v_prof(nlev_toga), w_prof(nlev_toga)1073 realht_prof(nlev_toga),vt_prof(nlev_toga)1074 realhq_prof(nlev_toga),vq_prof(nlev_toga)1075 1076 realt_mod(llm),q_mod(llm)1077 realu_mod(llm),v_mod(llm), w_mod(llm)1078 realht_mod(llm),vt_mod(llm)1079 realhq_mod(llm),vq_mod(llm)1080 1081 integerl,k,k1,k21082 realfrac,frac1,frac2,fact1070 REAL play(llm), plev_prof(nlev_toga) 1071 REAL t_prof(nlev_toga),q_prof(nlev_toga) 1072 REAL u_prof(nlev_toga),v_prof(nlev_toga), w_prof(nlev_toga) 1073 REAL ht_prof(nlev_toga),vt_prof(nlev_toga) 1074 REAL hq_prof(nlev_toga),vq_prof(nlev_toga) 1075 1076 REAL t_mod(llm),q_mod(llm) 1077 REAL u_mod(llm),v_mod(llm), w_mod(llm) 1078 REAL ht_mod(llm),vt_mod(llm) 1079 REAL hq_mod(llm),vq_mod(llm) 1080 1081 INTEGER l,k,k1,k2 1082 REAL frac,frac1,frac2,fact 1083 1083 1084 1084 do l = 1, llm 1085 1085 1086 if(play(l).ge.plev_prof(nlev_toga)) THEN1086 IF (play(l).ge.plev_prof(nlev_toga)) THEN 1087 1087 mxcalc=l 1088 1088 k1=0 1089 1089 k2=0 1090 1090 1091 if(play(l).le.plev_prof(1)) THEN1091 IF (play(l).le.plev_prof(1)) THEN 1092 1092 do k = 1, nlev_toga-1 1093 if (play(l).le.plev_prof(k).and. play(l).gt.plev_prof(k+1)) THEN1093 IF (play(l).le.plev_prof(k).AND. play(l).gt.plev_prof(k+1)) THEN 1094 1094 k1=k 1095 1095 k2=k+1 … … 1097 1097 enddo 1098 1098 1099 if (k1.eq.0 .or. k2.eq.0) THEN1099 IF (k1.EQ.0 .OR. k2.EQ.0) THEN 1100 1100 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 1101 1101 WRITE(*,*) 'l,play(l) = ',l,play(l)/100 … … 1179 1179 !------------------------------------------------------------------------- 1180 1180 1181 integernlevmax1181 INTEGER nlevmax 1182 1182 parameter (nlevmax=41) 1183 integernlev_cas,mxcalc1183 INTEGER nlev_cas,mxcalc 1184 1184 ! real play(llm), plev_prof(nlevmax) 1185 1185 ! real t_prof(nlevmax),q_prof(nlevmax) … … 1188 1188 ! real hq_prof(nlevmax),vq_prof(nlevmax) 1189 1189 1190 real play(llm), plev_prof_cas(nlev_cas)1191 realt_prof_cas(nlev_cas),q_prof_cas(nlev_cas)1192 realu_prof_cas(nlev_cas),v_prof_cas(nlev_cas)1193 realug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas)1194 realdu_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)1195 realdv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)1196 realdt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas),dtrad_prof_cas(nlev_cas)1197 realdq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)1198 1199 realt_mod_cas(llm),q_mod_cas(llm)1200 realu_mod_cas(llm),v_mod_cas(llm)1201 realug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm)1202 realdu_mod_cas(llm),hu_mod_cas(llm),vu_mod_cas(llm)1203 realdv_mod_cas(llm),hv_mod_cas(llm),vv_mod_cas(llm)1204 realdt_mod_cas(llm),ht_mod_cas(llm),vt_mod_cas(llm),dtrad_mod_cas(llm)1205 realdq_mod_cas(llm),hq_mod_cas(llm),vq_mod_cas(llm)1206 1207 integerl,k,k1,k21208 realfrac,frac1,frac2,fact1190 REAL play(llm), plev_prof_cas(nlev_cas) 1191 REAL t_prof_cas(nlev_cas),q_prof_cas(nlev_cas) 1192 REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 1193 REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas) 1194 REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 1195 REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) 1196 REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas),dtrad_prof_cas(nlev_cas) 1197 REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 1198 1199 REAL t_mod_cas(llm),q_mod_cas(llm) 1200 REAL u_mod_cas(llm),v_mod_cas(llm) 1201 REAL ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm) 1202 REAL du_mod_cas(llm),hu_mod_cas(llm),vu_mod_cas(llm) 1203 REAL dv_mod_cas(llm),hv_mod_cas(llm),vv_mod_cas(llm) 1204 REAL dt_mod_cas(llm),ht_mod_cas(llm),vt_mod_cas(llm),dtrad_mod_cas(llm) 1205 REAL dq_mod_cas(llm),hq_mod_cas(llm),vq_mod_cas(llm) 1206 1207 INTEGER l,k,k1,k2 1208 REAL frac,frac1,frac2,fact 1209 1209 1210 1210 do l = 1, llm 1211 1211 1212 if(play(l).ge.plev_prof_cas(nlev_cas)) THEN1212 IF (play(l).ge.plev_prof_cas(nlev_cas)) THEN 1213 1213 mxcalc=l 1214 1214 k1=0 1215 1215 k2=0 1216 1216 1217 if(play(l).le.plev_prof_cas(1)) THEN1217 IF (play(l).le.plev_prof_cas(1)) THEN 1218 1218 do k = 1, nlev_cas-1 1219 if (play(l).le.plev_prof_cas(k).and. play(l).gt.plev_prof_cas(k+1)) THEN1219 IF (play(l).le.plev_prof_cas(k).AND. play(l).gt.plev_prof_cas(k+1)) THEN 1220 1220 k1=k 1221 1221 k2=k+1 … … 1223 1223 enddo 1224 1224 1225 if (k1.eq.0 .or. k2.eq.0) THEN1225 IF (k1.EQ.0 .OR. k2.EQ.0) THEN 1226 1226 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 1227 1227 WRITE(*,*) 'l,play(l) = ',l,play(l)/100 … … 1336 1336 !------------------------------------------------------------------------- 1337 1337 1338 integernlevmax1338 INTEGER nlevmax 1339 1339 parameter (nlevmax=41) 1340 integernlev_dice,mxcalc,nt_dice1341 1342 real play(llm), plev_prof(nlev_dice)1343 realth_prof(nlev_dice),qv_prof(nlev_dice)1344 real u_prof(nlev_dice),v_prof(nlev_dice)1345 realo3_prof(nlev_dice)1346 realht_prof(nlev_dice),hq_prof(nlev_dice)1347 realhu_prof(nlev_dice),hv_prof(nlev_dice)1348 realw_prof(nlev_dice),omega_prof(nlev_dice)1349 1350 realth_mod(llm),qv_mod(llm)1351 realu_mod(llm),v_mod(llm), o3_mod(llm)1352 realht_mod(llm),hq_mod(llm)1353 realhu_mod(llm),hv_mod(llm),w_mod(llm),omega_mod(llm)1354 1355 integerl,k,k1,k2,kp1356 realaa,frac,frac1,frac2,fact1340 INTEGER nlev_dice,mxcalc,nt_dice 1341 1342 REAL play(llm), plev_prof(nlev_dice) 1343 REAL th_prof(nlev_dice),qv_prof(nlev_dice) 1344 REAL u_prof(nlev_dice),v_prof(nlev_dice) 1345 REAL o3_prof(nlev_dice) 1346 REAL ht_prof(nlev_dice),hq_prof(nlev_dice) 1347 REAL hu_prof(nlev_dice),hv_prof(nlev_dice) 1348 REAL w_prof(nlev_dice),omega_prof(nlev_dice) 1349 1350 REAL th_mod(llm),qv_mod(llm) 1351 REAL u_mod(llm),v_mod(llm), o3_mod(llm) 1352 REAL ht_mod(llm),hq_mod(llm) 1353 REAL hu_mod(llm),hv_mod(llm),w_mod(llm),omega_mod(llm) 1354 1355 INTEGER l,k,k1,k2,kp 1356 REAL aa,frac,frac1,frac2,fact 1357 1357 1358 1358 do l = 1, llm 1359 1359 1360 if(play(l).ge.plev_prof(nlev_dice)) THEN1360 IF (play(l).ge.plev_prof(nlev_dice)) THEN 1361 1361 mxcalc=l 1362 1362 k1=0 1363 1363 k2=0 1364 1364 1365 if(play(l).le.plev_prof(1)) THEN1365 IF (play(l).le.plev_prof(1)) THEN 1366 1366 do k = 1, nlev_dice-1 1367 if (play(l).le.plev_prof(k) .and. play(l).gt.plev_prof(k+1)) THEN1367 IF (play(l).le.plev_prof(k) .AND. play(l).gt.plev_prof(k+1)) THEN 1368 1368 k1=k 1369 1369 k2=k+1 … … 1371 1371 enddo 1372 1372 1373 if (k1.eq.0 .or. k2.eq.0) THEN1373 IF (k1.EQ.0 .OR. k2.EQ.0) THEN 1374 1374 WRITE(*,*) 'PB! k1, k2 = ',k1,k2 1375 1375 WRITE(*,*) 'l,play(l) = ',l,play(l)/100 … … 1460 1460 1461 1461 ! inputs: 1462 integerannee_ref1463 integernt_astex,nlev_astex1464 integeryear_ini_astex1465 realday, day1,day_ini_astex,dt_astex1466 realdiv_astex(nt_astex),ts_astex(nt_astex),ug_astex(nt_astex)1467 realvg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex)1462 INTEGER annee_ref 1463 INTEGER nt_astex,nlev_astex 1464 INTEGER year_ini_astex 1465 REAL day, day1,day_ini_astex,dt_astex 1466 REAL div_astex(nt_astex),ts_astex(nt_astex),ug_astex(nt_astex) 1467 REAL vg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex) 1468 1468 ! outputs: 1469 realdiv_prof,ts_prof,ug_prof,vg_prof,ufa_prof,vfa_prof1469 REAL div_prof,ts_prof,ug_prof,vg_prof,ufa_prof,vfa_prof 1470 1470 ! local: 1471 integerit_astex1, it_astex21472 realtimeit,time_astex1,time_astex2,frac1471 INTEGER it_astex1, it_astex2 1472 REAL timeit,time_astex1,time_astex2,frac 1473 1473 1474 1474 ! Check that initial day of the simulation consistent with ASTEX period: 1475 if (annee_ref.ne.1992 ) THEN1475 IF (annee_ref.NE.1992 ) THEN 1476 1476 PRINT*,'Pour Astex, annee_ref doit etre 1992 ' 1477 1477 PRINT*,'Changer annee_ref dans run.def' 1478 1478 stop 1479 1479 endif 1480 if (annee_ref.eq.1992 .and. day1.lt.day_ini_astex) THEN1480 IF (annee_ref.EQ.1992 .AND. day1.lt.day_ini_astex) THEN 1481 1481 PRINT*,'Astex debute le 13 Juin 1992 (jour julien=165)' 1482 1482 PRINT*,'Changer dayref dans run.def' … … 1486 1486 ! Determine timestep relative to the 1st day of TOGA-COARE: 1487 1487 ! timeit=(day-day1)*86400. 1488 ! if (annee_ref. eq.1992) THEN1488 ! if (annee_ref.EQ.1992) THEN 1489 1489 ! timeit=(day-day_ini_astex)*86400. 1490 1490 ! else … … 1502 1502 & it_astex1,it_astex2,time_astex1,time_astex2 1503 1503 1504 if(it_astex1 .ge. nt_astex) THEN1504 IF (it_astex1 .ge. nt_astex) THEN 1505 1505 WRITE(*,*) 'PB-stop: day, it_astex1, it_astex2, timeit: ' & 1506 1506 & ,day,it_astex1,it_astex2,timeit/86400. … … 1554 1554 1555 1555 ! inputs: 1556 integerannee_ref1557 integernt_toga,nlev_toga1558 integeryear_ini_toga1559 realday, day1,day_ini_toga,dt_toga1560 realts_toga(nt_toga)1561 realplev_toga(nlev_toga,nt_toga),t_toga(nlev_toga,nt_toga)1562 realq_toga(nlev_toga,nt_toga),u_toga(nlev_toga,nt_toga)1563 realv_toga(nlev_toga,nt_toga),w_toga(nlev_toga,nt_toga)1564 realht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga)1565 realhq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga)1556 INTEGER annee_ref 1557 INTEGER nt_toga,nlev_toga 1558 INTEGER year_ini_toga 1559 REAL day, day1,day_ini_toga,dt_toga 1560 REAL ts_toga(nt_toga) 1561 REAL plev_toga(nlev_toga,nt_toga),t_toga(nlev_toga,nt_toga) 1562 REAL q_toga(nlev_toga,nt_toga),u_toga(nlev_toga,nt_toga) 1563 REAL v_toga(nlev_toga,nt_toga),w_toga(nlev_toga,nt_toga) 1564 REAL ht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga) 1565 REAL hq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga) 1566 1566 ! outputs: 1567 realts_prof1568 realplev_prof(nlev_toga),t_prof(nlev_toga)1569 realq_prof(nlev_toga),u_prof(nlev_toga)1570 realv_prof(nlev_toga),w_prof(nlev_toga)1571 realht_prof(nlev_toga),vt_prof(nlev_toga)1572 realhq_prof(nlev_toga),vq_prof(nlev_toga)1567 REAL ts_prof 1568 REAL plev_prof(nlev_toga),t_prof(nlev_toga) 1569 REAL q_prof(nlev_toga),u_prof(nlev_toga) 1570 REAL v_prof(nlev_toga),w_prof(nlev_toga) 1571 REAL ht_prof(nlev_toga),vt_prof(nlev_toga) 1572 REAL hq_prof(nlev_toga),vq_prof(nlev_toga) 1573 1573 ! local: 1574 integerit_toga1, it_toga2,k1575 realtimeit,time_toga1,time_toga2,frac1576 1577 1578 if (forcing_type.eq.2) THEN1574 INTEGER it_toga1, it_toga2,k 1575 REAL timeit,time_toga1,time_toga2,frac 1576 1577 1578 IF (forcing_type.EQ.2) THEN 1579 1579 ! Check that initial day of the simulation consistent with TOGA-COARE period: 1580 if (annee_ref.ne.1992 .and. annee_ref.ne.1993) THEN1580 IF (annee_ref.NE.1992 .AND. annee_ref.NE.1993) THEN 1581 1581 PRINT*,'Pour TOGA-COARE, annee_ref doit etre 1992 ou 1993' 1582 1582 PRINT*,'Changer annee_ref dans run.def' 1583 1583 stop 1584 1584 endif 1585 if (annee_ref.eq.1992 .and. day1.lt.day_ini_toga) THEN1585 IF (annee_ref.EQ.1992 .AND. day1.lt.day_ini_toga) THEN 1586 1586 PRINT*,'TOGA-COARE a debute le 1er Nov 1992 (jour julien=306)' 1587 1587 PRINT*,'Changer dayref dans run.def' 1588 1588 stop 1589 1589 endif 1590 if (annee_ref.eq.1993 .and. day1.gt.day_ini_toga+119) THEN1590 IF (annee_ref.EQ.1993 .AND. day1.gt.day_ini_toga+119) THEN 1591 1591 PRINT*,'TOGA-COARE a fini le 28 Feb 1993 (jour julien=59)' 1592 1592 PRINT*,'Changer dayref ou nday dans run.def' … … 1594 1594 endif 1595 1595 1596 else if (forcing_type.eq.4) THEN1596 ELSE IF (forcing_type.EQ.4) THEN 1597 1597 ! Check that initial day of the simulation consistent with TWP-ICE period: 1598 if (annee_ref.ne.2006) THEN1598 IF (annee_ref.NE.2006) THEN 1599 1599 PRINT*,'Pour TWP-ICE, annee_ref doit etre 2006' 1600 1600 PRINT*,'Changer annee_ref dans run.def' 1601 1601 stop 1602 1602 endif 1603 if (annee_ref.eq.2006 .and. day1.lt.day_ini_toga) THEN1603 IF (annee_ref.EQ.2006 .AND. day1.lt.day_ini_toga) THEN 1604 1604 PRINT*,'TWP-ICE a debute le 17 Jan 2006 (jour julien=17)' 1605 1605 PRINT*,'Changer dayref dans run.def' 1606 1606 stop 1607 1607 endif 1608 if (annee_ref.eq.2006 .and. day1.gt.day_ini_toga+26) THEN1608 IF (annee_ref.EQ.2006 .AND. day1.gt.day_ini_toga+26) THEN 1609 1609 PRINT*,'TWP-ICE a fini le 12 Feb 2006 (jour julien=43)' 1610 1610 PRINT*,'Changer dayref ou nday dans run.def' … … 1616 1616 ! Determine timestep relative to the 1st day of TOGA-COARE: 1617 1617 ! timeit=(day-day1)*86400. 1618 ! if (annee_ref. eq.1992) THEN1618 ! if (annee_ref.EQ.1992) THEN 1619 1619 ! timeit=(day-day_ini_toga)*86400. 1620 1620 ! else … … 1629 1629 time_toga2=(it_toga2-1)*dt_toga 1630 1630 1631 if(it_toga1 .ge. nt_toga) THEN1631 IF (it_toga1 .ge. nt_toga) THEN 1632 1632 WRITE(*,*) 'PB-stop: day, it_toga1, it_toga2, timeit: ' & 1633 1633 & ,day,it_toga1,it_toga2,timeit/86400. … … 1695 1695 1696 1696 ! inputs: 1697 integerannee_ref1698 integernt_dice,nlev_dice1699 integeryear_ini_dice1700 realday, day1,day_ini_dice,dt_dice1701 realshf_dice(nt_dice),lhf_dice(nt_dice),lwup_dice(nt_dice)1702 realswup_dice(nt_dice),tg_dice(nt_dice),ustar_dice(nt_dice)1703 realpsurf_dice(nt_dice),ug_dice(nt_dice),vg_dice(nt_dice)1704 realht_dice(nlev_dice,nt_dice),hq_dice(nlev_dice,nt_dice)1705 realhu_dice(nlev_dice,nt_dice),hv_dice(nlev_dice,nt_dice)1706 realw_dice(nlev_dice,nt_dice),omega_dice(nlev_dice,nt_dice)1697 INTEGER annee_ref 1698 INTEGER nt_dice,nlev_dice 1699 INTEGER year_ini_dice 1700 REAL day, day1,day_ini_dice,dt_dice 1701 REAL shf_dice(nt_dice),lhf_dice(nt_dice),lwup_dice(nt_dice) 1702 REAL swup_dice(nt_dice),tg_dice(nt_dice),ustar_dice(nt_dice) 1703 REAL psurf_dice(nt_dice),ug_dice(nt_dice),vg_dice(nt_dice) 1704 REAL ht_dice(nlev_dice,nt_dice),hq_dice(nlev_dice,nt_dice) 1705 REAL hu_dice(nlev_dice,nt_dice),hv_dice(nlev_dice,nt_dice) 1706 REAL w_dice(nlev_dice,nt_dice),omega_dice(nlev_dice,nt_dice) 1707 1707 ! outputs: 1708 realtg_prof,shf_prof,lhf_prof,lwup_prof,swup_prof1709 realustar_prof,psurf_prof,ug_prof,vg_prof1710 realht_prof(nlev_dice),hq_prof(nlev_dice)1711 realhu_prof(nlev_dice),hv_prof(nlev_dice)1712 realw_prof(nlev_dice),omega_prof(nlev_dice)1708 REAL tg_prof,shf_prof,lhf_prof,lwup_prof,swup_prof 1709 REAL ustar_prof,psurf_prof,ug_prof,vg_prof 1710 REAL ht_prof(nlev_dice),hq_prof(nlev_dice) 1711 REAL hu_prof(nlev_dice),hv_prof(nlev_dice) 1712 REAL w_prof(nlev_dice),omega_prof(nlev_dice) 1713 1713 ! local: 1714 integerit_dice1, it_dice2,k1715 realtimeit,time_dice1,time_dice2,frac1716 1717 1718 if (forcing_type.eq.7) THEN1714 INTEGER it_dice1, it_dice2,k 1715 REAL timeit,time_dice1,time_dice2,frac 1716 1717 1718 IF (forcing_type.EQ.7) THEN 1719 1719 ! Check that initial day of the simulation consistent with Dice period: 1720 1720 print *,'annee_ref=',annee_ref 1721 1721 print *,'day1=',day1 1722 1722 print *,'day_ini_dice=',day_ini_dice 1723 if (annee_ref.ne.1999) THEN1723 IF (annee_ref.NE.1999) THEN 1724 1724 PRINT*,'Pour Dice, annee_ref doit etre 1999' 1725 1725 PRINT*,'Changer annee_ref dans run.def' 1726 1726 stop 1727 1727 endif 1728 if (annee_ref.eq.1999 .and. day1.gt.day_ini_dice) THEN1728 IF (annee_ref.EQ.1999 .AND. day1.gt.day_ini_dice) THEN 1729 1729 PRINT*,'Dice a debute le 23 Oct 1999 (jour julien=296)' 1730 1730 PRINT*,'Changer dayref dans run.def',day1,day_ini_dice 1731 1731 stop 1732 1732 endif 1733 if (annee_ref.eq.1999 .and. day1.gt.day_ini_dice+2) THEN1733 IF (annee_ref.EQ.1999 .AND. day1.gt.day_ini_dice+2) THEN 1734 1734 PRINT*,'Dice a fini le 25 Oct 1999 (jour julien=298)' 1735 1735 PRINT*,'Changer dayref ou nday dans run.def',day1,day_ini_dice … … 1741 1741 ! Determine timestep relative to the 1st day of TOGA-COARE: 1742 1742 ! timeit=(day-day1)*86400. 1743 ! if (annee_ref. eq.1992) THEN1743 ! if (annee_ref.EQ.1992) THEN 1744 1744 ! timeit=(day-day_ini_dice)*86400. 1745 1745 ! else … … 1754 1754 time_dice2=(it_dice2-1)*dt_dice 1755 1755 1756 if(it_dice1 .ge. nt_dice) THEN1756 IF (it_dice1 .ge. nt_dice) THEN 1757 1757 WRITE(*,*) 'PB-stop: day, it_dice1, it_dice2, timeit: ',day,it_dice1,it_dice2,timeit/86400. 1758 1758 stop … … 1808 1808 1809 1809 ! inputs: 1810 integerannee_ref1811 integernt_gabls4,nlev_gabls41812 integeryear_ini_gabls41813 realday, day1,day_ini_gabls4,dt_gabls41814 realug_gabls4(nlev_gabls4,nt_gabls4),vg_gabls4(nlev_gabls4,nt_gabls4)1815 realht_gabls4(nlev_gabls4,nt_gabls4),hq_gabls4(nlev_gabls4,nt_gabls4)1816 realtg_gabls4(nt_gabls4), tg_prof1810 INTEGER annee_ref 1811 INTEGER nt_gabls4,nlev_gabls4 1812 INTEGER year_ini_gabls4 1813 REAL day, day1,day_ini_gabls4,dt_gabls4 1814 REAL ug_gabls4(nlev_gabls4,nt_gabls4),vg_gabls4(nlev_gabls4,nt_gabls4) 1815 REAL ht_gabls4(nlev_gabls4,nt_gabls4),hq_gabls4(nlev_gabls4,nt_gabls4) 1816 REAL tg_gabls4(nt_gabls4), tg_prof 1817 1817 ! outputs: 1818 realug_prof(nlev_gabls4),vg_prof(nlev_gabls4)1819 realht_prof(nlev_gabls4),hq_prof(nlev_gabls4)1818 REAL ug_prof(nlev_gabls4),vg_prof(nlev_gabls4) 1819 REAL ht_prof(nlev_gabls4),hq_prof(nlev_gabls4) 1820 1820 ! local: 1821 integerit_gabls41, it_gabls42,k1822 realtimeit,time_gabls41,time_gabls42,frac1821 INTEGER it_gabls41, it_gabls42,k 1822 REAL timeit,time_gabls41,time_gabls42,frac 1823 1823 1824 1824 1825 1825 1826 1826 ! Check that initial day of the simulation consistent with gabls4 period: 1827 if (forcing_type.eq.8 ) THEN1827 IF (forcing_type.EQ.8 ) THEN 1828 1828 print *,'annee_ref=',annee_ref 1829 1829 print *,'day1=',day1 1830 1830 print *,'day_ini_gabls4=',day_ini_gabls4 1831 if (annee_ref.ne.2009) THEN1831 IF (annee_ref.NE.2009) THEN 1832 1832 PRINT*,'Pour gabls4, annee_ref doit etre 2009' 1833 1833 PRINT*,'Changer annee_ref dans run.def' 1834 1834 stop 1835 1835 endif 1836 if (annee_ref.eq.2009 .and. day1.gt.day_ini_gabls4) THEN1836 IF (annee_ref.EQ.2009 .AND. day1.gt.day_ini_gabls4) THEN 1837 1837 PRINT*,'gabls4 a debute le 11 dec 2009 (jour julien=345)' 1838 1838 PRINT*,'Changer dayref dans run.def',day1,day_ini_gabls4 1839 1839 stop 1840 1840 endif 1841 if (annee_ref.eq.2009 .and. day1.gt.day_ini_gabls4+2) THEN1841 IF (annee_ref.EQ.2009 .AND. day1.gt.day_ini_gabls4+2) THEN 1842 1842 PRINT*,'gabls4 a fini le 12 dec 2009 (jour julien=346)' 1843 1843 PRINT*,'Changer dayref ou nday dans run.def',day1,day_ini_gabls4 … … 1856 1856 time_gabls42=(it_gabls42-1)*dt_gabls4 1857 1857 1858 if(it_gabls41 .ge. nt_gabls4) THEN1858 IF (it_gabls41 .ge. nt_gabls4) THEN 1859 1859 WRITE(*,*) 'PB-stop: day, it_gabls41, it_gabls42, timeit: ',day,it_gabls41,it_gabls42,timeit/86400. 1860 1860 stop … … 1896 1896 1897 1897 ! inputs: 1898 integerannee_ref1899 integernt_armcu,nlev_armcu1900 integeryear_ini_armcu1901 realday, day1,day_ini_armcu,dt_armcu1902 realfs_armcu(nt_armcu),fl_armcu(nt_armcu),at_armcu(nt_armcu)1903 realrt_armcu(nt_armcu),aqt_armcu(nt_armcu)1898 INTEGER annee_ref 1899 INTEGER nt_armcu,nlev_armcu 1900 INTEGER year_ini_armcu 1901 REAL day, day1,day_ini_armcu,dt_armcu 1902 REAL fs_armcu(nt_armcu),fl_armcu(nt_armcu),at_armcu(nt_armcu) 1903 REAL rt_armcu(nt_armcu),aqt_armcu(nt_armcu) 1904 1904 ! outputs: 1905 realfs_prof,fl_prof,at_prof,rt_prof,aqt_prof1905 REAL fs_prof,fl_prof,at_prof,rt_prof,aqt_prof 1906 1906 ! local: 1907 integerit_armcu1, it_armcu2,k1908 realtimeit,time_armcu1,time_armcu2,frac1907 INTEGER it_armcu1, it_armcu2,k 1908 REAL timeit,time_armcu1,time_armcu2,frac 1909 1909 1910 1910 ! Check that initial day of the simulation consistent with ARMCU period: 1911 if (annee_ref.ne.1997 ) THEN1911 IF (annee_ref.NE.1997 ) THEN 1912 1912 PRINT*,'Pour ARMCU, annee_ref doit etre 1997 ' 1913 1913 PRINT*,'Changer annee_ref dans run.def' … … 1926 1926 & it_armcu1,it_armcu2,time_armcu1,time_armcu2 1927 1927 1928 if(it_armcu1 .ge. nt_armcu) THEN1928 IF (it_armcu1 .ge. nt_armcu) THEN 1929 1929 WRITE(*,*) 'PB-stop: day, it_armcu1, it_armcu2, timeit: ' & 1930 1930 & ,day,it_armcu1,it_armcu2,timeit/86400. … … 1963 1963 IMPLICIT NONE 1964 1964 1965 integernlev_max,kmax,kmax2,ntrac1966 logical:: llesread = .TRUE.1967 1968 realheight(nlev_max),thlprof(nlev_max),qtprof(nlev_max), &1965 INTEGER nlev_max,kmax,kmax2,ntrac 1966 LOGICAL :: llesread = .TRUE. 1967 1968 REAL height(nlev_max),thlprof(nlev_max),qtprof(nlev_max), & 1969 1969 & uprof(nlev_max),vprof(nlev_max),e12prof(nlev_max), & 1970 1970 & ugprof(nlev_max),vgprof(nlev_max),wfls(nlev_max), & … … 1972 1972 & thlpcar(nlev_max),tracer(nlev_max,ntrac) 1973 1973 1974 realheight1(nlev_max)1975 1976 integer, parameter :: ilesfile=11974 REAL height1(nlev_max) 1975 1976 INTEGER, parameter :: ilesfile=1 1977 1977 INTEGER :: ierr,k,itrac,nt1,nt2 1978 1978 1979 IF(. not.(llesread)) return1979 IF(.NOT.(llesread)) return 1980 1980 1981 1981 open (ilesfile,file='prof.inp.001',status='old',iostat=ierr) 1982 if(ierr /= 0) stop 'ERROR:Prof.inp does not exist'1982 IF (ierr /= 0) stop 'ERROR:Prof.inp does not exist' 1983 1983 read (ilesfile,*) kmax 1984 1984 do k=1,kmax … … 1989 1989 1990 1990 open(ilesfile,file='lscale.inp.001',status='old',iostat=ierr) 1991 if(ierr /= 0) stop 'ERROR:Lscale.inp does not exist'1991 IF (ierr /= 0) stop 'ERROR:Lscale.inp does not exist' 1992 1992 read (ilesfile,*) kmax2 1993 if (kmax .ne. kmax2) THEN1993 IF (kmax .NE. kmax2) THEN 1994 1994 print *, 'fichiers prof.inp et lscale.inp incompatibles :' 1995 1995 print *, 'nbre de niveaux : ',kmax,' et ',kmax2 … … 2001 2001 END DO 2002 2002 do k=1,kmax 2003 if (height(k) .ne. height1(k)) THEN2003 IF (height(k) .NE. height1(k)) THEN 2004 2004 print *, 'fichiers prof.inp et lscale.inp incompatibles :' 2005 2005 print *, 'les niveaux different : ',k,height1(k), height(k) … … 2010 2010 2011 2011 open(ilesfile,file='trac.inp.001',status='old',iostat=ierr) 2012 if(ierr /= 0) THEN2012 IF (ierr /= 0) THEN 2013 2013 PRINT*,'WARNING : trac.inp does not exist' 2014 2014 else 2015 2015 read (ilesfile,*) kmax2,nt1,nt2 2016 if(nt2>ntrac) THEN2016 IF (nt2>ntrac) THEN 2017 2017 stop 'Augmenter le nombre de traceurs dans traceur.def' 2018 2018 endif 2019 if (kmax .ne. kmax2) THEN2019 IF (kmax .NE. kmax2) THEN 2020 2020 print *, 'fichiers prof.inp et lscale.inp incompatibles :' 2021 2021 print *, 'nbre de niveaux : ',kmax,' et ',kmax2 … … 2036 2036 IMPLICIT NONE 2037 2037 2038 integernlev_max,kmax2039 logical:: llesread = .TRUE.2040 2041 realheight(nlev_max),pprof(nlev_max),tprof(nlev_max)2042 realthlprof(nlev_max)2043 realqprof(nlev_max),uprof(nlev_max),vprof(nlev_max)2044 realwprof(nlev_max),omega(nlev_max),o3mmr(nlev_max)2045 2046 integer, parameter :: ilesfile=12038 INTEGER nlev_max,kmax 2039 LOGICAL :: llesread = .TRUE. 2040 2041 REAL height(nlev_max),pprof(nlev_max),tprof(nlev_max) 2042 REAL thlprof(nlev_max) 2043 REAL qprof(nlev_max),uprof(nlev_max),vprof(nlev_max) 2044 REAL wprof(nlev_max),omega(nlev_max),o3mmr(nlev_max) 2045 2046 INTEGER, parameter :: ilesfile=1 2047 2047 INTEGER :: k,ierr 2048 2048 2049 IF(. not.(llesread)) return2049 IF(.NOT.(llesread)) return 2050 2050 2051 2051 open (ilesfile,file='prof.inp.001',status='old',iostat=ierr) 2052 if(ierr /= 0) stop 'ERROR:Prof.inp does not exist'2052 IF (ierr /= 0) stop 'ERROR:Prof.inp does not exist' 2053 2053 read (ilesfile,*) kmax 2054 2054 do k=1,kmax … … 2068 2068 IMPLICIT NONE 2069 2069 2070 integernlev_max,kmax2071 logical:: llesread = .TRUE.2072 2073 realheight(nlev_max),pprof(nlev_max),tprof(nlev_max), &2070 INTEGER nlev_max,kmax 2071 LOGICAL :: llesread = .TRUE. 2072 2073 REAL height(nlev_max),pprof(nlev_max),tprof(nlev_max), & 2074 2074 & thlprof(nlev_max),qlprof(nlev_max),qtprof(nlev_max), & 2075 2075 & qvprof(nlev_max),uprof(nlev_max),vprof(nlev_max), & 2076 2076 & wprof(nlev_max),tkeprof(nlev_max),o3mmr(nlev_max) 2077 2077 2078 integer, parameter :: ilesfile=12078 INTEGER, parameter :: ilesfile=1 2079 2079 INTEGER :: ierr,k 2080 2080 2081 IF(. not.(llesread)) return2081 IF(.NOT.(llesread)) return 2082 2082 2083 2083 open (ilesfile,file='prof.inp.001',status='old',iostat=ierr) 2084 if(ierr /= 0) stop 'ERROR:Prof.inp does not exist'2084 IF (ierr /= 0) stop 'ERROR:Prof.inp does not exist' 2085 2085 read (ilesfile,*) kmax 2086 2086 do k=1,kmax … … 2102 2102 IMPLICIT NONE 2103 2103 2104 integernlev_max,kmax2105 logical:: llesread = .TRUE.2106 2107 realheight(nlev_max),pprof(nlev_max),tprof(nlev_max)2108 realthetaprof(nlev_max),rvprof(nlev_max)2109 realqvprof(nlev_max),uprof(nlev_max),vprof(nlev_max)2110 realaprof(nlev_max+1),bprof(nlev_max+1)2111 2112 integer, parameter :: ilesfile=12113 integer, parameter :: ifile=22104 INTEGER nlev_max,kmax 2105 LOGICAL :: llesread = .TRUE. 2106 2107 REAL height(nlev_max),pprof(nlev_max),tprof(nlev_max) 2108 REAL thetaprof(nlev_max),rvprof(nlev_max) 2109 REAL qvprof(nlev_max),uprof(nlev_max),vprof(nlev_max) 2110 REAL aprof(nlev_max+1),bprof(nlev_max+1) 2111 2112 INTEGER, parameter :: ilesfile=1 2113 INTEGER, parameter :: ifile=2 2114 2114 INTEGER :: ierr,jtot,k 2115 2115 2116 IF(. not.(llesread)) return2116 IF(.NOT.(llesread)) return 2117 2117 2118 2118 ! Read profiles at full levels … … 2124 2124 print *,'On ouvre prof.inp.40' 2125 2125 ENDIF 2126 if(ierr /= 0) stop 'ERROR:Prof.inp does not exist'2126 IF (ierr /= 0) stop 'ERROR:Prof.inp does not exist' 2127 2127 read (ilesfile,*) kmax 2128 2128 do k=1,kmax … … 2136 2136 open (ifile,file='proh.inp.19',status='old',iostat=ierr) 2137 2137 print *,'On ouvre proh.inp.19' 2138 if(ierr /= 0) stop 'ERROR:Proh.inp.19 does not exist'2138 IF (ierr /= 0) stop 'ERROR:Proh.inp.19 does not exist' 2139 2139 ELSE 2140 2140 open (ifile,file='proh.inp.40',status='old',iostat=ierr) 2141 2141 print *,'On ouvre proh.inp.40' 2142 if(ierr /= 0) stop 'ERROR:Proh.inp.40 does not exist'2142 IF (ierr /= 0) stop 'ERROR:Proh.inp.40 does not exist' 2143 2143 ENDIF 2144 2144 read (ifile,*) kmax … … 2159 2159 2160 2160 2161 usenetcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,&2161 USE netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2162 2162 nf90_inq_dimid,nf90_inquire_dimension 2163 2163 IMPLICIT NONE 2164 2164 2165 integerntime,nlevel2165 INTEGER ntime,nlevel 2166 2166 character*80 :: fich_fire 2167 2167 real*8 zz(nlevel) … … 2174 2174 real*8 dqtdt(nlevel,ntime),thl_rad(nlevel,ntime) 2175 2175 2176 integernid, ierr2177 integernbvar3d2176 INTEGER nid, ierr 2177 INTEGER nbvar3d 2178 2178 parameter(nbvar3d=30) 2179 integervar3didin(nbvar3d)2179 INTEGER var3didin(nbvar3d) 2180 2180 2181 2181 ierr = nf90_open(fich_fire,nf90_nowrite,nid) 2182 if(ierr.NE.nf90_noerr) THEN2182 IF (ierr.NE.nf90_noerr) THEN 2183 2183 WRITE(*,*) 'ERROR: Pb opening forcings nc file ' 2184 2184 WRITE(*,*) nf90_strerror(ierr) … … 2369 2369 !program reading initial profils and forcings of the Dice case study 2370 2370 2371 usenetcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,&2371 USE netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2372 2372 nf90_inq_dimid,nf90_inquire_dimension 2373 2373 … … 2376 2376 INCLUDE "YOMCST.h" 2377 2377 2378 integerntime,nlevel2379 integerl,k2378 INTEGER ntime,nlevel 2379 INTEGER l,k 2380 2380 character*80 :: fich_dice 2381 2381 real*8 time(ntime) … … 2390 2390 real*8 pzero 2391 2391 2392 integernid, ierr2393 integernbvar3d2392 INTEGER nid, ierr 2393 INTEGER nbvar3d 2394 2394 parameter(nbvar3d=30) 2395 integervar3didin(nbvar3d)2395 INTEGER var3didin(nbvar3d) 2396 2396 2397 2397 pzero=100000. 2398 2398 ierr = nf90_open(fich_dice,nf90_nowrite,nid) 2399 if(ierr.NE.nf90_noerr) THEN2399 IF (ierr.NE.nf90_noerr) THEN 2400 2400 WRITE(*,*) 'ERROR: Pb opening forcings nc file ' 2401 2401 WRITE(*,*) nf90_strerror(ierr) … … 2703 2703 !program reading initial profils and forcings of the Gabls4 case study 2704 2704 2705 usenetcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,&2705 USE netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2706 2706 nf90_inq_dimid,nf90_inquire_dimension 2707 2707 2708 2708 IMPLICIT NONE 2709 2709 2710 integerntime,nlevel,nsol2711 integerl,k2710 INTEGER ntime,nlevel,nsol 2711 INTEGER l,k 2712 2712 character*80 :: fich_gabls4 2713 2713 real*8 time(ntime) … … 2727 2727 real*8 depth_sn(nsol),tsnow(nsol),snow_dens(nsol) 2728 2728 real*8 tg(ntime) 2729 integernid, ierr2730 integernbvar3d2729 INTEGER nid, ierr 2730 INTEGER nbvar3d 2731 2731 parameter(nbvar3d=30) 2732 integervar3didin(nbvar3d)2732 INTEGER var3didin(nbvar3d) 2733 2733 2734 2734 ierr = nf90_open(fich_gabls4,nf90_nowrite,nid) 2735 if(ierr.NE.nf90_noerr) THEN2735 IF (ierr.NE.nf90_noerr) THEN 2736 2736 WRITE(*,*) 'ERROR: Pb opening forcings nc file ' 2737 2737 WRITE(*,*) nf90_strerror(ierr) … … 2949 2949 INCLUDE "YOMCST.h" 2950 2950 2951 realalbsfc(ncm_1), albsfc_w(ncm_1)2952 realcf(nlev_circ), icefra(nlev_circ), deice(nlev_circ), &2951 REAL albsfc(ncm_1), albsfc_w(ncm_1) 2952 REAL cf(nlev_circ), icefra(nlev_circ), deice(nlev_circ), & 2953 2953 reliq(nlev_circ), reice(nlev_circ), lwp(nlev_circ), iwp(nlev_circ) 2954 realt(nlev_circ+1), z(nlev_circ+1), dz(nlev_circ), p(nlev_circ+1)2955 realaer_beta(nlev_circ), waer(nlev_circ), gaer(nlev_circ)2956 realpm(nlev_circ), tm(nlev_circ), h2o(nlev_circ), o3(nlev_circ)2957 realco2(nlev_circ), n2o(nlev_circ), co(nlev_circ), ch4(nlev_circ), &2954 REAL t(nlev_circ+1), z(nlev_circ+1), dz(nlev_circ), p(nlev_circ+1) 2955 REAL aer_beta(nlev_circ), waer(nlev_circ), gaer(nlev_circ) 2956 REAL pm(nlev_circ), tm(nlev_circ), h2o(nlev_circ), o3(nlev_circ) 2957 REAL co2(nlev_circ), n2o(nlev_circ), co(nlev_circ), ch4(nlev_circ), & 2958 2958 o2(nlev_circ), ccl4(nlev_circ), f11(nlev_circ), f12(nlev_circ) 2959 2959 ! za= zenital angle 2960 2960 ! sza= cosinus angle zenital 2961 realwavn(ncm_1), ssf(ncm_1),za,sza2962 integernlev2961 REAL wavn(ncm_1), ssf(ncm_1),za,sza 2962 INTEGER nlev 2963 2963 2964 2964 … … 3053 3053 INCLUDE "YOMCST.h" 3054 3054 3055 realt(nlev_rtmip), pt(nlev_rtmip),pb(nlev_rtmip),h2o(nlev_rtmip), o3(nlev_rtmip)3056 realtemp(nlev_rtmip), play(nlev_rtmip),ovap(nlev_rtmip), oz(nlev_rtmip),plev(nlev_rtmip+1)3057 integernlev3055 REAL t(nlev_rtmip), pt(nlev_rtmip),pb(nlev_rtmip),h2o(nlev_rtmip), o3(nlev_rtmip) 3056 REAL temp(nlev_rtmip), play(nlev_rtmip),ovap(nlev_rtmip), oz(nlev_rtmip),plev(nlev_rtmip+1) 3057 INTEGER nlev 3058 3058 3059 3059 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_decl_cases.h
r5103 r5117 4 4 ! integer nlev_prof 5 5 ! parameter (nlev_prof = 41) 6 integernlev_toga, nt_toga6 INTEGER nlev_toga, nt_toga 7 7 parameter (nlev_toga=41, nt_toga=480) 8 integeryear_ini_toga, day_ini_toga, mth_ini_toga9 realday_ju_ini_toga ! Julian day of toga coare first day8 INTEGER year_ini_toga, day_ini_toga, mth_ini_toga 9 REAL day_ju_ini_toga ! Julian day of toga coare first day 10 10 parameter (year_ini_toga=1992) 11 11 parameter (mth_ini_toga=11) 12 12 parameter (day_ini_toga=1) ! 1erNov1992 13 realdt_toga13 REAL dt_toga 14 14 parameter (dt_toga=6.*3600.) 15 15 !! 16 integeryear_print, month_print, day_print16 INTEGER year_print, month_print, day_print 17 17 real sec_print 18 18 !! 19 realts_toga(nt_toga)20 realplev_toga(nlev_toga,nt_toga),w_toga(nlev_toga,nt_toga)21 realt_toga(nlev_toga,nt_toga),q_toga(nlev_toga,nt_toga)22 realu_toga(nlev_toga,nt_toga),v_toga(nlev_toga,nt_toga)23 realht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga)24 realhq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga)25 26 realts_prof27 realplev_prof(nlev_toga),w_prof(nlev_toga)28 realt_prof(nlev_toga),q_prof(nlev_toga)29 realu_prof(nlev_toga),v_prof(nlev_toga)30 realht_prof(nlev_toga),vt_prof(nlev_toga)31 realhq_prof(nlev_toga),vq_prof(nlev_toga)32 33 realw_mod(llm), t_mod(llm),q_mod(llm)34 realu_mod(llm),v_mod(llm), ht_mod(llm),vt_mod(llm),ug_mod(llm),vg_mod(llm)35 realhq_mod(llm),vq_mod(llm),qv_mod(llm),ql_mod(llm),qt_mod(llm)36 realth_mod(llm)19 REAL ts_toga(nt_toga) 20 REAL plev_toga(nlev_toga,nt_toga),w_toga(nlev_toga,nt_toga) 21 REAL t_toga(nlev_toga,nt_toga),q_toga(nlev_toga,nt_toga) 22 REAL u_toga(nlev_toga,nt_toga),v_toga(nlev_toga,nt_toga) 23 REAL ht_toga(nlev_toga,nt_toga),vt_toga(nlev_toga,nt_toga) 24 REAL hq_toga(nlev_toga,nt_toga),vq_toga(nlev_toga,nt_toga) 25 26 REAL ts_prof 27 REAL plev_prof(nlev_toga),w_prof(nlev_toga) 28 REAL t_prof(nlev_toga),q_prof(nlev_toga) 29 REAL u_prof(nlev_toga),v_prof(nlev_toga) 30 REAL ht_prof(nlev_toga),vt_prof(nlev_toga) 31 REAL hq_prof(nlev_toga),vq_prof(nlev_toga) 32 33 REAL w_mod(llm), t_mod(llm),q_mod(llm) 34 REAL u_mod(llm),v_mod(llm), ht_mod(llm),vt_mod(llm),ug_mod(llm),vg_mod(llm) 35 REAL hq_mod(llm),vq_mod(llm),qv_mod(llm),ql_mod(llm),qt_mod(llm) 36 REAL th_mod(llm) 37 37 38 38 !real ts_cur … … 41 41 ! Declarations specifiques au cas RICO 42 42 character*80 :: fich_rico 43 integernlev_rico43 INTEGER nlev_rico 44 44 45 45 parameter (nlev_rico=81) 46 realts_rico,ps_rico47 realw_rico(llm)48 realt_rico(llm),q_rico(llm)49 realu_rico(llm),v_rico(llm)50 realdth_rico(llm)51 realdqh_rico(llm)46 REAL ts_rico,ps_rico 47 REAL w_rico(llm) 48 REAL t_rico(llm),q_rico(llm) 49 REAL u_rico(llm),v_rico(llm) 50 REAL dth_rico(llm) 51 REAL dqh_rico(llm) 52 52 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 53 53 ! Declarations specifiques au cas TWPice 54 54 character*80 :: fich_twpice 55 integernlev_twpi, nt_twpi55 INTEGER nlev_twpi, nt_twpi 56 56 parameter (nlev_twpi=40, nt_twpi=215) 57 integeryear_ini_twpi, day_ini_twpi, mth_ini_twpi58 realheure_ini_twpi59 realday_ju_ini_twpi ! Julian day of twpice first day57 INTEGER year_ini_twpi, day_ini_twpi, mth_ini_twpi 58 REAL heure_ini_twpi 59 REAL day_ju_ini_twpi ! Julian day of twpice first day 60 60 parameter (year_ini_twpi=2006) 61 61 parameter (mth_ini_twpi=1) 62 62 parameter (day_ini_twpi=17) ! 17 = 17Jan2006 63 63 parameter (heure_ini_twpi=10800.) !3h en secondes 64 realdt_twpi64 REAL dt_twpi 65 65 parameter (dt_twpi=3.*3600.) 66 66 67 realts_twpi(nt_twpi)68 realplev_twpi(nlev_twpi,nt_twpi),w_twpi(nlev_twpi,nt_twpi)69 realt_twpi(nlev_twpi,nt_twpi),q_twpi(nlev_twpi,nt_twpi)70 realu_twpi(nlev_twpi,nt_twpi),v_twpi(nlev_twpi,nt_twpi)71 realht_twpi(nlev_twpi,nt_twpi),vt_twpi(nlev_twpi,nt_twpi)72 realhq_twpi(nlev_twpi,nt_twpi),vq_twpi(nlev_twpi,nt_twpi)73 74 realts_proftwp75 realplev_proftwp(nlev_twpi),w_proftwp(nlev_twpi)76 realt_proftwp(nlev_twpi),q_proftwp(nlev_twpi)77 realu_proftwp(nlev_twpi),v_proftwp(nlev_twpi)78 realht_proftwp(nlev_twpi),vt_proftwp(nlev_twpi)79 realhq_proftwp(nlev_twpi),vq_proftwp(nlev_twpi)67 REAL ts_twpi(nt_twpi) 68 REAL plev_twpi(nlev_twpi,nt_twpi),w_twpi(nlev_twpi,nt_twpi) 69 REAL t_twpi(nlev_twpi,nt_twpi),q_twpi(nlev_twpi,nt_twpi) 70 REAL u_twpi(nlev_twpi,nt_twpi),v_twpi(nlev_twpi,nt_twpi) 71 REAL ht_twpi(nlev_twpi,nt_twpi),vt_twpi(nlev_twpi,nt_twpi) 72 REAL hq_twpi(nlev_twpi,nt_twpi),vq_twpi(nlev_twpi,nt_twpi) 73 74 REAL ts_proftwp 75 REAL plev_proftwp(nlev_twpi),w_proftwp(nlev_twpi) 76 REAL t_proftwp(nlev_twpi),q_proftwp(nlev_twpi) 77 REAL u_proftwp(nlev_twpi),v_proftwp(nlev_twpi) 78 REAL ht_proftwp(nlev_twpi),vt_proftwp(nlev_twpi) 79 REAL hq_proftwp(nlev_twpi),vq_proftwp(nlev_twpi) 80 80 81 81 … … 83 83 !Declarations specifiques au cas FIRE 84 84 character*80 :: fich_fire 85 integernlev_fire, nt_fire85 INTEGER nlev_fire, nt_fire 86 86 parameter (nlev_fire=120, nt_fire=1) 87 integeryear_ini_fire, day_ini_fire, mth_ini_fire88 realheure_ini_fire87 INTEGER year_ini_fire, day_ini_fire, mth_ini_fire 88 REAL heure_ini_fire 89 89 parameter (year_ini_fire=1987) 90 90 parameter (mth_ini_fire=7) … … 95 95 !Declarations specifiques au cas GABLS4 (MPL 20141023) 96 96 character*80 :: fich_gabls4 97 integernlev_gabls4, nt_gabls4, nsol_gabls497 INTEGER nlev_gabls4, nt_gabls4, nsol_gabls4 98 98 parameter (nlev_gabls4=90, nt_gabls4=37, nsol_gabls4=19) 99 integeryear_ini_gabls4, day_ini_gabls4, mth_ini_gabls4100 realheure_ini_gabls4101 realday_ju_ini_gabls4 ! Julian day of gabls4 first day99 INTEGER year_ini_gabls4, day_ini_gabls4, mth_ini_gabls4 100 REAL heure_ini_gabls4 101 REAL day_ju_ini_gabls4 ! Julian day of gabls4 first day 102 102 parameter (year_ini_gabls4=2009) 103 103 parameter (mth_ini_gabls4=12) 104 104 parameter (day_ini_gabls4=11) ! 11 = 11 decembre 2009 105 105 parameter (heure_ini_gabls4=0.) !0UTC en secondes 106 realdt_gabls4106 REAL dt_gabls4 107 107 parameter (dt_gabls4=3600.) ! 1 forcage ttes les heures 108 108 109 109 !profils initiaux: 110 realplev_gabls4(nlev_gabls4)111 realzz_gabls4(nlev_gabls4)112 realth_gabls4(nlev_gabls4),t_gabls4(nlev_gabls4),qv_gabls4(nlev_gabls4)113 realu_gabls4(nlev_gabls4), v_gabls4(nlev_gabls4)114 realdepth_sn_gabls4(nsol_gabls4),tsnow_gabls4(nsol_gabls4),snow_dens_gabls4(nsol_gabls4)115 realt_gabi(nlev_gabls4),qv_gabi(nlev_gabls4)116 realu_gabi(nlev_gabls4), v_gabi(nlev_gabls4),ug_gabi(nlev_gabls4), vg_gabi(nlev_gabls4)117 realht_gabi(nlev_gabls4),hq_gabi(nlev_gabls4),poub(nlev_gabls4)110 REAL plev_gabls4(nlev_gabls4) 111 REAL zz_gabls4(nlev_gabls4) 112 REAL th_gabls4(nlev_gabls4),t_gabls4(nlev_gabls4),qv_gabls4(nlev_gabls4) 113 REAL u_gabls4(nlev_gabls4), v_gabls4(nlev_gabls4) 114 REAL depth_sn_gabls4(nsol_gabls4),tsnow_gabls4(nsol_gabls4),snow_dens_gabls4(nsol_gabls4) 115 REAL t_gabi(nlev_gabls4),qv_gabi(nlev_gabls4) 116 REAL u_gabi(nlev_gabls4), v_gabi(nlev_gabls4),ug_gabi(nlev_gabls4), vg_gabi(nlev_gabls4) 117 REAL ht_gabi(nlev_gabls4),hq_gabi(nlev_gabls4),poub(nlev_gabls4) 118 118 119 119 !forcings 120 realht_gabls4(nlev_gabls4,nt_gabls4),hq_gabls4(nlev_gabls4,nt_gabls4)121 realug_gabls4(nlev_gabls4,nt_gabls4),vg_gabls4(nlev_gabls4,nt_gabls4)122 realtg_gabls4(nt_gabls4)123 realht_profg(nlev_gabls4),hq_profg(nlev_gabls4)124 realug_profg(nlev_gabls4),vg_profg(nlev_gabls4)125 realtg_profg120 REAL ht_gabls4(nlev_gabls4,nt_gabls4),hq_gabls4(nlev_gabls4,nt_gabls4) 121 REAL ug_gabls4(nlev_gabls4,nt_gabls4),vg_gabls4(nlev_gabls4,nt_gabls4) 122 REAL tg_gabls4(nt_gabls4) 123 REAL ht_profg(nlev_gabls4),hq_profg(nlev_gabls4) 124 REAL ug_profg(nlev_gabls4),vg_profg(nlev_gabls4) 125 REAL tg_profg 126 126 127 127 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 129 129 !Declarations specifiques au cas DICE (MPL 02072013) 130 130 character*80 :: fich_dice 131 integernlev_dice, nt_dice131 INTEGER nlev_dice, nt_dice 132 132 parameter (nlev_dice=70, nt_dice=145) 133 integeryear_ini_dice, day_ini_dice, mth_ini_dice134 realheure_ini_dice135 realday_ju_ini_dice ! Julian day of dice first day133 INTEGER year_ini_dice, day_ini_dice, mth_ini_dice 134 REAL heure_ini_dice 135 REAL day_ju_ini_dice ! Julian day of dice first day 136 136 parameter (year_ini_dice=1999) 137 137 parameter (mth_ini_dice=10) 138 138 parameter (day_ini_dice=23) ! 23 = 23 october 1999 139 139 parameter (heure_ini_dice=68400.) !19UTC en secondes 140 realdt_dice140 REAL dt_dice 141 141 parameter (dt_dice=0.5*3600.) ! 1 forcage ttes les demi-heures 142 142 143 143 !profils initiaux: 144 realplev_dice(nlev_dice)145 146 realzz_dice(nlev_dice)147 realt_dice(nlev_dice),qv_dice(nlev_dice)148 realu_dice(nlev_dice), v_dice(nlev_dice),o3_dice(nlev_dice)149 realht_dice(nlev_dice,nt_dice)150 realhq_dice(nlev_dice,nt_dice), hu_dice(nlev_dice,nt_dice)151 realhv_dice(nlev_dice,nt_dice)152 realw_dice(nlev_dice,nt_dice),omega_dice(nlev_dice,nt_dice)153 realo3_mod(llm),hu_mod(llm),hv_mod(llm)154 realt_dicei(nlev_dice),qv_dicei(nlev_dice)155 realu_dicei(nlev_dice), v_dicei(nlev_dice),o3_dicei(nlev_dice)156 realht_dicei(nlev_dice)157 realhq_dicei(nlev_dice), hu_dicei(nlev_dice)158 realhv_dicei(nlev_dice)159 realw_dicei(nlev_dice),omega_dicei(nlev_dice)144 REAL plev_dice(nlev_dice) 145 146 REAL zz_dice(nlev_dice) 147 REAL t_dice(nlev_dice),qv_dice(nlev_dice) 148 REAL u_dice(nlev_dice), v_dice(nlev_dice),o3_dice(nlev_dice) 149 REAL ht_dice(nlev_dice,nt_dice) 150 REAL hq_dice(nlev_dice,nt_dice), hu_dice(nlev_dice,nt_dice) 151 REAL hv_dice(nlev_dice,nt_dice) 152 REAL w_dice(nlev_dice,nt_dice),omega_dice(nlev_dice,nt_dice) 153 REAL o3_mod(llm),hu_mod(llm),hv_mod(llm) 154 REAL t_dicei(nlev_dice),qv_dicei(nlev_dice) 155 REAL u_dicei(nlev_dice), v_dicei(nlev_dice),o3_dicei(nlev_dice) 156 REAL ht_dicei(nlev_dice) 157 REAL hq_dicei(nlev_dice), hu_dicei(nlev_dice) 158 REAL hv_dicei(nlev_dice) 159 REAL w_dicei(nlev_dice),omega_dicei(nlev_dice) 160 160 161 161 162 162 !forcings 163 realshf_dice(nt_dice),lhf_dice(nt_dice)164 reallwup_dice(nt_dice),swup_dice(nt_dice)165 realtg_dice(nt_dice),ustar_dice(nt_dice),psurf_dice(nt_dice)166 realug_dice(nt_dice),vg_dice(nt_dice)167 168 realshf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof169 realustar_prof,psurf_prof,cdrag170 realht_profd(nlev_dice),hq_profd(nlev_dice),hu_profd(nlev_dice)171 realhv_profd(nlev_dice),w_profd(nlev_dice)172 realomega_profd(nlev_dice),ug_profd,vg_profd163 REAL shf_dice(nt_dice),lhf_dice(nt_dice) 164 REAL lwup_dice(nt_dice),swup_dice(nt_dice) 165 REAL tg_dice(nt_dice),ustar_dice(nt_dice),psurf_dice(nt_dice) 166 REAL ug_dice(nt_dice),vg_dice(nt_dice) 167 168 REAL shf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof 169 REAL ustar_prof,psurf_prof,cdrag 170 REAL ht_profd(nlev_dice),hq_profd(nlev_dice),hu_profd(nlev_dice) 171 REAL hv_profd(nlev_dice),w_profd(nlev_dice) 172 REAL omega_profd(nlev_dice),ug_profd,vg_profd 173 173 174 174 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 183 183 real Ts_gcssold 184 184 real dtime_frcg 185 logical:: Turb_fcg_gcssold185 LOGICAL :: Turb_fcg_gcssold 186 186 187 187 common /turb_forcing/ & … … 192 192 193 193 194 integernlev_armcu, nt_armcu194 INTEGER nlev_armcu, nt_armcu 195 195 parameter (nlev_armcu=40, nt_armcu=31) 196 integeryear_ini_armcu, day_ini_armcu, mth_ini_armcu196 INTEGER year_ini_armcu, day_ini_armcu, mth_ini_armcu 197 197 real heure_ini_armcu 198 realday_ju_ini_armcu ! Julian day of armcu case first day198 REAL day_ju_ini_armcu ! Julian day of armcu case first day 199 199 parameter (year_ini_armcu=1997) 200 200 parameter (mth_ini_armcu=6) 201 201 parameter (day_ini_armcu=21) ! 172 = 21 juin 1997 202 202 parameter (heure_ini_armcu=41400) ! 11:30 en secondes 203 realdt_armcu203 REAL dt_armcu 204 204 parameter (dt_armcu=1.*1800.) ! forcages donnes ttes les demi-heures par ifa_armcu.txt 205 realsens_armcu(nt_armcu),flat_armcu(nt_armcu)206 realadv_theta_armcu(nt_armcu),rad_theta_armcu(nt_armcu)207 realadv_qt_armcu(nt_armcu)208 realtheta_mod(llm),rv_mod(llm),play_mod(llm)205 REAL sens_armcu(nt_armcu),flat_armcu(nt_armcu) 206 REAL adv_theta_armcu(nt_armcu),rad_theta_armcu(nt_armcu) 207 REAL adv_qt_armcu(nt_armcu) 208 REAL theta_mod(llm),rv_mod(llm),play_mod(llm) 209 209 ! profc comme "profil armcu" 210 210 211 211 ! forcages interpoles dans le temps 212 realadv_theta_prof,rad_theta_prof,adv_qt_prof213 realsens_prof,flat_prof,fact212 REAL adv_theta_prof,rad_theta_prof,adv_qt_prof 213 REAL sens_prof,flat_prof,fact 214 214 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 215 215 ! declarations specifiques au cas Sandu … … 217 217 ! integer nlev_prof 218 218 ! parameter (nlev_prof = 41) 219 integernlev_sandu, nt_sandu219 INTEGER nlev_sandu, nt_sandu 220 220 parameter (nlev_sandu=87, nt_sandu=13) 221 integeryear_ini_sandu, day_ini_sandu, mth_ini_sandu222 realday_ju_ini_sandu ! Julian day of sandu case first day221 INTEGER year_ini_sandu, day_ini_sandu, mth_ini_sandu 222 REAL day_ju_ini_sandu ! Julian day of sandu case first day 223 223 parameter (year_ini_sandu=2006) 224 224 parameter (mth_ini_sandu=7) 225 225 parameter (day_ini_sandu=15) ! 196 = 15 juillet 2006 226 realdt_sandu, tau_sandu226 REAL dt_sandu, tau_sandu 227 227 logical :: trouve_700=.TRUE. 228 228 parameter (dt_sandu=6.*3600.) ! forcages donnes ttes les 6 heures par ifa_sandu.txt 229 229 parameter (tau_sandu=30000*3600.) ! temps de relaxation u,v,thetal,qt vers profil init et au dessus 700hPa 230 230 !! 231 realts_sandu(nt_sandu)231 REAL ts_sandu(nt_sandu) 232 232 ! profs comme "profil sandu" 233 realplev_profs(nlev_sandu)234 realt_profs(nlev_sandu),thl_profs(nlev_sandu)235 realq_profs(nlev_sandu)236 realu_profs(nlev_sandu),v_profs(nlev_sandu),w_profs(nlev_sandu)237 realomega_profs(nlev_sandu),o3mmr_profs(nlev_sandu)238 239 real, dimension(llm) :: relax_u,relax_v,relax_thl240 real, dimension(llm,2) :: relax_q241 242 realthl_mod(llm),omega_mod(llm),o3mmr_mod(llm),tke_mod(llm)233 REAL plev_profs(nlev_sandu) 234 REAL t_profs(nlev_sandu),thl_profs(nlev_sandu) 235 REAL q_profs(nlev_sandu) 236 REAL u_profs(nlev_sandu),v_profs(nlev_sandu),w_profs(nlev_sandu) 237 REAL omega_profs(nlev_sandu),o3mmr_profs(nlev_sandu) 238 239 REAL, DIMENSION(llm) :: relax_u,relax_v,relax_thl 240 REAL, DIMENSION(llm,2) :: relax_q 241 242 REAL thl_mod(llm),omega_mod(llm),o3mmr_mod(llm),tke_mod(llm) 243 243 !vertical advection computation 244 reald_t_z(llm),d_th_z(llm), d_q_z(llm)245 reald_t_dyn_z(llm),d_th_dyn_z(llm), d_q_dyn_z(llm)246 reald_u_z(llm),d_v_z(llm)247 reald_u_dyn(llm),d_v_dyn(llm)248 reald_u_dyn_z(llm),d_v_dyn_z(llm)249 reald_u_adv(llm),d_v_adv(llm)250 realzz(llm)251 realzfact244 REAL d_t_z(llm),d_th_z(llm), d_q_z(llm) 245 REAL d_t_dyn_z(llm),d_th_dyn_z(llm), d_q_dyn_z(llm) 246 REAL d_u_z(llm),d_v_z(llm) 247 REAL d_u_dyn(llm),d_v_dyn(llm) 248 REAL d_u_dyn_z(llm),d_v_dyn_z(llm) 249 REAL d_u_adv(llm),d_v_adv(llm) 250 REAL zz(llm) 251 REAL zfact 252 252 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 253 253 ! Declarations specifiques au cas Astex 254 254 character*80 :: fich_astex 255 integernlev_astex, nt_astex255 INTEGER nlev_astex, nt_astex 256 256 parameter (nlev_astex=34, nt_astex=49) 257 integeryear_ini_astex, day_ini_astex, mth_ini_astex258 realday_ju_ini_astex ! Julian day of astex case first day257 INTEGER year_ini_astex, day_ini_astex, mth_ini_astex 258 REAL day_ju_ini_astex ! Julian day of astex case first day 259 259 parameter (year_ini_astex=1992) 260 260 parameter (mth_ini_astex=6) 261 261 parameter (day_ini_astex=13) ! 165 = 13 juin 1992 262 realdt_astex262 REAL dt_astex 263 263 parameter (dt_astex=3600.) ! forcages donnes ttes les heures par ifa_astex.txt 264 realts_astex(nt_astex),div_astex(nt_astex),ug_astex(nt_astex)265 realvg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex)266 realdiv_prof,ug_prof,vg_prof,ufa_prof,vfa_prof264 REAL ts_astex(nt_astex),div_astex(nt_astex),ug_astex(nt_astex) 265 REAL vg_astex(nt_astex),ufa_astex(nt_astex),vfa_astex(nt_astex) 266 REAL div_prof,ug_prof,vg_prof,ufa_prof,vfa_prof 267 267 ! profa comme "profil astex" 268 realplev_profa(nlev_astex)269 realt_profa(nlev_astex),thl_profa(nlev_astex)270 realqv_profa(nlev_astex),ql_profa(nlev_astex)271 realqt_profa(nlev_astex),o3mmr_profa(nlev_astex)272 realu_profa(nlev_astex),v_profa(nlev_astex),w_profa(nlev_astex)273 realtke_profa(nlev_astex)268 REAL plev_profa(nlev_astex) 269 REAL t_profa(nlev_astex),thl_profa(nlev_astex) 270 REAL qv_profa(nlev_astex),ql_profa(nlev_astex) 271 REAL qt_profa(nlev_astex),o3mmr_profa(nlev_astex) 272 REAL u_profa(nlev_astex),v_profa(nlev_astex),w_profa(nlev_astex) 273 REAL tke_profa(nlev_astex) 274 274 275 275 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 276 276 !Declarations specifiques au cas standard 277 277 278 realw_mod_cas(llm), t_mod_cas(llm),q_mod_cas(llm)279 realtheta_mod_cas(llm),thl_mod_cas(llm),thv_mod_cas(llm)280 realqv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm)281 realug_mod_cas(llm),vg_mod_cas(llm)282 realu_mod_cas(llm),v_mod_cas(llm)283 realomega_mod_cas(llm)284 realht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm)285 realhth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm)286 realhq_mod_cas(llm),vq_mod_cas(llm),dq_mod_cas(llm)287 realhu_mod_cas(llm),vu_mod_cas(llm),du_mod_cas(llm)288 realhv_mod_cas(llm),vv_mod_cas(llm),dv_mod_cas(llm)289 integerday_ini_cas290 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 291 292 278 REAL w_mod_cas(llm), t_mod_cas(llm),q_mod_cas(llm) 279 REAL theta_mod_cas(llm),thl_mod_cas(llm),thv_mod_cas(llm) 280 REAL qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm) 281 REAL ug_mod_cas(llm),vg_mod_cas(llm) 282 REAL u_mod_cas(llm),v_mod_cas(llm) 283 REAL omega_mod_cas(llm) 284 REAL ht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm) 285 REAL hth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm) 286 REAL hq_mod_cas(llm),vq_mod_cas(llm),dq_mod_cas(llm) 287 REAL hu_mod_cas(llm),vu_mod_cas(llm),du_mod_cas(llm) 288 REAL hv_mod_cas(llm),vv_mod_cas(llm),dv_mod_cas(llm) 289 INTEGER day_ini_cas 290 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 291 292 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_interp_cases.h
r5116 r5117 5 5 ! Forcing_LES case: constant dq_dyn 6 6 !--------------------------------------------------------------------- 7 if(forcing_LES) THEN7 IF (forcing_LES) THEN 8 8 DO l = 1,llm 9 9 d_q_adv(l,1) = dq_dyn(l,1) … … 14 14 ! Interpolation forcing in time and onto model levels 15 15 !--------------------------------------------------------------------- 16 if(forcing_GCSSold) THEN16 IF (forcing_GCSSold) THEN 17 17 CALL get_uvd(it,timestep,fich_gcssold_ctl,fich_gcssold_dat, & 18 18 & ht_gcssold,hq_gcssold,hw_gcssold, & … … 21 21 & imp_fcg_gcssold,ts_fcg_gcssold, & 22 22 & Tp_fcg_gcssold,Turb_fcg_gcssold) 23 if(prt_level.ge.1) THEN23 IF (prt_level.ge.1) THEN 24 24 print *,' get_uvd -> hqturb_gcssold ',it,hqturb_gcssold 25 25 endif … … 46 46 ! Interpolation Toga forcing 47 47 !--------------------------------------------------------------------- 48 if(forcing_toga) THEN49 if(prt_level.ge.1) THEN48 IF (forcing_toga) THEN 49 IF (prt_level.ge.1) THEN 50 50 PRINT*, & 51 51 & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_toga=', & … … 61 61 & ,ht_prof,vt_prof,hq_prof,vq_prof) 62 62 ! EV: tg instead of ts_cur 63 if (type_ts_forcing.eq.1) tg = ts_prof !63 IF (type_ts_forcing.EQ.1) tg = ts_prof ! 64 64 65 65 ! vertical interpolation: … … 91 91 ! Interpolation DICE forcing 92 92 !--------------------------------------------------------------------- 93 if(forcing_dice) THEN94 if(prt_level.ge.1) THEN93 IF (forcing_dice) THEN 94 IF (prt_level.ge.1) THEN 95 95 PRINT*,'#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_dice=',& 96 96 & day,day1,(day-day1)*86400.,(day-day1)*86400/dt_dice … … 111 111 ! enddo 112 112 ! EV tg instead of ts_cur 113 if (type_ts_forcing.eq.1) tg = tg_prof ! SST used113 IF (type_ts_forcing.EQ.1) tg = tg_prof ! SST used 114 114 115 115 ! vertical interpolation: … … 191 191 ! Interpolation gabls4 forcing 192 192 !--------------------------------------------------------------------- 193 if(forcing_gabls4 ) THEN194 if(prt_level.ge.1) THEN193 IF (forcing_gabls4 ) THEN 194 IF (prt_level.ge.1) THEN 195 195 PRINT*,'#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_gabls4=',& 196 196 & day,day1,(day-day1)*86400.,(day-day1)*86400/dt_gabls4 … … 203 203 & ,ug_profg,vg_profg,ht_profg,hq_profg,tg_profg) 204 204 !EV tg instead of ts_cur 205 if (type_ts_forcing.eq.1) tg = tg_prof ! SST used205 IF (type_ts_forcing.EQ.1) tg = tg_prof ! SST used 206 206 207 207 ! vertical interpolation: … … 232 232 ! Interpolation forcing TWPice 233 233 !--------------------------------------------------------------------- 234 if(forcing_twpice) THEN234 IF (forcing_twpice) THEN 235 235 PRINT*, & 236 236 & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_twpi=', & … … 277 277 !wind nudging above 500m with a 2h time scale 278 278 do l=1,llm 279 if(nudge_wind) THEN279 IF (nudge_wind) THEN 280 280 ! if (phi(l).gt.5000.) THEN 281 if(phi(l).gt.0.) THEN281 IF (phi(l).gt.0.) THEN 282 282 u(l)=u(l)+timestep*(u_mod(l)-u(l))/(2.*3600.) 283 283 v(l)=v(l)+timestep*(v_mod(l)-v(l))/(2.*3600.) … … 290 290 291 291 !CR:nudging of q and theta with a 6h time scale above 15km 292 if(nudge_thermo) THEN292 IF (nudge_thermo) THEN 293 293 do l=1,llm 294 294 zz(l)=phi(l)/9.8 295 if ((zz(l).le.16000.).and.(zz(l).gt.15000.)) THEN295 IF ((zz(l).le.16000.).AND.(zz(l).gt.15000.)) THEN 296 296 zfact=(zz(l)-15000.)/1000. 297 297 q(l,1)=q(l,1)+timestep*(q_mod(l)-q(l,1))/(6.*3600.)*zfact 298 298 temp(l)=temp(l)+timestep*(t_mod(l)-temp(l))/(6.*3600.)*zfact 299 else if(zz(l).gt.16000.) THEN299 ELSE IF (zz(l).gt.16000.) THEN 300 300 q(l,1)=q(l,1)+timestep*(q_mod(l)-q(l,1))/(6.*3600.) 301 301 temp(l)=temp(l)+timestep*(t_mod(l)-temp(l))/(6.*3600.) … … 309 309 alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l) 310 310 !calcul de l'advection totale 311 if(cptadvw) THEN311 IF (cptadvw) THEN 312 312 d_t_adv(l) = alpha*omega(l)/rcpd+ht_mod(l)-d_t_dyn_z(l) 313 313 ! PRINT*,'temp vert adv',l,ht_mod(l),vt_mod(l),-d_t_dyn_z(l) … … 328 328 !--------------------------------------------------------------------- 329 329 330 if(forcing_amma) THEN330 IF (forcing_amma) THEN 331 331 PRINT*, & 332 332 & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_amma=', & … … 410 410 ! Interpolation forcing Rico 411 411 !--------------------------------------------------------------------- 412 if(forcing_rico) THEN412 IF (forcing_rico) THEN 413 413 ! CALL lstendH(llm,omega,dt_dyn,dq_dyn,du_dyn, dv_dyn,q,temp,u,v,play) 414 414 CALL lstendH(llm,nqtot,omega,dt_dyn,dq_dyn,q,temp,u,v,play) … … 424 424 ! Interpolation forcing Arm_cu 425 425 !--------------------------------------------------------------------- 426 if(forcing_armcu) THEN426 IF (forcing_armcu) THEN 427 427 PRINT*, & 428 428 & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_armcu=', & … … 479 479 ! Interpolation forcing in time and onto model levels 480 480 !--------------------------------------------------------------------- 481 if(forcing_sandu) THEN481 IF (forcing_sandu) THEN 482 482 PRINT*, & 483 483 & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_sandu=', & … … 492 492 & ,ts_sandu,ts_prof) 493 493 ! EV tg instead of ts_cur 494 if (type_ts_forcing.eq.1) tg = ts_prof ! SST used in read_tsurf1d494 IF (type_ts_forcing.EQ.1) tg = ts_prof ! SST used in read_tsurf1d 495 495 496 496 ! vertical interpolation: … … 560 560 ! Interpolation forcing in time and onto model levels 561 561 !--------------------------------------------------------------------- 562 if(forcing_astex) THEN562 IF (forcing_astex) THEN 563 563 PRINT*, & 564 564 & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_astex=', & … … 574 574 & ,ufa_prof,vfa_prof) 575 575 ! EV tg instead of ts_cur 576 if (type_ts_forcing.eq.1) tg = ts_prof ! SST used576 IF (type_ts_forcing.EQ.1) tg = ts_prof ! SST used 577 577 ! vertical interpolation: 578 578 CALL interp_astex_vertical(play,nlev_astex,plev_profa & … … 642 642 ! Interpolation forcing standard case 643 643 !--------------------------------------------------------------------- 644 if(forcing_case) THEN644 IF (forcing_case) THEN 645 645 PRINT*,'FORCING CASE forcing_case' 646 646 … … 714 714 715 715 !wind nudging 716 if(nudge_u.gt.0.) THEN716 IF (nudge_u.gt.0.) THEN 717 717 do l=1,llm 718 718 u(l)=u(l)+timestep*(u_mod_cas(l)-u(l))/(nudge_u) … … 724 724 endif 725 725 726 if(nudge_v.gt.0.) THEN726 IF (nudge_v.gt.0.) THEN 727 727 do l=1,llm 728 728 v(l)=v(l)+timestep*(v_mod_cas(l)-v(l))/(nudge_v) … … 734 734 endif 735 735 736 if(nudge_w.gt.0.) THEN736 IF (nudge_w.gt.0.) THEN 737 737 do l=1,llm 738 738 w(l)=w(l)+timestep*(w_mod_cas(l)-w(l))/(nudge_w) … … 745 745 746 746 !nudging of q and temp 747 if(nudge_t.gt.0.) THEN747 IF (nudge_t.gt.0.) THEN 748 748 do l=1,llm 749 749 temp(l)=temp(l)+timestep*(t_mod_cas(l)-temp(l))/(nudge_t) 750 750 enddo 751 751 endif 752 if(nudge_q.gt.0.) THEN752 IF (nudge_q.gt.0.) THEN 753 753 do l=1,llm 754 754 q(l,1)=q(l,1)+timestep*(q_mod_cas(l)-q(l,1))/(nudge_q) … … 762 762 763 763 !calcul advection 764 if ((tend_u.eq.1).and.(tend_w.eq.0)) THEN764 IF ((tend_u.EQ.1).AND.(tend_w.EQ.0)) THEN 765 765 d_u_adv(l)=du_mod_cas(l) 766 else if ((tend_u.eq.1).and.(tend_w.eq.1)) THEN766 ELSE IF ((tend_u.EQ.1).AND.(tend_w.EQ.1)) THEN 767 767 d_u_adv(l)=hu_mod_cas(l)-d_u_dyn_z(l) 768 768 endif 769 769 770 if ((tend_v.eq.1).and.(tend_w.eq.0)) THEN770 IF ((tend_v.EQ.1).AND.(tend_w.EQ.0)) THEN 771 771 d_v_adv(l)=dv_mod_cas(l) 772 else if ((tend_v.eq.1).and.(tend_w.eq.1)) THEN772 ELSE IF ((tend_v.EQ.1).AND.(tend_w.EQ.1)) THEN 773 773 d_v_adv(l)=hv_mod_cas(l)-d_v_dyn_z(l) 774 774 endif 775 775 776 if ((tend_t.eq.1).and.(tend_w.eq.0)) THEN776 IF ((tend_t.EQ.1).AND.(tend_w.EQ.0)) THEN 777 777 ! d_t_adv(l)=alpha*omega(l)/rcpd+dt_mod_cas(l) 778 778 d_t_adv(l)=alpha*omega(l)/rcpd-dt_mod_cas(l) 779 else if ((tend_t.eq.1).and.(tend_w.eq.1)) THEN779 ELSE IF ((tend_t.EQ.1).AND.(tend_w.EQ.1)) THEN 780 780 ! d_t_adv(l)=alpha*omega(l)/rcpd+ht_mod_cas(l)-d_t_dyn_z(l) 781 781 d_t_adv(l)=alpha*omega(l)/rcpd-ht_mod_cas(l)-d_t_dyn_z(l) 782 782 endif 783 783 784 if ((tend_q.eq.1).and.(tend_w.eq.0)) THEN784 IF ((tend_q.EQ.1).AND.(tend_w.EQ.0)) THEN 785 785 ! d_q_adv(l,1)=dq_mod_cas(l) 786 786 d_q_adv(l,1)=-1*dq_mod_cas(l) 787 else if ((tend_q.eq.1).and.(tend_w.eq.1)) THEN787 ELSE IF ((tend_q.EQ.1).AND.(tend_w.EQ.1)) THEN 788 788 ! d_q_adv(l,1)=hq_mod_cas(l)-d_q_dyn_z(l) 789 789 d_q_adv(l,1)=-1*hq_mod_cas(l)-d_q_dyn_z(l) 790 790 endif 791 791 792 if (tend_rayo.eq.1) THEN792 IF (tend_rayo.EQ.1) THEN 793 793 dt_cooling(l) = dtrad_mod_cas(l) 794 794 ! print *,'dt_cooling=',dt_cooling(l) … … 814 814 ! Interpolation forcing standard case 815 815 !--------------------------------------------------------------------- 816 if(forcing_case2 .OR. forcing_SCM) THEN816 IF (forcing_case2 .OR. forcing_SCM) THEN 817 817 PRINT*,'FORCING CASE forcing_case2' 818 818 PRINT*, & … … 904 904 905 905 !geostrophic wind 906 if (forc_geo.eq.1) THEN906 IF (forc_geo.EQ.1) THEN 907 907 do l=1,llm 908 908 ug(l) = ug_mod_cas(l) … … 911 911 endif 912 912 !wind nudging 913 if(nudging_u.gt.0.) THEN913 IF (nudging_u.gt.0.) THEN 914 914 do l=1,llm 915 915 u(l)=u(l)+timestep*(u_mod_cas(l)-u(l))/(nudge_u) … … 921 921 endif 922 922 923 if(nudging_v.gt.0.) THEN923 IF (nudging_v.gt.0.) THEN 924 924 do l=1,llm 925 925 v(l)=v(l)+timestep*(v_mod_cas(l)-v(l))/(nudge_v) … … 931 931 endif 932 932 933 if(nudging_w.gt.0.) THEN933 IF (nudging_w.gt.0.) THEN 934 934 do l=1,llm 935 935 w(l)=w(l)+timestep*(w_mod_cas(l)-w(l))/(nudge_w) … … 942 942 943 943 !nudging of q and temp 944 if(nudging_t.gt.0.) THEN944 IF (nudging_t.gt.0.) THEN 945 945 do l=1,llm 946 946 temp(l)=temp(l)+timestep*(t_mod_cas(l)-temp(l))/(nudge_t) 947 947 enddo 948 948 endif 949 if(nudging_qv.gt.0.) THEN949 IF (nudging_qv.gt.0.) THEN 950 950 do l=1,llm 951 951 q(l,1)=q(l,1)+timestep*(q_mod_cas(l)-q(l,1))/(nudge_q) … … 960 960 961 961 !calcul advections 962 if ((forc_u.eq.1).and.(forc_w.eq.0)) THEN962 IF ((forc_u.EQ.1).AND.(forc_w.EQ.0)) THEN 963 963 d_u_adv(l)=du_mod_cas(l) 964 else if ((forc_u.eq.1).and.(forc_w.eq.1)) THEN964 ELSE IF ((forc_u.EQ.1).AND.(forc_w.EQ.1)) THEN 965 965 d_u_adv(l)=hu_mod_cas(l)-d_u_dyn_z(l) 966 966 endif 967 967 968 if ((forc_v.eq.1).and.(forc_w.eq.0)) THEN968 IF ((forc_v.EQ.1).AND.(forc_w.EQ.0)) THEN 969 969 d_v_adv(l)=dv_mod_cas(l) 970 else if ((forc_v.eq.1).and.(forc_w.eq.1)) THEN970 ELSE IF ((forc_v.EQ.1).AND.(forc_w.EQ.1)) THEN 971 971 d_v_adv(l)=hv_mod_cas(l)-d_v_dyn_z(l) 972 972 endif … … 974 974 ! Puisque dth a ete converti en dt, on traite de la meme facon 975 975 ! les flags tadv et thadv 976 if ((tadv.eq.1.or.thadv.eq.1) .and. (forc_w.eq.0)) THEN976 IF ((tadv.EQ.1.OR.thadv.EQ.1) .AND. (forc_w.EQ.0)) THEN 977 977 ! d_t_adv(l)=alpha*omega(l)/rcpd-dt_mod_cas(l) 978 978 d_t_adv(l)=alpha*omega(l)/rcpd+dt_mod_cas(l) 979 else if ((tadv.eq.1.or.thadv.eq.1) .and. (forc_w.eq.1)) THEN979 ELSE IF ((tadv.EQ.1.OR.thadv.EQ.1) .AND. (forc_w.EQ.1)) THEN 980 980 ! d_t_adv(l)=alpha*omega(l)/rcpd-ht_mod_cas(l)-d_t_dyn_z(l) 981 981 d_t_adv(l)=alpha*omega(l)/rcpd+ht_mod_cas(l)-d_t_dyn_z(l) 982 982 endif 983 983 984 ! if ((thadv. eq.1) .and. (forc_w.eq.0)) THEN984 ! if ((thadv.EQ.1) .AND. (forc_w.EQ.0)) THEN 985 985 ! d_t_adv(l)=alpha*omega(l)/rcpd-dth_mod_cas(l) 986 986 ! d_t_adv(l)=alpha*omega(l)/rcpd+dth_mod_cas(l) 987 ! else if ((thadv.eq.1) .and. (forc_w.eq.1)) THEN987 ! ELSE IF ((thadv.EQ.1) .AND. (forc_w.EQ.1)) THEN 988 988 ! d_t_adv(l)=alpha*omega(l)/rcpd-hth_mod_cas(l)-d_t_dyn_z(l) 989 989 ! d_t_adv(l)=alpha*omega(l)/rcpd+hth_mod_cas(l)-d_t_dyn_z(l) 990 990 ! endif 991 991 992 if ((qadv.eq.1) .and. (forc_w.eq.0)) THEN992 IF ((qadv.EQ.1) .AND. (forc_w.EQ.0)) THEN 993 993 d_q_adv(l,1)=dq_mod_cas(l) 994 994 ! d_q_adv(l,1)=-1*dq_mod_cas(l) 995 else if ((qadv.eq.1) .and. (forc_w.eq.1)) THEN995 ELSE IF ((qadv.EQ.1) .AND. (forc_w.EQ.1)) THEN 996 996 d_q_adv(l,1)=hq_mod_cas(l)-d_q_dyn_z(l) 997 997 ! d_q_adv(l,1)=-1*hq_mod_cas(l)-d_q_dyn_z(l) 998 998 endif 999 999 1000 if (trad.eq.1) THEN1000 IF (trad.EQ.1) THEN 1001 1001 tend_rayo=1 1002 1002 dt_cooling(l) = dtrad_mod_cas(l) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_read_forc_cases.h
r5116 r5117 11 11 nq2=0 12 12 13 if (forcing_les .or. forcing_radconv &14 & . or. forcing_GCSSold .or. forcing_fire) THEN15 if(forcing_fire) THEN13 IF (forcing_les .OR. forcing_radconv & 14 & .OR. forcing_GCSSold .OR. forcing_fire) THEN 15 IF (forcing_fire) THEN 16 16 !---------------------------------------------------------------------- 17 17 !read fire forcings from fire.nc … … 51 51 ! Above the max altutide of the input file 52 52 53 if(zlay(l)<height(kmax)) mxcalc=l53 IF (zlay(l)<height(kmax)) mxcalc=l 54 54 55 55 frac = (height(kmax)-zlay(l))/(height (kmax)-height(kmax-1)) 56 56 ttt =tttprof(kmax)-frac*(tttprof(kmax)-tttprof(kmax-1)) 57 if((forcing_GCSSold .AND. tp_ini_GCSSold) .OR. forcing_fire)then ! pot. temp. in initial profile57 IF ((forcing_GCSSold .AND. tp_ini_GCSSold) .OR. forcing_fire)then ! pot. temp. in initial profile 58 58 temp(l) = ttt*(play(l)/pzero)**rkappa 59 59 teta(l) = ttt … … 78 78 frac = (height(k)-zlay(l))/(height(k)-height(k-1)) 79 79 IF(l==1) PRINT*,'k, height, tttprof',k,height(k),tttprof(k) 80 IF(zlay(l)>height(k-1). and.zlay(l)<height(k)) THEN80 IF(zlay(l)>height(k-1).AND.zlay(l)<height(k)) THEN 81 81 ttt =tttprof(k)-frac*(tttprof(k)-tttprof(k-1)) 82 if((forcing_GCSSold .AND. tp_ini_GCSSold) .OR. forcing_fire)then ! pot. temp. in initial profile82 IF ((forcing_GCSSold .AND. tp_ini_GCSSold) .OR. forcing_fire)then ! pot. temp. in initial profile 83 83 temp(l) = ttt*(play(l)/pzero)**rkappa 84 84 teta(l) = ttt … … 100 100 elseif(zlay(l)<height(1)) then ! profils uniformes pour z<height(1) 101 101 ttt =tttprof(1) 102 if((forcing_GCSSold .AND. tp_ini_GCSSold) .OR. forcing_fire)then ! pot. temp. in initial profile102 IF ((forcing_GCSSold .AND. tp_ini_GCSSold) .OR. forcing_fire)then ! pot. temp. in initial profile 103 103 temp(l) = ttt*(play(l)/pzero)**rkappa 104 104 teta(l) = ttt … … 121 121 temp(l)=max(min(temp(l),350.),150.) 122 122 rho(l) = play(l)/(rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))) 123 if(l .lt. llm) THEN123 IF (l .lt. llm) THEN 124 124 zlay(l+1) = zlay(l) + (play(l)-play(l+1))/(rg*rho(l)) 125 125 endif 126 126 omega2(l)=-rho(l)*omega(l) 127 127 omega(l)= omega(l)*(-rg*rho(l)) !en Pa/s 128 if(l>1) THEN128 IF (l>1) THEN 129 129 IF(zlay(l-1)>height(kmax)) THEN 130 130 omega(l)=0.0 … … 136 136 enddo 137 137 138 endif ! forcing_les . or. forcing_GCSSold .or. forcing_fire138 endif ! forcing_les .OR. forcing_GCSSold .OR. forcing_fire 139 139 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 140 140 !--------------------------------------------------------------------- 141 141 ! Forcing for GCSSold: 142 142 !--------------------------------------------------------------------- 143 if(forcing_GCSSold) THEN143 IF (forcing_GCSSold) THEN 144 144 fich_gcssold_ctl = './forcing.ctl' 145 145 fich_gcssold_dat = './forcing8.dat' … … 157 157 ! Forcing for RICO: 158 158 !--------------------------------------------------------------------- 159 if(forcing_rico) THEN159 IF (forcing_rico) THEN 160 160 ! CALL writefield_phy('omega', omega,llm+1) 161 161 fich_rico = 'rico.txt' … … 185 185 !--------------------------------------------------------------------- 186 186 187 if(forcing_toga) THEN187 IF (forcing_toga) THEN 188 188 ! read TOGA-COARE forcing (native vertical grid, nt_toga timesteps): 189 189 fich_toga = './d_toga/ifa_toga_coare_v21_dime.txt' … … 236 236 !--------------------------------------------------------------------- 237 237 238 if(forcing_twpice) THEN238 IF (forcing_twpice) THEN 239 239 !read TWP-ICE forcings 240 240 fich_twpice='d_twpi/twp180iopsndgvarana_v2.1_C3.c1.20060117.000000.cdf' … … 290 290 !--------------------------------------------------------------------- 291 291 292 if(forcing_amma) THEN292 IF (forcing_amma) THEN 293 293 CALL read_1D_cases 294 294 … … 360 360 !--------------------------------------------------------------------- 361 361 362 if(forcing_dice) THEN362 IF (forcing_dice) THEN 363 363 !read DICE forcings 364 364 fich_dice='dice_driver.nc' … … 475 475 !!!! Si la temperature de surface n'est pas impos??e: 476 476 477 if(forcing_gabls4) THEN477 IF (forcing_gabls4) THEN 478 478 !read GABLS4 forcings 479 479 … … 586 586 !--------------------------------------------------------------------- 587 587 588 if(forcing_armcu) THEN588 IF (forcing_armcu) THEN 589 589 ! read armcu forcing : 590 590 WRITE(*,*) 'Avant lecture Forcing Arm_Cu' … … 685 685 !--------------------------------------------------------------------- 686 686 687 if(forcing_sandu) THEN687 IF (forcing_sandu) THEN 688 688 WRITE(*,*) 'Avant lecture Forcing SANDU' 689 689 … … 759 759 !--------------------------------------------------------------------- 760 760 761 if(forcing_astex) THEN761 IF (forcing_astex) THEN 762 762 WRITE(*,*) 'Avant lecture Forcing Astex' 763 763 … … 835 835 !--------------------------------------------------------------------- 836 836 837 if(forcing_case) THEN837 IF (forcing_case) THEN 838 838 WRITE(*,*) 'avant CALL read_1D_cas' 839 839 CALL read_1D_cas … … 909 909 !--------------------------------------------------------------------- 910 910 911 if(forcing_case2) THEN911 IF (forcing_case2) THEN 912 912 WRITE(*,*) 'avant CALL read2_1D_cas' 913 913 CALL read2_1D_cas … … 1007 1007 !--------------------------------------------------------------------- 1008 1008 1009 if(forcing_SCM) THEN1009 IF (forcing_SCM) THEN 1010 1010 WRITE(*,*) 'avant CALL old_read_SCM_cas' 1011 1011 CALL old_read_SCM_cas -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90
r5116 r5117 18 18 REAL :: rlat_rad(1),rlon_rad(1) 19 19 20 integerntime21 integerjour0,mois0,an0,day_step,anneeref,dayref22 integerklev,klon20 INTEGER ntime 21 INTEGER jour0,mois0,an0,day_step,anneeref,dayref 22 INTEGER klev,klon 23 23 CHARACTER (len=10) :: calend 24 24 CHARACTER(len=20) :: calendrier … … 104 104 105 105 CHARACTER(LEN=*) modname 106 integerierr106 INTEGER ierr 107 107 CHARACTER(LEN=*) message 108 108 … … 114 114 CALL getin_dump 115 115 116 if(ierr == 0) THEN116 IF (ierr == 0) THEN 117 117 WRITE(*,*) 'Everything is cool' 118 118 else
Note: See TracChangeset
for help on using the changeset viewer.