--- MITgcm/pkg/fizhi/fizhi_init_vars.F 2004/08/12 15:21:22 1.8 +++ MITgcm/pkg/fizhi/fizhi_init_vars.F 2005/03/21 18:37:33 1.12 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/fizhi/fizhi_init_vars.F,v 1.8 2004/08/12 15:21:22 molod Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/fizhi/fizhi_init_vars.F,v 1.12 2005/03/21 18:37:33 molod Exp $ C $Name: $ #include "FIZHI_OPTIONS.h" @@ -33,6 +33,7 @@ #include "EEPARAMS.h" #include "SURFACE.h" #include "PARAMS.h" +#include "chronos.h" integer myThid @@ -56,8 +57,10 @@ jdim1 = 1 jdim2 = sNy +C Deal Here with Variables that are on a Fizhi Pickup or need Initialization + IF ( startTime.EQ.0. .AND. nIter0.EQ.0 ) THEN - print *,' In fizhi_init_vars: Cold start ' + print *,' In fizhi_init_vars: Beginning of New Experiment ' do bj = myByLo(myThid), myByHi(myThid) do bi = myBxLo(myThid), myBxHi(myThid) @@ -165,18 +168,54 @@ enddo enddo -c Now initialize tke, xlmt, khmt, xxmt, yymt, ctmt, zetamt, -c Now initialize land state too - tcanopy, etc... +c Zero out fizhi tendency arrays on the fizhi grid do L = 1,Nrphys - do i = 1,nchptot(bi,bj) - tke(i,L,bi,bj) = 0. - xlmt(i,L,bi,bj) = 0. - khmt(i,L,bi,bj) = 0. + do j = 1,sNy + do i = 1,sNx + duphy(i,j,L,bi,bj) = 0. + dvphy(i,j,L,bi,bj) = 0. + dthphy(i,j,L,bi,bj) = 0. + dsphy(i,j,L,bi,bj) = 0. + enddo + enddo + enddo + +c Zero out fizhi tendency arrays on the dynamics grid + do L = 1,Nr + do j = jm1,jm2 + do i = im1,im2 + guphy(i,j,L,bi,bj) = 0. + gvphy(i,j,L,bi,bj) = 0. + gthphy(i,j,L,bi,bj) = 0. + gsphy(i,j,L,bi,bj) = 0. enddo enddo + enddo + +c Initialize tke, xlmt, khmt, xxmt, yymt, ctmt, zetamt, + if( (nhms.eq.nhms0) .and. (nymd.eq.nymd0) ) then + print *,' Cold Start: Zero out Turb second moments ' + do i = 1,nchp + ctmt(i,bi,bj) = 0. + xxmt(i,bi,bj) = 0. + yymt(i,bi,bj) = 0. + zetamt(i,bi,bj) = 0. + enddo + do L = 1,Nrphys + do i = 1,nchp + tke(i,L,bi,bj) = 0. + xlmt(i,L,bi,bj) = 0. + khmt(i,L,bi,bj) = 0. + enddo + enddo + else + print *,' Need initial Values for TKE - don't have them! ' + stop + endif + c Now initialize land state too - tcanopy, etc... SET FOR NOW, c READ CLIM FOR REAL - do i = 1,nchptot(bi,bj) + do i = 1,nchp tcanopy(i,bi,bj) = 283. tdeep(i,bi,bj) = 282.5 ecanopy(i,bi,bj) = 2.e-2 @@ -187,6 +226,50 @@ snodep(i,bi,bj) = 0. enddo + print *,' Initialize fizhi arrays that will be on pickup ' + imstturblw(bi,bj) = 0 + imstturbsw(bi,bj) = 0 + iras(bi,bj) = 0 + nlwcld(bi,bj) = 0 + nlwlz(bi,bj) = 0 + nswcld(bi,bj) = 0 + nswlz(bi,bj) = 0 + do L = 1,Nrphys + do j = 1,sNy + do i = 1,sNx + swlz(i,j,L) = 0. + lwlz(i,j,L) = 0. + qliqavesw(i,j,L) = 0. + qliqavelw(i,j,L) = 0. + fccavesw(i,j,L) = 0. + fccavelw(i,j,L) = 0. + cldtot_sw(i,j,L) = 0. + cldras_sw(i,j,L) = 0. + cldlsp_sw(i,j,L) = 0. + cldtot_lw(i,j,L) = 0. + cldras_lw(i,j,L) = 0. + cldlsp_lw(i,j,L) = 0. + lwdt(i,j,L,bi,bj) = 0. + swdt(i,j,L,bi,bj) = 0. + turbt(i,j,L,bi,bj) = 0. + moistt(i,j,L,bi,bj) = 0. + turbq(i,j,L,1,bi,bj) = 0. + moistq(i,j,L,1,bi,bj) = 0. + turbu(i,j,L,bi,bj) = 0. + moistu(i,j,L,bi,bj) = 0. + turbv(i,j,L,bi,bj) = 0. + moistv(i,j,L,bi,bj) = 0. + enddo + enddo + enddo + do j = 1,sNy + do i = 1,sNx + rainlsp(i,j) = 0. + raincon(i,j) = 0. + snowfall(i,j) = 0. + enddo + enddo + enddo enddo @@ -194,6 +277,7 @@ print *,' In fizhi_init_vars: Read from restart ' C-- Read fizhi package state variables from pickup file + call fizhi_read_pickup( nIter0, myThid ) CALL FIZHI_READ_VEGTILES( nIter0, 'D', myThid )