Changeset 3584 for trunk/LMDZ.COMMON/libf
- Timestamp:
- Jan 17, 2025, 5:14:18 PM (6 days ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3579 r3584 540 540 == 15/01/2025 == JBC 541 541 Improvement of the Bash script tools in the deftank with an automatic error detection which ends the script with a message. 542 543 == 17/01/2025 == JBC 544 - Albedo is now updated only at the end of the PEM (and not at every iteration) + Correct way to set it taking into account CO2/H2O ice and frost. 545 - Cosmetic cleanings. -
trunk/LMDZ.COMMON/libf/evolution/deftank/PEMrun.job
r3579 r3584 16 16 # Modify here the parameters depending on your setup 17 17 #################################################### 18 # A few parameters that might need to be changed depending on your setup19 18 # Path to the arch.env to source: 20 19 source ../trunk/LMDZ.COMMON/arch.env -
trunk/LMDZ.COMMON/libf/evolution/deftank/modify_startfi_orbit.sh
r3579 r3584 10 10 ########################################### 11 11 # Name of the file 12 name_file ="startfi.nc"12 name_file="startfi.nc" 13 13 14 14 # New values for the orbital parameters -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3578 r3584 75 75 #ifndef CPP_STD 76 76 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, inertiesoil, flux_geo, nqsoil, qsoil 77 use surfdat_h, only: tsurf, emis, qsurf, watercap, ini_surfdat_h,&78 albedodat, zmea, zstd, zsig, zgam, zthe,&79 albedo_h2o_frost,frost_albedo_threshold,&80 emissiv, watercaptag, perennial_co2ice77 use surfdat_h, only: tsurf, qsurf, emis, emissiv, emisice, ini_surfdat_h, & 78 albedodat, albedice, albedo_h2o_frost, albedo_h2o_cap, & 79 zmea, zstd, zsig, zgam, zthe, frost_albedo_threshold, & 80 watercap, watercaptag, perennial_co2ice, albedo_perennialco2 81 81 use dimradmars_mod, only: totcloudfrac, albedo 82 82 use dust_param_mod, only: tauscaling … … 287 287 288 288 ! Loop variables 289 integer :: i, l, ig, nnq, t, islope, ig_loop, islope_loop, isoil 289 integer :: i, l, ig, nnq, t, islope, ig_loop, islope_loop, isoil, icap 290 290 291 291 ! Elapsed time with system clock … … 384 384 endif 385 385 386 call init_testphys1d('start1D.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, &387 time_0,ps_start_dyn(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, 386 call init_testphys1d('start1D.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, & 387 time_0,ps_start_dyn(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, & 388 388 play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau) 389 389 ps_start_dyn(2) = ps_start_dyn(1) … … 844 844 enddo 845 845 enddo outer2 846 endif847 if (h2o_ice(ig,islope) > frost_albedo_threshold) then848 albedo(ig,1,islope) = albedo_h2o_frost849 albedo(ig,2,islope) = albedo_h2o_frost850 else851 albedo(ig,1,islope) = albedodat(ig)852 albedo(ig,2,islope) = albedodat(ig)853 emis(ig,islope) = emissiv854 846 endif 855 847 else if (co2_ice(ig,islope) > 1.e-10 .and. d_co2ice(ig,islope) > 1.e-10) then ! Put tsurf as tcond CO2 … … 1115 1107 deallocate(zplev_start0,zplev_new) 1116 1108 1109 ! III_a.6 Albedo update for start file 1110 do ig = 1,ngrid 1111 if (latitude(ig) < 0.) then 1112 icap = 2 ! Southern hemisphere 1113 else 1114 icap = 1 ! Northern hemisphere 1115 endif 1116 do islope = 1,ngrid 1117 ! Bare ground 1118 albedo(ig,:,islope) = albedodat(ig) 1119 emis(ig,islope) = emissiv 1120 1121 ! CO2 ice/frost is treated after H20 ice/frost because it is considered dominant 1122 ! H2O ice 1123 if (h2o_ice(ig,islope) > 0.) then 1124 albedo(ig,:,islope) = albedo_h2o_cap 1125 emis(ig,islope) = 1. 1126 endif 1127 ! CO2 ice 1128 if (co2_ice(ig,islope) > 0.) then 1129 albedo(ig,:,islope) = albedo_perennialco2(icap) 1130 emis(ig,islope) = emisice(icap) 1131 endif 1132 ! H2O frost 1133 if (qsurf(ig,igcm_h2o_ice,islope) > 0.) then 1134 albedo(ig,:,islope) = albedo_h2o_frost 1135 emis(ig,islope) = 1. 1136 endif 1137 ! CO2 frost 1138 if (qsurf(ig,igcm_co2,islope) > 0.) then 1139 albedo(ig,:,islope) = albedice(icap) 1140 emis(ig,islope) = emisice(icap) 1141 endif 1142 enddo 1143 enddo 1144 1145 ! III_a.7 Orbital parameters update for start file 1117 1146 if (evol_orbit_pem) call recomp_orb_param(i_myear,i_myear_leg) 1118 1147 -
trunk/LMDZ.COMMON/libf/evolution/recomp_tend_co2_mod.F90
r3571 r3584 16 16 !======================================================================= 17 17 ! 18 ! Routine thatcompute the evolution of the tendencie for co2 ice18 ! To compute the evolution of the tendencie for co2 ice 19 19 ! 20 20 !======================================================================= … … 67 67 !======================================================================= 68 68 ! 69 ! Routine thatcompute the evolution of the tendencie for h2o ice69 ! To compute the evolution of the tendencie for h2o ice 70 70 ! 71 71 !======================================================================= -
trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90
r3579 r3584 42 42 43 43 do numyear = 1,2 44 write( *,*) 'numyear',numyear45 write( str(1:1),'(i1.1)') numyear46 47 state = nf90_open(path = "data2reshape_Y"//str//".nc", mode = nf90_nowrite,ncid = ncid1)44 write(str,'(i1.1)') numyear 45 write(*,*) 'Reshaping of variables from "data2reshape_Y'//str//'.nc"...' 46 47 state = nf90_open(path = "data2reshape_Y"//str//".nc",mode = nf90_nowrite,ncid = ncid1) 48 48 if (state /= nf90_noerr) call handle_err(state) 49 49 … … 57 57 endif 58 58 endif 59 state = nf90_create(path = "data_PCM_Y"//str//".nc", cmode=or(nf90_noclobber,nf90_64bit_offset),ncid = ncid2)59 state = nf90_create(path = "data_PCM_Y"//str//".nc",cmode = or(nf90_noclobber,nf90_64bit_offset),ncid = ncid2) 60 60 if (state /= nf90_noerr) call handle_err(state) 61 61 … … 69 69 allocate(varids_2(nvars)) 70 70 71 state = nf90_inq_dimids(ncid1, ndims, dimids,include_parents)72 if (state /= nf90_noerr) call handle_err(state) 73 state = nf90_inq_varids(ncid1, nvars,varids)71 state = nf90_inq_dimids(ncid1,ndims,dimids,include_parents) 72 if (state /= nf90_noerr) call handle_err(state) 73 state = nf90_inq_varids(ncid1,nvars,varids) 74 74 if (state /= nf90_noerr) call handle_err(state) 75 75 76 76 do i = 1,ndims 77 state = nf90_inquire_dimension(ncid1, dimids(i), name_,len_)77 state = nf90_inquire_dimension(ncid1,dimids(i),name_,len_) 78 78 if (state /= nf90_noerr) call handle_err(state) 79 79 if (name_ == "lon" .or. name_ == "longitude") then … … 82 82 len_ = len_ + 1 83 83 else if (name_ == "lat".or. name_ == "latitude") then 84 dimid_lat =dimids(i)85 len_lat =len_84 dimid_lat = dimids(i) 85 len_lat = len_ 86 86 else if (name_ == "time_counter".or. name_ == "Time") then 87 dimid_time =dimids(i)88 len_time =len_87 dimid_time = dimids(i) 88 len_time = len_ 89 89 else if (name_ == "soil_layers".or. name_ == "subsurface_layers") then 90 dimid_soil =dimids(i)90 dimid_soil = dimids(i) 91 91 len_soil = len_ 92 92 endif 93 state = nf90_def_dim(ncid2, 93 state = nf90_def_dim(ncid2,name_,len_,dimid_2) 94 94 if (state /= nf90_noerr) call handle_err(state) 95 95 dimids_2(i) = dimid_2 … … 97 97 98 98 do i = 1,nvars 99 state = nf90_inquire_variable(ncid1, 100 write(*,*) "namevar00= ",namevar99 state = nf90_inquire_variable(ncid1,varids(i),name = namevar,xtype = xtype_var,ndims = numdims,natts = numatts) 100 write(*,*) '> Treatment of '//namevar 101 101 if (state /= nf90_noerr) call handle_err(state) 102 102 allocate(dimid_var(numdims)) … … 109 109 state = nf90_get_var(ncid1,varids(i),tempvalues_1d) 110 110 if (state /= nf90_noerr) call handle_err(state) 111 state = nf90_def_var(ncid2,namevar,xtype_var, dimid_var,varids_2(i))111 state = nf90_def_var(ncid2,namevar,xtype_var,dimid_var,varids_2(i)) 112 112 if (state /= nf90_noerr) call handle_err(state) 113 113 values_1d(1:len_lon) = tempvalues_1d(:) … … 219 219 220 220 deallocate(dimids,varids,dimids_2,varids_2) 221 write(*,*) 'Done!' 221 222 enddo 222 223 -
trunk/LMDZ.COMMON/libf/evolution/soil_settings_PEM_mod.F90
r3532 r3584 20 20 ! 21 21 ! Modifications: Aug.2010 EM: use NetCDF90 to load variables (enables using 22 ! 23 ! 22 ! r4 or r8 restarts independently of having compiled 23 ! the GCM in r4 or r8) 24 24 ! June 2013 TN: Possibility to read files with a time axis 25 25 !
Note: See TracChangeset
for help on using the changeset viewer.