diff --git a/sorc/ocnice_prep.fd/ice.csv b/sorc/ocnice_prep.fd/ice.csv index 9feab1cd9..74f0b94fd 100644 --- a/sorc/ocnice_prep.fd/ice.csv +++ b/sorc/ocnice_prep.fd/ice.csv @@ -1,52 +1,52 @@ ! variable name, dimension, grid location, remapping method, vector pair, grid location of vector pair - 'uvel' , 2, 'Bu_x', 'bilinear', 'vvel', 'Bu_y' - 'vvel' , 2, 'Bu_y', 'bilinear', 'uvel', 'Bu_x' - 'coszen' , 2, 'Ct', 'bilinear', '', '' -'scale_factor' , 2, 'Ct', 'bilinear', '', '' - 'swvdr' , 2, 'Ct', 'bilinear', '', '' - 'swvdf' , 2, 'Ct', 'bilinear', '', '' - 'swidr' , 2, 'Ct', 'bilinear', '', '' - 'swidf' , 2, 'Ct', 'bilinear', '', '' - 'strocnxT' , 2, 'Ct', 'bilinear', '', '' - 'strocnyT' , 2, 'Ct', 'bilinear', '', '' - 'stressp_1' , 2, 'Ct', 'bilinear', '', '' - 'stressp_2' , 2, 'Ct', 'bilinear', '', '' - 'stressp_3' , 2, 'Ct', 'bilinear', '', '' - 'stressp_4' , 2, 'Ct', 'bilinear', '', '' - 'stressm_1' , 2, 'Ct', 'bilinear', '', '' - 'stressm_2' , 2, 'Ct', 'bilinear', '', '' - 'stressm_3' , 2, 'Ct', 'bilinear', '', '' - 'stressm_4' , 2, 'Ct', 'bilinear', '', '' - 'stress12_1' , 2, 'Ct', 'bilinear', '', '' - 'stress12_2' , 2, 'Ct', 'bilinear', '', '' - 'stress12_3' , 2, 'Ct', 'bilinear', '', '' - 'stress12_4' , 2, 'Ct', 'bilinear', '', '' - 'iceumask' , 2, 'Ct', 'bilinear', '', '' - 'fsnow' , 2, 'Ct', 'bilinear', '', '' - 'aicen' , 3 , 'Ct', 'bilinear', '', '' - 'vicen' , 3 , 'Ct', 'bilinear', '', '' - 'vsnon' , 3 , 'Ct', 'bilinear', '', '' - 'Tsfcn' , 3 , 'Ct', 'bilinear', '', '' - 'iage' , 3 , 'Ct', 'bilinear', '', '' - 'alvl' , 3 , 'Ct', 'bilinear', '', '' - 'vlvl' , 3 , 'Ct', 'bilinear', '', '' - 'apnd' , 3 , 'Ct', 'bilinear', '', '' - 'hpnd' , 3 , 'Ct', 'bilinear', '', '' - 'ipnd' , 3 , 'Ct', 'bilinear', '', '' - 'dhs' , 3 , 'Ct', 'bilinear', '', '' - 'ffrac' , 3 , 'Ct', 'bilinear', '', '' - 'sice001' , 3 , 'Ct', 'bilinear', '', '' - 'qice001' , 3 , 'Ct', 'bilinear', '', '' - 'sice002' , 3 , 'Ct', 'bilinear', '', '' - 'qice002' , 3 , 'Ct', 'bilinear', '', '' - 'sice003' , 3 , 'Ct', 'bilinear', '', '' - 'qice003' , 3 , 'Ct', 'bilinear', '', '' - 'sice004' , 3 , 'Ct', 'bilinear', '', '' - 'qice004' , 3 , 'Ct', 'bilinear', '', '' - 'sice005' , 3 , 'Ct', 'bilinear', '', '' - 'qice005' , 3 , 'Ct', 'bilinear', '', '' - 'sice006' , 3 , 'Ct', 'bilinear', '', '' - 'qice006' , 3 , 'Ct', 'bilinear', '', '' - 'sice007' , 3 , 'Ct', 'bilinear', '', '' - 'qice007' , 3 , 'Ct', 'bilinear', '', '' - 'qsno001' , 3 , 'Ct', 'bilinear', '', '' \ No newline at end of file + 'uvel' , 2, 'Bu_x', 'bilinear', 'vvel', 'Bu_y' + 'vvel' , 2, 'Bu_y', 'bilinear', 'uvel', 'Bu_x' + 'coszen' , 2, 'Ct', 'bilinear', '', '' +'scale_factor' , 2, 'Ct', 'bilinear', '', '' + 'swvdr' , 2, 'Ct', 'bilinear', '', '' + 'swvdf' , 2, 'Ct', 'bilinear', '', '' + 'swidr' , 2, 'Ct', 'bilinear', '', '' + 'swidf' , 2, 'Ct', 'bilinear', '', '' + 'strocnxT' , 2, 'Ct', 'bilinear', '', '' + 'strocnyT' , 2, 'Ct', 'bilinear', '', '' + 'stressp_1' , 2, 'Ct', 'bilinear', '', '' + 'stressp_2' , 2, 'Ct', 'bilinear', '', '' + 'stressp_3' , 2, 'Ct', 'bilinear', '', '' + 'stressp_4' , 2, 'Ct', 'bilinear', '', '' + 'stressm_1' , 2, 'Ct', 'bilinear', '', '' + 'stressm_2' , 2, 'Ct', 'bilinear', '', '' + 'stressm_3' , 2, 'Ct', 'bilinear', '', '' + 'stressm_4' , 2, 'Ct', 'bilinear', '', '' + 'stress12_1' , 2, 'Ct', 'bilinear', '', '' + 'stress12_2' , 2, 'Ct', 'bilinear', '', '' + 'stress12_3' , 2, 'Ct', 'bilinear', '', '' + 'stress12_4' , 2, 'Ct', 'bilinear', '', '' + 'iceumask' , 2, 'Ct', 'bilinear', '', '' + 'fsnow' , 2, 'Ct', 'bilinear', '', '' + 'aicen' , 3 , 'Ct', 'bilinear', '', '' + 'vicen' , 3 , 'Ct', 'bilinear', '', '' + 'vsnon' , 3 , 'Ct', 'bilinear', '', '' + 'Tsfcn' , 3 , 'Ct', 'bilinear', '', '' + 'iage' , 3 , 'Ct', 'bilinear', '', '' + 'alvl' , 3 , 'Ct', 'bilinear', '', '' + 'vlvl' , 3 , 'Ct', 'bilinear', '', '' + 'apnd' , 3 , 'Ct', 'bilinear', '', '' + 'hpnd' , 3 , 'Ct', 'bilinear', '', '' + 'ipnd' , 3 , 'Ct', 'bilinear', '', '' + 'dhs' , 3 , 'Ct', 'bilinear', '', '' + 'ffrac' , 3 , 'Ct', 'bilinear', '', '' + 'sice001' , 3 , 'Ct', 'bilinear', '', '' + 'qice001' , 3 , 'Ct', 'bilinear', '', '' + 'sice002' , 3 , 'Ct', 'bilinear', '', '' + 'qice002' , 3 , 'Ct', 'bilinear', '', '' + 'sice003' , 3 , 'Ct', 'bilinear', '', '' + 'qice003' , 3 , 'Ct', 'bilinear', '', '' + 'sice004' , 3 , 'Ct', 'bilinear', '', '' + 'qice004' , 3 , 'Ct', 'bilinear', '', '' + 'sice005' , 3 , 'Ct', 'bilinear', '', '' + 'qice005' , 3 , 'Ct', 'bilinear', '', '' + 'sice006' , 3 , 'Ct', 'bilinear', '', '' + 'qice006' , 3 , 'Ct', 'bilinear', '', '' + 'sice007' , 3 , 'Ct', 'bilinear', '', '' + 'qice007' , 3 , 'Ct', 'bilinear', '', '' + 'qsno001' , 3 , 'Ct', 'bilinear', '', '' diff --git a/sorc/ocnice_prep.fd/init_mod.F90 b/sorc/ocnice_prep.fd/init_mod.F90 index 65e4e6050..d90e45f0f 100644 --- a/sorc/ocnice_prep.fd/init_mod.F90 +++ b/sorc/ocnice_prep.fd/init_mod.F90 @@ -102,7 +102,7 @@ subroutine readnml(fname,errmsg,rc) if (nxt == 1440 .and. nyt == 1080) fsrc = 'mx025' ! 1/4deg tripole if (len_trim(fsrc) == 0) then rc = 1 - write(errmsg,'(a)')'FATAL ERROR: source grid dimensions incorrect' + write(errmsg,'(a)')'FATAL ERROR: source grid dimensions invalid' return end if @@ -111,7 +111,13 @@ subroutine readnml(fname,errmsg,rc) if (nxr == 72 .and. nyr == 35) fdst = 'mx500' ! 5deg tripole if (len_trim(fdst) == 0) then rc = 1 - write(errmsg,'(a)')'FATAL ERROR: destination grid dimensions incorrect' + write(errmsg,'(a)')'FATAL ERROR: destination grid dimensions invalid' + return + end if + + if (trim(fdst) == 'mx500') then + rc = 1 + write(errmsg,'(a)')'FATAL ERROR: 5deg destination grid is not supported' return end if diff --git a/sorc/ocnice_prep.fd/ocniceprep.nml b/sorc/ocnice_prep.fd/ocniceprep.nml index e29041741..9a7541444 100644 --- a/sorc/ocnice_prep.fd/ocniceprep.nml +++ b/sorc/ocnice_prep.fd/ocniceprep.nml @@ -3,6 +3,6 @@ ftype='ocean' wgtsdir='/scratch1/NCEPDEV/stmp4/Denise.Worthen/CPLD_GRIDGEN/rt_1191124/' griddir='/scratch1/NCEPDEV/stmp4/Denise.Worthen/CPLD_GRIDGEN/rt_1191124/' srcdims=1440,1080 -dstdims=360,320 +dstdims=72,35 debug=.true. / diff --git a/tests/ocnice_prep/CMakeLists.txt b/tests/ocnice_prep/CMakeLists.txt index 52d590b96..622d647d0 100644 --- a/tests/ocnice_prep/CMakeLists.txt +++ b/tests/ocnice_prep/CMakeLists.txt @@ -24,6 +24,8 @@ execute_process( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/data/invalid.srcdim.nml ${CMAKE_CURRENT_BINARY_DIR}/data/invalid.srcdim.nml) execute_process( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/data/invalid.dstdim.nml ${CMAKE_CURRENT_BINARY_DIR}/data/invalid.dstdim.nml) +execute_process( COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/data/invalid.dst5p00.nml ${CMAKE_CURRENT_BINARY_DIR}/data/invalid.dst5p00.nml) execute_process( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/data/ice.badvecpairs.csv ${CMAKE_CURRENT_BINARY_DIR}/data/ice.badvecpairs.csv) execute_process( COMMAND ${CMAKE_COMMAND} -E copy diff --git a/tests/ocnice_prep/data/ice.badvecpairs.csv b/tests/ocnice_prep/data/ice.badvecpairs.csv index 7c2530d5a..ece687578 100644 --- a/tests/ocnice_prep/data/ice.badvecpairs.csv +++ b/tests/ocnice_prep/data/ice.badvecpairs.csv @@ -1,52 +1,52 @@ ! variable name, dimension, grid location, remapping method, vector pair, grid location of vector pair 'uvel' , 2, 'Bu_x', 'bilinear', 'vvel', 'Bu_y' - 'coszen' , 2, 'Ct', 'bilinear', '', '' + 'coszen' , 2, 'Ct', 'bilinear', '', '' 'vvel' , 2, 'Bu_y', 'bilinear', 'uvel', 'Bu_x' -'scale_factor' , 2, 'Ct', 'bilinear', '', '' - 'swvdr' , 2, 'Ct', 'bilinear', '', '' - 'swvdf' , 2, 'Ct', 'bilinear', '', '' - 'swidr' , 2, 'Ct', 'bilinear', '', '' - 'swidf' , 2, 'Ct', 'bilinear', '', '' - 'strocnxT' , 2, 'Ct', 'bilinear', '', '' - 'strocnyT' , 2, 'Ct', 'bilinear', '', '' - 'stressp_1' , 2, 'Ct', 'bilinear', '', '' - 'stressp_2' , 2, 'Ct', 'bilinear', '', '' - 'stressp_3' , 2, 'Ct', 'bilinear', '', '' - 'stressp_4' , 2, 'Ct', 'bilinear', '', '' - 'stressm_1' , 2, 'Ct', 'bilinear', '', '' - 'stressm_2' , 2, 'Ct', 'bilinear', '', '' - 'stressm_3' , 2, 'Ct', 'bilinear', '', '' - 'stressm_4' , 2, 'Ct', 'bilinear', '', '' - 'stress12_1' , 2, 'Ct', 'bilinear', '', '' - 'stress12_2' , 2, 'Ct', 'bilinear', '', '' - 'stress12_3' , 2, 'Ct', 'bilinear', '', '' - 'stress12_4' , 2, 'Ct', 'bilinear', '', '' - 'iceumask' , 2, 'Ct', 'bilinear', '', '' - 'fsnow' , 2, 'Ct', 'bilinear', '', '' - 'aicen' , 3 , 'Ct', 'bilinear', '', '' - 'vicen' , 3 , 'Ct', 'bilinear', '', '' - 'vsnon' , 3 , 'Ct', 'bilinear', '', '' - 'Tsfcn' , 3 , 'Ct', 'bilinear', '', '' - 'iage' , 3 , 'Ct', 'bilinear', '', '' - 'alvl' , 3 , 'Ct', 'bilinear', '', '' - 'vlvl' , 3 , 'Ct', 'bilinear', '', '' - 'apnd' , 3 , 'Ct', 'bilinear', '', '' - 'hpnd' , 3 , 'Ct', 'bilinear', '', '' - 'ipnd' , 3 , 'Ct', 'bilinear', '', '' - 'dhs' , 3 , 'Ct', 'bilinear', '', '' - 'ffrac' , 3 , 'Ct', 'bilinear', '', '' - 'sice001' , 3 , 'Ct', 'bilinear', '', '' - 'qice001' , 3 , 'Ct', 'bilinear', '', '' - 'sice002' , 3 , 'Ct', 'bilinear', '', '' - 'qice002' , 3 , 'Ct', 'bilinear', '', '' - 'sice003' , 3 , 'Ct', 'bilinear', '', '' - 'qice003' , 3 , 'Ct', 'bilinear', '', '' - 'sice004' , 3 , 'Ct', 'bilinear', '', '' - 'qice004' , 3 , 'Ct', 'bilinear', '', '' - 'sice005' , 3 , 'Ct', 'bilinear', '', '' - 'qice005' , 3 , 'Ct', 'bilinear', '', '' - 'sice006' , 3 , 'Ct', 'bilinear', '', '' - 'qice006' , 3 , 'Ct', 'bilinear', '', '' - 'sice007' , 3 , 'Ct', 'bilinear', '', '' - 'qice007' , 3 , 'Ct', 'bilinear', '', '' - 'qsno001' , 3 , 'Ct', 'bilinear', '', '' \ No newline at end of file +'scale_factor' , 2, 'Ct', 'bilinear', '', '' + 'swvdr' , 2, 'Ct', 'bilinear', '', '' + 'swvdf' , 2, 'Ct', 'bilinear', '', '' + 'swidr' , 2, 'Ct', 'bilinear', '', '' + 'swidf' , 2, 'Ct', 'bilinear', '', '' + 'strocnxT' , 2, 'Ct', 'bilinear', '', '' + 'strocnyT' , 2, 'Ct', 'bilinear', '', '' + 'stressp_1' , 2, 'Ct', 'bilinear', '', '' + 'stressp_2' , 2, 'Ct', 'bilinear', '', '' + 'stressp_3' , 2, 'Ct', 'bilinear', '', '' + 'stressp_4' , 2, 'Ct', 'bilinear', '', '' + 'stressm_1' , 2, 'Ct', 'bilinear', '', '' + 'stressm_2' , 2, 'Ct', 'bilinear', '', '' + 'stressm_3' , 2, 'Ct', 'bilinear', '', '' + 'stressm_4' , 2, 'Ct', 'bilinear', '', '' + 'stress12_1' , 2, 'Ct', 'bilinear', '', '' + 'stress12_2' , 2, 'Ct', 'bilinear', '', '' + 'stress12_3' , 2, 'Ct', 'bilinear', '', '' + 'stress12_4' , 2, 'Ct', 'bilinear', '', '' + 'iceumask' , 2, 'Ct', 'bilinear', '', '' + 'fsnow' , 2, 'Ct', 'bilinear', '', '' + 'aicen' , 3 , 'Ct', 'bilinear', '', '' + 'vicen' , 3 , 'Ct', 'bilinear', '', '' + 'vsnon' , 3 , 'Ct', 'bilinear', '', '' + 'Tsfcn' , 3 , 'Ct', 'bilinear', '', '' + 'iage' , 3 , 'Ct', 'bilinear', '', '' + 'alvl' , 3 , 'Ct', 'bilinear', '', '' + 'vlvl' , 3 , 'Ct', 'bilinear', '', '' + 'apnd' , 3 , 'Ct', 'bilinear', '', '' + 'hpnd' , 3 , 'Ct', 'bilinear', '', '' + 'ipnd' , 3 , 'Ct', 'bilinear', '', '' + 'dhs' , 3 , 'Ct', 'bilinear', '', '' + 'ffrac' , 3 , 'Ct', 'bilinear', '', '' + 'sice001' , 3 , 'Ct', 'bilinear', '', '' + 'qice001' , 3 , 'Ct', 'bilinear', '', '' + 'sice002' , 3 , 'Ct', 'bilinear', '', '' + 'qice002' , 3 , 'Ct', 'bilinear', '', '' + 'sice003' , 3 , 'Ct', 'bilinear', '', '' + 'qice003' , 3 , 'Ct', 'bilinear', '', '' + 'sice004' , 3 , 'Ct', 'bilinear', '', '' + 'qice004' , 3 , 'Ct', 'bilinear', '', '' + 'sice005' , 3 , 'Ct', 'bilinear', '', '' + 'qice005' , 3 , 'Ct', 'bilinear', '', '' + 'sice006' , 3 , 'Ct', 'bilinear', '', '' + 'qice006' , 3 , 'Ct', 'bilinear', '', '' + 'sice007' , 3 , 'Ct', 'bilinear', '', '' + 'qice007' , 3 , 'Ct', 'bilinear', '', '' + 'qsno001' , 3 , 'Ct', 'bilinear', '', '' diff --git a/tests/ocnice_prep/data/invalid.dst5p00.nml b/tests/ocnice_prep/data/invalid.dst5p00.nml new file mode 100644 index 000000000..9a7541444 --- /dev/null +++ b/tests/ocnice_prep/data/invalid.dst5p00.nml @@ -0,0 +1,8 @@ +&ocniceprep_nml +ftype='ocean' +wgtsdir='/scratch1/NCEPDEV/stmp4/Denise.Worthen/CPLD_GRIDGEN/rt_1191124/' +griddir='/scratch1/NCEPDEV/stmp4/Denise.Worthen/CPLD_GRIDGEN/rt_1191124/' +srcdims=1440,1080 +dstdims=72,35 +debug=.true. +/ diff --git a/tests/ocnice_prep/data/ocean.badvecgrid.csv b/tests/ocnice_prep/data/ocean.badvecgrid.csv index 5b40a2772..57602035e 100644 --- a/tests/ocnice_prep/data/ocean.badvecgrid.csv +++ b/tests/ocnice_prep/data/ocean.badvecgrid.csv @@ -5,4 +5,4 @@ 'Salt', 3 ,'Ct' , 'bilinear' , '', '' 'h', 3 ,'Ct' , 'bilinear' , '', '' 'u', 3 ,'Cu' , 'bilinear' , 'v' , 'Cv' - 'v', 3 ,'Cu' , 'bilinear' , 'u' , 'Cu' \ No newline at end of file + 'v', 3 ,'Cu' , 'bilinear' , 'u' , 'Cu' diff --git a/tests/ocnice_prep/data/ocean.badvecpairs.csv b/tests/ocnice_prep/data/ocean.badvecpairs.csv index ebd48c202..e4694d5b1 100644 --- a/tests/ocnice_prep/data/ocean.badvecpairs.csv +++ b/tests/ocnice_prep/data/ocean.badvecpairs.csv @@ -5,4 +5,4 @@ 'Salt', 3 ,'Ct' , 'bilinear' , '', '' 'u', 3 ,'Cu' , 'bilinear' , 'v' , 'Cv' 'h', 3 ,'Ct' , 'bilinear' , '', '' - 'v', 3 ,'Cv' , 'bilinear' , 'u' , 'Cu' \ No newline at end of file + 'v', 3 ,'Cv' , 'bilinear' , 'u' , 'Cu' diff --git a/tests/ocnice_prep/ftst_program_setup.F90 b/tests/ocnice_prep/ftst_program_setup.F90 index efab038fc..73cd8d9f5 100644 --- a/tests/ocnice_prep/ftst_program_setup.F90 +++ b/tests/ocnice_prep/ftst_program_setup.F90 @@ -19,7 +19,7 @@ program ftst_program_setup integer :: passed, ntests integer :: nvalid - ntests = 8 + ntests = 9 passed = 0 testpath = 'tests/ocnice_prep/' @@ -40,6 +40,10 @@ program ftst_program_setup print *,trim(errmsg),rc if (rc .eq. 1)passed = passed+1 + call readnml(trim(testpath)//'data/invalid.dst5p00.nml',errmsg, rc) + print *,trim(errmsg),rc + if (rc .eq. 1)passed = passed+1 + ! test csv files call readcsv(trim(testpath)//'data/ice.badvecpairs.csv',errmsg,rc,nvalid) print *,trim(errmsg),rc