diff --git a/cat/src/cat.f90 b/cat/src/cat.f90 index 93a45bd682542b3e9880ea9164e9747a9db9e29f..c796da8c6fde6ce0e40036a36f3f169e5bf0a00a 100644 --- a/cat/src/cat.f90 +++ b/cat/src/cat.f90 @@ -1431,9 +1431,6 @@ subroutine cat_master use catmod implicit none -if (nshutdown > 0) return ! if an error occured so far - - do while (tstep <= tstop) call q2gquv call jacobian @@ -1450,6 +1447,7 @@ do while (tstep <= tstop) if (nstdout.gt.0 .and. mod(tstep,nstdout) == 0) then write(*,*)' time step ',tstep endif + if (nshutdown > 0) return enddo return diff --git a/cat/src/guimod.f90 b/cat/src/guimod.f90 index 5ee8fdaaaa8d142423a71fd84d7328384da8e925..3764d85eae2c4f5b5df96f15abf24c45134e9ac0 100644 --- a/cat/src/guimod.f90 +++ b/cat/src/guimod.f90 @@ -56,7 +56,9 @@ parc(2) = 2.0 parc(3) = 3.0 parc(4) = 4.0 parc(5) = 5.0 -idatim(:) = ndatim(:) + +idatim(:) = 0 +idatim(1) = tstep nshutdown = iguistep(parc,idatim) ! GUI event handler return diff --git a/cat/src/pumax.c b/cat/src/pumax.c index 3cfe0c86333495e30e5498acc98670c90a5506fd..575c570e7ee440de15f2583114b7279ec2560166 100644 --- a/cat/src/pumax.c +++ b/cat/src/pumax.c @@ -1639,10 +1639,20 @@ void ShowStep(void) XSetFont(display, gc, BigFont->fid); XSetForeground(display,gc,BlackPix); XSetBackground(display,gc,Grey.pixel); - ntocdat(); - if (ndatim[5] == 6) XSetForeground(display,gc,Red.pixel); // sunday - XDrawImageString(display,Cow,gc,10,BigFontHeight,datch,strlen(datch)); - XSetForeground(display,gc,BlackPix); + + if (Model == CAT) // CAT shows timestep + { + sprintf(Text,"GUI step %9d",ndatim[0]); + XDrawImageString(display,Cow,gc,10,BigFontHeight,Text,strlen(Text)); + } + else // PUMA & PLASIM show date and time + { + ntocdat(); + if (ndatim[5] == 6) XSetForeground(display,gc,Red.pixel); // sunday + XDrawImageString(display,Cow,gc,10,BigFontHeight,datch,strlen(datch)); + XSetForeground(display,gc,BlackPix); + } + if (ShowQueue) { sprintf(Text,"%8d Events ",XPending(display)); diff --git a/most.c b/most.c index b2771dbcf40067854bcd29cadae1f7f6b98da7c7..876b216ed83c478efaea43f057647879c0285f25 100644 --- a/most.c +++ b/most.c @@ -349,7 +349,8 @@ int ModeRadiusSq; int ForceRebuild; int dxsh; int dxs2; -int Yoden; +int Yoden; // PUMA setup for Yoden experiment +int CatSim = 51; // simulation setup number for CAT /* Special parameter */ @@ -2044,6 +2045,16 @@ int Build(int model) sprintf(command,"cp %s/bin/%s %s/run\n",shomo,exec_name,shomo); system(command); + // copy CAT simulation namelist to run directory + + if (model == CAT) + { + sprintf(command,"cp cat/dat/sim_%4.4d.nl cat/run/sim_namelist\n",CatSim); + system(command); + } + + // copy hires background bitmap for Earth or Mars + if (model == PUMA || model == PLASIM ) { if (model == PLASIM && Planet == MARS) @@ -2057,6 +2068,9 @@ int Build(int model) system(command); } } + + // copy surface data in matching resolution to run directory + if (model == PLASIM) { if (Planet == MARS) @@ -2066,8 +2080,8 @@ int Build(int model) else sprintf(command,"cp plasim/dat/T%d/* plasim/run/\n",Truncation); system(command); - system(command); - if (Lsg) + + if (Lsg) // copy data for LSG ocean model and select LSG GUI configuration { sprintf(command,"cp lsg/dat/* %s/run\n",shomo); system(command); @@ -2085,6 +2099,9 @@ int Build(int model) sprintf(command,"cp %s/dat/GUI.cfg %s/run\n",shomo,shomo); system(command); } + + // copy second GUI configuration for two-instances run + if (Multirun > 1) { sprintf(command,"cp %s/dat/GUI_0?.cfg %s/run\n",shomo,shomo); @@ -2585,6 +2602,10 @@ int WriteCatNamelist(void) fprintf(fp," %-8s=%6d\n",Sel->text,Sel->iv); if (Sel->type == SEL_REAL) fprintf(fp," %-8s=%s\n",Sel->text,Sel->teva); + if (!strncmp(Sel->text,"NSIM",4)) + { + if (Sel->iv > 0) CatSim = Sel->iv; + } } fprintf(fp," /END\n");