From 7437e0af62ddc302fa496374e9f104543fbbbc93 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 17:49:54 -0700 Subject: [PATCH 01/26] - add basic Docker build of fv3atm for testing --- docker/.DS_Store | Bin 0 -> 8196 bytes docker/Dockerfile | 144 +++++ docker/Makefile | 44 ++ docker/etc/configure.fv3.gnu_docker | 139 +++++ docker/etc/make.rules | 30 + .../PATCH-FMS-affinity.c-fix-getpid.patch | 65 ++ ...ibFMS_Makefile.am-add-sat-vapor-pres.patch | 25 + docker/patches/PATCH-fv3atm-apply-fixes.patch | 560 ++++++++++++++++++ ...os_model.F90-fix-logical-comparisons.patch | 48 ++ ...pdate_ca.F90-fix-logical-comparisons.patch | 25 + docker/work/.DS_Store | Bin 0 -> 8196 bytes docker/work/create_rundir.py | 8 + docker/work/default.yaml | 296 +++++++++ docker/work/run_test.sh | 19 + 14 files changed, 1403 insertions(+) create mode 100644 docker/.DS_Store create mode 100644 docker/Dockerfile create mode 100644 docker/Makefile create mode 100644 docker/etc/configure.fv3.gnu_docker create mode 100644 docker/etc/make.rules create mode 100644 docker/patches/PATCH-FMS-affinity.c-fix-getpid.patch create mode 100644 docker/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch create mode 100644 docker/patches/PATCH-fv3atm-apply-fixes.patch create mode 100644 docker/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch create mode 100644 docker/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch create mode 100644 docker/work/.DS_Store create mode 100755 docker/work/create_rundir.py create mode 100644 docker/work/default.yaml create mode 100755 docker/work/run_test.sh diff --git a/docker/.DS_Store b/docker/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..451bae716c6e9f01a6d306282fa0a28e1b196792 GIT binary patch literal 8196 zcmeHMOKcoP5UsMEWM-UCJ0##)l6d7+Z~%vREyu>3=$?@UH+Q z`4zxVRA;alhkOWFYEV=8$O=(`-|R zV|$uu8##YGF~;biY3ok0-O1a!>)Qu|`}ID}8>exkSYqM_e20-a0)kOOjf*|KM2usa|o+fB2otY&5N76H;` zS=`ti@{FS%uN`)soY&zSrWwn-#zBMZ%z}|5YjWMlN9vvOOviQ)89A3^EYTnWmS@*) z-dcOh?G3x{x+i&g-TDozYNMhYCMa#se8@C%14X_k!Hk+%veUhtxXzL zI48@OZ@j5`of=WMlvGPyBo>o~@)`4yyy+eD=h#-GDx*3@*W>7X7M)#?WM31jQPmNy z>Bt#W>XPJl*X>Z1ewWtDw7{@_r=s*v&{i{-Lg0bN8x?iH(lUm{bXmAHwU0_#D23ui+cG0zbmf@GJZQf5Knz zH?GDFxCOUi4My=++>OoHf(h)z19&fX;Xxe4VLXf@sN=(E;UwBv#K-V)Jc&=>X*`3^ z;|q8eU&ZtIHeSGs_%6POm+%w(6u-jn@Ou$wS&6PaqFpL+j%o|(8a%$0ja`kdk^Kjh z_}jOLiG07+$j!>umDoH$ zoHLF}oH%Tau#QG*CE^P6$)ZNKN9rUZG%NG9%54#{)Ff6ejCUz3LgHHsSyxEqY|F8aP+y6qi_OEtXf2%z@-ABI$qk}3B| Z1ad}5>Y? $*.f90 + +.F.f: + $(CPP) $(CPPFLAGS) $< > $*.f + +.f.o: + $(FC) $(FFLAGS) $(OTHER_FFLAGS) -c $< -o $@ + +.f90.o: + $(FC) $(FFLAGS) $(OTHER_FFLAGS) -c $< -o $@ + +.F.o: + $(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHER_FFLAGS) -c $< -o $@ + +.F90.o: + $(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHER_FFLAGS) -c $< -o $@ + +.c.o: + $(CC) $(CPPDEFS) $(CPPFLAGS) $(CFLAGS) $(OTHERFLAGS) $(OTHER_CFLAGS) -c $< -o $@ + +depend: $(DEPEND_FILES) makefile + @echo "Building dependencies ..." + @ls -1 $(DEPEND_FILES) > Srcfiles + @echo "." > Filepath + @$(MKDEPENDS) -m Filepath Srcfiles > depend + @$(RM) -f Filepath Srcfiles diff --git a/docker/patches/PATCH-FMS-affinity.c-fix-getpid.patch b/docker/patches/PATCH-FMS-affinity.c-fix-getpid.patch new file mode 100644 index 000000000..5aaf2d312 --- /dev/null +++ b/docker/patches/PATCH-FMS-affinity.c-fix-getpid.patch @@ -0,0 +1,65 @@ +From a4e586df827e148c3722ca507283a7ef9bba8b4d Mon Sep 17 00:00:00 2001 +From: Oliver Fuhrer +Date: Fri, 8 May 2020 00:19:02 -0700 +Subject: [PATCH] fix affinity.c to use syscall + +--- + affinity/affinity.c | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/affinity/affinity.c b/affinity/affinity.c +index cfd5285..bbaa5ee 100644 +--- a/affinity/affinity.c ++++ b/affinity/affinity.c +@@ -27,12 +27,13 @@ + #include + #include + +-#ifndef __APPLE__ +-static pid_t gettid(void) ++ ++static pid_t gettid1(void) + { +- return syscall(__NR_gettid); +-} ++#ifndef __APPLE__ ++ return syscall(SYS_gettid); + #endif ++} + + /* + * Returns this thread's CPU affinity, if bound to a single core, +@@ -44,8 +45,8 @@ int get_cpu_affinity(void) + cpu_set_t coremask; /* core affinity mask */ + + CPU_ZERO(&coremask); +- if (sched_getaffinity(gettid(),sizeof(cpu_set_t),&coremask) != 0) { +- fprintf(stderr,"Unable to get thread %d affinity. %s\n",gettid(),strerror(errno)); ++ if (sched_getaffinity(gettid1(),sizeof(cpu_set_t),&coremask) != 0) { ++ fprintf(stderr,"Unable to get thread %d affinity. %s\n",gettid1(),strerror(errno)); + } + + int cpu; +@@ -71,8 +72,8 @@ int get_cpuset(int fsz, int *output, int pe, _Bool debug) + cpu_set_t coremask; /* core affinity mask */ + + CPU_ZERO(&coremask); +- if (sched_getaffinity(gettid(),sizeof(cpu_set_t),&coremask) != 0) { +- fprintf(stderr,"Unable to get thread %d affinity. %s\n",gettid(),strerror(errno)); ++ if (sched_getaffinity(gettid1(),sizeof(cpu_set_t),&coremask) != 0) { ++ fprintf(stderr,"Unable to get thread %d affinity. %s\n",gettid1(),strerror(errno)); + } + + int cpu; +@@ -115,7 +116,7 @@ int set_cpu_affinity(int cpu) + + CPU_ZERO(&coremask); + CPU_SET(cpu,&coremask); +- if (sched_setaffinity(gettid(),sizeof(cpu_set_t),&coremask) != 0) { ++ if (sched_setaffinity(gettid1(),sizeof(cpu_set_t),&coremask) != 0) { + return -1; + } + #endif +-- +2.24.0 + diff --git a/docker/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch b/docker/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch new file mode 100644 index 000000000..e8e04007c --- /dev/null +++ b/docker/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch @@ -0,0 +1,25 @@ +From 9631ca0bc102f351fa07f2d0a88f963f7d4e7441 Mon Sep 17 00:00:00 2001 +From: Oliver Fuhrer +Date: Fri, 8 May 2020 12:38:03 -0700 +Subject: [PATCH] add sat_vapor_pres to FMS + +--- + libFMS/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libFMS/Makefile.am b/libFMS/Makefile.am +index 68d237c..6aefef4 100644 +--- a/libFMS/Makefile.am ++++ b/libFMS/Makefile.am +@@ -87,6 +87,8 @@ libFMS_la_LIBADD += ${top_builddir}/exchange/libxgrid.la + libFMS_la_LIBADD += ${top_builddir}/topography/libtopography.la + libFMS_la_LIBADD += ${top_builddir}/tracer_manager/libtracer_manager.la + libFMS_la_LIBADD += ${top_builddir}/station_data/libstation_data.la ++libFMS_la_LIBADD += ${top_builddir}/sat_vapor_pres/libsat_vapor_pres.la ++libFMS_la_LIBADD += ${top_builddir}/sat_vapor_pres/libsat_vapor_pres_k.la + + # At least one source file must be included to please Automake. + libFMS_la_SOURCES = ${top_builddir}/include/file_version.h +-- +2.24.0 + diff --git a/docker/patches/PATCH-fv3atm-apply-fixes.patch b/docker/patches/PATCH-fv3atm-apply-fixes.patch new file mode 100644 index 000000000..36faec273 --- /dev/null +++ b/docker/patches/PATCH-fv3atm-apply-fixes.patch @@ -0,0 +1,560 @@ +From 00f54c3119f77d3cd09180c608eb51719c85455f Mon Sep 17 00:00:00 2001 +From: Oliver Fuhrer +Date: Fri, 8 May 2020 14:49:55 -0700 +Subject: [PATCH] fix fv3atm + +--- + coupler_main.F90 | 510 +++++++++++++++++++++++++++++++++++++++++++++++ + makefile | 6 +- + 2 files changed, 513 insertions(+), 3 deletions(-) + create mode 100644 coupler_main.F90 + +diff --git a/coupler_main.F90 b/coupler_main.F90 +new file mode 100644 +index 0000000..2efb8e5 +--- /dev/null ++++ b/coupler_main.F90 +@@ -0,0 +1,510 @@ ++!*********************************************************************** ++!* GNU General Public License * ++!* This file is a part of fvGFS. * ++!* * ++!* fvGFS is free software; you can redistribute it and/or modify it * ++!* and are expected to follow the terms of the GNU General Public * ++!* License as published by the Free Software Foundation; either * ++!* version 2 of the License, or (at your option) any later version. * ++!* * ++!* fvGFS is distributed in the hope that it will be useful, but * ++!* WITHOUT ANY WARRANTY; without even the implied warranty of * ++!* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * ++!* General Public License for more details. * ++!* * ++!* For the full text of the GNU General Public License, * ++!* write to: Free Software Foundation, Inc., * ++!* 675 Mass Ave, Cambridge, MA 02139, USA. * ++!* or see: http://www.gnu.org/licenses/gpl.html * ++!*********************************************************************** ++ ++program coupler_main ++ ++!----------------------------------------------------------------------- ++! ++! program that couples component models for the atmosphere, ++! ocean (amip), land, and sea-ice using the exchange module ++! ++!----------------------------------------------------------------------- ++!$ser verbatim use mpi ++use time_manager_mod, only: time_type, set_calendar_type, set_time, & ++ set_date, days_in_month, month_name, & ++ operator(+), operator (<), operator (>), & ++ operator (/=), operator (/), operator (==),& ++ operator (*), THIRTY_DAY_MONTHS, JULIAN, & ++ NOLEAP, NO_CALENDAR, date_to_string, & ++ get_date ++ ++use atmos_model_mod, only: atmos_model_init, atmos_model_end, & ++ update_atmos_model_dynamics, & ++ update_atmos_radiation_physics, & ++ update_atmos_model_state, & ++ atmos_data_type, atmos_model_restart ++ ++use constants_mod, only: constants_init ++#ifdef INTERNAL_FILE_NML ++use mpp_mod, only: input_nml_file ++#else ++use fms_mod, only: open_namelist_file ++#endif ++use fms_mod, only: file_exist, check_nml_error, & ++ error_mesg, fms_init, fms_end, close_file, & ++ write_version_number, uppercase ++ ++use mpp_mod, only: mpp_init, mpp_pe, mpp_root_pe, mpp_npes, mpp_get_current_pelist, & ++ mpp_set_current_pelist, stdlog, mpp_error, NOTE, FATAL, WARNING ++use mpp_mod, only: mpp_clock_id, mpp_clock_begin, mpp_clock_end, mpp_sync ++ ++use mpp_io_mod, only: mpp_open, mpp_close, & ++ MPP_NATIVE, MPP_RDONLY, MPP_DELETE ++ ++use mpp_domains_mod, only: mpp_get_global_domain, mpp_global_field, CORNER ++use memutils_mod, only: print_memuse_stats ++use sat_vapor_pres_mod,only: sat_vapor_pres_init ++ ++use diag_manager_mod, only: diag_manager_init, diag_manager_end, & ++ get_base_date, diag_manager_set_time_end ++ ++use data_override_mod, only: data_override_init ++ ++!$ser verbatim use,intrinsic :: ISO_Fortran_env ++implicit none ++ ++!----------------------------------------------------------------------- ++ ++character(len=128) :: version = '$Id: coupler_main.F90,v 19.0.4.1.2.3 2014/09/09 23:51:59 Rusty.Benson Exp $' ++character(len=128) :: tag = '$Name: ulm_201505 $' ++ ++!----------------------------------------------------------------------- ++!---- model defined-types ---- ++ ++ type (atmos_data_type) :: Atm ++ ++!----------------------------------------------------------------------- ++! ----- coupled model time ----- ++ ++ type (time_type) :: Time_atmos, Time_init, Time_end, & ++ Time_step_atmos, Time_step_ocean, & ++ Time_restart, Time_step_restart ++ integer :: num_cpld_calls, num_atmos_calls, nc, na, ret ++ ++! ----- coupled model initial date ----- ++ ++ integer :: date_init(6) ++ integer :: calendar_type = -99 ++ ++! ----- timing flags ----- ++ ++ integer :: initClock, mainClock, termClock ++ integer, parameter :: timing_level = 1 ++ ++! ----- namelist ----- ++ integer, dimension(6) :: current_date = (/ 0, 0, 0, 0, 0, 0 /) ++ character(len=17) :: calendar = ' ' ++ logical :: force_date_from_namelist = .false. ! override restart values for date ++ integer :: months=0, days=0, hours=0, minutes=0, seconds=0 ++ integer :: dt_atmos = 0 ++ integer :: dt_ocean = 0 ++ integer :: restart_days = 0 ++ integer :: restart_secs = 0 ++ integer :: atmos_nthreads = 1 ++ logical :: memuse_verbose = .false. ++ logical :: use_hyper_thread = .false. ++ logical :: debug_affinity = .false. ++ integer :: ncores_per_node = 0 ++ ++ namelist /coupler_nml/ current_date, calendar, force_date_from_namelist, & ++ months, days, hours, minutes, seconds, & ++ dt_atmos, dt_ocean, atmos_nthreads, memuse_verbose, & ++ use_hyper_thread, ncores_per_node, debug_affinity, & ++ restart_secs, restart_days ++ ++! ----- local variables ----- ++ character(len=32) :: timestamp ++ logical :: intrm_rst ++ !$ser verbatim integer :: mpi_rank,ier ++ ++!####################################################################### ++ ++ call fms_init() ++ call mpp_init() ++ initClock = mpp_clock_id( 'Initialization' ) ++ call mpp_clock_begin (initClock) !nesting problem ++ ++ call fms_init ++ call constants_init ++ call sat_vapor_pres_init ++ !$ser verbatim call mpi_comm_rank(MPI_COMM_WORLD, mpi_rank,ier) ++ !$ser init directory='.' prefix='Generator' mpi_rank=mpi_rank unique_id=.true. ++ !$ser mode write ++ !$ser off ++ call coupler_init ++ call print_memuse_stats('after coupler init') ++ ++ call mpp_set_current_pelist() ++ call mpp_clock_end (initClock) !end initialization ++ mainClock = mpp_clock_id( 'Main loop' ) ++ termClock = mpp_clock_id( 'Termination' ) ++ call mpp_clock_begin(mainClock) !begin main loop ++ ++ do nc = 1, num_cpld_calls ++ ++ Time_atmos = Time_atmos + Time_step_atmos ++ ++ call update_atmos_model_dynamics (Atm) ++ ++ call update_atmos_radiation_physics (Atm) ++ ++ call update_atmos_model_state (Atm) ++ ++!--- intermediate restart ++ if (intrm_rst) then ++ if ((nc /= num_cpld_calls) .and. (Time_atmos == Time_restart)) then ++ timestamp = date_to_string (Time_restart) ++ call atmos_model_restart(Atm, timestamp) ++ call coupler_res(timestamp) ++ Time_restart = Time_restart + Time_step_restart ++ endif ++ endif ++ ++ call print_memuse_stats('after full step') ++ ++ enddo ++ !$ser cleanup ++!----------------------------------------------------------------------- ++ ++#ifdef AVEC_TIMERS ++ call avec_timers_output ++#endif ++ call mpp_set_current_pelist() ++ call mpp_clock_end(mainClock) ++ call mpp_clock_begin(termClock) ++ ++ call coupler_end ++ call mpp_set_current_pelist() ++ call mpp_clock_end(termClock) ++ ++ call fms_end ++ ++!----------------------------------------------------------------------- ++ ++ stop ++ ++contains ++ ++!####################################################################### ++ ++ subroutine coupler_init ++ ++!----------------------------------------------------------------------- ++! initialize all defined exchange grids and all boundary maps ++!----------------------------------------------------------------------- ++ integer :: total_days, total_seconds, unit, ierr, io ++ integer :: n, gnlon, gnlat ++ integer :: date(6), flags ++ type (time_type) :: Run_length ++ character(len=9) :: month ++ logical :: use_namelist ++ ++ logical, allocatable, dimension(:,:) :: mask ++ real, allocatable, dimension(:,:) :: glon_bnd, glat_bnd ++ integer :: omp_get_thread_num, get_cpu_affinity, base_cpu ++!----------------------------------------------------------------------- ++!----- initialization timing identifiers ---- ++ ++!----- read namelist ------- ++!----- for backwards compatibilty read from file coupler.nml ----- ++ ++#ifdef INTERNAL_FILE_NML ++ read(input_nml_file, nml=coupler_nml, iostat=io) ++ ierr = check_nml_error(io, 'coupler_nml') ++#else ++ if (file_exist('input.nml')) then ++ unit = open_namelist_file () ++ else ++ call error_mesg ('program coupler', & ++ 'namelist file input.nml does not exist', FATAL) ++ endif ++ ++ ierr=1 ++ do while (ierr /= 0) ++ read (unit, nml=coupler_nml, iostat=io, end=10) ++ ierr = check_nml_error (io, 'coupler_nml') ++ enddo ++10 call close_file (unit) ++#endif ++ ++!----- write namelist to logfile ----- ++ call write_version_number (version, tag) ++ if (mpp_pe() == mpp_root_pe()) write(stdlog(),nml=coupler_nml) ++ ++!----- allocate and set the pelist (to the global pelist) ----- ++ allocate( Atm%pelist (mpp_npes()) ) ++ call mpp_get_current_pelist(Atm%pelist) ++ ++!----- read restart file ----- ++ ++ if (file_exist('INPUT/coupler.res')) then ++ call mpp_open( unit, 'INPUT/coupler.res', action=MPP_RDONLY ) ++ read (unit,*,err=999) calendar_type ++ read (unit,*) date_init ++ read (unit,*) date ++ goto 998 !back to fortran-4 ++ ! read old-style coupler.res ++ 999 call mpp_close (unit) ++ call mpp_open (unit, 'INPUT/coupler.res', action=MPP_RDONLY, form=MPP_NATIVE) ++ read (unit) calendar_type ++ read (unit) date ++ 998 call mpp_close(unit) ++ else ++ force_date_from_namelist = .true. ++ endif ++ ++!----- use namelist value (either no restart or override flag on) --- ++ ++ if ( force_date_from_namelist ) then ++ ++ if ( sum(current_date) <= 0 ) then ++ call error_mesg ('program coupler', & ++ 'no namelist value for current_date', FATAL) ++ else ++ date = current_date ++ endif ++ ++!----- override calendar type with namelist value ----- ++ ++ select case( uppercase(trim(calendar)) ) ++ case( 'JULIAN' ) ++ calendar_type = JULIAN ++ case( 'NOLEAP' ) ++ calendar_type = NOLEAP ++ case( 'THIRTY_DAY' ) ++ calendar_type = THIRTY_DAY_MONTHS ++ case( 'NO_CALENDAR' ) ++ calendar_type = NO_CALENDAR ++ case default ++ call mpp_error ( FATAL, 'COUPLER_MAIN: coupler_nml entry calendar must '// & ++ 'be one of JULIAN|NOLEAP|THIRTY_DAY|NO_CALENDAR.' ) ++ end select ++ ++ endif ++ ++!$ base_cpu = get_cpu_affinity() ++!$ call omp_set_num_threads(atmos_nthreads) ++!$OMP PARALLEL NUM_THREADS(atmos_nthreads) ++!$ if(omp_get_thread_num() < atmos_nthreads/2 .OR. (.not. use_hyper_thread)) then ++!$ call set_cpu_affinity(base_cpu + omp_get_thread_num()) ++!$ else ++!$ call set_cpu_affinity(base_cpu + omp_get_thread_num() + & ++!$ ncores_per_node - atmos_nthreads/2) ++!$ endif ++!$ if (debug_affinity) then ++!$ write(6,*) mpp_pe()," atmos ",get_cpu_affinity(), base_cpu, omp_get_thread_num() ++!$ call flush(6) ++!$ endif ++!$OMP END PARALLEL ++ ++ call set_calendar_type (calendar_type) ++ ++!----- write current/initial date actually used to logfile file ----- ++ ++ if ( mpp_pe() == mpp_root_pe() ) then ++ write (stdlog(),16) date(1),trim(month_name(date(2))),date(3:6) ++ endif ++ ++ 16 format (' current date used = ',i4,1x,a,2i3,2(':',i2.2),' gmt') ++ ++!----------------------------------------------------------------------- ++!------ initialize diagnostics manager ------ ++ ++ call diag_manager_init (TIME_INIT=date) ++ ++!----- always override initial/base date with diag_manager value ----- ++ ++ call get_base_date ( date_init(1), date_init(2), date_init(3), & ++ date_init(4), date_init(5), date_init(6) ) ++ ++!----- use current date if no base date ------ ++ ++ if ( date_init(1) == 0 ) date_init = date ++ ++!----- set initial and current time types ------ ++ ++ Time_init = set_date (date_init(1), date_init(2), date_init(3), & ++ date_init(4), date_init(5), date_init(6)) ++ ++ Time_atmos = set_date (date(1), date(2), date(3), & ++ date(4), date(5), date(6)) ++ ++!----------------------------------------------------------------------- ++!----- compute the ending time (compute days in each month first) ----- ++! ++! (NOTE: if run length in months then starting day must be <= 28) ++ ++ if ( months > 0 .and. date(3) > 28 ) & ++ call error_mesg ('program coupler', & ++ 'if run length in months then starting day must be <= 28', FATAL) ++ ++ Time_end = Time_atmos ++ total_days = 0 ++ do n = 1, months ++ total_days = total_days + days_in_month(Time_end) ++ Time_end = Time_atmos + set_time (0,total_days) ++ enddo ++ ++ total_days = total_days + days ++ total_seconds = hours*3600 + minutes*60 + seconds ++ Run_length = set_time (total_seconds,total_days) ++ Time_end = Time_atmos + Run_length ++ ++ !Need to pass Time_end into diag_manager for multiple thread case. ++ call diag_manager_set_time_end(Time_end) ++ ++ ++!----------------------------------------------------------------------- ++!----- write time stamps (for start time and end time) ------ ++ ++ call mpp_open( unit, 'time_stamp.out', nohdrs=.TRUE. ) ++ ++ month = month_name(date(2)) ++ if ( mpp_pe() == mpp_root_pe() ) write (unit,20) date, month(1:3) ++ ++ call get_date (Time_end, date(1), date(2), date(3), & ++ date(4), date(5), date(6)) ++ month = month_name(date(2)) ++ if ( mpp_pe() == mpp_root_pe() ) write (unit,20) date, month(1:3) ++ ++ call mpp_close (unit) ++ ++ 20 format (6i4,2x,a3) ++ ++!----------------------------------------------------------------------- ++!----- compute the time steps ------ ++ ++Time_step_atmos = set_time (dt_atmos,0) ++Time_step_ocean = set_time (dt_ocean,0) ++num_cpld_calls = Run_length / Time_step_ocean ++num_atmos_calls = Time_step_ocean / Time_step_atmos ++Time_step_restart = set_time (restart_secs, restart_days) ++Time_restart = Time_atmos + Time_step_restart ++intrm_rst = .false. ++if (restart_days > 0 .or. restart_secs > 0) intrm_rst = .true. ++ ++!----------------------------------------------------------------------- ++!------------------- some error checks --------------------------------- ++ ++!----- initial time cannot be greater than current time ------- ++ ++ if ( Time_init > Time_atmos ) call error_mesg ('program coupler', & ++ 'initial time is greater than current time', FATAL) ++ ++!----- make sure run length is a multiple of ocean time step ------ ++ ++ if ( num_cpld_calls * Time_step_ocean /= Run_length ) & ++ call error_mesg ('program coupler', & ++ 'run length must be multiple of ocean time step', FATAL) ++ ++! ---- make sure cpld time step is a multiple of atmos time step ---- ++ ++ if ( num_atmos_calls * Time_step_atmos /= Time_step_ocean ) & ++ call error_mesg ('program coupler', & ++ 'atmos time step is not a multiple of the ocean time step', FATAL) ++ ++!------ initialize component models ------ ++ ++ call atmos_model_init (Atm, Time_init, Time_atmos, Time_step_atmos) ++ ++ call print_memuse_stats('after atmos model init') ++ ++ call mpp_get_global_domain(Atm%Domain, xsize=gnlon, ysize=gnlat) ++ allocate ( glon_bnd(gnlon+1,gnlat+1), glat_bnd(gnlon+1,gnlat+1) ) ++ call mpp_global_field(Atm%Domain, Atm%lon_bnd, glon_bnd, position=CORNER) ++ call mpp_global_field(Atm%Domain, Atm%lat_bnd, glat_bnd, position=CORNER) ++ ++ call data_override_init ( ) ! Atm_domain_in = Atm%domain, & ++ ! Ice_domain_in = Ice%domain, & ++ ! Land_domain_in = Land%domain ) ++ ++!----------------------------------------------------------------------- ++!---- open and close dummy file in restart dir to check if dir exists -- ++ ++ if (mpp_pe() == 0 ) then ++ call mpp_open( unit, 'RESTART/file' ) ++ call mpp_close(unit, MPP_DELETE) ++ endif ++ ++!----------------------------------------------------------------------- ++ ++ end subroutine coupler_init ++ ++!####################################################################### ++ subroutine coupler_res(timestamp) ++ character(len=32), intent(in) :: timestamp ++ ++ integer :: unit, date(6) ++ ++!----- compute current date ------ ++ ++ call get_date (Time_atmos, date(1), date(2), date(3), & ++ date(4), date(5), date(6)) ++ ++!----- write restart file ------ ++ ++ if (mpp_pe() == mpp_root_pe())then ++ call mpp_open( unit, 'RESTART/'//trim(timestamp)//'.coupler.res', nohdrs=.TRUE. ) ++ write( unit, '(i6,8x,a)' )calendar_type, & ++ '(Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)' ++ ++ write( unit, '(6i6,8x,a)' )date_init, & ++ 'Model start time: year, month, day, hour, minute, second' ++ write( unit, '(6i6,8x,a)' )date, & ++ 'Current model time: year, month, day, hour, minute, second' ++ call mpp_close(unit) ++ endif ++ end subroutine coupler_res ++ ++!####################################################################### ++ ++ subroutine coupler_end ++ ++ integer :: unit, date(6) ++!----------------------------------------------------------------------- ++ ++ call atmos_model_end (Atm) ++ ++!----- compute current date ------ ++ ++ call get_date (Time_atmos, date(1), date(2), date(3), & ++ date(4), date(5), date(6)) ++ ++!----- check time versus expected ending time ---- ++ ++ if (Time_atmos /= Time_end) call error_mesg ('program coupler', & ++ 'final time does not match expected ending time', WARNING) ++ ++!----- write restart file ------ ++ ++ call mpp_open( unit, 'RESTART/coupler.res', nohdrs=.TRUE. ) ++ if (mpp_pe() == mpp_root_pe())then ++ write( unit, '(i6,8x,a)' )calendar_type, & ++ '(Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)' ++ ++ write( unit, '(6i6,8x,a)' )date_init, & ++ 'Model start time: year, month, day, hour, minute, second' ++ write( unit, '(6i6,8x,a)' )date, & ++ 'Current model time: year, month, day, hour, minute, second' ++ endif ++ call mpp_close(unit) ++ ++!----- final output of diagnostic fields ---- ++ ++ call diag_manager_end (Time_atmos) ++ ++!----------------------------------------------------------------------- ++ ++ end subroutine coupler_end ++ ++!####################################################################### ++ ++end program coupler_main ++ +diff --git a/makefile b/makefile +index 104e885..1fddc54 100644 +--- a/makefile ++++ b/makefile +@@ -41,7 +41,7 @@ libs: + $(MAKE) -C atmos_cubed_sphere $(MAKE_OPTS) FMS_DIR=$(FMS_DIR) + $(MAKE) -C ../stochastic_physics $(MAKE_OPTS) FMS_DIR=$(FMS_DIR) 32BIT=N # force gfs physics to 64bit + +-$(FV3_EXE): atmos_model.o coupler_main.o ccpp/driver/libccppdriver.a atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a ../stochastic_physics/libstochastic_physics.a cpl/libfv3cpl.a ++$(FV3_EXE): atmos_model.o coupler_main.o module_fv3_config.o module_fv3_config.o ccpp/driver/libccppdriver.a atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a ../stochastic_physics/libstochastic_physics.a cpl/libfv3cpl.a + $(LD) -o $@ $^ $(NCEPLIBS) $(LDFLAGS) + + else +@@ -53,14 +53,14 @@ libs: + $(MAKE) -C atmos_cubed_sphere $(MAKE_OPTS) FMS_DIR=$(FMS_DIR) + $(MAKE) -C ../stochastic_physics $(MAKE_OPTS) FMS_DIR=$(FMS_DIR) 32BIT=N # force gfs physics to 64bit + +-$(FV3_EXE): atmos_model.o coupler_main.o atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a ../stochastic_physics/libstochastic_physics.a cpl/libfv3cpl.a ++$(FV3_EXE): atmos_model.o coupler_main.o module_fv3_config.o atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a ../stochastic_physics/libstochastic_physics.a cpl/libfv3cpl.a + $(LD) -o $@ $^ $(NCEPLIBS) $(LDFLAGS) + endif + + $(FV3CAP_LIB): atmos_model.o module_fv3_config.o module_fcst_grid_comp.o time_utils.o fv3_cap.o + ar rv $(FV3CAP_LIB) $? + +-atmos_model.o : atmos_model.F90 ++atmos_model.o : atmos_model.F90 module_fv3_config.o + $(FC) $(CPPDEFS) $(CPPFLAGS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) $(ESMF_INC) -c atmos_model.F90 + + module_fv3_config.o: module_fv3_config.F90 +-- +2.24.0 + diff --git a/docker/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch b/docker/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch new file mode 100644 index 000000000..469ab3ae8 --- /dev/null +++ b/docker/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch @@ -0,0 +1,48 @@ +From b62a8c42517326b36799676e52350f7ae61a9381 Mon Sep 17 00:00:00 2001 +From: Oliver Fuhrer +Date: Fri, 8 May 2020 12:00:05 -0700 +Subject: [PATCH] fix logical comparisons + +--- + atmos_model.F90 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/atmos_model.F90 b/atmos_model.F90 +index a002efd..c024ea2 100644 +--- a/atmos_model.F90 ++++ b/atmos_model.F90 +@@ -312,13 +312,13 @@ subroutine update_atmos_radiation_physics (Atmos) + end if + + if(IPD_Control%do_ca)then +- if(IPD_Control%ca_sgs == .true.)then ++ if(IPD_Control%ca_sgs)then + call cellular_automata_sgs(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & + IPD_Control%nca,IPD_Control%ncells,IPD_Control%nlives,IPD_Control%nfracseed,& + IPD_Control%nseed,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& + IPD_Control%ca_smooth,IPD_Control%nspinup,Atm_block%blksz(1)) + endif +- if(IPD_Control%ca_global == .true.)then ++ if(IPD_Control%ca_global)then + call cellular_automata_global(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & + IPD_Control%nca_g,IPD_Control%ncells_g,IPD_Control%nlives_g,IPD_Control%nfracseed,& + IPD_Control%nseed_g,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& +@@ -661,13 +661,13 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) + end if + ! *DH + if(IPD_Control%do_ca)then +- if(IPD_Control%ca_sgs == .true.)then ++ if(IPD_Control%ca_sgs)then + call cellular_automata_sgs(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & + IPD_Control%nca,IPD_Control%ncells,IPD_Control%nlives,IPD_Control%nfracseed,& + IPD_Control%nseed,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& + IPD_Control%ca_smooth,IPD_Control%nspinup,Atm_block%blksz(1)) + endif +- if(IPD_Control%ca_global == .true.)then ++ if(IPD_Control%ca_global)then + call cellular_automata_global(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & + IPD_Control%nca_g,IPD_Control%ncells_g,IPD_Control%nlives_g,IPD_Control%nfracseed,& + IPD_Control%nseed_g,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& +-- +2.24.0 + diff --git a/docker/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch b/docker/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch new file mode 100644 index 000000000..4399db598 --- /dev/null +++ b/docker/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch @@ -0,0 +1,25 @@ +From fe715358a087d1073777bab79740dd1d50a99231 Mon Sep 17 00:00:00 2001 +From: Oliver Fuhrer +Date: Fri, 8 May 2020 11:13:42 -0700 +Subject: [PATCH] fix logical comparison + +--- + update_ca.F90 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/update_ca.F90 b/update_ca.F90 +index 55d5305..05b0b6f 100644 +--- a/update_ca.F90 ++++ b/update_ca.F90 +@@ -243,7 +243,7 @@ enddo !spinup + incj=incj+ncells + ENDDO + +-if(nca_plumes == .true.) then ++if(nca_plumes) then + !COMPUTE NUMBER OF CLUSTERS (CONVECTIVE PLUMES) IN EACH CA-CELL + !Note, at the moment we only use the count of the plumes found in a grid-cell + !In the future the routine "plumes" can also be used to give the size of +-- +2.24.0 + diff --git a/docker/work/.DS_Store b/docker/work/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4ce9ef416c0d13d0f0ede5fe59e539a0968dc3a6 GIT binary patch literal 8196 zcmeHMTWl0n7(U;&(3vvO(~2;_0xOlP6}HH&D6+kPl#4XBr5Dh$yEC*S)0w(6y9G)~ zAsSyyyr4d)2}Wb$CDEw(WFXO~F+89|5+b5c`rr$X_}~TqGiSE33;2eTFejPw&7A-I z|2gN|@65?R%NRpb-l%6xXN)Oy3FK3#x=s;xaa~hlVM{q7$e%HbqTlAl?rNx&)>|9FrKlI;aX#078)h z1cmM?4+wk`A*MnclNh*COqo3(bVZnAK)RDXA-WT$LL8GQ-5I1iLpUSe`k|D9PW?WQJ_Z^OMO7h?SL3np~kMl}hE*%17G=+~IaV z?dQFwbZ)nJYD@bAnee{Db?x!{bY_=j4)^it&9398Eyv6S&X!?PmpxsUW4OajZr(Ax zAWpk9D2l46eSFr)Nd3Cib%~X08b<39BlXFKRdtEA^$nw=sxot7{f5@Pg9i_d93DOL zid-1NmjkORS?H^!tF*mBv;0aC`?R>qi^Wx{l~c5-`j*zM+q50sR@QaetwUxXukvW2 zt@PNIGYhn+uB>b42OY1ES7+09HgBhWv(dIiXKJhRvN_kb+g#7`E!XMk_RRx+G0+54 zcdzH>{N^B7ALn_`e8i+!R>5qch!m~IYc&ETIXYG7F~PuF(~OLNYo+EA3BdC_8B z>+pyHo(?SSi`{{S)9t|ZXn5@_IPCK13ZEmR2ZS@*W?<&Zp@oiz_`ujD#JL?V( z(o(!?)P>C(Q@Z|`7IV7g~zcUJ`Uk9MsWmB<5@h97jPV};Vrz4cknJg z#^?9~U*ao#gKu#TKj0F6!Dal0Kk%oVYpf{ihl_KUh^vGXHZRFK{P-4o>H4ycZ)x4K zRa<(?%li9iQp|KGd`M3Ex~A_o3<22kG8-qJ+VxX~+E&1 | tee fv3.out + +exit 0 From 0dda4be44c771652c6b93501a28cf4f0364b3e2a Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 17:55:23 -0700 Subject: [PATCH 02/26] Create .travis.yml --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..cfe6d187f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: C + +services: + - docker + +before_install: + - make build + +script: + - make run From 60cdb5b1e2b95308f2b25c05c8b37aa6747974f9 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 17:56:54 -0700 Subject: [PATCH 03/26] Update .travis.yml --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfe6d187f..015a41827 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ language: C services: - docker -before_install: - - make build - script: + - make build - make run From c4b8fe9a9d21e6ada665946482ebadb607883359 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 17:57:51 -0700 Subject: [PATCH 04/26] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 015a41827..753a478f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,6 @@ services: - docker script: + - cd docker - make build - make run From d0b102b8cc2cb476948a1854b9e6a657b4039421 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 18:28:38 -0700 Subject: [PATCH 05/26] Update .travis.yml --- .travis.yml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 753a478f3..ffebde34c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,39 @@ -language: C +sudo: required services: - docker +env: + global: + CACHE_IMAGE: ofuhrer/fv3atm_test + +before_script: + - docker pull $CACHE_IMAGE:base || true + - docker pull $CACHE_IMAGE:build || true + - docker pull $CACHE_IMAGE:test || true + script: - - cd docker - - make build - - make run + - docker build + --target base + --cache-from $CACHE_IMAGE:base + --tag $CACHE_IMAGE:base + --file docker/Dockerfile + "." + - docker build + --target build + --cache-from $CACHE_IMAGE:build + --tag $CACHE_IMAGE:build + --file docker/Dockerfile + "." + - docker build + --target test + --cache-from $CACHE_IMAGE:test + --tag $CACHE_IMAGE:test + --file docker/Dockerfile + "." + + after_success: + - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" + - docker push $CACHE_IMAGE:base + - docker push $CACHE_IMAGE:build + - docker push $CACHE_IMAGE:test From 5817679c8c541009dcb4c2576a8d0bb3cfb14761 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 18:29:05 -0700 Subject: [PATCH 06/26] update Dockerfile --- docker/Dockerfile | 65 ++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6800148a7..af0caa586 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,6 @@ -ARG NCEP_IMAGE=fv3atm-ncep -ARG FMS_IMAGE=fv3atm-fms -ARG ESMF_IMAGE=fv3atm-esmf - ## --------------------------------------------------------------------------------- ## Build environment image -FROM ubuntu:19.10 AS fv3atm-environment +FROM ubuntu:19.10 AS base RUN apt-get update && apt-get install -y \ curl \ @@ -28,9 +24,6 @@ RUN git config --global user.email "you@example.com" && \ ## --------------------------------------------------------------------------------- ## Build NCEPlibs -FROM fv3atm-environment AS fv3atm-ncep - -# download and install NCEP libraries RUN git config --global http.sslverify false && \ git clone https://github.com/NCAR/NCEPlibs.git /NCEPlibs && \ mkdir /opt/NCEPlibs && \ @@ -40,14 +33,11 @@ RUN git config --global http.sslverify false && \ ## --------------------------------------------------------------------------------- ## Build ESMF -FROM fv3atm-environment AS fv3atm-esmf - -ENV ESMF_DIR=/esmf -ENV ESMF_INSTALL_PREFIX=/usr/local/esmf -ENV ESMF_NETCDF_INCLUDE=/usr/include -ENV ESMF_NETCDF_LIBS="-lnetcdf -lnetcdff" -ENV ESMF_BOPT=O3 - +ENV ESMF_DIR=/esmf \ + ESMF_INSTALL_PREFIX=/usr/local/esmf \ + ESMF_NETCDF_INCLUDE=/usr/include \ + ESMF_NETCDF_LIBS="-lnetcdf -lnetcdff" \ + ESMF_BOPT=O3 RUN git clone -b ESMF_8_0_0 --depth 1 https://git.code.sf.net/p/esmf/esmf $ESMF_DIR && \ cd $ESMF_DIR && \ make lib -j8 && \ @@ -56,31 +46,29 @@ RUN git clone -b ESMF_8_0_0 --depth 1 https://git.code.sf.net/p/esmf/esmf $ESMF_ ## --------------------------------------------------------------------------------- ## Build FMS -FROM fv3atm-environment AS fv3atm-fms - -ENV CC=mpicc -ENV FC=mpifort -ENV LDFLAGS="-L/usr/lib" -ENV LOG_DRIVER_FLAGS="--comments" -ENV CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500 -DGFS_PHYS" -ENV FCFLAGS="-fcray-pointer -Waliasing -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -fopenmp" - COPY patches/PATCH-FMS-affinity.c-fix-getpid.patch / COPY patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch / RUN git clone https://github.com/NOAA-GFDL/FMS.git /FMS && \ cd /FMS && git checkout f68878549364e39591216874d5a922c06b7d3a91 && \ git am /PATCH-FMS-affinity.c-fix-getpid.patch && \ git am /PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch && \ - autoreconf --install && ./configure && \ - make -j8 && \ + CC=mpicc FC=mpifort LDFLAGS="-L/usr/lib" LOG_DRIVER_FLAGS="--comments" \ + CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500 -DGFS_PHYS" \ + FCFLAGS="-fcray-pointer -Waliasing -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -fopenmp" \ + autoreconf --install && \ + CC=mpicc FC=mpifort LDFLAGS="-L/usr/lib" LOG_DRIVER_FLAGS="--comments" \ + CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500 -DGFS_PHYS" \ + FCFLAGS="-fcray-pointer -Waliasing -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -fopenmp" \ + ./configure && \ + CC=mpicc FC=mpifort LDFLAGS="-L/usr/lib" LOG_DRIVER_FLAGS="--comments" \ + CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500 -DGFS_PHYS" \ + FCFLAGS="-fcray-pointer -Waliasing -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -fopenmp" \ + make -j8 && \ mv /FMS/*/*.mod /FMS/*/*.o /FMS/*/*.h /FMS/ ## --------------------------------------------------------------------------------- ## Build fv3atm executable in its own image -FROM $NCEP_IMAGE AS ncep_image -FROM $FMS_IMAGE AS fms_image -FROM $ESMF_IMAGE AS esmf_image -FROM fv3atm-environment AS fv3atm-build +FROM base AS build ENV NCEP_DIR=/NCEPlibs \ FMS_DIR=/FMS \ @@ -89,9 +77,9 @@ ENV NCEP_DIR=/NCEPlibs \ ENV ESMF_INC="-I/usr/local/esmf/include -I${ESMF_DIR}/mod/modO3/Linux.gfortran.64.mpiuni.default/" \ LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ESMF_DIR}/lib/libO3/Linux.gfortran.64.mpiuni.default/:${FMS_DIR}/libFMS/.libs/ -COPY --from=ncep_image /opt/NCEPlibs $NCEP_DIR -COPY --from=fms_image /FMS $FMS_DIR -COPY --from=esmf_image /usr/local/esmf $ESMF_DIR +COPY --from=base /opt/NCEPlibs $NCEP_DIR +COPY --from=base /FMS $FMS_DIR +COPY --from=base /usr/local/esmf $ESMF_DIR ARG configure_file=configure.fv3.gnu_docker @@ -115,7 +103,7 @@ RUN cd /FV3/atmos_cubed_sphere && make clean && cd /FV3 && make -j8 ## --------------------------------------------------------------------------------- ## Build deployment image -FROM fv3atm-environment AS fv3atm-deploy +FROM base AS test RUN apt-get update && apt-get install -y \ python3 \ @@ -126,8 +114,8 @@ RUN ln -s /bin/python3 /bin/python && \ pip install --no-cache-dir pyyaml ENV LD_LIBRARY_PATH=/usr/local/lib -COPY --from=fv3atm-fms /FMS/libFMS/.libs/* /usr/local/lib/ -COPY --from=fv3atm-esmf /usr/local/esmf/lib/libO3/Linux.gfortran.64.mpiuni.default/* /usr/local/lib/ +COPY --from=fv3atm-base /FMS/libFMS/.libs/* /usr/local/lib/ +COPY --from=fv3atm-base /usr/local/esmf/lib/libO3/Linux.gfortran.64.mpiuni.default/* /usr/local/lib/ RUN git clone -b v0.3.2 https://github.com/VulcanClimateModeling/fv3config.git && \ cd fv3config && \ @@ -136,9 +124,6 @@ RUN git clone -b v0.3.2 https://github.com/VulcanClimateModeling/fv3config.git & RUN mkdir /work WORKDIR /work COPY --from=fv3atm-build /FV3/fv3.exe /FV3/fv3.exe -#COPY etc/create_rundir.py /work -#COPY etc/default.yaml /work -#COPY etc/run_test.sh /work # run model CMD ["/work/run_test.sh"] \ No newline at end of file From 2ff0df15e3c128991f9ff72f010d2368759d2b37 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 18:36:18 -0700 Subject: [PATCH 07/26] Update .travis.yml --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffebde34c..fb5ca763f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,8 @@ script: --file docker/Dockerfile "." - after_success: - - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" - - docker push $CACHE_IMAGE:base - - docker push $CACHE_IMAGE:build - - docker push $CACHE_IMAGE:test +after_success: + - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" + - docker push $CACHE_IMAGE:base + - docker push $CACHE_IMAGE:build + - docker push $CACHE_IMAGE:test From 924dfc3d066be34382c2a606c95aa20a4666ef5e Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 21:38:09 -0700 Subject: [PATCH 08/26] Update .travis.yml --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index fb5ca763f..1568fe376 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,24 +13,28 @@ before_script: - docker pull $CACHE_IMAGE:test || true script: + - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" - docker build --target base --cache-from $CACHE_IMAGE:base --tag $CACHE_IMAGE:base --file docker/Dockerfile "." + - docker push $CACHE_IMAGE:base - docker build --target build --cache-from $CACHE_IMAGE:build --tag $CACHE_IMAGE:build --file docker/Dockerfile "." + - docker push $CACHE_IMAGE:build - docker build --target test --cache-from $CACHE_IMAGE:test --tag $CACHE_IMAGE:test --file docker/Dockerfile "." + - docker push $CACHE_IMAGE:test after_success: - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" From 57c67de9d20a0cd56e6381863bc64cf4e2de8211 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 21:40:01 -0700 Subject: [PATCH 09/26] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1568fe376..f91768f35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_script: - docker pull $CACHE_IMAGE:test || true script: - - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker build --target base --cache-from $CACHE_IMAGE:base @@ -37,7 +37,7 @@ script: - docker push $CACHE_IMAGE:test after_success: - - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push $CACHE_IMAGE:base - docker push $CACHE_IMAGE:build - docker push $CACHE_IMAGE:test From 1d0e29f59a2ff53384978c49f482d44e07d8e09e Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Fri, 8 May 2020 22:15:35 -0700 Subject: [PATCH 10/26] update of testing --- .travis.yml | 6 +++--- {docker => test}/.DS_Store | Bin {docker => test}/Dockerfile | 12 ++++++------ {docker => test}/Makefile | 0 {docker => test}/etc/configure.fv3.gnu_docker | 0 {docker => test}/etc/make.rules | 0 .../patches/PATCH-FMS-affinity.c-fix-getpid.patch | 0 ...-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch | 0 .../patches/PATCH-fv3atm-apply-fixes.patch | 0 ...tm-atmos_model.F90-fix-logical-comparisons.patch | 0 ...sics-update_ca.F90-fix-logical-comparisons.patch | 0 {docker => test}/work/.DS_Store | Bin {docker => test}/work/create_rundir.py | 0 {docker => test}/work/default.yaml | 0 {docker => test}/work/run_test.sh | 0 15 files changed, 9 insertions(+), 9 deletions(-) rename {docker => test}/.DS_Store (100%) rename {docker => test}/Dockerfile (92%) rename {docker => test}/Makefile (100%) rename {docker => test}/etc/configure.fv3.gnu_docker (100%) rename {docker => test}/etc/make.rules (100%) rename {docker => test}/patches/PATCH-FMS-affinity.c-fix-getpid.patch (100%) rename {docker => test}/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch (100%) rename {docker => test}/patches/PATCH-fv3atm-apply-fixes.patch (100%) rename {docker => test}/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch (100%) rename {docker => test}/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch (100%) rename {docker => test}/work/.DS_Store (100%) rename {docker => test}/work/create_rundir.py (100%) rename {docker => test}/work/default.yaml (100%) rename {docker => test}/work/run_test.sh (100%) diff --git a/.travis.yml b/.travis.yml index f91768f35..03ecd6add 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,21 +18,21 @@ script: --target base --cache-from $CACHE_IMAGE:base --tag $CACHE_IMAGE:base - --file docker/Dockerfile + --file test/Dockerfile "." - docker push $CACHE_IMAGE:base - docker build --target build --cache-from $CACHE_IMAGE:build --tag $CACHE_IMAGE:build - --file docker/Dockerfile + --file test/Dockerfile "." - docker push $CACHE_IMAGE:build - docker build --target test --cache-from $CACHE_IMAGE:test --tag $CACHE_IMAGE:test - --file docker/Dockerfile + --file test/Dockerfile "." - docker push $CACHE_IMAGE:test diff --git a/docker/.DS_Store b/test/.DS_Store similarity index 100% rename from docker/.DS_Store rename to test/.DS_Store diff --git a/docker/Dockerfile b/test/Dockerfile similarity index 92% rename from docker/Dockerfile rename to test/Dockerfile index af0caa586..b199909f1 100644 --- a/docker/Dockerfile +++ b/test/Dockerfile @@ -46,8 +46,8 @@ RUN git clone -b ESMF_8_0_0 --depth 1 https://git.code.sf.net/p/esmf/esmf $ESMF_ ## --------------------------------------------------------------------------------- ## Build FMS -COPY patches/PATCH-FMS-affinity.c-fix-getpid.patch / -COPY patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch / +COPY test/patches/PATCH-FMS-affinity.c-fix-getpid.patch / +COPY test/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch / RUN git clone https://github.com/NOAA-GFDL/FMS.git /FMS && \ cd /FMS && git checkout f68878549364e39591216874d5a922c06b7d3a91 && \ git am /PATCH-FMS-affinity.c-fix-getpid.patch && \ @@ -83,11 +83,11 @@ COPY --from=base /usr/local/esmf $ESMF_DIR ARG configure_file=configure.fv3.gnu_docker -COPY patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch / +COPY test/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch / RUN git clone https://github.com/noaa-psd/stochastic_physics.git /stochastic_physics && \ cd /stochastic_physics && git checkout 01739da377d603c9c8d6d666afe2442260fd79d1 -COPY patches/PATCH-fv3atm-apply-fixes.patch / +COPY test/patches/PATCH-fv3atm-apply-fixes.patch / RUN git clone https://github.com/NOAA-EMC/fv3atm.git /FV3 && \ cd /FV3 && git checkout b48b640f4d8cae978e2d98e149412054d74dcce7 && \ git submodule update --init && \ @@ -95,8 +95,8 @@ RUN git clone https://github.com/NOAA-EMC/fv3atm.git /FV3 && \ mkdir namphysics && mkdir conf RUN /bin/rm -f /PATCH-* -COPY etc/make.rules /FV3/conf/make.rules -COPY etc/configure.fv3.gnu_docker /FV3/conf/configure.fv3 +COPY test/etc/make.rules /FV3/conf/make.rules +COPY test/etc/configure.fv3.gnu_docker /FV3/conf/configure.fv3 RUN cd /FV3 && make clean && make libs -j8 RUN cd /FV3/atmos_cubed_sphere && make clean && cd /FV3 && make -j8 diff --git a/docker/Makefile b/test/Makefile similarity index 100% rename from docker/Makefile rename to test/Makefile diff --git a/docker/etc/configure.fv3.gnu_docker b/test/etc/configure.fv3.gnu_docker similarity index 100% rename from docker/etc/configure.fv3.gnu_docker rename to test/etc/configure.fv3.gnu_docker diff --git a/docker/etc/make.rules b/test/etc/make.rules similarity index 100% rename from docker/etc/make.rules rename to test/etc/make.rules diff --git a/docker/patches/PATCH-FMS-affinity.c-fix-getpid.patch b/test/patches/PATCH-FMS-affinity.c-fix-getpid.patch similarity index 100% rename from docker/patches/PATCH-FMS-affinity.c-fix-getpid.patch rename to test/patches/PATCH-FMS-affinity.c-fix-getpid.patch diff --git a/docker/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch b/test/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch similarity index 100% rename from docker/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch rename to test/patches/PATCH-FMS-libFMS_Makefile.am-add-sat-vapor-pres.patch diff --git a/docker/patches/PATCH-fv3atm-apply-fixes.patch b/test/patches/PATCH-fv3atm-apply-fixes.patch similarity index 100% rename from docker/patches/PATCH-fv3atm-apply-fixes.patch rename to test/patches/PATCH-fv3atm-apply-fixes.patch diff --git a/docker/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch b/test/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch similarity index 100% rename from docker/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch rename to test/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch diff --git a/docker/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch b/test/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch similarity index 100% rename from docker/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch rename to test/patches/PATCH-stochastic_physics-update_ca.F90-fix-logical-comparisons.patch diff --git a/docker/work/.DS_Store b/test/work/.DS_Store similarity index 100% rename from docker/work/.DS_Store rename to test/work/.DS_Store diff --git a/docker/work/create_rundir.py b/test/work/create_rundir.py similarity index 100% rename from docker/work/create_rundir.py rename to test/work/create_rundir.py diff --git a/docker/work/default.yaml b/test/work/default.yaml similarity index 100% rename from docker/work/default.yaml rename to test/work/default.yaml diff --git a/docker/work/run_test.sh b/test/work/run_test.sh similarity index 100% rename from docker/work/run_test.sh rename to test/work/run_test.sh From fead90f56b1a0e406938204fb0852181f1a945f4 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sat, 9 May 2020 22:07:12 -0700 Subject: [PATCH 11/26] first version of Travis CI testing --- .dockerignore | 2 + .travis.yml | 54 +++++------ test/.DS_Store | Bin 8196 -> 0 bytes test/.dockerignore | 1 + test/{Dockerfile => Dockerfile.base} | 85 +++++++++--------- test/Dockerfile.test | 25 ++++++ test/Makefile | 44 --------- ...os_model.F90-fix-logical-comparisons.patch | 48 ---------- test/work/.DS_Store | Bin 8196 -> 0 bytes test/work/create_rundir.py | 1 - 10 files changed, 96 insertions(+), 164 deletions(-) create mode 100644 .dockerignore delete mode 100644 test/.DS_Store create mode 100644 test/.dockerignore rename test/{Dockerfile => Dockerfile.base} (67%) create mode 100644 test/Dockerfile.test delete mode 100644 test/Makefile delete mode 100644 test/patches/PATCH-fv3atm-atmos_model.F90-fix-logical-comparisons.patch delete mode 100644 test/work/.DS_Store diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..f0167a035 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +Dockerfile.* +run_test.sh diff --git a/.travis.yml b/.travis.yml index 03ecd6add..6bcf5363f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,35 +9,37 @@ env: before_script: - docker pull $CACHE_IMAGE:base || true - - docker pull $CACHE_IMAGE:build || true - docker pull $CACHE_IMAGE:test || true -script: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - docker build - --target base - --cache-from $CACHE_IMAGE:base - --tag $CACHE_IMAGE:base - --file test/Dockerfile - "." - - docker push $CACHE_IMAGE:base - - docker build - --target build - --cache-from $CACHE_IMAGE:build - --tag $CACHE_IMAGE:build - --file test/Dockerfile - "." - - docker push $CACHE_IMAGE:build - - docker build - --target test - --cache-from $CACHE_IMAGE:test - --tag $CACHE_IMAGE:test - --file test/Dockerfile - "." - - docker push $CACHE_IMAGE:test - +jobs: + include: + - stage: build base container + script: + - cd test + - docker build + --target base + --cache-from $CACHE_IMAGE:base + --tag $CACHE_IMAGE:base + --file test/Dockerfile.base + "." + - cd ../ + - stage: build test container + script: + - docker build + --target test + --cache-from $CACHE_IMAGE:test + --tag $CACHE_IMAGE:test + --file test/Dockerfile.test + "." + - stage: run test + script: + docker run + -it + --rm + --mount type=bind,source=`pwd`/work,target=/work + --name=fv3_atm ofuhrer/fv3atm_test:test + after_success: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push $CACHE_IMAGE:base - - docker push $CACHE_IMAGE:build - docker push $CACHE_IMAGE:test diff --git a/test/.DS_Store b/test/.DS_Store deleted file mode 100644 index 451bae716c6e9f01a6d306282fa0a28e1b196792..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMOKcoP5UsMEWM-UCJ0##)l6d7+Z~%vREyu>3=$?@UH+Q z`4zxVRA;alhkOWFYEV=8$O=(`-|R zV|$uu8##YGF~;biY3ok0-O1a!>)Qu|`}ID}8>exkSYqM_e20-a0)kOOjf*|KM2usa|o+fB2otY&5N76H;` zS=`ti@{FS%uN`)soY&zSrWwn-#zBMZ%z}|5YjWMlN9vvOOviQ)89A3^EYTnWmS@*) z-dcOh?G3x{x+i&g-TDozYNMhYCMa#se8@C%14X_k!Hk+%veUhtxXzL zI48@OZ@j5`of=WMlvGPyBo>o~@)`4yyy+eD=h#-GDx*3@*W>7X7M)#?WM31jQPmNy z>Bt#W>XPJl*X>Z1ewWtDw7{@_r=s*v&{i{-Lg0bN8x?iH(lUm{bXmAHwU0_#D23ui+cG0zbmf@GJZQf5Knz zH?GDFxCOUi4My=++>OoHf(h)z19&fX;Xxe4VLXf@sN=(E;UwBv#K-V)Jc&=>X*`3^ z;|q8eU&ZtIHeSGs_%6POm+%w(6u-jn@Ou$wS&6PaqFpL+j%o|(8a%$0ja`kdk^Kjh z_}jOLiG07+$j!>umDoH$ zoHLF}oH%Tau#QG*CE^P6$)ZNKN9rUZG%NG9%54#{)Ff6ejCUz3LgHHsSyxEqY|F8aP+y6qi_OEtXf2%z@-ABI$qk}3B| Z1ad}5>Y? -Date: Fri, 8 May 2020 12:00:05 -0700 -Subject: [PATCH] fix logical comparisons - ---- - atmos_model.F90 | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/atmos_model.F90 b/atmos_model.F90 -index a002efd..c024ea2 100644 ---- a/atmos_model.F90 -+++ b/atmos_model.F90 -@@ -312,13 +312,13 @@ subroutine update_atmos_radiation_physics (Atmos) - end if - - if(IPD_Control%do_ca)then -- if(IPD_Control%ca_sgs == .true.)then -+ if(IPD_Control%ca_sgs)then - call cellular_automata_sgs(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & - IPD_Control%nca,IPD_Control%ncells,IPD_Control%nlives,IPD_Control%nfracseed,& - IPD_Control%nseed,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& - IPD_Control%ca_smooth,IPD_Control%nspinup,Atm_block%blksz(1)) - endif -- if(IPD_Control%ca_global == .true.)then -+ if(IPD_Control%ca_global)then - call cellular_automata_global(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & - IPD_Control%nca_g,IPD_Control%ncells_g,IPD_Control%nlives_g,IPD_Control%nfracseed,& - IPD_Control%nseed_g,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& -@@ -661,13 +661,13 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) - end if - ! *DH - if(IPD_Control%do_ca)then -- if(IPD_Control%ca_sgs == .true.)then -+ if(IPD_Control%ca_sgs)then - call cellular_automata_sgs(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & - IPD_Control%nca,IPD_Control%ncells,IPD_Control%nlives,IPD_Control%nfracseed,& - IPD_Control%nseed,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& - IPD_Control%ca_smooth,IPD_Control%nspinup,Atm_block%blksz(1)) - endif -- if(IPD_Control%ca_global == .true.)then -+ if(IPD_Control%ca_global)then - call cellular_automata_global(IPD_Control%kdt,IPD_Data(:)%Statein,IPD_Data(:)%Coupling,IPD_Data(:)%Intdiag,Atm_block%nblks,IPD_Control%levs, & - IPD_Control%nca_g,IPD_Control%ncells_g,IPD_Control%nlives_g,IPD_Control%nfracseed,& - IPD_Control%nseed_g,IPD_Control%nthresh,IPD_Control%ca_global,IPD_Control%ca_sgs,IPD_Control%iseed_ca,& --- -2.24.0 - diff --git a/test/work/.DS_Store b/test/work/.DS_Store deleted file mode 100644 index 4ce9ef416c0d13d0f0ede5fe59e539a0968dc3a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMTWl0n7(U;&(3vvO(~2;_0xOlP6}HH&D6+kPl#4XBr5Dh$yEC*S)0w(6y9G)~ zAsSyyyr4d)2}Wb$CDEw(WFXO~F+89|5+b5c`rr$X_}~TqGiSE33;2eTFejPw&7A-I z|2gN|@65?R%NRpb-l%6xXN)Oy3FK3#x=s;xaa~hlVM{q7$e%HbqTlAl?rNx&)>|9FrKlI;aX#078)h z1cmM?4+wk`A*MnclNh*COqo3(bVZnAK)RDXA-WT$LL8GQ-5I1iLpUSe`k|D9PW?WQJ_Z^OMO7h?SL3np~kMl}hE*%17G=+~IaV z?dQFwbZ)nJYD@bAnee{Db?x!{bY_=j4)^it&9398Eyv6S&X!?PmpxsUW4OajZr(Ax zAWpk9D2l46eSFr)Nd3Cib%~X08b<39BlXFKRdtEA^$nw=sxot7{f5@Pg9i_d93DOL zid-1NmjkORS?H^!tF*mBv;0aC`?R>qi^Wx{l~c5-`j*zM+q50sR@QaetwUxXukvW2 zt@PNIGYhn+uB>b42OY1ES7+09HgBhWv(dIiXKJhRvN_kb+g#7`E!XMk_RRx+G0+54 zcdzH>{N^B7ALn_`e8i+!R>5qch!m~IYc&ETIXYG7F~PuF(~OLNYo+EA3BdC_8B z>+pyHo(?SSi`{{S)9t|ZXn5@_IPCK13ZEmR2ZS@*W?<&Zp@oiz_`ujD#JL?V( z(o(!?)P>C(Q@Z|`7IV7g~zcUJ`Uk9MsWmB<5@h97jPV};Vrz4cknJg z#^?9~U*ao#gKu#TKj0F6!Dal0Kk%oVYpf{ihl_KUh^vGXHZRFK{P-4o>H4ycZ)x4K zRa<(?%li9iQp|KGd`M3Ex~A_o3<22kG8-qJ+VxX~+E Date: Sat, 9 May 2020 22:11:17 -0700 Subject: [PATCH 12/26] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6bcf5363f..9ef204084 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ jobs: --target base --cache-from $CACHE_IMAGE:base --tag $CACHE_IMAGE:base - --file test/Dockerfile.base + --file Dockerfile.base "." - cd ../ - stage: build test container From a9fd767ab18e8222923b63230527c872699fba92 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sat, 9 May 2020 22:28:28 -0700 Subject: [PATCH 13/26] Revision of .travis.yaml --- .travis.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ef204084..daa5c2a6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,39 +7,33 @@ env: global: CACHE_IMAGE: ofuhrer/fv3atm_test -before_script: - - docker pull $CACHE_IMAGE:base || true - - docker pull $CACHE_IMAGE:test || true - jobs: include: - - stage: build base container + - stage: build docker images script: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - cd test + - docker pull $CACHE_IMAGE:base || true - docker build --target base --cache-from $CACHE_IMAGE:base --tag $CACHE_IMAGE:base --file Dockerfile.base "." + - docker push $CACHE_IMAGE:base - cd ../ - - stage: build test container - script: + - docker pull $CACHE_IMAGE:test || true - docker build --target test --cache-from $CACHE_IMAGE:test --tag $CACHE_IMAGE:test --file test/Dockerfile.test "." - - stage: run test + - docker push $CACHE_IMAGE:test + - stage: run tests script: docker run -it --rm - --mount type=bind,source=`pwd`/work,target=/work + --mount type=bind,source=$TRAVIS_BUILD_DIR/test/work,target=/work --name=fv3_atm ofuhrer/fv3atm_test:test - -after_success: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - docker push $CACHE_IMAGE:base - - docker push $CACHE_IMAGE:test From 36f65f6659b50936792cf9112f3e27ef0b64c5a0 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sat, 9 May 2020 22:36:44 -0700 Subject: [PATCH 14/26] Update .travis.yml --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index daa5c2a6c..ab974c963 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ -sudo: required +language: C + +sudo: false services: - docker From d2c6e0e874e806f2b5ee8fbed3a1978a04fb4aab Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 22:50:51 -0700 Subject: [PATCH 15/26] Update .travis.yml --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index ab974c963..315d239f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,11 @@ services: env: global: CACHE_IMAGE: ofuhrer/fv3atm_test + +before_script: + - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=- + - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} + - gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE} jobs: include: From 297df9e75eb9845e441e2dabe2cd85c0701f239a Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 22:53:41 -0700 Subject: [PATCH 16/26] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 315d239f7..3ea6a3b2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: CACHE_IMAGE: ofuhrer/fv3atm_test before_script: - - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=- + - echo $GCLOUD_SERVICE_KEY | gcloud fv3config-gcr-ci-deploy-l5sr@vcm-ml.iam.gserviceaccount.com activate-service-account --key-file=- - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} - gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE} From 9bcced4afd139c6e4a01186f67863b81b3aa863f Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 22:55:25 -0700 Subject: [PATCH 17/26] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3ea6a3b2f..f0a3debb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: CACHE_IMAGE: ofuhrer/fv3atm_test before_script: - - echo $GCLOUD_SERVICE_KEY | gcloud fv3config-gcr-ci-deploy-l5sr@vcm-ml.iam.gserviceaccount.com activate-service-account --key-file=- + - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account ${GCLOUD_SERVICE_ACCOUNT} --key-file=- - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} - gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE} From 5dd8c5b5ed07d5d7e9ca421b2ef550333f1ba9e9 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 22:59:54 -0700 Subject: [PATCH 18/26] Update .travis.yml --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0a3debb3..356e88394 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,14 @@ services: env: global: CACHE_IMAGE: ofuhrer/fv3atm_test - + PATH: ${HOME}/google-cloud-sdk/bin:$PATH + CLOUDSDK_CORE_DISABLE_PROMPTS: 1 +install: + - curl https://sdk.cloud.google.com | bash; + - ls -l ${HOME}/google-cloud-sdk/bin + - which gcloud + - gcloud --version + before_script: - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account ${GCLOUD_SERVICE_ACCOUNT} --key-file=- - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} From 429908a1d2b7a3166efd1d44f80d2d2ed40a6551 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 23:00:04 -0700 Subject: [PATCH 19/26] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 356e88394..5d93d8793 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ env: CACHE_IMAGE: ofuhrer/fv3atm_test PATH: ${HOME}/google-cloud-sdk/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS: 1 + install: - curl https://sdk.cloud.google.com | bash; - ls -l ${HOME}/google-cloud-sdk/bin From a745c7278d2a8bb2d66a04676537f7e19f108279 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 23:21:06 -0700 Subject: [PATCH 20/26] Update .travis.yml --- .travis.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d93d8793..30cab18f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,19 +8,11 @@ services: env: global: CACHE_IMAGE: ofuhrer/fv3atm_test - PATH: ${HOME}/google-cloud-sdk/bin:$PATH - CLOUDSDK_CORE_DISABLE_PROMPTS: 1 -install: - - curl https://sdk.cloud.google.com | bash; - - ls -l ${HOME}/google-cloud-sdk/bin - - which gcloud - - gcloud --version - -before_script: - - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account ${GCLOUD_SERVICE_ACCOUNT} --key-file=- - - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} - - gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE} +#before_script: +# - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account ${GCLOUD_SERVICE_ACCOUNT} --key-file=- +# - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} +# - gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE} jobs: include: From 0ba978caea8c5ad2dfe68ec51b450f5f9461acd4 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Sun, 10 May 2020 23:24:22 -0700 Subject: [PATCH 21/26] Update .travis.yml --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 30cab18f1..bb6ded6a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,10 @@ services: env: global: CACHE_IMAGE: ofuhrer/fv3atm_test - + +before_install: + - test -n $CC && unset CC + #before_script: # - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account ${GCLOUD_SERVICE_ACCOUNT} --key-file=- # - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} From 5526dc339fe41070dc5fa7f7eb79cfae96fb5021 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Mon, 11 May 2020 08:37:31 -0700 Subject: [PATCH 22/26] minor updates --- test/work/create_rundir.py | 8 ++++++-- test/work/run_test.sh | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/test/work/create_rundir.py b/test/work/create_rundir.py index 704e0c9f5..c59e43dde 100755 --- a/test/work/create_rundir.py +++ b/test/work/create_rundir.py @@ -2,6 +2,10 @@ import fv3config -config = fv3config.config_from_yaml('default.yaml') -fv3config.write_run_directory(config, './rundir') +rundir = './rundir' +config = './default.yaml' + +print('Creating rundir [' + rundir + '] from config [' + config + ']') +config = fv3config.config_from_yaml(config) +fv3config.write_run_directory(config, rundir) diff --git a/test/work/run_test.sh b/test/work/run_test.sh index a90d848af..9d61c0aa0 100755 --- a/test/work/run_test.sh +++ b/test/work/run_test.sh @@ -1,5 +1,8 @@ #!/bin/bash +set -x +set -e + cd /work if [ -d ./rundir ] ; then @@ -8,10 +11,14 @@ if [ -d ./rundir ] ; then fi ./create_rundir.py -cd /work/rundir -ln -s /FV3/fv3.exe . +if [ ! -d ./rundir -o ! -f ./rundir/INPUT/gfs_data.tile1.nc ] ; then + echo "ERROR: problem creating rundir" + exit 1 +fi +cd /work/rundir +ln -s /FV3/fv3.exe . mpirun --allow-run-as-root --mca btl_vader_single_copy_mechanism none \ --oversubscribe --merge-stderr-to-stdout --tag-output --timestamp-output \ ./fv3.exe 2>&1 | tee fv3.out From 2fb92dde53332720b129b5d4a16e8d960fdc31e2 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Mon, 11 May 2020 14:59:56 -0700 Subject: [PATCH 23/26] replace fv3config --- test/Dockerfile.base | 12 ++++++------ test/work/run_test.sh | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/Dockerfile.base b/test/Dockerfile.base index 5da5174ea..9c9815672 100644 --- a/test/Dockerfile.base +++ b/test/Dockerfile.base @@ -112,12 +112,12 @@ COPY etc/configure.fv3.gnu_docker /FV3/conf/configure.fv3 #RUN cd /FV3 && make clean && make libs -j8 #RUN cd /FV3/atmos_cubed_sphere && make clean && cd /FV3 && make -j8 -## --------------------------------------------------------------------------------- -## Install fv3config -RUN git clone -b $FV3CONFIG_BRANCH https://github.com/VulcanClimateModeling/fv3config.git && \ - cd fv3config && \ - pip install --no-cache-dir -e . && \ - python -m fv3config.download_data +## ## --------------------------------------------------------------------------------- +## ## Install fv3config +## RUN git clone -b $FV3CONFIG_BRANCH https://github.com/VulcanClimateModeling/fv3config.git && \ +## cd fv3config && \ +## pip install --no-cache-dir -e . && \ +## python -m fv3config.download_data ## --------------------------------------------------------------------------------- ## Not meant for entering diff --git a/test/work/run_test.sh b/test/work/run_test.sh index 9d61c0aa0..8128b6ed7 100755 --- a/test/work/run_test.sh +++ b/test/work/run_test.sh @@ -10,7 +10,8 @@ if [ -d ./rundir ] ; then exit 1 fi -./create_rundir.py +#./create_rundir.py +curl -X GET 'https://www.googleapis.com/storage/v1/b/vcm-ml-public/o/data_for_demos%2FTravisCI%2Frundir.tar.gz?alt=media' | tar xvz if [ ! -d ./rundir -o ! -f ./rundir/INPUT/gfs_data.tile1.nc ] ; then echo "ERROR: problem creating rundir" From edcc461f2843fcce9bc6adcb515968ab7600c489 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Mon, 11 May 2020 15:36:13 -0700 Subject: [PATCH 24/26] 6 ranks --- test/work/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/work/run_test.sh b/test/work/run_test.sh index 8128b6ed7..d802269e6 100755 --- a/test/work/run_test.sh +++ b/test/work/run_test.sh @@ -20,7 +20,7 @@ fi cd /work/rundir ln -s /FV3/fv3.exe . -mpirun --allow-run-as-root --mca btl_vader_single_copy_mechanism none \ +mpirun -n 6 --allow-run-as-root --mca btl_vader_single_copy_mechanism none \ --oversubscribe --merge-stderr-to-stdout --tag-output --timestamp-output \ ./fv3.exe 2>&1 | tee fv3.out From bb5f5f5f05f90885f385c33c0201aa23169351cb Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Mon, 11 May 2020 15:38:25 -0700 Subject: [PATCH 25/26] remove GCS stuff --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb6ded6a8..a364b3d4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,6 @@ env: before_install: - test -n $CC && unset CC -#before_script: -# - echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account ${GCLOUD_SERVICE_ACCOUNT} --key-file=- -# - gcloud --quiet config set project ${GCLOUD_PROJECT_ID} -# - gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE} - jobs: include: - stage: build docker images From 9cd4a1e7a7b172ef5d1901c26f08f35c78e60153 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Mon, 11 May 2020 15:46:53 -0700 Subject: [PATCH 26/26] remove unused files --- test/work/create_rundir.py | 11 -- test/work/default.yaml | 296 ------------------------------------- 2 files changed, 307 deletions(-) delete mode 100755 test/work/create_rundir.py delete mode 100644 test/work/default.yaml diff --git a/test/work/create_rundir.py b/test/work/create_rundir.py deleted file mode 100755 index c59e43dde..000000000 --- a/test/work/create_rundir.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -import fv3config - -rundir = './rundir' -config = './default.yaml' - -print('Creating rundir [' + rundir + '] from config [' + config + ']') -config = fv3config.config_from_yaml(config) -fv3config.write_run_directory(config, rundir) - diff --git a/test/work/default.yaml b/test/work/default.yaml deleted file mode 100644 index ce3efacfb..000000000 --- a/test/work/default.yaml +++ /dev/null @@ -1,296 +0,0 @@ -data_table: default -diag_table: default -experiment_name: default -forcing: "gs://vcm-fv3config/data/base_forcing/v1.1/" -orographic_forcing: gs://vcm-fv3config/data/orographic_data/v1.0 -initial_conditions: gs://vcm-fv3config/data/initial_conditions/gfs_c12_example/v1.0 -namelist: - amip_interp_nml: - data_set: reynolds_oi - date_out_of_range: climo - interp_oi_sst: true - no_anom_sst: false - use_ncep_ice: false - use_ncep_sst: true - atmos_model_nml: - blocksize: 24 - chksum_debug: false - dycore_only: false - fdiag: 0.0 - fhmax: 1024.0 - fhmaxhf: -1.0 - fhout: 0.25 - fhouthf: 0.0 - cires_ugwp_nml: - knob_ugwp_azdir: - - 2 - - 4 - - 4 - - 4 - knob_ugwp_doaxyz: 1 - knob_ugwp_doheat: 1 - knob_ugwp_dokdis: 0 - knob_ugwp_effac: - - 1 - - 1 - - 1 - - 1 - knob_ugwp_ndx4lh: 4 - knob_ugwp_solver: 2 - knob_ugwp_source: - - 1 - - 1 - - 1 - - 0 - knob_ugwp_stoch: - - 0 - - 0 - - 0 - - 0 - knob_ugwp_version: 0 - knob_ugwp_wvspec: - - 1 - - 32 - - 32 - - 32 - launch_level: 55 - coupler_nml: - atmos_nthreads: 1 - calendar: julian - current_date: - - 2016 - - 8 - - 1 - - 0 - - 0 - - 0 - days: 0 - dt_atmos: 900 - dt_ocean: 900 - hours: 0 - memuse_verbose: true - minutes: 30 - months: 0 - ncores_per_node: 32 - seconds: 0 - use_hyper_thread: true - diag_manager_nml: - prepend_date: false - external_ic_nml: - checker_tr: false - filtered_terrain: true - gfs_dwinds: true - levp: 64 - nt_checker: 0 - fms_io_nml: - checksum_required: false - max_files_r: 100 - max_files_w: 100 - fms_nml: - clock_grain: ROUTINE - domains_stack_size: 3000000 - print_memory_usage: false - fv_core_nml: - a_imp: 1.0 - adjust_dry_mass: false - beta: 0.0 - consv_am: false - consv_te: 1.0 - d2_bg: 0.0 - d2_bg_k1: 0.16 - d2_bg_k2: 0.02 - d4_bg: 0.15 - d_con: 1.0 - d_ext: 0.0 - dddmp: 0.2 - delt_max: 0.002 - dnats: 1 - do_sat_adj: true - do_vort_damp: true - dwind_2d: false - external_ic: true - fill: true - fv_debug: false - fv_sg_adj: 900 - gfs_phil: false - hord_dp: 6 - hord_mt: 6 - hord_tm: 6 - hord_tr: 8 - hord_vt: 6 - hydrostatic: false - io_layout: - - 1 - - 1 - k_split: 1 - ke_bg: 0.0 - kord_mt: 10 - kord_tm: -10 - kord_tr: 10 - kord_wz: 10 - layout: - - 1 - - 1 - make_nh: true - mountain: false - n_split: 6 - n_sponge: 4 - na_init: 1 - ncep_ic: false - nggps_ic: true - no_dycore: false - nord: 2 - npx: 13 - npy: 13 - npz: 63 - ntiles: 6 - nudge: false - nudge_qv: true - nwat: 6 - p_fac: 0.1 - phys_hydrostatic: false - print_freq: 3 - range_warn: true - reset_eta: false - rf_cutoff: 800.0 - rf_fast: false - tau: 5.0 - use_hydro_pressure: false - vtdm4: 0.06 - warm_start: false - z_tracer: true - fv_grid_nml: {} - gfdl_cloud_microphysics_nml: - c_cracw: 0.8 - c_paut: 0.5 - c_pgacs: 0.01 - c_psaci: 0.05 - ccn_l: 300.0 - ccn_o: 100.0 - const_vg: false - const_vi: false - const_vr: false - const_vs: false - de_ice: false - do_qa: true - do_sedi_heat: false - dw_land: 0.16 - dw_ocean: 0.1 - fast_sat_adj: true - fix_negative: true - icloud_f: 1 - mono_prof: true - mp_time: 450.0 - prog_ccn: false - qi0_crt: 8.0e-05 - qi_lim: 1.0 - ql_gen: 0.001 - ql_mlt: 0.001 - qs0_crt: 0.001 - rad_graupel: true - rad_rain: true - rad_snow: true - rh_inc: 0.3 - rh_inr: 0.3 - rh_ins: 0.3 - rthresh: 1.0e-05 - sedi_transport: false - tau_g2v: 900.0 - tau_i2s: 1000.0 - tau_l2v: - - 225.0 - tau_v2l: 150.0 - use_ccn: true - use_ppm: false - vg_max: 12.0 - vi_max: 1.0 - vr_max: 12.0 - vs_max: 2.0 - z_slope_ice: true - z_slope_liq: true - gfs_physics_nml: - cal_pre: false - cdmbgwd: - - 3.5 - - 0.25 - cnvcld: false - cnvgwd: true - debug: false - dspheat: true - fhcyc: 24.0 - fhlwr: 3600.0 - fhswr: 3600.0 - fhzero: 0.25 - hybedmf: true - iaer: 111 - ialb: 1 - ico2: 2 - iems: 1 - imfdeepcnv: 2 - imfshalcnv: 2 - imp_physics: 11 - isol: 2 - isot: 1 - isubc_lw: 2 - isubc_sw: 2 - ivegsrc: 1 - ldiag3d: false - lwhtr: true - ncld: 5 - nst_anl: true - pdfcld: false - pre_rad: false - prslrd0: 0.0 - random_clds: false - redrag: true - shal_cnv: true - swhtr: true - trans_trac: true - use_ufo: true - interpolator_nml: - interp_method: conserve_great_circle - nam_stochy: - lat_s: 96 - lon_s: 192 - ntrunc: 94 - namsfc: - fabsl: 99999 - faisl: 99999 - faiss: 99999 - fnabsc: grb/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb - fnacna: '' - fnaisc: grb/CFSR.SEAICE.1982.2012.monthly.clim.grb - fnalbc: grb/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb - fnalbc2: grb/global_albedo4.1x1.grb - fnglac: grb/global_glacier.2x2.grb - fnmskh: grb/seaice_newland.grb - fnmxic: grb/global_maxice.2x2.grb - fnslpc: grb/global_slope.1x1.grb - fnsmcc: grb/global_soilmgldas.t1534.3072.1536.grb - fnsnoa: '' - fnsnoc: grb/global_snoclim.1.875.grb - fnsotc: grb/global_soiltype.statsgo.t1534.3072.1536.rg.grb - fntg3c: grb/global_tg3clim.2.6x1.5.grb - fntsfa: '' - fntsfc: grb/RTGSST.1982.2012.monthly.clim.grb - fnvegc: grb/global_vegfrac.0.144.decpercent.grb - fnvetc: grb/global_vegtype.igbp.t1534.3072.1536.rg.grb - fnvmnc: grb/global_shdmin.0.144x0.144.grb - fnvmxc: grb/global_shdmax.0.144x0.144.grb - fnzorc: igbp - fsicl: 99999 - fsics: 99999 - fslpl: 99999 - fsmcl: - - 99999 - - 99999 - - 99999 - fsnol: 99999 - fsnos: 99999 - fsotl: 99999 - ftsfl: 99999 - ftsfs: 90 - fvetl: 99999 - fvmnl: 99999 - fvmxl: 99999 - ldebug: false