Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Writing DATM restarts to NETCDF

I'm currently spinning up the clm4 with a data atmosphere, and would prefer that the restart files be written in netdcf format instead of binary.  I found the lines in the 'datm_comp_mod' file that define both netcdf and binary restart files, but only write the latter.  Uncommenting the lines that call 'shr_pcdf_readwrite' for the netcdf output, and placing the modfied file in SourceMods produces a complier error ("PGF90-S-0186-Argument missing for formal argument mpicom") during the build process. Is there a patch for the module, or some namelist specification I can write to the datm_user_nl that will address this problem?
   if (write_restart) then
      call t_startf('datm_restart')
      call seq_infodata_GetData( infodata, case_name=case_name)
      write(rest_file,"(2a,i4.4,a,i2.2,a,i2.2,a,i5.5,a)") &
        trim(case_name), '.datm'//trim(inst_suffix)//'.r.', &
        yy,'-',mm,'-',dd,'-',currentTOD,'.nc'
      write(rest_file_strm,"(2a,i4.4,a,i2.2,a,i2.2,a,i5.5,a)") &
        trim(case_name), '.datm'//trim(inst_suffix)//'.rs1.', &
        yy,'-',mm,'-',dd,'-',currentTOD,'.bin'
      if (my_task == master_task) then
         nu = shr_file_getUnit()
         open(nu,file=trim(rpfile)//trim(inst_suffix),form='formatted')
         write(nu,'(a)') rest_file
         write(nu,'(a)') rest_file_strm
         close(nu)
         call shr_file_freeUnit(nu)
      endif
      !!!! uncommented readwrite netcdf lines, but complier error !!!
      ! if (my_task == master_task) write(logunit,F04) ' writing ',trim(rest_file),currentYMD,currentTOD
     !  call shr_pcdf_readwrite('write',trim(rest_file),mpicom,gsmap,clobber=.true., &
     !     rf1=somtp,rf1n='somtp')
      if (my_task == master_task) write(logunit,F04) ' writing ',trim(rest_file_strm),currentYMD,currentTOD
      call shr_strdata_restWrite(trim(rest_file_strm),SDATM,mpicom,trim(case_name),'SDATM strdata')
      call shr_sys_flush(logunit)
      call t_stopf('datm_restart')
   endif -Jessica
 
Top