Changeset 3317 for trunk/LMDZ.COMMON/libf/evolution
- Timestamp:
- Apr 25, 2024, 5:16:51 PM (7 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3313 r3317 283 283 == 23/04/2024 == JBC 284 284 Small correction about the dimension of an array. 285 286 == 25/04/2024 == JBC 287 The "start" and "startfi" file names are renamed to match those from the Mars PCM. This is necessary to initialize correctly the 3D PEM with "phys_state_var_init_mod.F90". -
trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh
r3296 r3317 190 190 echo "Run PEM $iPEM..." 191 191 cp run_PEM.def run.def 192 mv startfi.nc startfi_evol.nc193 if [ -f "start.nc" ]; then194 mv start.nc start_evol.nc195 elif [ -f "start1D.txt" ]; then196 mv start1D.txt start1D_evol.txt197 fi198 192 ./$exePEM > out_runPEM${iPEM} 2>&1 199 if [ ! -f "restartfi _evol.nc" ]; then # Check if run ended abnormally193 if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally 200 194 echo "Error: the run PEM $iPEM crashed!" 201 195 exit 1 … … 209 203 cp restartpem.nc starts/startpem${iPEM}.nc 210 204 mv restartpem.nc startpem.nc 211 cp restartfi _evol.nc starts/startfi_postPEM${iPEM}.nc212 mv restartfi _evol.nc startfi.nc213 if [ -f "restart _evol.nc" ]; then214 cp restart _evol.nc starts/restart_postPEM${iPEM}.nc215 mv restart _evol.nc start.nc216 elif [ -f "restart1D _evol.txt" ]; then217 cp restart1D _evol.txt starts/restart1D_postPEM${iPEM}.txt218 mv restart1D _evol.txt start1D.txt205 cp restartfi.nc starts/startfi_postPEM${iPEM}.nc 206 mv restartfi.nc startfi.nc 207 if [ -f "restart.nc" ]; then 208 cp restart.nc starts/restart_postPEM${iPEM}.nc 209 mv restart.nc start.nc 210 elif [ -f "restart1D.txt" ]; then 211 cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt 212 mv restart1D.txt start1D.txt 219 213 fi 220 214 ((iPEM++)) … … 274 268 echo "Run PEM $iPEM..." 275 269 cp run_PEM.def run.def 276 mv startfi.nc startfi_evol.nc277 if [ -f "start.nc" ]; then278 mv start.nc start_evol.nc279 elif [ -f "start1D.txt" ]; then280 mv start1D.txt start1D_evol.txt281 fi282 270 ./$exePEM > out_runPEM${iPEM} 2>&1 283 if [ ! -f "restartfi _evol.nc" ]; then # Check if run ended abnormally271 if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally 284 272 echo "Error: the run PEM $iPEM crashed!" 285 273 exit 1 … … 293 281 cp restartpem.nc starts/startpem${iPEM}.nc 294 282 mv restartpem.nc startpem.nc 295 cp restartfi _evol.nc starts/startfi_postPEM${iPEM}.nc296 mv restartfi _evol.nc startfi.nc297 if [ -f "restart _evol.nc" ]; then298 cp restart _evol.nc starts/restart_postPEM${iPEM}.nc299 mv restart _evol.nc start.nc300 elif [ -f "restart1D _evol.txt" ]; then301 cp restart1D _evol.txt starts/restart1D_postPEM${iPEM}.txt302 mv restart1D _evol.txt start1D.txt283 cp restartfi.nc starts/startfi_postPEM${iPEM}.nc 284 mv restartfi.nc startfi.nc 285 if [ -f "restart.nc" ]; then 286 cp restart.nc starts/restart_postPEM${iPEM}.nc 287 mv restart.nc start.nc 288 elif [ -f "restart1D.txt" ]; then 289 cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt 290 mv restart1D.txt start1D.txt 303 291 fi 304 292 ((iPEM++)) -
trunk/LMDZ.COMMON/libf/evolution/layering_mod.F90
r3308 r3317 31 31 real :: thickness ! Layer thickness [m] 32 32 real :: top_elevation ! Layer top_elevation (top height from the surface) [m] 33 real :: co2ice_volfrac ! CO2 ice volum ic fraction34 real :: h2oice_volfrac ! H2O ice volum ic fraction35 real :: dust_volfrac ! Dust volum ic fraction36 real :: air_volfrac ! Air volum ic fraction inside pores33 real :: co2ice_volfrac ! CO2 ice volumetric fraction 34 real :: h2oice_volfrac ! H2O ice volumetric fraction 35 real :: dust_volfrac ! Dust volumetric fraction 36 real :: air_volfrac ! Air volumetric fraction inside pores 37 37 type(stratum), pointer :: up => null() ! Upper stratum (next node) 38 38 type(stratum), pointer :: down => null() ! Lower stratum (previous node) … … 122 122 ! Verification of volume fraction 123 123 if (abs(1. - (str%co2ice_volfrac + str%h2oice_volfrac + str%dust_volfrac + str%air_volfrac)) > tol) & 124 error stop 'add_stratum: properties for the new stratum are not possible (sum of volum ic fraction /= 1)!'124 error stop 'add_stratum: properties for the new stratum are not possible (sum of volumetric fraction /= 1)!' 125 125 126 126 ! Increment the number of strata … … 175 175 ! Verification of volume fraction 176 176 if (abs(1. - (str%co2ice_volfrac + str%h2oice_volfrac + str%dust_volfrac + str%air_volfrac)) > tol) & 177 error stop 'insert_stratum: properties for the new stratum are not possible (sum of volum ic fraction /= 1)!'177 error stop 'insert_stratum: properties for the new stratum are not possible (sum of volumetric fraction /= 1)!' 178 178 179 179 ! Increment the number of strata -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3308 r3317 2 2 ! I Initialization 3 3 ! I_a Read the "run.def" 4 ! I_b Read the "start _evol.nc" and "startfi_evol.nc"4 ! I_b Read the "start.nc" and "startfi.nc" 5 5 ! I_c Subslope parametrisation 6 6 ! I_d Read the PCM data and convert them to the physical grid … … 22 22 ! III Output 23 23 ! III_a Update surface value for the PCM start files 24 ! III_b Write the "restart _evol.nc" and "restartfi_evol.nc"24 ! III_b Write the "restart.nc" and "restartfi.nc" 25 25 ! III_c Write the "restartpem.nc" 26 26 !------------------------ … … 130 130 131 131 ! Variables to read start.nc 132 character(*), parameter :: start_name = "start _evol.nc" ! Name of the file used to initialize the PEM132 character(*), parameter :: start_name = "start.nc" ! Name of the file used to initialize the PEM 133 133 134 134 ! Dynamic variables … … 145 145 146 146 ! Variables to read starfi.nc 147 character(*), parameter :: startfi_name = "startfi _evol.nc" ! Name of the file used to initialize the PEM147 character(*), parameter :: startfi_name = "startfi.nc" ! Name of the file used to initialize the PEM 148 148 character(2) :: str2 149 149 integer :: ncid, status ! Variable for handling opening of files … … 313 313 endif 314 314 therestartfi = .false. ! Default value 315 inquire(file = 'startfi _evol.nc',exist = therestartfi)315 inquire(file = 'startfi.nc',exist = therestartfi) 316 316 if (.not. therestartfi) then 317 write(*,*) 'There is no "startfi _evol.nc" file!'317 write(*,*) 'There is no "startfi.nc" file!' 318 318 error stop 'Initialization cannot be done for the 1D PEM.' 319 319 endif 320 320 321 call init_testphys1d('start1D_evol.txt','startfi _evol.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, &321 call init_testphys1d('start1D_evol.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, & 322 322 time_0,ps(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, & 323 323 play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau) … … 330 330 !------------------------ 331 331 ! I Initialization 332 ! I_b Read of the "start _evol.nc" and starfi_evol.nc333 !------------------------ 334 ! I_b.1 Read "start _evol.nc"332 ! I_b Read of the "start.nc" and starfi_evol.nc 333 !------------------------ 334 ! I_b.1 Read "start.nc" 335 335 allocate(ps_start_PCM(ngrid)) 336 336 #ifndef CPP_1D … … 351 351 status = nf90_close(ncid) 352 352 353 call iniphysiq('startfi _evol.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)353 call iniphysiq('startfi.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys) 354 354 #else 355 355 ps_start_PCM(1) = ps(1) … … 357 357 358 358 ! In the PCM, these values are given to the physic by the dynamic. 359 ! Here we simply read them in the "startfi _evol.nc" file359 ! Here we simply read them in the "startfi.nc" file 360 360 status = nf90_open(startfi_name, NF90_NOWRITE, ncid) 361 361 … … 374 374 status = nf90_close(ncid) 375 375 376 ! I_b.2 Read the "startfi _evol.nc"376 ! I_b.2 Read the "startfi.nc" 377 377 ! First we read the initial state (starfi.nc) 378 378 #ifndef CPP_STD … … 1079 1079 !------------------------ 1080 1080 ! III Output 1081 ! III_b Write "restart _evol.nc" and "restartfi_evol.nc"1082 !------------------------ 1083 ! III_b.1 Write "restart _evol.nc"1081 ! III_b Write "restart.nc" and "restartfi.nc" 1082 !------------------------ 1083 ! III_b.1 Write "restart.nc" 1084 1084 ptimestep = iphysiq*daysec/real(day_step)/nsplit_phys ! dtphys/nsplit_phys 1085 1085 pday = day_ini … … 1090 1090 call pression (ip1jmp1,ap,bp,ps,p) 1091 1091 call massdair(p,masse) 1092 call dynredem0("restart _evol.nc",day_ini,phis)1093 call dynredem1("restart _evol.nc",time_0,vcov,ucov,teta,q,masse,ps)1094 write(*,*) "restart _evol.nc has been written"1092 call dynredem0("restart.nc",day_ini,phis) 1093 call dynredem1("restart.nc",time_0,vcov,ucov,teta,q,masse,ps) 1094 write(*,*) "restart.nc has been written" 1095 1095 #else 1096 1096 call writerestart1D('restart1D_evol.txt',ps(1),tsurf(1,:),nlayer,size(tsurf,2),teta,ucov,vcov,nq,noms,qsurf(1,:,:),q) … … 1098 1098 #endif 1099 1099 1100 ! III_b.2 Write the "restartfi _evol.nc"1100 ! III_b.2 Write the "restartfi.nc" 1101 1101 #ifndef CPP_STD 1102 call physdem0("restartfi _evol.nc",longitude,latitude,nsoilmx,ngrid, &1102 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, & 1103 1103 nlayer,nq,ptimestep,pday,0.,cell_area,albedodat, & 1104 1104 inertiedat,def_slope,subslope_dist) 1105 call physdem1("restartfi _evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &1105 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, & 1106 1106 ptimestep,ztime_fin,tsurf,tsoil,inertiesoil, & 1107 1107 albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac, & 1108 1108 wstar,watercap,perennial_co2ice) 1109 1109 #else 1110 call physdem0("restartfi _evol.nc",longitude,latitude,nsoilmx,ngrid, &1110 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, & 1111 1111 nlayer,nq,ptimestep,pday,time_phys,cell_area, & 1112 1112 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 1113 call physdem1("restartfi _evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &1113 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, & 1114 1114 ptimestep,ztime_fin,tsurf,tsoil,emis,q2,qsurf,qsoil, & 1115 1115 cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic,tslab, & 1116 1116 tsea_ice,sea_ice) 1117 1117 #endif 1118 write(*,*) "restartfi _evol.nc has been written"1118 write(*,*) "restartfi.nc has been written" 1119 1119 1120 1120 !------------------------
Note: See TracChangeset
for help on using the changeset viewer.