- Timestamp:
- 04/03/13 12:05:12 (11 years ago)
- Location:
- codes/icosagcm/trunk/src
- Files:
-
- 12 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/advect_tracer.f90
r148 r149 66 66 CALL transfert_request(f_rhodz,req_i1) 67 67 68 IF (is_mpi_root) PRINT *, 'Advection scheme'68 ! IF (is_mpi_root) PRINT *, 'Advection scheme' 69 69 70 70 ! DO ind=1,ndomain -
codes/icosagcm/trunk/src/caldyn_gcm.f90
r146 r149 11 11 TYPE(t_field),POINTER :: f_buf_v(:), f_buf_s(:), f_buf_p(:) 12 12 13 PUBLIC init_caldyn, caldyn, write_output_fields 13 PUBLIC init_caldyn, caldyn, write_output_fields,un2ulonlat 14 14 15 15 INTEGER :: caldyn_hydrostat, caldyn_conserv … … 722 722 723 723 CALL writefield("ps",f_ps) 724 CALL writefield("dps",f_dps)725 CALL writefield("phis",f_phis)726 CALL vorticity(f_u,f_buf_v)727 CALL writefield("vort",f_buf_v)728 729 CALL w_omega(f_ps, f_u, f_buf_i)730 CALL writefield('omega', f_buf_i)731 IF (out_pression_level<=preff .AND. out_pression_level > 0) THEN732 CALL vertical_interp(f_ps,f_buf_i,f_buf_s,out_pression_level)733 CALL writefield("omega"//TRIM(str_pression),f_buf_s)734 ENDIF724 ! CALL writefield("dps",f_dps) 725 ! CALL writefield("phis",f_phis) 726 ! CALL vorticity(f_u,f_buf_v) 727 ! CALL writefield("vort",f_buf_v) 728 729 ! CALL w_omega(f_ps, f_u, f_buf_i) 730 ! CALL writefield('omega', f_buf_i) 731 ! IF (out_pression_level<=preff .AND. out_pression_level > 0) THEN 732 ! CALL vertical_interp(f_ps,f_buf_i,f_buf_s,out_pression_level) 733 ! CALL writefield("omega"//TRIM(str_pression),f_buf_s) 734 ! ENDIF 735 735 736 736 ! Temperature … … 767 767 ! geopotential 768 768 CALL thetarhodz2geopot(f_ps,f_phis,f_theta_rhodz, f_buf_s,f_buf_p,f_buf1_i,f_buf2_i,f_buf_i) 769 CALL writefield("p",f_buf_p)770 CALL writefield("phi",f_buf_i)771 CALL writefield("theta",f_buf1_i) ! potential temperature772 CALL writefield("pk",f_buf2_i) ! Exner pressure769 ! CALL writefield("p",f_buf_p) 770 ! CALL writefield("phi",f_buf_i) 771 CALL writefield("theta",f_buf1_i) ! potential temperature 772 ! CALL writefield("pk",f_buf2_i) ! Exner pressure 773 773 774 774 -
codes/icosagcm/trunk/src/dissip_gcm.f90
r148 r149 96 96 IF (is_mpi_root) PRINT *, 'Rayleigh friction : Schaer-like mountain with shear DCMIP2.2' 97 97 CASE DEFAULT 98 IF (is_mpi_root) PRINT *, 'Bad selector : rayleigh_friction_type =', TRIM(rayleigh_friction_key), ' in dissip_gcm.f90/init_dissip' 98 IF (is_mpi_root) PRINT *, 'Bad selector : rayleigh_friction_type =', TRIM(rayleigh_friction_key), & 99 ' in dissip_gcm.f90/init_dissip' 99 100 STOP 100 101 END SELECT -
codes/icosagcm/trunk/src/domain.f90
r146 r149 271 271 nf2=domain_glo(edge_glo(e)%assign_domain)%face 272 272 d%edge_assign_sign(k,i,j)=1-2*MOD(12+tab_index(nf,nf2,0),2) 273 IF (MOD(6+k+tab_index(nf,nf2,0),6)/=edge_glo(e)%assign_pos .AND. MOD(6+k+tab_index(nf,nf2,0),6) /= MOD(edge_glo(e)%assign_pos+3,6)) THEN 273 IF (MOD(6+k+tab_index(nf,nf2,0),6)/=edge_glo(e)%assign_pos .AND. MOD(6+k+tab_index(nf,nf2,0),6) & 274 /= MOD(edge_glo(e)%assign_pos+3,6)) THEN 274 275 d%edge_assign_sign(k,i,j)=-d%edge_assign_sign(k,i,j) 275 276 ENDIF -
codes/icosagcm/trunk/src/etat0.f90
r113 r149 1 1 MODULE etat0_mod 2 CHARACTER(len=255),SAVE :: etat0_type 2 3 3 4 CONTAINS … … 12 13 USE etat0_dcmip4_mod, ONLY : etat0_dcmip4=>etat0 13 14 USE etat0_dcmip5_mod, ONLY : etat0_dcmip5=>etat0 15 USE etat0_heldsz_mod, ONLY : etat0_heldsz=>etat0 16 USE dynetat0_gcm_mod, ONLY : dynetat0_start=>etat0 17 USE dynetat0_hz_mod, ONLY : dynetat0_hz=>etat0 18 14 19 IMPLICIT NONE 15 20 TYPE(t_field),POINTER :: f_ps(:) … … 19 24 TYPE(t_field),POINTER :: f_q(:) 20 25 21 CHARACTER(len=255) :: etat0_type22 26 etat0_type='jablonowsky06' 23 27 CALL getin("etat0",etat0_type) … … 28 32 CASE ('academic') 29 33 CALL etat0_academic(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 34 CASE ('heldsz') 35 print*,"heldsz test case" 36 CALL etat0_heldsz(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 30 37 CASE ('dcmip1') 31 38 CALL etat0_dcmip1(f_ps,f_phis,f_theta_rhodz,f_u, f_q) … … 38 45 CASE ('dcmip5') 39 46 CALL etat0_dcmip5(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 47 CASE ('readnf_start') 48 print*,"readnf_start used" 49 CALL dynetat0_start(f_ps,f_phis,f_theta_rhodz,f_u,f_q) 50 CASE ('readnf_hz') 51 print*,"readnf_hz used" 52 CALL dynetat0_hz(f_ps,f_phis,f_theta_rhodz,f_u,f_q) 40 53 CASE DEFAULT 41 54 PRINT*, 'Bad selector for variable etat0 <',etat0_type, & -
codes/icosagcm/trunk/src/icosa_gcm.f90
r131 r149 25 25 CALL init_transfert 26 26 CALL init_writefield 27 27 28 ! CALL allocate_field(sum_ne,field_T,type_real) 28 29 ! CALL allocate_field_glo(sum_ne_glo,field_T,type_real) -
codes/icosagcm/trunk/src/physics.f90
r99 r149 8 8 SUBROUTINE init_physics 9 9 USE icosa 10 USE physics_dcmip_mod, init_physics_dcmip=>init_physics 10 USE physics_dcmip_mod,init_physics_dcmip=>init_physics 11 USE physics_dry_mod 11 12 IMPLICIT NONE 12 13 … … 18 19 CASE ('dcmip') 19 20 CALL init_physics_dcmip 21 22 CASE ('lmd') 23 CALL init_physics_dry 20 24 21 25 CASE DEFAULT 22 PRINT*, 'Bad selector for variable physics <',physics_type, &26 PRINT*, 'Bad selector for variable physics init <',physics_type, & 23 27 '> options are <none>, <dcmip>,' 24 STOP 28 25 29 END SELECT 26 30 27 31 END SUBROUTINE init_physics 28 32 29 SUBROUTINE physics(it, f_phis, f_ps, f_theta_rhodz, f_ue, f_q)33 SUBROUTINE physics(it,jD_cur,jH_cur,f_phis, f_ps, f_theta_rhodz, f_ue, f_q) 30 34 USE icosa 35 USE physics_dry_mod 31 36 USE physics_dcmip_mod, physics_dcmip=>physics 37 USE etat0_mod 38 USE etat0_heldsz_mod 32 39 IMPLICIT NONE 33 40 INTEGER, INTENT(IN) :: it 41 REAL(rstd),INTENT(IN)::jD_cur,jH_cur 34 42 TYPE(t_field),POINTER :: f_phis(:) 35 43 TYPE(t_field),POINTER :: f_ps(:) … … 37 45 TYPE(t_field),POINTER :: f_ue(:) 38 46 TYPE(t_field),POINTER :: f_q(:) 47 LOGICAL:: firstcall,lastcall 39 48 40 49 SELECT CASE(TRIM(physics_type)) 41 50 CASE ('none') 51 52 SELECT CASE(TRIM(etat0_type)) 53 CASE('heldsz') 54 ! CALL transfert_request(f_ps,req_i1) 55 ! CALL transfert_request(f_theta_rhodz,req_i1) 56 ! CALL transfert_request(f_ue,req_e1_vect) 57 ! CALL held_saurez(f_ps,f_theta_rhodz,f_ue) 58 CASE DEFAULT 59 PRINT*,"NO PHYSICAL PACAKAGE USED" 60 END SELECT 42 61 43 62 CASE ('dcmip') 44 63 CALL physics_dcmip(it, f_phis, f_ps, f_theta_rhodz, f_ue, f_q) 64 65 CASE ('dry') 66 CALL physics_dry(it,jD_cur,jH_cur,f_phis, f_ps, f_theta_rhodz, f_ue, f_q) 45 67 46 68 CASE DEFAULT 47 69 PRINT*, 'Bad selector for variable physics <',physics_type, & 48 70 '> options are <none>, <dcmip>,' 49 71 STOP 50 72 END SELECT 51 73 -
codes/icosagcm/trunk/src/time.f90
r132 r149 11 11 INTEGER,SAVE :: itau_out, itau_adv, itau_dissip, itau_physics, itaumax 12 12 13 INTEGER,SAVE :: day_step,ndays 14 REAL(rstd),SAVE :: jD_ref,jH_ref 15 INTEGER,SAVE :: day_ini,day_end,annee_ref,day_ref 16 REAL(rstd),SAVE::start_time 17 CHARACTER(LEN=255) :: time_style 18 INTEGER,SAVE:: an, mois, jour 19 REAL(rstd),SAVE:: heure 20 CHARACTER (LEN=10):: calend 21 13 22 PUBLIC create_time_counter_header, update_time_counter, close_time_counter, init_time, & 14 dt, write_period, itau_out, itau_adv, itau_dissip, itau_physics, itaumax 23 dt, write_period, itau_out, itau_adv, itau_dissip, itau_physics, itaumax, & 24 day_step,ndays,jD_ref,jH_ref,day_ini,day_end,annee_ref,day_ref,an, mois, jour,heure, & 25 calend,time_style 26 15 27 16 28 … … 24 36 IMPLICIT NONE 25 37 REAL(rstd) :: run_length 26 38 39 40 time_style='dcmip' 41 CALL getin('time_style',time_style) 42 43 IF (TRIM(time_style)=='dcmip') Then 27 44 dt=90. 28 45 CALL getin('dt',dt) … … 30 47 itaumax=100 31 48 CALL getin('itaumax',itaumax) 32 33 itau_adv=134 CALL getin('itau_adv',itau_adv)35 36 itau_dissip=137 CALL getin('itau_dissip',itau_dissip)38 39 itau_physics=140 CALL getin('itau_physics',itau_physics)41 49 42 50 run_length=dt*itaumax … … 54 62 itau_out=FLOOR(.5+write_period/dt) 55 63 IF (is_mpi_root) PRINT *, 'Output frequency (scaled) set to ',write_period, ' : itau_out = ',itau_out 64 ENDIF 65 66 itau_adv=1 67 CALL getin('itau_adv',itau_adv) 68 69 itau_dissip=1 70 CALL getin('itau_dissip',itau_dissip) 71 72 itau_physics=1 73 CALL getin('itau_physics',itau_physics) 74 56 75 57 76 CALL create_time_counter_header -
codes/icosagcm/trunk/src/timeloop_gcm.f90
r148 r149 19 19 USE physics_mod 20 20 USE mpipara 21 USE IOIPSL 22 USE maxicosa 23 USE check_conserve_mod 21 24 USE trace 22 25 USE transfert_mod … … 43 46 REAL(rstd),POINTER :: dtheta_rhodz(:,:),dtheta_rhodzm1(:,:),dtheta_rhodzm2(:,:) 44 47 REAL(rstd),POINTER :: hflux(:,:),wflux(:,:),hfluxt(:,:),wfluxt(:,:) 45 46 48 ! REAL(rstd) :: dt, run_length 47 49 INTEGER :: ind … … 49 51 CHARACTER(len=255) :: scheme_name 50 52 LOGICAL :: fluxt_zero(ndomain) ! set to .TRUE. to start accumulating fluxes in time 53 CHARACTER(len=7) :: first 54 REAL(rstd),SAVE :: jD_cur, jH_cur 55 REAL(rstd),SAVE :: start_time 51 56 LOGICAL, PARAMETER :: check=.FALSE. 52 57 ! INTEGER :: itaumax … … 88 93 CALL allocate_field(f_wfluxt,field_t,type_real,llm+1) 89 94 95 !---------------------------------------------------- 96 IF (TRIM(time_style)=='lmd') Then 97 98 day_step=180 99 CALL getin('day_step',day_step) 100 101 ndays=1 102 CALL getin('ndays',ndays) 103 104 dt = daysec/REAL(day_step) 105 itaumax = ndays*day_step 106 107 calend = 'earth_360d' 108 CALL getin('calend', calend) 109 110 day_ini = 0 111 CALL getin('day_ini',day_ini) 112 113 day_end = 0 114 CALL getin('day_end',day_end) 115 116 annee_ref = 1998 117 CALL getin('annee_ref',annee_ref) 118 119 start_time = 0 120 CALL getin('start_time',start_time) 121 122 write_period=0 123 CALL getin('write_period',write_period) 124 125 write_period=write_period/scale_factor 126 itau_out=FLOOR(write_period/dt) 127 128 PRINT *, 'Output frequency (scaled) set to ',write_period, ' : itau_out = ',itau_out 129 130 mois = 1 ; heure = 0. 131 call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref) 132 jH_ref = jD_ref - int(jD_ref) 133 jD_ref = int(jD_ref) 134 135 CALL ioconf_startdate(INT(jD_ref),jH_ref) 136 write(*,*)'annee_ref, mois, day_ref, heure, jD_ref' 137 write(*,*)annee_ref, mois, day_ref, heure, jD_ref 138 write(*,*)"ndays,day_step,itaumax,dt======>" 139 write(*,*)ndays,day_step,itaumax,dt 140 call ju2ymds(jD_ref+jH_ref,an, mois, jour, heure) 141 write(*,*)'jD_ref+jH_ref,an, mois, jour, heure' 142 write(*,*)jD_ref+jH_ref,an, mois, jour, heure 143 day_end = day_ini + ndays 144 END IF 145 !---------------------------------------------------- 146 90 147 scheme_name='runge_kutta' 91 148 CALL getin('scheme',scheme_name) … … 126 183 ! CALL allocate_field(f_dtheta_rhodzm1,field_t,type_real,llm) 127 184 ! CALL allocate_field(f_dtheta_rhodzm2,field_t,type_real,llm) 128 129 185 ! CALL allocate_field(f_theta,field_t,type_real,llm) 130 186 ! CALL allocate_field(f_dtheta,field_t,type_real,llm) … … 135 191 CALL init_advect_tracer 136 192 CALL init_physics 137 138 139 CALL etat0(f_ps,f_phis,f_theta_rhodz,f_u, 193 !========================================= INITIALIZATION 194 ! CALL dynetat0(f_ps,f_phis,f_theta_rhodz,f_u,f_q) 195 CALL etat0(f_ps,f_phis,f_theta_rhodz,f_u,f_q) 140 196 CALL writefield("phis",f_phis,once=.TRUE.) 141 197 CALL transfert_request(f_q,req_i1) … … 158 214 CALL compute_rhodz(.FALSE., ps, rhodz) 159 215 END DO 160 216 161 217 CALL transfert_request(f_phis,req_i0) 218 CALL transfert_request(f_phis,req_i1) 162 219 CALL transfert_request(f_phis,req_i1) 163 220 … … 170 227 ENDIF 171 228 172 IF (is_mpi_root) PRINT *,"It No :",It," t :",dt*It173 229 IF (mod(it,itau_out)==0 ) THEN 174 CALL writefield("q",f_q) 230 ! IF (is_mpi_root) PRINT *,"It No :",It," t :",dt*It 175 231 CALL update_time_counter(dt*it) 232 CALL compute_conserve(f_ps,f_dps,f_u,f_theta_rhodz,f_phis,it) 176 233 ENDIF 177 178 CALL guided(it*dt,f_ps,f_theta_rhodz,f_u,f_q)234 235 CALL guided(it*dt,f_ps,f_theta_rhodz,f_u,f_q) 179 236 180 237 DO stage=1,nb_stage … … 189 246 CASE (mlf) 190 247 CALL leapfrog_matsuno_scheme(stage) 191 192 248 ! CASE ('leapfrog') 193 ! 249 ! CALL leapfrog_scheme 194 250 ! 195 251 ! CASE ('adam_bashforth') 196 ! 197 ! 252 ! CALL dissip(f_u,f_du,f_ps,f_phis, f_theta_rhodz,f_dtheta_rhodz) 253 ! CALL adam_bashforth_scheme 198 254 CASE DEFAULT 199 255 STOP … … 208 264 IF(MOD(it+1,itau_adv)==0) THEN 209 265 ! CALL transfert_request(f_wfluxt,req_i1) ! FIXME 210 ! 266 ! CALL transfert_request(f_hfluxt,req_e1) ! FIXME 211 267 212 268 CALL advect_tracer(f_hfluxt,f_wfluxt,f_u, f_q,f_rhodz) ! update q and rhodz after RK step … … 227 283 END DO 228 284 ENDIF 229 230 285 END IF 231 286 !---------------------------------------------------- 287 jD_cur = jD_ref + day_ini - day_ref + it/day_step 288 jH_cur = jH_ref + start_time + mod(it,day_step)/float(day_step) 289 jD_cur = jD_cur + int(jH_cur) 290 jH_cur = jH_cur - int(jH_cur) 291 ! print*,"Just b4 phys" 292 CALL physics(it,jD_cur,jH_cur,f_phis, f_ps, f_theta_rhodz, f_u, f_q) 293 !---------------------------------------------------- 232 294 ! CALL physics(it,f_phis, f_ps, f_theta_rhodz, f_u, f_q) 233 295 ENDDO … … 493 555 DO i=ii_begin-dd,ii_end+dd 494 556 ij=(j-1)*iim+i 495 m = ( ap(l) - ap(l+1) + (bp(l)-bp(l+1))*ps(ij) )/g 557 m = ( ap(l) - ap(l+1) + (bp(l)-bp(l+1))*ps(ij) )/g 496 558 IF(comp) THEN 497 559 rhodz(ij,l) = m … … 508 570 STOP 509 571 ELSE 510 !PRINT *, 'No discrepancy between ps and rhodz detected'572 PRINT *, 'No discrepancy between ps and rhodz detected' 511 573 END IF 512 574 END IF
Note: See TracChangeset
for help on using the changeset viewer.