Changeset 1279 for LMDZ4/trunk/libf/dyn3d/etat0_netcdf.F
- Timestamp:
- Dec 10, 2009, 10:02:56 AM (15 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
/LMDZ4/branches/LMDZ4-dev merged: 1150-1162,1164-1193,1195-1231,1234-1235,1237-1240,1242-1274,1276
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/dyn3d/etat0_netcdf.F
r1146 r1279 14 14 USE phys_state_var_mod 15 15 USE filtreg_mod 16 use regr_lat_time_climoz_m, only: regr_lat_time_climoz 17 use conf_phys_m, only: conf_phys 16 18 #endif 17 19 !#endif of #ifdef CPP_EARTH 20 use netcdf, only: nf90_open, NF90_NOWRITE, nf90_close 18 21 ! 19 22 IMPLICIT NONE 20 23 ! 21 #include "netcdf.inc"22 24 #include "dimensions.h" 23 25 #include "paramet.h" … … 49 51 REAL :: vvent(iip1, jjm, llm) 50 52 REAL :: t3d(iip1, jjp1, llm), tpot(iip1, jjp1, llm) 51 REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: q3d52 53 REAL :: qsat(iip1, jjp1, llm) 54 REAL,ALLOCATABLE :: q3d(:, :, :,:) 53 55 REAL :: tsol(klon), qsol(klon), sn(klon) 54 REAL :: tsolsrf(klon,nbsrf), qsolsrf(klon,nbsrf),snsrf(klon,nbsrf) 56 !! REAL :: tsolsrf(klon,nbsrf) 57 real qsolsrf(klon,nbsrf),snsrf(klon,nbsrf) 55 58 REAL :: albe(klon,nbsrf), evap(klon,nbsrf) 56 59 REAL :: alblw(klon,nbsrf) … … 72 75 ! 73 76 74 CHARACTER *80:: varname77 CHARACTER(len=80) :: varname 75 78 ! 76 79 INTEGER :: i,j, ig, l, ji,ii1,ii2 … … 102 105 REAL :: w(ip1jmp1,llm) 103 106 REAL ::phystep 104 REAL :: rugsrel(iip1*jjp1)107 CC REAL :: rugsrel(iip1*jjp1) 105 108 REAL :: fder(klon) 106 real zrel(iip1*jjp1),chmin,chmax107 108 CHARACTER*80:: visu_file109 !! real zrel(iip1*jjp1),chmin,chmax 110 111 !! CHARACTER(len=80) :: visu_file 109 112 INTEGER :: visuid 110 113 … … 126 129 logical :: ok_journe, ok_mensuel, ok_instan, ok_hf 127 130 logical :: ok_LES 128 LOGICAL :: ok_ade, ok_aie, aerosol_couple 131 LOGICAL :: ok_ade, ok_aie, aerosol_couple, new_aod 132 INTEGER :: flag_aerosol 129 133 REAL :: bl95_b0, bl95_b1 130 134 real :: fact_cldcon, facttemps,ratqsbas,ratqshaut 135 real :: tau_ratqs 131 136 integer :: iflag_cldcon 132 137 integer :: iflag_ratqs … … 140 145 real :: seuil_inversion 141 146 147 integer read_climoz ! read ozone climatology 148 C Allowed values are 0, 1 and 2 149 C 0: do not read an ozone climatology 150 C 1: read a single ozone climatology that will be used day and night 151 C 2: read two ozone climatologies, the average day and night 152 C climatology and the daylight climatology 153 142 154 ! 143 155 ! Constantes … … 162 174 ! CALL defrun_new(99,.TRUE.,clesphy0) 163 175 CALL conf_gcm( 99, .TRUE. , clesphy0 ) 164 call conf_phys(ok_journe, ok_mensuel, ok_instan, & 165 & ok_hf, ok_LES, & 176 call conf_phys( ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES, & 166 177 & solarlong0,seuil_inversion, & 167 178 & fact_cldcon, facttemps,ok_newmicro,iflag_radia, & 168 179 & iflag_cldcon, & 169 & iflag_ratqs,ratqsbas,ratqshaut, 180 & iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, & 170 181 & ok_ade, ok_aie, aerosol_couple, & 182 & flag_aerosol, new_aod, & 171 183 & bl95_b0, bl95_b1, & 172 184 & iflag_thermals,nsplit_thermals,tau_thermals, & 173 185 & iflag_thermals_ed,iflag_thermals_optflux, & 174 & iflag_coupl,iflag_clos,iflag_wake ) 186 & iflag_coupl,iflag_clos,iflag_wake, read_climoz ) 187 188 ! co2_ppm0 : initial value of atmospheric CO2 from .def file (co2_ppm value) 189 co2_ppm0 = co2_ppm 190 175 191 dtvr = daysec/FLOAT(day_step) 176 192 print*,'dtvr',dtvr 177 193 178 179 180 194 CALL iniconst() 181 195 CALL inigeom() 182 196 183 197 ! Initialisation pour traceurs 184 CALL infotrac_init 185 ALLOCATE(q3d(iip1,jjp1,llm,nqtot)) 186 198 call infotrac_init 199 ALLOCATE(q3d(iip1, jjp1, llm, nqtot)) 187 200 188 201 CALL inifilr() 189 CALL phys_state_var_init( )202 CALL phys_state_var_init(read_climoz) 190 203 ! 191 204 latfi(1) = ASIN(1.0) … … 244 257 245 258 write(*,*)'Essai de lecture masque ocean' 246 iret = nf _open("o2a.nc", NF_NOWRITE, nid_o2a)259 iret = nf90_open("o2a.nc", NF90_NOWRITE, nid_o2a) 247 260 if (iret .ne. 0) then 248 261 write(*,*)'ATTENTION!! pas de fichier o2a.nc trouve' … … 263 276 else 264 277 couple = .true. 265 iret = nf _close(nid_o2a)278 iret = nf90_close(nid_o2a) 266 279 call flininfo("o2a.nc", iml_omask, jml_omask, llm_tmp, ttm_tmp 267 280 $ , nid_o2a) … … 400 413 . maxval(qsat(:,:,:)) 401 414 ! 402 WRITE(*,*) 'QSAT :', qsat(10,20,:)415 CC WRITE(*,*) 'QSAT :', qsat(10,20,:) 403 416 ! 404 417 varname = 'q' … … 411 424 q3d(:,:,:,1) = qd(:,:,:) 412 425 ! 426 427 ! Ozone climatology: 428 if (read_climoz >= 1) call regr_lat_time_climoz(read_climoz) 429 413 430 varname = 'tsol' 414 431 ! This line needs to be replaced by a call to restget to get the values in the restart file … … 475 492 . jjm, rlonu, rlatv , interbar ) 476 493 c 477 rugsrel(:) = 0.0478 IF(ok_orodr) THEN479 DO i = 1, iip1* jjp1480 rugsrel(i) = MAX( 1.e-05, zstd(i)* zsig(i) /2. )481 ENDDO482 ENDIF494 cc rugsrel(:) = 0.0 495 cc IF(ok_orodr) THEN 496 cc DO i = 1, iip1* jjp1 497 cc rugsrel(i) = MAX( 1.e-05, zstd(i)* zsig(i) /2. ) 498 cc ENDDO 499 cc ENDIF 483 500 484 501 … … 650 667 itau_phy = 0 651 668 iday = dayref +itau/day_step 652 time = FLOAT(itau-(iday-dayref)*day_step)/day_step669 time = real(itau-(iday-dayref)*day_step)/day_step 653 670 c 654 671 IF(time.GT.1) THEN … … 714 731 q_ancien = 0. 715 732 agesno = 0. 733 c 716 734 frugs(1:klon,is_oce) = rugmer(1:klon) 717 735 frugs(1:klon,is_ter) = MAX(1.0e-05, zstd(1:klon)*zsig(1:klon)/2.0) … … 750 768 751 769 C Sortie Visu pour les champs dynamiques 752 if (1.eq.0 ) then753 print*,'sortie visu'754 time_step = 1.755 t_ops = 2.756 t_wrt = 2.757 itau = 2.758 visu_file='Etat0_visu.nc'759 CALL initdynav(visu_file,dayref,anneeref,time_step,760 . t_ops, t_wrt, visuid)761 CALL writedynav(visuid, itau,vvent ,762 . uvent,tpot,pk,phi,q3d,masse,psol,phis)763 else770 cc if (1.eq.0 ) then 771 cc print*,'sortie visu' 772 cc time_step = 1. 773 cc t_ops = 2. 774 cc t_wrt = 2. 775 cc itau = 2. 776 cc visu_file='Etat0_visu.nc' 777 cc CALL initdynav(visu_file,dayref,anneeref,time_step, 778 cc . t_ops, t_wrt, visuid) 779 cc CALL writedynav(visuid, itau,vvent , 780 cc . uvent,tpot,pk,phi,q3d,masse,psol,phis) 781 cc else 764 782 print*,'CCCCCCCCCCCCCCCCCC REACTIVER SORTIE VISU DANS ETAT0' 765 endif783 cc endif 766 784 print*,'entree histclo' 767 785 CALL histclo 768 769 DEALLOCATE(q3d)770 786 771 787 #endif … … 774 790 ! 775 791 END SUBROUTINE etat0_netcdf 776
Note: See TracChangeset
for help on using the changeset viewer.