- Timestamp:
- Apr 30, 2025, 5:54:42 PM (2 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/iostart.F90
r3747 r3750 720 720 IF (field_size==1) THEN 721 721 ! input is a 1D "surface field" array 722 if (.not.present(time)) then ! for a time-independent field 722 ierr=NF90_INQ_VARID(nid_restart,field_name,nvarid) 723 if (ierr/=NF90_NOERR.or..not.present(time)) then ! for a time-independent field 723 724 ierr=NF90_REDEF(nid_restart) 724 725 #ifdef NC_DOUBLE … … 762 763 ELSE IF (field_size==klev) THEN 763 764 ! input is a 2D "atmospheric field" array 764 if (.not.present(time)) then ! for a time-independent field 765 ierr=NF90_INQ_VARID(nid_restart,field_name,nvarid) 766 if (ierr/=NF90_NOERR.or..not.present(time)) then ! for a time-independent field 765 767 ierr=NF90_REDEF(nid_restart) 766 768 #ifdef NC_DOUBLE … … 804 806 ELSE IF (field_size==klevp1) THEN 805 807 ! input is a 2D "interlayer atmospheric field" array 806 if (.not.present(time)) then ! for a time-independent field 808 ierr=NF90_INQ_VARID(nid_restart,field_name,nvarid) 809 if (ierr/=NF90_NOERR.or..not.present(time)) then ! for a time-independent field 807 810 ierr=NF90_REDEF(nid_restart) 808 811 #ifdef NC_DOUBLE … … 846 849 ELSE IF (field_size==nsoilmx) THEN 847 850 ! input is a 2D "subsurface field" array 848 if (.not.present(time)) then ! for a time-independent field 851 ierr=NF90_INQ_VARID(nid_restart,field_name,nvarid) 852 if (ierr/=NF90_NOERR.or..not.present(time)) then ! for a time-independent field 849 853 ierr = NF90_REDEF(nid_restart) 850 854 #ifdef NC_DOUBLE … … 893 897 ENDIF 894 898 895 ! Check the writ ting of field to file went OK899 ! Check the writing of field to file went OK 896 900 if (ierr.ne.NF90_NOERR) then 897 901 write(*,*) " Error phyredem(put_field_rgen) : failed writing ",trim(field_name) -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3749 r3750 406 406 REAL zdum2(ngrid,nlayer) 407 407 real ztim1,ztim2,ztim3, z1,z2 408 real ztime_ fin408 real ztime_restart 409 409 real zdh(ngrid,nlayer) 410 410 real gmplanet … … 490 490 logical, save :: check_physics_outputs=.false. 491 491 !$OPM THREADPRIVATE(check_physics_inputs,check_physics_outputs) 492 LOGICAL write_restartfi 492 493 493 494 ! Misc … … 1981 1982 if (is_master) print*,'--> Ls =',zls*180./pi 1982 1983 1984 write_restartfi = .false. 1983 1985 if(lastcall) then 1984 IF (grid_type==unstructured) THEN !IF DYNAMICO 1985 ! DYNAMICO: no need to add a dynamics time step to ztime_fin 1986 ztime_fin = ptime 1987 ELSE ! LMDZ 1988 ztime_fin = ptime + ptimestep/(float(iphysiq)*daysec) 1989 ENDIF ! of IF (grid_type==unstructured) 1990 !! Update surface ice distribution to iterate to steady state if requested 1991 !! AF24: removed 1992 1993 ! endif 1986 write_restartfi = .true. 1987 1994 1988 if (paleo) then 1995 1989 ! time range for tendencies of ice flux qsurfyear … … 2072 2066 if (is_master) write(*,*) "Paleo eccpal=",eccpal," tpal=",tpalnew 2073 2067 2068 ! create restartfi 2069 if (ngrid.ne.1) then 2070 print*, "physdem1pal not yet implemented" 2071 stop 2072 !TODO: import this routine from pluto.old 2073 ! call physdem1pal("restartfi.nc",long,lati,nsoilmx,nq, & 2074 ! ptimestep,pdaypal, & 2075 ! ztime_restart,tsurf,tsoil,emis,q2,qsurfpal, & 2076 ! cell_area,albedodat,therm_inertia,zmea,zstd,zsig, & 2077 ! zgam,zthe,oblipal,eccpal,tpalnew,adjustnew,phisfipal, & 2078 ! peri_daypal) 2079 endif 2080 else ! 'paleo' 2081 2082 2083 endif ! end of 'paleo' 2084 endif ! end of 'lastcall' 2085 2086 if(mod(icount,diagfi_output_rate).eq.0) then 2087 write_restartfi = .true. 2088 endif 2074 2089 !---------------------------------------------------------------------- 2075 2090 ! Writing NetCDF file "RESTARTFI" at the end of the run … … 2081 2096 ! thus we store for time=time+dtvr 2082 2097 2083 ! create restartfi 2084 if (ngrid.ne.1) then 2085 print*, "physdem1pal not yet implemented" 2086 stop 2087 !TODO: import this routine from pluto.old 2088 ! call physdem1pal("restartfi.nc",long,lati,nsoilmx,nq, & 2089 ! ptimestep,pdaypal, & 2090 ! ztime_fin,tsurf,tsoil,emis,q2,qsurfpal, & 2091 ! cell_area,albedodat,therm_inertia,zmea,zstd,zsig, & 2092 ! zgam,zthe,oblipal,eccpal,tpalnew,adjustnew,phisfipal, & 2093 ! peri_daypal) 2094 endif 2095 else ! 'paleo' 2096 2097 if (ngrid.ne.1) then 2098 write(*,*)'PHYSIQ: for physdem ztime_fin =',ztime_fin 2099 2100 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq, & 2101 ptimestep,ztime_fin,tsurf, & 2102 tsoil,therm_inertia,emis,albedo,q2,qsurf) 2103 endif 2104 2105 endif ! end of 'paleo' 2106 endif ! end of 'lastcall' 2098 if (is_omp_master.and.write_restartfi) then 2099 if (ngrid.ne.1) then 2100 IF (grid_type==unstructured) THEN !IF DYNAMICO 2101 ! DYNAMICO: no need to add a dynamics time step to ztime_restart 2102 ztime_restart = ptime 2103 ELSE ! LMDZ 2104 ztime_restart = ptime + (ptimestep/daysec) 2105 ENDIF ! of IF (grid_type==unstructured) 2106 2107 write(*,*)'PHYSIQ: writing restartfi at time =',ztime_restart 2108 2109 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq, & 2110 ptimestep,ztime_restart,tsurf, & 2111 tsoil,therm_inertia,emis,albedo,q2,qsurf) 2112 endif ! ngrid 2113 endif ! is_omp_master 2114 2115 2107 2116 2108 2117 !------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.