Changeset 3749
- Timestamp:
- Apr 30, 2025, 5:54:41 PM (3 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F
r3718 r3749 20 20 use comcstfi_mod, only: pi, cpp, rad, g, r, 21 21 & mugaz, rcp, omeg 22 use time_phylmdz_mod, only: daysec, dtphys, d ay_step, ecritphy,22 use time_phylmdz_mod, only: daysec, dtphys, diagfi_output_rate, 23 23 & nday, iphysiq 24 24 use callkeys_mod, only: tracer, specOLR,pceil,haze … … 80 80 INTEGER lecttsoil ! lecture of tsoil from proftsoil 81 81 INTEGER lecthaze ! lecture of haze from profhaze 82 REAL day ! date durant le run 82 REAL day ! date during the run 83 INTEGER day_step ! number of time steps per day 83 84 REAL time ! time (0<time<1 ; time=0.5 a midi) 84 85 REAL play(llm) ! Pressure at the middle of the layers (Pa) … … 528 529 write(*,*) " day_step = ",day_step 529 530 530 iphysiq=1 ! in 1D model physics are called evry time step 531 ecritphy=day_step ! default value for ecritphy 531 diagfi_output_rate=24 ! default value for diagfi_output_rate 532 532 PRINT *,'Nunber of steps between writediagfi ?' 533 call getin(" ecritphy",ecritphy)534 write(*,*) " ecritphy = ",ecritphy533 call getin("diagfi_output_rate",diagfi_output_rate) 534 write(*,*) " diagfi_output_rate = ",diagfi_output_rate 535 535 536 536 ndt=10 ! default value for ndt -
trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90
r3684 r3749 18 18 use comgeomfi_h, only: totarea, totarea_planet 19 19 use comsoil_h, only: ini_comsoil_h, nsoilmx, lay1_soil, alpha_soil 20 use time_phylmdz_mod, only: ecritphy,day_step,iphysiq, &20 use time_phylmdz_mod, only: diagfi_output_rate, & 21 21 init_time, daysec, dtphys 22 22 use comcstfi_mod, only: rad, cpp, g, r, rcp, & … … 83 83 REAL SSUM 84 84 85 ! deprecated parameter 85 ! deprecated parameters 86 REAL :: ecritphy ! to check that this obsolete flag is no longer used... 86 87 logical aerohaze 87 88 … … 104 105 #endif 105 106 107 106 108 ! read in some parameters from "run.def" for physics, 107 109 ! or shared between dynamics and physics. 110 ecritphy=-666 ! dummy default value 108 111 call getin_p("ecritphy",ecritphy) ! frequency of outputs in physics, 109 112 ! in dynamical steps 110 call getin_p("day_step",day_step) ! number of dynamical steps per day 111 call getin_p("iphysiq",iphysiq) ! call physics every iphysiq dyn step 113 if (ecritphy/=-666) then 114 call abort_physic(rname, & 115 "Error: parameter ecritphy is obsolete! Remove it! "//& 116 "And use diagfi_output_rate instead",1) 117 endif 112 118 113 119 ! do we read a startphy.nc file? (default: .true.) … … 164 170 call getin_p("tracer",tracer) 165 171 if (is_master) write(*,*) trim(rname)//": tracer = ",tracer 172 173 if (is_master) write(*,*) trim(rname)//& 174 ": Output rate for diagfi.nc file (in physics steps) ?" 175 diagfi_output_rate=24 !default value 176 call getin_p("diagfi_output_rate",diagfi_output_rate) 177 if (is_master) write(*,*) trim(rname)//": diagfi_output_rate = ",& 178 diagfi_output_rate 166 179 167 180 if (is_master) write(*,*) trim(rname)//& -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3698 r3749 35 35 alpha_lift, alpha_devil, qextrhor, & 36 36 nesp, is_chim 37 use time_phylmdz_mod, only: ecritphy, iphysiq, nday37 use time_phylmdz_mod, only: diagfi_output_rate, nday 38 38 use phyetat0_mod, only: phyetat0,tab_cntrl_mod 39 39 use wstats_mod, only: callstats, wstats, mkstats … … 1858 1858 1859 1859 if(meanOLR .and. is_master)then 1860 if((ngrid.gt.1) .or. (mod(icount-1, ecritphy).eq.0))then1860 if((ngrid.gt.1) .or. (mod(icount-1,diagfi_output_rate).eq.0))then 1861 1861 ! to record global radiative balance 1862 1862 open(92,file="rad_bal.out",form='formatted',position='append') … … 2110 2110 ! containing any variable for diagnostic 2111 2111 ! 2112 ! Note 1 : output with period " ecritphy", set in "run.def"2112 ! Note 1 : output with period "diagfi_output_rate", set in "run.def" 2113 2113 ! Note 2 : writediagfi can also be called from any other subroutine 2114 2114 ! for any variable, but its preferable to keep all the … … 2208 2208 call write_output('dtaui_01','Layer optical thickness attenuation in IR band','',int_dtaui(:,nlayer:1:-1,1)) 2209 2209 call write_output('dtaui_17','Layer optical thickness attenuation in IR band','',int_dtaui(:,nlayer:1:-1,17)) 2210 2210 2211 2211 ! Temporary inclusions for heating diagnostics. 2212 2212 if (.not.fast) then -
trunk/LMDZ.PLUTO/libf/phypluto/time_phylmdz_mod.F90
r3184 r3749 4 4 REAL,SAVE :: dtphys ! physics time step (s) 5 5 !$OMP THREADPRIVATE(dtphys) 6 INTEGER,SAVE :: day_step ! number of dynamical steps per day7 ! (set via inifis)8 !$OMP THREADPRIVATE(day_step)9 6 INTEGER,SAVE :: nday ! number of days to run 10 7 !$OMP THREADPRIVATE(nday) … … 14 11 !$OMP THREADPRIVATE(day_ini) 15 12 16 INTEGER,SAVE :: ecritphy ! for diagfi.nc outputs, write every ecritphy 17 ! dynamical steps (set via inifis) 18 !$OMP THREADPRIVATE(ecritphy) 19 INTEGER,SAVE :: iphysiq ! call physics every iphysiq dynamical step 20 ! (set via inifis) 21 !$OMP THREADPRIVATE(iphysiq) 13 INTEGER,SAVE :: diagfi_output_rate ! for diagfi.nc outputs, write every diagfi_output_rate physical steps (set via inifis) 14 !$OMP THREADPRIVATE(diagfi_output_rate) 22 15 23 16 CONTAINS … … 29 22 INTEGER,INTENT(IN) :: nday_ 30 23 REAL,INTENT(IN) :: dtphys_ 31 24 32 25 day_ini=day_ini_ 33 26 daysec=daysec_ … … 37 30 END SUBROUTINE init_time 38 31 39 END MODULE time_phylmdz_mod 32 END MODULE time_phylmdz_mod -
trunk/LMDZ.PLUTO/libf/phypluto/writediagfi.F
r3623 r3749 8 8 ! (ou encore 1d, dans le cas de testphys1d, pour sortir une colonne) 9 9 ! La periode d'ecriture est donnee par 10 ! " ecritphy" regle dans le fichier de controle de run : run.def10 ! "diagfi_output_rate " regle dans le fichier de controle de run : run.def 11 11 ! 12 12 ! writediagfi peut etre appele de n'importe quelle subroutine … … 41 41 use surfdat_h, only: phisfi 42 42 use geometry_mod, only: cell_area 43 use time_phylmdz_mod, only: ecritphy, day_step, iphysiq, day_ini 43 use time_phylmdz_mod, only: diagfi_output_rate,dtphys,daysec 44 use time_phylmdz_mod, only: day_ini 44 45 USE mod_phys_lmdz_para, only : is_parallel, is_mpi_root, 45 46 & is_master, gather … … 73 74 REAL area((nbp_lon+1),nbp_lat) 74 75 75 integer i rythme76 integer isample 76 77 integer ierr,ierr2 77 78 integer i,j,l, ig0 … … 121 122 122 123 !*************************************************************** 123 ! Sortie des variables au rythme voulu124 125 i rythme = int(ecritphy) ! output rate set by ecritphy124 !Output rate 125 126 isample = diagfi_output_rate 126 127 127 128 !*************************************************************** … … 272 273 !------------------------------------------------------------------------ 273 274 if (nom.eq.firstnom) then 274 zitau = zitau + iphysiq275 zitau = zitau + 1 275 276 end if 276 277 … … 279 280 !-------------------------------------------------------- 280 281 281 if ( MOD(zitau+1,i rythme) .eq.0.) then282 if ( MOD(zitau+1,isample) .eq.0.) then 282 283 283 284 ! Compute/write/extend 'Time' coordinate (date given in days) … … 292 293 ntime=ntime+1 ! increment # of stored time steps 293 294 ! compute corresponding date (in days and fractions thereof) 294 date=(zitau +1.) /day_step295 date=(zitau +1.)*(dtphys/daysec) 295 296 ! Get NetCDF ID of 'Time' variable 296 297 ierr= NF_INQ_VARID(nid,"Time",varid) … … 624 625 endif ! of if (dim.eq.3) elseif(dim.eq.2)... 625 626 626 endif ! of if ( MOD(zitau+1,i rythme) .eq.0.)627 endif ! of if ( MOD(zitau+1,isample) .eq.0.) 627 628 628 629 if (is_master) then -
trunk/LMDZ.PLUTO/libf/phypluto/writediagsoil.F90
r3698 r3749 20 20 use comsoil_h, only: nsoilmx, inertiedat 21 21 use geometry_mod, only: cell_area 22 use time_phylmdz_mod, only: ecritphy, day_step, iphysiq22 use time_phylmdz_mod, only: diagfi_output_rate,dtphys,daysec,day_ini 23 23 use mod_phys_lmdz_para, only : is_mpi_root, is_master, gather 24 24 use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo, & … … 100 100 101 101 ! Set output sample rate 102 isample=int(ecritphy) ! same as for diagfi outputs 103 ! Note ecritphy is known from control.h 102 isample=diagfi_output_rate ! same as for diagfi outputs 104 103 105 104 ! Create output NetCDF file … … 164 163 if (name.eq.firstname) then 165 164 ! if we run across 'firstname', then it is a new time step 166 zitau=zitau+ iphysiq165 zitau=zitau+1 167 166 ! Note iphysiq is known from control.h 168 167 endif … … 174 173 if (name.eq.firstname) then 175 174 ntime=ntime+1 176 date= float(zitau+1)/float(day_step)175 date=(zitau +1.)*(dtphys/daysec) 177 176 ! Note: day_step is known from control.h 178 177 -
trunk/LMDZ.PLUTO/libf/phypluto/writediagspecIR.F
r3184 r3749 1 1 subroutine writediagspecIR(ngrid,nom,titre,unite,dimpx,px) 2 2 3 ! Ecriture de variables diagnostiques au choix dans la physique 3 ! Ecriture de variables diagnostiques au choix dans la physique 4 4 ! dans un fichier NetCDF nomme 'diagfi'. Ces variables peuvent etre 5 5 ! 3d (ex : temperature), 2d (ex : temperature de surface), ou 6 6 ! 0d (pour un scalaire qui ne depend que du temps : ex : la longitude 7 7 ! solaire) 8 ! Dans la version 2000, la periode d'ecriture est celle de 9 ! " ecritphy" regle dans le fichier de controle de run : run.def8 ! Dans la version 2000, la periode d'ecriture est celle de 9 ! "diagfi_output_rate " regle dans le fichier de controle de run : run.def 10 10 ! 11 11 ! writediagfi peut etre appele de n'importe quelle subroutine … … 15 15 ! WARNING : les variables dynamique (u,v,t,q,ps) 16 16 ! sauvees par writediagfi avec une 17 ! date donnee sont legerement differentes que dans le fichier histoire car 17 ! date donnee sont legerement differentes que dans le fichier histoire car 18 18 ! on ne leur a pas encore ajoute de la dissipation et de la physique !!! 19 19 ! IL est RECOMMANDE d'ajouter les tendance physique a ces variables 20 20 ! avant l'ecriture dans diagfi (cf. physiq.F) 21 ! 21 ! 22 22 ! 23 23 ! parametres (input) : … … 26 26 ! (ngrid = 2+(jjm-1)*iim - 1/jjm) 27 27 ! (= nlon ou klon dans la physique terrestre) 28 ! 28 ! 29 29 ! unit : unite logique du fichier de sortie (toujours la meme) 30 30 ! nom : nom de la variable a sortir (chaine de caracteres) … … 40 40 ! 41 41 !================================================================= 42 42 43 43 ! Addition by RW (2010) to allow OLR to be saved in .nc format 44 44 use radinc_h, only : L_NSPECTI … … 48 48 & nbp_lon, nbp_lat, grid_type, 49 49 & unstructured 50 use time_phylmdz_mod, only: ecritphy, iphysiq, day_step, day_ini 50 use time_phylmdz_mod, only: diagfi_output_rate,dtphys,daysec 51 use time_phylmdz_mod, only: day_ini 51 52 use callkeys_mod, only: iradia 52 53 … … 67 68 ! real dx0 68 69 69 integer i rythme70 integer isample 70 71 integer ierr 71 72 integer iq … … 99 100 real areafi_glo(ngrid) ! mesh area on global physics grid 100 101 #endif 101 if (grid_type == unstructured) then 102 return 102 if (grid_type == unstructured) then 103 return 103 104 endif 104 105 … … 106 107 !Sortie des variables au rythme voulu 107 108 108 i rythme = ecritphy*iradia ! sortie au rythme de ecritphy*iradia109 isample = diagfi_output_rate*iradia ! sortie au rythme de diagfi_output_rate*iradia 109 110 !EM+JL if the spetra need to be output more frequently, need to define a ecritSpec... 110 ! i rythme = iphysiq ! sortie a tous les pas physique111 ! isample = iphysiq ! sortie a tous les pas physique 111 112 112 113 … … 193 194 !------------------------------------------------------------------------ 194 195 if (nom.eq.firstnom) then 195 zitau = zitau + iphysiq196 zitau = zitau + 1 196 197 end if 197 198 … … 200 201 !-------------------------------------------------------- 201 202 202 if ( MOD(zitau+1,i rythme) .eq.0.) then203 if ( MOD(zitau+1,isample) .eq.0.) then 203 204 204 205 ! Compute/write/extend 'Time' coordinate (date given in days) … … 213 214 ntime=ntime+1 ! increment # of stored time steps 214 215 ! compute corresponding date (in days and fractions thereof) 215 date= float (zitau +1) /float (day_step)216 date= float (zitau +1)*(dtphys/daysec) 216 217 217 218 if (is_master) then … … 228 229 write(*,*) "***** PUT_VAR matter in writediagspec_nc" 229 230 write(*,*) "***** with time" 230 write(*,*) 'ierr=', ierr 231 write(*,*) 'ierr=', ierr 231 232 c call abort 232 233 endif … … 237 238 238 239 239 240 240 241 !Case of a 3D variable 241 242 !--------------------- … … 327 328 write(*,*) 'ierr=', ierr 328 329 call abort 329 endif 330 endif 330 331 331 332 endif ! of if (is_master) … … 333 334 endif ! of if (dimpx.eq.3) 334 335 335 endif ! of if ( MOD(zitau+1,i rythme) .eq.0.)336 endif ! of if ( MOD(zitau+1,isample) .eq.0.) 336 337 337 338 ! Close the NetCDF file -
trunk/LMDZ.PLUTO/libf/phypluto/writediagspecVI.F
r3184 r3749 1 1 subroutine writediagspecVI(ngrid,nom,titre,unite,dimpx,px) 2 2 3 ! Ecriture de variables diagnostiques au choix dans la physique 3 ! Ecriture de variables diagnostiques au choix dans la physique 4 4 ! dans un fichier NetCDF nomme 'diagfi'. Ces variables peuvent etre 5 5 ! 3d (ex : temperature), 2d (ex : temperature de surface), ou 6 6 ! 0d (pour un scalaire qui ne depend que du temps : ex : la longitude 7 7 ! solaire) 8 ! Dans la version 2000, la periode d'ecriture est celle de 9 ! " ecritphy" regle dans le fichier de controle de run : run.def8 ! Dans la version 2000, la periode d'ecriture est celle de 9 ! "diagfi_output_rate " regle dans le fichier de controle de run : run.def 10 10 ! 11 11 ! writediagfi peut etre appele de n'importe quelle subroutine … … 15 15 ! WARNING : les variables dynamique (u,v,t,q,ps) 16 16 ! sauvees par writediagfi avec une 17 ! date donnee sont legerement differentes que dans le fichier histoire car 17 ! date donnee sont legerement differentes que dans le fichier histoire car 18 18 ! on ne leur a pas encore ajoute de la dissipation et de la physique !!! 19 19 ! IL est RECOMMANDE d'ajouter les tendance physique a ces variables 20 20 ! avant l'ecriture dans diagfi (cf. physiq.F) 21 ! 21 ! 22 22 ! 23 23 ! parametres (input) : … … 26 26 ! (ngrid = 2+(jjm-1)*iim - 1/jjm) 27 27 ! (= nlon ou klon dans la physique terrestre) 28 ! 28 ! 29 29 ! unit : unite logique du fichier de sortie (toujours la meme) 30 30 ! nom : nom de la variable a sortir (chaine de caracteres) … … 40 40 ! 41 41 !================================================================= 42 42 43 43 ! Addition by RW (2010) to allow OSR to be saved in .nc format 44 44 use radinc_h, only : L_NSPECTV … … 48 48 & nbp_lon, nbp_lat, grid_type, 49 49 & unstructured 50 use time_phylmdz_mod, only: ecritphy, iphysiq, day_step, day_ini 50 use time_phylmdz_mod, only: diagfi_output_rate,dtphys,daysec 51 use time_phylmdz_mod, only: day_ini 51 52 use callkeys_mod, only: iradia 52 53 … … 67 68 ! real dx0 68 69 69 integer i rythme70 integer isample 70 71 integer ierr 71 72 integer iq … … 99 100 real areafi_glo(ngrid) ! mesh area on global physics grid 100 101 #endif 101 if (grid_type == unstructured) then 102 if (grid_type == unstructured) then 102 103 return 103 104 endif … … 106 107 !Sortie des variables au rythme voulu 107 108 108 i rythme = ecritphy*iradia ! sortie au rythme de ecritphy109 isample = diagfi_output_rate*iradia ! sortie au rythme de diagfi_output_rate 109 110 !EM+JL if the spetra need to be output more frequently, need to define a ecritSpec... 110 ! i rythme = iphysiq! sortie a tous les pas physique111 ! isample = diagfi_output_rate ! sortie a tous les pas physique 111 112 112 113 !*************************************************************** … … 192 193 !------------------------------------------------------------------------ 193 194 if (nom.eq.firstnom) then 194 zitau = zitau + iphysiq195 zitau = zitau + 1 195 196 end if 196 197 … … 199 200 !-------------------------------------------------------- 200 201 201 if ( MOD(zitau+1,i rythme) .eq.0.) then202 if ( MOD(zitau+1,isample) .eq.0.) then 202 203 203 204 ! Compute/write/extend 'Time' coordinate (date given in days) … … 212 213 ntime=ntime+1 ! increment # of stored time steps 213 214 ! compute corresponding date (in days and fractions thereof) 214 date= float (zitau +1) /float (day_step)215 date= float (zitau +1)*(dtphys/daysec) 215 216 216 217 if (is_master) then … … 227 228 write(*,*) "***** PUT_VAR matter in writediagspec_nc" 228 229 write(*,*) "***** with time" 229 write(*,*) 'ierr=', ierr 230 write(*,*) 'ierr=', ierr 230 231 c call abort 231 232 endif … … 236 237 237 238 238 239 239 240 !Case of a 3D variable 240 241 !--------------------- … … 326 327 write(*,*) 'ierr=', ierr 327 328 call abort 328 endif 329 endif 329 330 330 331 endif ! of if (is_master)
Note: See TracChangeset
for help on using the changeset viewer.