Changeset 1263 for LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F
- Timestamp:
- Nov 17, 2009, 2:00:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F
r1259 r1263 13 13 14 14 USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, 15 $ histwrite, ju2ymds, ymds2ju 16 !JG $ histwrite, ju2ymds, ymds2ju, ioget_year_len 15 $ histwrite, ju2ymds, ymds2ju, ioget_year_len 17 16 USE comgeomphy 18 17 USE phys_cal_mod … … 33 32 USE phys_output_mod 34 33 use open_climoz_m, only: open_climoz ! ozone climatology from a file 35 use regr_pr , only: regr_pr_av34 use regr_pr_av_m, only: regr_pr_av 36 35 use netcdf95, only: nf95_close 37 36 use mod_phys_lmdz_mpi_data, only: is_mpi_root 38 37 USE aero_mod 39 38 use ozonecm_m, only: ozonecm ! ozone of J.-F. Royer 39 use conf_phys_m, only: conf_phys 40 use radlwsw_m, only: radlwsw 40 41 41 42 IMPLICIT none … … 1093 1094 integer iunit 1094 1095 1095 logical, save:: read_climoz ! read ozone climatology from a file 1096 integer, save:: ncid_climoz ! NetCDF file containing ozone climatology 1096 integer, save:: read_climoz ! read ozone climatology 1097 C Allowed values are 0, 1 and 2 1098 C 0: do not read an ozone climatology 1099 C 1: read a single ozone climatology that will be used day and night 1100 C 2: read two ozone climatologies, the average day and night 1101 C climatology and the daylight climatology 1102 1103 integer, save:: ncid_climoz ! NetCDF file containing ozone climatologies 1097 1104 1098 1105 real, pointer, save:: press_climoz(:) 1099 ! edges of pressure intervals for ozone climatolog y, in Pa, in strictly1106 ! edges of pressure intervals for ozone climatologies, in Pa, in strictly 1100 1107 ! ascending order 1101 1108 1102 integer,save:: co3i = 0 ! time index in NetCDF file of current ozone field 1109 integer, save:: co3i = 0 1110 ! time index in NetCDF file of current ozone fields 1103 1111 c$OMP THREADPRIVATE(co3i) 1104 1112 1105 1113 integer ro3i 1106 ! required time index in NetCDF file for the ozone field, between 1 and 360 1114 ! required time index in NetCDF file for the ozone fields, between 1 1115 ! and 360 1107 1116 1108 1117 #include "YOMCST.h" … … 1165 1174 print*, 'Allocation des variables locales et sauvegardees' 1166 1175 call phys_local_var_init 1167 call phys_state_var_init 1176 c appel a la lecture du run.def physique 1177 call conf_phys(ok_journe, ok_mensuel, 1178 . ok_instan, ok_hf, 1179 . ok_LES, 1180 . solarlong0,seuil_inversion, 1181 . fact_cldcon, facttemps,ok_newmicro,iflag_radia, 1182 . iflag_cldcon,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, 1183 . ok_ade, ok_aie, aerosol_couple, 1184 . flag_aerosol, new_aod, 1185 . bl95_b0, bl95_b1, 1186 . iflag_thermals,nsplit_thermals,tau_thermals, 1187 . iflag_thermals_ed,iflag_thermals_optflux, 1188 c nv flags pour la convection et les poches froides 1189 . iflag_coupl,iflag_clos,iflag_wake, read_climoz) 1190 call phys_state_var_init(read_climoz) 1168 1191 print*, '=================================================' 1169 1192 … … 1181 1204 first=.false. 1182 1205 1183 endif ! fi srt1206 endif ! first 1184 1207 1185 1208 modname = 'physiq' … … 1209 1232 c 1210 1233 IF (debut) THEN 1211 C1212 1234 !rv 1213 1235 cCRinitialisation de wght_th et lalim_conv pour la definition de la couche alimentation … … 1220 1242 rain_con(:)=0. 1221 1243 snow_con(:)=0. 1222 bl95_b0=0.1223 bl95_b1=0.1224 1244 topswai(:)=0. 1225 1245 topswad(:)=0. … … 1247 1267 IF (ip_ebil_phy.ge.1) d_h_vcol_phy=0. 1248 1268 c 1249 c appel a la lecture du run.def physique1250 c1251 call conf_phys(ok_journe, ok_mensuel,1252 . ok_instan, ok_hf,1253 . ok_LES,1254 . solarlong0,seuil_inversion,1255 . fact_cldcon, facttemps,ok_newmicro,iflag_radia,1256 . iflag_cldcon,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs,1257 . ok_ade, ok_aie, aerosol_couple,1258 . flag_aerosol, new_aod,1259 . bl95_b0, bl95_b1,1260 . iflag_thermals,nsplit_thermals,tau_thermals,1261 . iflag_thermals_ed,iflag_thermals_optflux,1262 cnv flags pour la convection et les poches froides1263 . iflag_coupl,iflag_clos,iflag_wake, read_climoz)1264 1265 1269 print*,'iflag_coupl,iflag_clos,iflag_wake', 1266 1270 . iflag_coupl,iflag_clos,iflag_wake … … 1453 1457 & ctetaSTD,dtime,ok_veget, 1454 1458 & type_ocean,iflag_pbl,ok_mensuel,ok_journe, 1455 & ok_hf,ok_instan,ok_LES,ok_ade,ok_aie)1459 & ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, read_climoz) 1456 1460 c$OMP END MASTER 1457 1461 c$OMP BARRIER … … 1544 1548 1545 1549 C$omp single 1546 if (read_climoz ) then1550 if (read_climoz >= 1) then 1547 1551 call open_climoz(ncid_climoz, press_climoz) 1548 1552 END IF … … 1711 1715 c Prescrire l'ozone et calculer l'albedo sur l'ocean. 1712 1716 c 1713 if (read_climoz ) then1717 if (read_climoz >= 1) then 1714 1718 C Ozone from a file 1715 1719 ! Update required ozone index: 1716 !JG : ioget_year_len n'existe pas dans les versions officiels d'ioipsl 1717 !JG ro3i = int((days_elapsed + jh_cur - jh_1jan) 1718 !JG $ / ioget_year_len(year_cur) * 360.) + 1 1719 CALL abort_gcm(modname, 1720 $ 'JG : read_climoz temporary desactivated',1) 1721 1720 ro3i = int((days_elapsed + jh_cur - jh_1jan) 1721 $ / ioget_year_len(year_cur) * 360.) + 1 1722 1722 if (ro3i == 361) ro3i = 360 1723 1723 C (This should never occur, except perhaps because of roundup … … 1725 1725 if (ro3i /= co3i) then 1726 1726 C Update ozone field: 1727 call regr_pr_av(ncid_climoz, "tro3", julien=ro3i, 1728 & press_in_edg=press_climoz, paprs=paprs, v3=wo) 1727 if (read_climoz == 1) then 1728 call regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, 1729 $ press_in_edg=press_climoz, paprs=paprs, v3=wo) 1730 else 1731 C read_climoz == 2 1732 call regr_pr_av(ncid_climoz, 1733 $ (/"tro3 ", "tro3_daylight"/), 1734 $ julien=ro3i, press_in_edg=press_climoz, paprs=paprs, 1735 $ v3=wo) 1736 end if 1729 1737 ! Convert from mole fraction of ozone to column density of ozone in a 1730 1738 ! cell, in kDU: 1731 wo = wo * rmo3 / rmd * zmasse / dobson_u / 1e3 1739 forall (l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) 1740 $ * rmo3 / rmd * zmasse / dobson_u / 1e3 1732 1741 C (By regridding ozone values for LMDZ only once every 360th of 1733 1742 C year, we have already neglected the variation of pressure in one … … 1738 1747 elseif (MOD(itap-1,lmt_pas) == 0) THEN 1739 1748 C Once per day, update ozone from Royer: 1740 wo = ozonecm(rlat, paprs, rjour=real(days_elapsed+1))1749 wo(:, :, 1) = ozonecm(rlat, paprs, rjour=real(days_elapsed+1)) 1741 1750 ENDIF 1742 1751 c … … 2836 2845 $ u, 2837 2846 $ v, 2838 $ wo ,2847 $ wo(:, :, 1), 2839 2848 $ q_seri, 2840 2849 $ zxtsol, … … 2919 2928 e (kdlon,kflev,dist, rmu0, fract, solaire, 2920 2929 e paprs, pplay,zxtsol,albsol1, albsol2, t_seri,q_seri, 2921 e wo ,2930 e wo(:, :, 1), 2922 2931 e cldfra, cldemi, cldtau, 2923 2932 s heat,heat0,cool,cool0,radsol,albpla, … … 3529 3538 ! close(97) 3530 3539 C$OMP MASTER 3531 if (read_climoz ) then3540 if (read_climoz >= 1) then 3532 3541 if (is_mpi_root) then 3533 3542 call nf95_close(ncid_climoz)
Note: See TracChangeset
for help on using the changeset viewer.