Changeset 3867 for dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/physiq.F90
- Timestamp:
- Jan 8, 2016, 9:52:14 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/physiq.F90
r3842 r3867 50 50 set_timestep, pdtphys 51 51 USE tracinca_mod, ONLY : config_inca 52 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, grid1dTo2d_glo, klon_glo 52 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, grid1dTo2d_glo, klon_glo, grid_type, unstructured 53 53 #ifdef REPROBUS 54 54 USE CHEM_REP, ONLY : Init_chem_rep_xjour … … 64 64 USE CFMIP_point_locations 65 65 use FLOTT_GWD_rando_m, only: FLOTT_GWD_rando 66 66 USE etat0_limit_unstruct_mod 67 USE xios 68 USE regr_lat_time_climoz_m 69 USE climoz_mod 70 USE limit_read_mod, ONLY : init_limit_read 67 71 IMPLICIT none 68 72 !>====================================================================== … … 247 251 real clw(klon,klev),elij(klon,klev,klev) 248 252 real epmlmMm(klon,klev,klev),eplaMm(klon,klev) 253 real delta_epsilon 249 254 ! RomP <<< 250 255 !IM definition dynamique o_trac dans phys_output_open … … 798 803 ! ascending order 799 804 800 integer, save:: co3i = 0805 integer, save:: co3i = -1 801 806 ! time index in NetCDF file of current ozone fields 802 807 !$OMP THREADPRIVATE(co3i) … … 876 881 mydebug=.FALSE. 877 882 CALL set_timestep(pdtphys_) 878 883 IF (.NOT. debut) CALL xios_update_calendar(itap+1) 879 884 !====================================================================== 880 885 ! Ecriture eventuelle d'un profil verticale en entree de la physique. … … 904 909 905 910 if (first) then 906 911 CALL init_etat0_limit_unstruct 912 CALL init_limit_read(days_elapsed) 913 907 914 !CR:nvelles variables convection/poches froides 908 915 … … 1055 1062 radpas = NINT( 86400./pdtphys/nbapp_rad) 1056 1063 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1057 1064 CALL init_iophy_new(lat_degrees,lon_degrees) 1065 1066 !============================================================= 1067 ! Initialisation des sorties 1068 !============================================================= 1069 1070 #ifdef CPP_IOIPSL 1071 1072 !$OMP MASTER 1073 ! FH : if ok_sync=.true. , the time axis is written at each time step 1074 ! in the output files. Only at the end in the opposite case 1075 ok_sync_omp=.false. 1076 CALL getin('ok_sync',ok_sync_omp) 1077 call phys_output_open(lon_degrees,lat_degrees,nCFMIP,tabijGCM, & 1078 iGCM,jGCM,lonGCM,latGCM, & 1079 jjmp1,nlevSTD,clevSTD,rlevSTD, pdtphys,ok_veget, & 1080 type_ocean,iflag_pbl,iflag_pbl_split,ok_mensuel,ok_journe, & 1081 ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, & 1082 read_climoz, phys_out_filestations, & 1083 new_aod, aerosol_couple, & 1084 flag_aerosol_strat, pdtphys, paprs, pphis, & 1085 pplay, lmax_th, ptconv, ptconvth, ivap, & 1086 d_t, qx, d_qx, zmasse, ok_sync_omp) 1087 !$OMP END MASTER 1088 !$OMP BARRIER 1089 ok_sync=ok_sync_omp 1090 1091 freq_outNMC(1) = ecrit_files(7) 1092 freq_outNMC(2) = ecrit_files(8) 1093 freq_outNMC(3) = ecrit_files(9) 1094 WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1) 1095 WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2) 1096 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1097 1098 include "ini_histday_seri.h" 1099 1100 include "ini_paramLMDZ_phy.h" 1101 1102 #endif 1103 ecrit_reg = ecrit_reg * un_jour 1104 ecrit_tra = ecrit_tra * un_jour 1105 1106 !XXXPB Positionner date0 pour initialisation de ORCHIDEE 1107 date0 = jD_ref 1108 WRITE(*,*) 'physiq date0 : ',date0 1109 1110 !--- OZONE CLIMATOLOGY 1111 ! create ozone file for unstuctured grid 1112 CALL create_climoz(read_climoz) 1113 1114 CALL phys_output_write(itap, pdtphys, paprs, pphis, & 1115 pplay, lmax_th, aerosol_couple, & 1116 ok_ade, ok_aie, ivap, new_aod, ok_sync, & 1117 ptconv, read_climoz, clevSTD, & 1118 ptconvth, d_t, qx, d_qx, zmasse, & 1119 flag_aerosol, flag_aerosol_strat, ok_cdnc) 1120 1121 CALL xios_update_calendar(1) 1122 1123 CALL create_etat0_limit_unstruct 1124 1125 1058 1126 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0) 1059 1127 IF (klon_glo==1) THEN … … 1230 1298 !IM cf. AM 081204 END 1231 1299 ! 1232 !============================================================= 1233 ! Initialisation des sorties 1234 !============================================================= 1235 1236 #ifdef CPP_IOIPSL 1237 1238 !$OMP MASTER 1239 ! FH : if ok_sync=.true. , the time axis is written at each time step 1240 ! in the output files. Only at the end in the opposite case 1241 ok_sync_omp=.false. 1242 CALL getin('ok_sync',ok_sync_omp) 1243 call phys_output_open(lon_degrees,lat_degrees,nCFMIP,tabijGCM, & 1244 iGCM,jGCM,lonGCM,latGCM, & 1245 jjmp1,nlevSTD,clevSTD,rlevSTD, pdtphys,ok_veget, & 1246 type_ocean,iflag_pbl,iflag_pbl_split,ok_mensuel,ok_journe, & 1247 ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, & 1248 read_climoz, phys_out_filestations, & 1249 new_aod, aerosol_couple, & 1250 flag_aerosol_strat, pdtphys, paprs, pphis, & 1251 pplay, lmax_th, ptconv, ptconvth, ivap, & 1252 d_t, qx, d_qx, zmasse, ok_sync_omp) 1253 !$OMP END MASTER 1254 !$OMP BARRIER 1255 ok_sync=ok_sync_omp 1256 1257 freq_outNMC(1) = ecrit_files(7) 1258 freq_outNMC(2) = ecrit_files(8) 1259 freq_outNMC(3) = ecrit_files(9) 1260 WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1) 1261 WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2) 1262 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1263 1264 include "ini_histday_seri.h" 1265 1266 include "ini_paramLMDZ_phy.h" 1267 1268 #endif 1269 ecrit_reg = ecrit_reg * un_jour 1270 ecrit_tra = ecrit_tra * un_jour 1271 1272 !XXXPB Positionner date0 pour initialisation de ORCHIDEE 1273 date0 = jD_ref 1274 WRITE(*,*) 'physiq date0 : ',date0 1300 1275 1301 ! 1276 1302 ! … … 1611 1637 ! Ozone from a file 1612 1638 ! Update required ozone index: 1613 ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1 1639 !ym ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1 1640 ! ro3i = int((days_elapsed + jh_cur - jh_1jan )) + 1 1641 1642 delta_epsilon=jh_cur-pdtphys/un_jour 1643 if (ABS(delta_epsilon)<1e-6) delta_epsilon=0 1644 ro3i = int((days_elapsed+delta_epsilon - jh_1jan ))+1 1645 1646 1614 1647 if (ro3i == 361) ro3i = 360 1615 1648 ! (This should never occur, except perhaps because of roundup … … 1618 1651 ! Update ozone field: 1619 1652 if (read_climoz == 1) then 1620 call regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, & 1653 1654 IF (grid_type==unstructured) THEN 1655 CALL get_ozone_var((/"tro3_read"/),press_climoz,paprs,wo) 1656 ELSE 1657 CALL regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, & 1621 1658 press_in_edg=press_climoz, paprs=paprs, v3=wo) 1659 ENDIF 1660 1622 1661 else 1623 1662 ! read_climoz == 2 1624 call regr_pr_av(ncid_climoz, (/"tro3 ", "tro3_daylight"/), & 1625 julien=ro3i, press_in_edg=press_climoz, paprs=paprs, v3=wo) 1663 1664 IF (grid_type==unstructured) THEN 1665 CALL get_ozone_var((/"tro3_read","tro3_daylight_read"/),press_climoz,paprs,wo) 1666 ELSE 1667 CALL regr_pr_av(ncid_climoz, (/"tro3 ", "tro3_daylight"/), & 1668 julien=ro3i, press_in_edg=press_climoz, paprs=paprs, v3=wo) 1669 ENDIF 1670 1626 1671 end if 1627 1672 ! Convert from mole fraction of ozone to column density of ozone in a
Note: See TracChangeset
for help on using the changeset viewer.