program mgcmlbc_rotate ! ! 3/19/07 btf: ! Read an MGCM_LBC_FILE nc file, rotate the fields 12 hours, and ! write equivalent new file for use by mtgcm1.0 and later versions. ! use read_file_module,only: open_infile,read_file use write_file_module,only: open_outfile,write_file implicit none character(len=240) :: infile(20),outfile(20) integer :: i,n,ntime logical :: close ! infile(:) = ' ' outfile(:) = ' ' ! infile(1) = ! | '/oreo/d/foster/mtgcm/TGCM_lbnd_comp_TESyr1_filt12.Ls300.nc' ! outfile(1) = ! | '/oreo/d/foster/mtgcm/MGCM_lbnd_comp_TESyr1_filt12.Ls300.nc' ! -------------------------------------------------------------------- ! Summer 2007 : Rotation of TGCM_lbnd files for mtgcm1.0 usage ! : Stop (on sundog) since so slow! ! : Proceed on bluevista (faster turnaround) ! -------------------------------------------------------------------- ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls300.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls300.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr3_CONRtau.Ls000.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr3_CONRtau.Ls000.nc' ! -------------------------------------------------------------------- ! Fall 2007 : Rotation of TGCM_lbnd files for mtgcm1.0 usage ! : Runs faster on sol ! -------------------------------------------------------------------- ! infile(1) = 'TGCM_lbnd_comp_Intrctv-dust_Ls230.102507.nc' ! outfile(1)= 'MGCM_lbnd_comp_Intrctv-dust_Ls230.102507.nc' ! infile(1) = 'TGCM_lbnd_comp_THEMISyr1_Ls230_deepdust.102507.nc' ! outfile(1)= 'MGCM_lbnd_comp_THEMISyr1_Ls230_deepdust.102507.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_CONRNU0.0001_155.Ls180.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_CONRNU0.0001_155.Ls180.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_CONRNU0.0001_144.Ls120.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_CONRNU0.0001_144.Ls120.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls090.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls090.nc' ! infile(1) = 'TGCM_lbnd_comp_Intrctv-dust_Ls150.010708.nc' ! outfile(1)= 'MGCM_lbnd_comp_Intrctv-dust_Ls150.010708.nc' ! infile(1) = 'TGCM_lbnd_comp_THEMISyr1_Ls230_depdust.011008.nc' ! outfile(1)= 'MGCM_lbnd_comp_THEMISyr1_Ls230_depdust.011008.nc' ! infile(1) = ! 'TGCM_lbnd_comp_THEMISyr1_Ls230_file252_deepdust.011008.nc' ! outfile(1)= ! 'MGCM_lbnd_comp_TESyr1_filt12.Lsxxx.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls270.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls270.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls180.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls180.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls090.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls090.nc' ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls000.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls000.nc' ! -------------------------------------------------------------------- ! Fall 2010 : Rotation of TGCM_lbnd files for mtgcm1.0 usage ! : JPL/CDP MAVEN Studies ! : Runs faster on sol ! -------------------------------------------------------------------- ! infile(1) = 'TGCM_lbnd_comp_TESyr1_filt12.Ls000.nc' ! outfile(1)= 'MGCM_lbnd_comp_TESyr1_filt12.Ls000.nc' infile(1) = 'TGCM_lbnd_comp_Ls270_TAU0.3-GW-VAR200-KAP2.5E-6.nc' outfile(1)= 'MGCM_lbnd_comp_Ls270_TAU0.3-GW-VAR200-KAP2.5E-6.nc' ! infile(1) = 'TGCM_lbnd_comp_Ls270_TAU0.3-noGW-noRF.nc' ! outfile(1)= 'MGCM_lbnd_comp_Ls270_TAU0.3-noGW-noRF.nc' ! infile(1) = 'TGCM_lbnd_comp_Ls270_TAU1.0-GW-VAR200-KAP2.5E-6.nc' ! outfile(1)= 'MGCM_lbnd_comp_Ls270_TAU1.0-GW-VAR200-KAP2.5E-6.nc' ! -------------------------------------------------------------------- close = .false. do i=1,20 ! files if (len_trim(infile(i)) > 0 .and. len_trim(outfile(i)) > 0) then call open_infile(infile(i),ntime) write(6,"('main after open infile ',a,' i=',i4,' ntime=',i4)") | infile(i),i,ntime call open_outfile(infile(i),outfile(i),ntime) ! ntime = 10 ! test: write only first few times do n=1,ntime call read_file(n) call rotate_fields(n) if (n==ntime) close = .true. call write_file(n,close) enddo endif ! non-blank input file enddo end ! program mgcmlbc_rotate